tdlib-ruby 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/README.md +2 -1
  4. data/bin/parser +2 -3
  5. data/lib/tdlib/client_methods.rb +341 -108
  6. data/lib/tdlib/types.rb +69 -9
  7. data/lib/tdlib/types/audio.rb +1 -1
  8. data/lib/tdlib/types/authorization_state.rb +1 -0
  9. data/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb +9 -0
  10. data/lib/tdlib/types/authorization_state/wait_phone_number.rb +2 -0
  11. data/lib/tdlib/types/auto_download_settings.rb +5 -3
  12. data/lib/tdlib/types/background.rb +1 -1
  13. data/lib/tdlib/types/background_fill.rb +11 -0
  14. data/lib/tdlib/types/background_fill/gradient.rb +13 -0
  15. data/lib/tdlib/types/background_fill/solid.rb +8 -0
  16. data/lib/tdlib/types/background_type.rb +1 -1
  17. data/lib/tdlib/types/background_type/fill.rb +8 -0
  18. data/lib/tdlib/types/background_type/pattern.rb +7 -6
  19. data/lib/tdlib/types/background_type/wallpaper.rb +1 -1
  20. data/lib/tdlib/types/base.rb +1 -1
  21. data/lib/tdlib/types/basic_group_full_info.rb +2 -2
  22. data/lib/tdlib/types/call_protocol.rb +2 -2
  23. data/lib/tdlib/types/can_transfer_ownership_result.rb +13 -0
  24. data/lib/tdlib/types/can_transfer_ownership_result/ok.rb +5 -0
  25. data/lib/tdlib/types/can_transfer_ownership_result/password_needed.rb +5 -0
  26. data/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb +8 -0
  27. data/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb +8 -0
  28. data/lib/tdlib/types/chat.rb +9 -2
  29. data/lib/tdlib/types/chat_action_bar.rb +14 -0
  30. data/lib/tdlib/types/chat_action_bar/add_contact.rb +6 -0
  31. data/lib/tdlib/types/chat_action_bar/report_add_block.rb +6 -0
  32. data/lib/tdlib/types/chat_action_bar/report_spam.rb +5 -0
  33. data/lib/tdlib/types/chat_action_bar/report_unrelated_location.rb +6 -0
  34. data/lib/tdlib/types/chat_action_bar/share_phone_number.rb +6 -0
  35. data/lib/tdlib/types/chat_administrator.rb +12 -0
  36. data/lib/tdlib/types/chat_administrators.rb +8 -0
  37. data/lib/tdlib/types/chat_event_action.rb +3 -0
  38. data/lib/tdlib/types/chat_event_action/linked_chat_changed.rb +10 -0
  39. data/lib/tdlib/types/chat_event_action/location_changed.rb +10 -0
  40. data/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb +10 -0
  41. data/lib/tdlib/types/chat_invite_link_info.rb +2 -1
  42. data/lib/tdlib/types/chat_list.rb +11 -0
  43. data/lib/tdlib/types/chat_list/archive.rb +6 -0
  44. data/lib/tdlib/types/chat_list/main.rb +5 -0
  45. data/lib/tdlib/types/chat_location.rb +10 -0
  46. data/lib/tdlib/types/chat_member_status/administrator.rb +4 -1
  47. data/lib/tdlib/types/chat_member_status/creator.rb +4 -1
  48. data/lib/tdlib/types/chat_members_filter/administrators.rb +1 -1
  49. data/lib/tdlib/types/chat_nearby.rb +10 -0
  50. data/lib/tdlib/types/chat_report_reason.rb +1 -0
  51. data/lib/tdlib/types/chat_report_reason/unrelated_location.rb +5 -0
  52. data/lib/tdlib/types/chats_nearby.rb +10 -0
  53. data/lib/tdlib/types/formatted_text.rb +4 -0
  54. data/lib/tdlib/types/inline_keyboard_button_type/login_url.rb +1 -1
  55. data/lib/tdlib/types/input_file/remote.rb +4 -0
  56. data/lib/tdlib/types/input_inline_query_result/sticker.rb +2 -2
  57. data/lib/tdlib/types/input_message_content/text.rb +2 -1
  58. data/lib/tdlib/types/log_stream/file.rb +2 -2
  59. data/lib/tdlib/types/login_url_info.rb +11 -0
  60. data/lib/tdlib/types/login_url_info/open.rb +10 -0
  61. data/lib/tdlib/types/login_url_info/request_confirmation.rb +15 -0
  62. data/lib/tdlib/types/message.rb +7 -1
  63. data/lib/tdlib/types/message_forward_info.rb +5 -5
  64. data/lib/tdlib/types/message_scheduling_state.rb +11 -0
  65. data/lib/tdlib/types/message_scheduling_state/send_at_date.rb +9 -0
  66. data/lib/tdlib/types/message_scheduling_state/send_when_online.rb +6 -0
  67. data/lib/tdlib/types/notification.rb +2 -0
  68. data/lib/tdlib/types/page_block.rb +1 -0
  69. data/lib/tdlib/types/page_block/voice_note.rb +10 -0
  70. data/lib/tdlib/types/page_block_table_cell.rb +3 -2
  71. data/lib/tdlib/types/public_chat_type.rb +11 -0
  72. data/lib/tdlib/types/public_chat_type/has_username.rb +5 -0
  73. data/lib/tdlib/types/public_chat_type/is_location_based.rb +5 -0
  74. data/lib/tdlib/types/public_message_link.rb +1 -1
  75. data/lib/tdlib/types/push_message_content/chat_add_members.rb +1 -1
  76. data/lib/tdlib/types/push_message_content/chat_delete_member.rb +1 -1
  77. data/lib/tdlib/types/remote_file.rb +5 -0
  78. data/lib/tdlib/types/rich_text/strikethrough.rb +1 -1
  79. data/lib/tdlib/types/rich_text/url.rb +2 -0
  80. data/lib/tdlib/types/secret_chat.rb +5 -4
  81. data/lib/tdlib/types/send_message_options.rb +14 -0
  82. data/lib/tdlib/types/supergroup.rb +12 -8
  83. data/lib/tdlib/types/supergroup_full_info.rb +17 -3
  84. data/lib/tdlib/types/supergroup_members_filter/administrators.rb +1 -1
  85. data/lib/tdlib/types/terms_of_service.rb +1 -1
  86. data/lib/tdlib/types/text_entity_type.rb +3 -1
  87. data/lib/tdlib/types/text_entity_type/strikethrough.rb +5 -0
  88. data/lib/tdlib/types/text_entity_type/underline.rb +5 -0
  89. data/lib/tdlib/types/text_parse_mode/markdown.rb +4 -0
  90. data/lib/tdlib/types/ton_lite_server_response.rb +8 -0
  91. data/lib/tdlib/types/ton_wallet_password_salt.rb +8 -0
  92. data/lib/tdlib/types/top_chat_category.rb +1 -0
  93. data/lib/tdlib/types/top_chat_category/forward_chats.rb +5 -0
  94. data/lib/tdlib/types/update.rb +5 -0
  95. data/lib/tdlib/types/update/active_notifications.rb +1 -1
  96. data/lib/tdlib/types/update/chat_action_bar.rb +10 -0
  97. data/lib/tdlib/types/update/chat_chat_list.rb +11 -0
  98. data/lib/tdlib/types/update/chat_has_scheduled_messages.rb +10 -0
  99. data/lib/tdlib/types/update/chat_last_message.rb +1 -1
  100. data/lib/tdlib/types/update/chat_order.rb +2 -1
  101. data/lib/tdlib/types/update/have_pending_notifications.rb +1 -1
  102. data/lib/tdlib/types/update/message_live_location_viewed.rb +11 -0
  103. data/lib/tdlib/types/update/new_callback_query.rb +1 -1
  104. data/lib/tdlib/types/update/unread_chat_count.rb +5 -1
  105. data/lib/tdlib/types/update/unread_message_count.rb +4 -2
  106. data/lib/tdlib/types/update/users_nearby.rb +9 -0
  107. data/lib/tdlib/types/user.rb +7 -10
  108. data/lib/tdlib/types/user_full_info.rb +3 -0
  109. data/lib/tdlib/types/user_privacy_setting.rb +2 -0
  110. data/lib/tdlib/types/user_privacy_setting/allow_finding_by_phone_number.rb +7 -0
  111. data/lib/tdlib/types/user_privacy_setting/show_phone_number.rb +5 -0
  112. data/lib/tdlib/types/user_privacy_setting_rule.rb +2 -0
  113. data/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb +8 -0
  114. data/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb +1 -1
  115. data/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb +8 -0
  116. data/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb +1 -1
  117. data/lib/tdlib/types/user_type/deleted.rb +1 -1
  118. data/lib/tdlib/types/user_type/unknown.rb +1 -1
  119. data/lib/tdlib/types/video.rb +1 -1
  120. data/lib/tdlib/version.rb +1 -1
  121. data/tdlib-ruby.gemspec +6 -6
  122. metadata +68 -21
  123. data/lib/tdlib/types/background_type/solid.rb +0 -8
  124. data/lib/tdlib/types/chat_report_spam_state.rb +0 -8
  125. data/lib/tdlib/types/link_state.rb +0 -13
  126. data/lib/tdlib/types/link_state/is_contact.rb +0 -5
  127. data/lib/tdlib/types/link_state/knows_phone_number.rb +0 -5
  128. data/lib/tdlib/types/link_state/none.rb +0 -5
