mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.41
This commit is contained in:
parent
930f3352f3
commit
58adcc4804
4 changed files with 2033 additions and 873 deletions
|
|
@ -7084,7 +7084,7 @@ type GetPreparedInlineMessageRequest struct {
|
|||
PreparedMessageId string `json:"prepared_message_id"`
|
||||
}
|
||||
|
||||
// Saves an inline message to be sent by the given user; for bots only
|
||||
// Saves an inline message to be sent by the given user
|
||||
func (client *Client) GetPreparedInlineMessage(req *GetPreparedInlineMessageRequest) (*PreparedInlineMessage, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8021,6 +8021,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
|||
case TypeInternalLinkTypeChangePhoneNumber:
|
||||
return UnmarshalInternalLinkTypeChangePhoneNumber(result.Data)
|
||||
|
||||
case TypeInternalLinkTypeChatAffiliateProgram:
|
||||
return UnmarshalInternalLinkTypeChatAffiliateProgram(result.Data)
|
||||
|
||||
case TypeInternalLinkTypeChatBoost:
|
||||
return UnmarshalInternalLinkTypeChatBoost(result.Data)
|
||||
|
||||
|
|
@ -10897,7 +10900,7 @@ func (client *Client) EditStoryCover(req *EditStoryCoverRequest) (*Ok, error) {
|
|||
type SetStoryPrivacySettingsRequest struct {
|
||||
// Identifier of the story
|
||||
StoryId int32 `json:"story_id"`
|
||||
// The new privacy settigs for the story
|
||||
// The new privacy settings for the story
|
||||
PrivacySettings StoryPrivacySettings `json:"privacy_settings"`
|
||||
}
|
||||
|
||||
|
|
@ -13393,7 +13396,7 @@ type CreateVideoChatRequest struct {
|
|||
Title string `json:"title"`
|
||||
// Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||
StartDate int32 `json:"start_date"`
|
||||
// Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
||||
// Pass true to create an RTMP stream instead of an ordinary video chat
|
||||
IsRtmpStream bool `json:"is_rtmp_stream"`
|
||||
}
|
||||
|
||||
|
|
@ -14861,8 +14864,14 @@ func (client *Client) GetAllStickerEmojis(req *GetAllStickerEmojisRequest) (*Emo
|
|||
type SearchStickersRequest struct {
|
||||
// Type of the stickers to return
|
||||
StickerType StickerType `json:"sticker_type"`
|
||||
// Space-separated list of emojis to search for; must be non-empty
|
||||
// Space-separated list of emojis to search for
|
||||
Emojis string `json:"emojis"`
|
||||
// Query to search for; may be empty to search for emoji only
|
||||
Query string `json:"query"`
|
||||
// List of possible IETF language tags of the user's input language; may be empty if unknown
|
||||
InputLanguageCodes []string `json:"input_language_codes"`
|
||||
// The offset from which to return the stickers; must be non-negative
|
||||
Offset int32 `json:"offset"`
|
||||
// The maximum number of stickers to be returned; 0-100
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
|
@ -14876,6 +14885,9 @@ func (client *Client) SearchStickers(req *SearchStickersRequest) (*Stickers, err
|
|||
Data: map[string]interface{}{
|
||||
"sticker_type": req.StickerType,
|
||||
"emojis": req.Emojis,
|
||||
"query": req.Query,
|
||||
"input_language_codes": req.InputLanguageCodes,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
|
|
@ -15796,6 +15808,25 @@ func (client *Client) GetRecentInlineBots() (*Users, error) {
|
|||
return UnmarshalUsers(result.Data)
|
||||
}
|
||||
|
||||
// Returns the list of bots owned by the current user
|
||||
func (client *Client) GetOwnedBots() (*Users, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getOwnedBots",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalUsers(result.Data)
|
||||
}
|
||||
|
||||
type SearchHashtagsRequest struct {
|
||||
// Hashtag prefix to search for
|
||||
Prefix string `json:"prefix"`
|
||||
|
|
@ -22230,6 +22261,218 @@ func (client *Client) ReuseStarSubscription(req *ReuseStarSubscriptionRequest) (
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat with an owned bot for which affiliate program is changed
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Parameters of the affiliate program; pass null to close the currently active program. If there is an active program, then commission and program duration can only be increased. If the active program is scheduled to be closed, then it can't be changed anymore
|
||||
Parameters *AffiliateProgramParameters `json:"parameters"`
|
||||
}
|
||||
|
||||
// Changes affiliate program for a bot
|
||||
func (client *Client) SetChatAffiliateProgram(req *SetChatAffiliateProgramRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setChatAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"parameters": req.Parameters,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SearchChatAffiliateProgramRequest struct {
|
||||
// Username of the chat
|
||||
Username string `json:"username"`
|
||||
// The referrer from an internalLinkTypeChatAffiliateProgram link
|
||||
Referrer string `json:"referrer"`
|
||||
}
|
||||
|
||||
// Searches a chat with an affiliate program. Returns the chat if found and the program is active
|
||||
func (client *Client) SearchChatAffiliateProgram(req *SearchChatAffiliateProgramRequest) (*Chat, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "searchChatAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"username": req.Username,
|
||||
"referrer": req.Referrer,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChat(result.Data)
|
||||
}
|
||||
|
||||
type SearchAffiliateProgramsRequest struct {
|
||||
// Identifier of the chat for which affiliate programs are searched for. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Sort order for the results
|
||||
SortOrder AffiliateProgramSortOrder `json:"sort_order"`
|
||||
// Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results
|
||||
Offset string `json:"offset"`
|
||||
// The maximum number of affiliate programs to return
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Searches affiliate programs that can be applied to the given chat
|
||||
func (client *Client) SearchAffiliatePrograms(req *SearchAffiliateProgramsRequest) (*FoundAffiliatePrograms, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "searchAffiliatePrograms",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"sort_order": req.SortOrder,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalFoundAffiliatePrograms(result.Data)
|
||||
}
|
||||
|
||||
type ConnectChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat to which the affiliate program will be connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the bot, which affiliate program is connected
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
}
|
||||
|
||||
// Connects an affiliate program to the given chat. Returns information about the connected affiliate program
|
||||
func (client *Client) ConnectChatAffiliateProgram(req *ConnectChatAffiliateProgramRequest) (*ChatAffiliateProgram, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "connectChatAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"bot_user_id": req.BotUserId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliateProgram(result.Data)
|
||||
}
|
||||
|
||||
type DisconnectChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat for which the affiliate program is connected
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// The referral link of the affiliate program
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
// Disconnects an affiliate program from the given chat and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program
|
||||
func (client *Client) DisconnectChatAffiliateProgram(req *DisconnectChatAffiliateProgramRequest) (*ChatAffiliateProgram, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "disconnectChatAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"url": req.Url,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliateProgram(result.Data)
|
||||
}
|
||||
|
||||
type GetChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat for which the affiliate program was connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the bot that created the program
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
}
|
||||
|
||||
// Returns an affiliate program that were connected to the given chat by identifier of the bot that created the program
|
||||
func (client *Client) GetChatAffiliateProgram(req *GetChatAffiliateProgramRequest) (*ChatAffiliateProgram, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getChatAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"bot_user_id": req.BotUserId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliateProgram(result.Data)
|
||||
}
|
||||
|
||||
type GetChatAffiliateProgramsRequest struct {
|
||||
// Identifier of the chat for which the affiliate programs were connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results
|
||||
Offset string `json:"offset"`
|
||||
// The maximum number of affiliate programs to return
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns affiliate programs that were connected to the given chat
|
||||
func (client *Client) GetChatAffiliatePrograms(req *GetChatAffiliateProgramsRequest) (*ChatAffiliatePrograms, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getChatAffiliatePrograms",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliatePrograms(result.Data)
|
||||
}
|
||||
|
||||
type GetBusinessFeaturesRequest struct {
|
||||
// Source of the request; pass null if the method is called from settings or some non-standard source
|
||||
Source BusinessFeature `json:"source"`
|
||||
|
|
|
|||
1638
client/type.go
1638
client/type.go
File diff suppressed because it is too large
Load diff
|
|
@ -693,6 +693,43 @@ func UnmarshalListOfStarSubscriptionType(dataList []json.RawMessage) ([]StarSubs
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramSortOrder(data json.RawMessage) (AffiliateProgramSortOrder, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeAffiliateProgramSortOrderProfitability:
|
||||
return UnmarshalAffiliateProgramSortOrderProfitability(data)
|
||||
|
||||
case TypeAffiliateProgramSortOrderCreationDate:
|
||||
return UnmarshalAffiliateProgramSortOrderCreationDate(data)
|
||||
|
||||
case TypeAffiliateProgramSortOrderRevenue:
|
||||
return UnmarshalAffiliateProgramSortOrderRevenue(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfAffiliateProgramSortOrder(dataList []json.RawMessage) ([]AffiliateProgramSortOrder, error) {
|
||||
list := []AffiliateProgramSortOrder{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalAffiliateProgramSortOrder(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionDirection(data json.RawMessage) (StarTransactionDirection, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -727,7 +764,7 @@ func UnmarshalListOfStarTransactionDirection(dataList []json.RawMessage) ([]Star
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalBotTransactionPurpose(data json.RawMessage) (BotTransactionPurpose, error) {
|
||||
func UnmarshalStarTransactionType(data json.RawMessage) (StarTransactionType, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
|
|
@ -736,163 +773,91 @@ func UnmarshalBotTransactionPurpose(data json.RawMessage) (BotTransactionPurpose
|
|||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeBotTransactionPurposePaidMedia:
|
||||
return UnmarshalBotTransactionPurposePaidMedia(data)
|
||||
case TypeStarTransactionTypePremiumBotDeposit:
|
||||
return UnmarshalStarTransactionTypePremiumBotDeposit(data)
|
||||
|
||||
case TypeBotTransactionPurposeInvoicePayment:
|
||||
return UnmarshalBotTransactionPurposeInvoicePayment(data)
|
||||
case TypeStarTransactionTypeAppStoreDeposit:
|
||||
return UnmarshalStarTransactionTypeAppStoreDeposit(data)
|
||||
|
||||
case TypeBotTransactionPurposeSubscription:
|
||||
return UnmarshalBotTransactionPurposeSubscription(data)
|
||||
case TypeStarTransactionTypeGooglePlayDeposit:
|
||||
return UnmarshalStarTransactionTypeGooglePlayDeposit(data)
|
||||
|
||||
case TypeStarTransactionTypeFragmentDeposit:
|
||||
return UnmarshalStarTransactionTypeFragmentDeposit(data)
|
||||
|
||||
case TypeStarTransactionTypeUserDeposit:
|
||||
return UnmarshalStarTransactionTypeUserDeposit(data)
|
||||
|
||||
case TypeStarTransactionTypeGiveawayDeposit:
|
||||
return UnmarshalStarTransactionTypeGiveawayDeposit(data)
|
||||
|
||||
case TypeStarTransactionTypeFragmentWithdrawal:
|
||||
return UnmarshalStarTransactionTypeFragmentWithdrawal(data)
|
||||
|
||||
case TypeStarTransactionTypeTelegramAdsWithdrawal:
|
||||
return UnmarshalStarTransactionTypeTelegramAdsWithdrawal(data)
|
||||
|
||||
case TypeStarTransactionTypeTelegramApiUsage:
|
||||
return UnmarshalStarTransactionTypeTelegramApiUsage(data)
|
||||
|
||||
case TypeStarTransactionTypeBotPaidMediaPurchase:
|
||||
return UnmarshalStarTransactionTypeBotPaidMediaPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeBotPaidMediaSale:
|
||||
return UnmarshalStarTransactionTypeBotPaidMediaSale(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidMediaPurchase:
|
||||
return UnmarshalStarTransactionTypeChannelPaidMediaPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidMediaSale:
|
||||
return UnmarshalStarTransactionTypeChannelPaidMediaSale(data)
|
||||
|
||||
case TypeStarTransactionTypeBotInvoicePurchase:
|
||||
return UnmarshalStarTransactionTypeBotInvoicePurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeBotInvoiceSale:
|
||||
return UnmarshalStarTransactionTypeBotInvoiceSale(data)
|
||||
|
||||
case TypeStarTransactionTypeBotSubscriptionPurchase:
|
||||
return UnmarshalStarTransactionTypeBotSubscriptionPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeBotSubscriptionSale:
|
||||
return UnmarshalStarTransactionTypeBotSubscriptionSale(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelSubscriptionPurchase:
|
||||
return UnmarshalStarTransactionTypeChannelSubscriptionPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelSubscriptionSale:
|
||||
return UnmarshalStarTransactionTypeChannelSubscriptionSale(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftPurchase:
|
||||
return UnmarshalStarTransactionTypeGiftPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftSale:
|
||||
return UnmarshalStarTransactionTypeGiftSale(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidReactionSend:
|
||||
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidReactionReceive:
|
||||
return UnmarshalStarTransactionTypeChannelPaidReactionReceive(data)
|
||||
|
||||
case TypeStarTransactionTypeAffiliateProgramCommission:
|
||||
return UnmarshalStarTransactionTypeAffiliateProgramCommission(data)
|
||||
|
||||
case TypeStarTransactionTypeUnsupported:
|
||||
return UnmarshalStarTransactionTypeUnsupported(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfBotTransactionPurpose(dataList []json.RawMessage) ([]BotTransactionPurpose, error) {
|
||||
list := []BotTransactionPurpose{}
|
||||
func UnmarshalListOfStarTransactionType(dataList []json.RawMessage) ([]StarTransactionType, error) {
|
||||
list := []StarTransactionType{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalBotTransactionPurpose(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalChatTransactionPurpose(data json.RawMessage) (ChatTransactionPurpose, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeChatTransactionPurposePaidMedia:
|
||||
return UnmarshalChatTransactionPurposePaidMedia(data)
|
||||
|
||||
case TypeChatTransactionPurposeJoin:
|
||||
return UnmarshalChatTransactionPurposeJoin(data)
|
||||
|
||||
case TypeChatTransactionPurposeReaction:
|
||||
return UnmarshalChatTransactionPurposeReaction(data)
|
||||
|
||||
case TypeChatTransactionPurposeGiveaway:
|
||||
return UnmarshalChatTransactionPurposeGiveaway(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfChatTransactionPurpose(dataList []json.RawMessage) ([]ChatTransactionPurpose, error) {
|
||||
list := []ChatTransactionPurpose{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalChatTransactionPurpose(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalUserTransactionPurpose(data json.RawMessage) (UserTransactionPurpose, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeUserTransactionPurposeGiftedStars:
|
||||
return UnmarshalUserTransactionPurposeGiftedStars(data)
|
||||
|
||||
case TypeUserTransactionPurposeGiftSell:
|
||||
return UnmarshalUserTransactionPurposeGiftSell(data)
|
||||
|
||||
case TypeUserTransactionPurposeGiftSend:
|
||||
return UnmarshalUserTransactionPurposeGiftSend(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfUserTransactionPurpose(dataList []json.RawMessage) ([]UserTransactionPurpose, error) {
|
||||
list := []UserTransactionPurpose{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalUserTransactionPurpose(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartner(data json.RawMessage) (StarTransactionPartner, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeStarTransactionPartnerTelegram:
|
||||
return UnmarshalStarTransactionPartnerTelegram(data)
|
||||
|
||||
case TypeStarTransactionPartnerAppStore:
|
||||
return UnmarshalStarTransactionPartnerAppStore(data)
|
||||
|
||||
case TypeStarTransactionPartnerGooglePlay:
|
||||
return UnmarshalStarTransactionPartnerGooglePlay(data)
|
||||
|
||||
case TypeStarTransactionPartnerFragment:
|
||||
return UnmarshalStarTransactionPartnerFragment(data)
|
||||
|
||||
case TypeStarTransactionPartnerTelegramAds:
|
||||
return UnmarshalStarTransactionPartnerTelegramAds(data)
|
||||
|
||||
case TypeStarTransactionPartnerTelegramApi:
|
||||
return UnmarshalStarTransactionPartnerTelegramApi(data)
|
||||
|
||||
case TypeStarTransactionPartnerBot:
|
||||
return UnmarshalStarTransactionPartnerBot(data)
|
||||
|
||||
case TypeStarTransactionPartnerBusiness:
|
||||
return UnmarshalStarTransactionPartnerBusiness(data)
|
||||
|
||||
case TypeStarTransactionPartnerChat:
|
||||
return UnmarshalStarTransactionPartnerChat(data)
|
||||
|
||||
case TypeStarTransactionPartnerUser:
|
||||
return UnmarshalStarTransactionPartnerUser(data)
|
||||
|
||||
case TypeStarTransactionPartnerUnsupported:
|
||||
return UnmarshalStarTransactionPartnerUnsupported(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfStarTransactionPartner(dataList []json.RawMessage) ([]StarTransactionPartner, error) {
|
||||
list := []StarTransactionPartner{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalStarTransactionPartner(data)
|
||||
entity, err := UnmarshalStarTransactionType(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -6816,6 +6781,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
|||
case TypeInternalLinkTypeChangePhoneNumber:
|
||||
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
|
||||
|
||||
case TypeInternalLinkTypeChatAffiliateProgram:
|
||||
return UnmarshalInternalLinkTypeChatAffiliateProgram(data)
|
||||
|
||||
case TypeInternalLinkTypeChatBoost:
|
||||
return UnmarshalInternalLinkTypeChatBoost(data)
|
||||
|
||||
|
|
@ -7016,6 +6984,18 @@ func UnmarshalFileType(data json.RawMessage) (FileType, error) {
|
|||
case TypeFileTypeSecure:
|
||||
return UnmarshalFileTypeSecure(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingPhoto:
|
||||
return UnmarshalFileTypeSelfDestructingPhoto(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingVideo:
|
||||
return UnmarshalFileTypeSelfDestructingVideo(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingVideoNote:
|
||||
return UnmarshalFileTypeSelfDestructingVideoNote(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingVoiceNote:
|
||||
return UnmarshalFileTypeSelfDestructingVoiceNote(data)
|
||||
|
||||
case TypeFileTypeSticker:
|
||||
return UnmarshalFileTypeSticker(data)
|
||||
|
||||
|
|
@ -9354,6 +9334,14 @@ func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorR
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarAmount(data json.RawMessage) (*StarAmount, error) {
|
||||
var resp StarAmount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarSubscriptionTypeChannel(data json.RawMessage) (*StarSubscriptionTypeChannel, error) {
|
||||
var resp StarSubscriptionTypeChannel
|
||||
|
||||
|
|
@ -9394,6 +9382,86 @@ func UnmarshalStarSubscriptions(data json.RawMessage) (*StarSubscriptions, error
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramSortOrderProfitability(data json.RawMessage) (*AffiliateProgramSortOrderProfitability, error) {
|
||||
var resp AffiliateProgramSortOrderProfitability
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramSortOrderCreationDate(data json.RawMessage) (*AffiliateProgramSortOrderCreationDate, error) {
|
||||
var resp AffiliateProgramSortOrderCreationDate
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramSortOrderRevenue(data json.RawMessage) (*AffiliateProgramSortOrderRevenue, error) {
|
||||
var resp AffiliateProgramSortOrderRevenue
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramParameters(data json.RawMessage) (*AffiliateProgramParameters, error) {
|
||||
var resp AffiliateProgramParameters
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramInfo(data json.RawMessage) (*AffiliateProgramInfo, error) {
|
||||
var resp AffiliateProgramInfo
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateInfo(data json.RawMessage) (*AffiliateInfo, error) {
|
||||
var resp AffiliateInfo
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFoundAffiliateProgram(data json.RawMessage) (*FoundAffiliateProgram, error) {
|
||||
var resp FoundAffiliateProgram
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFoundAffiliatePrograms(data json.RawMessage) (*FoundAffiliatePrograms, error) {
|
||||
var resp FoundAffiliatePrograms
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatAffiliateProgram(data json.RawMessage) (*ChatAffiliateProgram, error) {
|
||||
var resp ChatAffiliateProgram
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatAffiliatePrograms(data json.RawMessage) (*ChatAffiliatePrograms, error) {
|
||||
var resp ChatAffiliatePrograms
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalProductInfo(data json.RawMessage) (*ProductInfo, error) {
|
||||
var resp ProductInfo
|
||||
|
||||
|
|
@ -9530,168 +9598,200 @@ func UnmarshalStarTransactionDirectionOutgoing(data json.RawMessage) (*StarTrans
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBotTransactionPurposePaidMedia(data json.RawMessage) (*BotTransactionPurposePaidMedia, error) {
|
||||
var resp BotTransactionPurposePaidMedia
|
||||
func UnmarshalStarTransactionTypePremiumBotDeposit(data json.RawMessage) (*StarTransactionTypePremiumBotDeposit, error) {
|
||||
var resp StarTransactionTypePremiumBotDeposit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBotTransactionPurposeInvoicePayment(data json.RawMessage) (*BotTransactionPurposeInvoicePayment, error) {
|
||||
var resp BotTransactionPurposeInvoicePayment
|
||||
func UnmarshalStarTransactionTypeAppStoreDeposit(data json.RawMessage) (*StarTransactionTypeAppStoreDeposit, error) {
|
||||
var resp StarTransactionTypeAppStoreDeposit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBotTransactionPurposeSubscription(data json.RawMessage) (*BotTransactionPurposeSubscription, error) {
|
||||
var resp BotTransactionPurposeSubscription
|
||||
func UnmarshalStarTransactionTypeGooglePlayDeposit(data json.RawMessage) (*StarTransactionTypeGooglePlayDeposit, error) {
|
||||
var resp StarTransactionTypeGooglePlayDeposit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatTransactionPurposePaidMedia(data json.RawMessage) (*ChatTransactionPurposePaidMedia, error) {
|
||||
var resp ChatTransactionPurposePaidMedia
|
||||
func UnmarshalStarTransactionTypeFragmentDeposit(data json.RawMessage) (*StarTransactionTypeFragmentDeposit, error) {
|
||||
var resp StarTransactionTypeFragmentDeposit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatTransactionPurposeJoin(data json.RawMessage) (*ChatTransactionPurposeJoin, error) {
|
||||
var resp ChatTransactionPurposeJoin
|
||||
func UnmarshalStarTransactionTypeUserDeposit(data json.RawMessage) (*StarTransactionTypeUserDeposit, error) {
|
||||
var resp StarTransactionTypeUserDeposit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatTransactionPurposeReaction(data json.RawMessage) (*ChatTransactionPurposeReaction, error) {
|
||||
var resp ChatTransactionPurposeReaction
|
||||
func UnmarshalStarTransactionTypeGiveawayDeposit(data json.RawMessage) (*StarTransactionTypeGiveawayDeposit, error) {
|
||||
var resp StarTransactionTypeGiveawayDeposit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatTransactionPurposeGiveaway(data json.RawMessage) (*ChatTransactionPurposeGiveaway, error) {
|
||||
var resp ChatTransactionPurposeGiveaway
|
||||
func UnmarshalStarTransactionTypeFragmentWithdrawal(data json.RawMessage) (*StarTransactionTypeFragmentWithdrawal, error) {
|
||||
var resp StarTransactionTypeFragmentWithdrawal
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserTransactionPurposeGiftedStars(data json.RawMessage) (*UserTransactionPurposeGiftedStars, error) {
|
||||
var resp UserTransactionPurposeGiftedStars
|
||||
func UnmarshalStarTransactionTypeTelegramAdsWithdrawal(data json.RawMessage) (*StarTransactionTypeTelegramAdsWithdrawal, error) {
|
||||
var resp StarTransactionTypeTelegramAdsWithdrawal
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserTransactionPurposeGiftSell(data json.RawMessage) (*UserTransactionPurposeGiftSell, error) {
|
||||
var resp UserTransactionPurposeGiftSell
|
||||
func UnmarshalStarTransactionTypeTelegramApiUsage(data json.RawMessage) (*StarTransactionTypeTelegramApiUsage, error) {
|
||||
var resp StarTransactionTypeTelegramApiUsage
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserTransactionPurposeGiftSend(data json.RawMessage) (*UserTransactionPurposeGiftSend, error) {
|
||||
var resp UserTransactionPurposeGiftSend
|
||||
func UnmarshalStarTransactionTypeBotPaidMediaPurchase(data json.RawMessage) (*StarTransactionTypeBotPaidMediaPurchase, error) {
|
||||
var resp StarTransactionTypeBotPaidMediaPurchase
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerTelegram(data json.RawMessage) (*StarTransactionPartnerTelegram, error) {
|
||||
var resp StarTransactionPartnerTelegram
|
||||
func UnmarshalStarTransactionTypeBotPaidMediaSale(data json.RawMessage) (*StarTransactionTypeBotPaidMediaSale, error) {
|
||||
var resp StarTransactionTypeBotPaidMediaSale
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerAppStore(data json.RawMessage) (*StarTransactionPartnerAppStore, error) {
|
||||
var resp StarTransactionPartnerAppStore
|
||||
func UnmarshalStarTransactionTypeChannelPaidMediaPurchase(data json.RawMessage) (*StarTransactionTypeChannelPaidMediaPurchase, error) {
|
||||
var resp StarTransactionTypeChannelPaidMediaPurchase
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerGooglePlay(data json.RawMessage) (*StarTransactionPartnerGooglePlay, error) {
|
||||
var resp StarTransactionPartnerGooglePlay
|
||||
func UnmarshalStarTransactionTypeChannelPaidMediaSale(data json.RawMessage) (*StarTransactionTypeChannelPaidMediaSale, error) {
|
||||
var resp StarTransactionTypeChannelPaidMediaSale
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerFragment(data json.RawMessage) (*StarTransactionPartnerFragment, error) {
|
||||
var resp StarTransactionPartnerFragment
|
||||
func UnmarshalStarTransactionTypeBotInvoicePurchase(data json.RawMessage) (*StarTransactionTypeBotInvoicePurchase, error) {
|
||||
var resp StarTransactionTypeBotInvoicePurchase
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerTelegramAds(data json.RawMessage) (*StarTransactionPartnerTelegramAds, error) {
|
||||
var resp StarTransactionPartnerTelegramAds
|
||||
func UnmarshalStarTransactionTypeBotInvoiceSale(data json.RawMessage) (*StarTransactionTypeBotInvoiceSale, error) {
|
||||
var resp StarTransactionTypeBotInvoiceSale
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerTelegramApi(data json.RawMessage) (*StarTransactionPartnerTelegramApi, error) {
|
||||
var resp StarTransactionPartnerTelegramApi
|
||||
func UnmarshalStarTransactionTypeBotSubscriptionPurchase(data json.RawMessage) (*StarTransactionTypeBotSubscriptionPurchase, error) {
|
||||
var resp StarTransactionTypeBotSubscriptionPurchase
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerBot(data json.RawMessage) (*StarTransactionPartnerBot, error) {
|
||||
var resp StarTransactionPartnerBot
|
||||
func UnmarshalStarTransactionTypeBotSubscriptionSale(data json.RawMessage) (*StarTransactionTypeBotSubscriptionSale, error) {
|
||||
var resp StarTransactionTypeBotSubscriptionSale
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerBusiness(data json.RawMessage) (*StarTransactionPartnerBusiness, error) {
|
||||
var resp StarTransactionPartnerBusiness
|
||||
func UnmarshalStarTransactionTypeChannelSubscriptionPurchase(data json.RawMessage) (*StarTransactionTypeChannelSubscriptionPurchase, error) {
|
||||
var resp StarTransactionTypeChannelSubscriptionPurchase
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerChat(data json.RawMessage) (*StarTransactionPartnerChat, error) {
|
||||
var resp StarTransactionPartnerChat
|
||||
func UnmarshalStarTransactionTypeChannelSubscriptionSale(data json.RawMessage) (*StarTransactionTypeChannelSubscriptionSale, error) {
|
||||
var resp StarTransactionTypeChannelSubscriptionSale
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerUser(data json.RawMessage) (*StarTransactionPartnerUser, error) {
|
||||
var resp StarTransactionPartnerUser
|
||||
func UnmarshalStarTransactionTypeGiftPurchase(data json.RawMessage) (*StarTransactionTypeGiftPurchase, error) {
|
||||
var resp StarTransactionTypeGiftPurchase
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionPartnerUnsupported(data json.RawMessage) (*StarTransactionPartnerUnsupported, error) {
|
||||
var resp StarTransactionPartnerUnsupported
|
||||
func UnmarshalStarTransactionTypeGiftSale(data json.RawMessage) (*StarTransactionTypeGiftSale, error) {
|
||||
var resp StarTransactionTypeGiftSale
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeChannelPaidReactionSend(data json.RawMessage) (*StarTransactionTypeChannelPaidReactionSend, error) {
|
||||
var resp StarTransactionTypeChannelPaidReactionSend
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeChannelPaidReactionReceive(data json.RawMessage) (*StarTransactionTypeChannelPaidReactionReceive, error) {
|
||||
var resp StarTransactionTypeChannelPaidReactionReceive
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeAffiliateProgramCommission(data json.RawMessage) (*StarTransactionTypeAffiliateProgramCommission, error) {
|
||||
var resp StarTransactionTypeAffiliateProgramCommission
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeUnsupported(data json.RawMessage) (*StarTransactionTypeUnsupported, error) {
|
||||
var resp StarTransactionTypeUnsupported
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
|
|
@ -18754,6 +18854,14 @@ func UnmarshalInternalLinkTypeChangePhoneNumber(data json.RawMessage) (*Internal
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypeChatAffiliateProgram(data json.RawMessage) (*InternalLinkTypeChatAffiliateProgram, error) {
|
||||
var resp InternalLinkTypeChatAffiliateProgram
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypeChatBoost(data json.RawMessage) (*InternalLinkTypeChatBoost, error) {
|
||||
var resp InternalLinkTypeChatBoost
|
||||
|
||||
|
|
@ -19178,6 +19286,38 @@ func UnmarshalFileTypeSecure(data json.RawMessage) (*FileTypeSecure, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileTypeSelfDestructingPhoto(data json.RawMessage) (*FileTypeSelfDestructingPhoto, error) {
|
||||
var resp FileTypeSelfDestructingPhoto
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileTypeSelfDestructingVideo(data json.RawMessage) (*FileTypeSelfDestructingVideo, error) {
|
||||
var resp FileTypeSelfDestructingVideo
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileTypeSelfDestructingVideoNote(data json.RawMessage) (*FileTypeSelfDestructingVideoNote, error) {
|
||||
var resp FileTypeSelfDestructingVideoNote
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileTypeSelfDestructingVoiceNote(data json.RawMessage) (*FileTypeSelfDestructingVoiceNote, error) {
|
||||
var resp FileTypeSelfDestructingVoiceNote
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileTypeSticker(data json.RawMessage) (*FileTypeSticker, error) {
|
||||
var resp FileTypeSticker
|
||||
|
||||
|
|
@ -21851,6 +21991,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatAdministratorRights:
|
||||
return UnmarshalChatAdministratorRights(data)
|
||||
|
||||
case TypeStarAmount:
|
||||
return UnmarshalStarAmount(data)
|
||||
|
||||
case TypeStarSubscriptionTypeChannel:
|
||||
return UnmarshalStarSubscriptionTypeChannel(data)
|
||||
|
||||
|
|
@ -21866,6 +22009,36 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeStarSubscriptions:
|
||||
return UnmarshalStarSubscriptions(data)
|
||||
|
||||
case TypeAffiliateProgramSortOrderProfitability:
|
||||
return UnmarshalAffiliateProgramSortOrderProfitability(data)
|
||||
|
||||
case TypeAffiliateProgramSortOrderCreationDate:
|
||||
return UnmarshalAffiliateProgramSortOrderCreationDate(data)
|
||||
|
||||
case TypeAffiliateProgramSortOrderRevenue:
|
||||
return UnmarshalAffiliateProgramSortOrderRevenue(data)
|
||||
|
||||
case TypeAffiliateProgramParameters:
|
||||
return UnmarshalAffiliateProgramParameters(data)
|
||||
|
||||
case TypeAffiliateProgramInfo:
|
||||
return UnmarshalAffiliateProgramInfo(data)
|
||||
|
||||
case TypeAffiliateInfo:
|
||||
return UnmarshalAffiliateInfo(data)
|
||||
|
||||
case TypeFoundAffiliateProgram:
|
||||
return UnmarshalFoundAffiliateProgram(data)
|
||||
|
||||
case TypeFoundAffiliatePrograms:
|
||||
return UnmarshalFoundAffiliatePrograms(data)
|
||||
|
||||
case TypeChatAffiliateProgram:
|
||||
return UnmarshalChatAffiliateProgram(data)
|
||||
|
||||
case TypeChatAffiliatePrograms:
|
||||
return UnmarshalChatAffiliatePrograms(data)
|
||||
|
||||
case TypeProductInfo:
|
||||
return UnmarshalProductInfo(data)
|
||||
|
||||
|
|
@ -21917,68 +22090,80 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeStarTransactionDirectionOutgoing:
|
||||
return UnmarshalStarTransactionDirectionOutgoing(data)
|
||||
|
||||
case TypeBotTransactionPurposePaidMedia:
|
||||
return UnmarshalBotTransactionPurposePaidMedia(data)
|
||||
case TypeStarTransactionTypePremiumBotDeposit:
|
||||
return UnmarshalStarTransactionTypePremiumBotDeposit(data)
|
||||
|
||||
case TypeBotTransactionPurposeInvoicePayment:
|
||||
return UnmarshalBotTransactionPurposeInvoicePayment(data)
|
||||
case TypeStarTransactionTypeAppStoreDeposit:
|
||||
return UnmarshalStarTransactionTypeAppStoreDeposit(data)
|
||||
|
||||
case TypeBotTransactionPurposeSubscription:
|
||||
return UnmarshalBotTransactionPurposeSubscription(data)
|
||||
case TypeStarTransactionTypeGooglePlayDeposit:
|
||||
return UnmarshalStarTransactionTypeGooglePlayDeposit(data)
|
||||
|
||||
case TypeChatTransactionPurposePaidMedia:
|
||||
return UnmarshalChatTransactionPurposePaidMedia(data)
|
||||
case TypeStarTransactionTypeFragmentDeposit:
|
||||
return UnmarshalStarTransactionTypeFragmentDeposit(data)
|
||||
|
||||
case TypeChatTransactionPurposeJoin:
|
||||
return UnmarshalChatTransactionPurposeJoin(data)
|
||||
case TypeStarTransactionTypeUserDeposit:
|
||||
return UnmarshalStarTransactionTypeUserDeposit(data)
|
||||
|
||||
case TypeChatTransactionPurposeReaction:
|
||||
return UnmarshalChatTransactionPurposeReaction(data)
|
||||
case TypeStarTransactionTypeGiveawayDeposit:
|
||||
return UnmarshalStarTransactionTypeGiveawayDeposit(data)
|
||||
|
||||
case TypeChatTransactionPurposeGiveaway:
|
||||
return UnmarshalChatTransactionPurposeGiveaway(data)
|
||||
case TypeStarTransactionTypeFragmentWithdrawal:
|
||||
return UnmarshalStarTransactionTypeFragmentWithdrawal(data)
|
||||
|
||||
case TypeUserTransactionPurposeGiftedStars:
|
||||
return UnmarshalUserTransactionPurposeGiftedStars(data)
|
||||
case TypeStarTransactionTypeTelegramAdsWithdrawal:
|
||||
return UnmarshalStarTransactionTypeTelegramAdsWithdrawal(data)
|
||||
|
||||
case TypeUserTransactionPurposeGiftSell:
|
||||
return UnmarshalUserTransactionPurposeGiftSell(data)
|
||||
case TypeStarTransactionTypeTelegramApiUsage:
|
||||
return UnmarshalStarTransactionTypeTelegramApiUsage(data)
|
||||
|
||||
case TypeUserTransactionPurposeGiftSend:
|
||||
return UnmarshalUserTransactionPurposeGiftSend(data)
|
||||
case TypeStarTransactionTypeBotPaidMediaPurchase:
|
||||
return UnmarshalStarTransactionTypeBotPaidMediaPurchase(data)
|
||||
|
||||
case TypeStarTransactionPartnerTelegram:
|
||||
return UnmarshalStarTransactionPartnerTelegram(data)
|
||||
case TypeStarTransactionTypeBotPaidMediaSale:
|
||||
return UnmarshalStarTransactionTypeBotPaidMediaSale(data)
|
||||
|
||||
case TypeStarTransactionPartnerAppStore:
|
||||
return UnmarshalStarTransactionPartnerAppStore(data)
|
||||
case TypeStarTransactionTypeChannelPaidMediaPurchase:
|
||||
return UnmarshalStarTransactionTypeChannelPaidMediaPurchase(data)
|
||||
|
||||
case TypeStarTransactionPartnerGooglePlay:
|
||||
return UnmarshalStarTransactionPartnerGooglePlay(data)
|
||||
case TypeStarTransactionTypeChannelPaidMediaSale:
|
||||
return UnmarshalStarTransactionTypeChannelPaidMediaSale(data)
|
||||
|
||||
case TypeStarTransactionPartnerFragment:
|
||||
return UnmarshalStarTransactionPartnerFragment(data)
|
||||
case TypeStarTransactionTypeBotInvoicePurchase:
|
||||
return UnmarshalStarTransactionTypeBotInvoicePurchase(data)
|
||||
|
||||
case TypeStarTransactionPartnerTelegramAds:
|
||||
return UnmarshalStarTransactionPartnerTelegramAds(data)
|
||||
case TypeStarTransactionTypeBotInvoiceSale:
|
||||
return UnmarshalStarTransactionTypeBotInvoiceSale(data)
|
||||
|
||||
case TypeStarTransactionPartnerTelegramApi:
|
||||
return UnmarshalStarTransactionPartnerTelegramApi(data)
|
||||
case TypeStarTransactionTypeBotSubscriptionPurchase:
|
||||
return UnmarshalStarTransactionTypeBotSubscriptionPurchase(data)
|
||||
|
||||
case TypeStarTransactionPartnerBot:
|
||||
return UnmarshalStarTransactionPartnerBot(data)
|
||||
case TypeStarTransactionTypeBotSubscriptionSale:
|
||||
return UnmarshalStarTransactionTypeBotSubscriptionSale(data)
|
||||
|
||||
case TypeStarTransactionPartnerBusiness:
|
||||
return UnmarshalStarTransactionPartnerBusiness(data)
|
||||
case TypeStarTransactionTypeChannelSubscriptionPurchase:
|
||||
return UnmarshalStarTransactionTypeChannelSubscriptionPurchase(data)
|
||||
|
||||
case TypeStarTransactionPartnerChat:
|
||||
return UnmarshalStarTransactionPartnerChat(data)
|
||||
case TypeStarTransactionTypeChannelSubscriptionSale:
|
||||
return UnmarshalStarTransactionTypeChannelSubscriptionSale(data)
|
||||
|
||||
case TypeStarTransactionPartnerUser:
|
||||
return UnmarshalStarTransactionPartnerUser(data)
|
||||
case TypeStarTransactionTypeGiftPurchase:
|
||||
return UnmarshalStarTransactionTypeGiftPurchase(data)
|
||||
|
||||
case TypeStarTransactionPartnerUnsupported:
|
||||
return UnmarshalStarTransactionPartnerUnsupported(data)
|
||||
case TypeStarTransactionTypeGiftSale:
|
||||
return UnmarshalStarTransactionTypeGiftSale(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidReactionSend:
|
||||
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidReactionReceive:
|
||||
return UnmarshalStarTransactionTypeChannelPaidReactionReceive(data)
|
||||
|
||||
case TypeStarTransactionTypeAffiliateProgramCommission:
|
||||
return UnmarshalStarTransactionTypeAffiliateProgramCommission(data)
|
||||
|
||||
case TypeStarTransactionTypeUnsupported:
|
||||
return UnmarshalStarTransactionTypeUnsupported(data)
|
||||
|
||||
case TypeStarTransaction:
|
||||
return UnmarshalStarTransaction(data)
|
||||
|
|
@ -25376,6 +25561,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeInternalLinkTypeChangePhoneNumber:
|
||||
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
|
||||
|
||||
case TypeInternalLinkTypeChatAffiliateProgram:
|
||||
return UnmarshalInternalLinkTypeChatAffiliateProgram(data)
|
||||
|
||||
case TypeInternalLinkTypeChatBoost:
|
||||
return UnmarshalInternalLinkTypeChatBoost(data)
|
||||
|
||||
|
|
@ -25535,6 +25723,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeFileTypeSecure:
|
||||
return UnmarshalFileTypeSecure(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingPhoto:
|
||||
return UnmarshalFileTypeSelfDestructingPhoto(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingVideo:
|
||||
return UnmarshalFileTypeSelfDestructingVideo(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingVideoNote:
|
||||
return UnmarshalFileTypeSelfDestructingVideoNote(data)
|
||||
|
||||
case TypeFileTypeSelfDestructingVoiceNote:
|
||||
return UnmarshalFileTypeSelfDestructingVoiceNote(data)
|
||||
|
||||
case TypeFileTypeSticker:
|
||||
return UnmarshalFileTypeSticker(data)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue