-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,230 changed files
with
18,260 additions
and
3,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
lib/tdlib/types/authentication_code_type/firebase_android.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.