@@ -24,6 +24,7 @@ module TD::Types
24
24
  'authorizationStateWaitEncryptionKey' => 'AuthorizationState::WaitEncryptionKey',
25
25
  'authorizationStateWaitPhoneNumber' => 'AuthorizationState::WaitPhoneNumber',
26
26
  'authorizationStateWaitCode' => 'AuthorizationState::WaitCode',
27
+ 'authorizationStateWaitOtherDeviceConfirmation' => 'AuthorizationState::WaitOtherDeviceConfirmation',
27
28
  'authorizationStateWaitRegistration' => 'AuthorizationState::WaitRegistration',
28
29
  'authorizationStateWaitPassword' => 'AuthorizationState::WaitPassword',
29
30
  'authorizationStateReady' => 'AuthorizationState::Ready',
@@ -65,10 +66,6 @@ module TD::Types
65
66
  'poll' => 'Poll',
66
67
  'profilePhoto' => 'ProfilePhoto',
67
68
  'chatPhoto' => 'ChatPhoto',
68
- 'LinkState' => 'LinkState',
69
- 'linkStateNone' => 'LinkState::None',
70
- 'linkStateKnowsPhoneNumber' => 'LinkState::KnowsPhoneNumber',
71
- 'linkStateIsContact' => 'LinkState::IsContact',
72
69
  'UserType' => 'UserType',
