mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.49
This commit is contained in:
parent
e5eeec83b3
commit
969ddb4746
4 changed files with 1125 additions and 63 deletions
|
|
@ -8708,6 +8708,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
||||||
case TypeInternalLinkTypeMessageDraft:
|
case TypeInternalLinkTypeMessageDraft:
|
||||||
return UnmarshalInternalLinkTypeMessageDraft(result.Data)
|
return UnmarshalInternalLinkTypeMessageDraft(result.Data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeMyStars:
|
||||||
|
return UnmarshalInternalLinkTypeMyStars(result.Data)
|
||||||
|
|
||||||
case TypeInternalLinkTypePassportDataRequest:
|
case TypeInternalLinkTypePassportDataRequest:
|
||||||
return UnmarshalInternalLinkTypePassportDataRequest(result.Data)
|
return UnmarshalInternalLinkTypePassportDataRequest(result.Data)
|
||||||
|
|
||||||
|
|
@ -19163,6 +19166,35 @@ func (client *Client) ToggleSupergroupCanHaveSponsoredMessages(req *ToggleSuperg
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ToggleSupergroupHasAutomaticTranslationRequest struct {
|
||||||
|
// The identifier of the channel
|
||||||
|
SupergroupId int64 `json:"supergroup_id"`
|
||||||
|
// The new value of has_automatic_translation
|
||||||
|
HasAutomaticTranslation bool `json:"has_automatic_translation"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggles whether messages are automatically translated in the channel chat; requires can_change_info administrator right in the channel. The chat must have at least chatBoostFeatures.min_automatic_translation_boost_level boost level to enable automatic translation
|
||||||
|
func (client *Client) ToggleSupergroupHasAutomaticTranslation(req *ToggleSupergroupHasAutomaticTranslationRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "toggleSupergroupHasAutomaticTranslation",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"supergroup_id": req.SupergroupId,
|
||||||
|
"has_automatic_translation": req.HasAutomaticTranslation,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type ToggleSupergroupHasHiddenMembersRequest struct {
|
type ToggleSupergroupHasHiddenMembersRequest struct {
|
||||||
// Identifier of the supergroup
|
// Identifier of the supergroup
|
||||||
SupergroupId int64 `json:"supergroup_id"`
|
SupergroupId int64 `json:"supergroup_id"`
|
||||||
|
|
@ -19670,7 +19702,7 @@ func (client *Client) SetGiftSettings(req *SetGiftSettingsRequest) (*Ok, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns gifts that can be sent to other users and channel chats
|
// Returns gifts that can be sent to other users and channel chats
|
||||||
func (client *Client) GetAvailableGifts() (*Gifts, error) {
|
func (client *Client) GetAvailableGifts() (*AvailableGifts, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "getAvailableGifts",
|
Type: "getAvailableGifts",
|
||||||
|
|
@ -19685,7 +19717,7 @@ func (client *Client) GetAvailableGifts() (*Gifts, error) {
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalGifts(result.Data)
|
return UnmarshalAvailableGifts(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SendGiftRequest struct {
|
type SendGiftRequest struct {
|
||||||
|
|
@ -19938,6 +19970,38 @@ func (client *Client) TransferGift(req *TransferGiftRequest) (*Ok, error) {
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SendResoldGiftRequest struct {
|
||||||
|
// Name of the upgraded gift to send
|
||||||
|
GiftName string `json:"gift_name"`
|
||||||
|
// Identifier of the user or the channel chat that will receive the gift
|
||||||
|
OwnerId MessageSender `json:"owner_id"`
|
||||||
|
// The amount of Telegram Stars required to pay for the gift
|
||||||
|
StarCount int64 `json:"star_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sends an upgraded gift that is available for resale to another user or channel chat; gifts already owned by the current user must be transferred using transferGift and can't be passed to the method
|
||||||
|
func (client *Client) SendResoldGift(req *SendResoldGiftRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "sendResoldGift",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"gift_name": req.GiftName,
|
||||||
|
"owner_id": req.OwnerId,
|
||||||
|
"star_count": req.StarCount,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetReceivedGiftsRequest struct {
|
type GetReceivedGiftsRequest struct {
|
||||||
// Unique identifier of business connection on behalf of which to send the request; for bots only
|
// Unique identifier of business connection on behalf of which to send the request; for bots only
|
||||||
BusinessConnectionId string `json:"business_connection_id"`
|
BusinessConnectionId string `json:"business_connection_id"`
|
||||||
|
|
@ -20072,6 +20136,73 @@ func (client *Client) GetUpgradedGiftWithdrawalUrl(req *GetUpgradedGiftWithdrawa
|
||||||
return UnmarshalHttpUrl(result.Data)
|
return UnmarshalHttpUrl(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetGiftResalePriceRequest struct {
|
||||||
|
// Identifier of the unique gift
|
||||||
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
|
// The new price for the unique gift; 0 or getOption("gift_resale_star_count_min")-getOption("gift_resale_star_count_max"). Pass 0 to disallow gift resale. The current user will receive getOption("gift_resale_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for the gift
|
||||||
|
ResaleStarCount int64 `json:"resale_star_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes resale price of a unique gift owned by the current user
|
||||||
|
func (client *Client) SetGiftResalePrice(req *SetGiftResalePriceRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setGiftResalePrice",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"received_gift_id": req.ReceivedGiftId,
|
||||||
|
"resale_star_count": req.ResaleStarCount,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SearchGiftsForResaleRequest struct {
|
||||||
|
// Identifier of the regular gift that was upgraded to a unique gift
|
||||||
|
GiftId JsonInt64 `json:"gift_id"`
|
||||||
|
// Order in which the results will be sorted
|
||||||
|
Order GiftForResaleOrder `json:"order"`
|
||||||
|
// Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed. If none attributes of specific type are specified, then all values for this attribute type are allowed
|
||||||
|
Attributes []UpgradedGiftAttributeId `json:"attributes"`
|
||||||
|
// Offset of the first entry to return as received from the previous request with the same order and attributes; use empty string to get the first chunk of results
|
||||||
|
Offset string `json:"offset"`
|
||||||
|
// The maximum number of gifts to return
|
||||||
|
Limit int32 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns upgraded gifts that can be bought from other owners
|
||||||
|
func (client *Client) SearchGiftsForResale(req *SearchGiftsForResaleRequest) (*GiftsForResale, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "searchGiftsForResale",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"gift_id": req.GiftId,
|
||||||
|
"order": req.Order,
|
||||||
|
"attributes": req.Attributes,
|
||||||
|
"offset": req.Offset,
|
||||||
|
"limit": req.Limit,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalGiftsForResale(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type CreateInvoiceLinkRequest struct {
|
type CreateInvoiceLinkRequest struct {
|
||||||
// Unique identifier of business connection on behalf of which to send the request
|
// Unique identifier of business connection on behalf of which to send the request
|
||||||
BusinessConnectionId string `json:"business_connection_id"`
|
BusinessConnectionId string `json:"business_connection_id"`
|
||||||
|
|
|
||||||
600
client/type.go
600
client/type.go
|
|
@ -26,6 +26,8 @@ const (
|
||||||
ClassStarSubscriptionType = "StarSubscriptionType"
|
ClassStarSubscriptionType = "StarSubscriptionType"
|
||||||
ClassAffiliateType = "AffiliateType"
|
ClassAffiliateType = "AffiliateType"
|
||||||
ClassAffiliateProgramSortOrder = "AffiliateProgramSortOrder"
|
ClassAffiliateProgramSortOrder = "AffiliateProgramSortOrder"
|
||||||
|
ClassUpgradedGiftAttributeId = "UpgradedGiftAttributeId"
|
||||||
|
ClassGiftForResaleOrder = "GiftForResaleOrder"
|
||||||
ClassSentGift = "SentGift"
|
ClassSentGift = "SentGift"
|
||||||
ClassStarTransactionDirection = "StarTransactionDirection"
|
ClassStarTransactionDirection = "StarTransactionDirection"
|
||||||
ClassStarTransactionType = "StarTransactionType"
|
ClassStarTransactionType = "StarTransactionType"
|
||||||
|
|
@ -280,9 +282,15 @@ const (
|
||||||
ClassUpgradedGiftBackdrop = "UpgradedGiftBackdrop"
|
ClassUpgradedGiftBackdrop = "UpgradedGiftBackdrop"
|
||||||
ClassUpgradedGiftOriginalDetails = "UpgradedGiftOriginalDetails"
|
ClassUpgradedGiftOriginalDetails = "UpgradedGiftOriginalDetails"
|
||||||
ClassGift = "Gift"
|
ClassGift = "Gift"
|
||||||
ClassGifts = "Gifts"
|
|
||||||
ClassUpgradedGift = "UpgradedGift"
|
ClassUpgradedGift = "UpgradedGift"
|
||||||
ClassUpgradeGiftResult = "UpgradeGiftResult"
|
ClassUpgradeGiftResult = "UpgradeGiftResult"
|
||||||
|
ClassAvailableGift = "AvailableGift"
|
||||||
|
ClassAvailableGifts = "AvailableGifts"
|
||||||
|
ClassUpgradedGiftModelCount = "UpgradedGiftModelCount"
|
||||||
|
ClassUpgradedGiftSymbolCount = "UpgradedGiftSymbolCount"
|
||||||
|
ClassUpgradedGiftBackdropCount = "UpgradedGiftBackdropCount"
|
||||||
|
ClassGiftForResale = "GiftForResale"
|
||||||
|
ClassGiftsForResale = "GiftsForResale"
|
||||||
ClassReceivedGift = "ReceivedGift"
|
ClassReceivedGift = "ReceivedGift"
|
||||||
ClassReceivedGifts = "ReceivedGifts"
|
ClassReceivedGifts = "ReceivedGifts"
|
||||||
ClassGiftUpgradePreview = "GiftUpgradePreview"
|
ClassGiftUpgradePreview = "GiftUpgradePreview"
|
||||||
|
|
@ -798,9 +806,21 @@ const (
|
||||||
TypeUpgradedGiftBackdrop = "upgradedGiftBackdrop"
|
TypeUpgradedGiftBackdrop = "upgradedGiftBackdrop"
|
||||||
TypeUpgradedGiftOriginalDetails = "upgradedGiftOriginalDetails"
|
TypeUpgradedGiftOriginalDetails = "upgradedGiftOriginalDetails"
|
||||||
TypeGift = "gift"
|
TypeGift = "gift"
|
||||||
TypeGifts = "gifts"
|
|
||||||
TypeUpgradedGift = "upgradedGift"
|
TypeUpgradedGift = "upgradedGift"
|
||||||
TypeUpgradeGiftResult = "upgradeGiftResult"
|
TypeUpgradeGiftResult = "upgradeGiftResult"
|
||||||
|
TypeAvailableGift = "availableGift"
|
||||||
|
TypeAvailableGifts = "availableGifts"
|
||||||
|
TypeUpgradedGiftAttributeIdModel = "upgradedGiftAttributeIdModel"
|
||||||
|
TypeUpgradedGiftAttributeIdSymbol = "upgradedGiftAttributeIdSymbol"
|
||||||
|
TypeUpgradedGiftAttributeIdBackdrop = "upgradedGiftAttributeIdBackdrop"
|
||||||
|
TypeUpgradedGiftModelCount = "upgradedGiftModelCount"
|
||||||
|
TypeUpgradedGiftSymbolCount = "upgradedGiftSymbolCount"
|
||||||
|
TypeUpgradedGiftBackdropCount = "upgradedGiftBackdropCount"
|
||||||
|
TypeGiftForResaleOrderPrice = "giftForResaleOrderPrice"
|
||||||
|
TypeGiftForResaleOrderPriceChangeDate = "giftForResaleOrderPriceChangeDate"
|
||||||
|
TypeGiftForResaleOrderNumber = "giftForResaleOrderNumber"
|
||||||
|
TypeGiftForResale = "giftForResale"
|
||||||
|
TypeGiftsForResale = "giftsForResale"
|
||||||
TypeSentGiftRegular = "sentGiftRegular"
|
TypeSentGiftRegular = "sentGiftRegular"
|
||||||
TypeSentGiftUpgraded = "sentGiftUpgraded"
|
TypeSentGiftUpgraded = "sentGiftUpgraded"
|
||||||
TypeReceivedGift = "receivedGift"
|
TypeReceivedGift = "receivedGift"
|
||||||
|
|
@ -831,6 +851,8 @@ const (
|
||||||
TypeStarTransactionTypeGiftTransfer = "starTransactionTypeGiftTransfer"
|
TypeStarTransactionTypeGiftTransfer = "starTransactionTypeGiftTransfer"
|
||||||
TypeStarTransactionTypeGiftSale = "starTransactionTypeGiftSale"
|
TypeStarTransactionTypeGiftSale = "starTransactionTypeGiftSale"
|
||||||
TypeStarTransactionTypeGiftUpgrade = "starTransactionTypeGiftUpgrade"
|
TypeStarTransactionTypeGiftUpgrade = "starTransactionTypeGiftUpgrade"
|
||||||
|
TypeStarTransactionTypeUpgradedGiftPurchase = "starTransactionTypeUpgradedGiftPurchase"
|
||||||
|
TypeStarTransactionTypeUpgradedGiftSale = "starTransactionTypeUpgradedGiftSale"
|
||||||
TypeStarTransactionTypeChannelPaidReactionSend = "starTransactionTypeChannelPaidReactionSend"
|
TypeStarTransactionTypeChannelPaidReactionSend = "starTransactionTypeChannelPaidReactionSend"
|
||||||
TypeStarTransactionTypeChannelPaidReactionReceive = "starTransactionTypeChannelPaidReactionReceive"
|
TypeStarTransactionTypeChannelPaidReactionReceive = "starTransactionTypeChannelPaidReactionReceive"
|
||||||
TypeStarTransactionTypeAffiliateProgramCommission = "starTransactionTypeAffiliateProgramCommission"
|
TypeStarTransactionTypeAffiliateProgramCommission = "starTransactionTypeAffiliateProgramCommission"
|
||||||
|
|
@ -1701,6 +1723,7 @@ const (
|
||||||
TypeChatEventHasAggressiveAntiSpamEnabledToggled = "chatEventHasAggressiveAntiSpamEnabledToggled"
|
TypeChatEventHasAggressiveAntiSpamEnabledToggled = "chatEventHasAggressiveAntiSpamEnabledToggled"
|
||||||
TypeChatEventSignMessagesToggled = "chatEventSignMessagesToggled"
|
TypeChatEventSignMessagesToggled = "chatEventSignMessagesToggled"
|
||||||
TypeChatEventShowMessageSenderToggled = "chatEventShowMessageSenderToggled"
|
TypeChatEventShowMessageSenderToggled = "chatEventShowMessageSenderToggled"
|
||||||
|
TypeChatEventAutomaticTranslationToggled = "chatEventAutomaticTranslationToggled"
|
||||||
TypeChatEventInviteLinkEdited = "chatEventInviteLinkEdited"
|
TypeChatEventInviteLinkEdited = "chatEventInviteLinkEdited"
|
||||||
TypeChatEventInviteLinkRevoked = "chatEventInviteLinkRevoked"
|
TypeChatEventInviteLinkRevoked = "chatEventInviteLinkRevoked"
|
||||||
TypeChatEventInviteLinkDeleted = "chatEventInviteLinkDeleted"
|
TypeChatEventInviteLinkDeleted = "chatEventInviteLinkDeleted"
|
||||||
|
|
@ -2033,6 +2056,7 @@ const (
|
||||||
TypeInternalLinkTypeMainWebApp = "internalLinkTypeMainWebApp"
|
TypeInternalLinkTypeMainWebApp = "internalLinkTypeMainWebApp"
|
||||||
TypeInternalLinkTypeMessage = "internalLinkTypeMessage"
|
TypeInternalLinkTypeMessage = "internalLinkTypeMessage"
|
||||||
TypeInternalLinkTypeMessageDraft = "internalLinkTypeMessageDraft"
|
TypeInternalLinkTypeMessageDraft = "internalLinkTypeMessageDraft"
|
||||||
|
TypeInternalLinkTypeMyStars = "internalLinkTypeMyStars"
|
||||||
TypeInternalLinkTypePassportDataRequest = "internalLinkTypePassportDataRequest"
|
TypeInternalLinkTypePassportDataRequest = "internalLinkTypePassportDataRequest"
|
||||||
TypeInternalLinkTypePhoneNumberConfirmation = "internalLinkTypePhoneNumberConfirmation"
|
TypeInternalLinkTypePhoneNumberConfirmation = "internalLinkTypePhoneNumberConfirmation"
|
||||||
TypeInternalLinkTypePremiumFeatures = "internalLinkTypePremiumFeatures"
|
TypeInternalLinkTypePremiumFeatures = "internalLinkTypePremiumFeatures"
|
||||||
|
|
@ -2141,6 +2165,7 @@ const (
|
||||||
TypeSuggestedActionSetProfilePhoto = "suggestedActionSetProfilePhoto"
|
TypeSuggestedActionSetProfilePhoto = "suggestedActionSetProfilePhoto"
|
||||||
TypeSuggestedActionExtendPremium = "suggestedActionExtendPremium"
|
TypeSuggestedActionExtendPremium = "suggestedActionExtendPremium"
|
||||||
TypeSuggestedActionExtendStarSubscriptions = "suggestedActionExtendStarSubscriptions"
|
TypeSuggestedActionExtendStarSubscriptions = "suggestedActionExtendStarSubscriptions"
|
||||||
|
TypeSuggestedActionCustom = "suggestedActionCustom"
|
||||||
TypeCount = "count"
|
TypeCount = "count"
|
||||||
TypeText = "text"
|
TypeText = "text"
|
||||||
TypeData = "data"
|
TypeData = "data"
|
||||||
|
|
@ -2464,6 +2489,16 @@ type AffiliateProgramSortOrder interface {
|
||||||
AffiliateProgramSortOrderType() string
|
AffiliateProgramSortOrderType() string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Contains identifier of an upgraded gift attribute to search for
|
||||||
|
type UpgradedGiftAttributeId interface {
|
||||||
|
UpgradedGiftAttributeIdType() string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Describes order in which upgraded gifts for resale will be sorted
|
||||||
|
type GiftForResaleOrder interface {
|
||||||
|
GiftForResaleOrderType() string
|
||||||
|
}
|
||||||
|
|
||||||
// Represents content of a gift received by a user or a channel chat
|
// Represents content of a gift received by a user or a channel chat
|
||||||
type SentGift interface {
|
type SentGift interface {
|
||||||
SentGiftType() string
|
SentGiftType() string
|
||||||
|
|
@ -8766,6 +8801,8 @@ func (*UpgradedGiftBackdropColors) GetType() string {
|
||||||
// Describes a backdrop of an upgraded gift
|
// Describes a backdrop of an upgraded gift
|
||||||
type UpgradedGiftBackdrop struct {
|
type UpgradedGiftBackdrop struct {
|
||||||
meta
|
meta
|
||||||
|
// Unique identifier of the backdrop
|
||||||
|
Id int32 `json:"id"`
|
||||||
// Name of the backdrop
|
// Name of the backdrop
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// Colors of the backdrop
|
// Colors of the backdrop
|
||||||
|
|
@ -8885,29 +8922,6 @@ func (*Gift) GetType() string {
|
||||||
return TypeGift
|
return TypeGift
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contains a list of gifts that can be sent to another user or channel chat
|
|
||||||
type Gifts struct {
|
|
||||||
meta
|
|
||||||
// The list of gifts
|
|
||||||
Gifts []*Gift `json:"gifts"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (entity *Gifts) MarshalJSON() ([]byte, error) {
|
|
||||||
entity.meta.Type = entity.GetType()
|
|
||||||
|
|
||||||
type stub Gifts
|
|
||||||
|
|
||||||
return json.Marshal((*stub)(entity))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*Gifts) GetClass() string {
|
|
||||||
return ClassGifts
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*Gifts) GetType() string {
|
|
||||||
return TypeGifts
|
|
||||||
}
|
|
||||||
|
|
||||||
// Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
|
// Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
|
||||||
type UpgradedGift struct {
|
type UpgradedGift struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -8915,7 +8929,7 @@ type UpgradedGift struct {
|
||||||
Id JsonInt64 `json:"id"`
|
Id JsonInt64 `json:"id"`
|
||||||
// The title of the upgraded gift
|
// The title of the upgraded gift
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
// Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift
|
// Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// Unique number of the upgraded gift among gifts upgraded from the same gift
|
// Unique number of the upgraded gift among gifts upgraded from the same gift
|
||||||
Number int32 `json:"number"`
|
Number int32 `json:"number"`
|
||||||
|
|
@ -8939,6 +8953,8 @@ type UpgradedGift struct {
|
||||||
Backdrop *UpgradedGiftBackdrop `json:"backdrop"`
|
Backdrop *UpgradedGiftBackdrop `json:"backdrop"`
|
||||||
// Information about the originally sent gift; may be null if unknown
|
// Information about the originally sent gift; may be null if unknown
|
||||||
OriginalDetails *UpgradedGiftOriginalDetails `json:"original_details"`
|
OriginalDetails *UpgradedGiftOriginalDetails `json:"original_details"`
|
||||||
|
// Number of Telegram Stars that must be paid to buy the gift and send it to someone else; 0 if resale isn't possible
|
||||||
|
ResaleStarCount int64 `json:"resale_star_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (entity *UpgradedGift) MarshalJSON() ([]byte, error) {
|
func (entity *UpgradedGift) MarshalJSON() ([]byte, error) {
|
||||||
|
|
@ -8973,6 +8989,7 @@ func (upgradedGift *UpgradedGift) UnmarshalJSON(data []byte) error {
|
||||||
Symbol *UpgradedGiftSymbol `json:"symbol"`
|
Symbol *UpgradedGiftSymbol `json:"symbol"`
|
||||||
Backdrop *UpgradedGiftBackdrop `json:"backdrop"`
|
Backdrop *UpgradedGiftBackdrop `json:"backdrop"`
|
||||||
OriginalDetails *UpgradedGiftOriginalDetails `json:"original_details"`
|
OriginalDetails *UpgradedGiftOriginalDetails `json:"original_details"`
|
||||||
|
ResaleStarCount int64 `json:"resale_star_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
err := json.Unmarshal(data, &tmp)
|
err := json.Unmarshal(data, &tmp)
|
||||||
|
|
@ -8993,6 +9010,7 @@ func (upgradedGift *UpgradedGift) UnmarshalJSON(data []byte) error {
|
||||||
upgradedGift.Symbol = tmp.Symbol
|
upgradedGift.Symbol = tmp.Symbol
|
||||||
upgradedGift.Backdrop = tmp.Backdrop
|
upgradedGift.Backdrop = tmp.Backdrop
|
||||||
upgradedGift.OriginalDetails = tmp.OriginalDetails
|
upgradedGift.OriginalDetails = tmp.OriginalDetails
|
||||||
|
upgradedGift.ResaleStarCount = tmp.ResaleStarCount
|
||||||
|
|
||||||
fieldOwnerId, _ := UnmarshalMessageSender(tmp.OwnerId)
|
fieldOwnerId, _ := UnmarshalMessageSender(tmp.OwnerId)
|
||||||
upgradedGift.OwnerId = fieldOwnerId
|
upgradedGift.OwnerId = fieldOwnerId
|
||||||
|
|
@ -9013,6 +9031,10 @@ type UpgradeGiftResult struct {
|
||||||
CanBeTransferred bool `json:"can_be_transferred"`
|
CanBeTransferred bool `json:"can_be_transferred"`
|
||||||
// Number of Telegram Stars that must be paid to transfer the upgraded gift
|
// Number of Telegram Stars that must be paid to transfer the upgraded gift
|
||||||
TransferStarCount int64 `json:"transfer_star_count"`
|
TransferStarCount int64 `json:"transfer_star_count"`
|
||||||
|
// Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible
|
||||||
|
NextTransferDate int32 `json:"next_transfer_date"`
|
||||||
|
// Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
|
NextResaleDate int32 `json:"next_resale_date"`
|
||||||
// Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT
|
// Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT
|
||||||
ExportDate int32 `json:"export_date"`
|
ExportDate int32 `json:"export_date"`
|
||||||
}
|
}
|
||||||
|
|
@ -9033,6 +9055,347 @@ func (*UpgradeGiftResult) GetType() string {
|
||||||
return TypeUpgradeGiftResult
|
return TypeUpgradeGiftResult
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Describes a gift that is available for purchase
|
||||||
|
type AvailableGift struct {
|
||||||
|
meta
|
||||||
|
// The gift
|
||||||
|
Gift *Gift `json:"gift"`
|
||||||
|
// Number of gifts that are available for resale
|
||||||
|
ResaleCount int32 `json:"resale_count"`
|
||||||
|
// The minimum price for the gifts available for resale; 0 if there are no such gifts
|
||||||
|
MinResaleStarCount int64 `json:"min_resale_star_count"`
|
||||||
|
// The title of the upgraded gift; empty if the gift isn't available for resale
|
||||||
|
Title string `json:"title"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *AvailableGift) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub AvailableGift
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AvailableGift) GetClass() string {
|
||||||
|
return ClassAvailableGift
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AvailableGift) GetType() string {
|
||||||
|
return TypeAvailableGift
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contains a list of gifts that can be sent to another user or channel chat
|
||||||
|
type AvailableGifts struct {
|
||||||
|
meta
|
||||||
|
// The list of gifts
|
||||||
|
Gifts []*AvailableGift `json:"gifts"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *AvailableGifts) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub AvailableGifts
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AvailableGifts) GetClass() string {
|
||||||
|
return ClassAvailableGifts
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AvailableGifts) GetType() string {
|
||||||
|
return TypeAvailableGifts
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identifier of a gift model
|
||||||
|
type UpgradedGiftAttributeIdModel struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the sticker representing the model
|
||||||
|
StickerId JsonInt64 `json:"sticker_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpgradedGiftAttributeIdModel) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpgradedGiftAttributeIdModel
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdModel) GetClass() string {
|
||||||
|
return ClassUpgradedGiftAttributeId
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdModel) GetType() string {
|
||||||
|
return TypeUpgradedGiftAttributeIdModel
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdModel) UpgradedGiftAttributeIdType() string {
|
||||||
|
return TypeUpgradedGiftAttributeIdModel
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identifier of a gift symbol
|
||||||
|
type UpgradedGiftAttributeIdSymbol struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the sticker representing the symbol
|
||||||
|
StickerId JsonInt64 `json:"sticker_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpgradedGiftAttributeIdSymbol) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpgradedGiftAttributeIdSymbol
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdSymbol) GetClass() string {
|
||||||
|
return ClassUpgradedGiftAttributeId
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdSymbol) GetType() string {
|
||||||
|
return TypeUpgradedGiftAttributeIdSymbol
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdSymbol) UpgradedGiftAttributeIdType() string {
|
||||||
|
return TypeUpgradedGiftAttributeIdSymbol
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identifier of a gift backdrop
|
||||||
|
type UpgradedGiftAttributeIdBackdrop struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the backdrop
|
||||||
|
BackdropId int32 `json:"backdrop_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpgradedGiftAttributeIdBackdrop) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpgradedGiftAttributeIdBackdrop
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdBackdrop) GetClass() string {
|
||||||
|
return ClassUpgradedGiftAttributeId
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdBackdrop) GetType() string {
|
||||||
|
return TypeUpgradedGiftAttributeIdBackdrop
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftAttributeIdBackdrop) UpgradedGiftAttributeIdType() string {
|
||||||
|
return TypeUpgradedGiftAttributeIdBackdrop
|
||||||
|
}
|
||||||
|
|
||||||
|
// Describes a model of an upgraded gift with the number of gifts found
|
||||||
|
type UpgradedGiftModelCount struct {
|
||||||
|
meta
|
||||||
|
// The model
|
||||||
|
Model *UpgradedGiftModel `json:"model"`
|
||||||
|
// Total number of gifts with the model
|
||||||
|
TotalCount int32 `json:"total_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpgradedGiftModelCount) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpgradedGiftModelCount
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftModelCount) GetClass() string {
|
||||||
|
return ClassUpgradedGiftModelCount
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftModelCount) GetType() string {
|
||||||
|
return TypeUpgradedGiftModelCount
|
||||||
|
}
|
||||||
|
|
||||||
|
// Describes a symbol shown on the pattern of an upgraded gift
|
||||||
|
type UpgradedGiftSymbolCount struct {
|
||||||
|
meta
|
||||||
|
// The symbol
|
||||||
|
Symbol *UpgradedGiftSymbol `json:"symbol"`
|
||||||
|
// Total number of gifts with the symbol
|
||||||
|
TotalCount int32 `json:"total_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpgradedGiftSymbolCount) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpgradedGiftSymbolCount
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftSymbolCount) GetClass() string {
|
||||||
|
return ClassUpgradedGiftSymbolCount
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftSymbolCount) GetType() string {
|
||||||
|
return TypeUpgradedGiftSymbolCount
|
||||||
|
}
|
||||||
|
|
||||||
|
// Describes a backdrop of an upgraded gift
|
||||||
|
type UpgradedGiftBackdropCount struct {
|
||||||
|
meta
|
||||||
|
// The backdrop
|
||||||
|
Backdrop *UpgradedGiftBackdrop `json:"backdrop"`
|
||||||
|
// Total number of gifts with the symbol
|
||||||
|
TotalCount int32 `json:"total_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpgradedGiftBackdropCount) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpgradedGiftBackdropCount
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftBackdropCount) GetClass() string {
|
||||||
|
return ClassUpgradedGiftBackdropCount
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpgradedGiftBackdropCount) GetType() string {
|
||||||
|
return TypeUpgradedGiftBackdropCount
|
||||||
|
}
|
||||||
|
|
||||||
|
// The gifts will be sorted by their price from the lowest to the highest
|
||||||
|
type GiftForResaleOrderPrice struct{
|
||||||
|
meta
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *GiftForResaleOrderPrice) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub GiftForResaleOrderPrice
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderPrice) GetClass() string {
|
||||||
|
return ClassGiftForResaleOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderPrice) GetType() string {
|
||||||
|
return TypeGiftForResaleOrderPrice
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderPrice) GiftForResaleOrderType() string {
|
||||||
|
return TypeGiftForResaleOrderPrice
|
||||||
|
}
|
||||||
|
|
||||||
|
// The gifts will be sorted by the last date when their price was changed from the newest to the oldest
|
||||||
|
type GiftForResaleOrderPriceChangeDate struct{
|
||||||
|
meta
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *GiftForResaleOrderPriceChangeDate) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub GiftForResaleOrderPriceChangeDate
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderPriceChangeDate) GetClass() string {
|
||||||
|
return ClassGiftForResaleOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderPriceChangeDate) GetType() string {
|
||||||
|
return TypeGiftForResaleOrderPriceChangeDate
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderPriceChangeDate) GiftForResaleOrderType() string {
|
||||||
|
return TypeGiftForResaleOrderPriceChangeDate
|
||||||
|
}
|
||||||
|
|
||||||
|
// The gifts will be sorted by their number from the smallest to the largest
|
||||||
|
type GiftForResaleOrderNumber struct{
|
||||||
|
meta
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *GiftForResaleOrderNumber) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub GiftForResaleOrderNumber
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderNumber) GetClass() string {
|
||||||
|
return ClassGiftForResaleOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderNumber) GetType() string {
|
||||||
|
return TypeGiftForResaleOrderNumber
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResaleOrderNumber) GiftForResaleOrderType() string {
|
||||||
|
return TypeGiftForResaleOrderNumber
|
||||||
|
}
|
||||||
|
|
||||||
|
// Describes a gift available for resale
|
||||||
|
type GiftForResale struct {
|
||||||
|
meta
|
||||||
|
// The gift
|
||||||
|
Gift *UpgradedGift `json:"gift"`
|
||||||
|
// Unique identifier of the received gift for the current user; only for the gifts owned by the current user
|
||||||
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *GiftForResale) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub GiftForResale
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResale) GetClass() string {
|
||||||
|
return ClassGiftForResale
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftForResale) GetType() string {
|
||||||
|
return TypeGiftForResale
|
||||||
|
}
|
||||||
|
|
||||||
|
// Describes gifts available for resale
|
||||||
|
type GiftsForResale struct {
|
||||||
|
meta
|
||||||
|
// Total number of gifts found
|
||||||
|
TotalCount int32 `json:"total_count"`
|
||||||
|
// The gifts
|
||||||
|
Gifts []*GiftForResale `json:"gifts"`
|
||||||
|
// Available models; for searchGiftsForResale requests without offset and attributes only
|
||||||
|
Models []*UpgradedGiftModelCount `json:"models"`
|
||||||
|
// Available symbols; for searchGiftsForResale requests without offset and attributes only
|
||||||
|
Symbols []*UpgradedGiftSymbolCount `json:"symbols"`
|
||||||
|
// Available backdrops; for searchGiftsForResale requests without offset and attributes only
|
||||||
|
Backdrops []*UpgradedGiftBackdropCount `json:"backdrops"`
|
||||||
|
// The offset for the next request. If empty, then there are no more results
|
||||||
|
NextOffset string `json:"next_offset"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *GiftsForResale) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub GiftsForResale
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftsForResale) GetClass() string {
|
||||||
|
return ClassGiftsForResale
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GiftsForResale) GetType() string {
|
||||||
|
return TypeGiftsForResale
|
||||||
|
}
|
||||||
|
|
||||||
// Regular gift
|
// Regular gift
|
||||||
type SentGiftRegular struct {
|
type SentGiftRegular struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -9118,6 +9481,10 @@ type ReceivedGift struct {
|
||||||
PrepaidUpgradeStarCount int64 `json:"prepaid_upgrade_star_count"`
|
PrepaidUpgradeStarCount int64 `json:"prepaid_upgrade_star_count"`
|
||||||
// Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
// Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
||||||
TransferStarCount int64 `json:"transfer_star_count"`
|
TransferStarCount int64 `json:"transfer_star_count"`
|
||||||
|
// Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
|
||||||
|
NextTransferDate int32 `json:"next_transfer_date"`
|
||||||
|
// Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
|
NextResaleDate int32 `json:"next_resale_date"`
|
||||||
// Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
// Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
||||||
ExportDate int32 `json:"export_date"`
|
ExportDate int32 `json:"export_date"`
|
||||||
}
|
}
|
||||||
|
|
@ -9154,6 +9521,8 @@ func (receivedGift *ReceivedGift) UnmarshalJSON(data []byte) error {
|
||||||
SellStarCount int64 `json:"sell_star_count"`
|
SellStarCount int64 `json:"sell_star_count"`
|
||||||
PrepaidUpgradeStarCount int64 `json:"prepaid_upgrade_star_count"`
|
PrepaidUpgradeStarCount int64 `json:"prepaid_upgrade_star_count"`
|
||||||
TransferStarCount int64 `json:"transfer_star_count"`
|
TransferStarCount int64 `json:"transfer_star_count"`
|
||||||
|
NextTransferDate int32 `json:"next_transfer_date"`
|
||||||
|
NextResaleDate int32 `json:"next_resale_date"`
|
||||||
ExportDate int32 `json:"export_date"`
|
ExportDate int32 `json:"export_date"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9174,6 +9543,8 @@ func (receivedGift *ReceivedGift) UnmarshalJSON(data []byte) error {
|
||||||
receivedGift.SellStarCount = tmp.SellStarCount
|
receivedGift.SellStarCount = tmp.SellStarCount
|
||||||
receivedGift.PrepaidUpgradeStarCount = tmp.PrepaidUpgradeStarCount
|
receivedGift.PrepaidUpgradeStarCount = tmp.PrepaidUpgradeStarCount
|
||||||
receivedGift.TransferStarCount = tmp.TransferStarCount
|
receivedGift.TransferStarCount = tmp.TransferStarCount
|
||||||
|
receivedGift.NextTransferDate = tmp.NextTransferDate
|
||||||
|
receivedGift.NextResaleDate = tmp.NextResaleDate
|
||||||
receivedGift.ExportDate = tmp.ExportDate
|
receivedGift.ExportDate = tmp.ExportDate
|
||||||
|
|
||||||
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||||
|
|
@ -10092,6 +10463,66 @@ func (*StarTransactionTypeGiftUpgrade) StarTransactionTypeType() string {
|
||||||
return TypeStarTransactionTypeGiftUpgrade
|
return TypeStarTransactionTypeGiftUpgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The transaction is a purchase of an upgraded gift for some user or channel; for regular users only
|
||||||
|
type StarTransactionTypeUpgradedGiftPurchase struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the user that sold the gift
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// The gift
|
||||||
|
Gift *UpgradedGift `json:"gift"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *StarTransactionTypeUpgradedGiftPurchase) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub StarTransactionTypeUpgradedGiftPurchase
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StarTransactionTypeUpgradedGiftPurchase) GetClass() string {
|
||||||
|
return ClassStarTransactionType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StarTransactionTypeUpgradedGiftPurchase) GetType() string {
|
||||||
|
return TypeStarTransactionTypeUpgradedGiftPurchase
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StarTransactionTypeUpgradedGiftPurchase) StarTransactionTypeType() string {
|
||||||
|
return TypeStarTransactionTypeUpgradedGiftPurchase
|
||||||
|
}
|
||||||
|
|
||||||
|
// The transaction is a sale of an upgraded gift; for regular users only
|
||||||
|
type StarTransactionTypeUpgradedGiftSale struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the user that bought the gift
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// The gift
|
||||||
|
Gift *UpgradedGift `json:"gift"`
|
||||||
|
// Information about commission received by Telegram from the transaction
|
||||||
|
Affiliate *AffiliateInfo `json:"affiliate"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *StarTransactionTypeUpgradedGiftSale) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub StarTransactionTypeUpgradedGiftSale
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StarTransactionTypeUpgradedGiftSale) GetClass() string {
|
||||||
|
return ClassStarTransactionType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StarTransactionTypeUpgradedGiftSale) GetType() string {
|
||||||
|
return TypeStarTransactionTypeUpgradedGiftSale
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StarTransactionTypeUpgradedGiftSale) StarTransactionTypeType() string {
|
||||||
|
return TypeStarTransactionTypeUpgradedGiftSale
|
||||||
|
}
|
||||||
|
|
||||||
// The transaction is a sending of a paid reaction to a message in a channel chat by the current user; for regular users only
|
// The transaction is a sending of a paid reaction to a message in a channel chat by the current user; for regular users only
|
||||||
type StarTransactionTypeChannelPaidReactionSend struct {
|
type StarTransactionTypeChannelPaidReactionSend struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -12712,6 +13143,8 @@ type Supergroup struct {
|
||||||
MemberCount int32 `json:"member_count"`
|
MemberCount int32 `json:"member_count"`
|
||||||
// Approximate boost level for the chat
|
// Approximate boost level for the chat
|
||||||
BoostLevel int32 `json:"boost_level"`
|
BoostLevel int32 `json:"boost_level"`
|
||||||
|
// True, if automatic translation of messages is enabled in the channel
|
||||||
|
HasAutomaticTranslation bool `json:"has_automatic_translation"`
|
||||||
// True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
|
// True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
|
||||||
HasLinkedChat bool `json:"has_linked_chat"`
|
HasLinkedChat bool `json:"has_linked_chat"`
|
||||||
// True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
|
// True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
|
||||||
|
|
@ -12771,6 +13204,7 @@ func (supergroup *Supergroup) UnmarshalJSON(data []byte) error {
|
||||||
Status json.RawMessage `json:"status"`
|
Status json.RawMessage `json:"status"`
|
||||||
MemberCount int32 `json:"member_count"`
|
MemberCount int32 `json:"member_count"`
|
||||||
BoostLevel int32 `json:"boost_level"`
|
BoostLevel int32 `json:"boost_level"`
|
||||||
|
HasAutomaticTranslation bool `json:"has_automatic_translation"`
|
||||||
HasLinkedChat bool `json:"has_linked_chat"`
|
HasLinkedChat bool `json:"has_linked_chat"`
|
||||||
HasLocation bool `json:"has_location"`
|
HasLocation bool `json:"has_location"`
|
||||||
SignMessages bool `json:"sign_messages"`
|
SignMessages bool `json:"sign_messages"`
|
||||||
|
|
@ -12800,6 +13234,7 @@ func (supergroup *Supergroup) UnmarshalJSON(data []byte) error {
|
||||||
supergroup.Date = tmp.Date
|
supergroup.Date = tmp.Date
|
||||||
supergroup.MemberCount = tmp.MemberCount
|
supergroup.MemberCount = tmp.MemberCount
|
||||||
supergroup.BoostLevel = tmp.BoostLevel
|
supergroup.BoostLevel = tmp.BoostLevel
|
||||||
|
supergroup.HasAutomaticTranslation = tmp.HasAutomaticTranslation
|
||||||
supergroup.HasLinkedChat = tmp.HasLinkedChat
|
supergroup.HasLinkedChat = tmp.HasLinkedChat
|
||||||
supergroup.HasLocation = tmp.HasLocation
|
supergroup.HasLocation = tmp.HasLocation
|
||||||
supergroup.SignMessages = tmp.SignMessages
|
supergroup.SignMessages = tmp.SignMessages
|
||||||
|
|
@ -28100,7 +28535,7 @@ type MessageUpgradedGift struct {
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
// Unique identifier of the received gift for the current user; only for the receiver of the gift
|
// Unique identifier of the received gift for the current user; only for the receiver of the gift
|
||||||
ReceivedGiftId string `json:"received_gift_id"`
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred gift
|
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
IsUpgrade bool `json:"is_upgrade"`
|
IsUpgrade bool `json:"is_upgrade"`
|
||||||
// True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift
|
// True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift
|
||||||
IsSaved bool `json:"is_saved"`
|
IsSaved bool `json:"is_saved"`
|
||||||
|
|
@ -28108,8 +28543,14 @@ type MessageUpgradedGift struct {
|
||||||
CanBeTransferred bool `json:"can_be_transferred"`
|
CanBeTransferred bool `json:"can_be_transferred"`
|
||||||
// True, if the gift was transferred to another owner; only for the receiver of the gift
|
// True, if the gift was transferred to another owner; only for the receiver of the gift
|
||||||
WasTransferred bool `json:"was_transferred"`
|
WasTransferred bool `json:"was_transferred"`
|
||||||
|
// Number of Telegram Stars that were paid by the sender for the gift; 0 if the gift was upgraded or transferred
|
||||||
|
LastResaleStarCount int64 `json:"last_resale_star_count"`
|
||||||
// Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
// Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
||||||
TransferStarCount int64 `json:"transfer_star_count"`
|
TransferStarCount int64 `json:"transfer_star_count"`
|
||||||
|
// Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
|
||||||
|
NextTransferDate int32 `json:"next_transfer_date"`
|
||||||
|
// Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
|
NextResaleDate int32 `json:"next_resale_date"`
|
||||||
// Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
// Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
||||||
ExportDate int32 `json:"export_date"`
|
ExportDate int32 `json:"export_date"`
|
||||||
}
|
}
|
||||||
|
|
@ -28143,7 +28584,10 @@ func (messageUpgradedGift *MessageUpgradedGift) UnmarshalJSON(data []byte) error
|
||||||
IsSaved bool `json:"is_saved"`
|
IsSaved bool `json:"is_saved"`
|
||||||
CanBeTransferred bool `json:"can_be_transferred"`
|
CanBeTransferred bool `json:"can_be_transferred"`
|
||||||
WasTransferred bool `json:"was_transferred"`
|
WasTransferred bool `json:"was_transferred"`
|
||||||
|
LastResaleStarCount int64 `json:"last_resale_star_count"`
|
||||||
TransferStarCount int64 `json:"transfer_star_count"`
|
TransferStarCount int64 `json:"transfer_star_count"`
|
||||||
|
NextTransferDate int32 `json:"next_transfer_date"`
|
||||||
|
NextResaleDate int32 `json:"next_resale_date"`
|
||||||
ExportDate int32 `json:"export_date"`
|
ExportDate int32 `json:"export_date"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28158,7 +28602,10 @@ func (messageUpgradedGift *MessageUpgradedGift) UnmarshalJSON(data []byte) error
|
||||||
messageUpgradedGift.IsSaved = tmp.IsSaved
|
messageUpgradedGift.IsSaved = tmp.IsSaved
|
||||||
messageUpgradedGift.CanBeTransferred = tmp.CanBeTransferred
|
messageUpgradedGift.CanBeTransferred = tmp.CanBeTransferred
|
||||||
messageUpgradedGift.WasTransferred = tmp.WasTransferred
|
messageUpgradedGift.WasTransferred = tmp.WasTransferred
|
||||||
|
messageUpgradedGift.LastResaleStarCount = tmp.LastResaleStarCount
|
||||||
messageUpgradedGift.TransferStarCount = tmp.TransferStarCount
|
messageUpgradedGift.TransferStarCount = tmp.TransferStarCount
|
||||||
|
messageUpgradedGift.NextTransferDate = tmp.NextTransferDate
|
||||||
|
messageUpgradedGift.NextResaleDate = tmp.NextResaleDate
|
||||||
messageUpgradedGift.ExportDate = tmp.ExportDate
|
messageUpgradedGift.ExportDate = tmp.ExportDate
|
||||||
|
|
||||||
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||||
|
|
@ -28174,7 +28621,7 @@ type MessageRefundedUpgradedGift struct {
|
||||||
Gift *Gift `json:"gift"`
|
Gift *Gift `json:"gift"`
|
||||||
// Sender of the gift
|
// Sender of the gift
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
// True, if the gift was obtained by upgrading of a previously received gift
|
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
IsUpgrade bool `json:"is_upgrade"`
|
IsUpgrade bool `json:"is_upgrade"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34116,6 +34563,8 @@ type ChatBoostLevelFeatures struct {
|
||||||
CanSetCustomBackground bool `json:"can_set_custom_background"`
|
CanSetCustomBackground bool `json:"can_set_custom_background"`
|
||||||
// True, if custom emoji sticker set can be set for the chat
|
// True, if custom emoji sticker set can be set for the chat
|
||||||
CanSetCustomEmojiStickerSet bool `json:"can_set_custom_emoji_sticker_set"`
|
CanSetCustomEmojiStickerSet bool `json:"can_set_custom_emoji_sticker_set"`
|
||||||
|
// True, if automatic translation of messages can be enabled in the chat
|
||||||
|
CanEnableAutomaticTranslation bool `json:"can_enable_automatic_translation"`
|
||||||
// True, if speech recognition can be used for video note and voice note messages by all users
|
// True, if speech recognition can be used for video note and voice note messages by all users
|
||||||
CanRecognizeSpeech bool `json:"can_recognize_speech"`
|
CanRecognizeSpeech bool `json:"can_recognize_speech"`
|
||||||
// True, if sponsored messages can be disabled in the chat
|
// True, if sponsored messages can be disabled in the chat
|
||||||
|
|
@ -34155,6 +34604,8 @@ type ChatBoostFeatures struct {
|
||||||
MinCustomBackgroundBoostLevel int32 `json:"min_custom_background_boost_level"`
|
MinCustomBackgroundBoostLevel int32 `json:"min_custom_background_boost_level"`
|
||||||
// The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only
|
// The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only
|
||||||
MinCustomEmojiStickerSetBoostLevel int32 `json:"min_custom_emoji_sticker_set_boost_level"`
|
MinCustomEmojiStickerSetBoostLevel int32 `json:"min_custom_emoji_sticker_set_boost_level"`
|
||||||
|
// The minimum boost level allowing to enable automatic translation of messages for non-Premium users; for channel chats only
|
||||||
|
MinAutomaticTranslationBoostLevel int32 `json:"min_automatic_translation_boost_level"`
|
||||||
// The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only
|
// The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only
|
||||||
MinSpeechRecognitionBoostLevel int32 `json:"min_speech_recognition_boost_level"`
|
MinSpeechRecognitionBoostLevel int32 `json:"min_speech_recognition_boost_level"`
|
||||||
// The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only
|
// The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only
|
||||||
|
|
@ -39936,6 +40387,33 @@ func (*ChatEventShowMessageSenderToggled) ChatEventActionType() string {
|
||||||
return TypeChatEventShowMessageSenderToggled
|
return TypeChatEventShowMessageSenderToggled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The has_automatic_translation setting of a channel was toggled
|
||||||
|
type ChatEventAutomaticTranslationToggled struct {
|
||||||
|
meta
|
||||||
|
// New value of has_automatic_translation
|
||||||
|
HasAutomaticTranslation bool `json:"has_automatic_translation"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *ChatEventAutomaticTranslationToggled) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub ChatEventAutomaticTranslationToggled
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ChatEventAutomaticTranslationToggled) GetClass() string {
|
||||||
|
return ClassChatEventAction
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ChatEventAutomaticTranslationToggled) GetType() string {
|
||||||
|
return TypeChatEventAutomaticTranslationToggled
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ChatEventAutomaticTranslationToggled) ChatEventActionType() string {
|
||||||
|
return TypeChatEventAutomaticTranslationToggled
|
||||||
|
}
|
||||||
|
|
||||||
// A chat invite link was edited
|
// A chat invite link was edited
|
||||||
type ChatEventInviteLinkEdited struct {
|
type ChatEventInviteLinkEdited struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -44061,8 +44539,10 @@ func (*Hashtags) GetType() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// A story can be sent
|
// A story can be sent
|
||||||
type CanPostStoryResultOk struct{
|
type CanPostStoryResultOk struct {
|
||||||
meta
|
meta
|
||||||
|
// Number of stories that can be posted by the user
|
||||||
|
StoryCount int32 `json:"story_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (entity *CanPostStoryResultOk) MarshalJSON() ([]byte, error) {
|
func (entity *CanPostStoryResultOk) MarshalJSON() ([]byte, error) {
|
||||||
|
|
@ -45191,7 +45671,7 @@ func (*PushMessageContentGift) PushMessageContentType() string {
|
||||||
// A message with an upgraded gift
|
// A message with an upgraded gift
|
||||||
type PushMessageContentUpgradedGift struct {
|
type PushMessageContentUpgradedGift struct {
|
||||||
meta
|
meta
|
||||||
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred gift
|
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
IsUpgrade bool `json:"is_upgrade"`
|
IsUpgrade bool `json:"is_upgrade"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -49413,6 +49893,31 @@ func (*InternalLinkTypeMessageDraft) InternalLinkTypeType() string {
|
||||||
return TypeInternalLinkTypeMessageDraft
|
return TypeInternalLinkTypeMessageDraft
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The link is a link to the screen with information about Telegram Star balance and transactions of the current user
|
||||||
|
type InternalLinkTypeMyStars struct{
|
||||||
|
meta
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *InternalLinkTypeMyStars) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub InternalLinkTypeMyStars
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*InternalLinkTypeMyStars) GetClass() string {
|
||||||
|
return ClassInternalLinkType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*InternalLinkTypeMyStars) GetType() string {
|
||||||
|
return TypeInternalLinkTypeMyStars
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*InternalLinkTypeMyStars) InternalLinkTypeType() string {
|
||||||
|
return TypeInternalLinkTypeMyStars
|
||||||
|
}
|
||||||
|
|
||||||
// The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it
|
// The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it
|
||||||
type InternalLinkTypePassportDataRequest struct {
|
type InternalLinkTypePassportDataRequest struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -52402,6 +52907,39 @@ func (*SuggestedActionExtendStarSubscriptions) SuggestedActionType() string {
|
||||||
return TypeSuggestedActionExtendStarSubscriptions
|
return TypeSuggestedActionExtendStarSubscriptions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A custom suggestion to be shown at the top of the chat list
|
||||||
|
type SuggestedActionCustom struct {
|
||||||
|
meta
|
||||||
|
// Unique name of the suggestion
|
||||||
|
Name string `json:"name"`
|
||||||
|
// Title of the suggestion
|
||||||
|
Title *FormattedText `json:"title"`
|
||||||
|
// Description of the suggestion
|
||||||
|
Description *FormattedText `json:"description"`
|
||||||
|
// The link to open when the suggestion is clicked
|
||||||
|
Url string `json:"url"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *SuggestedActionCustom) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub SuggestedActionCustom
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SuggestedActionCustom) GetClass() string {
|
||||||
|
return ClassSuggestedAction
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SuggestedActionCustom) GetType() string {
|
||||||
|
return TypeSuggestedActionCustom
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SuggestedActionCustom) SuggestedActionType() string {
|
||||||
|
return TypeSuggestedActionCustom
|
||||||
|
}
|
||||||
|
|
||||||
// Contains a counter
|
// Contains a counter
|
||||||
type Count struct {
|
type Count struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -54003,7 +54541,7 @@ func (*VectorPathCommandLine) VectorPathCommandType() string {
|
||||||
return TypeVectorPathCommandLine
|
return TypeVectorPathCommandLine
|
||||||
}
|
}
|
||||||
|
|
||||||
// A cubic Bézier curve to a given point
|
// A cubic Bézier curve to a given point
|
||||||
type VectorPathCommandCubicBezierCurve struct {
|
type VectorPathCommandCubicBezierCurve struct {
|
||||||
meta
|
meta
|
||||||
// The start control point of the curve
|
// The start control point of the curve
|
||||||
|
|
|
||||||
|
|
@ -770,6 +770,80 @@ func UnmarshalListOfAffiliateProgramSortOrder(dataList []json.RawMessage) ([]Aff
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftAttributeId(data json.RawMessage) (UpgradedGiftAttributeId, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeUpgradedGiftAttributeIdModel:
|
||||||
|
return UnmarshalUpgradedGiftAttributeIdModel(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftAttributeIdSymbol:
|
||||||
|
return UnmarshalUpgradedGiftAttributeIdSymbol(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftAttributeIdBackdrop:
|
||||||
|
return UnmarshalUpgradedGiftAttributeIdBackdrop(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfUpgradedGiftAttributeId(dataList []json.RawMessage) ([]UpgradedGiftAttributeId, error) {
|
||||||
|
list := []UpgradedGiftAttributeId{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalUpgradedGiftAttributeId(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGiftForResaleOrder(data json.RawMessage) (GiftForResaleOrder, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeGiftForResaleOrderPrice:
|
||||||
|
return UnmarshalGiftForResaleOrderPrice(data)
|
||||||
|
|
||||||
|
case TypeGiftForResaleOrderPriceChangeDate:
|
||||||
|
return UnmarshalGiftForResaleOrderPriceChangeDate(data)
|
||||||
|
|
||||||
|
case TypeGiftForResaleOrderNumber:
|
||||||
|
return UnmarshalGiftForResaleOrderNumber(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfGiftForResaleOrder(dataList []json.RawMessage) ([]GiftForResaleOrder, error) {
|
||||||
|
list := []GiftForResaleOrder{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalGiftForResaleOrder(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalSentGift(data json.RawMessage) (SentGift, error) {
|
func UnmarshalSentGift(data json.RawMessage) (SentGift, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -916,6 +990,12 @@ func UnmarshalStarTransactionType(data json.RawMessage) (StarTransactionType, er
|
||||||
case TypeStarTransactionTypeGiftUpgrade:
|
case TypeStarTransactionTypeGiftUpgrade:
|
||||||
return UnmarshalStarTransactionTypeGiftUpgrade(data)
|
return UnmarshalStarTransactionTypeGiftUpgrade(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionTypeUpgradedGiftPurchase:
|
||||||
|
return UnmarshalStarTransactionTypeUpgradedGiftPurchase(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionTypeUpgradedGiftSale:
|
||||||
|
return UnmarshalStarTransactionTypeUpgradedGiftSale(data)
|
||||||
|
|
||||||
case TypeStarTransactionTypeChannelPaidReactionSend:
|
case TypeStarTransactionTypeChannelPaidReactionSend:
|
||||||
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
||||||
|
|
||||||
|
|
@ -5410,6 +5490,9 @@ func UnmarshalChatEventAction(data json.RawMessage) (ChatEventAction, error) {
|
||||||
case TypeChatEventShowMessageSenderToggled:
|
case TypeChatEventShowMessageSenderToggled:
|
||||||
return UnmarshalChatEventShowMessageSenderToggled(data)
|
return UnmarshalChatEventShowMessageSenderToggled(data)
|
||||||
|
|
||||||
|
case TypeChatEventAutomaticTranslationToggled:
|
||||||
|
return UnmarshalChatEventAutomaticTranslationToggled(data)
|
||||||
|
|
||||||
case TypeChatEventInviteLinkEdited:
|
case TypeChatEventInviteLinkEdited:
|
||||||
return UnmarshalChatEventInviteLinkEdited(data)
|
return UnmarshalChatEventInviteLinkEdited(data)
|
||||||
|
|
||||||
|
|
@ -7231,6 +7314,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||||
case TypeInternalLinkTypeMessageDraft:
|
case TypeInternalLinkTypeMessageDraft:
|
||||||
return UnmarshalInternalLinkTypeMessageDraft(data)
|
return UnmarshalInternalLinkTypeMessageDraft(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeMyStars:
|
||||||
|
return UnmarshalInternalLinkTypeMyStars(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypePassportDataRequest:
|
case TypeInternalLinkTypePassportDataRequest:
|
||||||
return UnmarshalInternalLinkTypePassportDataRequest(data)
|
return UnmarshalInternalLinkTypePassportDataRequest(data)
|
||||||
|
|
||||||
|
|
@ -7750,6 +7836,9 @@ func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error) {
|
||||||
case TypeSuggestedActionExtendStarSubscriptions:
|
case TypeSuggestedActionExtendStarSubscriptions:
|
||||||
return UnmarshalSuggestedActionExtendStarSubscriptions(data)
|
return UnmarshalSuggestedActionExtendStarSubscriptions(data)
|
||||||
|
|
||||||
|
case TypeSuggestedActionCustom:
|
||||||
|
return UnmarshalSuggestedActionCustom(data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
}
|
}
|
||||||
|
|
@ -10123,14 +10212,6 @@ func UnmarshalGift(data json.RawMessage) (*Gift, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalGifts(data json.RawMessage) (*Gifts, error) {
|
|
||||||
var resp Gifts
|
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
|
||||||
|
|
||||||
return &resp, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func UnmarshalUpgradedGift(data json.RawMessage) (*UpgradedGift, error) {
|
func UnmarshalUpgradedGift(data json.RawMessage) (*UpgradedGift, error) {
|
||||||
var resp UpgradedGift
|
var resp UpgradedGift
|
||||||
|
|
||||||
|
|
@ -10147,6 +10228,110 @@ func UnmarshalUpgradeGiftResult(data json.RawMessage) (*UpgradeGiftResult, error
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalAvailableGift(data json.RawMessage) (*AvailableGift, error) {
|
||||||
|
var resp AvailableGift
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalAvailableGifts(data json.RawMessage) (*AvailableGifts, error) {
|
||||||
|
var resp AvailableGifts
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftAttributeIdModel(data json.RawMessage) (*UpgradedGiftAttributeIdModel, error) {
|
||||||
|
var resp UpgradedGiftAttributeIdModel
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftAttributeIdSymbol(data json.RawMessage) (*UpgradedGiftAttributeIdSymbol, error) {
|
||||||
|
var resp UpgradedGiftAttributeIdSymbol
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftAttributeIdBackdrop(data json.RawMessage) (*UpgradedGiftAttributeIdBackdrop, error) {
|
||||||
|
var resp UpgradedGiftAttributeIdBackdrop
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftModelCount(data json.RawMessage) (*UpgradedGiftModelCount, error) {
|
||||||
|
var resp UpgradedGiftModelCount
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftSymbolCount(data json.RawMessage) (*UpgradedGiftSymbolCount, error) {
|
||||||
|
var resp UpgradedGiftSymbolCount
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpgradedGiftBackdropCount(data json.RawMessage) (*UpgradedGiftBackdropCount, error) {
|
||||||
|
var resp UpgradedGiftBackdropCount
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGiftForResaleOrderPrice(data json.RawMessage) (*GiftForResaleOrderPrice, error) {
|
||||||
|
var resp GiftForResaleOrderPrice
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGiftForResaleOrderPriceChangeDate(data json.RawMessage) (*GiftForResaleOrderPriceChangeDate, error) {
|
||||||
|
var resp GiftForResaleOrderPriceChangeDate
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGiftForResaleOrderNumber(data json.RawMessage) (*GiftForResaleOrderNumber, error) {
|
||||||
|
var resp GiftForResaleOrderNumber
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGiftForResale(data json.RawMessage) (*GiftForResale, error) {
|
||||||
|
var resp GiftForResale
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGiftsForResale(data json.RawMessage) (*GiftsForResale, error) {
|
||||||
|
var resp GiftsForResale
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalSentGiftRegular(data json.RawMessage) (*SentGiftRegular, error) {
|
func UnmarshalSentGiftRegular(data json.RawMessage) (*SentGiftRegular, error) {
|
||||||
var resp SentGiftRegular
|
var resp SentGiftRegular
|
||||||
|
|
||||||
|
|
@ -10387,6 +10572,22 @@ func UnmarshalStarTransactionTypeGiftUpgrade(data json.RawMessage) (*StarTransac
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionTypeUpgradedGiftPurchase(data json.RawMessage) (*StarTransactionTypeUpgradedGiftPurchase, error) {
|
||||||
|
var resp StarTransactionTypeUpgradedGiftPurchase
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionTypeUpgradedGiftSale(data json.RawMessage) (*StarTransactionTypeUpgradedGiftSale, error) {
|
||||||
|
var resp StarTransactionTypeUpgradedGiftSale
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalStarTransactionTypeChannelPaidReactionSend(data json.RawMessage) (*StarTransactionTypeChannelPaidReactionSend, error) {
|
func UnmarshalStarTransactionTypeChannelPaidReactionSend(data json.RawMessage) (*StarTransactionTypeChannelPaidReactionSend, error) {
|
||||||
var resp StarTransactionTypeChannelPaidReactionSend
|
var resp StarTransactionTypeChannelPaidReactionSend
|
||||||
|
|
||||||
|
|
@ -17347,6 +17548,14 @@ func UnmarshalChatEventShowMessageSenderToggled(data json.RawMessage) (*ChatEven
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalChatEventAutomaticTranslationToggled(data json.RawMessage) (*ChatEventAutomaticTranslationToggled, error) {
|
||||||
|
var resp ChatEventAutomaticTranslationToggled
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalChatEventInviteLinkEdited(data json.RawMessage) (*ChatEventInviteLinkEdited, error) {
|
func UnmarshalChatEventInviteLinkEdited(data json.RawMessage) (*ChatEventInviteLinkEdited, error) {
|
||||||
var resp ChatEventInviteLinkEdited
|
var resp ChatEventInviteLinkEdited
|
||||||
|
|
||||||
|
|
@ -20003,6 +20212,14 @@ func UnmarshalInternalLinkTypeMessageDraft(data json.RawMessage) (*InternalLinkT
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInternalLinkTypeMyStars(data json.RawMessage) (*InternalLinkTypeMyStars, error) {
|
||||||
|
var resp InternalLinkTypeMyStars
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInternalLinkTypePassportDataRequest(data json.RawMessage) (*InternalLinkTypePassportDataRequest, error) {
|
func UnmarshalInternalLinkTypePassportDataRequest(data json.RawMessage) (*InternalLinkTypePassportDataRequest, error) {
|
||||||
var resp InternalLinkTypePassportDataRequest
|
var resp InternalLinkTypePassportDataRequest
|
||||||
|
|
||||||
|
|
@ -20867,6 +21084,14 @@ func UnmarshalSuggestedActionExtendStarSubscriptions(data json.RawMessage) (*Sug
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalSuggestedActionCustom(data json.RawMessage) (*SuggestedActionCustom, error) {
|
||||||
|
var resp SuggestedActionCustom
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalCount(data json.RawMessage) (*Count, error) {
|
func UnmarshalCount(data json.RawMessage) (*Count, error) {
|
||||||
var resp Count
|
var resp Count
|
||||||
|
|
||||||
|
|
@ -23227,15 +23452,51 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeGift:
|
case TypeGift:
|
||||||
return UnmarshalGift(data)
|
return UnmarshalGift(data)
|
||||||
|
|
||||||
case TypeGifts:
|
|
||||||
return UnmarshalGifts(data)
|
|
||||||
|
|
||||||
case TypeUpgradedGift:
|
case TypeUpgradedGift:
|
||||||
return UnmarshalUpgradedGift(data)
|
return UnmarshalUpgradedGift(data)
|
||||||
|
|
||||||
case TypeUpgradeGiftResult:
|
case TypeUpgradeGiftResult:
|
||||||
return UnmarshalUpgradeGiftResult(data)
|
return UnmarshalUpgradeGiftResult(data)
|
||||||
|
|
||||||
|
case TypeAvailableGift:
|
||||||
|
return UnmarshalAvailableGift(data)
|
||||||
|
|
||||||
|
case TypeAvailableGifts:
|
||||||
|
return UnmarshalAvailableGifts(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftAttributeIdModel:
|
||||||
|
return UnmarshalUpgradedGiftAttributeIdModel(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftAttributeIdSymbol:
|
||||||
|
return UnmarshalUpgradedGiftAttributeIdSymbol(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftAttributeIdBackdrop:
|
||||||
|
return UnmarshalUpgradedGiftAttributeIdBackdrop(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftModelCount:
|
||||||
|
return UnmarshalUpgradedGiftModelCount(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftSymbolCount:
|
||||||
|
return UnmarshalUpgradedGiftSymbolCount(data)
|
||||||
|
|
||||||
|
case TypeUpgradedGiftBackdropCount:
|
||||||
|
return UnmarshalUpgradedGiftBackdropCount(data)
|
||||||
|
|
||||||
|
case TypeGiftForResaleOrderPrice:
|
||||||
|
return UnmarshalGiftForResaleOrderPrice(data)
|
||||||
|
|
||||||
|
case TypeGiftForResaleOrderPriceChangeDate:
|
||||||
|
return UnmarshalGiftForResaleOrderPriceChangeDate(data)
|
||||||
|
|
||||||
|
case TypeGiftForResaleOrderNumber:
|
||||||
|
return UnmarshalGiftForResaleOrderNumber(data)
|
||||||
|
|
||||||
|
case TypeGiftForResale:
|
||||||
|
return UnmarshalGiftForResale(data)
|
||||||
|
|
||||||
|
case TypeGiftsForResale:
|
||||||
|
return UnmarshalGiftsForResale(data)
|
||||||
|
|
||||||
case TypeSentGiftRegular:
|
case TypeSentGiftRegular:
|
||||||
return UnmarshalSentGiftRegular(data)
|
return UnmarshalSentGiftRegular(data)
|
||||||
|
|
||||||
|
|
@ -23326,6 +23587,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeStarTransactionTypeGiftUpgrade:
|
case TypeStarTransactionTypeGiftUpgrade:
|
||||||
return UnmarshalStarTransactionTypeGiftUpgrade(data)
|
return UnmarshalStarTransactionTypeGiftUpgrade(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionTypeUpgradedGiftPurchase:
|
||||||
|
return UnmarshalStarTransactionTypeUpgradedGiftPurchase(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionTypeUpgradedGiftSale:
|
||||||
|
return UnmarshalStarTransactionTypeUpgradedGiftSale(data)
|
||||||
|
|
||||||
case TypeStarTransactionTypeChannelPaidReactionSend:
|
case TypeStarTransactionTypeChannelPaidReactionSend:
|
||||||
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
||||||
|
|
||||||
|
|
@ -25936,6 +26203,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatEventShowMessageSenderToggled:
|
case TypeChatEventShowMessageSenderToggled:
|
||||||
return UnmarshalChatEventShowMessageSenderToggled(data)
|
return UnmarshalChatEventShowMessageSenderToggled(data)
|
||||||
|
|
||||||
|
case TypeChatEventAutomaticTranslationToggled:
|
||||||
|
return UnmarshalChatEventAutomaticTranslationToggled(data)
|
||||||
|
|
||||||
case TypeChatEventInviteLinkEdited:
|
case TypeChatEventInviteLinkEdited:
|
||||||
return UnmarshalChatEventInviteLinkEdited(data)
|
return UnmarshalChatEventInviteLinkEdited(data)
|
||||||
|
|
||||||
|
|
@ -26932,6 +27202,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInternalLinkTypeMessageDraft:
|
case TypeInternalLinkTypeMessageDraft:
|
||||||
return UnmarshalInternalLinkTypeMessageDraft(data)
|
return UnmarshalInternalLinkTypeMessageDraft(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeMyStars:
|
||||||
|
return UnmarshalInternalLinkTypeMyStars(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypePassportDataRequest:
|
case TypeInternalLinkTypePassportDataRequest:
|
||||||
return UnmarshalInternalLinkTypePassportDataRequest(data)
|
return UnmarshalInternalLinkTypePassportDataRequest(data)
|
||||||
|
|
||||||
|
|
@ -27256,6 +27529,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeSuggestedActionExtendStarSubscriptions:
|
case TypeSuggestedActionExtendStarSubscriptions:
|
||||||
return UnmarshalSuggestedActionExtendStarSubscriptions(data)
|
return UnmarshalSuggestedActionExtendStarSubscriptions(data)
|
||||||
|
|
||||||
|
case TypeSuggestedActionCustom:
|
||||||
|
return UnmarshalSuggestedActionCustom(data)
|
||||||
|
|
||||||
case TypeCount:
|
case TypeCount:
|
||||||
return UnmarshalCount(data)
|
return UnmarshalCount(data)
|
||||||
|
|
||||||
|
|
|
||||||
155
data/td_api.tl
155
data/td_api.tl
|
|
@ -1093,10 +1093,11 @@ upgradedGiftSymbol name:string sticker:sticker rarity_per_mille:int32 = Upgraded
|
||||||
upgradedGiftBackdropColors center_color:int32 edge_color:int32 symbol_color:int32 text_color:int32 = UpgradedGiftBackdropColors;
|
upgradedGiftBackdropColors center_color:int32 edge_color:int32 symbol_color:int32 text_color:int32 = UpgradedGiftBackdropColors;
|
||||||
|
|
||||||
//@description Describes a backdrop of an upgraded gift
|
//@description Describes a backdrop of an upgraded gift
|
||||||
|
//@id Unique identifier of the backdrop
|
||||||
//@name Name of the backdrop
|
//@name Name of the backdrop
|
||||||
//@colors Colors of the backdrop
|
//@colors Colors of the backdrop
|
||||||
//@rarity_per_mille The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded
|
//@rarity_per_mille The number of upgraded gifts that receive this backdrop for each 1000 gifts upgraded
|
||||||
upgradedGiftBackdrop name:string colors:upgradedGiftBackdropColors rarity_per_mille:int32 = UpgradedGiftBackdrop;
|
upgradedGiftBackdrop id:int32 name:string colors:upgradedGiftBackdropColors rarity_per_mille:int32 = UpgradedGiftBackdrop;
|
||||||
|
|
||||||
//@description Describes the original details about the gift
|
//@description Describes the original details about the gift
|
||||||
//@sender_id Identifier of the user or the chat that sent the gift; may be null if the gift was private
|
//@sender_id Identifier of the user or the chat that sent the gift; may be null if the gift was private
|
||||||
|
|
@ -1118,13 +1119,10 @@ upgradedGiftOriginalDetails sender_id:MessageSender receiver_id:MessageSender te
|
||||||
//@last_send_date Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only
|
//@last_send_date Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only
|
||||||
gift id:int64 sticker:sticker star_count:int53 default_sell_star_count:int53 upgrade_star_count:int53 is_for_birthday:Bool remaining_count:int32 total_count:int32 first_send_date:int32 last_send_date:int32 = Gift;
|
gift id:int64 sticker:sticker star_count:int53 default_sell_star_count:int53 upgrade_star_count:int53 is_for_birthday:Bool remaining_count:int32 total_count:int32 first_send_date:int32 last_send_date:int32 = Gift;
|
||||||
|
|
||||||
//@description Contains a list of gifts that can be sent to another user or channel chat @gifts The list of gifts
|
|
||||||
gifts gifts:vector<gift> = Gifts;
|
|
||||||
|
|
||||||
//@description Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
|
//@description Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
|
||||||
//@id Unique identifier of the gift
|
//@id Unique identifier of the gift
|
||||||
//@title The title of the upgraded gift
|
//@title The title of the upgraded gift
|
||||||
//@name Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift
|
//@name Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift
|
||||||
//@number Unique number of the upgraded gift among gifts upgraded from the same gift
|
//@number Unique number of the upgraded gift among gifts upgraded from the same gift
|
||||||
//@total_upgraded_count Total number of gifts that were upgraded from the same gift
|
//@total_upgraded_count Total number of gifts that were upgraded from the same gift
|
||||||
//@max_upgraded_count The maximum number of gifts that can be upgraded from the same gift
|
//@max_upgraded_count The maximum number of gifts that can be upgraded from the same gift
|
||||||
|
|
@ -1136,7 +1134,8 @@ gifts gifts:vector<gift> = Gifts;
|
||||||
//@symbol Symbol of the upgraded gift
|
//@symbol Symbol of the upgraded gift
|
||||||
//@backdrop Backdrop of the upgraded gift
|
//@backdrop Backdrop of the upgraded gift
|
||||||
//@original_details Information about the originally sent gift; may be null if unknown
|
//@original_details Information about the originally sent gift; may be null if unknown
|
||||||
upgradedGift id:int64 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 owner_id:MessageSender owner_address:string owner_name:string gift_address:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails = UpgradedGift;
|
//@resale_star_count Number of Telegram Stars that must be paid to buy the gift and send it to someone else; 0 if resale isn't possible
|
||||||
|
upgradedGift id:int64 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 owner_id:MessageSender owner_address:string owner_name:string gift_address:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails resale_star_count:int53 = UpgradedGift;
|
||||||
|
|
||||||
//@description Contains result of gift upgrading
|
//@description Contains result of gift upgrading
|
||||||
//@gift The upgraded gift
|
//@gift The upgraded gift
|
||||||
|
|
@ -1144,8 +1143,69 @@ upgradedGift id:int64 title:string name:string number:int32 total_upgraded_count
|
||||||
//@is_saved True, if the gift is displayed on the user's or the channel's profile page
|
//@is_saved True, if the gift is displayed on the user's or the channel's profile page
|
||||||
//@can_be_transferred True, if the gift can be transferred to another owner
|
//@can_be_transferred True, if the gift can be transferred to another owner
|
||||||
//@transfer_star_count Number of Telegram Stars that must be paid to transfer the upgraded gift
|
//@transfer_star_count Number of Telegram Stars that must be paid to transfer the upgraded gift
|
||||||
|
//@next_transfer_date Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible
|
||||||
|
//@next_resale_date Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
//@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT
|
//@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT
|
||||||
upgradeGiftResult gift:upgradedGift received_gift_id:string is_saved:Bool can_be_transferred:Bool transfer_star_count:int53 export_date:int32 = UpgradeGiftResult;
|
upgradeGiftResult gift:upgradedGift received_gift_id:string is_saved:Bool can_be_transferred:Bool transfer_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = UpgradeGiftResult;
|
||||||
|
|
||||||
|
//@description Describes a gift that is available for purchase
|
||||||
|
//@gift The gift
|
||||||
|
//@resale_count Number of gifts that are available for resale
|
||||||
|
//@min_resale_star_count The minimum price for the gifts available for resale; 0 if there are no such gifts
|
||||||
|
//@title The title of the upgraded gift; empty if the gift isn't available for resale
|
||||||
|
availableGift gift:gift resale_count:int32 min_resale_star_count:int53 title:string = AvailableGift;
|
||||||
|
|
||||||
|
//@description Contains a list of gifts that can be sent to another user or channel chat @gifts The list of gifts
|
||||||
|
availableGifts gifts:vector<availableGift> = AvailableGifts;
|
||||||
|
|
||||||
|
|
||||||
|
//@class UpgradedGiftAttributeId @description Contains identifier of an upgraded gift attribute to search for
|
||||||
|
|
||||||
|
//@description Identifier of a gift model @sticker_id Identifier of the sticker representing the model
|
||||||
|
upgradedGiftAttributeIdModel sticker_id:int64 = UpgradedGiftAttributeId;
|
||||||
|
|
||||||
|
//@description Identifier of a gift symbol @sticker_id Identifier of the sticker representing the symbol
|
||||||
|
upgradedGiftAttributeIdSymbol sticker_id:int64 = UpgradedGiftAttributeId;
|
||||||
|
|
||||||
|
//@description Identifier of a gift backdrop @backdrop_id Identifier of the backdrop
|
||||||
|
upgradedGiftAttributeIdBackdrop backdrop_id:int32 = UpgradedGiftAttributeId;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Describes a model of an upgraded gift with the number of gifts found @model The model @total_count Total number of gifts with the model
|
||||||
|
upgradedGiftModelCount model:upgradedGiftModel total_count:int32 = UpgradedGiftModelCount;
|
||||||
|
|
||||||
|
//@description Describes a symbol shown on the pattern of an upgraded gift @symbol The symbol @total_count Total number of gifts with the symbol
|
||||||
|
upgradedGiftSymbolCount symbol:upgradedGiftSymbol total_count:int32 = UpgradedGiftSymbolCount;
|
||||||
|
|
||||||
|
//@description Describes a backdrop of an upgraded gift @backdrop The backdrop @total_count Total number of gifts with the symbol
|
||||||
|
upgradedGiftBackdropCount backdrop:upgradedGiftBackdrop total_count:int32 = UpgradedGiftBackdropCount;
|
||||||
|
|
||||||
|
|
||||||
|
//@class GiftForResaleOrder @description Describes order in which upgraded gifts for resale will be sorted
|
||||||
|
|
||||||
|
//@description The gifts will be sorted by their price from the lowest to the highest
|
||||||
|
giftForResaleOrderPrice = GiftForResaleOrder;
|
||||||
|
|
||||||
|
//@description The gifts will be sorted by the last date when their price was changed from the newest to the oldest
|
||||||
|
giftForResaleOrderPriceChangeDate = GiftForResaleOrder;
|
||||||
|
|
||||||
|
//@description The gifts will be sorted by their number from the smallest to the largest
|
||||||
|
giftForResaleOrderNumber = GiftForResaleOrder;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Describes a gift available for resale
|
||||||
|
//@gift The gift
|
||||||
|
//@received_gift_id Unique identifier of the received gift for the current user; only for the gifts owned by the current user
|
||||||
|
giftForResale gift:upgradedGift received_gift_id:string = GiftForResale;
|
||||||
|
|
||||||
|
//@description Describes gifts available for resale
|
||||||
|
//@total_count Total number of gifts found
|
||||||
|
//@gifts The gifts
|
||||||
|
//@models Available models; for searchGiftsForResale requests without offset and attributes only
|
||||||
|
//@symbols Available symbols; for searchGiftsForResale requests without offset and attributes only
|
||||||
|
//@backdrops Available backdrops; for searchGiftsForResale requests without offset and attributes only
|
||||||
|
//@next_offset The offset for the next request. If empty, then there are no more results
|
||||||
|
giftsForResale total_count:int32 gifts:vector<giftForResale> models:vector<upgradedGiftModelCount> symbols:vector<upgradedGiftSymbolCount> backdrops:vector<upgradedGiftBackdropCount> next_offset:string = GiftsForResale;
|
||||||
|
|
||||||
|
|
||||||
//@class SentGift @description Represents content of a gift received by a user or a channel chat
|
//@class SentGift @description Represents content of a gift received by a user or a channel chat
|
||||||
|
|
@ -1172,8 +1232,10 @@ sentGiftUpgraded gift:upgradedGift = SentGift;
|
||||||
//@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user
|
//@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user
|
||||||
//@prepaid_upgrade_star_count Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
|
//@prepaid_upgrade_star_count Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
|
||||||
//@transfer_star_count Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
//@transfer_star_count Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
||||||
|
//@next_transfer_date Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
|
||||||
|
//@next_resale_date Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
//@export_date Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
//@export_date Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
||||||
receivedGift received_gift_id:string sender_id:MessageSender text:formattedText is_private:Bool is_saved:Bool is_pinned:Bool can_be_upgraded:Bool can_be_transferred:Bool was_refunded:Bool date:int32 gift:SentGift sell_star_count:int53 prepaid_upgrade_star_count:int53 transfer_star_count:int53 export_date:int32 = ReceivedGift;
|
receivedGift received_gift_id:string sender_id:MessageSender text:formattedText is_private:Bool is_saved:Bool is_pinned:Bool can_be_upgraded:Bool can_be_transferred:Bool was_refunded:Bool date:int32 gift:SentGift sell_star_count:int53 prepaid_upgrade_star_count:int53 transfer_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = ReceivedGift;
|
||||||
|
|
||||||
//@description Represents a list of gifts received by a user or a chat
|
//@description Represents a list of gifts received by a user or a chat
|
||||||
//@total_count The total number of received gifts
|
//@total_count The total number of received gifts
|
||||||
|
|
@ -1304,6 +1366,15 @@ starTransactionTypeGiftSale user_id:int53 gift:gift = StarTransactionType;
|
||||||
//@description The transaction is an upgrade of a gift; for regular users only @user_id Identifier of the user that initially sent the gift @gift The upgraded gift
|
//@description The transaction is an upgrade of a gift; for regular users only @user_id Identifier of the user that initially sent the gift @gift The upgraded gift
|
||||||
starTransactionTypeGiftUpgrade user_id:int53 gift:upgradedGift = StarTransactionType;
|
starTransactionTypeGiftUpgrade user_id:int53 gift:upgradedGift = StarTransactionType;
|
||||||
|
|
||||||
|
//@description The transaction is a purchase of an upgraded gift for some user or channel; for regular users only @user_id Identifier of the user that sold the gift @gift The gift
|
||||||
|
starTransactionTypeUpgradedGiftPurchase user_id:int53 gift:upgradedGift = StarTransactionType;
|
||||||
|
|
||||||
|
//@description The transaction is a sale of an upgraded gift; for regular users only
|
||||||
|
//@user_id Identifier of the user that bought the gift
|
||||||
|
//@gift The gift
|
||||||
|
//@affiliate Information about commission received by Telegram from the transaction
|
||||||
|
starTransactionTypeUpgradedGiftSale user_id:int53 gift:upgradedGift affiliate:affiliateInfo = StarTransactionType;
|
||||||
|
|
||||||
//@description The transaction is a sending of a paid reaction to a message in a channel chat by the current user; for regular users only
|
//@description The transaction is a sending of a paid reaction to a message in a channel chat by the current user; for regular users only
|
||||||
//@chat_id Identifier of the channel chat
|
//@chat_id Identifier of the channel chat
|
||||||
//@message_id Identifier of the reacted message; can be 0 or an identifier of a deleted message
|
//@message_id Identifier of the reacted message; can be 0 or an identifier of a deleted message
|
||||||
|
|
@ -1779,6 +1850,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
||||||
//-getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id,
|
//-getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id,
|
||||||
//-or for chats with messages or stories from publicForwards and foundStories
|
//-or for chats with messages or stories from publicForwards and foundStories
|
||||||
//@boost_level Approximate boost level for the chat
|
//@boost_level Approximate boost level for the chat
|
||||||
|
//@has_automatic_translation True, if automatic translation of messages is enabled in the channel
|
||||||
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
|
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
|
||||||
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
|
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
|
||||||
//@sign_messages True, if messages sent to the channel contains name of the sender. This field is only applicable to channels
|
//@sign_messages True, if messages sent to the channel contains name of the sender. This field is only applicable to channels
|
||||||
|
|
@ -1795,7 +1867,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
||||||
//@paid_message_star_count Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
|
//@paid_message_star_count Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
|
||||||
//@has_active_stories True, if the supergroup or channel has non-expired stories available to the current user
|
//@has_active_stories True, if the supergroup or channel has non-expired stories available to the current user
|
||||||
//@has_unread_active_stories True, if the supergroup or channel has unread non-expired stories available to the current user
|
//@has_unread_active_stories True, if the supergroup or channel has unread non-expired stories available to the current user
|
||||||
supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 boost_level:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool show_message_sender:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool verification_status:verificationStatus has_sensitive_content:Bool restriction_reason:string paid_message_star_count:int53 has_active_stories:Bool has_unread_active_stories:Bool = Supergroup;
|
supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 boost_level:int32 has_automatic_translation:Bool has_linked_chat:Bool has_location:Bool sign_messages:Bool show_message_sender:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool verification_status:verificationStatus has_sensitive_content:Bool restriction_reason:string paid_message_star_count:int53 has_active_stories:Bool has_unread_active_stories:Bool = Supergroup;
|
||||||
|
|
||||||
//@description Contains full information about a supergroup or channel
|
//@description Contains full information about a supergroup or channel
|
||||||
//@photo Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo
|
//@photo Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo
|
||||||
|
|
@ -4189,18 +4261,21 @@ messageGift gift:gift sender_id:MessageSender received_gift_id:string text:forma
|
||||||
//@gift The gift
|
//@gift The gift
|
||||||
//@sender_id Sender of the gift; may be null for anonymous gifts
|
//@sender_id Sender of the gift; may be null for anonymous gifts
|
||||||
//@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift
|
//@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift
|
||||||
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred gift
|
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
//@is_saved True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift
|
//@is_saved True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift
|
||||||
//@can_be_transferred True, if the gift can be transferred to another owner; only for the receiver of the gift
|
//@can_be_transferred True, if the gift can be transferred to another owner; only for the receiver of the gift
|
||||||
//@was_transferred True, if the gift was transferred to another owner; only for the receiver of the gift
|
//@was_transferred True, if the gift was transferred to another owner; only for the receiver of the gift
|
||||||
|
//@last_resale_star_count Number of Telegram Stars that were paid by the sender for the gift; 0 if the gift was upgraded or transferred
|
||||||
//@transfer_star_count Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
//@transfer_star_count Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
|
||||||
|
//@next_transfer_date Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
|
||||||
|
//@next_resale_date Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
//@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
//@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
||||||
messageUpgradedGift gift:upgradedGift sender_id:MessageSender received_gift_id:string is_upgrade:Bool is_saved:Bool can_be_transferred:Bool was_transferred:Bool transfer_star_count:int53 export_date:int32 = MessageContent;
|
messageUpgradedGift gift:upgradedGift sender_id:MessageSender received_gift_id:string is_upgrade:Bool is_saved:Bool can_be_transferred:Bool was_transferred:Bool last_resale_star_count:int53 transfer_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = MessageContent;
|
||||||
|
|
||||||
//@description A gift which purchase, upgrade or transfer were refunded
|
//@description A gift which purchase, upgrade or transfer were refunded
|
||||||
//@gift The gift
|
//@gift The gift
|
||||||
//@sender_id Sender of the gift
|
//@sender_id Sender of the gift
|
||||||
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift
|
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
messageRefundedUpgradedGift gift:gift sender_id:MessageSender is_upgrade:Bool = MessageContent;
|
messageRefundedUpgradedGift gift:gift sender_id:MessageSender is_upgrade:Bool = MessageContent;
|
||||||
|
|
||||||
//@description Paid messages were refunded @message_count The number of refunded messages @star_count The number of refunded Telegram Stars
|
//@description Paid messages were refunded @message_count The number of refunded messages @star_count The number of refunded Telegram Stars
|
||||||
|
|
@ -5124,9 +5199,10 @@ botMediaPreviewInfo previews:vector<botMediaPreview> language_codes:vector<strin
|
||||||
//@chat_theme_background_count Number of chat theme backgrounds that can be set as chat background
|
//@chat_theme_background_count Number of chat theme backgrounds that can be set as chat background
|
||||||
//@can_set_custom_background True, if custom background can be set in the chat for all users
|
//@can_set_custom_background True, if custom background can be set in the chat for all users
|
||||||
//@can_set_custom_emoji_sticker_set True, if custom emoji sticker set can be set for the chat
|
//@can_set_custom_emoji_sticker_set True, if custom emoji sticker set can be set for the chat
|
||||||
|
//@can_enable_automatic_translation True, if automatic translation of messages can be enabled in the chat
|
||||||
//@can_recognize_speech True, if speech recognition can be used for video note and voice note messages by all users
|
//@can_recognize_speech True, if speech recognition can be used for video note and voice note messages by all users
|
||||||
//@can_disable_sponsored_messages True, if sponsored messages can be disabled in the chat
|
//@can_disable_sponsored_messages True, if sponsored messages can be disabled in the chat
|
||||||
chatBoostLevelFeatures level:int32 story_per_day_count:int32 custom_emoji_reaction_count:int32 title_color_count:int32 profile_accent_color_count:int32 can_set_profile_background_custom_emoji:Bool accent_color_count:int32 can_set_background_custom_emoji:Bool can_set_emoji_status:Bool chat_theme_background_count:int32 can_set_custom_background:Bool can_set_custom_emoji_sticker_set:Bool can_recognize_speech:Bool can_disable_sponsored_messages:Bool = ChatBoostLevelFeatures;
|
chatBoostLevelFeatures level:int32 story_per_day_count:int32 custom_emoji_reaction_count:int32 title_color_count:int32 profile_accent_color_count:int32 can_set_profile_background_custom_emoji:Bool accent_color_count:int32 can_set_background_custom_emoji:Bool can_set_emoji_status:Bool chat_theme_background_count:int32 can_set_custom_background:Bool can_set_custom_emoji_sticker_set:Bool can_enable_automatic_translation:Bool can_recognize_speech:Bool can_disable_sponsored_messages:Bool = ChatBoostLevelFeatures;
|
||||||
|
|
||||||
//@description Contains a list of features available on the first chat boost levels
|
//@description Contains a list of features available on the first chat boost levels
|
||||||
//@features The list of features
|
//@features The list of features
|
||||||
|
|
@ -5136,9 +5212,10 @@ chatBoostLevelFeatures level:int32 story_per_day_count:int32 custom_emoji_reacti
|
||||||
//@min_chat_theme_background_boost_level The minimum boost level required to set a chat theme background as chat background
|
//@min_chat_theme_background_boost_level The minimum boost level required to set a chat theme background as chat background
|
||||||
//@min_custom_background_boost_level The minimum boost level required to set custom chat background
|
//@min_custom_background_boost_level The minimum boost level required to set custom chat background
|
||||||
//@min_custom_emoji_sticker_set_boost_level The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only
|
//@min_custom_emoji_sticker_set_boost_level The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only
|
||||||
|
//@min_automatic_translation_boost_level The minimum boost level allowing to enable automatic translation of messages for non-Premium users; for channel chats only
|
||||||
//@min_speech_recognition_boost_level The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only
|
//@min_speech_recognition_boost_level The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only
|
||||||
//@min_sponsored_message_disable_boost_level The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only
|
//@min_sponsored_message_disable_boost_level The minimum boost level allowing to disable sponsored messages in the chat; for channel chats only
|
||||||
chatBoostFeatures features:vector<chatBoostLevelFeatures> min_profile_background_custom_emoji_boost_level:int32 min_background_custom_emoji_boost_level:int32 min_emoji_status_boost_level:int32 min_chat_theme_background_boost_level:int32 min_custom_background_boost_level:int32 min_custom_emoji_sticker_set_boost_level:int32 min_speech_recognition_boost_level:int32 min_sponsored_message_disable_boost_level:int32 = ChatBoostFeatures;
|
chatBoostFeatures features:vector<chatBoostLevelFeatures> min_profile_background_custom_emoji_boost_level:int32 min_background_custom_emoji_boost_level:int32 min_emoji_status_boost_level:int32 min_chat_theme_background_boost_level:int32 min_custom_background_boost_level:int32 min_custom_emoji_sticker_set_boost_level:int32 min_automatic_translation_boost_level:int32 min_speech_recognition_boost_level:int32 min_sponsored_message_disable_boost_level:int32 = ChatBoostFeatures;
|
||||||
|
|
||||||
|
|
||||||
//@class ChatBoostSource @description Describes source of a chat boost
|
//@class ChatBoostSource @description Describes source of a chat boost
|
||||||
|
|
@ -6064,6 +6141,9 @@ chatEventSignMessagesToggled sign_messages:Bool = ChatEventAction;
|
||||||
//@description The show_message_sender setting of a channel was toggled @show_message_sender New value of show_message_sender
|
//@description The show_message_sender setting of a channel was toggled @show_message_sender New value of show_message_sender
|
||||||
chatEventShowMessageSenderToggled show_message_sender:Bool = ChatEventAction;
|
chatEventShowMessageSenderToggled show_message_sender:Bool = ChatEventAction;
|
||||||
|
|
||||||
|
//@description The has_automatic_translation setting of a channel was toggled @has_automatic_translation New value of has_automatic_translation
|
||||||
|
chatEventAutomaticTranslationToggled has_automatic_translation:Bool = ChatEventAction;
|
||||||
|
|
||||||
//@description A chat invite link was edited @old_invite_link Previous information about the invite link @new_invite_link New information about the invite link
|
//@description A chat invite link was edited @old_invite_link Previous information about the invite link @new_invite_link New information about the invite link
|
||||||
chatEventInviteLinkEdited old_invite_link:chatInviteLink new_invite_link:chatInviteLink = ChatEventAction;
|
chatEventInviteLinkEdited old_invite_link:chatInviteLink new_invite_link:chatInviteLink = ChatEventAction;
|
||||||
|
|
||||||
|
|
@ -6655,8 +6735,8 @@ hashtags hashtags:vector<string> = Hashtags;
|
||||||
|
|
||||||
//@class CanPostStoryResult @description Represents result of checking whether the current user can post a story on behalf of the specific chat
|
//@class CanPostStoryResult @description Represents result of checking whether the current user can post a story on behalf of the specific chat
|
||||||
|
|
||||||
//@description A story can be sent
|
//@description A story can be sent @story_count Number of stories that can be posted by the user
|
||||||
canPostStoryResultOk = CanPostStoryResult;
|
canPostStoryResultOk story_count:int32 = CanPostStoryResult;
|
||||||
|
|
||||||
//@description The user must subscribe to Telegram Premium to be able to post stories
|
//@description The user must subscribe to Telegram Premium to be able to post stories
|
||||||
canPostStoryResultPremiumNeeded = CanPostStoryResult;
|
canPostStoryResultPremiumNeeded = CanPostStoryResult;
|
||||||
|
|
@ -6809,7 +6889,7 @@ pushMessageContentGiveaway winner_count:int32 prize:GiveawayPrize is_pinned:Bool
|
||||||
pushMessageContentGift star_count:int53 = PushMessageContent;
|
pushMessageContentGift star_count:int53 = PushMessageContent;
|
||||||
|
|
||||||
//@description A message with an upgraded gift
|
//@description A message with an upgraded gift
|
||||||
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred gift
|
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
pushMessageContentUpgradedGift is_upgrade:Bool = PushMessageContent;
|
pushMessageContentUpgradedGift is_upgrade:Bool = PushMessageContent;
|
||||||
|
|
||||||
//@description A screenshot of a message in the chat has been taken
|
//@description A screenshot of a message in the chat has been taken
|
||||||
|
|
@ -7438,6 +7518,9 @@ internalLinkTypeMessage url:string = InternalLinkType;
|
||||||
//@contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected
|
//@contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected
|
||||||
internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType;
|
internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType;
|
||||||
|
|
||||||
|
//@description The link is a link to the screen with information about Telegram Star balance and transactions of the current user
|
||||||
|
internalLinkTypeMyStars = InternalLinkType;
|
||||||
|
|
||||||
//@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it
|
//@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it
|
||||||
//@bot_user_id User identifier of the service's bot; the corresponding user may be unknown yet
|
//@bot_user_id User identifier of the service's bot; the corresponding user may be unknown yet
|
||||||
//@scope Telegram Passport element types requested by the service
|
//@scope Telegram Passport element types requested by the service
|
||||||
|
|
@ -7894,6 +7977,13 @@ suggestedActionExtendPremium manage_premium_subscription_url:string = SuggestedA
|
||||||
//-to get the number of expiring subscriptions and the number of required to buy Telegram Stars
|
//-to get the number of expiring subscriptions and the number of required to buy Telegram Stars
|
||||||
suggestedActionExtendStarSubscriptions = SuggestedAction;
|
suggestedActionExtendStarSubscriptions = SuggestedAction;
|
||||||
|
|
||||||
|
//@description A custom suggestion to be shown at the top of the chat list
|
||||||
|
//@name Unique name of the suggestion
|
||||||
|
//@title Title of the suggestion
|
||||||
|
//@param_description Description of the suggestion
|
||||||
|
//@url The link to open when the suggestion is clicked
|
||||||
|
suggestedActionCustom name:string title:formattedText description:formattedText url:string = SuggestedAction;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains a counter @count Count
|
//@description Contains a counter @count Count
|
||||||
count count:int32 = Count;
|
count count:int32 = Count;
|
||||||
|
|
@ -8157,7 +8247,7 @@ point x:double y:double = Point;
|
||||||
//@description A straight line to a given point @end_point The end point of the straight line
|
//@description A straight line to a given point @end_point The end point of the straight line
|
||||||
vectorPathCommandLine end_point:point = VectorPathCommand;
|
vectorPathCommandLine end_point:point = VectorPathCommand;
|
||||||
|
|
||||||
//@description A cubic Bézier curve to a given point @start_control_point The start control point of the curve @end_control_point The end control point of the curve @end_point The end point of the curve
|
//@description A cubic Bézier curve to a given point @start_control_point The start control point of the curve @end_control_point The end control point of the curve @end_point The end point of the curve
|
||||||
vectorPathCommandCubicBezierCurve start_control_point:point end_control_point:point end_point:point = VectorPathCommand;
|
vectorPathCommandCubicBezierCurve start_control_point:point end_control_point:point end_point:point = VectorPathCommand;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -12058,6 +12148,12 @@ toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_availab
|
||||||
//@can_have_sponsored_messages The new value of can_have_sponsored_messages
|
//@can_have_sponsored_messages The new value of can_have_sponsored_messages
|
||||||
toggleSupergroupCanHaveSponsoredMessages supergroup_id:int53 can_have_sponsored_messages:Bool = Ok;
|
toggleSupergroupCanHaveSponsoredMessages supergroup_id:int53 can_have_sponsored_messages:Bool = Ok;
|
||||||
|
|
||||||
|
//@description Toggles whether messages are automatically translated in the channel chat; requires can_change_info administrator right in the channel.
|
||||||
|
//-The chat must have at least chatBoostFeatures.min_automatic_translation_boost_level boost level to enable automatic translation
|
||||||
|
//@supergroup_id The identifier of the channel
|
||||||
|
//@has_automatic_translation The new value of has_automatic_translation
|
||||||
|
toggleSupergroupHasAutomaticTranslation supergroup_id:int53 has_automatic_translation:Bool = Ok;
|
||||||
|
|
||||||
//@description Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true
|
//@description Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true
|
||||||
//@supergroup_id Identifier of the supergroup
|
//@supergroup_id Identifier of the supergroup
|
||||||
//@has_hidden_members New value of has_hidden_members
|
//@has_hidden_members New value of has_hidden_members
|
||||||
|
|
@ -12147,7 +12243,7 @@ deleteSavedCredentials = Ok;
|
||||||
setGiftSettings settings:giftSettings = Ok;
|
setGiftSettings settings:giftSettings = Ok;
|
||||||
|
|
||||||
//@description Returns gifts that can be sent to other users and channel chats
|
//@description Returns gifts that can be sent to other users and channel chats
|
||||||
getAvailableGifts = Gifts;
|
getAvailableGifts = AvailableGifts;
|
||||||
|
|
||||||
//@description Sends a gift to another user or channel chat. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
|
//@description Sends a gift to another user or channel chat. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
|
||||||
//@gift_id Identifier of the gift to send
|
//@gift_id Identifier of the gift to send
|
||||||
|
|
@ -12195,6 +12291,13 @@ upgradeGift business_connection_id:string received_gift_id:string keep_original_
|
||||||
//@star_count The amount of Telegram Stars required to pay for the transfer
|
//@star_count The amount of Telegram Stars required to pay for the transfer
|
||||||
transferGift business_connection_id:string received_gift_id:string new_owner_id:MessageSender star_count:int53 = Ok;
|
transferGift business_connection_id:string received_gift_id:string new_owner_id:MessageSender star_count:int53 = Ok;
|
||||||
|
|
||||||
|
//@description Sends an upgraded gift that is available for resale to another user or channel chat; gifts already owned by the current user
|
||||||
|
//-must be transferred using transferGift and can't be passed to the method
|
||||||
|
//@gift_name Name of the upgraded gift to send
|
||||||
|
//@owner_id Identifier of the user or the channel chat that will receive the gift
|
||||||
|
//@star_count The amount of Telegram Stars required to pay for the gift
|
||||||
|
sendResoldGift gift_name:string owner_id:MessageSender star_count:int53 = Ok;
|
||||||
|
|
||||||
//@description Returns gifts received by the given user or chat
|
//@description Returns gifts received by the given user or chat
|
||||||
//@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only
|
//@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only
|
||||||
//@owner_id Identifier of the gift receiver
|
//@owner_id Identifier of the gift receiver
|
||||||
|
|
@ -12219,6 +12322,20 @@ getUpgradedGift name:string = UpgradedGift;
|
||||||
//@password The 2-step verification password of the current user
|
//@password The 2-step verification password of the current user
|
||||||
getUpgradedGiftWithdrawalUrl received_gift_id:string password:string = HttpUrl;
|
getUpgradedGiftWithdrawalUrl received_gift_id:string password:string = HttpUrl;
|
||||||
|
|
||||||
|
//@description Changes resale price of a unique gift owned by the current user
|
||||||
|
//@received_gift_id Identifier of the unique gift
|
||||||
|
//@resale_star_count The new price for the unique gift; 0 or getOption("gift_resale_star_count_min")-getOption("gift_resale_star_count_max"). Pass 0 to disallow gift resale.
|
||||||
|
//-The current user will receive getOption("gift_resale_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for the gift
|
||||||
|
setGiftResalePrice received_gift_id:string resale_star_count:int53 = Ok;
|
||||||
|
|
||||||
|
//@description Returns upgraded gifts that can be bought from other owners
|
||||||
|
//@gift_id Identifier of the regular gift that was upgraded to a unique gift
|
||||||
|
//@order Order in which the results will be sorted
|
||||||
|
//@attributes Attributes used to filter received gifts. If multiple attributes of the same type are specified, then all of them are allowed.
|
||||||
|
//-If none attributes of specific type are specified, then all values for this attribute type are allowed
|
||||||
|
//@offset Offset of the first entry to return as received from the previous request with the same order and attributes; use empty string to get the first chunk of results
|
||||||
|
//@limit The maximum number of gifts to return
|
||||||
|
searchGiftsForResale gift_id:int64 order:GiftForResaleOrder attributes:vector<UpgradedGiftAttributeId> offset:string limit:int32 = GiftsForResale;
|
||||||
|
|
||||||
//@description Creates a link for the given invoice; for bots only
|
//@description Creates a link for the given invoice; for bots only
|
||||||
//@business_connection_id Unique identifier of business connection on behalf of which to send the request
|
//@business_connection_id Unique identifier of business connection on behalf of which to send the request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue