Skip to content

Commit

Permalink
update schema to 1.8.33
Browse files Browse the repository at this point in the history
  • Loading branch information
Imirato committed Jul 9, 2024
1 parent 4d77903 commit 11fc51a
Show file tree
Hide file tree
Showing 1,154 changed files with 16,938 additions and 3,231 deletions.
6,437 changes: 5,420 additions & 1,017 deletions lib/tdlib/client_methods.rb

Large diffs are not rendered by default.

2,912 changes: 1,940 additions & 972 deletions lib/tdlib/types.rb

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions lib/tdlib/types/accent_color.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module TD::Types
# Contains information about supported accent color for user/chat name, background of empty chat photo, replies to
# messages and link previews.
#
# @attr id [Integer] Accent color identifier.
# @attr built_in_accent_color_id [Integer] Identifier of a built-in color to use in places, where only one color is
# needed; 0-6.
# @attr light_theme_colors [Array<Integer>] The list of 1-3 colors in RGB format, describing the accent color, as
# expected to be shown in light themes.
# @attr dark_theme_colors [Array<Integer>] The list of 1-3 colors in RGB format, describing the accent color, as
# expected to be shown in dark themes.
# @attr min_channel_chat_boost_level [Integer] The minimum chat boost level required to use the color in a channel
# chat.
class AccentColor < Base
attribute :id, TD::Types::Coercible::Integer
attribute :built_in_accent_color_id, TD::Types::Coercible::Integer
attribute :light_theme_colors, TD::Types::Array.of(TD::Types::Coercible::Integer)
attribute :dark_theme_colors, TD::Types::Array.of(TD::Types::Coercible::Integer)
attribute :min_channel_chat_boost_level, TD::Types::Coercible::Integer
end
end
3 changes: 1 addition & 2 deletions lib/tdlib/types/account_ttl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ module TD::Types
# Contains information about the period of inactivity after which the current user's account will automatically be
# deleted.
#
# @attr days [Integer] Number of days of inactivity before the account will be flagged for deletion; should range
# from 30-366 days.
# @attr days [Integer] Number of days of inactivity before the account will be flagged for deletion; 30-366 days.
class AccountTtl < Base
attribute :days, TD::Types::Coercible::Integer
end
Expand Down
14 changes: 14 additions & 0 deletions lib/tdlib/types/added_reaction.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module TD::Types
# Represents a reaction applied to a message.
#
# @attr type [TD::Types::ReactionType] Type of the reaction.
# @attr sender_id [TD::Types::MessageSender] Identifier of the chat member, applied the reaction.
# @attr is_outgoing [Boolean] True, if the reaction was added by the current user.
# @attr date [Integer] Point in time (Unix timestamp) when the reaction was added.
class AddedReaction < Base
attribute :type, TD::Types::ReactionType
attribute :sender_id, TD::Types::MessageSender
attribute :is_outgoing, TD::Types::Bool
attribute :date, TD::Types::Coercible::Integer
end
end
13 changes: 13 additions & 0 deletions lib/tdlib/types/added_reactions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module TD::Types
# Represents a list of reactions added to a message.
#
# @attr total_count [Integer] The total number of found reactions.
# @attr reactions [Array<TD::Types::AddedReaction>] The list of added reactions.
# @attr next_offset [TD::Types::String] The offset for the next request.
# If empty, then there are no more results.
class AddedReactions < Base
attribute :total_count, TD::Types::Coercible::Integer
attribute :reactions, TD::Types::Array.of(TD::Types::AddedReaction)
attribute :next_offset, TD::Types::String
end
end
18 changes: 18 additions & 0 deletions lib/tdlib/types/animated_emoji.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module TD::Types
# Describes an animated or custom representation of an emoji.
#
# @attr sticker [TD::Types::Sticker, nil] Sticker for the emoji; may be null if yet unknown for a custom emoji.
# If the sticker is a custom emoji, then it can have arbitrary format.
# @attr sticker_width [Integer] Expected width of the sticker, which can be used if the sticker is null.
# @attr sticker_height [Integer] Expected height of the sticker, which can be used if the sticker is null.
# @attr fitzpatrick_type [Integer] Emoji modifier fitzpatrick type; 0-6; 0 if none.
# @attr sound [TD::Types::File, nil] File containing the sound to be played when the sticker is clicked; may be null.
# The sound is encoded with the Opus codec, and stored inside an OGG container.
class AnimatedEmoji < Base
attribute :sticker, TD::Types::Sticker.optional.default(nil)
attribute :sticker_width, TD::Types::Coercible::Integer
attribute :sticker_height, TD::Types::Coercible::Integer
attribute :fitzpatrick_type, TD::Types::Coercible::Integer
attribute :sound, TD::Types::File.optional.default(nil)
end
end
17 changes: 17 additions & 0 deletions lib/tdlib/types/archive_chat_list_settings.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module TD::Types
# Contains settings for automatic moving of chats to and from the Archive chat lists.
#
# @attr archive_and_mute_new_chats_from_unknown_users [Boolean] True, if new chats from non-contacts will be
# automatically archived and muted.
# Can be set to true only if the option "can_archive_and_mute_new_chats_from_unknown_users" is true.
# @attr keep_unmuted_chats_archived [Boolean] True, if unmuted chats will be kept in the Archive chat list when they
# get a new message.
# @attr keep_chats_from_folders_archived [Boolean] True, if unmuted chats, that are always included or pinned in a
# folder, will be kept in the Archive chat list when they get a new message.
# Ignored if keep_unmuted_chats_archived == true.
class ArchiveChatListSettings < Base
attribute :archive_and_mute_new_chats_from_unknown_users, TD::Types::Bool
attribute :keep_unmuted_chats_archived, TD::Types::Bool
attribute :keep_chats_from_folders_archived, TD::Types::Bool
end
end
67 changes: 67 additions & 0 deletions lib/tdlib/types/attachment_menu_bot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
module TD::Types
# Represents a bot, which can be added to attachment or side menu.
#
# @attr bot_user_id [Integer] User identifier of the bot.
# @attr supports_self_chat [Boolean] True, if the bot supports opening from attachment menu in the chat with the bot.
# @attr supports_user_chats [Boolean] True, if the bot supports opening from attachment menu in private chats with
# ordinary users.
# @attr supports_bot_chats [Boolean] True, if the bot supports opening from attachment menu in private chats with
# other bots.
# @attr supports_group_chats [Boolean] True, if the bot supports opening from attachment menu in basic group and
# supergroup chats.
# @attr supports_channel_chats [Boolean] True, if the bot supports opening from attachment menu in channel chats.
# @attr request_write_access [Boolean] True, if the user must be asked for the permission to send messages to the
# bot.
# @attr is_added [Boolean] True, if the bot was explicitly added by the user.
# If the bot isn't added, then on the first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot
# must be added or removed.
# @attr show_in_attachment_menu [Boolean] True, if the bot must be shown in the attachment menu.
# @attr show_in_side_menu [Boolean] True, if the bot must be shown in the side menu.
# @attr show_disclaimer_in_side_menu [Boolean] True, if a disclaimer, why the bot is shown in the side menu, is
# needed.
# @attr name [TD::Types::String] Name for the bot in attachment menu.
# @attr name_color [TD::Types::AttachmentMenuBotColor, nil] Color to highlight selected name of the bot if
# appropriate; may be null.
# @attr default_icon [TD::Types::File, nil] Default icon for the bot in SVG format; may be null.
# @attr ios_static_icon [TD::Types::File, nil] Icon for the bot in SVG format for the official iOS app; may be null.
# @attr ios_animated_icon [TD::Types::File, nil] Icon for the bot in TGS format for the official iOS app; may be
# null.
# @attr ios_side_menu_icon [TD::Types::File, nil] Icon for the bot in PNG format for the official iOS app side menu;
# may be null.
# @attr android_icon [TD::Types::File, nil] Icon for the bot in TGS format for the official Android app; may be null.
# @attr android_side_menu_icon [TD::Types::File, nil] Icon for the bot in SVG format for the official Android app
# side menu; may be null.
# @attr macos_icon [TD::Types::File, nil] Icon for the bot in TGS format for the official native macOS app; may be
# null.
# @attr macos_side_menu_icon [TD::Types::File, nil] Icon for the bot in PNG format for the official macOS app side
# menu; may be null.
# @attr icon_color [TD::Types::AttachmentMenuBotColor, nil] Color to highlight selected icon of the bot if
# appropriate; may be null.
# @attr web_app_placeholder [TD::Types::File, nil] Default placeholder for opened Web Apps in SVG format; may be
# null.
class AttachmentMenuBot < Base
attribute :bot_user_id, TD::Types::Coercible::Integer
attribute :supports_self_chat, TD::Types::Bool
attribute :supports_user_chats, TD::Types::Bool
attribute :supports_bot_chats, TD::Types::Bool
attribute :supports_group_chats, TD::Types::Bool
attribute :supports_channel_chats, TD::Types::Bool
attribute :request_write_access, TD::Types::Bool
attribute :is_added, TD::Types::Bool
attribute :show_in_attachment_menu, TD::Types::Bool
attribute :show_in_side_menu, TD::Types::Bool
attribute :show_disclaimer_in_side_menu, TD::Types::Bool
attribute :name, TD::Types::String
attribute :name_color, TD::Types::AttachmentMenuBotColor.optional.default(nil)
attribute :default_icon, TD::Types::File.optional.default(nil)
attribute :ios_static_icon, TD::Types::File.optional.default(nil)
attribute :ios_animated_icon, TD::Types::File.optional.default(nil)
attribute :ios_side_menu_icon, TD::Types::File.optional.default(nil)
attribute :android_icon, TD::Types::File.optional.default(nil)
attribute :android_side_menu_icon, TD::Types::File.optional.default(nil)
attribute :macos_icon, TD::Types::File.optional.default(nil)
attribute :macos_side_menu_icon, TD::Types::File.optional.default(nil)
attribute :icon_color, TD::Types::AttachmentMenuBotColor.optional.default(nil)
attribute :web_app_placeholder, TD::Types::File.optional.default(nil)
end
end
10 changes: 10 additions & 0 deletions lib/tdlib/types/attachment_menu_bot_color.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module TD::Types
# Describes a color to highlight a bot added to attachment menu.
#
# @attr light_color [Integer] Color in the RGB24 format for light themes.
# @attr dark_color [Integer] Color in the RGB24 format for dark themes.
class AttachmentMenuBotColor < Base
attribute :light_color, TD::Types::Coercible::Integer
attribute :dark_color, TD::Types::Coercible::Integer
end
end
6 changes: 5 additions & 1 deletion lib/tdlib/types/audio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ module TD::Types
# @attr album_cover_minithumbnail [TD::Types::Minithumbnail, nil] The minithumbnail of the album cover; may be null.
# @attr album_cover_thumbnail [TD::Types::Thumbnail, nil] The thumbnail of the album cover in JPEG format; as defined
# by the sender.
# The full size thumbnail should be extracted from the downloaded file; may be null.
# The full size thumbnail is supposed to be extracted from the downloaded audio file; may be null.
# @attr external_album_covers [Array<TD::Types::Thumbnail>] Album cover variants to use if the downloaded audio file
# contains no album cover.
# Provided thumbnail dimensions are approximate.
# @attr audio [TD::Types::File] File containing the audio.
class Audio < Base
attribute :duration, TD::Types::Coercible::Integer
Expand All @@ -20,6 +23,7 @@ class Audio < Base
attribute :mime_type, TD::Types::String
attribute :album_cover_minithumbnail, TD::Types::Minithumbnail.optional.default(nil)
attribute :album_cover_thumbnail, TD::Types::Thumbnail.optional.default(nil)
attribute :external_album_covers, TD::Types::Array.of(TD::Types::Thumbnail)
attribute :audio, TD::Types::File
end
end
8 changes: 4 additions & 4 deletions lib/tdlib/types/authentication_code_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ module TD::Types
# Information about the authentication code that was sent.
#
# @attr phone_number [TD::Types::String] A phone number that is being authenticated.
# @attr type [TD::Types::AuthenticationCodeType] Describes the way the code was sent to the user.
# @attr next_type [TD::Types::AuthenticationCodeType, nil] Describes the way the next code will be sent to the user;
# may be null.
# @attr timeout [Integer] Timeout before the code should be re-sent, in seconds.
# @attr type [TD::Types::AuthenticationCodeType] The way the code was sent to the user.
# @attr next_type [TD::Types::AuthenticationCodeType, nil] The way the next code will be sent to the user; may be
# null.
# @attr timeout [Integer] Timeout before the code can be re-sent, in seconds.
class AuthenticationCodeInfo < Base
attribute :phone_number, TD::Types::String
attribute :type, TD::Types::AuthenticationCodeType
Expand Down
6 changes: 6 additions & 0 deletions lib/tdlib/types/authentication_code_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ class AuthenticationCodeType < Base
%w[
telegram_message
sms
sms_word
sms_phrase
call
flash_call
missed_call
fragment
firebase_android
firebase_ios
].each do |type|
autoload TD::Types.camelize(type), "tdlib/types/authentication_code_type/#{type}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tdlib/types/authentication_code_type/call.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module TD::Types
# An authentication code is delivered via a phone call to the specified phone number.
# A digit-only authentication code is delivered via a phone call to the specified phone number.
#
# @attr length [Integer] Length of the code.
class AuthenticationCodeType::Call < AuthenticationCodeType
Expand Down
11 changes: 11 additions & 0 deletions lib/tdlib/types/authentication_code_type/firebase_android.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TD::Types
# A digit-only authentication code is delivered via Firebase Authentication to the official Android application.
#
# @attr device_verification_parameters [TD::Types::FirebaseDeviceVerificationParameters] Parameters to be used for
# device verification.
# @attr length [Integer] Length of the code.
class AuthenticationCodeType::FirebaseAndroid < AuthenticationCodeType
attribute :device_verification_parameters, TD::Types::FirebaseDeviceVerificationParameters
attribute :length, TD::Types::Coercible::Integer
end
end
14 changes: 14 additions & 0 deletions lib/tdlib/types/authentication_code_type/firebase_ios.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module TD::Types
# A digit-only authentication code is delivered via Firebase Authentication to the official iOS application.
#
# @attr receipt [TD::Types::String] Receipt of successful application token validation to compare with receipt from
# push notification.
# @attr push_timeout [Integer] Time after the next authentication method is supposed to be used if verification push
# notification isn't received, in seconds.
# @attr length [Integer] Length of the code.
class AuthenticationCodeType::FirebaseIos < AuthenticationCodeType
attribute :receipt, TD::Types::String
attribute :push_timeout, TD::Types::Coercible::Integer
attribute :length, TD::Types::Coercible::Integer
end
end
4 changes: 2 additions & 2 deletions lib/tdlib/types/authentication_code_type/flash_call.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TD::Types
# An authentication code is delivered by an immediately cancelled call to the specified phone number.
# The number from which the call was made is the code.
# An authentication code is delivered by an immediately canceled call to the specified phone number.
# The phone number that calls is the code that must be entered automatically.
#
# @attr pattern [TD::Types::String] Pattern of the phone number from which the call will be made.
class AuthenticationCodeType::FlashCall < AuthenticationCodeType
Expand Down
11 changes: 11 additions & 0 deletions lib/tdlib/types/authentication_code_type/fragment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TD::Types
# A digit-only authentication code is delivered to https://fragment.com.
# The user must be logged in there via a wallet owning the phone number's NFT.
#
# @attr url [TD::Types::String] URL to open to receive the code.
# @attr length [Integer] Length of the code.
class AuthenticationCodeType::Fragment < AuthenticationCodeType
attribute :url, TD::Types::String
attribute :length, TD::Types::Coercible::Integer
end
end
11 changes: 11 additions & 0 deletions lib/tdlib/types/authentication_code_type/missed_call.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TD::Types
# An authentication code is delivered by an immediately canceled call to the specified phone number.
# The last digits of the phone number that calls are the code that must be entered manually by the user.
#
# @attr phone_number_prefix [TD::Types::String] Prefix of the phone number from which the call will be made.
# @attr length [Integer] Number of digits in the code, excluding the prefix.
class AuthenticationCodeType::MissedCall < AuthenticationCodeType
attribute :phone_number_prefix, TD::Types::String
attribute :length, TD::Types::Coercible::Integer
end
end
3 changes: 2 additions & 1 deletion lib/tdlib/types/authentication_code_type/sms.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module TD::Types
# An authentication code is delivered via an SMS message to the specified phone number.
# A digit-only authentication code is delivered via an SMS message to the specified phone number; non-official
# applications may not receive this type of code.
#
# @attr length [Integer] Length of the code.
class AuthenticationCodeType::Sms < AuthenticationCodeType
Expand Down
9 changes: 9 additions & 0 deletions lib/tdlib/types/authentication_code_type/sms_phrase.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module TD::Types
# An authentication code is a phrase from multiple words delivered via an SMS message to the specified phone number;
# non-official applications may not receive this type of code.
#
# @attr first_word [TD::Types::String] The first word of the phrase if known.
class AuthenticationCodeType::SmsPhrase < AuthenticationCodeType
attribute :first_word, TD::Types::String
end
end
9 changes: 9 additions & 0 deletions lib/tdlib/types/authentication_code_type/sms_word.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module TD::Types
# An authentication code is a word delivered via an SMS message to the specified phone number; non-official
# applications may not receive this type of code.
#
# @attr first_letter [TD::Types::String] The first letters of the word if known.
class AuthenticationCodeType::SmsWord < AuthenticationCodeType
attribute :first_letter, TD::Types::String
end
end
4 changes: 2 additions & 2 deletions lib/tdlib/types/authentication_code_type/telegram_message.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TD::Types
# An authentication code is delivered via a private Telegram message, which can be viewed from another active
# session.
# A digit-only authentication code is delivered via a private Telegram message, which can be viewed from another
# active session.
#
# @attr length [Integer] Length of the code.
class AuthenticationCodeType::TelegramMessage < AuthenticationCodeType
Expand Down
3 changes: 2 additions & 1 deletion lib/tdlib/types/authorization_state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ module TD::Types
class AuthorizationState < Base
%w[
wait_tdlib_parameters
wait_encryption_key
wait_phone_number
wait_email_address
wait_email_code
wait_code
wait_other_device_confirmation
wait_registration
Expand Down
2 changes: 1 addition & 1 deletion lib/tdlib/types/authorization_state/closed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module TD::Types
# All databases are closed and all resources are released.
# No other updates will be received after this.
# All queries will be responded to with error code 500.
# To continue working, one should create a new instance of the TDLib client.
# To continue working, one must create a new instance of the TDLib client.
class AuthorizationState::Closed < AuthorizationState
end
end
2 changes: 1 addition & 1 deletion lib/tdlib/types/authorization_state/ready.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TD::Types
# The user has been successfully authorized.
# TDLib is now ready to answer queries.
# TDLib is now ready to answer general requests.
class AuthorizationState::Ready < AuthorizationState
end
end
1 change: 1 addition & 0 deletions lib/tdlib/types/authorization_state/wait_code.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module TD::Types
# TDLib needs the user's authentication code to authorize.
# Call checkAuthenticationCode to check the code.
#
# @attr code_info [TD::Types::AuthenticationCodeInfo] Information about the authorization code that was sent.
class AuthorizationState::WaitCode < AuthorizationState
Expand Down
12 changes: 12 additions & 0 deletions lib/tdlib/types/authorization_state/wait_email_address.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module TD::Types
# TDLib needs the user's email address to authorize.
# Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with
# Apple ID/Google ID token if allowed.
#
# @attr allow_apple_id [Boolean] True, if authorization through Apple ID is allowed.
# @attr allow_google_id [Boolean] True, if authorization through Google ID is allowed.
class AuthorizationState::WaitEmailAddress < AuthorizationState
attribute :allow_apple_id, TD::Types::Bool
attribute :allow_google_id, TD::Types::Bool
end
end
Loading

0 comments on commit 11fc51a

Please sign in to comment.