73
70
  'userTypeRegular' => 'UserType::Regular',
74
71
  'userTypeDeleted' => 'UserType::Deleted',
@@ -76,11 +73,14 @@ module TD::Types
76
73
  'userTypeUnknown' => 'UserType::Unknown',
77
74
  'botCommand' => 'BotCommand',
78
75
  'botInfo' => 'BotInfo',
76
+ 'chatLocation' => 'ChatLocation',
79
77
  'user' => 'User',
80
78
  'userFullInfo' => 'UserFullInfo',
81
79
  'userProfilePhoto' => 'UserProfilePhoto',
82
80
  'userProfilePhotos' => 'UserProfilePhotos',
83
81
  'users' => 'Users',
82
+ 'chatAdministrator' => 'ChatAdministrator',
83
+ 'chatAdministrators' => 'ChatAdministrators',
84
84
  'chatPermissions' => 'ChatPermissions',
85
85
  'ChatMemberStatus' => 'ChatMemberStatus',
86
86
  'chatMemberStatusCreator' => 'ChatMemberStatus::Creator',
@@ -138,10 +138,24 @@ module TD::Types
138
138
  'chatTypeBasicGroup' => 'ChatType::BasicGroup',
139
139
  'chatTypeSupergroup' => 'ChatType::Supergroup',
140
140
  'chatTypeSecret' => 'ChatType::Secret',
141
+ 'ChatList' => 'ChatList',
142
+ 'chatListMain' => 'ChatList::Main',
143
+ 'chatListArchive' => 'ChatList::Archive',
141
144
  'chat' => 'Chat',
142
145
  'chats' => 'Chats',
146
+ 'chatNearby' => 'ChatNearby',
147
+ 'chatsNearby' => 'ChatsNearby',
143
148
  'chatInviteLink' => 'ChatInviteLink',
144
149
  'chatInviteLinkInfo' => 'ChatInviteLinkInfo',
150
+ 'PublicChatType' => 'PublicChatType',
151
+ 'publicChatTypeHasUsername' => 'PublicChatType::HasUsername',
152
+ 'publicChatTypeIsLocationBased' => 'PublicChatType::IsLocationBased',
153
+ 'ChatActionBar' => 'ChatActionBar',
154
+ 'chatActionBarReportSpam' => 'ChatActionBar::ReportSpam',
155
+ 'chatActionBarReportUnrelatedLocation' => 'ChatActionBar::ReportUnrelatedLocation',
156
+ 'chatActionBarReportAddBlock' => 'ChatActionBar::ReportAddBlock',
157
+ 'chatActionBarAddContact' => 'ChatActionBar::AddContact',
158
+ 'chatActionBarSharePhoneNumber' => 'ChatActionBar::SharePhoneNumber',
145
159
  'KeyboardButtonType' => 'KeyboardButtonType',
146
160
  'keyboardButtonTypeText' => 'KeyboardButtonType::Text',
147
161
  'keyboardButtonTypeRequestPhoneNumber' => 'KeyboardButtonType::RequestPhoneNumber',
@@ -160,6 +174,9 @@ module TD::Types
160
174
  'replyMarkupForceReply' => 'ReplyMarkup::ForceReply',
161
175
  'replyMarkupShowKeyboard' => 'ReplyMarkup::ShowKeyboard',
162
176
  'replyMarkupInlineKeyboard' => 'ReplyMarkup::InlineKeyboard',
177
+ 'LoginUrlInfo' => 'LoginUrlInfo',
178
+ 'loginUrlInfoOpen' => 'LoginUrlInfo::Open',
179
+ 'loginUrlInfoRequestConfirmation' => 'LoginUrlInfo::RequestConfirmation',
163
180
  'RichText' => 'RichText',
164
181
  'richTextPlain' => 'RichText::Plain',
165
182
  'richTextBold' => 'RichText::Bold',
@@ -207,6 +224,7 @@ module TD::Types
207
224
  'pageBlockAudio' => 'PageBlock::Audio',
208
225
  'pageBlockPhoto' => 'PageBlock::Photo',
209
226
  'pageBlockVideo' => 'PageBlock::Video',
227
+ 'pageBlockVoiceNote' => 'PageBlock::VoiceNote',
210
228
  'pageBlockCover' => 'PageBlock::Cover',
211
229
  'pageBlockEmbedded' => 'PageBlock::Embedded',
212
230
  'pageBlockEmbeddedPost' => 'PageBlock::EmbeddedPost',
@@ -361,15 +379,21 @@ module TD::Types
361
379
  'textEntityTypeBotCommand' => 'TextEntityType::BotCommand',
362
380
  'textEntityTypeUrl' => 'TextEntityType::Url',
363
381
  'textEntityTypeEmailAddress' => 'TextEntityType::EmailAddress',
382
+ 'textEntityTypePhoneNumber' => 'TextEntityType::PhoneNumber',
364
383
  'textEntityTypeBold' => 'TextEntityType::Bold',
365
384
  'textEntityTypeItalic' => 'TextEntityType::Italic',
385
+ 'textEntityTypeUnderline' => 'TextEntityType::Underline',
386
+ 'textEntityTypeStrikethrough' => 'TextEntityType::Strikethrough',
366
387
  'textEntityTypeCode' => 'TextEntityType::Code',
367
388
  'textEntityTypePre' => 'TextEntityType::Pre',
368
389
  'textEntityTypePreCode' => 'TextEntityType::PreCode',
369
390
  'textEntityTypeTextUrl' => 'TextEntityType::TextUrl',
370
391
  'textEntityTypeMentionName' => 'TextEntityType::MentionName',
371
- 'textEntityTypePhoneNumber' => 'TextEntityType::PhoneNumber',
372
392
  'inputThumbnail' => 'InputThumbnail',
393
+ 'MessageSchedulingState' => 'MessageSchedulingState',
394
+ 'messageSchedulingStateSendAtDate' => 'MessageSchedulingState::SendAtDate',
395
+ 'messageSchedulingStateSendWhenOnline' => 'MessageSchedulingState::SendWhenOnline',
396
+ 'sendMessageOptions' => 'SendMessageOptions',
373
397
  'InputMessageContent' => 'InputMessageContent',
374
398
  'inputMessageText' => 'InputMessageContent::Text',
375
399
  'inputMessageAnimation' => 'InputMessageContent::Animation',
@@ -494,6 +518,8 @@ module TD::Types
494
518
  'customRequestResult' => 'CustomRequestResult',
495
519
  'gameHighScore' => 'GameHighScore',
496
520
  'gameHighScores' => 'GameHighScores',
521
+ 'tonLiteServerResponse' => 'TonLiteServerResponse',
522
+ 'tonWalletPasswordSalt' => 'TonWalletPasswordSalt',
497
523
  'ChatEventAction' => 'ChatEventAction',
498
524
  'chatEventMessageEdited' => 'ChatEventAction::MessageEdited',
499
525
  'chatEventMessageDeleted' => 'ChatEventAction::MessageDeleted',
@@ -511,8 +537,11 @@ module TD::Types
511
537
  'chatEventUsernameChanged' => 'ChatEventAction::UsernameChanged',
512
538
  'chatEventPhotoChanged' => 'ChatEventAction::PhotoChanged',
513
539
  'chatEventInvitesToggled' => 'ChatEventAction::InvitesToggled',
540
+ 'chatEventLinkedChatChanged' => 'ChatEventAction::LinkedChatChanged',
541
+ 'chatEventSlowModeDelayChanged' => 'ChatEventAction::SlowModeDelayChanged',
514
542
  'chatEventSignMessagesToggled' => 'ChatEventAction::SignMessagesToggled',
515
543
  'chatEventStickerSetChanged' => 'ChatEventAction::StickerSetChanged',
544
+ 'chatEventLocationChanged' => 'ChatEventAction::LocationChanged',
516
545
  'chatEventIsAllHistoryAvailableToggled' => 'ChatEventAction::IsAllHistoryAvailableToggled',
517
546
  'chatEvent' => 'ChatEvent',
518
547
  'chatEvents' => 'ChatEvents',
@@ -538,16 +567,24 @@ module TD::Types
538
567
  'deviceTokenBlackBerryPush' => 'DeviceToken::BlackBerryPush',
539
568
  'deviceTokenTizenPush' => 'DeviceToken::TizenPush',
540
569
  'pushReceiverId' => 'PushReceiverId',
570
+ 'BackgroundFill' => 'BackgroundFill',
571
+ 'backgroundFillSolid' => 'BackgroundFill::Solid',
572
+ 'backgroundFillGradient' => 'BackgroundFill::Gradient',
541
573
  'BackgroundType' => 'BackgroundType',
542
574
  'backgroundTypeWallpaper' => 'BackgroundType::Wallpaper',
543
575
  'backgroundTypePattern' => 'BackgroundType::Pattern',
544
- 'backgroundTypeSolid' => 'BackgroundType::Solid',
576
+ 'backgroundTypeFill' => 'BackgroundType::Fill',
545
577
  'background' => 'Background',
546
578
  'backgrounds' => 'Backgrounds',
547
579
  'InputBackground' => 'InputBackground',
548
580
  'inputBackgroundLocal' => 'InputBackground::Local',
549
581
  'inputBackgroundRemote' => 'InputBackground::Remote',
550
582
  'hashtags' => 'Hashtags',
583
+ 'CanTransferOwnershipResult' => 'CanTransferOwnershipResult',
584
+ 'canTransferOwnershipResultOk' => 'CanTransferOwnershipResult::Ok',
585
+ 'canTransferOwnershipResultPasswordNeeded' => 'CanTransferOwnershipResult::PasswordNeeded',
586
+ 'canTransferOwnershipResultPasswordTooFresh' => 'CanTransferOwnershipResult::PasswordTooFresh',
587
+ 'canTransferOwnershipResultSessionTooFresh' => 'CanTransferOwnershipResult::SessionTooFresh',
551
588
  'CheckChatUsernameResult' => 'CheckChatUsernameResult',
552
589
  'checkChatUsernameResultOk' => 'CheckChatUsernameResult::Ok',
553
590
  'checkChatUsernameResultUsernameInvalid' => 'CheckChatUsernameResult::UsernameInvalid',
@@ -610,29 +647,33 @@ module TD::Types
610
647
  'userPrivacySettingRuleAllowAll' => 'UserPrivacySettingRule::AllowAll',
611
648
  'userPrivacySettingRuleAllowContacts' => 'UserPrivacySettingRule::AllowContacts',
612
649
  'userPrivacySettingRuleAllowUsers' => 'UserPrivacySettingRule::AllowUsers',
650
+ 'userPrivacySettingRuleAllowChatMembers' => 'UserPrivacySettingRule::AllowChatMembers',
613
651
  'userPrivacySettingRuleRestrictAll' => 'UserPrivacySettingRule::RestrictAll',
614
652
  'userPrivacySettingRuleRestrictContacts' => 'UserPrivacySettingRule::RestrictContacts',
615
653
  'userPrivacySettingRuleRestrictUsers' => 'UserPrivacySettingRule::RestrictUsers',
654
+ 'userPrivacySettingRuleRestrictChatMembers' => 'UserPrivacySettingRule::RestrictChatMembers',
616
655
  'userPrivacySettingRules' => 'UserPrivacySettingRules',
617
656
  'UserPrivacySetting' => 'UserPrivacySetting',
618
657
  'userPrivacySettingShowStatus' => 'UserPrivacySetting::ShowStatus',
619
658
  'userPrivacySettingShowProfilePhoto' => 'UserPrivacySetting::ShowProfilePhoto',
620
659
  'userPrivacySettingShowLinkInForwardedMessages' => 'UserPrivacySetting::ShowLinkInForwardedMessages',
660
+ 'userPrivacySettingShowPhoneNumber' => 'UserPrivacySetting::ShowPhoneNumber',
621
661
  'userPrivacySettingAllowChatInvites' => 'UserPrivacySetting::AllowChatInvites',
622
662
  'userPrivacySettingAllowCalls' => 'UserPrivacySetting::AllowCalls',
623
663
  'userPrivacySettingAllowPeerToPeerCalls' => 'UserPrivacySetting::AllowPeerToPeerCalls',
664
+ 'userPrivacySettingAllowFindingByPhoneNumber' => 'UserPrivacySetting::AllowFindingByPhoneNumber',
624
665
  'accountTtl' => 'AccountTtl',
625
666
  'session' => 'Session',
626
667
  'sessions' => 'Sessions',
627
668
  'connectedWebsite' => 'ConnectedWebsite',
628
669
  'connectedWebsites' => 'ConnectedWebsites',
629
- 'chatReportSpamState' => 'ChatReportSpamState',
630
670
  'ChatReportReason' => 'ChatReportReason',
631
671
  'chatReportReasonSpam' => 'ChatReportReason::Spam',
632
672
  'chatReportReasonViolence' => 'ChatReportReason::Violence',
633
673
  'chatReportReasonPornography' => 'ChatReportReason::Pornography',
634
674
  'chatReportReasonChildAbuse' => 'ChatReportReason::ChildAbuse',
635
675
  'chatReportReasonCopyright' => 'ChatReportReason::Copyright',
676
+ 'chatReportReasonUnrelatedLocation' => 'ChatReportReason::UnrelatedLocation',
636
677
  'chatReportReasonCustom' => 'ChatReportReason::Custom',
637
678
  'publicMessageLink' => 'PublicMessageLink',
638
679
  'messageLinkInfo' => 'MessageLinkInfo',
@@ -684,6 +725,7 @@ module TD::Types
684
725
  'topChatCategoryChannels' => 'TopChatCategory::Channels',
685
726
  'topChatCategoryInlineBots' => 'TopChatCategory::InlineBots',
686
727
  'topChatCategoryCalls' => 'TopChatCategory::Calls',
728
+ 'topChatCategoryForwardChats' => 'TopChatCategory::ForwardChats',
687
729
  'TMeUrlType' => 'TMeUrlType',
688
730
  'tMeUrlTypeUser' => 'TMeUrlType::User',
689
731
  'tMeUrlTypeSupergroup' => 'TMeUrlType::Supergroup',
@@ -716,7 +758,9 @@ module TD::Types
716
758
  'updateMessageViews' => 'Update::MessageViews',
717
759
  'updateMessageContentOpened' => 'Update::MessageContentOpened',
718
760
  'updateMessageMentionRead' => 'Update::MessageMentionRead',
761
+ 'updateMessageLiveLocationViewed' => 'Update::MessageLiveLocationViewed',
719
762
  'updateNewChat' => 'Update::NewChat',
763
+ 'updateChatChatList' => 'Update::ChatChatList',
720
764
  'updateChatTitle' => 'Update::ChatTitle',
721
765
  'updateChatPhoto' => 'Update::ChatPhoto',
722
766
  'updateChatPermissions' => 'Update::ChatPermissions',
@@ -725,12 +769,14 @@ module TD::Types
725
769
  'updateChatIsPinned' => 'Update::ChatIsPinned',
726
770
  'updateChatIsMarkedAsUnread' => 'Update::ChatIsMarkedAsUnread',
727
771
  'updateChatIsSponsored' => 'Update::ChatIsSponsored',
772
+ 'updateChatHasScheduledMessages' => 'Update::ChatHasScheduledMessages',
728
773
  'updateChatDefaultDisableNotification' => 'Update::ChatDefaultDisableNotification',
729
774
  'updateChatReadInbox' => 'Update::ChatReadInbox',
730
775
  'updateChatReadOutbox' => 'Update::ChatReadOutbox',
731
776
  'updateChatUnreadMentionCount' => 'Update::ChatUnreadMentionCount',
732
777
  'updateChatNotificationSettings' => 'Update::ChatNotificationSettings',
733
778
  'updateScopeNotificationSettings' => 'Update::ScopeNotificationSettings',
779
+ 'updateChatActionBar' => 'Update::ChatActionBar',
734
780
  'updateChatPinnedMessage' => 'Update::ChatPinnedMessage',
735
781
  'updateChatReplyMarkup' => 'Update::ChatReplyMarkup',
736
782
  'updateChatDraftMessage' => 'Update::ChatDraftMessage',
@@ -767,6 +813,7 @@ module TD::Types
767
813
  'updateLanguagePackStrings' => 'Update::LanguagePackStrings',
768
814
  'updateConnectionState' => 'Update::ConnectionState',
769
815
  'updateTermsOfService' => 'Update::TermsOfService',
816
+ 'updateUsersNearby' => 'Update::UsersNearby',
770
817
  'updateNewInlineQuery' => 'Update::NewInlineQuery',
771
818
  'updateNewChosenInlineResult' => 'Update::NewChosenInlineResult',
772
819
  'updateNewCallbackQuery' => 'Update::NewCallbackQuery',
@@ -832,6 +879,7 @@ module TD::Types
832
879
  auto_download_settings
833
880
  auto_download_settings_presets
834
881
  background
882
+ background_fill
835
883
  background_type
836
884
  backgrounds
837
885
  base
@@ -848,25 +896,32 @@ module TD::Types
848
896
  call_state
849
897
  callback_query_answer
850
898
  callback_query_payload
899
+ can_transfer_ownership_result
851
900
  chat
852
901
  chat_action
902
+ chat_action_bar
903
+ chat_administrator
904
+ chat_administrators
853
905
  chat_event
854
906
  chat_event_action
855
907
  chat_event_log_filters
856
908
  chat_events
857
909
  chat_invite_link
858
910
  chat_invite_link_info
911
+ chat_list
912
+ chat_location
859
913
  chat_member
860
914
  chat_member_status
861
915
  chat_members
862
916
  chat_members_filter
917
+ chat_nearby
863
918
  chat_notification_settings
864
919
  chat_permissions
865
920
  chat_photo
866
921
  chat_report_reason
867
- chat_report_spam_state
868
922
  chat_type
869
923
  chats
924
+ chats_nearby
870
925
  check_chat_username_result
871
926
  connected_website
872
927
  connected_websites
@@ -924,13 +979,13 @@ module TD::Types
924
979
  language_pack_string
925
980
  language_pack_string_value
926
981
  language_pack_strings
927
- link_state
928
982
  local_file
929
983
  localization_target_info
930
984
  location
931
985
  log_stream
932
986
  log_tags
933
987
  log_verbosity_level
988
+ login_url_info
934
989
  mask_point
935
990
  mask_position
936
991
  message
@@ -938,6 +993,7 @@ module TD::Types
938
993
  message_forward_info
939
994
  message_forward_origin
940
995
  message_link_info
996
+ message_scheduling_state
941
997
  message_sending_state
942
998
  messages
943
999
  minithumbnail
@@ -984,6 +1040,7 @@ module TD::Types
984
1040
  proxies
985
1041
  proxy
986
1042
  proxy_type
1043
+ public_chat_type
987
1044
  public_message_link
988
1045
  push_message_content
989
1046
  push_receiver_id
@@ -997,6 +1054,7 @@ module TD::Types
997
1054
  seconds
998
1055
  secret_chat
999
1056
  secret_chat_state
1057
+ send_message_options
1000
1058
  session
1001
1059
  sessions
1002
1060
  shipping_option
@@ -1023,6 +1081,8 @@ module TD::Types
1023
1081
  text_entity
1024
1082
  text_entity_type
1025
1083
  text_parse_mode
1084
+ ton_lite_server_response
1085
+ ton_wallet_password_salt
1026
1086
  top_chat_category
1027
1087
  update
1028
1088
  updates
@@ -1,6 +1,6 @@
1
1
  module TD::Types
2
2
  # Describes an audio file.
3
- # Audio is usually in MP3 format.
3
+ # Audio is usually in MP3 or M4A format.
4
4
  #
5
5
  # @attr duration [Integer] Duration of the audio, in seconds; as defined by the sender.
6
6
  # @attr title [String] Title of the audio; as defined by the sender.
@@ -6,6 +6,7 @@ module TD::Types
6
6
  wait_encryption_key
7
7
  wait_phone_number
8
8
  wait_code
9
+ wait_other_device_confirmation
9
10
  wait_registration
10
11
  wait_password
11
12
  ready
@@ -0,0 +1,9 @@
1
+ module TD::Types
2
+ # The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link.
3
+ #
4
+ # @attr link [String] A tg:// URL for the QR code.
5
+ # The link will be updated frequently.
6
+ class AuthorizationState::WaitOtherDeviceConfirmation < AuthorizationState
7
+ attribute :link, TD::Types::String
8
+ end
9
+ end
@@ -1,5 +1,7 @@
1
1
  module TD::Types
2
2
  # TDLib needs the user's phone number to authorize.
3
+ # Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or
4
+ # `checkAuthenticationBotToken` for other authentication options.
3
5
  class AuthorizationState::WaitPhoneNumber < AuthorizationState
4
6
  end
5
7
  end
@@ -2,9 +2,10 @@ module TD::Types
2
2
  # Contains auto-download settings.
3
3
  #
4
4
  # @attr is_auto_download_enabled [Boolean] True, if the auto-download is enabled.
5
- # @attr max_photo_file_size [Integer] Maximum size of a photo file to be auto-downloaded.
6
- # @attr max_video_file_size [Integer] Maximum size of a video file to be auto-downloaded.
7
- # @attr max_other_file_size [Integer] Maximum size of other file types to be auto-downloaded.
5
+ # @attr max_photo_file_size [Integer] The maximum size of a photo file to be auto-downloaded.
6
+ # @attr max_video_file_size [Integer] The maximum size of a video file to be auto-downloaded.
7
+ # @attr max_other_file_size [Integer] The maximum size of other file types to be auto-downloaded.
8
+ # @attr video_upload_bitrate [Integer] The maximum suggested bitrate for uploaded videos.
8
9
  # @attr preload_large_videos [Boolean] True, if the beginning of videos needs to be preloaded for instant playback.
9
10
  # @attr preload_next_audio [Boolean] True, if the next audio track needs to be preloaded while the user is listening
10
11
  # to an audio file.
@@ -14,6 +15,7 @@ module TD::Types
14
15
  attribute :max_photo_file_size, TD::Types::Integer
15
16
  attribute :max_video_file_size, TD::Types::Integer
16
17
  attribute :max_other_file_size, TD::Types::Integer
18
+ attribute :video_upload_bitrate, TD::Types::Integer
17
19
  attribute :preload_large_videos, TD::Types::Bool
18
20
  attribute :preload_next_audio, TD::Types::Bool
19
21
  attribute :use_less_data_for_calls, TD::Types::Bool
@@ -6,7 +6,7 @@ module TD::Types
6
6
  # @attr is_dark [Boolean] True, if the background is dark and is recommended to be used with dark theme.
7
7
  # @attr name [String] Unique background name.
8
8
  # @attr document [TD::Types::Document, nil] Document with the background; may be null.
9
- # Null only for solid backgrounds.
9
+ # Null only for filled backgrounds.
10
10
  # @attr type [TD::Types::BackgroundType] Type of the background.
11
11
  class Background < Base
12
12
  attribute :id, TD::Types::Integer
@@ -0,0 +1,11 @@
1
+ module TD::Types
2
+ # Describes a fill of a background.
3
+ class BackgroundFill < Base
4
+ %w[
5
+ solid
6
+ gradient
7
+ ].each do |type|
8
+ autoload TD::Types.camelize(type), "tdlib/types/background_fill/#{type}"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module TD::Types
2
+ # Describes a gradient fill of a background.
3
+ #
4
+ # @attr top_color [Integer] A top color of the background in the RGB24 format.
5
+ # @attr bottom_color [Integer] A bottom color of the background in the RGB24 format.
6
+ # @attr rotation_angle [Integer] Clockwise rotation angle of the gradient, in degrees; 0-359.
7
+ # Should be always divisible by 45.
8
+ class BackgroundFill::Gradient < BackgroundFill
9
+ attribute :top_color, TD::Types::Integer
10
+ attribute :bottom_color, TD::Types::Integer
11
+ attribute :rotation_angle, TD::Types::Integer
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ module TD::Types
2
+ # Describes a solid fill of a background.
3
+ #
4
+ # @attr color [Integer] A color of the background in the RGB24 format.
5
+ class BackgroundFill::Solid < BackgroundFill
6
+ attribute :color, TD::Types::Integer
7
+ end
8
+ end
@@ -4,7 +4,7 @@ module TD::Types
4
4
  %w[
5
5
  wallpaper
6
6
  pattern
7
- solid
7
+ fill
8
8
  ].each do |type|
9
9
  autoload TD::Types.camelize(type), "tdlib/types/background_type/#{type}"
10
10
  end
@@ -0,0 +1,8 @@
1
+ module TD::Types
2
+ # A filled background.
3
+ #
4
+ # @attr fill [TD::Types::BackgroundFill] Description of the background fill.
5
+ class BackgroundType::Fill < BackgroundType
6
+ attribute :fill, TD::Types::BackgroundFill
7
+ end
8
+ end
@@ -1,12 +1,13 @@
1
1
  module TD::Types
2
- # A PNG pattern to be combined with the color chosen by the user.
2
+ # A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the
3
+ # background fill chosen by the user.
3
4
  #
4
- # @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is rotated.
5
- # @attr color [Integer] Main color of the background in RGB24 format.
6
- # @attr intensity [Integer] Intensity of the pattern when it is shown above the main background color, 0-100.
5
+ # @attr fill [TD::Types::BackgroundFill] Description of the background fill.
6
+ # @attr intensity [Integer] Intensity of the pattern when it is shown above the filled background, 0-100.
7
+ # @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is tilted.
7
8
  class BackgroundType::Pattern < BackgroundType
8
- attribute :is_moving, TD::Types::Bool
9
- attribute :color, TD::Types::Integer
9
+ attribute :fill, TD::Types::BackgroundFill
10
10
  attribute :intensity, TD::Types::Integer
11
+ attribute :is_moving, TD::Types::Bool
11
12
  end
12
13
  end