From 560597f7749e812bf3a3ee10927a927c1fc0a75e Mon Sep 17 00:00:00 2001 From: Roj Date: Fri, 17 May 2024 23:34:29 +0300 Subject: [PATCH] Change how Telegram API objects are represented (#219) --- .github/workflows/ci.yml | 10 +- .github/workflows/release.yml | 1 + 2_tl.ts | 15 +- 3_errors.ts | 1033 +- 4_errors.ts | 16 +- client/0_message.ts | 26 +- client/0_password.ts | 13 +- client/0_storage_operations.ts | 91 +- client/0_utilities.ts | 23 +- client/1_client_encrypted.ts | 94 +- client/1_client_plain.ts | 58 +- client/1_types.ts | 24 +- client/2_account_manager.ts | 32 +- client/2_bot_info_manager.ts | 16 +- client/2_business_connection_manager.ts | 15 +- client/2_file_manager.ts | 53 +- client/2_reaction_manager.ts | 38 +- client/2_update_manager.ts | 424 +- client/3_message_manager.ts | 794 +- client/3_video_chat_manager.ts | 72 +- client/4_callback_query_manager.ts | 25 +- client/4_chat_list_manager.ts | 87 +- client/4_inline_query_manager.ts | 25 +- client/4_story_manager.ts | 57 +- client/5_client.ts | 229 +- tl/0_api.ts | 40710 ++++++++++++ tl/1_tl_object.ts | 304 - tl/1_tl_object_test.ts | 177 - tl/1_utilities.ts | 70 + tl/1_utilities_test.ts | 16 + tl/{3_deserialize.ts => 2_deserialize.ts} | 62 +- tl/2_serialize.ts | 170 + tl/2_serialize_test.ts | 87 + tl/2_types.ts | 60175 ------------------ tl/2_types_test.ts | 30 - tl/3_deserialize_test.ts | 16 +- tl/3_functions.ts | 25957 -------- tl/{4_tl_reader.ts => 3_tl_reader.ts} | 14 +- tl/3_utilities.ts | 28 +- tl/{3_functions_test.ts => 4_rpc_result.ts} | 26 +- tl/{5_tl_writer.ts => 4_tl_writer.ts} | 10 +- tl/5_message.ts | 116 + tl/{7_message_test.ts => 5_message_test.ts} | 20 +- tl/6_rpc_result.ts | 45 - tl/7_message.ts | 78 - tl/8_message_container.ts | 60 - types/0_birthday.ts | 4 +- types/0_callback_query_answer.ts | 4 +- types/0_chat_administrator_rights.ts | 17 +- types/0_chat_member_rights.ts | 11 +- types/0_chat_photo.ts | 6 +- types/0_contact.ts | 4 +- types/0_dice.ts | 4 +- types/0_giveaway_parameters.ts | 8 +- types/0_link_preview.ts | 4 +- types/0_live_stream_channel.ts | 4 +- types/0_location.ts | 12 +- types/0_mask_position.ts | 4 +- types/0_message_entity.ts | 88 +- types/0_message_search_filter.ts | 32 +- types/0_opening_hours.ts | 4 +- types/0_poll_option.ts | 4 +- types/0_reaction.ts | 12 +- types/0_restriction_reason.ts | 4 +- types/0_thumbnail.ts | 8 +- types/0_video_chat.ts | 6 +- types/0_voice.ts | 4 +- types/1_animation.ts | 6 +- types/1_audio.ts | 6 +- types/1_bot_command_scope.ts | 20 +- types/1_chat_p.ts | 22 +- types/1_document.ts | 6 +- types/1_giveaway.ts | 4 +- types/1_keyboard_button.ts | 67 +- types/1_message_reaction.ts | 12 +- types/1_photo.ts | 12 +- types/1_poll.ts | 4 +- types/1_reaction_count.ts | 4 +- types/1_reply_quote.ts | 4 +- types/1_sticker.ts | 18 +- types/1_story_privacy.ts | 38 +- types/1_story_reaction.ts | 4 +- types/1_user.ts | 6 +- types/1_venue.ts | 6 +- types/1_video.ts | 6 +- types/1_video_note.ts | 6 +- types/2_business_connection.ts | 6 +- types/2_chat.ts | 24 +- types/2_chat_member.ts | 22 +- types/2_chosen_inline_result.ts | 12 +- types/2_game.ts | 12 +- types/2_inactive_chat.ts | 6 +- types/2_inline_keyboard_button.ts | 40 +- types/2_inline_query.ts | 18 +- types/2_invite_link.ts | 6 +- types/2_message_reaction_count.ts | 4 +- types/2_message_reactions.ts | 6 +- types/2_story_content.ts | 14 +- types/2_story_interactions.ts | 4 +- types/2_story_interactive_area.ts | 52 +- types/3_chat_member_updated.ts | 16 +- types/3_reply_markup.ts | 60 +- types/3_story.ts | 4 +- types/4_inline_query_result.ts | 228 +- types/4_message.ts | 130 +- types/5_callback_query.ts | 14 +- types/5_chat_list_item.ts | 10 +- types/5_inline_query_answer.ts | 4 +- types/_file_id.ts | 10 +- types/_getters.ts | 14 +- 110 files changed, 43239 insertions(+), 89414 deletions(-) create mode 100644 tl/0_api.ts delete mode 100644 tl/1_tl_object.ts delete mode 100644 tl/1_tl_object_test.ts create mode 100644 tl/1_utilities.ts create mode 100644 tl/1_utilities_test.ts rename tl/{3_deserialize.ts => 2_deserialize.ts} (72%) create mode 100644 tl/2_serialize.ts create mode 100644 tl/2_serialize_test.ts delete mode 100644 tl/2_types.ts delete mode 100644 tl/2_types_test.ts delete mode 100644 tl/3_functions.ts rename tl/{4_tl_reader.ts => 3_tl_reader.ts} (79%) rename tl/{3_functions_test.ts => 4_rpc_result.ts} (61%) rename tl/{5_tl_writer.ts => 4_tl_writer.ts} (86%) create mode 100644 tl/5_message.ts rename tl/{7_message_test.ts => 5_message_test.ts} (79%) delete mode 100644 tl/6_rpc_result.ts delete mode 100644 tl/7_message.ts delete mode 100644 tl/8_message_container.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1e631ef..c4e15b8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,9 @@ jobs: path: ${{ matrix.cache_path }} key: ${{ runner.os }}-${{ hashFiles('0_deps.ts') }} - - run: deno test --allow-env=LOG_VERBOSITY + - run: deno test --allow-env + env: + __TYPE_MAP: 1 transform-browser: runs-on: ubuntu-latest @@ -133,7 +135,9 @@ jobs: - name: Transform run: deno run -A https://raw.githubusercontent.com/MTKruto/npm/main/transform_browser.ts 0.0.0 ./mod.ts - + env: + __TYPE_MAP: 1 + transform-node: runs-on: ubuntu-latest steps: @@ -179,6 +183,8 @@ jobs: - name: Transform run: deno run -A https://raw.githubusercontent.com/MTKruto/npm/main/transform_node.ts 0.0.0 ./mod.ts + env: + __TYPE_MAP: 1 doc: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f989fbcb..1a0d1a74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,7 @@ jobs: cd dist npm publish --access public env: + __TYPE_MAP: 1 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} create-release: diff --git a/2_tl.ts b/2_tl.ts index 8beb7223..931c4f68 100644 --- a/2_tl.ts +++ b/2_tl.ts @@ -19,12 +19,11 @@ */ export { TLError } from "./tl/0_tl_raw_reader.ts"; -export * from "./tl/1_tl_object.ts"; -export { type enums, types } from "./tl/2_types.ts"; +export * as Api from "./tl/0_api.ts"; +export * from "./tl/1_utilities.ts"; +export * from "./tl/2_serialize.ts"; export * from "./tl/3_utilities.ts"; -export { functions } from "./tl/3_functions.ts"; -export * from "./tl/4_tl_reader.ts"; -export * from "./tl/5_tl_writer.ts"; -export * from "./tl/6_rpc_result.ts"; -export * from "./tl/7_message.ts"; -export * from "./tl/8_message_container.ts"; +export * from "./tl/3_tl_reader.ts"; +export * from "./tl/4_tl_writer.ts"; +export * from "./tl/4_rpc_result.ts"; +export * from "./tl/5_message.ts"; diff --git a/3_errors.ts b/3_errors.ts index e252ceee..b2a86dcd 100644 --- a/3_errors.ts +++ b/3_errors.ts @@ -18,2056 +18,2057 @@ * along with this program. If not, see . */ -import { TLObject, types } from "./2_tl.ts"; +import { Api } from "./2_tl.ts"; +import { MtkrutoError } from "./0_errors.ts"; -export interface ErrorWithCallParams { +export interface TelegramErrorParams { error_code: number; error_message: string; - call: TLObject; + call: Api.AnyObject; } -export class ErrorWithCall extends types.Rpc_error { - call: TLObject; +export class TelegramError extends MtkrutoError { + call: Api.AnyObject; - constructor(params: ErrorWithCallParams) { - super(params); + constructor(params: TelegramErrorParams) { + super(); this.call = params.call; } } -export class AboutTooLong extends ErrorWithCall { +export class AboutTooLong extends TelegramError { // } -export class AccessTokenExpired extends ErrorWithCall { +export class AccessTokenExpired extends TelegramError { // } -export class AccessTokenInvalid extends ErrorWithCall { +export class AccessTokenInvalid extends TelegramError { // } -export class ActiveUserRequired extends ErrorWithCall { +export class ActiveUserRequired extends TelegramError { // } -export class AdminsTooMuch extends ErrorWithCall { +export class AdminsTooMuch extends TelegramError { // } -export class AdminIdInvalid extends ErrorWithCall { +export class AdminIdInvalid extends TelegramError { // } -export class AdminRankEmojiNotAllowed extends ErrorWithCall { +export class AdminRankEmojiNotAllowed extends TelegramError { // } -export class AdminRankInvalid extends ErrorWithCall { +export class AdminRankInvalid extends TelegramError { // } -export class AlbumPhotosTooMany extends ErrorWithCall { +export class AlbumPhotosTooMany extends TelegramError { // } -export class ApiIdInvalid extends ErrorWithCall { +export class ApiIdInvalid extends TelegramError { // } -export class ApiIdPublishedFlood extends ErrorWithCall { +export class ApiIdPublishedFlood extends TelegramError { // } -export class ArticleTitleEmpty extends ErrorWithCall { +export class ArticleTitleEmpty extends TelegramError { // } -export class AudioContentUrlEmpty extends ErrorWithCall { +export class AudioContentUrlEmpty extends TelegramError { // } -export class AudioTitleEmpty extends ErrorWithCall { +export class AudioTitleEmpty extends TelegramError { // } -export class AuthBytesInvalid extends ErrorWithCall { +export class AuthBytesInvalid extends TelegramError { // } -export class AuthKeyDuplicated extends ErrorWithCall { +export class AuthKeyDuplicated extends TelegramError { // } -export class AuthKeyInvalid extends ErrorWithCall { +export class AuthKeyInvalid extends TelegramError { // } -export class AuthKeyPermEmpty extends ErrorWithCall { +export class AuthKeyPermEmpty extends TelegramError { // } -export class AuthKeyUnregistered extends ErrorWithCall { +export class AuthKeyUnregistered extends TelegramError { // } -export class AuthRestart extends ErrorWithCall { +export class AuthRestart extends TelegramError { // } -export class AuthTokenAlreadyAccepted extends ErrorWithCall { +export class AuthTokenAlreadyAccepted extends TelegramError { // } -export class AuthTokenException extends ErrorWithCall { +export class AuthTokenException extends TelegramError { // } -export class AuthTokenExpired extends ErrorWithCall { +export class AuthTokenExpired extends TelegramError { // } -export class AuthTokenInvalid extends ErrorWithCall { +export class AuthTokenInvalid extends TelegramError { // } -export class AutoarchiveNotAvailable extends ErrorWithCall { +export class AutoarchiveNotAvailable extends TelegramError { // } -export class BankCardNumberInvalid extends ErrorWithCall { +export class BankCardNumberInvalid extends TelegramError { // } -export class BannedRightsInvalid extends ErrorWithCall { +export class BannedRightsInvalid extends TelegramError { // } -export class BasePortLocInvalid extends ErrorWithCall { +export class BasePortLocInvalid extends TelegramError { // } -export class BotsTooMuch extends ErrorWithCall { +export class BotsTooMuch extends TelegramError { // } -export class BotChannelsNa extends ErrorWithCall { +export class BotChannelsNa extends TelegramError { // } -export class BotCommandDescriptionInvalid extends ErrorWithCall { +export class BotCommandDescriptionInvalid extends TelegramError { // } -export class BotCommandInvalid extends ErrorWithCall { +export class BotCommandInvalid extends TelegramError { // } -export class BotDomainInvalid extends ErrorWithCall { +export class BotDomainInvalid extends TelegramError { // } -export class BotGamesDisabled extends ErrorWithCall { +export class BotGamesDisabled extends TelegramError { // } -export class BotGroupsBlocked extends ErrorWithCall { +export class BotGroupsBlocked extends TelegramError { // } -export class BotInlineDisabled extends ErrorWithCall { +export class BotInlineDisabled extends TelegramError { // } -export class BotInvalid extends ErrorWithCall { +export class BotInvalid extends TelegramError { // } -export class BotMethodInvalid extends ErrorWithCall { +export class BotMethodInvalid extends TelegramError { // } -export class BotMissing extends ErrorWithCall { +export class BotMissing extends TelegramError { // } -export class BotOnesideNotAvail extends ErrorWithCall { +export class BotOnesideNotAvail extends TelegramError { // } -export class BotPaymentsDisabled extends ErrorWithCall { +export class BotPaymentsDisabled extends TelegramError { // } -export class BotPollsDisabled extends ErrorWithCall { +export class BotPollsDisabled extends TelegramError { // } -export class BotResponseTimeout extends ErrorWithCall { +export class BotResponseTimeout extends TelegramError { // } -export class BotScoreNotModified extends ErrorWithCall { +export class BotScoreNotModified extends TelegramError { // } -export class BroadcastCallsDisabled extends ErrorWithCall { +export class BroadcastCallsDisabled extends TelegramError { // } -export class BroadcastForbidden extends ErrorWithCall { +export class BroadcastForbidden extends TelegramError { // } -export class BroadcastIdInvalid extends ErrorWithCall { +export class BroadcastIdInvalid extends TelegramError { // } -export class BroadcastPublicVotersForbidden extends ErrorWithCall { +export class BroadcastPublicVotersForbidden extends TelegramError { // } -export class BroadcastRequired extends ErrorWithCall { +export class BroadcastRequired extends TelegramError { // } -export class ButtonDataInvalid extends ErrorWithCall { +export class ButtonDataInvalid extends TelegramError { // } -export class ButtonTextInvalid extends ErrorWithCall { +export class ButtonTextInvalid extends TelegramError { // } -export class ButtonTypeInvalid extends ErrorWithCall { +export class ButtonTypeInvalid extends TelegramError { // } -export class ButtonUrlInvalid extends ErrorWithCall { +export class ButtonUrlInvalid extends TelegramError { // } -export class ButtonUserPrivacyRestricted extends ErrorWithCall { +export class ButtonUserPrivacyRestricted extends TelegramError { // } -export class CallAlreadyAccepted extends ErrorWithCall { +export class CallAlreadyAccepted extends TelegramError { // } -export class CallAlreadyDeclined extends ErrorWithCall { +export class CallAlreadyDeclined extends TelegramError { // } -export class CallOccupyFailed extends ErrorWithCall { +export class CallOccupyFailed extends TelegramError { // } -export class CallPeerInvalid extends ErrorWithCall { +export class CallPeerInvalid extends TelegramError { // } -export class CallProtocolFlagsInvalid extends ErrorWithCall { +export class CallProtocolFlagsInvalid extends TelegramError { // } -export class CdnMethodInvalid extends ErrorWithCall { +export class CdnMethodInvalid extends TelegramError { // } -export class CdnUploadTimeout extends ErrorWithCall { +export class CdnUploadTimeout extends TelegramError { // } -export class ChannelsAdminLocatedTooMuch extends ErrorWithCall { +export class ChannelsAdminLocatedTooMuch extends TelegramError { // } -export class ChannelsAdminPublicTooMuch extends ErrorWithCall { +export class ChannelsAdminPublicTooMuch extends TelegramError { // } -export class ChannelsTooMuch extends ErrorWithCall { +export class ChannelsTooMuch extends TelegramError { // } -export class ChannelBanned extends ErrorWithCall { +export class ChannelBanned extends TelegramError { // } -export class ChannelForumMissing extends ErrorWithCall { +export class ChannelForumMissing extends TelegramError { // } -export class ChannelIdInvalid extends ErrorWithCall { +export class ChannelIdInvalid extends TelegramError { // } -export class ChannelInvalid extends ErrorWithCall { +export class ChannelInvalid extends TelegramError { // } -export class ChannelParicipantMissing extends ErrorWithCall { +export class ChannelParicipantMissing extends TelegramError { // } -export class ChannelPrivate extends ErrorWithCall { +export class ChannelPrivate extends TelegramError { // } -export class ChannelPublicGroupNa extends ErrorWithCall { +export class ChannelPublicGroupNa extends TelegramError { // } -export class ChannelTooBig extends ErrorWithCall { +export class ChannelTooBig extends TelegramError { // } -export class ChannelTooLarge extends ErrorWithCall { +export class ChannelTooLarge extends TelegramError { // } -export class ChatAboutNotModified extends ErrorWithCall { +export class ChatAboutNotModified extends TelegramError { // } -export class ChatAboutTooLong extends ErrorWithCall { +export class ChatAboutTooLong extends TelegramError { // } -export class ChatAdminInviteRequired extends ErrorWithCall { +export class ChatAdminInviteRequired extends TelegramError { // } -export class ChatAdminRequired extends ErrorWithCall { +export class ChatAdminRequired extends TelegramError { // } -export class ChatDiscussionUnallowed extends ErrorWithCall { +export class ChatDiscussionUnallowed extends TelegramError { // } -export class ChatForbidden extends ErrorWithCall { +export class ChatForbidden extends TelegramError { // } -export class ChatForwardsRestricted extends ErrorWithCall { +export class ChatForwardsRestricted extends TelegramError { // } -export class ChatGetFailed extends ErrorWithCall { +export class ChatGetFailed extends TelegramError { // } -export class ChatGuestSendForbidden extends ErrorWithCall { +export class ChatGuestSendForbidden extends TelegramError { // } -export class ChatIdEmpty extends ErrorWithCall { +export class ChatIdEmpty extends TelegramError { // } -export class ChatIdGenerateFailed extends ErrorWithCall { +export class ChatIdGenerateFailed extends TelegramError { // } -export class ChatIdInvalid extends ErrorWithCall { +export class ChatIdInvalid extends TelegramError { // } -export class ChatInvalid extends ErrorWithCall { +export class ChatInvalid extends TelegramError { // } -export class ChatInvitePermanent extends ErrorWithCall { +export class ChatInvitePermanent extends TelegramError { // } -export class ChatLinkExists extends ErrorWithCall { +export class ChatLinkExists extends TelegramError { // } -export class ChatNotModified extends ErrorWithCall { +export class ChatNotModified extends TelegramError { // } -export class ChatRestricted extends ErrorWithCall { +export class ChatRestricted extends TelegramError { // } -export class ChatRevokeDateUnsupported extends ErrorWithCall { +export class ChatRevokeDateUnsupported extends TelegramError { // } -export class ChatSendGameForbidden extends ErrorWithCall { +export class ChatSendGameForbidden extends TelegramError { // } -export class ChatSendGifsForbidden extends ErrorWithCall { +export class ChatSendGifsForbidden extends TelegramError { // } -export class ChatSendInlineForbidden extends ErrorWithCall { +export class ChatSendInlineForbidden extends TelegramError { // } -export class ChatSendMediaForbidden extends ErrorWithCall { +export class ChatSendMediaForbidden extends TelegramError { // } -export class ChatSendPollForbidden extends ErrorWithCall { +export class ChatSendPollForbidden extends TelegramError { // } -export class ChatSendStickersForbidden extends ErrorWithCall { +export class ChatSendStickersForbidden extends TelegramError { // } -export class ChatTitleEmpty extends ErrorWithCall { +export class ChatTitleEmpty extends TelegramError { // } -export class ChatTooBig extends ErrorWithCall { +export class ChatTooBig extends TelegramError { // } -export class ChatWriteForbidden extends ErrorWithCall { +export class ChatWriteForbidden extends TelegramError { // } -export class ChpCallFail extends ErrorWithCall { +export class ChpCallFail extends TelegramError { // } -export class CodeEmpty extends ErrorWithCall { +export class CodeEmpty extends TelegramError { // } -export class CodeHashInvalid extends ErrorWithCall { +export class CodeHashInvalid extends TelegramError { // } -export class CodeInvalid extends ErrorWithCall { +export class CodeInvalid extends TelegramError { // } -export class ConnectionApiIdInvalid extends ErrorWithCall { +export class ConnectionApiIdInvalid extends TelegramError { // } -export class ConnectionAppVersionEmpty extends ErrorWithCall { +export class ConnectionAppVersionEmpty extends TelegramError { // } -export class ConnectionDeviceModelEmpty extends ErrorWithCall { +export class ConnectionDeviceModelEmpty extends TelegramError { // } -export class ConnectionLangPackInvalid extends ErrorWithCall { +export class ConnectionLangPackInvalid extends TelegramError { // } -export class ConnectionLayerInvalid extends ErrorWithCall { +export class ConnectionLayerInvalid extends TelegramError { // } -export class ConnectionNotInited extends ErrorWithCall { +export class ConnectionNotInited extends TelegramError { // } -export class ConnectionSystemEmpty extends ErrorWithCall { +export class ConnectionSystemEmpty extends TelegramError { // } -export class ConnectionSystemLangCodeEmpty extends ErrorWithCall { +export class ConnectionSystemLangCodeEmpty extends TelegramError { // } -export class ContactAddMissing extends ErrorWithCall { +export class ContactAddMissing extends TelegramError { // } -export class ContactIdInvalid extends ErrorWithCall { +export class ContactIdInvalid extends TelegramError { // } -export class ContactNameEmpty extends ErrorWithCall { +export class ContactNameEmpty extends TelegramError { // } -export class ContactReqMissing extends ErrorWithCall { +export class ContactReqMissing extends TelegramError { // } -export class CreateCallFailed extends ErrorWithCall { +export class CreateCallFailed extends TelegramError { // } -export class CurrencyTotalAmountInvalid extends ErrorWithCall { +export class CurrencyTotalAmountInvalid extends TelegramError { // } -export class DataInvalid extends ErrorWithCall { +export class DataInvalid extends TelegramError { // } -export class DataJsonInvalid extends ErrorWithCall { +export class DataJsonInvalid extends TelegramError { // } -export class DataTooLong extends ErrorWithCall { +export class DataTooLong extends TelegramError { // } -export class DateEmpty extends ErrorWithCall { +export class DateEmpty extends TelegramError { // } -export class DcIdInvalid extends ErrorWithCall { +export class DcIdInvalid extends TelegramError { // } -export class DhGAInvalid extends ErrorWithCall { +export class DhGAInvalid extends TelegramError { // } -export class DocumentInvalid extends ErrorWithCall { +export class DocumentInvalid extends TelegramError { // } -export class EditBotInviteForbidden extends ErrorWithCall { +export class EditBotInviteForbidden extends TelegramError { // } -export class EmailHashExpired extends ErrorWithCall { +export class EmailHashExpired extends TelegramError { // } -export class EmailInvalid extends ErrorWithCall { +export class EmailInvalid extends TelegramError { // } -export class EmailUnconfirmed extends ErrorWithCall { +export class EmailUnconfirmed extends TelegramError { // } -export class EmailVerifyExpired extends ErrorWithCall { +export class EmailVerifyExpired extends TelegramError { // } -export class EmojiInvalid extends ErrorWithCall { +export class EmojiInvalid extends TelegramError { // } -export class EmojiNotModified extends ErrorWithCall { +export class EmojiNotModified extends TelegramError { // } -export class EmoticonEmpty extends ErrorWithCall { +export class EmoticonEmpty extends TelegramError { // } -export class EmoticonInvalid extends ErrorWithCall { +export class EmoticonInvalid extends TelegramError { // } -export class EmoticonStickerpackMissing extends ErrorWithCall { +export class EmoticonStickerpackMissing extends TelegramError { // } -export class EncryptedMessageInvalid extends ErrorWithCall { +export class EncryptedMessageInvalid extends TelegramError { // } -export class EncryptionAlreadyAccepted extends ErrorWithCall { +export class EncryptionAlreadyAccepted extends TelegramError { // } -export class EncryptionAlreadyDeclined extends ErrorWithCall { +export class EncryptionAlreadyDeclined extends TelegramError { // } -export class EncryptionDeclined extends ErrorWithCall { +export class EncryptionDeclined extends TelegramError { // } -export class EncryptionIdInvalid extends ErrorWithCall { +export class EncryptionIdInvalid extends TelegramError { // } -export class EncryptionOccupyFailed extends ErrorWithCall { +export class EncryptionOccupyFailed extends TelegramError { // } -export class EntitiesTooLong extends ErrorWithCall { +export class EntitiesTooLong extends TelegramError { // } -export class EntityBoundsInvalid extends ErrorWithCall { +export class EntityBoundsInvalid extends TelegramError { // } -export class EntityMentionUserInvalid extends ErrorWithCall { +export class EntityMentionUserInvalid extends TelegramError { // } -export class ErrorTextEmpty extends ErrorWithCall { +export class ErrorTextEmpty extends TelegramError { // } -export class ExpireDateInvalid extends ErrorWithCall { +export class ExpireDateInvalid extends TelegramError { // } -export class ExpireForbidden extends ErrorWithCall { +export class ExpireForbidden extends TelegramError { // } -export class ExportCardInvalid extends ErrorWithCall { +export class ExportCardInvalid extends TelegramError { // } -export class ExternalUrlInvalid extends ErrorWithCall { +export class ExternalUrlInvalid extends TelegramError { // } -export class FieldNameEmpty extends ErrorWithCall { +export class FieldNameEmpty extends TelegramError { // } -export class FieldNameInvalid extends ErrorWithCall { +export class FieldNameInvalid extends TelegramError { // } -export class FilerefUpgradeNeeded extends ErrorWithCall { +export class FilerefUpgradeNeeded extends TelegramError { // } -export class FileContentTypeInvalid extends ErrorWithCall { +export class FileContentTypeInvalid extends TelegramError { // } -export class FileEmtpy extends ErrorWithCall { +export class FileEmtpy extends TelegramError { // } -export class FileIdInvalid extends ErrorWithCall { +export class FileIdInvalid extends TelegramError { // } -export class FilePartsInvalid extends ErrorWithCall { +export class FilePartsInvalid extends TelegramError { // } -export class FilePart_0Missing extends ErrorWithCall { +export class FilePart_0Missing extends TelegramError { // } -export class FilePartEmpty extends ErrorWithCall { +export class FilePartEmpty extends TelegramError { // } -export class FilePartInvalid extends ErrorWithCall { +export class FilePartInvalid extends TelegramError { // } -export class FilePartLengthInvalid extends ErrorWithCall { +export class FilePartLengthInvalid extends TelegramError { // } -export class FilePartSizeChanged extends ErrorWithCall { +export class FilePartSizeChanged extends TelegramError { // } -export class FilePartSizeInvalid extends ErrorWithCall { +export class FilePartSizeInvalid extends TelegramError { // } -export class FilePartTooBig extends ErrorWithCall { +export class FilePartTooBig extends TelegramError { // } -export class FilePartXMissing extends ErrorWithCall { +export class FilePartXMissing extends TelegramError { // } -export class FileReferenceEmpty extends ErrorWithCall { +export class FileReferenceEmpty extends TelegramError { // } -export class FileReferenceExpired extends ErrorWithCall { +export class FileReferenceExpired extends TelegramError { // } -export class FileReferenceInvalid extends ErrorWithCall { +export class FileReferenceInvalid extends TelegramError { // } -export class FileTitleEmpty extends ErrorWithCall { +export class FileTitleEmpty extends TelegramError { // } -export class FilterIdInvalid extends ErrorWithCall { +export class FilterIdInvalid extends TelegramError { // } -export class FilterIncludeEmpty extends ErrorWithCall { +export class FilterIncludeEmpty extends TelegramError { // } -export class FilterNotSupported extends ErrorWithCall { +export class FilterNotSupported extends TelegramError { // } -export class FilterTitleEmpty extends ErrorWithCall { +export class FilterTitleEmpty extends TelegramError { // } -export class FirstnameInvalid extends ErrorWithCall { +export class FirstnameInvalid extends TelegramError { // } -export class FolderIdEmpty extends ErrorWithCall { +export class FolderIdEmpty extends TelegramError { // } -export class FolderIdInvalid extends ErrorWithCall { +export class FolderIdInvalid extends TelegramError { // } -export class FreshChangeAdminsForbidden extends ErrorWithCall { +export class FreshChangeAdminsForbidden extends TelegramError { // } -export class FreshChangePhoneForbidden extends ErrorWithCall { +export class FreshChangePhoneForbidden extends TelegramError { // } -export class FreshResetAuthorisationForbidden extends ErrorWithCall { +export class FreshResetAuthorisationForbidden extends TelegramError { // } -export class FromMessageBotDisabled extends ErrorWithCall { +export class FromMessageBotDisabled extends TelegramError { // } -export class FromPeerInvalid extends ErrorWithCall { +export class FromPeerInvalid extends TelegramError { // } -export class GameBotInvalid extends ErrorWithCall { +export class GameBotInvalid extends TelegramError { // } -export class GeoPointInvalid extends ErrorWithCall { +export class GeoPointInvalid extends TelegramError { // } -export class GifContentTypeInvalid extends ErrorWithCall { +export class GifContentTypeInvalid extends TelegramError { // } -export class GifIdInvalid extends ErrorWithCall { +export class GifIdInvalid extends TelegramError { // } -export class GraphExpiredReload extends ErrorWithCall { +export class GraphExpiredReload extends TelegramError { // } -export class GraphInvalidReload extends ErrorWithCall { +export class GraphInvalidReload extends TelegramError { // } -export class GraphOutdatedReload extends ErrorWithCall { +export class GraphOutdatedReload extends TelegramError { // } -export class GroupcallAddParticipantsFailed extends ErrorWithCall { +export class GroupcallAddParticipantsFailed extends TelegramError { // } -export class GroupcallAlreadyDiscarded extends ErrorWithCall { +export class GroupcallAlreadyDiscarded extends TelegramError { // } -export class GroupcallAlreadyStarted extends ErrorWithCall { +export class GroupcallAlreadyStarted extends TelegramError { // } -export class GroupcallForbidden extends ErrorWithCall { +export class GroupcallForbidden extends TelegramError { // } -export class GroupcallInvalid extends ErrorWithCall { +export class GroupcallInvalid extends TelegramError { // } -export class GroupcallJoinMissing extends ErrorWithCall { +export class GroupcallJoinMissing extends TelegramError { // } -export class GroupcallNotModified extends ErrorWithCall { +export class GroupcallNotModified extends TelegramError { // } -export class GroupcallSsrcDuplicateMuch extends ErrorWithCall { +export class GroupcallSsrcDuplicateMuch extends TelegramError { // } -export class GroupedMediaInvalid extends ErrorWithCall { +export class GroupedMediaInvalid extends TelegramError { // } -export class GroupCallInvalid extends ErrorWithCall { +export class GroupCallInvalid extends TelegramError { // } -export class HashInvalid extends ErrorWithCall { +export class HashInvalid extends TelegramError { // } -export class HideRequesterMissing extends ErrorWithCall { +export class HideRequesterMissing extends TelegramError { // } -export class HistoryGetFailed extends ErrorWithCall { +export class HistoryGetFailed extends TelegramError { // } -export class ImageProcessFailed extends ErrorWithCall { +export class ImageProcessFailed extends TelegramError { // } -export class ImportFileInvalid extends ErrorWithCall { +export class ImportFileInvalid extends TelegramError { // } -export class ImportFormatUnrecognized extends ErrorWithCall { +export class ImportFormatUnrecognized extends TelegramError { // } -export class ImportIdInvalid extends ErrorWithCall { +export class ImportIdInvalid extends TelegramError { // } -export class InlineBotRequired extends ErrorWithCall { +export class InlineBotRequired extends TelegramError { // } -export class InlineResultExpired extends ErrorWithCall { +export class InlineResultExpired extends TelegramError { // } -export class InputConstructorInvalid extends ErrorWithCall { +export class InputConstructorInvalid extends TelegramError { // } -export class InputFetchError extends ErrorWithCall { +export class InputFetchError extends TelegramError { // } -export class InputFetchFail extends ErrorWithCall { +export class InputFetchFail extends TelegramError { // } -export class InputFilterInvalid extends ErrorWithCall { +export class InputFilterInvalid extends TelegramError { // } -export class InputLayerInvalid extends ErrorWithCall { +export class InputLayerInvalid extends TelegramError { // } -export class InputMethodInvalid extends ErrorWithCall { +export class InputMethodInvalid extends TelegramError { // } -export class InputRequestTooLong extends ErrorWithCall { +export class InputRequestTooLong extends TelegramError { // } -export class InputTextEmpty extends ErrorWithCall { +export class InputTextEmpty extends TelegramError { // } -export class InputUserDeactivated extends ErrorWithCall { +export class InputUserDeactivated extends TelegramError { // } -export class InterdcXCallError extends ErrorWithCall { +export class InterdcXCallError extends TelegramError { // } -export class InterdcXCallRichError extends ErrorWithCall { +export class InterdcXCallRichError extends TelegramError { // } -export class InviteForbiddenWithJoinas extends ErrorWithCall { +export class InviteForbiddenWithJoinas extends TelegramError { // } -export class InviteHashEmpty extends ErrorWithCall { +export class InviteHashEmpty extends TelegramError { // } -export class InviteHashExpired extends ErrorWithCall { +export class InviteHashExpired extends TelegramError { // } -export class InviteHashInvalid extends ErrorWithCall { +export class InviteHashInvalid extends TelegramError { // } -export class InviteRequestSent extends ErrorWithCall { +export class InviteRequestSent extends TelegramError { // } -export class InviteRevokedMissing extends ErrorWithCall { +export class InviteRevokedMissing extends TelegramError { // } -export class InvoicePayloadInvalid extends ErrorWithCall { +export class InvoicePayloadInvalid extends TelegramError { // } -export class JoinAsPeerInvalid extends ErrorWithCall { +export class JoinAsPeerInvalid extends TelegramError { // } -export class LangCodeInvalid extends ErrorWithCall { +export class LangCodeInvalid extends TelegramError { // } -export class LangCodeNotSupported extends ErrorWithCall { +export class LangCodeNotSupported extends TelegramError { // } -export class LangPackInvalid extends ErrorWithCall { +export class LangPackInvalid extends TelegramError { // } -export class LastnameInvalid extends ErrorWithCall { +export class LastnameInvalid extends TelegramError { // } -export class LimitInvalid extends ErrorWithCall { +export class LimitInvalid extends TelegramError { // } -export class LinkNotModified extends ErrorWithCall { +export class LinkNotModified extends TelegramError { // } -export class LocationInvalid extends ErrorWithCall { +export class LocationInvalid extends TelegramError { // } -export class MaxDateInvalid extends ErrorWithCall { +export class MaxDateInvalid extends TelegramError { // } -export class MaxIdInvalid extends ErrorWithCall { +export class MaxIdInvalid extends TelegramError { // } -export class MaxQtsInvalid extends ErrorWithCall { +export class MaxQtsInvalid extends TelegramError { // } -export class Md5ChecksumInvalid extends ErrorWithCall { +export class Md5ChecksumInvalid extends TelegramError { // } -export class MediaCaptionTooLong extends ErrorWithCall { +export class MediaCaptionTooLong extends TelegramError { // } -export class MediaEmpty extends ErrorWithCall { +export class MediaEmpty extends TelegramError { // } -export class MediaGroupedInvalid extends ErrorWithCall { +export class MediaGroupedInvalid extends TelegramError { // } -export class MediaInvalid extends ErrorWithCall { +export class MediaInvalid extends TelegramError { // } -export class MediaNewInvalid extends ErrorWithCall { +export class MediaNewInvalid extends TelegramError { // } -export class MediaPrevInvalid extends ErrorWithCall { +export class MediaPrevInvalid extends TelegramError { // } -export class MediaTtlInvalid extends ErrorWithCall { +export class MediaTtlInvalid extends TelegramError { // } -export class MegagroupIdInvalid extends ErrorWithCall { +export class MegagroupIdInvalid extends TelegramError { // } -export class MegagroupPrehistoryHidden extends ErrorWithCall { +export class MegagroupPrehistoryHidden extends TelegramError { // } -export class MegagroupRequired extends ErrorWithCall { +export class MegagroupRequired extends TelegramError { // } -export class MemberNoLocation extends ErrorWithCall { +export class MemberNoLocation extends TelegramError { // } -export class MemberOccupyPrimaryLocFailed extends ErrorWithCall { +export class MemberOccupyPrimaryLocFailed extends TelegramError { // } -export class MessageAuthorRequired extends ErrorWithCall { +export class MessageAuthorRequired extends TelegramError { // } -export class MessageDeleteForbidden extends ErrorWithCall { +export class MessageDeleteForbidden extends TelegramError { // } -export class MessageEditTimeExpired extends ErrorWithCall { +export class MessageEditTimeExpired extends TelegramError { // } -export class MessageEmpty extends ErrorWithCall { +export class MessageEmpty extends TelegramError { // } -export class MessageIdsEmpty extends ErrorWithCall { +export class MessageIdsEmpty extends TelegramError { // } -export class MessageIdInvalid extends ErrorWithCall { +export class MessageIdInvalid extends TelegramError { // } -export class MessageNotModified extends ErrorWithCall { +export class MessageNotModified extends TelegramError { // } -export class MessagePollClosed extends ErrorWithCall { +export class MessagePollClosed extends TelegramError { // } -export class MessageTooLong extends ErrorWithCall { +export class MessageTooLong extends TelegramError { // } -export class MethodInvalid extends ErrorWithCall { +export class MethodInvalid extends TelegramError { // } -export class MinDateInvalid extends ErrorWithCall { +export class MinDateInvalid extends TelegramError { // } -export class MsgidDecreaseRetry extends ErrorWithCall { +export class MsgidDecreaseRetry extends TelegramError { // } -export class MsgIdInvalid extends ErrorWithCall { +export class MsgIdInvalid extends TelegramError { // } -export class MsgTooOld extends ErrorWithCall { +export class MsgTooOld extends TelegramError { // } -export class MsgWaitFailed extends ErrorWithCall { +export class MsgWaitFailed extends TelegramError { // } -export class MtSendQueueTooLong extends ErrorWithCall { +export class MtSendQueueTooLong extends TelegramError { // } -export class MultiMediaTooLong extends ErrorWithCall { +export class MultiMediaTooLong extends TelegramError { // } -export class NeedChatInvalid extends ErrorWithCall { +export class NeedChatInvalid extends TelegramError { // } -export class NeedMemberInvalid extends ErrorWithCall { +export class NeedMemberInvalid extends TelegramError { // } -export class NewSaltInvalid extends ErrorWithCall { +export class NewSaltInvalid extends TelegramError { // } -export class NewSettingsEmpty extends ErrorWithCall { +export class NewSettingsEmpty extends TelegramError { // } -export class NewSettingsInvalid extends ErrorWithCall { +export class NewSettingsInvalid extends TelegramError { // } -export class NextOffsetInvalid extends ErrorWithCall { +export class NextOffsetInvalid extends TelegramError { // } -export class NotAllowed extends ErrorWithCall { +export class NotAllowed extends TelegramError { // } -export class OffsetInvalid extends ErrorWithCall { +export class OffsetInvalid extends TelegramError { // } -export class OffsetPeerIdInvalid extends ErrorWithCall { +export class OffsetPeerIdInvalid extends TelegramError { // } -export class OptionsTooMuch extends ErrorWithCall { +export class OptionsTooMuch extends TelegramError { // } -export class OptionInvalid extends ErrorWithCall { +export class OptionInvalid extends TelegramError { // } -export class PackShortNameInvalid extends ErrorWithCall { +export class PackShortNameInvalid extends TelegramError { // } -export class PackShortNameOccupied extends ErrorWithCall { +export class PackShortNameOccupied extends TelegramError { // } -export class PackTitleInvalid extends ErrorWithCall { +export class PackTitleInvalid extends TelegramError { // } -export class ParticipantsTooFew extends ErrorWithCall { +export class ParticipantsTooFew extends TelegramError { // } -export class ParticipantCallFailed extends ErrorWithCall { +export class ParticipantCallFailed extends TelegramError { // } -export class ParticipantIdInvalid extends ErrorWithCall { +export class ParticipantIdInvalid extends TelegramError { // } -export class ParticipantJoinMissing extends ErrorWithCall { +export class ParticipantJoinMissing extends TelegramError { // } -export class ParticipantVersionOutdated extends ErrorWithCall { +export class ParticipantVersionOutdated extends TelegramError { // } -export class PasswordEmpty extends ErrorWithCall { +export class PasswordEmpty extends TelegramError { // } -export class PasswordHashInvalid extends ErrorWithCall { +export class PasswordHashInvalid extends TelegramError { // } -export class PasswordMissing extends ErrorWithCall { +export class PasswordMissing extends TelegramError { // } -export class PasswordRecoveryExpired extends ErrorWithCall { +export class PasswordRecoveryExpired extends TelegramError { // } -export class PasswordRecoveryNa extends ErrorWithCall { +export class PasswordRecoveryNa extends TelegramError { // } -export class PasswordRequired extends ErrorWithCall { +export class PasswordRequired extends TelegramError { // } -export class PaymentProviderInvalid extends ErrorWithCall { +export class PaymentProviderInvalid extends TelegramError { // } -export class PeerFlood extends ErrorWithCall { +export class PeerFlood extends TelegramError { // } -export class PeerHistoryEmpty extends ErrorWithCall { +export class PeerHistoryEmpty extends TelegramError { // } -export class PeerIdInvalid extends ErrorWithCall { +export class PeerIdInvalid extends TelegramError { // } -export class PeerIdNotSupported extends ErrorWithCall { +export class PeerIdNotSupported extends TelegramError { // } -export class PersistentTimestampEmpty extends ErrorWithCall { +export class PersistentTimestampEmpty extends TelegramError { // } -export class PersistentTimestampInvalid extends ErrorWithCall { +export class PersistentTimestampInvalid extends TelegramError { // } -export class PersistentTimestampOutdated extends ErrorWithCall { +export class PersistentTimestampOutdated extends TelegramError { // } -export class PhoneCodeEmpty extends ErrorWithCall { +export class PhoneCodeEmpty extends TelegramError { // } -export class PhoneCodeExpired extends ErrorWithCall { +export class PhoneCodeExpired extends TelegramError { // } -export class PhoneCodeHashEmpty extends ErrorWithCall { +export class PhoneCodeHashEmpty extends TelegramError { // } -export class PhoneCodeInvalid extends ErrorWithCall { +export class PhoneCodeInvalid extends TelegramError { // } -export class PhoneHashExpired extends ErrorWithCall { +export class PhoneHashExpired extends TelegramError { // } -export class PhoneNotOccupied extends ErrorWithCall { +export class PhoneNotOccupied extends TelegramError { // } -export class PhoneNumberAppSignupForbidden extends ErrorWithCall { +export class PhoneNumberAppSignupForbidden extends TelegramError { // } -export class PhoneNumberBanned extends ErrorWithCall { +export class PhoneNumberBanned extends TelegramError { // } -export class PhoneNumberFlood extends ErrorWithCall { +export class PhoneNumberFlood extends TelegramError { // } -export class PhoneNumberInvalid extends ErrorWithCall { +export class PhoneNumberInvalid extends TelegramError { // } -export class PhoneNumberOccupied extends ErrorWithCall { +export class PhoneNumberOccupied extends TelegramError { // } -export class PhoneNumberUnoccupied extends ErrorWithCall { +export class PhoneNumberUnoccupied extends TelegramError { // } -export class PhonePasswordFlood extends ErrorWithCall { +export class PhonePasswordFlood extends TelegramError { // } -export class PhonePasswordProtected extends ErrorWithCall { +export class PhonePasswordProtected extends TelegramError { // } -export class PhotoContentTypeInvalid extends ErrorWithCall { +export class PhotoContentTypeInvalid extends TelegramError { // } -export class PhotoContentUrlEmpty extends ErrorWithCall { +export class PhotoContentUrlEmpty extends TelegramError { // } -export class PhotoCropFileMissing extends ErrorWithCall { +export class PhotoCropFileMissing extends TelegramError { // } -export class PhotoCropSizeSmall extends ErrorWithCall { +export class PhotoCropSizeSmall extends TelegramError { // } -export class PhotoExtInvalid extends ErrorWithCall { +export class PhotoExtInvalid extends TelegramError { // } -export class PhotoFileMissing extends ErrorWithCall { +export class PhotoFileMissing extends TelegramError { // } -export class PhotoIdInvalid extends ErrorWithCall { +export class PhotoIdInvalid extends TelegramError { // } -export class PhotoInvalid extends ErrorWithCall { +export class PhotoInvalid extends TelegramError { // } -export class PhotoInvalidDimensions extends ErrorWithCall { +export class PhotoInvalidDimensions extends TelegramError { // } -export class PhotoSaveFileInvalid extends ErrorWithCall { +export class PhotoSaveFileInvalid extends TelegramError { // } -export class PhotoThumbUrlEmpty extends ErrorWithCall { +export class PhotoThumbUrlEmpty extends TelegramError { // } -export class PinnedDialogsTooMuch extends ErrorWithCall { +export class PinnedDialogsTooMuch extends TelegramError { // } -export class PinRestricted extends ErrorWithCall { +export class PinRestricted extends TelegramError { // } -export class PollAnswersInvalid extends ErrorWithCall { +export class PollAnswersInvalid extends TelegramError { // } -export class PollAnswerInvalid extends ErrorWithCall { +export class PollAnswerInvalid extends TelegramError { // } -export class PollOptionDuplicate extends ErrorWithCall { +export class PollOptionDuplicate extends TelegramError { // } -export class PollOptionInvalid extends ErrorWithCall { +export class PollOptionInvalid extends TelegramError { // } -export class PollQuestionInvalid extends ErrorWithCall { +export class PollQuestionInvalid extends TelegramError { // } -export class PollUnsupported extends ErrorWithCall { +export class PollUnsupported extends TelegramError { // } -export class PollVoteRequired extends ErrorWithCall { +export class PollVoteRequired extends TelegramError { // } -export class PostponedTimeout extends ErrorWithCall { +export class PostponedTimeout extends TelegramError { // } -export class PremiumAccountRequired extends ErrorWithCall { +export class PremiumAccountRequired extends TelegramError { // } -export class PremiumCurrentlyUnavailable extends ErrorWithCall { +export class PremiumCurrentlyUnavailable extends TelegramError { // } -export class PreviousChatImportActiveWaitXmin extends ErrorWithCall { +export class PreviousChatImportActiveWaitXmin extends TelegramError { // } -export class PrivacyKeyInvalid extends ErrorWithCall { +export class PrivacyKeyInvalid extends TelegramError { // } -export class PrivacyTooLong extends ErrorWithCall { +export class PrivacyTooLong extends TelegramError { // } -export class PrivacyValueInvalid extends ErrorWithCall { +export class PrivacyValueInvalid extends TelegramError { // } -export class PtsChangeEmpty extends ErrorWithCall { +export class PtsChangeEmpty extends TelegramError { // } -export class PublicChannelMissing extends ErrorWithCall { +export class PublicChannelMissing extends TelegramError { // } -export class PublicKeyRequired extends ErrorWithCall { +export class PublicKeyRequired extends TelegramError { // } -export class QueryIdEmpty extends ErrorWithCall { +export class QueryIdEmpty extends TelegramError { // } -export class QueryIdInvalid extends ErrorWithCall { +export class QueryIdInvalid extends TelegramError { // } -export class QueryTooShort extends ErrorWithCall { +export class QueryTooShort extends TelegramError { // } -export class QuizAnswerMissing extends ErrorWithCall { +export class QuizAnswerMissing extends TelegramError { // } -export class QuizCorrectAnswersEmpty extends ErrorWithCall { +export class QuizCorrectAnswersEmpty extends TelegramError { // } -export class QuizCorrectAnswersTooMuch extends ErrorWithCall { +export class QuizCorrectAnswersTooMuch extends TelegramError { // } -export class QuizCorrectAnswerInvalid extends ErrorWithCall { +export class QuizCorrectAnswerInvalid extends TelegramError { // } -export class QuizMultipleInvalid extends ErrorWithCall { +export class QuizMultipleInvalid extends TelegramError { // } -export class RandomIdDuplicate extends ErrorWithCall { +export class RandomIdDuplicate extends TelegramError { // } -export class RandomIdEmpty extends ErrorWithCall { +export class RandomIdEmpty extends TelegramError { // } -export class RandomIdInvalid extends ErrorWithCall { +export class RandomIdInvalid extends TelegramError { // } -export class RandomLengthInvalid extends ErrorWithCall { +export class RandomLengthInvalid extends TelegramError { // } -export class RangesInvalid extends ErrorWithCall { +export class RangesInvalid extends TelegramError { // } -export class ReactionsTooMany extends ErrorWithCall { +export class ReactionsTooMany extends TelegramError { // } -export class ReactionEmpty extends ErrorWithCall { +export class ReactionEmpty extends TelegramError { // } -export class ReactionInvalid extends ErrorWithCall { +export class ReactionInvalid extends TelegramError { // } -export class ReflectorNotAvailable extends ErrorWithCall { +export class ReflectorNotAvailable extends TelegramError { // } -export class RegIdGenerateFailed extends ErrorWithCall { +export class RegIdGenerateFailed extends TelegramError { // } -export class ReplyMarkupBuyEmpty extends ErrorWithCall { +export class ReplyMarkupBuyEmpty extends TelegramError { // } -export class ReplyMarkupGameEmpty extends ErrorWithCall { +export class ReplyMarkupGameEmpty extends TelegramError { // } -export class ReplyMarkupInvalid extends ErrorWithCall { +export class ReplyMarkupInvalid extends TelegramError { // } -export class ReplyMarkupTooLong extends ErrorWithCall { +export class ReplyMarkupTooLong extends TelegramError { // } -export class ResetRequestMissing extends ErrorWithCall { +export class ResetRequestMissing extends TelegramError { // } -export class ResultsTooMuch extends ErrorWithCall { +export class ResultsTooMuch extends TelegramError { // } -export class ResultIdDuplicate extends ErrorWithCall { +export class ResultIdDuplicate extends TelegramError { // } -export class ResultIdEmpty extends ErrorWithCall { +export class ResultIdEmpty extends TelegramError { // } -export class ResultIdInvalid extends ErrorWithCall { +export class ResultIdInvalid extends TelegramError { // } -export class ResultTypeInvalid extends ErrorWithCall { +export class ResultTypeInvalid extends TelegramError { // } -export class RevoteNotAllowed extends ErrorWithCall { +export class RevoteNotAllowed extends TelegramError { // } -export class RightsNotModified extends ErrorWithCall { +export class RightsNotModified extends TelegramError { // } -export class RightForbidden extends ErrorWithCall { +export class RightForbidden extends TelegramError { // } -export class RpcCallFail extends ErrorWithCall { +export class RpcCallFail extends TelegramError { // } -export class RpcMcgetFail extends ErrorWithCall { +export class RpcMcgetFail extends TelegramError { // } -export class RsaDecryptFailed extends ErrorWithCall { +export class RsaDecryptFailed extends TelegramError { // } -export class ScheduleBotNotAllowed extends ErrorWithCall { +export class ScheduleBotNotAllowed extends TelegramError { // } -export class ScheduleDateInvalid extends ErrorWithCall { +export class ScheduleDateInvalid extends TelegramError { // } -export class ScheduleDateTooLate extends ErrorWithCall { +export class ScheduleDateTooLate extends TelegramError { // } -export class ScheduleStatusPrivate extends ErrorWithCall { +export class ScheduleStatusPrivate extends TelegramError { // } -export class ScheduleTooMuch extends ErrorWithCall { +export class ScheduleTooMuch extends TelegramError { // } -export class ScoreInvalid extends ErrorWithCall { +export class ScoreInvalid extends TelegramError { // } -export class SearchQueryEmpty extends ErrorWithCall { +export class SearchQueryEmpty extends TelegramError { // } -export class SearchWithLinkNotSupported extends ErrorWithCall { +export class SearchWithLinkNotSupported extends TelegramError { // } -export class SecondsInvalid extends ErrorWithCall { +export class SecondsInvalid extends TelegramError { // } -export class SendAsPeerInvalid extends ErrorWithCall { +export class SendAsPeerInvalid extends TelegramError { // } -export class SendCodeUnavailable extends ErrorWithCall { +export class SendCodeUnavailable extends TelegramError { // } -export class SendMessageMediaInvalid extends ErrorWithCall { +export class SendMessageMediaInvalid extends TelegramError { // } -export class SendMessageTypeInvalid extends ErrorWithCall { +export class SendMessageTypeInvalid extends TelegramError { // } -export class SensitiveChangeForbidden extends ErrorWithCall { +export class SensitiveChangeForbidden extends TelegramError { // } -export class SessionExpired extends ErrorWithCall { +export class SessionExpired extends TelegramError { // } -export class SessionPasswordNeeded extends ErrorWithCall { +export class SessionPasswordNeeded extends TelegramError { // } -export class SessionRevoked extends ErrorWithCall { +export class SessionRevoked extends TelegramError { // } -export class SettingsInvalid extends ErrorWithCall { +export class SettingsInvalid extends TelegramError { // } -export class Sha256HashInvalid extends ErrorWithCall { +export class Sha256HashInvalid extends TelegramError { // } -export class ShortnameOccupyFailed extends ErrorWithCall { +export class ShortnameOccupyFailed extends TelegramError { // } -export class ShortNameInvalid extends ErrorWithCall { +export class ShortNameInvalid extends TelegramError { // } -export class ShortNameOccupied extends ErrorWithCall { +export class ShortNameOccupied extends TelegramError { // } -export class SignInFailed extends ErrorWithCall { +export class SignInFailed extends TelegramError { // } -export class SlowmodeMultiMsgsDisabled extends ErrorWithCall { +export class SlowmodeMultiMsgsDisabled extends TelegramError { // } -export class SmsCodeCreateFailed extends ErrorWithCall { +export class SmsCodeCreateFailed extends TelegramError { // } -export class SrpIdInvalid extends ErrorWithCall { +export class SrpIdInvalid extends TelegramError { // } -export class SrpPasswordChanged extends ErrorWithCall { +export class SrpPasswordChanged extends TelegramError { // } -export class StartParamEmpty extends ErrorWithCall { +export class StartParamEmpty extends TelegramError { // } -export class StartParamInvalid extends ErrorWithCall { +export class StartParamInvalid extends TelegramError { // } -export class StartParamTooLong extends ErrorWithCall { +export class StartParamTooLong extends TelegramError { // } -export class StickerpackStickersTooMuch extends ErrorWithCall { +export class StickerpackStickersTooMuch extends TelegramError { // } -export class StickersetInvalid extends ErrorWithCall { +export class StickersetInvalid extends TelegramError { // } -export class StickersetOwnerAnonymous extends ErrorWithCall { +export class StickersetOwnerAnonymous extends TelegramError { // } -export class StickersEmpty extends ErrorWithCall { +export class StickersEmpty extends TelegramError { // } -export class StickersTooMuch extends ErrorWithCall { +export class StickersTooMuch extends TelegramError { // } -export class StickerDocumentInvalid extends ErrorWithCall { +export class StickerDocumentInvalid extends TelegramError { // } -export class StickerEmojiInvalid extends ErrorWithCall { +export class StickerEmojiInvalid extends TelegramError { // } -export class StickerFileInvalid extends ErrorWithCall { +export class StickerFileInvalid extends TelegramError { // } -export class StickerGifDimensions extends ErrorWithCall { +export class StickerGifDimensions extends TelegramError { // } -export class StickerIdInvalid extends ErrorWithCall { +export class StickerIdInvalid extends TelegramError { // } -export class StickerInvalid extends ErrorWithCall { +export class StickerInvalid extends TelegramError { // } -export class StickerMimeInvalid extends ErrorWithCall { +export class StickerMimeInvalid extends TelegramError { // } -export class StickerPngDimensions extends ErrorWithCall { +export class StickerPngDimensions extends TelegramError { // } -export class StickerPngNopng extends ErrorWithCall { +export class StickerPngNopng extends TelegramError { // } -export class StickerTgsNodoc extends ErrorWithCall { +export class StickerTgsNodoc extends TelegramError { // } -export class StickerTgsNotgs extends ErrorWithCall { +export class StickerTgsNotgs extends TelegramError { // } -export class StickerThumbPngNopng extends ErrorWithCall { +export class StickerThumbPngNopng extends TelegramError { // } -export class StickerThumbTgsNotgs extends ErrorWithCall { +export class StickerThumbTgsNotgs extends TelegramError { // } -export class StickerVideoBig extends ErrorWithCall { +export class StickerVideoBig extends TelegramError { // } -export class StickerVideoNodoc extends ErrorWithCall { +export class StickerVideoNodoc extends TelegramError { // } -export class StickerVideoNowebm extends ErrorWithCall { +export class StickerVideoNowebm extends TelegramError { // } -export class StorageCheckFailed extends ErrorWithCall { +export class StorageCheckFailed extends TelegramError { // } -export class StoreInvalidScalarType extends ErrorWithCall { +export class StoreInvalidScalarType extends TelegramError { // } -export class SwitchPmTextEmpty extends ErrorWithCall { +export class SwitchPmTextEmpty extends TelegramError { // } -export class TakeoutInvalid extends ErrorWithCall { +export class TakeoutInvalid extends TelegramError { // } -export class TakeoutRequired extends ErrorWithCall { +export class TakeoutRequired extends TelegramError { // } -export class TempAuthKeyAlreadyBound extends ErrorWithCall { +export class TempAuthKeyAlreadyBound extends TelegramError { // } -export class TempAuthKeyEmpty extends ErrorWithCall { +export class TempAuthKeyEmpty extends TelegramError { // } -export class ThemeFileInvalid extends ErrorWithCall { +export class ThemeFileInvalid extends TelegramError { // } -export class ThemeFormatInvalid extends ErrorWithCall { +export class ThemeFormatInvalid extends TelegramError { // } -export class ThemeInvalid extends ErrorWithCall { +export class ThemeInvalid extends TelegramError { // } -export class ThemeMimeInvalid extends ErrorWithCall { +export class ThemeMimeInvalid extends TelegramError { // } -export class ThemeTitleInvalid extends ErrorWithCall { +export class ThemeTitleInvalid extends TelegramError { // } -export class Timeout extends ErrorWithCall { +export class Timeout extends TelegramError { // } -export class TitleInvalid extends ErrorWithCall { +export class TitleInvalid extends TelegramError { // } -export class TmpPasswordDisabled extends ErrorWithCall { +export class TmpPasswordDisabled extends TelegramError { // } -export class TmpPasswordInvalid extends ErrorWithCall { +export class TmpPasswordInvalid extends TelegramError { // } -export class TokenInvalid extends ErrorWithCall { +export class TokenInvalid extends TelegramError { // } -export class TopicDeleted extends ErrorWithCall { +export class TopicDeleted extends TelegramError { // } -export class ToLangInvalid extends ErrorWithCall { +export class ToLangInvalid extends TelegramError { // } -export class TtlDaysInvalid extends ErrorWithCall { +export class TtlDaysInvalid extends TelegramError { // } -export class TtlMediaInvalid extends ErrorWithCall { +export class TtlMediaInvalid extends TelegramError { // } -export class TtlPeriodInvalid extends ErrorWithCall { +export class TtlPeriodInvalid extends TelegramError { // } -export class TypesEmpty extends ErrorWithCall { +export class TypesEmpty extends TelegramError { // } -export class TypeConstructorInvalid extends ErrorWithCall { +export class TypeConstructorInvalid extends TelegramError { // } -export class Timedout extends ErrorWithCall { +export class Timedout extends TelegramError { // } -export class UnknownError extends ErrorWithCall { +export class UnknownError extends TelegramError { // } -export class UnknownMethod extends ErrorWithCall { +export class UnknownMethod extends TelegramError { // } -export class UntilDateInvalid extends ErrorWithCall { +export class UntilDateInvalid extends TelegramError { // } -export class UpdateAppToLogin extends ErrorWithCall { +export class UpdateAppToLogin extends TelegramError { // } -export class UrlInvalid extends ErrorWithCall { +export class UrlInvalid extends TelegramError { // } -export class UsageLimitInvalid extends ErrorWithCall { +export class UsageLimitInvalid extends TelegramError { // } -export class UsernameInvalid extends ErrorWithCall { +export class UsernameInvalid extends TelegramError { // } -export class UsernameNotModified extends ErrorWithCall { +export class UsernameNotModified extends TelegramError { // } -export class UsernameNotOccupied extends ErrorWithCall { +export class UsernameNotOccupied extends TelegramError { // } -export class UsernameOccupied extends ErrorWithCall { +export class UsernameOccupied extends TelegramError { // } -export class UsernamePurchaseAvailable extends ErrorWithCall { +export class UsernamePurchaseAvailable extends TelegramError { // } -export class UserpicPrivacyRequired extends ErrorWithCall { +export class UserpicPrivacyRequired extends TelegramError { // } -export class UserpicUploadRequired extends ErrorWithCall { +export class UserpicUploadRequired extends TelegramError { // } -export class UsersTooFew extends ErrorWithCall { +export class UsersTooFew extends TelegramError { // } -export class UsersTooMuch extends ErrorWithCall { +export class UsersTooMuch extends TelegramError { // } -export class UserAdminInvalid extends ErrorWithCall { +export class UserAdminInvalid extends TelegramError { // } -export class UserAlreadyInvited extends ErrorWithCall { +export class UserAlreadyInvited extends TelegramError { // } -export class UserAlreadyParticipant extends ErrorWithCall { +export class UserAlreadyParticipant extends TelegramError { // } -export class UserBannedInChannel extends ErrorWithCall { +export class UserBannedInChannel extends TelegramError { // } -export class UserBlocked extends ErrorWithCall { +export class UserBlocked extends TelegramError { // } -export class UserBot extends ErrorWithCall { +export class UserBot extends TelegramError { // } -export class UserBotInvalid extends ErrorWithCall { +export class UserBotInvalid extends TelegramError { // } -export class UserBotRequired extends ErrorWithCall { +export class UserBotRequired extends TelegramError { // } -export class UserChannelsTooMuch extends ErrorWithCall { +export class UserChannelsTooMuch extends TelegramError { // } -export class UserCreator extends ErrorWithCall { +export class UserCreator extends TelegramError { // } -export class UserDeactivated extends ErrorWithCall { +export class UserDeactivated extends TelegramError { // } -export class UserDeactivatedBan extends ErrorWithCall { +export class UserDeactivatedBan extends TelegramError { // } -export class UserDeleted extends ErrorWithCall { +export class UserDeleted extends TelegramError { // } -export class UserIdInvalid extends ErrorWithCall { +export class UserIdInvalid extends TelegramError { // } -export class UserInvalid extends ErrorWithCall { +export class UserInvalid extends TelegramError { // } -export class UserIsBlocked extends ErrorWithCall { +export class UserIsBlocked extends TelegramError { // } -export class UserIsBot extends ErrorWithCall { +export class UserIsBot extends TelegramError { // } -export class UserKicked extends ErrorWithCall { +export class UserKicked extends TelegramError { // } -export class UserNotMutualContact extends ErrorWithCall { +export class UserNotMutualContact extends TelegramError { // } -export class UserNotParticipant extends ErrorWithCall { +export class UserNotParticipant extends TelegramError { // } -export class UserPrivacyRestricted extends ErrorWithCall { +export class UserPrivacyRestricted extends TelegramError { // } -export class UserRestricted extends ErrorWithCall { +export class UserRestricted extends TelegramError { // } -export class UserVolumeInvalid extends ErrorWithCall { +export class UserVolumeInvalid extends TelegramError { // } -export class VideoContentTypeInvalid extends ErrorWithCall { +export class VideoContentTypeInvalid extends TelegramError { // } -export class VideoFileInvalid extends ErrorWithCall { +export class VideoFileInvalid extends TelegramError { // } -export class VideoTitleEmpty extends ErrorWithCall { +export class VideoTitleEmpty extends TelegramError { // } -export class VoiceMessagesForbidden extends ErrorWithCall { +export class VoiceMessagesForbidden extends TelegramError { // } -export class WallpaperFileInvalid extends ErrorWithCall { +export class WallpaperFileInvalid extends TelegramError { // } -export class WallpaperInvalid extends ErrorWithCall { +export class WallpaperInvalid extends TelegramError { // } -export class WallpaperMimeInvalid extends ErrorWithCall { +export class WallpaperMimeInvalid extends TelegramError { // } -export class WcConvertUrlInvalid extends ErrorWithCall { +export class WcConvertUrlInvalid extends TelegramError { // } -export class WebdocumentInvalid extends ErrorWithCall { +export class WebdocumentInvalid extends TelegramError { // } -export class WebdocumentMimeInvalid extends ErrorWithCall { +export class WebdocumentMimeInvalid extends TelegramError { // } -export class WebdocumentSizeTooBig extends ErrorWithCall { +export class WebdocumentSizeTooBig extends TelegramError { // } -export class WebdocumentUrlInvalid extends ErrorWithCall { +export class WebdocumentUrlInvalid extends TelegramError { // } -export class WebpageCurlFailed extends ErrorWithCall { +export class WebpageCurlFailed extends TelegramError { // } -export class WebpageMediaEmpty extends ErrorWithCall { +export class WebpageMediaEmpty extends TelegramError { // } -export class WebpushAuthInvalid extends ErrorWithCall { +export class WebpushAuthInvalid extends TelegramError { // } -export class WebpushKeyInvalid extends ErrorWithCall { +export class WebpushKeyInvalid extends TelegramError { // } -export class WebpushTokenInvalid extends ErrorWithCall { +export class WebpushTokenInvalid extends TelegramError { // } -export class WorkerBusyTooLongRetry extends ErrorWithCall { +export class WorkerBusyTooLongRetry extends TelegramError { // } -export class YouBlockedUser extends ErrorWithCall { +export class YouBlockedUser extends TelegramError { // } diff --git a/4_errors.ts b/4_errors.ts index 6e8378eb..dd937467 100644 --- a/4_errors.ts +++ b/4_errors.ts @@ -19,15 +19,15 @@ */ import { unreachable } from "./0_deps.ts"; -import { ErrorWithCall, ErrorWithCallParams, map } from "./3_errors.ts"; -import { TLObject, types } from "./2_tl.ts"; +import { map, TelegramError, TelegramErrorParams } from "./3_errors.ts"; +import { Api } from "./2_tl.ts"; export * from "./3_errors.ts"; -export class FloodWait extends ErrorWithCall { +export class FloodWait extends TelegramError { seconds: number; - constructor(params: ErrorWithCallParams) { + constructor(params: TelegramErrorParams) { super(params); const p = params.error_message.split("_"); this.seconds = Number(p[p.length - 1]); @@ -37,10 +37,10 @@ export class FloodWait extends ErrorWithCall { } } -export class Migrate extends ErrorWithCall { +export class Migrate extends TelegramError { dc: number; - constructor(params: ErrorWithCallParams) { + constructor(params: TelegramErrorParams) { super(params); const p = params.error_message.split("_"); this.dc = Number(p[p.length - 1]); @@ -74,7 +74,7 @@ const prefixMap = { "FLOOD_WAIT_": FloodWait, }; -export function upgradeInstance(error: types.Rpc_error, call: TLObject): types.Rpc_error { +export function constructTelegramError(error: Api.rpc_error, call: Api.AnyObject): TelegramError { for (const [k, v] of Object.entries(prefixMap)) { if (error.error_message.startsWith(k)) { return new v({ ...error, call }); @@ -83,5 +83,5 @@ export function upgradeInstance(error: types.Rpc_error, call: TLObject): types.R if (error.error_message in map) { return new map[error.error_message as keyof typeof map]({ ...error, call }); } - return error; + return new TelegramError({ ...error, call }); } diff --git a/client/0_message.ts b/client/0_message.ts index fe4b4448..fa57d477 100644 --- a/client/0_message.ts +++ b/client/0_message.ts @@ -20,7 +20,7 @@ import { assertEquals, concat, ige256Decrypt, ige256Encrypt } from "../0_deps.ts"; import { bufferFromBigInt, mod, sha256, toUnixTimestamp } from "../1_utilities.ts"; -import { id, Message_, MessageContainer, RPCResult, serialize, TLReader, TLWriter } from "../2_tl.ts"; +import { deserializeMessage, message, serializeMessage, TLReader, TLWriter } from "../2_tl.ts"; export function getMessageId(lastMsgId: bigint) { const now = toUnixTimestamp(new Date()) + 0; @@ -52,12 +52,12 @@ export function unpackUnencryptedMessage(buffer: Uint8Array) { return { messageId, message }; } -export async function encryptMessage(message: Message_ | MessageContainer, authKey: Uint8Array, authKeyId: bigint, salt: bigint, sessionId: bigint) { +export async function encryptMessage(message: message, authKey: Uint8Array, authKeyId: bigint, salt: bigint, sessionId: bigint) { const payloadWriter = new TLWriter(); payloadWriter.writeInt64(salt); payloadWriter.writeInt64(sessionId); - payloadWriter.write(message[serialize]()); + payloadWriter.write(serializeMessage(message)); payloadWriter.write(new Uint8Array(mod(-(payloadWriter.buffer.length + 12), 16) + 12)); const payload = payloadWriter.buffer; @@ -94,26 +94,10 @@ export async function decryptMessage(buffer: Uint8Array, authKey: Uint8Array, au const plaintext = ige256Decrypt(reader.buffer, aesKey, aesIv); assertEquals(plaintext.buffer.byteLength % 4, 0); - let plainReader = new TLReader(plaintext); + const plainReader = new TLReader(plaintext); const _salt = plainReader.readInt64(); const _sessionId_ = plainReader.readInt64(false); - const mid = plainReader.readInt64(); - const seqno = plainReader.readInt32(); - const length = plainReader.readInt32(); - plainReader = new TLReader(plainReader.read(length)); - - const cid = plainReader.readInt32(false); - - if (cid == MessageContainer[id]) { - const messages = MessageContainer.deserialize(plainReader.buffer); - return new MessageContainer(mid, seqno, messages); - } else if (cid == RPCResult[id]) { - const body = RPCResult.deserialize(plainReader.buffer); - return new Message_(mid, seqno, body); - } else { - const body = plainReader.readObject(cid); - return new Message_(mid, seqno, body); - } + return deserializeMessage(plainReader); } diff --git a/client/0_password.ts b/client/0_password.ts index 3e8e99d8..35485bd3 100644 --- a/client/0_password.ts +++ b/client/0_password.ts @@ -20,7 +20,7 @@ import { concat } from "../0_deps.ts"; import { bigIntFromBuffer, bufferFromBigInt, getRandomBigInt, mod, modExp, sha256 } from "../1_utilities.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; export function isSafePrime(primeBytes: Uint8Array, g: number) { // deno-fmt-ignore @@ -100,12 +100,11 @@ export function pad(bigint: number | bigint | Uint8Array) { } } -export async function checkPassword(password_: string, ap: enums.account.Password): Promise { +export async function checkPassword(password_: string, ap: Api.account_Password): Promise { const password = new TextEncoder().encode(password_); const algo = ap.current_algo; if ( - !(algo instanceof - types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) + !(is("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", algo)) ) { throw new Error("Unexpected algorithm"); } @@ -189,9 +188,5 @@ export async function checkPassword(password_: string, ap: enums.account.Passwor kA, ])); - return new types.InputCheckPasswordSRP({ - srp_id: srpId, - A: pad(gA), - M1: m1, - }); + return { _: "inputCheckPasswordSRP", srp_id: srpId, A: pad(gA), M1: m1 }; } diff --git a/client/0_storage_operations.ts b/client/0_storage_operations.ts index fb4027b2..3a04218e 100644 --- a/client/0_storage_operations.ts +++ b/client/0_storage_operations.ts @@ -21,7 +21,7 @@ import { AssertionError, unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { base64DecodeUrlSafe, base64EncodeUrlSafe, bigIntFromBuffer, MaybePromise, rleDecode, rleEncode, sha1, ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { AnyEntity, enums, peerToChatId, ReadObject, serialize, TLObject, TLReader, TLWriter, types } from "../2_tl.ts"; +import { AnyEntity, Api, as, is, isValidType, peerToChatId, ReadObject, serialize, TLReader, TLWriter } from "../2_tl.ts"; import { DC } from "../3_transport.ts"; import { Storage, StorageKeyPart } from "../2_storage.ts"; @@ -200,7 +200,7 @@ export class StorageOperations { async getChannelAccessHash(id: number): Promise { const channel = await this.getEntity(id); if (channel) { - if (!(channel instanceof types.Channel) && !(channel instanceof types.ChannelForbidden)) { + if (!(is("channel", channel)) && !is("channelForbidden", channel)) { unreachable(); } return typeof channel.access_hash === "bigint" ? channel.access_hash : null; @@ -212,7 +212,7 @@ export class StorageOperations { async getUserAccessHash(id: number): Promise { const user = await this.getEntity(id); if (user) { - if (!(user instanceof types.User)) { + if (!is("user", user)) { unreachable(); } return typeof user.access_hash === "bigint" ? user.access_hash : null; @@ -233,16 +233,17 @@ export class StorageOperations { return await this.#storage.get<[number, Date]>(K.cache.username(username)); } - async setTlObject(key: readonly StorageKeyPart[], value: TLObject | null) { + async setTlObject(key: readonly StorageKeyPart[], value: Api.AnyType | null) { if (value == null) { await this.#storage.set(key, null); } else { - await this.#storage.set(key, this.#mustSerialize ? rleEncode(value[serialize]()) : value); + await this.#storage.set(key, this.#mustSerialize ? serialize(value) : (value as unknown)); } } - async getTlObject(keyOrBuffer: TLObject | Uint8Array | readonly StorageKeyPart[]): Promise { - const buffer = (keyOrBuffer instanceof Uint8Array || keyOrBuffer instanceof TLObject) ? keyOrBuffer : await this.#storage.get(keyOrBuffer); + async getTlObject(keyOrBuffer: Api.AnyType | Uint8Array | readonly StorageKeyPart[]): Promise { + // @ts-ignore: TBD + const buffer = (keyOrBuffer instanceof Uint8Array || isValidType(keyOrBuffer)) ? keyOrBuffer : await this.#storage.get(keyOrBuffer); if (buffer != null) { if (buffer instanceof Uint8Array) { return new TLReader(rleDecode(buffer)).readObject(); @@ -254,15 +255,15 @@ export class StorageOperations { } } - async setState(state: enums.updates.State) { + async setState(state: Api.updates_State) { await this.setTlObject(K.updates.state(), state); } - async getState(): Promise { - return await this.getTlObject(K.updates.state()) as enums.updates.State | null; + async getState(): Promise { + return await this.getTlObject(K.updates.state()) as Api.updates_State | null; } - async setMessage(chatId: number, messageId: number, message: enums.Message | null) { + async setMessage(chatId: number, messageId: number, message: Api.Message | null) { if (chatId > ZERO_CHANNEL_ID) { await this.#storage.set(K.messages.messageRef(messageId), message == null ? null : chatId); } @@ -281,13 +282,13 @@ export class StorageOperations { return this.#storage.get(K.messages.messageRef(messageId)); } - async getMessage(chatId: number, messageId: number): Promise { - return await this.getTlObject(K.messages.message(chatId, messageId)) as enums.Message | null; + async getMessage(chatId: number, messageId: number): Promise { + return await this.getTlObject(K.messages.message(chatId, messageId)) as Api.Message | null; } - async getLastMessage(chatId: number): Promise { + async getLastMessage(chatId: number): Promise { for await (const [_, buffer] of await this.#storage.getMany({ prefix: K.messages.messages(chatId) }, { limit: 1, reverse: true })) { - return await this.getTlObject(buffer) as enums.Message; + return await this.getTlObject(buffer) as Api.Message; } return null; } @@ -301,7 +302,7 @@ export class StorageOperations { } async setEntity(entity: AnyEntity) { - await this.#storage.set(K.cache.peer(peerToChatId(entity)), [this.#mustSerialize ? rleEncode(entity[serialize]()) : entity, new Date()]); + await this.#storage.set(K.cache.peer(peerToChatId(entity)), [this.#mustSerialize ? rleEncode(serialize(entity)) : entity, new Date()]); } async getEntity(key: number): Promise { @@ -405,14 +406,14 @@ export class StorageOperations { return await this.#storage.get(K.chatlists.pinnedChats(listId)); } - async getHistory(chatId: number, offsetId: number, limit: number): Promise { + async getHistory(chatId: number, offsetId: number, limit: number): Promise { if (offsetId == 0) { offsetId = Infinity; } ++limit; - const messages = new Array(); + const messages = new Array(); for await (const [_, buffer] of await this.#storage.getMany({ start: K.messages.message(chatId, 0), end: K.messages.message(chatId, offsetId) }, { limit, reverse: true })) { - const message = await this.getTlObject(buffer) as enums.Message; + const message = await this.getTlObject(buffer) as Api.Message; if ("id" in message && message.id == offsetId) { continue; } @@ -455,74 +456,74 @@ export class StorageOperations { await this.#storage.set(K.cache.file(id), [partCount, chunkSize]); } - async setCustomEmojiDocument(id: bigint, document: types.Document) { - await this.#storage.set(K.cache.customEmojiDocument(id), [this.#mustSerialize ? rleEncode(document[serialize]()) : document, new Date()]); + async setCustomEmojiDocument(id: bigint, document: Api.document) { + await this.#storage.set(K.cache.customEmojiDocument(id), [this.#mustSerialize ? rleEncode(serialize(document)) : document, new Date()]); } - async getCustomEmojiDocument(id: bigint): Promise<[types.Document, Date] | null> { + async getCustomEmojiDocument(id: bigint): Promise<[Api.document, Date] | null> { const v = await this.#storage.get<[Uint8Array, Date]>(K.cache.customEmojiDocument(id)); if (v != null) { - return [await this.getTlObject(v[0]), v[1]] as [types.Document, Date]; + return [await this.getTlObject(v[0]), v[1]] as [Api.document, Date]; } else { return null; } } - async setBusinessConnection(id: string, connection: types.BotBusinessConnection | null) { - await this.#storage.set(K.cache.businessConnection(id), connection == null ? null : this.#mustSerialize ? rleEncode(connection[serialize]()) : connection); + async setBusinessConnection(id: string, connection: Api.botBusinessConnection | null) { + await this.#storage.set(K.cache.businessConnection(id), connection == null ? null : this.#mustSerialize ? rleEncode(serialize(connection)) : connection); } - async getBusinessConnection(id: string): Promise { + async getBusinessConnection(id: string): Promise { const v = await this.#storage.get(K.cache.businessConnection(id)); if (v != null) { - return await this.getTlObject(v) as types.BotBusinessConnection; + return await this.getTlObject(v) as Api.botBusinessConnection; } else { return null; } } - async setInlineQueryAnswer(userId: number, chatId: number, query: string, offset: string, results: types.messages.BotResults, date: Date) { - await this.#storage.set(K.cache.inlineQueryAnswer(userId, chatId, query, offset), [this.#mustSerialize ? rleEncode(results[serialize]()) : results, date]); + async setInlineQueryAnswer(userId: number, chatId: number, query: string, offset: string, results: Api.messages_botResults, date: Date) { + await this.#storage.set(K.cache.inlineQueryAnswer(userId, chatId, query, offset), [this.#mustSerialize ? rleEncode(serialize(results)) : results, date]); } - async getInlineQueryAnswer(userId: number, chatId: number, query: string, offset: string): Promise<[types.messages.BotResults, Date] | null> { + async getInlineQueryAnswer(userId: number, chatId: number, query: string, offset: string): Promise<[Api.messages_botResults, Date] | null> { const peer_ = await this.#storage.get<[Uint8Array, Date]>(K.cache.inlineQueryAnswer(userId, chatId, query, offset)); if (peer_ != null) { const [obj_, date] = peer_; - return [await this.getTlObject(obj_) as types.messages.BotResults, date]; + return [as("messages.botResults", await this.getTlObject(obj_)), date]; } else { return null; } } - async setCallbackQueryAnswer(chatId: number, messageId: number, question: string, answer: types.messages.BotCallbackAnswer) { - await this.#storage.set(K.cache.callbackQueryAnswer(chatId, messageId, question), [this.#mustSerialize ? rleEncode(answer[serialize]()) : answer, new Date()]); + async setCallbackQueryAnswer(chatId: number, messageId: number, question: string, answer: Api.messages_botCallbackAnswer) { + await this.#storage.set(K.cache.callbackQueryAnswer(chatId, messageId, question), [this.#mustSerialize ? rleEncode(serialize(answer)) : answer, new Date()]); } - async getCallbackQueryAnswer(chatId: number, messageId: number, question: string): Promise<[types.messages.BotCallbackAnswer, Date] | null> { + async getCallbackQueryAnswer(chatId: number, messageId: number, question: string): Promise<[Api.messages_botCallbackAnswer, Date] | null> { const peer_ = await this.#storage.get<[Uint8Array, Date]>(K.cache.callbackQueryAnswer(chatId, messageId, question)); if (peer_ != null) { const [obj_, date] = peer_; - return [await this.getTlObject(obj_) as types.messages.BotCallbackAnswer, date]; + return [as("messages.botCallbackAnswer", await this.getTlObject(obj_)), date]; } else { return null; } } - async setFullChat(chatId: number, fullChat: types.UserFull | types.ChannelFull | types.ChatFull | null) { + async setFullChat(chatId: number, fullChat: Api.userFull | Api.channelFull | Api.chatFull | null) { await this.setTlObject(K.cache.fullChat(chatId), fullChat); } - async getFullChat(chatId: number): Promise { - return await this.getTlObject(K.cache.fullChat(chatId)) as types.UserFull | types.ChannelFull | types.ChatFull | null; + async getFullChat(chatId: number): Promise { + return await this.getTlObject(K.cache.fullChat(chatId)) as Api.userFull | Api.channelFull | Api.chatFull | null; } - async setGroupCall(id: bigint, groupCall: types.GroupCall | null) { + async setGroupCall(id: bigint, groupCall: Api.groupCall | null) { await this.setTlObject(K.cache.groupCall(id), groupCall); } - async getGroupCall(id: bigint): Promise { - return await this.getTlObject(K.cache.groupCall(id)) as types.GroupCall | null; + async getGroupCall(id: bigint): Promise { + return await this.getTlObject(K.cache.groupCall(id)) as Api.groupCall | null; } async setGroupCallAccessHash(id: bigint, accessHash: bigint | null) { @@ -533,7 +534,7 @@ export class StorageOperations { return await this.#storage.get(K.cache.groupCallAccessHash(id)); } - #getUpdateId(update: enums.Update) { + #getUpdateId(update: Api.Update) { let id = BigInt(Date.now()) << 32n; if ("pts" in update && update.pts) { id |= BigInt(update.pts); @@ -542,7 +543,7 @@ export class StorageOperations { } return id; } - async setUpdate(boxId: bigint, update: enums.Update) { + async setUpdate(boxId: bigint, update: Api.Update) { await this.setTlObject(K.updates.update(boxId, this.#getUpdateId(update)), update); } @@ -554,9 +555,9 @@ export class StorageOperations { await Promise.all(maybePromises.filter((v) => v instanceof Promise)); } - async getFirstUpdate(boxId: bigint): Promise<[readonly StorageKeyPart[], enums.Update] | null> { + async getFirstUpdate(boxId: bigint): Promise<[readonly StorageKeyPart[], Api.Update] | null> { for await (const [key, update] of await this.#storage.getMany({ prefix: K.updates.updates(boxId) }, { limit: 1 })) { - return [key, await this.getTlObject(update).then((v) => v as enums.Update)]; + return [key, await this.getTlObject(update).then((v) => v as Api.Update)]; } return null; } diff --git a/client/0_utilities.ts b/client/0_utilities.ts index cc9cf84f..f4cb9bb7 100644 --- a/client/0_utilities.ts +++ b/client/0_utilities.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; -import { functions } from "../2_tl.ts"; +import { Api, isOneOf } from "../2_tl.ts"; export const resolve = () => Promise.resolve(); @@ -144,14 +144,17 @@ export function checkInlineQueryId(id: string) { } } +const MTPROTO_FUNCTIONS = [ + "ping", + "ping_delay_disconnect", + "req_pq_multi", + "rpc_drop_answer", + "get_future_salts", + "destroy_session", + "destroy_auth_key", + "req_DH_params", + "set_client_DH_params", +] as (keyof Api.Functions)[]; export function isMtprotoFunction(value: unknown) { - return value instanceof functions.ping || - value instanceof functions.ping_delay_disconnect || - value instanceof functions.req_pq_multi || - value instanceof functions.rpc_drop_answer || - value instanceof functions.get_future_salts || - value instanceof functions.destroy_session || - value instanceof functions.destroy_auth_key || - value instanceof functions.req_DH_params || - value instanceof functions.set_client_DH_params; + return isOneOf(MTPROTO_FUNCTIONS, value); } diff --git a/client/1_client_encrypted.ts b/client/1_client_encrypted.ts index 7890bf7f..aaeab22f 100644 --- a/client/1_client_encrypted.ts +++ b/client/1_client_encrypted.ts @@ -21,8 +21,8 @@ import { gunzip, unreachable } from "../0_deps.ts"; import { ConnectionError } from "../0_errors.ts"; import { bigIntFromBuffer, CacheMap, drop, getLogger, getRandomBigInt, Logger, sha1 } from "../1_utilities.ts"; -import { enums, functions, Message_, MessageContainer, name, ReadObject, RPCResult, TLError, TLObject, TLReader, types } from "../2_tl.ts"; -import { upgradeInstance } from "../4_errors.ts"; +import { Api, is, isOfEnum, message, ReadObject, TLError, TLReader } from "../2_tl.ts"; +import { constructTelegramError } from "../4_errors.ts"; import { ClientAbstract } from "./0_client_abstract.ts"; import { ClientAbstractParams } from "./0_client_abstract.ts"; import { decryptMessage, encryptMessage, getMessageId } from "./0_message.ts"; @@ -34,7 +34,7 @@ export type ErrorSource = "deserialization" | "decryption" | "unknown"; export interface Handlers { serverSaltReassigned?: (newServerSalt: bigint) => void; - updates?: (updates: enums.Updates | enums.Update, call: TLObject | null, callback?: () => void) => void; + updates?: (updates: Api.Updates | Api.Update, call: Api.AnyType | null, callback?: () => void) => void; result?: (result: ReadObject, callback: () => void) => void; error?: (err: unknown, source: ErrorSource) => void; } @@ -56,8 +56,8 @@ export class ClientEncrypted extends ClientAbstract { #sessionId = getRandomBigInt(8, true, false); #state = { serverSalt: 0n, seqNo: 0, messageId: 0n }; #toAcknowledge = new Set(); - #recentAcks = new CacheMap(20); - #promises = new Map void; reject?: (err: ReadObject | Error) => void; call: TLObject }>(); + #recentAcks = new CacheMap(20); + #promises = new Map void; reject?: (err: ReadObject | Error) => void; call: Api.AnyObject }>(); // loggers #L: Logger; @@ -111,7 +111,7 @@ export class ClientEncrypted extends ClientAbstract { return seqNo; } - async #sendMessage(message: Message_ | MessageContainer) { + async #sendMessage(message: message) { const payload = await encryptMessage( message, this.#authKey, @@ -124,31 +124,44 @@ export class ClientEncrypted extends ClientAbstract { this.#L.outBin(payload); } - async invoke | types.Type) = functions.Function>(function_: T): Promise ? T["__R"] : void>; - async invoke | types.Type) = functions.Function>(function_: T, noWait: true): Promise; - async invoke | types.Type) = functions.Function>(function_: T, noWait?: boolean): Promise; - async invoke | types.Type) = functions.Function>(function_: T, noWait?: boolean): Promise { + async invoke, P extends Api.Function, R extends unknown = Promise : never>>(function_: T, noWait?: boolean): Promise { const messageId = this.#nextMessageId(); - const message__ = new Message_(messageId, this.#nextSeqNo(true), function_); + let message_: message = { + _: "message", + msg_id: messageId, + seqno: this.#nextSeqNo(true), + body: function_, + }; + const message__ = message_; - let message_: Message_ | MessageContainer; let container: bigint | undefined = undefined; if (this.#toAcknowledge.size) { - const ack = new Message_(this.#nextMessageId(), this.#nextSeqNo(false), new types.Msgs_ack({ msg_ids: [...this.#toAcknowledge] })); - this.#recentAcks.set(ack.id, { container, message: ack }); - message_ = new MessageContainer(container = this.#nextMessageId(), this.#nextSeqNo(false), [message__, ack]); - } else { - message_ = message__; + const ack: message = { + _: "message", + msg_id: this.#nextMessageId(), + seqno: this.#nextSeqNo(false), + body: { _: "msgs_ack", msg_ids: [...this.#toAcknowledge] }, + }; + this.#recentAcks.set(ack.msg_id, { container, message: ack }); + message_ = { + _: "message", + msg_id: container = this.#nextMessageId(), + seqno: this.#nextSeqNo(false), + body: { + _: "msg_container", + messages: [message_, ack], + }, + }; } await this.#sendMessage(message_); - this.#Linvoke.debug("invoked", function_[name]); + this.#Linvoke.debug("invoked", function_._); if (noWait) { this.#promises.set(messageId, { container, - message: message__, + message: message_, call: function_, }); return; @@ -156,7 +169,7 @@ export class ClientEncrypted extends ClientAbstract { return await new Promise((resolve, reject) => { this.#promises.set(messageId, { container, message: message__, resolve, reject, call: function_ }); - }).then((v) => v as T); + }).then((v) => v as R); } async #receiveLoop() { @@ -182,53 +195,54 @@ export class ClientEncrypted extends ClientAbstract { drop(this.handlers.error?.(err, "decryption")); continue; } - const messages = decrypted instanceof MessageContainer ? decrypted.messages : [decrypted]; + const messages = decrypted.body._ == "msg_container" ? decrypted.body.messages : [decrypted]; for (const message of messages) { let body = message.body; - if (body instanceof types.Gzip_packed) { - body = new TLReader(gunzip(body.packed_data)).readObject(); + if (is("gzip_packed", body)) { + body = new TLReader(gunzip(body.packed_data)).readObject() as Api.AnyType; } - this.#LreceiveLoop.debug("received", (typeof body === "object" && name in body) ? body[name] : body.constructor.name); - if (body instanceof types._Updates || body instanceof types._Update) { - drop(this.handlers.updates?.(body as enums.Updates | enums.Update, null)); - } else if (body instanceof types.New_session_created) { + this.#LreceiveLoop.debug("received", body._); + if (isOfEnum("Updates", body) || isOfEnum("Update", body)) { + drop(this.handlers.updates?.(body as Api.Updates | Api.Update, null)); + } else if (is("new_session_created", body)) { this.serverSalt = body.server_salt; drop(this.handlers.serverSaltReassigned?.(this.serverSalt)); - } else if (message.body instanceof RPCResult) { + } else if (message.body._ == "rpc_result") { let result = message.body.result; - if (result instanceof types.Gzip_packed) { - result = new TLReader(gunzip(result.packed_data)).readObject(); + if (is("gzip_packed", result)) { + result = new TLReader(gunzip(result.packed_data)).readObject() as Api.AnyType; } - if (result instanceof types.Rpc_error) { + if (is("rpc_error", result)) { this.#LreceiveLoop.debug("RPCResult:", result.error_code, result.error_message); } else { - this.#LreceiveLoop.debug("RPCResult:", (typeof result === "object" && name in result) ? result[name] : result.constructor.name); + this.#LreceiveLoop.debug("RPCResult:", result._); } - const messageId = message.body.messageId; + const messageId = message.body.req_msg_id; const promise = this.#promises.get(messageId); const resolvePromise = () => { if (promise) { - if (result instanceof types.Rpc_error) { - promise.reject?.(upgradeInstance(result, promise.call)); + if (is("rpc_error", result)) { + promise.reject?.(constructTelegramError(result, promise.call)); } else { promise.resolve?.(result); } this.#promises.delete(messageId); } }; - if (result instanceof types._Updates || result instanceof types._Update) { - drop(this.handlers.updates?.(result as enums.Updates | enums.Update, promise?.call ?? null, resolvePromise)); + if (isOfEnum("Updates", result) || isOfEnum("Update", result)) { + // @ts-ignore tbd + drop(this.handlers.updates?.(result, promise?.call ?? null, resolvePromise)); } else { drop(this.handlers.result?.(result, resolvePromise)); } - } else if (message.body instanceof types.Pong) { + } else if (is("pong", message.body)) { const promise = this.#promises.get(message.body.msg_id); if (promise) { promise.resolve?.(message.body); this.#promises.delete(message.body.msg_id); } - } else if (message.body instanceof types.Bad_server_salt) { + } else if (is("bad_server_salt", message.body)) { this.#LreceiveLoop.debug("server salt reassigned"); this.serverSalt = message.body.new_server_salt; drop(this.handlers.serverSaltReassigned?.(this.serverSalt)); @@ -251,7 +265,7 @@ export class ClientEncrypted extends ClientAbstract { } } } - this.#toAcknowledge.add(message.id); + this.#toAcknowledge.add(message.msg_id); } } catch (err) { if (!this.connected) { diff --git a/client/1_client_plain.ts b/client/1_client_plain.ts index 4d5789bf..0d068882 100644 --- a/client/1_client_plain.ts +++ b/client/1_client_plain.ts @@ -18,10 +18,10 @@ * along with this program. If not, see . */ -import { assertEquals, assertInstanceOf, concat, ige256Decrypt, ige256Encrypt, unreachable } from "../0_deps.ts"; +import { assert, assertEquals, concat, ige256Decrypt, ige256Encrypt, unreachable } from "../0_deps.ts"; import { ConnectionError, TransportError } from "../0_errors.ts"; import { bigIntFromBuffer, bufferFromBigInt, factorize, getLogger, getRandomBigInt, modExp, rsaPad, sha1 } from "../1_utilities.ts"; -import { functions, serialize, TLReader, types } from "../2_tl.ts"; +import { Api, is, serialize, TLReader } from "../2_tl.ts"; import { PUBLIC_KEYS, PublicKeys } from "../4_constants.ts"; import { ClientAbstract, ClientAbstractParams } from "./0_client_abstract.ts"; import { getMessageId, packUnencryptedMessage, unpackUnencryptedMessage } from "./0_message.ts"; @@ -48,13 +48,13 @@ export class ClientPlain extends ClientAbstract { this.#publicKeys = params?.publicKeys ?? PUBLIC_KEYS; } - async invoke>(function_: T): Promise { + async invoke, P extends Api.Function>(function_: T): Promise : never> { if (!this.transport) { throw new ConnectionError("Not connected."); } const msgId = this.#lastMsgId = getMessageId(this.#lastMsgId); - const payload = packUnencryptedMessage(function_[serialize](), msgId); + const payload = packUnencryptedMessage(serialize(function_), msgId); await this.transport.transport.send(payload); L.out(function_); L.outBin(payload); @@ -69,20 +69,20 @@ export class ClientPlain extends ClientAbstract { const reader = new TLReader(message); const result = reader.readObject(); L.in(result); - return result; + return result as T["_"] extends keyof Api.Functions ? Api.ReturnType : never; } async createAuthKey(): Promise<[Uint8Array, bigint]> { const nonce = getRandomBigInt(16, false, true); LcreateAuthKey.debug("auth key creation started"); - let resPq: types.ResPQ | null = null; + let resPq: Api.resPQ | null = null; for (let i = 0; i < 10; i++) { try { LcreateAuthKey.debug(`req_pq_multi [${i + 1}]`); - resPq = await this.invoke(new functions.req_pq_multi({ nonce })); + resPq = await this.invoke({ _: "req_pq_multi", nonce }); - assertInstanceOf(resPq, types.ResPQ); + assert(is("resPQ", resPq)); assertEquals(resPq.nonce, nonce); LcreateAuthKey.debug("got res_pq"); break; @@ -123,7 +123,8 @@ export class ClientPlain extends ClientAbstract { const serverNonce = resPq.server_nonce; const newNonce = getRandomBigInt(32, false, true); let encryptedData = await rsaPad( - new types.P_q_inner_data_dc({ + serialize({ + _: "p_q_inner_data_dc", pq, p, q, @@ -131,22 +132,21 @@ export class ClientPlain extends ClientAbstract { new_nonce: newNonce, nonce, server_nonce: serverNonce, - })[serialize](), + }), publicKey, ); - const dhParams = await this.invoke( - new functions.req_DH_params({ - nonce, - server_nonce: serverNonce, - p, - q, - public_key_fingerprint: publicKeyFingerprint, - encrypted_data: encryptedData, - }), - ); + const dhParams = await this.invoke({ + _: "req_DH_params", + nonce, + server_nonce: serverNonce, + p, + q, + public_key_fingerprint: publicKeyFingerprint, + encrypted_data: encryptedData, + }); - assertInstanceOf(dhParams, types.Server_DH_params_ok); + assert(is("server_DH_params_ok", dhParams)); LcreateAuthKey.debug("got server_DH_params_ok"); const newNonce_ = bufferFromBigInt(newNonce, 32, true, true); @@ -156,7 +156,7 @@ export class ClientPlain extends ClientAbstract { const answerWithHash = ige256Decrypt(dhParams.encrypted_answer, tmpAesKey, tmpAesIv); const dhInnerData = new TLReader(answerWithHash.slice(20)).readObject(); - assertInstanceOf(dhInnerData, types.Server_DH_inner_data); + assert(is("server_DH_inner_data", dhInnerData)); const { g, g_a: gA_, dh_prime: dhPrime_ } = dhInnerData; const gA = bigIntFromBuffer(gA_, false, false); const dhPrime = bigIntFromBuffer(dhPrime_, false, false); @@ -164,12 +164,13 @@ export class ClientPlain extends ClientAbstract { const b = getRandomBigInt(256, false, false); const gB = modExp(BigInt(g), b, dhPrime); - const data = new types.Client_DH_inner_data({ + const data = serialize({ + _: "client_DH_inner_data", nonce, server_nonce: serverNonce, retry_id: 0n, g_b: bufferFromBigInt(gB, 256, false, false), - })[serialize](); + }); let dataWithHash = concat([await sha1(data), data]); @@ -179,8 +180,13 @@ export class ClientPlain extends ClientAbstract { encryptedData = ige256Encrypt(dataWithHash, tmpAesKey, tmpAesIv); - const dhGenOk = await this.invoke(new functions.set_client_DH_params({ nonce, server_nonce: serverNonce, encrypted_data: encryptedData })); - assertInstanceOf(dhGenOk, types.Dh_gen_ok); + const dhGenOk = await this.invoke({ + _: "set_client_DH_params", + nonce, + server_nonce: serverNonce, + encrypted_data: encryptedData, + }); + assert(is("dh_gen_ok", dhGenOk)); LcreateAuthKey.debug("got dh_gen_ok"); const serverNonceSlice = serverNonce_.subarray(0, 8); diff --git a/client/1_types.ts b/client/1_types.ts index c3975abd..6f50645c 100644 --- a/client/1_types.ts +++ b/client/1_types.ts @@ -18,25 +18,20 @@ * along with this program. If not, see . */ -import { enums, functions, types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { StorageOperations } from "./0_storage_operations.ts"; import { ConnectionState, EntityGetter, ID, ParseMode, Update } from "../3_types.ts"; -type Functions = typeof functions; -type Keys = keyof Functions; -// deno-lint-ignore no-explicit-any -type AnyFunc = (...args: any) => any; -type Promisify = (...args: Parameters) => Promise>; -export type Api = { [K in Keys]: Functions[K] extends { __F: AnyFunc } ? Promisify : { [K_ in keyof Functions[K]]: Functions[K][K_] extends { __F: AnyFunc } ? Promisify : Functions[K][K_] } }; +export type Invoke = , P extends Api.Function, R extends unknown = Api.ReturnType>(function_: T, businessConnectionId?: string) => Promise; interface Connection { - api: Api; + invoke: Invoke; connect: () => Promise; disconnect: () => Promise; } -export interface ConnectionPool extends Omit { +export interface ConnectionPool extends Omit { size: number; - api: () => Api; + invoke: () => Invoke; connect: () => Promise; disconnect: () => Promise; } @@ -50,16 +45,15 @@ interface GetCdnConnectionPool { export interface C { id: number; - api: Api; storage: StorageOperations; messageStorage: StorageOperations; guaranteeUpdateDelivery: boolean; setConnectionState: (connectionState: ConnectionState) => void; resetConnectionState: () => void; getSelfId: () => Promise; - getInputPeer: (id: ID) => Promise; - getInputChannel: (id: ID) => Promise; - getInputUser: (id: ID) => Promise; + getInputPeer: (id: ID) => Promise; + getInputChannel: (id: ID) => Promise; + getInputUser: (id: ID) => Promise; getEntity: EntityGetter; handleUpdate: (update: Update) => void; parseMode: ParseMode; @@ -68,5 +62,5 @@ export interface C { ignoreOutgoing: boolean | null; cdn: boolean; dropPendingUpdates?: boolean; - invoke | types.Type) = functions.Function>(function_: T, businessConnectionId: string | undefined): Promise ? T["__R"] : void>; + invoke: Invoke; } diff --git a/client/2_account_manager.ts b/client/2_account_manager.ts index ef4bc1f2..ffd77ae4 100644 --- a/client/2_account_manager.ts +++ b/client/2_account_manager.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { types } from "../2_tl.ts"; +import { is } from "../2_tl.ts"; import { constructInactiveChat, ID } from "../3_types.ts"; import { C } from "./1_types.ts"; @@ -32,12 +32,12 @@ export class AccountManager { async #toggleUsername(id: ID, username: string, active: boolean) { const peer = await this.#c.getInputPeer(id); - if (peer instanceof types.InputPeerSelf) { - await this.#c.api.account.toggleUsername({ username, active }); - } else if (peer instanceof types.InputPeerUser) { - await this.#c.api.bots.toggleUsername({ bot: new types.InputUser(peer), username, active }); - } else if (peer instanceof types.InputPeerChannel) { - await this.#c.api.channels.toggleUsername({ channel: new types.InputChannel(peer), username, active }); + if (is("inputPeerSelf", peer)) { + await this.#c.invoke({ _: "account.toggleUsername", username, active }); + } else if (is("inputPeerUser", peer)) { + await this.#c.invoke({ _: "bots.toggleUsername", bot: { ...peer, _: "inputUser" }, username, active }); + } else if (is("inputPeerChannel", peer)) { + await this.#c.invoke({ _: "channels.toggleUsername", channel: { ...peer, _: "inputChannel" }, username, active }); } else { unreachable(); } @@ -56,12 +56,12 @@ export class AccountManager { async reorderUsernames(id: ID, order: string[]) { await this.#c.storage.assertUser("reorderUsernames"); const peer = await this.#c.getInputPeer(id); - if (peer instanceof types.InputPeerSelf) { - return await this.#c.api.account.reorderUsernames({ order }); - } else if (peer instanceof types.InputPeerUser) { - return await this.#c.api.bots.reorderUsernames({ bot: new types.InputUser(peer), order }); - } else if (peer instanceof types.InputPeerChannel) { - return await this.#c.api.channels.reorderUsernames({ channel: new types.InputChannel(peer), order }); + if (is("inputPeerSelf", peer)) { + return await this.#c.invoke({ _: "account.reorderUsernames", order }); + } else if (is("inputPeerUser", peer)) { + return await this.#c.invoke({ _: "bots.reorderUsernames", bot: { ...peer, _: "inputUser" }, order }); + } else if (is("inputPeerChannel", peer)) { + return await this.#c.invoke({ _: "channels.reorderUsernames", channel: { ...peer, _: "inputChannel" }, order }); } else { unreachable(); } @@ -70,8 +70,8 @@ export class AccountManager { async hideUsernames(id: ID) { await this.#c.storage.assertUser("hideUsernames"); const peer = await this.#c.getInputPeer(id); - if (peer instanceof types.InputPeerChannel) { - return await this.#c.api.channels.deactivateAllUsernames({ channel: new types.InputChannel(peer) }); + if (is("inputPeerChannel", peer)) { + return await this.#c.invoke({ _: "channels.deactivateAllUsernames", channel: { ...peer, _: "inputChannel" } }); } else { unreachable(); } @@ -79,7 +79,7 @@ export class AccountManager { async getInactiveChats() { await this.#c.storage.assertUser("getInactiveChats"); - const { chats, dates } = await this.#c.api.channels.getInactiveChannels(); + const { chats, dates } = await this.#c.invoke({ _: "channels.getInactiveChannels" }); return chats.map((v, i) => constructInactiveChat(v, dates[i])); } } diff --git a/client/2_bot_info_manager.ts b/client/2_bot_info_manager.ts index b261aa63..33cab1ce 100644 --- a/client/2_bot_info_manager.ts +++ b/client/2_bot_info_manager.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { functions, types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { BotCommand, botCommandScopeToTlObject } from "../3_types.ts"; import { GetMyCommandsParams, SetMyCommandsParams } from "./0_params.ts"; import { C } from "./1_types.ts"; @@ -30,8 +30,8 @@ export class BotInfoManager { this.#c = c; } - async #setMyInfo(info: Omit[0], "bot">) { - await this.#c.api.bots.setBotInfo({ bot: new types.InputUserSelf(), ...info }); + async #setMyInfo(info: Omit) { + await this.#c.invoke({ _: "bots.setBotInfo", bot: { _: "inputUserSelf" }, ...info }); } async setMyDescription(params?: { description?: string; languageCode?: string }) { @@ -50,7 +50,7 @@ export class BotInfoManager { } #getMyInfo(languageCode?: string | undefined) { - return this.#c.api.bots.getBotInfo({ bot: new types.InputUserSelf(), lang_code: languageCode ?? "" }); + return this.#c.invoke({ _: "bots.getBotInfo", bot: { _: "inputUserSelf" }, lang_code: languageCode ?? "" }); } async getMyDescription(params?: { languageCode?: string }): Promise { @@ -70,7 +70,8 @@ export class BotInfoManager { async getMyCommands(params?: GetMyCommandsParams): Promise { await this.#c.storage.assertBot("getMyCommands"); - const commands_ = await this.#c.api.bots.getBotCommands({ + const commands_ = await this.#c.invoke({ + _: "bots.getBotCommands", lang_code: params?.languageCode ?? "", scope: await botCommandScopeToTlObject(params?.scope ?? { type: "default" }, this.#c.getInputPeer), }); @@ -79,8 +80,9 @@ export class BotInfoManager { async setMyCommands(commands: BotCommand[], params?: SetMyCommandsParams) { await this.#c.storage.assertBot("setMyCommands"); - await this.#c.api.bots.setBotCommands({ - commands: commands.map((v) => new types.BotCommand(v)), + await this.#c.invoke({ + _: "bots.setBotCommands", + commands: commands.map((v) => ({ ...v, _: "botCommand" })), lang_code: params?.languageCode ?? "", scope: await botCommandScopeToTlObject(params?.scope ?? { type: "default" }, this.#c.getInputPeer), }); diff --git a/client/2_business_connection_manager.ts b/client/2_business_connection_manager.ts index c8a7b4a4..758f7d41 100644 --- a/client/2_business_connection_manager.ts +++ b/client/2_business_connection_manager.ts @@ -18,11 +18,12 @@ * along with this program. If not, see . */ -import { as, enums, types } from "../2_tl.ts"; +import { is } from "../2_tl.ts"; +import { Api, as } from "../2_tl.ts"; import { constructBusinessConnection, Update } from "../3_types.ts"; import { C } from "./1_types.ts"; -export type BusinessConnectionManagerUpdate = types.UpdateBotBusinessConnect; +export type BusinessConnectionManagerUpdate = Api.updateBotBusinessConnect; export class BusinessConnectionManager { #c: C; @@ -34,9 +35,9 @@ export class BusinessConnectionManager { async getBusinessConnection(id: string) { const connection_ = await this.#c.messageStorage.getBusinessConnection(id); if (!connection_) { - const connection_ = await this.#c.api.account.getBotBusinessConnection({ connection_id: id }) - .then((v) => v[as](types.Updates)) - .then((v) => v.updates[0][as](types.UpdateBotBusinessConnect).connection); + const connection_ = await this.#c.invoke({ _: "account.getBotBusinessConnection", connection_id: id }) + .then((v) => as("updates", v)) + .then((v) => as("updateBotBusinessConnect", v.updates[0]).connection); await this.#c.messageStorage.setBusinessConnection(id, connection_); return await constructBusinessConnection(connection_, this.#c.getEntity); } else { @@ -44,8 +45,8 @@ export class BusinessConnectionManager { } } - static canHandleUpdate(update: enums.Update): update is BusinessConnectionManagerUpdate { - return update instanceof types.UpdateBotBusinessConnect; + static canHandleUpdate(update: Api.Update): update is BusinessConnectionManagerUpdate { + return is("updateBotBusinessConnect", update); } async handleUpdate(update: BusinessConnectionManagerUpdate): Promise { diff --git a/client/2_file_manager.ts b/client/2_file_manager.ts index 53bb2c40..67fefca4 100644 --- a/client/2_file_manager.ts +++ b/client/2_file_manager.ts @@ -21,7 +21,7 @@ import { extension, path, unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { drop, getLogger, getRandomId, iterateReadableStream, kilobyte, Logger, megabyte, minute, mod, Part, PartStream } from "../1_utilities.ts"; -import { as, enums, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; import { constructSticker, deserializeFileId, FileId, FileSource, FileType, PhotoSourceType, serializeFileId, Sticker, toUniqueFileId } from "../3_types.ts"; import { STICKER_SET_NAME_TTL } from "../4_constants.ts"; import { FloodWait } from "../4_errors.ts"; @@ -43,7 +43,7 @@ export class FileManager { this.#Lupload = L.branch("upload"); } - async upload(file: FileSource, params?: UploadParams, checkName?: null | ((name: string) => string), allowStream = true) { + async upload(file: FileSource, params?: UploadParams, checkName?: null | ((name: string) => string), allowStream = true): Promise { let { size, name, contents } = await FileManager.#getFileContents(file, params, allowStream); if (checkName) { name = checkName(name); @@ -80,16 +80,16 @@ export class FileManager { this.#Lupload.debug(`[${fileId}] uploaded ` + result.parts + " part(s)"); if (result.small) { - return new types.InputFile({ id: fileId, name, parts: result.parts, md5_checksum: "" }); + return { _: "inputFile", id: fileId, name, parts: result.parts, md5_checksum: "" }; } else { - return new types.InputFileBig({ id: fileId, parts: result.parts, name }); + return { _: "inputFileBig", id: fileId, name, parts: result.parts }; } } async #uploadStream(stream: ReadableStream, fileId: bigint, chunkSize: number, signal: AbortSignal | null | undefined, pool: ConnectionPool) { let part: Part; let promises = new Array>(); - let api = pool.api(); + let invoke = pool.invoke(); let apiPromiseCount = 0; for await (part of iterateReadableStream(stream.pipeThrough(new PartStream(chunkSize)))) { promises.push( @@ -97,9 +97,9 @@ export class FileManager { while (true) { try { if (part.small) { - await api.upload.saveFilePart({ file_id: fileId, bytes: part.bytes, file_part: part.part }); + await invoke({ _: "upload.saveFilePart", file_id: fileId, bytes: part.bytes, file_part: part.part }); } else { - await api.upload.saveBigFilePart({ file_id: fileId, file_part: part.part, bytes: part.bytes, file_total_parts: part.totalParts }); + await invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: part.part, bytes: part.bytes, file_total_parts: part.totalParts }); } this.#Lupload.debug(`[${fileId}] uploaded part ` + (part.part + 1)); break; @@ -112,7 +112,7 @@ export class FileManager { }), ); if (++apiPromiseCount >= FileManager.#UPLOAD_REQUEST_PER_CONNECTION) { - api = pool.api(); + invoke = pool.invoke(); apiPromiseCount = 0; } if (promises.length == pool.size * FileManager.#UPLOAD_REQUEST_PER_CONNECTION) { @@ -130,7 +130,7 @@ export class FileManager { let promises = new Array>(); main: for (let part = 0; part < partCount;) { for (let i = 0; i < pool.size; ++i) { - const api = pool.api(); + const invoke = pool.invoke(); for (let i = 0; i < FileManager.#UPLOAD_REQUEST_PER_CONNECTION; ++i) { const start = part * chunkSize; const end = start + chunkSize; @@ -145,9 +145,9 @@ export class FileManager { try { signal?.throwIfAborted(); if (isBig) { - await api.upload.saveBigFilePart({ file_id: fileId, file_part: thisPart, bytes, file_total_parts: partCount }); + await invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: thisPart, bytes, file_total_parts: partCount }); } else { - await api.upload.saveFilePart({ file_id: fileId, bytes, file_part: thisPart }); + await invoke({ _: "upload.saveFilePart", file_id: fileId, bytes, file_part: thisPart }); } this.#Lupload.debug(`[${fileId}] uploaded part ` + (thisPart + 1) + " / " + partCount); break; @@ -254,7 +254,7 @@ export class FileManager { return { size: params?.fileSize ? params.fileSize : size, name, contents }; } - async *downloadInner(location: enums.InputFileLocation, dcId: number, params?: { chunkSize?: number; offset?: number }) { + async *downloadInner(location: Api.InputFileLocation, dcId: number, params?: { chunkSize?: number; offset?: number }) { const id = "id" in location ? location.id : "photo_id" in location ? location.photo_id : null; if (id != null && this.#c.storage.supportsFiles) { const file = await this.#c.storage.getFile(id); @@ -280,9 +280,9 @@ export class FileManager { try { while (true) { - const file = await connection.api.upload.getFile({ location, offset, limit }); + const file = await connection.invoke({ _: "upload.getFile", location, offset, limit }); - if (file instanceof types.upload.File) { + if (is("upload.file", file)) { yield file.bytes; if (id != null) { await this.#c.storage.saveFilePart(id, part, file.bytes); @@ -342,51 +342,54 @@ export class FileManager { } const big = fileId_.location.source.type == PhotoSourceType.ChatPhotoBig; const peer = await this.#c.getInputPeer(Number(fileId_.location.source.chatId)); // TODO: use access hash from source? - const location = new types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer, photo_id: fileId_.location.id }); + const location: Api.inputPeerPhotoFileLocation = { _: "inputPeerPhotoFileLocation", big: big ? true : undefined, peer, photo_id: fileId_.location.id }; yield* this.downloadInner(location, fileId_.dcId, params); break; } case FileType.Photo: { - const location = new types.InputPhotoFileLocation({ + const location: Api.inputPhotoFileLocation = { + _: "inputPhotoFileLocation", id: fileId_.location.id, access_hash: fileId_.location.accessHash, file_reference: fileId_.fileReference ?? new Uint8Array(), thumb_size: "thumbnailType" in fileId_.location.source ? String.fromCharCode(fileId_.location.source.thumbnailType) : "", - }); + }; yield* this.downloadInner(location, fileId_.dcId, params); break; } case FileType.Thumbnail: { - const location = new types.InputDocumentFileLocation({ + const location: Api.inputDocumentFileLocation = { + _: "inputDocumentFileLocation", id: fileId_.location.id, access_hash: fileId_.location.accessHash, file_reference: fileId_.fileReference ?? new Uint8Array(), thumb_size: "thumbnailType" in fileId_.location.source ? String.fromCharCode(fileId_.location.source.thumbnailType) : unreachable(), - }); + }; yield* this.downloadInner(location, fileId_.dcId, params); break; } } } else if (fileId_.location.type == "common") { - const location = new types.InputDocumentFileLocation({ + const location: Api.inputDocumentFileLocation = { + _: "inputDocumentFileLocation", id: fileId_.location.id, access_hash: fileId_.location.accessHash, file_reference: fileId_.fileReference ?? new Uint8Array(), thumb_size: "", - }); + }; yield* this.downloadInner(location, fileId_.dcId, params); } else { unreachable(); } } - async getStickerSetName(inputStickerSet: types.InputStickerSetID, hash = 0) { + async getStickerSetName(inputStickerSet: Api.inputStickerSetID, hash = 0) { const maybeStickerSetName = await this.#c.messageStorage.getStickerSetName(inputStickerSet.id, inputStickerSet.access_hash); if (maybeStickerSetName != null && Date.now() - maybeStickerSetName[1].getTime() < STICKER_SET_NAME_TTL) { return maybeStickerSetName[0]; } else { - const stickerSet = await this.#c.api.messages.getStickerSet({ stickerset: inputStickerSet, hash }); - const name = stickerSet[as](types.messages.StickerSet).set.short_name; + const stickerSet = await this.#c.invoke({ _: "messages.getStickerSet", stickerset: inputStickerSet, hash }); + const name = as("messages.stickerSet", stickerSet).set.short_name; await this.#c.messageStorage.updateStickerSetName(inputStickerSet.id, inputStickerSet.access_hash, name); return name; } @@ -422,7 +425,7 @@ export class FileManager { if (!shouldFetch) { return stickers; } - const documents_ = await this.#c.api.messages.getCustomEmojiDocuments({ document_id: id.map(BigInt) }).then((v) => v.map((v) => v[as](types.Document))); + const documents_ = await this.#c.invoke({ _: "messages.getCustomEmojiDocuments", document_id: id.map(BigInt) }).then((v) => v.map((v) => as("document", v))); for (const [i, document_] of documents_.entries()) { await this.#c.messageStorage.setCustomEmojiDocument(document_.id, document_); const fileId_: FileId = { diff --git a/client/2_reaction_manager.ts b/client/2_reaction_manager.ts index 9dcd57ef..ee338f58 100644 --- a/client/2_reaction_manager.ts +++ b/client/2_reaction_manager.ts @@ -19,16 +19,16 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, peerToChatId, types } from "../2_tl.ts"; +import { Api, is, isOneOf, peerToChatId } from "../2_tl.ts"; import { constructMessageReaction, constructMessageReactionCount, constructMessageReactions, Update } from "../3_types.ts"; import { C } from "./1_types.ts"; type ReactionManagerUpdate = - | types.UpdateBotMessageReactions - | types.UpdateBotMessageReaction - | types.UpdateMessageReactions - | types.UpdateChannelMessageViews - | types.UpdateChannelMessageForwards; + | Api.updateBotMessageReactions + | Api.updateBotMessageReaction + | Api.updateMessageReactions + | Api.updateChannelMessageViews + | Api.updateChannelMessageForwards; export class ReactionManager { #c: C; @@ -37,43 +37,49 @@ export class ReactionManager { this.#c = c; } - static canHandleUpdate(update: enums.Update): update is ReactionManagerUpdate { - return update instanceof types.UpdateBotMessageReactions || update instanceof types.UpdateBotMessageReaction || update instanceof types.UpdateMessageReactions || update instanceof types.UpdateChannelMessageViews || update instanceof types.UpdateChannelMessageForwards; + static canHandleUpdate(update: Api.Update): update is ReactionManagerUpdate { + return isOneOf([ + "updateBotMessageReactions", + "updateBotMessageReaction", + "updateMessageReactions", + "updateChannelMessageViews", + "updateChannelMessageForwards", + ], update); } async handleUpdate(update: ReactionManagerUpdate): Promise { - if (update instanceof types.UpdateBotMessageReactions) { + if (is("updateBotMessageReactions", update)) { const messageReactionCount = await constructMessageReactionCount(update, this.#c.getEntity); if (messageReactionCount) { return { messageReactionCount }; } else { return null; } - } else if (update instanceof types.UpdateBotMessageReaction) { + } else if (is("updateBotMessageReaction", update)) { const messageReactions = await constructMessageReactions(update, this.#c.getEntity); if (messageReactions) { return { messageReactions }; } else { return null; } - } else if (update instanceof types.UpdateMessageReactions) { + } else if (is("updateMessageReactions", update)) { const chatId = peerToChatId(update.peer); const message = await this.#c.messageStorage.getMessage(chatId, update.msg_id); - if (message instanceof types.Message) { + if (is("message", message)) { message.reactions = update.reactions; await this.#c.messageStorage.setMessage(chatId, update.msg_id, message); const views = message.views ?? 0; const forwards = message.forwards ?? 0; const recentReactions = update.reactions.recent_reactions ?? []; const reactions = update.reactions.results.map((v) => constructMessageReaction(v, recentReactions)); - return ({ messageInteractions: { chatId, messageId: update.msg_id, reactions, views, forwards } }); + return { messageInteractions: { chatId, messageId: update.msg_id, reactions, views, forwards } }; } else { return null; } - } else if (update instanceof types.UpdateChannelMessageViews || update instanceof types.UpdateChannelMessageForwards) { - const chatId = peerToChatId(new types.PeerChannel(update)); + } else if (isOneOf(["updateChannelMessageViews", "updateChannelMessageForwards"], update)) { + const chatId = peerToChatId({ ...update, _: "peerChannel" }); const message = await this.#c.messageStorage.getMessage(chatId, update.id); - if (message instanceof types.Message) { + if (is("message", message)) { if ("views" in update) { message.views = update.views; } diff --git a/client/2_update_manager.ts b/client/2_update_manager.ts index 50f4fec3..6746b658 100644 --- a/client/2_update_manager.ts +++ b/client/2_update_manager.ts @@ -20,52 +20,52 @@ import { unreachable } from "../0_deps.ts"; import { getLogger, Logger, Queue, ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { as, enums, functions, inputPeerToPeer, peerToChatId, ReadObject, TLObject, types } from "../2_tl.ts"; +import { Api, as, inputPeerToPeer, is, isOfEnum, isOneOf, peerToChatId, ReadObject } from "../2_tl.ts"; import { CHANNEL_DIFFERENCE_LIMIT_BOT, CHANNEL_DIFFERENCE_LIMIT_USER } from "../4_constants.ts"; import { C } from "./1_types.ts"; -type UpdateHandler = (update: enums.Update) => Promise<(() => Promise)>; +type UpdateHandler = (update: Api.Update) => Promise<(() => Promise)>; export type PtsUpdate = - | types.UpdateNewMessage - | types.UpdateDeleteMessages - | types.UpdateReadHistoryInbox - | types.UpdateReadHistoryOutbox - | types.UpdatePinnedChannelMessages - | types.UpdatePinnedMessages - | types.UpdateFolderPeers - | types.UpdateChannelWebPage - | types.UpdateEditMessage - | types.UpdateReadMessagesContents - | types.UpdateWebPage; + | Api.updateNewMessage + | Api.updateDeleteMessages + | Api.updateReadHistoryInbox + | Api.updateReadHistoryOutbox + | Api.updatePinnedChannelMessages + | Api.updatePinnedMessages + | Api.updateFolderPeers + | Api.updateChannelWebPage + | Api.updateEditMessage + | Api.updateReadMessagesContents + | Api.updateWebPage; export type ChannelPtsUpdate = - | types.UpdateNewChannelMessage - | types.UpdateEditChannelMessage - | types.UpdateDeleteChannelMessages - | types.UpdateChannelTooLong; + | Api.updateNewChannelMessage + | Api.updateEditChannelMessage + | Api.updateDeleteChannelMessages + | Api.updateChannelTooLong; export type QtsUpdate = - | types.UpdateNewEncryptedMessage - | types.UpdateMessagePollVote - | types.UpdateBotStopped - | types.UpdateChatParticipant - | types.UpdateChannelParticipant - | types.UpdateBotChatInviteRequester - | types.UpdateBotChatBoost - | types.UpdateBotMessageReaction - | types.UpdateBotMessageReactions - | types.UpdateBotBusinessConnect - | types.UpdateBotNewBusinessMessage - | types.UpdateBotEditBusinessMessage - | types.UpdateBotDeleteBusinessMessage; + | Api.updateNewEncryptedMessage + | Api.updateMessagePollVote + | Api.updateBotStopped + | Api.updateChatParticipant + | Api.updateChannelParticipant + | Api.updateBotChatInviteRequester + | Api.updateBotChatBoost + | Api.updateBotMessageReaction + | Api.updateBotMessageReactions + | Api.updateBotBusinessConnect + | Api.updateBotNewBusinessMessage + | Api.updateBotEditBusinessMessage + | Api.updateBotDeleteBusinessMessage; export class UpdateManager { static readonly QTS_COUNT = 1; static readonly MAIN_BOX_ID = 0n; #c: C; - #updateState?: types.updates.State; + #updateState?: Api.updates_State; #updateHandler?: UpdateHandler; #LrecoverUpdateGap: Logger; @@ -85,41 +85,21 @@ export class UpdateManager { this.#LfetchState = L.branch("fetchState"); } - static isPtsUpdate(v: enums.Update): v is PtsUpdate { - return v instanceof types.UpdateNewMessage || - v instanceof types.UpdateDeleteMessages || - v instanceof types.UpdateReadHistoryInbox || - v instanceof types.UpdateReadHistoryOutbox || - v instanceof types.UpdatePinnedChannelMessages || - v instanceof types.UpdatePinnedMessages || - v instanceof types.UpdateFolderPeers || - v instanceof types.UpdateChannelWebPage || - v instanceof types.UpdateEditMessage || - v instanceof types.UpdateReadMessagesContents || - v instanceof types.UpdateWebPage; - } - - static isQtsUpdate(v: enums.Update): v is QtsUpdate { - return v instanceof types.UpdateNewEncryptedMessage || - v instanceof types.UpdateMessagePollVote || - v instanceof types.UpdateBotStopped || - v instanceof types.UpdateChatParticipant || - v instanceof types.UpdateChannelParticipant || - v instanceof types.UpdateBotChatInviteRequester || - v instanceof types.UpdateBotChatBoost || - v instanceof types.UpdateBotMessageReaction || - v instanceof types.UpdateBotMessageReactions || - v instanceof types.UpdateBotBusinessConnect || - v instanceof types.UpdateBotNewBusinessMessage || - v instanceof types.UpdateBotEditBusinessMessage || - v instanceof types.UpdateBotDeleteBusinessMessage; - } - - static isChannelPtsUpdate(v: enums.Update | enums.Updates): v is ChannelPtsUpdate { - return v instanceof types.UpdateNewChannelMessage || - v instanceof types.UpdateEditChannelMessage || - v instanceof types.UpdateDeleteChannelMessages || - v instanceof types.UpdateChannelTooLong; + static isPtsUpdate(v: Api.Update): v is PtsUpdate { + return isOneOf(["updateNewMessage", "updateDeleteMessages", "updateReadHistoryInbox", "updateReadHistoryOutbox", "updatePinnedChannelMessages", "updatePinnedMessages", "updateFolderPeers", "updateChannelWebPage", "updateEditMessage", "updateReadMessagesContents", "updateWebPage"], v); + } + + static isQtsUpdate(v: Api.Update): v is QtsUpdate { + return isOneOf(["updateNewEncryptedMessage", "updateMessagePollVote", "updateBotStopped", "updateChatParticipant", "updateChannelParticipant", "updateBotChatInviteRequester", "updateBotChatBoost", "updateBotMessageReaction", "updateBotMessageReactions", "updateBotBusinessConnect", "updateBotNewBusinessMessage", "updateBotEditBusinessMessage", "updateBotDeleteBusinessMessage"], v); + } + + static isChannelPtsUpdate(v: Api.Update | Api.Updates): v is ChannelPtsUpdate { + return isOneOf([ + "updateNewChannelMessage", + "updateEditChannelMessage", + "updateDeleteChannelMessages", + "updateChannelTooLong", + ], v); } #defaultDropPendingUpdates: boolean | null = null; @@ -133,7 +113,7 @@ export class UpdateManager { return this.#defaultDropPendingUpdates; } - #state: types.updates.State | null | undefined = undefined; + #state: Api.updates_State | null | undefined = undefined; async #getState() { if (await this.#mustDropPendingUpdates()) { return this.#state ?? null; @@ -145,7 +125,7 @@ export class UpdateManager { return this.#state = state; } - async #setState(state: types.updates.State) { + async #setState(state: Api.updates_State) { this.#state = state; if (!await this.#mustDropPendingUpdates()) { await this.#c.storage.setState(state); @@ -153,11 +133,11 @@ export class UpdateManager { } async fetchState(source: string) { - let state = await this.#c.api.updates.getState(); - const difference = await this.#c.api.updates.getDifference(state); - if (difference instanceof types.updates.Difference) { + let state = await this.#c.invoke({ _: "updates.getState" }); + const difference = await this.#c.invoke({ ...state, _: "updates.getDifference" }); + if (is("updates.difference", difference)) { state = difference.state; - } else if (difference instanceof types.updates.DifferenceSlice) { + } else if (is("updates.differenceSlice", difference)) { state = difference.intermediate_state; } this.#updateState = state; @@ -167,9 +147,9 @@ export class UpdateManager { } } - async processChats(chats: enums.Chat[]) { + async processChats(chats: Api.Chat[]) { for (const chat of chats) { - if (chat instanceof types.Channel || chat instanceof types.ChannelForbidden) { + if (isOneOf(["channel", "channelForbidden"], chat)) { await this.#c.messageStorage.setEntity(chat); if ("username" in chat && chat.username) { await this.#c.messageStorage.updateUsernames(peerToChatId(chat), [chat.username]); @@ -177,7 +157,7 @@ export class UpdateManager { if ("usernames" in chat && chat.usernames) { await this.#c.messageStorage.updateUsernames(peerToChatId(chat), chat.usernames.map((v) => v.username)); } - } else if (chat instanceof types.Chat || chat instanceof types.ChatForbidden) { + } else if (isOneOf(["chat", "chatForbidden"], chat)) { await this.#c.messageStorage.setEntity(chat); } } @@ -185,76 +165,78 @@ export class UpdateManager { async processResult(result: ReadObject) { if ( - result instanceof types.account.AuthorizationForm || - result instanceof types.account.AutoSaveSettings || - result instanceof types.account.PrivacyRules || - result instanceof types.account.WebAuthorizations || - result instanceof types.AttachMenuBots || - result instanceof types.AttachMenuBotsBot || - result instanceof types.channels.AdminLogResults || - result instanceof types.channels.ChannelParticipant || - result instanceof types.channels.ChannelParticipants || - result instanceof types.channels.SendAsPeers || - result instanceof types.ChatInvite || - result instanceof types.chatlists.ChatlistInvite || - result instanceof types.chatlists.ChatlistInviteAlready || - result instanceof types.chatlists.ChatlistUpdates || - result instanceof types.chatlists.ExportedInvites || - result instanceof types.contacts.Blocked || - result instanceof types.contacts.BlockedSlice || - result instanceof types.contacts.Contacts || - result instanceof types.contacts.Found || - result instanceof types.contacts.ImportedContacts || - result instanceof types.contacts.ResolvedPeer || - result instanceof types.contacts.TopPeers || - result instanceof types.help.PromoData || - result instanceof types.help.RecentMeUrls || - result instanceof types.messages.BotResults || - result instanceof types.messages.ChannelMessages || - result instanceof types.messages.ChatAdminsWithInvites || - result instanceof types.messages.ChatFull || - result instanceof types.messages.ChatInviteImporters || - result instanceof types.messages.Chats || - result instanceof types.messages.ChatsSlice || - result instanceof types.messages.Dialogs || - result instanceof types.messages.DialogsSlice || - result instanceof types.messages.DiscussionMessage || - result instanceof types.messages.ExportedChatInvite || - result instanceof types.messages.ExportedChatInviteReplaced || - result instanceof types.messages.ExportedChatInvites || - result instanceof types.messages.ForumTopics || - result instanceof types.messages.HighScores || - result instanceof types.messages.InactiveChats || - result instanceof types.messages.MessageReactionsList || - result instanceof types.messages.Messages || - result instanceof types.messages.MessagesSlice || - result instanceof types.messages.MessageViews || - result instanceof types.messages.PeerDialogs || - result instanceof types.messages.PeerSettings || - result instanceof types.messages.SearchResultsCalendar || - result instanceof types.messages.SponsoredMessages || - result instanceof types.messages.VotesList || - result instanceof types.messages.WebPage || - result instanceof types.payments.CheckedGiftCode || - result instanceof types.payments.PaymentForm || - result instanceof types.payments.PaymentReceipt || - result instanceof types.phone.GroupCall || - result instanceof types.phone.GroupParticipants || - result instanceof types.phone.JoinAsPeers || - result instanceof types.phone.PhoneCall || - result instanceof types.photos.Photo || - result instanceof types.photos.Photos || - result instanceof types.photos.PhotosSlice || - result instanceof types.premium.BoostsList || - result instanceof types.premium.MyBoosts || - result instanceof types.stats.MegagroupStats || - result instanceof types.stats.PublicForwards || - result instanceof types.stories.AllStories || - result instanceof types.stories.PeerStories || - result instanceof types.stories.Stories || - result instanceof types.stories.StoryViews || - result instanceof types.stories.StoryViewsList || - result instanceof types.users.UserFull + isOneOf([ + "account.authorizationForm", + "account.autoSaveSettings", + "account.privacyRules", + "account.webAuthorizations", + "attachMenuBots", + "attachMenuBotsBot", + "channels.adminLogResults", + "channels.channelParticipant", + "channels.channelParticipants", + "channels.sendAsPeers", + "chatInvite", + "chatlists.chatlistInvite", + "chatlists.chatlistInviteAlready", + "chatlists.chatlistUpdates", + "chatlists.exportedInvites", + "contacts.blocked", + "contacts.blockedSlice", + "contacts.contacts", + "contacts.found", + "contacts.importedContacts", + "contacts.resolvedPeer", + "contacts.topPeers", + "help.promoData", + "help.recentMeUrls", + "messages.botResults", + "messages.channelMessages", + "messages.chatAdminsWithInvites", + "messages.chatFull", + "messages.chatInviteImporters", + "messages.chats", + "messages.chatsSlice", + "messages.dialogs", + "messages.dialogsSlice", + "messages.discussionMessage", + "messages.exportedChatInvite", + "messages.exportedChatInviteReplaced", + "messages.exportedChatInvites", + "messages.forumTopics", + "messages.highScores", + "messages.inactiveChats", + "messages.messageReactionsList", + "messages.messages", + "messages.messagesSlice", + "messages.messageViews", + "messages.peerDialogs", + "messages.peerSettings", + "messages.searchResultsCalendar", + "messages.sponsoredMessages", + "messages.votesList", + "messages.webPage", + "payments.checkedGiftCode", + "payments.paymentForm", + "payments.paymentReceipt", + "phone.groupCall", + "phone.groupParticipants", + "phone.joinAsPeers", + "phone.phoneCall", + "photos.photo", + "photos.photos", + "photos.photosSlice", + "premium.boostsList", + "premium.myBoosts", + "stats.megagroupStats", + "stats.publicForwards", + "stories.allStories", + "stories.peerStories", + "stories.stories", + "stories.storyViews", + "stories.storyViewsList", + "users.userFull", + ], result) ) { if ("chats" in result) { await this.processChats(result.chats); @@ -266,25 +248,25 @@ export class UpdateManager { if ("messages" in result && Array.isArray(result.messages)) { for (const message of result.messages as unknown[]) { - if (message instanceof types.Message || message instanceof types.MessageService) { + if (is("message", message) || is("messageService", message)) { await this.#c.messageStorage.setMessage(peerToChatId(message.peer_id), message.id, message); } } } } - if (result instanceof types.messages.Messages) { + if (is("messages.messages", result)) { for (const message of result.messages) { - if (message instanceof types.Message || message instanceof types.MessageService) { + if (is("message", message) || is("messageService", message)) { await this.#c.messageStorage.setMessage(peerToChatId(message.peer_id), message.id, message); } } } } - async processUsers(users: enums.User[]) { + async processUsers(users: Api.User[]) { for (const user of users) { - if (user instanceof types.User && user.access_hash) { + if (is("user", user) && user.access_hash) { await this.#c.messageStorage.setEntity(user); if (user.username) { await this.#c.messageStorage.updateUsernames(peerToChatId(user), [user.username]); @@ -345,9 +327,9 @@ export class UpdateManager { #channelUpdateQueues = new Map(); - async #processChannelPtsUpdateInner(update: types.UpdateNewChannelMessage | types.UpdateEditChannelMessage | types.UpdateDeleteChannelMessages | types.UpdateChannelTooLong, checkGap: boolean) { - const channelId = update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditChannelMessage ? (update.message as types.Message | types.MessageService).peer_id[as](types.PeerChannel).channel_id : update.channel_id; - if (update instanceof types.UpdateChannelTooLong) { + async #processChannelPtsUpdateInner(update: Api.updateNewChannelMessage | Api.updateEditChannelMessage | Api.updateDeleteChannelMessages | Api.updateChannelTooLong, checkGap: boolean) { + const channelId = is("updateNewChannelMessage", update) || is("updateEditChannelMessage", update) ? as("peerChannel", (update.message as Api.message | Api.messageService).peer_id).channel_id : update.channel_id; + if (is("updateChannelTooLong", update)) { if (update.pts != undefined) { await this.#c.storage.setChannelPts(channelId, update.pts); } @@ -375,7 +357,7 @@ export class UpdateManager { this.#queueUpdate(update, channelId, true); } - #queueUpdate(update: enums.Update, boxId: bigint, pts: boolean) { + #queueUpdate(update: Api.Update, boxId: bigint, pts: boolean) { this.getHandleUpdateQueue(boxId).add(async () => { if (this.#c.guaranteeUpdateDelivery && pts) { await this.#handleStoredUpdates(boxId); @@ -386,7 +368,7 @@ export class UpdateManager { } #processChannelPtsUpdate(update: ChannelPtsUpdate, checkGap: boolean) { - const channelId = update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditChannelMessage ? (update.message as types.Message | types.MessageService).peer_id[as](types.PeerChannel).channel_id : update.channel_id; + const channelId = is("updateNewChannelMessage", update) || is("updateEditChannelMessage", update) ? as("peerChannel", (update.message as Api.message | Api.messageService).peer_id).channel_id : update.channel_id; let queue = this.#channelUpdateQueues.get(channelId); if (queue == undefined) { queue = new Queue(`channelUpdates-${channelId}`); @@ -452,11 +434,11 @@ export class UpdateManager { } #processUpdatesQueue = new Queue("UpdateManager/processUpdates"); - processUpdates(updates: enums.Update | enums.Updates, checkGap: boolean, call: TLObject | null = null, callback?: () => void) { + processUpdates(updates: Api.Update | Api.Updates, checkGap: boolean, call: Api.AnyObject | null = null, callback?: () => void) { this.#processUpdatesQueue.add(() => this.#processUpdates(updates, checkGap, call).then(callback)); } - async #processUpdates(updates_: enums.Update | enums.Updates, checkGap: boolean, call: TLObject | null = null) { + async #processUpdates(updates_: Api.Update | Api.Updates, checkGap: boolean, call: Api.AnyObject | null = null) { /// First, individual updates (Update[1]) are extracted from Updates.[2] /// /// If an updatesTooLong[3] was received, an update gap recovery is initiated and no further action will be taken. @@ -464,8 +446,8 @@ export class UpdateManager { /// [1]: https://core.telegram.org/type/Update /// [2]: https://core.telegram.org/type/Updates /// [3]: https://core.telegram.org/constructor/updatesTooLong - let updates: enums.Update[]; - if (updates_ instanceof types.UpdatesCombined || updates_ instanceof types.Updates) { + let updates: Api.Update[]; + if (is("updatesCombined", updates_) || is("updates", updates_)) { updates = updates_.updates; const seq = updates_.seq; const seqStart = "seq_start" in updates_ ? updates_.seq_start : updates_.seq; @@ -493,19 +475,21 @@ export class UpdateManager { } } } - } else if (updates_ instanceof types.UpdateShort) { + } else if (is("updateShort", updates_)) { updates = [updates_.update]; - } else if (updates_ instanceof types.UpdateShortMessage) { + } else if (is("updateShortMessage", updates_)) { updates = [ - new types.UpdateNewMessage({ - message: new types.Message({ + { + _: "updateNewMessage", + message: ({ + _: "message", out: updates_.out, mentioned: updates_.mentioned, media_unread: updates_.media_unread, silent: updates_.silent, id: updates_.id, - from_id: updates_.out ? new types.PeerUser({ user_id: await this.#c.getSelfId().then(BigInt) }) : new types.PeerUser({ user_id: updates_.user_id }), - peer_id: new types.PeerUser({ user_id: updates_.user_id }), + from_id: updates_.out ? ({ _: "peerUser", user_id: await this.#c.getSelfId().then(BigInt) }) : ({ _: "peerUser", user_id: updates_.user_id }), + peer_id: ({ _: "peerUser", user_id: updates_.user_id }), message: updates_.message, date: updates_.date, fwd_from: updates_.fwd_from, @@ -516,19 +500,20 @@ export class UpdateManager { }), pts: updates_.pts, pts_count: updates_.pts_count, - }), + }, ]; - } else if (updates_ instanceof types.UpdateShortChatMessage) { + } else if (is("updateShortChatMessage", updates_)) { updates = [ - new types.UpdateNewMessage({ - message: new types.Message({ - out: updates_.out, + { + _: "updateNewMessage", + message: ({ + _: "message", mentioned: updates_.mentioned, media_unread: updates_.media_unread, silent: updates_.silent, id: updates_.id, - from_id: new types.PeerUser({ user_id: updates_.from_id }), - peer_id: new types.PeerChat({ chat_id: updates_.chat_id }), + from_id: { _: "peerUser", user_id: updates_.from_id }, + peer_id: { _: "peerChat", chat_id: updates_.chat_id }, fwd_from: updates_.fwd_from, via_bot_id: updates_.via_bot_id, reply_to: updates_.reply_to, @@ -539,56 +524,56 @@ export class UpdateManager { }), pts: updates_.pts, pts_count: updates_.pts_count, - }), + }, ]; - } else if (updates_ instanceof types.UpdateShortSentMessage) { - if (!(call instanceof functions.messages.sendMessage)) { + } else if (is("updateShortSentMessage", updates_)) { + if (!is("messages.sendMessage", call)) { unreachable(); } - updates = [ - new types.UpdateNewMessage({ - message: new types.Message({ - out: updates_.out, - silent: call.silent, - id: updates_.id, - from_id: new types.PeerUser({ user_id: await this.#c.getSelfId().then(BigInt) }), - peer_id: inputPeerToPeer(call.peer), - message: call.message, - media: updates_.media, - date: updates_.date, - // reply_to: call.reply_to, // TODO? - entities: updates_.entities, - ttl_period: updates_.ttl_period, - }), - pts: updates_.pts, - pts_count: updates_.pts_count, + updates = [{ + _: "updateNewMessage", + message: ({ + _: "message", + out: updates_.out, + silent: call.silent, + id: updates_.id, + from_id: { _: "peerUser", user_id: await this.#c.getSelfId().then(BigInt) }, + peer_id: inputPeerToPeer(call.peer), + message: call.message, + media: updates_.media, + date: updates_.date, + // reply_to: call.reply_to, // TODO? + entities: updates_.entities, + ttl_period: updates_.ttl_period, }), - ]; - } else if (updates_ instanceof types.UpdatesTooLong) { + pts: updates_.pts, + pts_count: updates_.pts_count, + }]; + } else if (is("updatesTooLong", updates_)) { await this.recoverUpdateGap("updatesTooLong"); return; - } else if (updates_ instanceof types._Update) { + } else if (isOfEnum("Update", updates_)) { updates = [updates_]; } else { unreachable(); } /// We process the updates when we are sure there is no gap. - if (updates_ instanceof types.Updates || updates_ instanceof types.UpdatesCombined) { + if (is("updates", updates_) || is("updatesCombined", updates_)) { await this.processChats(updates_.chats); await this.processUsers(updates_.users); await this.#setUpdateStateDate(updates_.date); } else if ( - updates_ instanceof types.UpdateShort || - updates_ instanceof types.UpdateShortMessage || - updates_ instanceof types.UpdateShortChatMessage || - updates_ instanceof types.UpdateShortSentMessage + is("updateShort", updates_) || + is("updateShortMessage", updates_) || + is("updateShortChatMessage", updates_) || + is("updateShortSentMessage", updates_) ) { await this.#setUpdateStateDate(updates_.date); } for (const update of updates) { - if (update instanceof types.UpdatePtsChanged) { + if (is("updatePtsChanged", update)) { await this.fetchState("updatePtsChanged"); if (this.#updateState) { await this.#setState(this.#updateState); @@ -649,32 +634,32 @@ export class UpdateManager { try { let state = await this.#getLocalState(); while (true) { - const difference = await this.#c.api.updates.getDifference({ pts: state.pts, date: state.date, qts: state.qts ?? 0 }); - if (difference instanceof types.updates.Difference || difference instanceof types.updates.DifferenceSlice) { + const difference = await this.#c.invoke({ _: "updates.getDifference", pts: state.pts, date: state.date, qts: state.qts ?? 0 }); + if (is("updates.difference", difference) || is("updates.differenceSlice", difference)) { await this.processChats(difference.chats); await this.processUsers(difference.users); for (const message of difference.new_messages) { - await this.#processUpdates(new types.UpdateNewMessage({ message, pts: 0, pts_count: 0 }), false); + await this.#processUpdates({ _: "updateNewMessage", message, pts: 0, pts_count: 0 }, false); } for (const update of difference.other_updates) { await this.#processUpdates(update, false); } - if (difference instanceof types.updates.Difference) { + if (is("updates.difference", difference)) { await this.#setState(difference.state); this.#LrecoverUpdateGap.debug("recovered from update gap"); break; - } else if (difference instanceof types.updates.DifferenceSlice) { + } else if (is("updates.differenceSlice", difference)) { state = difference.intermediate_state; } else { unreachable(); } - } else if (difference instanceof types.updates.DifferenceTooLong) { + } else if (is("updates.differenceTooLong", difference)) { await this.#c.messageStorage.deleteMessages(); await this.#c.storage.removeChats(0); await this.#c.storage.removeChats(1); state.pts = difference.pts; this.#LrecoverUpdateGap.debug("received differenceTooLong"); - } else if (difference instanceof types.updates.DifferenceEmpty) { + } else if (is("updates.differenceEmpty", difference)) { await this.#setUpdateStateDate(difference.date); this.#LrecoverUpdateGap.debug("there was no update gap"); break; @@ -692,18 +677,19 @@ export class UpdateManager { const pts_ = await this.#c.storage.getChannelPts(channelId); let pts = pts_ == null ? 1 : pts_; while (true) { - const { access_hash } = await this.#c.getInputPeer(ZERO_CHANNEL_ID + -Number(channelId)).then((v) => v[as](types.InputPeerChannel)); - const difference = await this.#c.api.updates.getChannelDifference({ + const { access_hash } = await this.#c.getInputPeer(ZERO_CHANNEL_ID + -Number(channelId)).then((v) => as("inputPeerChannel", v)); + const difference = await this.#c.invoke({ + _: "updates.getChannelDifference", pts, - channel: new types.InputChannel({ channel_id: channelId, access_hash }), - filter: new types.ChannelMessagesFilterEmpty(), + channel: { _: "inputChannel", channel_id: channelId, access_hash }, + filter: { _: "channelMessagesFilterEmpty" }, limit: await this.#c.storage.getAccountType() == "user" ? CHANNEL_DIFFERENCE_LIMIT_USER : CHANNEL_DIFFERENCE_LIMIT_BOT, }); - if (difference instanceof types.updates.ChannelDifference) { + if (is("updates.channelDifference", difference)) { await this.processChats(difference.chats); await this.processUsers(difference.users); for (const message of difference.new_messages) { - await this.#processUpdates(new types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false); + await this.#processUpdates({ _: "updateNewChannelMessage", message, pts: 0, pts_count: 0 }, false); } for (const update of difference.other_updates) { await this.#processUpdates(update, false); @@ -711,22 +697,22 @@ export class UpdateManager { await this.#c.storage.setChannelPts(channelId, difference.pts); this.#LrecoverChannelUpdateGap.debug(`recovered from update gap [${channelId}, ${source}]`, channelId, source); break; - } else if (difference instanceof types.updates.ChannelDifferenceTooLong) { + } else if (is("updates.channelDifferenceTooLong", difference)) { // TODO: invalidate messages this.#LrecoverChannelUpdateGap.debug("received channelDifferenceTooLong"); await this.processChats(difference.chats); await this.processUsers(difference.users); for (const message of difference.messages) { - await this.#processUpdates(new types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false); + await this.#processUpdates({ _: "updateNewChannelMessage", message, pts: 0, pts_count: 0 }, false); } - const pts_ = difference.dialog[as](types.Dialog).pts; + const pts_ = as("dialog", difference.dialog).pts; if (pts_ != undefined) { pts = pts_; } else { unreachable(); } this.#LrecoverChannelUpdateGap.debug("processed channelDifferenceTooLong"); - } else if (difference instanceof types.updates.ChannelDifferenceEmpty) { + } else if (is("updates.channelDifferenceEmpty", difference)) { this.#LrecoverChannelUpdateGap.debug("there was no update gap"); break; } @@ -766,7 +752,7 @@ export class UpdateManager { this.#handleUpdatesSet.delete(boxId); } - async #handleUpdate(update: enums.Update) { + async #handleUpdate(update: Api.Update) { const handler = this.#updateHandler; if (handler) { return await handler(update); diff --git a/client/3_message_manager.ts b/client/3_message_manager.ts index 41c9cda3..b743713a 100644 --- a/client/3_message_manager.ts +++ b/client/3_message_manager.ts @@ -21,7 +21,7 @@ import { contentType, unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { getLogger, getRandomId, Logger, toUnixTimestamp } from "../1_utilities.ts"; -import { as, enums, functions, getChannelChatId, peerToChatId, types } from "../2_tl.ts"; +import { Api, as, getChannelChatId, is, peerToChatId } from "../2_tl.ts"; import { constructChatMemberUpdated, constructInviteLink, deserializeFileId, FileId, InputMedia, SelfDestructOption, selfDestructOptionToInt } from "../3_types.ts"; import { assertMessageType, ChatAction, ChatMember, chatMemberRightsToTlObject, constructChatMember, constructMessage as constructMessage_, deserializeInlineMessageId, FileSource, FileType, ID, Message, MessageEntity, messageEntityToTlObject, ParseMode, Reaction, reactionEqual, reactionToTlObject, replyMarkupToTlObject, Update, UsernameResolver } from "../3_types.ts"; import { messageSearchFilterToTlObject } from "../types/0_message_search_filter.ts"; @@ -42,17 +42,17 @@ interface C extends C_ { } type MessageManagerUpdate = - | types.UpdateNewMessage - | types.UpdateNewChannelMessage - | types.UpdateEditMessage - | types.UpdateEditChannelMessage - | types.UpdateBotNewBusinessMessage - | types.UpdateBotEditBusinessMessage - | types.UpdateBotDeleteBusinessMessage - | types.UpdateDeleteMessages - | types.UpdateDeleteChannelMessages - | types.UpdateChannelParticipant - | types.UpdateChatParticipant; + | Api.updateNewMessage + | Api.updateNewChannelMessage + | Api.updateEditMessage + | Api.updateEditChannelMessage + | Api.updateBotNewBusinessMessage + | Api.updateBotEditBusinessMessage + | Api.updateBotDeleteBusinessMessage + | Api.updateDeleteMessages + | Api.updateDeleteChannelMessages + | Api.updateChannelParticipant + | Api.updateChatParticipant; export class MessageManager { #c: C; @@ -68,7 +68,7 @@ export class MessageManager { async getMessages(chatId: ID, messageIds: number[]) { checkArray(messageIds, checkMessageId); const peer = await this.#c.getInputPeer(chatId); - let messages_ = new Array(); + let messages_ = new Array(); const chatId_ = peerToChatId(peer); let shouldFetch = false; for (const messageId of messageIds) { @@ -82,20 +82,18 @@ export class MessageManager { } } if (shouldFetch) { - if (peer instanceof types.InputPeerChannel) { - messages_ = await this.#c.api.channels.getMessages({ - channel: new types.InputChannel(peer), - id: messageIds.map((v) => new types.InputMessageID({ id: v })), - }).then((v) => v[as](types.messages.ChannelMessages).messages); + if (is("inputPeerChannel", peer)) { + messages_ = await this.#c.invoke({ _: "channels.getMessages", channel: ({ ...peer, _: "inputChannel" }), id: messageIds.map((v) => ({ _: "inputMessageID", id: v })) }).then((v) => as("messages.channelMessages", v).messages); } else { - messages_ = await this.#c.api.messages.getMessages({ - id: messageIds.map((v) => new types.InputMessageID({ id: v })), - }).then((v) => v[as](types.messages.Messages).messages); + messages_ = await this.#c.invoke({ + _: "messages.getMessages", + id: messageIds.map((v) => ({ _: "inputMessageID", id: v })), + }).then((v) => as("messages.messages", v).messages); } } const messages = new Array(); for (const message_ of messages_) { - if (message_ instanceof types.MessageEmpty) { + if (is("messageEmpty", message_)) { continue; } const message = await this.constructMessage(message_); @@ -161,25 +159,25 @@ export class MessageManager { return [text, entities] as const; } - async #updatesToMessages(chatId: ID, updates: enums.Updates, businessConnectionId?: string) { + async #updatesToMessages(chatId: ID, updates: Api.Updates, businessConnectionId?: string) { const messages = new Array(); - if (updates instanceof types.Updates) { + if (is("updates", updates)) { for (const update of updates.updates) { - if ("message" in update && update.message instanceof types.MessageEmpty) { + if ("message" in update && is("messageEmpty", update.message)) { continue; } - if (update instanceof types.UpdateNewMessage || update instanceof types.UpdateEditMessage) { + if (is("updateNewMessage", update) || is("updateEditMessage", update)) { messages.push(await this.constructMessage(update.message)); - } else if (update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditChannelMessage) { + } else if (is("updateNewChannelMessage", update) || is("updateEditChannelMessage", update)) { messages.push(await this.constructMessage(update.message)); - } else if (update instanceof types.UpdateBotNewBusinessMessage) { + } else if (is("updateBotNewBusinessMessage", update)) { messages.push(await this.constructMessage(update.message, false, { connectionId: businessConnectionId ?? update.connection_id, replyToMessage: update.reply_to_message })); - } else if (update instanceof types.UpdateBotEditBusinessMessage) { + } else if (is("updateBotEditBusinessMessage", update)) { messages.push(await this.constructMessage(update.message, false, { connectionId: businessConnectionId ?? update.connection_id, replyToMessage: update.reply_to_message })); } } - } else if (updates instanceof types.UpdateShortSentMessage) { + } else if (is("updateShortSentMessage", updates)) { const message = await this.getMessage(chatId, updates.id); if (message != null) { messages.push(message); @@ -189,24 +187,13 @@ export class MessageManager { return messages; } - async constructMessage(message_: enums.Message, r?: boolean, business?: { connectionId: string; replyToMessage?: enums.Message }) { + async constructMessage(message_: Api.Message, r?: boolean, business?: { connectionId: string; replyToMessage?: Api.Message }) { return await constructMessage_(message_, this.#c.getEntity, this.getMessage.bind(this), this.#c.fileManager.getStickerSetName.bind(this.#c.fileManager), r, business); } async forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams) { checkArray(messageIds, checkMessageId); - const result = await this.#c.api.messages.forwardMessages({ - from_peer: await this.#c.getInputPeer(from), - to_peer: await this.#c.getInputPeer(to), - id: messageIds, - random_id: messageIds.map(() => getRandomId()), - silent: params?.disableNotification || undefined, - top_msg_id: params?.messageThreadId, - noforwards: params?.disableNotification || undefined, - send_as: params?.sendAs ? await this.#c.getInputPeer(params.sendAs) : undefined, - drop_author: params?.dropSenderName || undefined, - drop_media_captions: params?.dropCaption || undefined, - }); + const result = await this.#c.invoke({ _: "messages.forwardMessages", from_peer: await this.#c.getInputPeer(from), to_peer: await this.#c.getInputPeer(to), id: messageIds, random_id: messageIds.map(() => getRandomId()), silent: params?.disableNotification || undefined, top_msg_id: params?.messageThreadId, noforwards: params?.disableNotification || undefined, send_as: params?.sendAs ? await this.#c.getInputPeer(params.sendAs) : undefined, drop_author: params?.dropSenderName || undefined, drop_media_captions: params?.dropCaption || undefined }); return await this.#updatesToMessages(to, result); } @@ -228,16 +215,7 @@ export class MessageManager { if (messages.length > 0) { offsetId = messages[messages.length - 1].id; // TODO: track id of oldest message and don't send requests for it } - const result = await this.#c.api.messages.getHistory({ - peer: peer, - offset_id: offsetId, - offset_date: 0, - add_offset: 0, - limit, - max_id: 0, - min_id: 0, - hash: 0n, - }); + const result = await this.#c.invoke({ _: "messages.getHistory", peer: peer, offset_id: offsetId, offset_date: 0, add_offset: 0, limit, max_id: 0, min_id: 0, hash: 0n }); if (!("messages" in result)) { unreachable(); @@ -250,8 +228,8 @@ export class MessageManager { } usernameResolver: UsernameResolver = async (v) => { - const inputPeer = await this.#c.getInputPeer(v).then((v) => v[as](types.InputPeerUser)); - return new types.InputUser(inputPeer); + const inputPeer = await this.#c.getInputPeer(v).then((v) => as("inputPeerUser", v)); + return { ...inputPeer, _: "inputUser" }; }; async #constructReplyMarkup(params?: Pick) { @@ -286,32 +264,32 @@ export class MessageManager { const noforwards = params?.protectContent ? true : undefined; const sendAs = await this.#resolveSendAs(params); - let result: enums.Updates; + let result: Api.Updates; if (!noWebpage && params?.linkPreview?.url) { - result = await this.#c.invoke( - new functions.messages.sendMedia({ - peer, - random_id: randomId, - media: new types.InputMediaWebPage({ - url: params.linkPreview.url, - force_large_media: params.linkPreview.largeMedia ? true : undefined, - force_small_media: params.linkPreview.smallMedia ? true : undefined, - optional: message.length ? undefined : true, - }), - message, - invert_media: invertMedia, - silent, - noforwards, - reply_to: await this.#constructReplyTo(params), - send_as: sendAs, - entities, - reply_markup: replyMarkup, + result = await this.#c.invoke({ + _: "messages.sendMedia", + peer, + random_id: randomId, + media: ({ + _: "inputMediaWebPage", + url: params.linkPreview.url, + force_large_media: params.linkPreview.largeMedia ? true : undefined, + force_small_media: params.linkPreview.smallMedia ? true : undefined, + optional: message.length ? undefined : true, }), - params?.businessConnectionId, - ); + message, + invert_media: invertMedia, + silent, + noforwards, + reply_to: await this.#constructReplyTo(params), + send_as: sendAs, + entities, + reply_markup: replyMarkup, + }, params?.businessConnectionId); } else { result = await this.#c.invoke( - new functions.messages.sendMessage({ + { + _: "messages.sendMessage", peer, random_id: randomId, message, @@ -323,7 +301,7 @@ export class MessageManager { send_as: sendAs, entities, reply_markup: replyMarkup, - }), + }, params?.businessConnectionId, ); } @@ -335,7 +313,7 @@ export class MessageManager { async #constructReplyTo(params?: _SendCommon) { const topMsgId = params?.messageThreadId; const replyToMsgId = params?.replyToMessageId; - return replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => messageEntityToTlObject(v, this.#c.getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) : undefined; + return replyToMsgId !== undefined ? ({ _: "inputReplyToMessage", reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => messageEntityToTlObject(v, this.#c.getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) as Api.inputReplyToMessage : undefined; } async sendVenue(chatId: ID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams) { @@ -346,30 +324,30 @@ export class MessageManager { const sendAs = params?.sendAs ? await this.#c.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs const replyMarkup = await this.#constructReplyMarkup(params); - const result = await this.#c.invoke( - new functions.messages.sendMedia({ - peer, - random_id: randomId, - silent, - noforwards, - reply_to: await this.#constructReplyTo(params), - send_as: sendAs, - reply_markup: replyMarkup, - media: new types.InputMediaVenue({ - geo_point: new types.InputGeoPoint({ - lat: latitude, - long: longitude, - }), - title, - address, - venue_id: params?.foursquareId ?? "", - venue_type: params?.foursquareType ?? "", - provider: "foursquare", + const result = await this.#c.invoke({ + _: "messages.sendMedia", + peer, + random_id: randomId, + silent, + noforwards, + reply_to: await this.#constructReplyTo(params), + send_as: sendAs, + reply_markup: replyMarkup, + media: ({ + _: "inputMediaVenue", + geo_point: ({ + _: "inputGeoPoint", + lat: latitude, + long: longitude, }), - message: "", + title, + address, + venue_id: params?.foursquareId ?? "", + venue_type: params?.foursquareType ?? "", + provider: "foursquare", }), - params?.businessConnectionId, - ); + message: "", + }, params?.businessConnectionId); const message = await this.#updatesToMessages(chatId, result, params?.businessConnectionId).then((v) => v[0]); return assertMessageType(message, "venue"); @@ -384,7 +362,8 @@ export class MessageManager { const replyMarkup = await this.#constructReplyMarkup(params); const result = await this.#c.invoke( - new functions.messages.sendMedia({ + { + _: "messages.sendMedia", peer, random_id: randomId, silent, @@ -392,14 +371,15 @@ export class MessageManager { reply_to: await this.#constructReplyTo(params), send_as: sendAs, reply_markup: replyMarkup, - media: new types.InputMediaContact({ + media: ({ + _: "inputMediaContact", phone_number: number, first_name: firstName, last_name: params?.lastName ?? "", vcard: params?.vcard ?? "", }), message: "", - }), + }, params?.businessConnectionId, ); @@ -415,22 +395,21 @@ export class MessageManager { const sendAs = params?.sendAs ? await this.#c.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs const replyMarkup = await this.#constructReplyMarkup(params); - const result = await this.#c.invoke( - new functions.messages.sendMedia({ - peer, - random_id: randomId, - silent, - noforwards, - reply_to: await this.#constructReplyTo(params), - send_as: sendAs, - reply_markup: replyMarkup, - media: new types.InputMediaDice({ - emoticon: params?.emoji ?? "🎲", - }), - message: "", + const result = await this.#c.invoke({ + _: "messages.sendMedia", + peer, + random_id: randomId, + silent, + noforwards, + reply_to: await this.#constructReplyTo(params), + send_as: sendAs, + reply_markup: replyMarkup, + media: ({ + _: "inputMediaDice", + emoticon: params?.emoji ?? "🎲", }), - params?.businessConnectionId, - ); + message: "", + }, params?.businessConnectionId); const message = await this.#updatesToMessages(chatId, result, params?.businessConnectionId).then((v) => v[0]); return assertMessageType(message, "dice"); @@ -445,7 +424,8 @@ export class MessageManager { const replyMarkup = await this.#constructReplyMarkup(params); const result = await this.#c.invoke( - new functions.messages.sendMedia({ + { + _: "messages.sendMedia", peer, random_id: randomId, silent, @@ -454,8 +434,10 @@ export class MessageManager { send_as: sendAs, reply_markup: replyMarkup, media: params?.livePeriod !== undefined - ? new types.InputMediaGeoLive({ - geo_point: new types.InputGeoPoint({ + ? ({ + _: "inputMediaGeoLive", + geo_point: ({ + _: "inputGeoPoint", lat: latitude, long: longitude, accuracy_radius: params?.horizontalAccuracy, @@ -464,15 +446,17 @@ export class MessageManager { period: params.livePeriod, proximity_notification_radius: params?.proximityAlertRadius, }) - : new types.InputMediaGeoPoint({ - geo_point: new types.InputGeoPoint({ + : ({ + _: "inputMediaGeoPoint", + geo_point: ({ + _: "inputGeoPoint", lat: latitude, long: longitude, accuracy_radius: params?.horizontalAccuracy, }), }), message: "", - }), + }, params?.businessConnectionId, ); @@ -482,76 +466,49 @@ export class MessageManager { async sendVideoNote(chatId: ID, audio: FileSource, params?: SendVideoNoteParams) { const message = await this.#sendDocumentInner(chatId, audio, params, FileType.VideoNote, [ - new types.DocumentAttributeVideo({ - round_message: true, - w: params?.length ?? 0, - h: params?.length ?? 0, - duration: params?.duration ?? 0, - }), + { _: "documentAttributeVideo", round_message: true, w: params?.length ?? 0, h: params?.length ?? 0, duration: params?.duration ?? 0 }, ], false); return assertMessageType(message, "videoNote"); } async sendAudio(chatId: ID, audio: FileSource, params?: SendAudioParams) { const message = await this.#sendDocumentInner(chatId, audio, params, FileType.Audio, [ - new types.DocumentAttributeAudio({ - duration: params?.duration ?? 0, - performer: params?.performer, - title: params?.title, - }), + { _: "documentAttributeAudio", duration: params?.duration ?? 0, performer: params?.performer, title: params?.title }, ]); return assertMessageType(message, "audio"); } async sendVoice(chatId: ID, voice: FileSource, params?: SendVoiceParams) { const message = await this.#sendDocumentInner(chatId, voice, params, FileType.VoiceNote, [ - new types.DocumentAttributeAudio({ - voice: true, - duration: params?.duration ?? 0, - }), + { _: "documentAttributeAudio", voice: true, duration: params?.duration ?? 0 }, ]); return assertMessageType(message, "voice"); } async sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams) { const message = await this.#sendDocumentInner(chatId, animation, params, FileType.Animation, [ - new types.DocumentAttributeAnimated(), - new types.DocumentAttributeVideo({ - supports_streaming: true, - w: params?.width ?? 0, - h: params?.height ?? 0, - duration: params?.duration ?? 0, - }), + { _: "documentAttributeAnimated" }, + { _: "documentAttributeVideo", supports_streaming: true, w: params?.width ?? 0, h: params?.height ?? 0, duration: params?.duration ?? 0 }, ]); return assertMessageType(message, "animation"); } async sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams) { const message = await this.#sendDocumentInner(chatId, video, params, FileType.Video, [ - new types.DocumentAttributeVideo({ - supports_streaming: params?.supportsStreaming ? true : undefined, - w: params?.width ?? 0, - h: params?.height ?? 0, - duration: params?.duration ?? 0, - }), + { _: "documentAttributeVideo", supports_streaming: params?.supportsStreaming ? true : undefined, w: params?.width ?? 0, h: params?.height ?? 0, duration: params?.duration ?? 0 }, ]); return assertMessageType(message, "video"); } - async #sendDocumentInner(chatId: ID, document: FileSource, params: SendDocumentParams & _SpoilCommon | undefined, fileType: FileType, otherAttribs: enums.DocumentAttribute[], urlSupported = true, expectedMimeTypes?: string[]) { - let media: enums.InputMedia | null = null; + async #sendDocumentInner(chatId: ID, document: FileSource, params: SendDocumentParams & _SpoilCommon | undefined, fileType: FileType, otherAttribs: Api.DocumentAttribute[], urlSupported = true, expectedMimeTypes?: string[]) { + let media: Api.InputMedia | null = null; const spoiler = params?.hasSpoiler ? true : undefined; const ttl_seconds = params && "selfDestruct" in params && typeof params.selfDestruct !== undefined ? selfDestructOptionToInt(params.selfDestruct as SelfDestructOption) : undefined; if (typeof document === "string") { const fileId = this.resolveFileId(document, fileType); if (fileId != null) { - media = new types.InputMediaDocument({ - id: new types.InputDocument(fileId), - spoiler, - query: otherAttribs.find((v): v is types.DocumentAttributeSticker => v instanceof types.DocumentAttributeSticker)?.alt || undefined, - ttl_seconds, - }); + media = { _: "inputMediaDocument", id: { ...fileId, _: "inputDocument" }, spoiler, query: otherAttribs.find((v): v is Api.documentAttributeSticker => is("documentAttributeSticker", v))?.alt || undefined, ttl_seconds }; } } @@ -560,7 +517,7 @@ export class MessageManager { if (!urlSupported) { throw new InputError("URL not supported."); } - media = new types.InputMediaDocumentExternal({ url: document, spoiler, ttl_seconds }); + media = { _: "inputMediaDocumentExternal", url: document, spoiler, ttl_seconds }; } else { let mimeType: string; const file = await this.#c.fileManager.upload(document, params, (name) => { @@ -573,19 +530,11 @@ export class MessageManager { } return name; }); - let thumb: enums.InputFile | undefined = undefined; + let thumb: Api.InputFile | undefined = undefined; if (params?.thumbnail) { thumb = await this.#c.fileManager.upload(params.thumbnail, { chunkSize: params?.chunkSize, signal: params?.signal }); } - media = new types.InputMediaUploadedDocument({ - file, - thumb, - spoiler, - attributes: [new types.DocumentAttributeFilename({ file_name: file.name }), ...otherAttribs], - mime_type: mimeType!, - force_file: fileType == FileType.Document ? true : undefined, - ttl_seconds, - }); + media = { _: "inputMediaUploadedDocument", file, thumb, spoiler, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, ...otherAttribs], mime_type: mimeType!, force_file: fileType == FileType.Document ? true : undefined, ttl_seconds }; } } @@ -599,40 +548,28 @@ export class MessageManager { } async sendSticker(chatId: ID, sticker: FileSource, params?: SendStickerParams) { - const message = await this.#sendDocumentInner(chatId, sticker, params, FileType.Sticker, [new types.DocumentAttributeSticker({ alt: params?.emoji || "", stickerset: new types.InputStickerSetEmpty() })], undefined, STICKER_MIME_TYPES); + const message = await this.#sendDocumentInner(chatId, sticker, params, FileType.Sticker, [{ _: "documentAttributeSticker", alt: params?.emoji || "", stickerset: { _: "inputStickerSetEmpty" } }], undefined, STICKER_MIME_TYPES); return assertMessageType(message, "sticker"); } async sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams) { - let media: enums.InputMedia | null = null; + let media: Api.InputMedia | null = null; const spoiler = params?.hasSpoiler ? true : undefined; const ttl_seconds = params && "selfDestruct" in params && params.selfDestruct !== undefined ? selfDestructOptionToInt(params.selfDestruct) : undefined; if (typeof photo === "string") { const fileId = this.resolveFileId(photo, [FileType.Photo, FileType.ProfilePhoto]); if (fileId != null) { - media = new types.InputMediaPhoto({ - id: new types.InputPhoto(fileId), - spoiler, - ttl_seconds, - }); + media = { _: "inputMediaPhoto", id: { ...fileId, _: "inputPhoto" }, spoiler, ttl_seconds }; } } if (media == null) { if (typeof photo === "string" && isHttpUrl(photo)) { - media = new types.InputMediaPhotoExternal({ - url: photo, - spoiler, - ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined, - }); + media = { _: "inputMediaPhotoExternal", url: photo, spoiler, ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined }; } else { const file = await this.#c.fileManager.upload(photo, params, null, false); - media = new types.InputMediaUploadedPhoto({ - file, - spoiler, - ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined, - }); + media = { _: "inputMediaUploadedPhoto", file, spoiler, ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined }; } } @@ -640,7 +577,7 @@ export class MessageManager { return assertMessageType(message, "photo"); } - async #sendMedia(chatId: ID, media: enums.InputMedia, params: SendPhotoParams | undefined) { + async #sendMedia(chatId: ID, media: Api.InputMedia, params: SendPhotoParams | undefined) { const peer = await this.#c.getInputPeer(chatId); const randomId = getRandomId(); const silent = params?.disableNotification ? true : undefined; @@ -655,7 +592,8 @@ export class MessageManager { const captionEntities = parseResult === undefined ? undefined : parseResult[1]; const result = await this.#c.invoke( - new functions.messages.sendMedia({ + { + _: "messages.sendMedia", peer, random_id: randomId, silent, @@ -666,7 +604,7 @@ export class MessageManager { media, message: caption ?? "", entities: captionEntities, - }), + }, params?.businessConnectionId, ); @@ -715,29 +653,15 @@ export class MessageManager { const solution = parseResult === undefined ? undefined : parseResult[0]; const solutionEntities = parseResult === undefined ? undefined : parseResult[1]; - const answers = options.map((v, i) => new types.PollAnswer({ option: new Uint8Array([i]), text: v })); - - const poll = new types.Poll({ - id: getRandomId(), - answers, - question, - closed: params?.isClosed ? true : undefined, - close_date: params?.closeDate ? toUnixTimestamp(params.closeDate) : undefined, - close_period: params?.openPeriod ? params.openPeriod : undefined, - multiple_choice: params?.allowMultipleAnswers ? true : undefined, - public_voters: params?.isAnonymous === false ? true : undefined, - quiz: params?.type == "quiz" ? true : undefined, - }); - - const media = new types.InputMediaPoll({ - poll, - correct_answers: params?.correctOptionIndex ? [new Uint8Array([params.correctOptionIndex])] : undefined, - solution, - solution_entities: solutionEntities, - }); + const answers: Api.pollAnswer[] = options.map((v, i) => ({ _: "pollAnswer", option: new Uint8Array([i]), text: v })); + + const poll: Api.poll = { _: "poll", id: getRandomId(), answers, question, closed: params?.isClosed ? true : undefined, close_date: params?.closeDate ? toUnixTimestamp(params.closeDate) : undefined, close_period: params?.openPeriod ? params.openPeriod : undefined, multiple_choice: params?.allowMultipleAnswers ? true : undefined, public_voters: params?.isAnonymous === false ? true : undefined, quiz: params?.type == "quiz" ? true : undefined }; + + const media: Api.inputMediaPoll = { _: "inputMediaPoll", poll, correct_answers: params?.correctOptionIndex ? [new Uint8Array([params.correctOptionIndex])] : undefined, solution, solution_entities: solutionEntities }; const result = await this.#c.invoke( - new functions.messages.sendMedia({ + { + _: "messages.sendMedia", peer, random_id: randomId, silent, @@ -747,7 +671,7 @@ export class MessageManager { send_as: sendAs, media, message: "", - }), + }, params?.businessConnectionId, ); @@ -760,11 +684,7 @@ export class MessageManager { messageId: number, params?: EditMessageReplyMarkupParams, ) { - const result = await this.#c.api.messages.editMessage({ - id: checkMessageId(messageId), - peer: await this.#c.getInputPeer(chatId), - reply_markup: await this.#constructReplyMarkup(params), - }); + const result = await this.#c.invoke({ _: "messages.editMessage", id: checkMessageId(messageId), peer: await this.#c.getInputPeer(chatId), reply_markup: await this.#constructReplyMarkup(params) }); const message_ = await this.#updatesToMessages(chatId, result).then((v) => v[0]); return message_; @@ -776,10 +696,7 @@ export class MessageManager { ) { const id = deserializeInlineMessageId(inlineMessageId); - await this.#c.api.messages.editInlineBotMessage({ - id, - reply_markup: await this.#constructReplyMarkup(params), - }); + await this.#c.invoke({ _: "messages.editInlineBotMessage", id, reply_markup: await this.#constructReplyMarkup(params) }); } async editMessageText( @@ -792,26 +709,12 @@ export class MessageManager { const noWebpage = params?.linkPreview?.disable ? true : undefined; const invertMedia = params?.linkPreview?.aboveText ? true : undefined; - let media: enums.InputMedia | undefined = undefined; + let media: Api.InputMedia | undefined = undefined; if (!noWebpage && params?.linkPreview?.url) { - media = new types.InputMediaWebPage({ - url: params.linkPreview.url, - force_large_media: params.linkPreview.largeMedia ? true : undefined, - force_small_media: params.linkPreview.smallMedia ? true : undefined, - optional: message.length ? undefined : true, - }); + media = { _: "inputMediaWebPage", url: params.linkPreview.url, force_large_media: params.linkPreview.largeMedia ? true : undefined, force_small_media: params.linkPreview.smallMedia ? true : undefined, optional: message.length ? undefined : true }; } - const result = await this.#c.api.messages.editMessage({ - id: checkMessageId(messageId), - peer: await this.#c.getInputPeer(chatId), - entities, - message, - media, - no_webpage: noWebpage, - invert_media: invertMedia, - reply_markup: await this.#constructReplyMarkup(params), - }); + const result = await this.#c.invoke({ _: "messages.editMessage", id: checkMessageId(messageId), peer: await this.#c.getInputPeer(chatId), entities, message, media, no_webpage: noWebpage, invert_media: invertMedia, reply_markup: await this.#constructReplyMarkup(params) }); const message_ = await this.#updatesToMessages(chatId, result).then((v) => v[0]); return assertMessageType(message_, "text"); @@ -824,45 +727,28 @@ export class MessageManager { const noWebpage = params?.linkPreview?.disable ? true : undefined; const invertMedia = params?.linkPreview?.aboveText ? true : undefined; - let media: enums.InputMedia | undefined = undefined; + let media: Api.InputMedia | undefined = undefined; if (!noWebpage && params?.linkPreview?.url) { - media = new types.InputMediaWebPage({ - url: params.linkPreview.url, - force_large_media: params.linkPreview.largeMedia ? true : undefined, - force_small_media: params.linkPreview.smallMedia ? true : undefined, - optional: message.length ? undefined : true, - }); + media = { _: "inputMediaWebPage", url: params.linkPreview.url, force_large_media: params.linkPreview.largeMedia ? true : undefined, force_small_media: params.linkPreview.smallMedia ? true : undefined, optional: message.length ? undefined : true }; } - await this.#c.api.messages.editInlineBotMessage({ - id, - entities, - message, - media, - no_webpage: noWebpage, - invert_media: invertMedia, - reply_markup: await this.#constructReplyMarkup(params), - }); + await this.#c.invoke({ _: "messages.editInlineBotMessage", id, entities, message, media, no_webpage: noWebpage, invert_media: invertMedia, reply_markup: await this.#constructReplyMarkup(params) }); } - async #resolveInputMediaInner(document: FileSource, media: InputMedia, fileType: FileType, otherAttribs: enums.DocumentAttribute[]) { - let media_: enums.InputMedia | null = null; + async #resolveInputMediaInner(document: FileSource, media: InputMedia, fileType: FileType, otherAttribs: Api.DocumentAttribute[]) { + let media_: Exclude | null = null; const spoiler = "hasSpoiler" in media && media.hasSpoiler ? true : undefined; if (typeof document === "string") { const fileId = this.resolveFileId(document, fileType); if (fileId != null) { - media_ = new types.InputMediaDocument({ - id: new types.InputDocument(fileId), - spoiler, - query: otherAttribs.find((v): v is types.DocumentAttributeSticker => v instanceof types.DocumentAttributeSticker)?.alt || undefined, - }); + media_ = { _: "inputMediaDocument", id: { ...fileId, _: "inputDocument" }, spoiler, query: otherAttribs.find((v): v is Api.documentAttributeSticker => is("documentAttributeSticker", v))?.alt || undefined }; } } if (media_ == null) { if (typeof document === "string" && isHttpUrl(document)) { - media_ = new types.InputMediaDocumentExternal({ url: document, spoiler }); + media_ = { _: "inputMediaDocumentExternal", url: document, spoiler }; } else { let mimeType: string; const file = await this.#c.fileManager.upload(document, media, (name) => { @@ -872,18 +758,11 @@ export class MessageManager { } return name; }); - let thumb: enums.InputFile | undefined = undefined; + let thumb: Api.InputFile | undefined = undefined; if ("thumbnail" in media && media.thumbnail) { thumb = await this.#c.fileManager.upload(media.thumbnail, { chunkSize: media?.chunkSize, signal: media?.signal }); } - media_ = new types.InputMediaUploadedDocument({ - file, - thumb, - spoiler, - attributes: [new types.DocumentAttributeFilename({ file_name: file.name }), ...otherAttribs], - mime_type: mimeType!, - force_file: fileType == FileType.Document ? true : undefined, - }); + media_ = { _: "inputMediaUploadedDocument", file, thumb, spoiler, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, ...otherAttribs], mime_type: mimeType!, force_file: fileType == FileType.Document ? true : undefined }; } } @@ -892,46 +771,33 @@ export class MessageManager { async #resolveInputMedia(media: InputMedia) { if ("animation" in media) { return await this.#resolveInputMediaInner(media.animation, media, FileType.Animation, [ - new types.DocumentAttributeAnimated(), - new types.DocumentAttributeVideo({ - supports_streaming: true, - w: media?.width ?? 0, - h: media?.height ?? 0, - duration: media?.duration ?? 0, - }), + { _: "documentAttributeAnimated" }, + { _: "documentAttributeVideo", supports_streaming: true, w: media?.width ?? 0, h: media?.height ?? 0, duration: media?.duration ?? 0 }, ]); } else if ("audio" in media) { return await this.#resolveInputMediaInner(media.audio, media, FileType.Audio, [ - new types.DocumentAttributeAudio({ - duration: media?.duration ?? 0, - performer: media?.performer, - title: media?.title, - }), + { _: "documentAttributeAudio", duration: media?.duration ?? 0, performer: media?.performer, title: media?.title }, ]); } else if ("document" in media) { return await this.#resolveInputMediaInner(media.document, media, FileType.Document, []); } else if ("photo" in media) { - let media_: enums.InputMedia | null = null; + let media_: Api.InputMedia | null = null; const spoiler = media.hasSpoiler ? true : undefined; const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? selfDestructOptionToInt(media.selfDestruct) : undefined; if (typeof media.photo === "string") { const fileId = this.resolveFileId(media.photo, [FileType.Photo, FileType.ProfilePhoto]); if (fileId != null) { - media_ = new types.InputMediaPhoto({ - id: new types.InputPhoto(fileId), - spoiler, - ttl_seconds, - }); + media_ = { _: "inputMediaPhoto", id: { ...fileId, _: "inputPhoto" }, spoiler, ttl_seconds }; } } if (media_ == null) { if (typeof media.photo === "string" && isHttpUrl(media.photo)) { - media_ = new types.InputMediaPhotoExternal({ url: media.photo, spoiler }); + media_ = { _: "inputMediaPhotoExternal", url: media.photo, spoiler }; } else { const file = await this.#c.fileManager.upload(media.photo, media, null, false); - media_ = new types.InputMediaUploadedPhoto({ file, spoiler, ttl_seconds }); + media_ = { _: "inputMediaUploadedPhoto", file, spoiler, ttl_seconds }; } } @@ -939,12 +805,7 @@ export class MessageManager { } else if ("video" in media) { const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? selfDestructOptionToInt(media.selfDestruct) : undefined; const media_ = await this.#resolveInputMediaInner(media.video, media, FileType.Video, [ - new types.DocumentAttributeVideo({ - supports_streaming: media?.supportsStreaming ? true : undefined, - w: media?.width ?? 0, - h: media?.height ?? 0, - duration: media?.duration ?? 0, - }), + { _: "documentAttributeVideo", supports_streaming: media?.supportsStreaming ? true : undefined, w: media?.width ?? 0, h: media?.height ?? 0, duration: media?.duration ?? 0 }, ]); media_.ttl_seconds = ttl_seconds; return media_; @@ -965,12 +826,7 @@ export class MessageManager { if (!("animation" in message) && !("audio" in message) && !("document" in message) && !("photo" in message) && !("video" in message)) { throw new InputError("Unexpected message type."); } - const result = await this.#c.api.messages.editMessage({ - peer: await this.#c.getInputPeer(chatId), - id: messageId, - media: await this.#resolveInputMedia(media), - reply_markup: await this.#constructReplyMarkup(params), - }); + const result = await this.#c.invoke({ _: "messages.editMessage", peer: await this.#c.getInputPeer(chatId), id: messageId, media: await this.#resolveInputMedia(media), reply_markup: await this.#constructReplyMarkup(params) }); const message_ = await this.#updatesToMessages(chatId, result).then((v) => v[0]); return message_; @@ -979,66 +835,44 @@ export class MessageManager { async editInlineMessageMedia(inlineMessageId: string, media: InputMedia, params?: EditMessageMediaParams) { await this.#c.storage.assertBot("editInlineMessageMedia"); const id = deserializeInlineMessageId(inlineMessageId); - await this.#c.api.messages.editInlineBotMessage({ - id, - media: await this.#resolveInputMedia(media), - reply_markup: await this.#constructReplyMarkup(params), - }); + await this.#c.invoke({ _: "messages.editInlineBotMessage", id, media: await this.#resolveInputMedia(media), reply_markup: await this.#constructReplyMarkup(params) }); } async deleteMessages(chatId: ID, messageIds: number[], params?: DeleteMessagesParams) { checkArray(messageIds, checkMessageId); const peer = await this.#c.getInputPeer(chatId); - if (peer instanceof types.InputPeerChannel) { - await this.#c.api.channels.deleteMessages({ channel: new types.InputChannel(peer), id: messageIds }); + if (is("inputPeerChannel", peer)) { + await this.#c.invoke({ _: "channels.deleteMessages", channel: { ...peer, _: "inputChannel" }, id: messageIds }); } else { - await this.#c.api.messages.deleteMessages({ id: messageIds, revoke: params?.onlyForMe ? undefined : true }); + await this.#c.invoke({ _: "messages.deleteMessages", id: messageIds, revoke: params?.onlyForMe ? undefined : true }); } } async deleteChatMemberMessages(chatId: ID, memberId: ID) { const channel = await this.#c.getInputChannel(chatId); const participant = await this.#c.getInputPeer(memberId); - await this.#c.api.channels.deleteParticipantHistory({ channel, participant }); + await this.#c.invoke({ _: "channels.deleteParticipantHistory", channel, participant }); } async pinMessage(chatId: ID, messageId: number, params?: PinMessageParams) { - await this.#c.api.messages.updatePinnedMessage({ - peer: await this.#c.getInputPeer(chatId), - id: checkMessageId(messageId), - silent: params?.disableNotification ? true : undefined, - pm_oneside: params?.bothSides ? undefined : true, - }); + await this.#c.invoke({ _: "messages.updatePinnedMessage", peer: await this.#c.getInputPeer(chatId), id: checkMessageId(messageId), silent: params?.disableNotification ? true : undefined, pm_oneside: params?.bothSides ? undefined : true }); } async unpinMessage(chatId: ID, messageId: number) { - await this.#c.api.messages.updatePinnedMessage({ - peer: await this.#c.getInputPeer(chatId), - id: checkMessageId(messageId), - unpin: true, - }); + await this.#c.invoke({ _: "messages.updatePinnedMessage", peer: await this.#c.getInputPeer(chatId), id: checkMessageId(messageId), unpin: true }); } async unpinMessages(chatId: ID) { - await this.#c.api.messages.unpinAllMessages({ peer: await this.#c.getInputPeer(chatId) }); + await this.#c.invoke({ _: "messages.unpinAllMessages", peer: await this.#c.getInputPeer(chatId) }); } async setAvailableReactions(chatId: ID, availableReactions: "none" | "all" | Reaction[]) { // TODO: sync with storage - await this.#c.api.messages.setChatAvailableReactions({ - peer: await this.#c.getInputPeer(chatId), - available_reactions: availableReactions == "none" ? new types.ChatReactionsNone() : availableReactions == "all" ? new types.ChatReactionsAll() : Array.isArray(availableReactions) ? new types.ChatReactionsSome({ reactions: availableReactions.map((v) => v.type == "emoji" ? new types.ReactionEmoji({ emoticon: v.emoji }) : new types.ReactionCustomEmoji({ document_id: BigInt(v.id) })) }) : unreachable(), - }); + await this.#c.invoke({ _: "messages.setChatAvailableReactions", peer: await this.#c.getInputPeer(chatId), available_reactions: availableReactions == "none" ? { _: "chatReactionsNone" } : availableReactions == "all" ? { _: "chatReactionsAll" } : Array.isArray(availableReactions) ? ({ _: "chatReactionsSome", reactions: availableReactions.map((v) => v.type == "emoji" ? ({ _: "reactionEmoji", emoticon: v.emoji }) : ({ _: "reactionCustomEmoji", document_id: BigInt(v.id) })) }) : unreachable() }); } async #sendReaction(chatId: ID, messageId: number, reactions: Reaction[], params?: AddReactionParams) { - await this.#c.api.messages.sendReaction({ - peer: await this.#c.getInputPeer(chatId), - msg_id: checkMessageId(messageId), - reaction: reactions.map((v) => reactionToTlObject(v)), - big: params?.big ? true : undefined, - add_to_recent: params?.addToRecents ? true : undefined, - }); + await this.#c.invoke({ _: "messages.sendReaction", peer: await this.#c.getInputPeer(chatId), msg_id: checkMessageId(messageId), reaction: reactions.map((v) => reactionToTlObject(v)), big: params?.big ? true : undefined, add_to_recent: params?.addToRecents ? true : undefined }); } async setReactions(chatId: ID, messageId: number, reactions: Reaction[], params?: SetReactionsParams) { @@ -1075,37 +909,37 @@ export class MessageManager { } } - static canHandleUpdate(update: enums.Update): update is MessageManagerUpdate { - return update instanceof types.UpdateNewMessage || - update instanceof types.UpdateNewChannelMessage || - update instanceof types.UpdateEditMessage || - update instanceof types.UpdateEditChannelMessage || - update instanceof types.UpdateBotNewBusinessMessage || - update instanceof types.UpdateBotEditBusinessMessage || - update instanceof types.UpdateBotDeleteBusinessMessage || - update instanceof types.UpdateDeleteMessages || - update instanceof types.UpdateDeleteChannelMessages || - update instanceof types.UpdateChannelParticipant || - update instanceof types.UpdateChatParticipant; + static canHandleUpdate(update: Api.Update): update is MessageManagerUpdate { + return is("updateNewMessage", update) || + is("updateNewChannelMessage", update) || + is("updateEditMessage", update) || + is("updateEditChannelMessage", update) || + is("updateBotNewBusinessMessage", update) || + is("updateBotEditBusinessMessage", update) || + is("updateBotDeleteBusinessMessage", update) || + is("updateDeleteMessages", update) || + is("updateDeleteChannelMessages", update) || + is("updateChannelParticipant", update) || + is("updateChatParticipant", update); } async handleUpdate(update: MessageManagerUpdate): Promise { - if (update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditMessage || update instanceof types.UpdateEditChannelMessage) { - if (update.message instanceof types.Message || update.message instanceof types.MessageService) { + if (is("updateNewMessage", update) || is("updateNewChannelMessage", update) || is("updateEditMessage", update) || is("updateEditChannelMessage", update)) { + if (is("message", update.message) || is("messageService", update.message)) { const chatId = peerToChatId(update.message.peer_id); await this.#c.messageStorage.setMessage(chatId, update.message.id, update.message); } } if ( - update instanceof types.UpdateNewMessage || - update instanceof types.UpdateNewChannelMessage || - update instanceof types.UpdateEditMessage || - update instanceof types.UpdateEditChannelMessage || - update instanceof types.UpdateBotNewBusinessMessage || - update instanceof types.UpdateBotEditBusinessMessage + is("updateNewMessage", update) || + is("updateNewChannelMessage", update) || + is("updateEditMessage", update) || + is("updateEditChannelMessage", update) || + is("updateBotNewBusinessMessage", update) || + is("updateBotEditBusinessMessage", update) ) { - if (!(update.message instanceof types.MessageEmpty)) { + if (!(is("messageEmpty", update.message))) { const isOutgoing = update.message.out; let shouldIgnore = isOutgoing ? (await this.#c.storage.getAccountType()) == "user" ? false : true : false; if (this.#c.ignoreOutgoing != null && isOutgoing) { @@ -1114,16 +948,16 @@ export class MessageManager { if (!shouldIgnore) { const business = "connection_id" in update ? { connectionId: update.connection_id, replyToMessage: update.reply_to_message } : undefined; const message = await this.constructMessage(update.message, undefined, business); - if (update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateBotNewBusinessMessage) { - return ({ message }); + if (is("updateNewMessage", update) || is("updateNewChannelMessage", update) || is("updateBotNewBusinessMessage", update)) { + return { message }; } else { - return ({ editedMessage: message }); + return { editedMessage: message }; } } } } - if (update instanceof types.UpdateDeleteMessages) { + if (is("updateDeleteMessages", update)) { const deletedMessages = new Array<{ chatId: number; messageId: number }>(); for (const messageId of update.messages) { const chatId = await this.#c.messageStorage.getMessageChat(messageId); @@ -1134,7 +968,7 @@ export class MessageManager { if (deletedMessages.length > 0) { return { deletedMessages }; } - } else if (update instanceof types.UpdateDeleteChannelMessages) { + } else if (is("updateDeleteChannelMessages", update)) { const chatId = getChannelChatId(update.channel_id); const deletedMessages = new Array<{ chatId: number; messageId: number }>(); for (const messageId of update.messages) { @@ -1144,13 +978,13 @@ export class MessageManager { } } return { deletedMessages }; - } else if (update instanceof types.UpdateBotDeleteBusinessMessage) { + } else if (is("updateBotDeleteBusinessMessage", update)) { const chatId = peerToChatId(update.peer); const deletedMessages = update.messages.map((v) => ({ chatId, messageId: v })); return { deletedMessages, businessConnectionId: update.connection_id }; } - if (update instanceof types.UpdateChannelParticipant || update instanceof types.UpdateChatParticipant) { + if (is("updateChannelParticipant", update) || is("updateChatParticipant", update)) { const chatMember = await constructChatMemberUpdated(update, this.#c.getEntity); const selfId = await this.#c.getSelfId(); if (chatMember.oldChatMember.user.id == selfId) { @@ -1164,83 +998,83 @@ export class MessageManager { } async sendChatAction(chatId: ID, action: ChatAction, params?: SendChatActionParams) { - let action_: enums.SendMessageAction; + let action_: Api.SendMessageAction; switch (action) { case "type": - action_ = new types.SendMessageTypingAction(); + action_ = { _: "sendMessageTypingAction" }; break; case "uploadPhoto": - action_ = new types.SendMessageUploadPhotoAction({ progress: 0 }); + action_ = { _: "sendMessageUploadPhotoAction", progress: 0 }; break; case "recordVideo": - action_ = new types.SendMessageRecordVideoAction(); + action_ = { _: "sendMessageRecordVideoAction" }; break; case "uploadVideo": - action_ = new types.SendMessageRecordVideoAction(); + action_ = { _: "sendMessageRecordVideoAction" }; break; case "recordVoice": - action_ = new types.SendMessageRecordAudioAction(); + action_ = { _: "sendMessageRecordAudioAction" }; break; case "uploadAudio": - action_ = new types.SendMessageUploadAudioAction({ progress: 0 }); + action_ = { _: "sendMessageUploadAudioAction", progress: 0 }; break; case "uploadDocument": - action_ = new types.SendMessageUploadDocumentAction({ progress: 0 }); + action_ = { _: "sendMessageUploadDocumentAction", progress: 0 }; break; case "chooseSticker": - action_ = new types.SendMessageChooseStickerAction(); + action_ = { _: "sendMessageChooseStickerAction" }; break; case "findLocation": - action_ = new types.SendMessageGeoLocationAction(); + action_ = { _: "sendMessageGeoLocationAction" }; break; case "recordVideoNote": - action_ = new types.SendMessageRecordRoundAction(); + action_ = { _: "sendMessageRecordRoundAction" }; break; case "uploadVideoNote": - action_ = new types.SendMessageUploadRoundAction({ progress: 0 }); + action_ = { _: "sendMessageUploadRoundAction", progress: 0 }; break; default: throw new InputError(`Invalid chat action: ${action}`); } - await this.#c.invoke(new functions.messages.setTyping({ peer: await this.#c.getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }), params?.businessConnectionId); + await this.#c.invoke({ _: "messages.setTyping", peer: await this.#c.getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }, params?.businessConnectionId); } async deleteChatPhoto(chatId: number) { const peer = await this.#c.getInputPeer(chatId); - if (!(peer instanceof types.InputPeerChannel) && !(peer instanceof types.InputPeerChat)) { + if (!(is("inputPeerChannel", peer)) && !(is("inputPeerChat", peer))) { unreachable(); } - if (peer instanceof types.InputPeerChannel) { - await this.#c.api.channels.editPhoto({ channel: new types.InputChannel(peer), photo: new types.InputChatPhotoEmpty() }); - } else if (peer instanceof types.InputPeerChat) { - await this.#c.api.messages.editChatPhoto({ chat_id: peer.chat_id, photo: new types.InputChatPhotoEmpty() }); + if (is("inputPeerChannel", peer)) { + await this.#c.invoke({ _: "channels.editPhoto", channel: { ...peer, _: "inputChannel" }, photo: { _: "inputChatPhotoEmpty" } }); + } else if (is("inputPeerChat", peer)) { + await this.#c.invoke({ _: "messages.editChatPhoto", chat_id: peer.chat_id, photo: { _: "inputChatPhotoEmpty" } }); } } async setChatPhoto(chatId: number, photo: FileSource, params?: SetChatPhotoParams): Promise { const peer = await this.#c.getInputPeer(chatId); - if (!(peer instanceof types.InputPeerChannel) && !(peer instanceof types.InputPeerChat)) { + if (!(is("inputPeerChannel", peer)) && !(is("inputPeerChat", peer))) { unreachable(); } const file = await this.#c.fileManager.upload(photo, params); - const photo_ = new types.InputChatUploadedPhoto({ file }); + const photo_: Api.inputChatUploadedPhoto = { _: "inputChatUploadedPhoto", file }; - if (peer instanceof types.InputPeerChannel) { - await this.#c.api.channels.editPhoto({ channel: new types.InputChannel(peer), photo: photo_ }); - } else if (peer instanceof types.InputPeerChat) { - await this.#c.api.messages.editChatPhoto({ chat_id: peer.chat_id, photo: photo_ }); + if (is("inputPeerChannel", peer)) { + await this.#c.invoke({ _: "channels.editPhoto", channel: { ...peer, _: "inputChannel" }, photo: photo_ }); + } else if (is("inputPeerChat", peer)) { + await this.#c.invoke({ _: "messages.editChatPhoto", chat_id: peer.chat_id, photo: photo_ }); } } async banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams) { const chat = await this.#c.getInputPeer(chatId); - if (!(chat instanceof types.InputPeerChannel) && !(chat instanceof types.InputPeerChat)) { + if (!(is("inputPeerChannel", chat)) && !(is("inputPeerChat", chat))) { throw new InputError("Expected a channel, supergroup, or group ID."); } const member = await this.#c.getInputPeer(memberId); - if (chat instanceof types.InputPeerChannel) { + if (is("inputPeerChannel", chat)) { if (params?.deleteMessages) { try { await this.deleteChatMemberMessages(chatId, memberId); @@ -1248,10 +1082,12 @@ export class MessageManager { // } } - await this.#c.api.channels.editBanned({ - channel: new types.InputChannel(chat), + await this.#c.invoke({ + _: "channels.editBanned", + channel: { ...chat, _: "inputChannel" }, participant: member, - banned_rights: new types.ChatBannedRights({ + banned_rights: ({ + _: "chatBannedRights", until_date: params?.untilDate ? toUnixTimestamp(params.untilDate) : 0, // todo view_messages: true, send_messages: true, @@ -1263,50 +1099,32 @@ export class MessageManager { embed_links: true, }), }); - } else if (chat instanceof types.InputPeerChat) { - if (!(member instanceof types.InputPeerUser)) { + } else if (is("inputPeerChat", chat)) { + if (!(is("inputPeerUser", member))) { throw new InputError(`Invalid user ID: ${memberId}`); } - await this.#c.api.messages.deleteChatUser({ - chat_id: chat.chat_id, - user_id: new types.InputUser(member), - revoke_history: params?.deleteMessages ? true : undefined, - }); + await this.#c.invoke({ _: "messages.deleteChatUser", chat_id: chat.chat_id, user_id: { ...member, _: "inputUser" }, revoke_history: params?.deleteMessages ? true : undefined }); } } async unbanChatMember(chatId: ID, memberId: ID) { const channel = await this.#c.getInputChannel(chatId); const member = await this.#c.getInputPeer(memberId); - await this.#c.api.channels.editBanned({ - channel, - participant: member, - banned_rights: new types.ChatBannedRights({ until_date: 0 }), - }); + await this.#c.invoke({ _: "channels.editBanned", channel, participant: member, banned_rights: ({ _: "chatBannedRights", until_date: 0 }) }); } async setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams) { const channel = await this.#c.getInputChannel(chatId); const member = await this.#c.getInputPeer(memberId); - await this.#c.api.channels.editBanned({ - channel, - participant: member, - banned_rights: chatMemberRightsToTlObject(params?.rights, params?.untilDate), - }); + await this.#c.invoke({ _: "channels.editBanned", channel, participant: member, banned_rights: chatMemberRightsToTlObject(params?.rights, params?.untilDate) }); } async getChatAdministrators(chatId: ID) { const peer = await this.#c.getInputPeer(chatId); - if (peer instanceof types.InputPeerChannel) { - const channel = new types.InputChannel(peer); - const participants = await this.#c.api.channels.getParticipants({ - channel, - filter: new types.ChannelParticipantsAdmins(), - offset: 0, - limit: 100, - hash: 0n, - }); - if (participants instanceof types.channels.ChannelParticipantsNotModified) { + if (is("inputPeerChannel", peer)) { + const channel: Api.inputChannel = { ...peer, _: "inputChannel" }; + const participants = await this.#c.invoke({ _: "channels.getParticipants", channel, filter: { _: "channelParticipantsAdmins" }, offset: 0, limit: 100, hash: 0n }); + if (is("channels.channelParticipantsNotModified", participants)) { unreachable(); } const chatMembers = new Array(); @@ -1314,9 +1132,9 @@ export class MessageManager { chatMembers.push(await constructChatMember(p, this.#c.getEntity)); } return chatMembers; - } else if (peer instanceof types.InputPeerChat) { - const fullChat = await this.#c.api.messages.getFullChat(peer); // TODO: full chat cache - if (!(fullChat.full_chat instanceof types.ChatFull) || !(fullChat.full_chat.participants instanceof types.ChatParticipants)) { + } else if (is("inputPeerChat", peer)) { + const fullChat = await this.#c.invoke({ ...peer, _: "messages.getFullChat" }); // TODO: full chat cache + if (!(is("chatFull", fullChat.full_chat)) || !(is("chatParticipants", fullChat.full_chat.participants))) { unreachable(); } const chatMembers = new Array(); @@ -1331,7 +1149,7 @@ export class MessageManager { async #toggleJoinRequests(chatId: ID, enabled: boolean) { const channel = await this.#c.getInputChannel(chatId); - await this.#c.api.channels.toggleJoinRequest({ channel, enabled }); + await this.#c.invoke({ _: "channels.toggleJoinRequest", channel, enabled }); } async enableJoinRequests(chatId: ID) { await this.#c.storage.assertUser("enableJoinRequests"); @@ -1343,20 +1161,7 @@ export class MessageManager { } async searchMessages(chatId: ID, query: string, params?: SearchMessagesParams) { - const result = await this.#c.api.messages.search({ - peer: await this.#c.getInputPeer(chatId), - q: query, - add_offset: 0, - filter: messageSearchFilterToTlObject(params?.filter ?? "empty"), - hash: 0n, - limit: params?.limit ?? 100, - max_date: 0, - max_id: 0, - min_date: 0, - min_id: 0, - offset_id: params?.after ? params.after : 0, - from_id: params?.from ? await this.#c.getInputPeer(params.from) : undefined, - }); + const result = await this.#c.invoke({ _: "messages.search", peer: await this.#c.getInputPeer(chatId), q: query, add_offset: 0, filter: messageSearchFilterToTlObject(params?.filter ?? "empty"), hash: 0n, limit: params?.limit ?? 100, max_date: 0, max_id: 0, min_date: 0, min_id: 0, offset_id: params?.after ? params.after : 0, from_id: params?.from ? await this.#c.getInputPeer(params.from) : undefined }); if (!("messages" in result)) { unreachable(); } @@ -1370,45 +1175,32 @@ export class MessageManager { async setBoostsRequiredToCircumventRestrictions(chatId: ID, boosts: number) { const channel = await this.#c.getInputChannel(chatId); - await this.#c.api.channels.setBoostsToUnblockRestrictions({ channel, boosts }); + await this.#c.invoke({ _: "channels.setBoostsToUnblockRestrictions", channel, boosts }); } async createInviteLink(chatId: ID, params?: CreateInviteLinkParams) { if (params?.requireApproval && params?.limit) { throw new InputError("requireApproval cannot be true while limit is specified."); } - const result = await this.#c.api.messages.exportChatInvite({ - peer: await this.#c.getInputPeer(chatId), - title: params?.title, - expire_date: params?.expireAt ? toUnixTimestamp(params.expireAt) : undefined, - request_needed: params?.requireApproval ? true : undefined, - usage_limit: params?.limit, - }); - return await constructInviteLink(result[as](types.ChatInviteExported), this.#c.getEntity); + const result = await this.#c.invoke({ _: "messages.exportChatInvite", peer: await this.#c.getInputPeer(chatId), title: params?.title, expire_date: params?.expireAt ? toUnixTimestamp(params.expireAt) : undefined, request_needed: params?.requireApproval ? true : undefined, usage_limit: params?.limit }); + return await constructInviteLink(as("chatInviteExported", result), this.#c.getEntity); } async getCreatedInviteLinks(chatId: ID, params?: GetCreatedInviteLinksParams) { await this.#c.storage.assertUser("getCreatedInviteLinks"); - const { invites } = await this.#c.api.messages.getExportedChatInvites({ - peer: await this.#c.getInputPeer(chatId), - revoked: params?.revoked ? true : undefined, - admin_id: params?.by ? await this.#c.getInputUser(params.by) : new types.InputUserEmpty(), - limit: params?.limit ?? 100, - offset_date: params?.afterDate ? toUnixTimestamp(params.afterDate) : undefined, - offset_link: params?.afterInviteLink, - }); - return await Promise.all(invites.map((v) => v[as](types.ChatInviteExported)).map((v) => constructInviteLink(v, this.#c.getEntity))); + const { invites } = await this.#c.invoke({ _: "messages.getExportedChatInvites", peer: await this.#c.getInputPeer(chatId), revoked: params?.revoked ? true : undefined, admin_id: params?.by ? await this.#c.getInputUser(params.by) : { _: "inputUserEmpty" }, limit: params?.limit ?? 100, offset_date: params?.afterDate ? toUnixTimestamp(params.afterDate) : undefined, offset_link: params?.afterInviteLink }); + return await Promise.all(invites.map((v) => as("chatInviteExported", v)).map((v) => constructInviteLink(v, this.#c.getEntity))); } async joinChat(chatId: ID) { await this.#c.storage.assertUser("joinChat"); const peer = await this.#c.getInputPeer(chatId); - if (peer instanceof types.InputPeerUser) { + if (is("inputPeerUser", peer)) { throw new InputError("Cannot join private chats."); - } else if (peer instanceof types.InputPeerChannel) { - await this.#c.api.channels.joinChannel({ channel: new types.InputChannel(peer) }); - } else if (peer instanceof types.InputPeerChat) { - await this.#c.api.messages.addChatUser({ chat_id: peer.chat_id, user_id: new types.InputUserSelf(), fwd_limit: 0 }); // TODO: use potential high-level method for adding participants to chats + } else if (is("inputPeerChannel", peer)) { + await this.#c.invoke({ _: "channels.joinChannel", channel: { ...peer, _: "inputChannel" } }); + } else if (is("inputPeerChat", peer)) { + await this.#c.invoke({ _: "messages.addChatUser", chat_id: peer.chat_id, user_id: { _: "inputUserSelf" }, fwd_limit: 0 }); // TODO: use potential high-level method for adding participants to chats } else { unreachable(); } @@ -1416,12 +1208,12 @@ export class MessageManager { async leaveChat(chatId: ID) { const peer = await this.#c.getInputPeer(chatId); - if (peer instanceof types.InputPeerUser) { + if (is("inputPeerUser", peer)) { throw new InputError("Cannot leave private chats."); - } else if (peer instanceof types.InputPeerChannel) { - await this.#c.api.channels.leaveChannel({ channel: new types.InputChannel(peer) }); - } else if (peer instanceof types.InputPeerChat) { - await this.#c.api.messages.deleteChatUser({ chat_id: peer.chat_id, user_id: new types.InputUserSelf() }); // TODO: use potential high-level method for adding participants to chats + } else if (is("inputPeerChannel", peer)) { + await this.#c.invoke({ _: "channels.leaveChannel", channel: { ...peer, _: "inputChannel" } }); + } else if (is("inputPeerChat", peer)) { + await this.#c.invoke({ _: "messages.deleteChatUser", chat_id: peer.chat_id, user_id: { _: "inputUserSelf" } }); // TODO: use potential high-level method for adding participants to chats } else { unreachable(); } @@ -1430,34 +1222,31 @@ export class MessageManager { async blockUser(userId: ID) { await this.#c.storage.assertUser("blockUser"); const id = await this.#c.getInputPeer(userId); - if (!(id instanceof types.User)) { + if (!(is("user", id))) { throw new InputError("Only users can be blocked or unblocked."); } - await this.#c.api.contacts.block({ id }); + await this.#c.invoke({ _: "contacts.block", id }); } async unblockUser(userId: ID) { await this.#c.storage.assertUser("unblockUser"); const id = await this.#c.getInputPeer(userId); - if (!(id instanceof types.User)) { + if (!(is("user", id))) { throw new InputError("Only users can be blocked or unblocked."); } - await this.#c.api.contacts.unblock({ id }); + await this.#c.invoke({ _: "contacts.unblock", id }); } async getChatMember(chatId: ID, userId: ID) { const peer = await this.#c.getInputPeer(chatId); - if (peer instanceof types.InputPeerChannel) { - const { participant } = await this.#c.api.channels.getParticipant({ - channel: new types.InputChannel(peer), - participant: await this.#c.getInputPeer(userId), - }); + if (is("inputPeerChannel", peer)) { + const { participant } = await this.#c.invoke({ _: "channels.getParticipant", channel: { ...peer, _: "inputChannel" }, participant: await this.#c.getInputPeer(userId) }); return await constructChatMember(participant, this.#c.getEntity); - } else if (peer instanceof types.InputPeerChat) { + } else if (is("inputPeerChat", peer)) { const user = await this.#c.getInputUser(userId); - const fullChat = await this.#c.api.messages.getFullChat(peer).then((v) => v.full_chat[as](types.ChatFull)); - const participant = fullChat.participants[as](types.ChatParticipants).participants.find((v) => v.user_id == user.user_id)!; + const fullChat = await this.#c.invoke({ ...peer, _: "messages.getFullChat" }).then((v) => as("chatFull", v.full_chat)); + const participant = as("chatParticipants", fullChat.participants).participants.find((v) => v.user_id == user.user_id)!; return await constructChatMember(participant, this.#c.getEntity); } else { throw new InputError("Expected a channel, supergroup, or group ID. Got a user ID instead."); @@ -1466,12 +1255,12 @@ export class MessageManager { async setChatStickerSet(chatId: ID, setName: string) { const channel = await this.#c.getInputChannel(chatId); - await this.#c.api.channels.setStickers({ channel, stickerset: new types.InputStickerSetShortName({ short_name: setName }) }); + await this.#c.invoke({ _: "channels.setStickers", channel, stickerset: { _: "inputStickerSetShortName", short_name: setName } }); } async deleteChatStickerSet(chatId: ID) { const channel = await this.#c.getInputChannel(chatId); - await this.#c.api.channels.setStickers({ channel, stickerset: new types.InputStickerSetEmpty() }); + await this.#c.invoke({ _: "channels.setStickers", channel, stickerset: { _: "inputStickerSetEmpty" } }); } async stopPoll(chatId: ID, messageId: number, params?: StopPollParams) { @@ -1486,19 +1275,7 @@ export class MessageManager { throw new InputError("Poll is already stopped."); } - const result = await this.#c.api.messages.editMessage({ - peer: await this.#c.getInputPeer(chatId), - id: messageId, - media: new types.InputMediaPoll({ - poll: new types.Poll({ - id: BigInt(message.poll.id), - closed: true, - question: "", - answers: [], - }), - }), - reply_markup: await this.#constructReplyMarkup(params), - }); + const result = await this.#c.invoke({ _: "messages.editMessage", peer: await this.#c.getInputPeer(chatId), id: messageId, media: ({ _: "inputMediaPoll", poll: ({ _: "poll", id: BigInt(message.poll.id), closed: true, question: "", answers: [] }) }), reply_markup: await this.#constructReplyMarkup(params) }); const message_ = await this.#updatesToMessages(chatId, result).then((v) => v[0]); return assertMessageType(message_, "poll").poll; @@ -1507,20 +1284,7 @@ export class MessageManager { async editMessageLiveLocation(chatId: ID, messageId: number, latitude: number, longitude: number, params?: EditMessageLiveLocationParams) { const message = await this.getMessage(chatId, messageId); if (message && "location" in message && message.location.livePeriod) { - const result = await this.#c.api.messages.editMessage({ - peer: await this.#c.getInputPeer(chatId), - id: messageId, - media: new types.InputMediaGeoLive({ - geo_point: new types.InputGeoPoint({ - lat: latitude, - long: longitude, - accuracy_radius: params?.horizontalAccuracy, - }), - heading: params?.heading, - proximity_notification_radius: params?.proximityAlertRadius, - }), - reply_markup: await this.#constructReplyMarkup(params), - }); + const result = await this.#c.invoke({ _: "messages.editMessage", peer: await this.#c.getInputPeer(chatId), id: messageId, media: ({ _: "inputMediaGeoLive", geo_point: ({ _: "inputGeoPoint", lat: latitude, long: longitude, accuracy_radius: params?.horizontalAccuracy }), heading: params?.heading, proximity_notification_radius: params?.proximityAlertRadius }), reply_markup: await this.#constructReplyMarkup(params) }); const message = await this.#updatesToMessages(chatId, result).then((v) => v[0]); return assertMessageType(message, "location"); @@ -1531,18 +1295,6 @@ export class MessageManager { async editInlineMessageLiveLocation(inlineMessageId: string, latitude: number, longitude: number, params?: EditMessageLiveLocationParams) { await this.#c.storage.assertBot("editInlineMessageLiveLocation"); const id = deserializeInlineMessageId(inlineMessageId); - await this.#c.api.messages.editInlineBotMessage({ - id, - media: new types.InputMediaGeoLive({ - geo_point: new types.InputGeoPoint({ - lat: latitude, - long: longitude, - accuracy_radius: params?.horizontalAccuracy, - }), - heading: params?.heading, - proximity_notification_radius: params?.proximityAlertRadius, - }), - reply_markup: await this.#constructReplyMarkup(params), - }); + await this.#c.invoke({ _: "messages.editInlineBotMessage", id, media: ({ _: "inputMediaGeoLive", geo_point: ({ _: "inputGeoPoint", lat: latitude, long: longitude, accuracy_radius: params?.horizontalAccuracy }), heading: params?.heading, proximity_notification_radius: params?.proximityAlertRadius }), reply_markup: await this.#constructReplyMarkup(params) }); } } diff --git a/client/3_video_chat_manager.ts b/client/3_video_chat_manager.ts index 7936c9d9..eab63457 100644 --- a/client/3_video_chat_manager.ts +++ b/client/3_video_chat_manager.ts @@ -21,7 +21,7 @@ import { unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { getRandomId, toUnixTimestamp, ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { as, enums, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; import { constructLiveStreamChannel, constructVideoChat, ID, Update, VideoChatActive, VideoChatScheduled } from "../3_types.ts"; import { DownloadLiveStreamChunkParams, JoinVideoChatParams, StartVideoChatParams } from "./0_params.ts"; import { C as C_ } from "./1_types.ts"; @@ -31,7 +31,7 @@ interface C extends C_ { fileManager: FileManager; } -type VideoChatManagerUpdate = types.UpdateGroupCall; +type VideoChatManagerUpdate = Api.updateGroupCall; export class VideoChatManager { #c: C; @@ -42,18 +42,12 @@ export class VideoChatManager { async #createGroupCall(chatId: ID, title?: string, liveStream?: true, scheduleDate?: Date) { const peer = await this.#c.getInputPeer(chatId); - if (peer instanceof types.InputPeerUser) { + if (is("inputPeerUser", peer)) { throw new InputError("Video chats are only available for groups and channels."); } - const { updates } = await this.#c.api.phone.createGroupCall({ - peer, - random_id: getRandomId(true), - title, - rtmp_stream: liveStream, - schedule_date: scheduleDate ? toUnixTimestamp(scheduleDate) : undefined, - }).then((v) => v[as](types.Updates)); + const { updates } = await this.#c.invoke({ _: "phone.createGroupCall", peer, random_id: getRandomId(true), title, rtmp_stream: liveStream, schedule_date: scheduleDate ? toUnixTimestamp(scheduleDate) : undefined }).then((v) => as("updates", v)); const updateGroupCall = updates - .find((v): v is types.UpdateGroupCall => v instanceof types.UpdateGroupCall); + .find((v): v is Api.updateGroupCall => is("updateGroupCall", v)); if (!updateGroupCall) { unreachable(); } @@ -70,44 +64,39 @@ export class VideoChatManager { return await this.#createGroupCall(chatId, params?.title, params?.liveStream || undefined, startAt) as VideoChatScheduled; } - async #getInputGroupCall(id_: string) { + async #getInputGroupCall(id_: string): Promise { const id = BigInt(id_); const accessHash = await this.#c.storage.getGroupCallAccessHash(id); if (accessHash == null) { throw new InputError("Video chat not found."); } - return new types.InputGroupCall({ id, access_hash: accessHash }); + return { _: "inputGroupCall", id, access_hash: accessHash }; } async joinVideoChat(id: string, params: string, params_?: JoinVideoChatParams) { await this.#c.storage.assertUser("joinVideoChat"); const call = await this.#getInputGroupCall(id); - const { updates } = await this.#c.api.phone.joinGroupCall({ - call, - join_as: params_?.joinAs ? await this.#c.getInputPeer(params_.joinAs) : new types.InputPeerSelf(), - params: new types.DataJSON({ data: params }), - invite_hash: params_?.inviteHash, - muted: params_?.audio ? undefined : true, - video_stopped: params_?.video ? undefined : true, - }).then((v) => v[as](types.Updates)); + const { updates } = await this.#c.invoke({ _: "phone.joinGroupCall", call, join_as: params_?.joinAs ? await this.#c.getInputPeer(params_.joinAs) : { _: "inputPeerSelf" }, params: ({ _: "dataJSON", data: params }), invite_hash: params_?.inviteHash, muted: params_?.audio ? undefined : true, video_stopped: params_?.video ? undefined : true }).then((v) => as("updates", v)); const updateGroupCall = updates - .find((v): v is types.UpdateGroupCallConnection => v instanceof types.UpdateGroupCallConnection); + .find((v): v is Api.updateGroupCallConnection => is("updateGroupCallConnection", v)); if (!updateGroupCall) unreachable(); return updateGroupCall.params.data; } async leaveVideoChat(id: string) { await this.#c.storage.assertUser("leaveVideoChat"); - await this.#c.api.phone.leaveGroupCall({ call: await this.#getInputGroupCall(id), source: 0 }); + await this.#c.invoke({ _: "phone.leaveGroupCall", call: await this.#getInputGroupCall(id), source: 0 }); } async joinLiveStream(id: string) { await this.#c.storage.assertUser("joinLiveStream"); const call = await this.#getInputGroupCall(id); - const { updates } = await this.#c.api.phone.joinGroupCall({ + const { updates } = await this.#c.invoke({ + _: "phone.joinGroupCall", call, - join_as: new types.InputPeerSelf(), - params: new types.DataJSON({ + join_as: { _: "inputPeerSelf" }, + params: ({ + _: "dataJSON", data: JSON.stringify({ fingerprints: [], pwd: "", @@ -116,17 +105,17 @@ export class VideoChatManager { ufrag: "", }), }), - }).then((v) => v[as](types.Updates)); + }).then((v) => as("updates", v)); const updateGroupCall = updates - .find((v): v is types.UpdateGroupCallConnection => v instanceof types.UpdateGroupCallConnection); + .find((v): v is Api.updateGroupCallConnection => is("updateGroupCallConnection", v)); if (!updateGroupCall) unreachable(); } async #getCall(id: string) { - let groupCall: enums.GroupCall | null = await this.#c.storage.getGroupCall(BigInt(id)); + let groupCall: Api.GroupCall | null = await this.#c.storage.getGroupCall(BigInt(id)); if (groupCall == null) { const call = await this.#getInputGroupCall(id); - groupCall = await this.#c.api.phone.getGroupCall({ call, limit: 1 }).then((v) => v.call); + groupCall = await this.#c.invoke({ _: "phone.getGroupCall", call, limit: 1 }).then((v) => v.call); } return groupCall!; } @@ -135,15 +124,15 @@ export class VideoChatManager { return constructVideoChat(await this.#getCall(id)); } - static canHandleUpdate(update: enums.Update): update is VideoChatManagerUpdate { - return update instanceof types.UpdateGroupCall; + static canHandleUpdate(update: Api.Update): update is VideoChatManagerUpdate { + return is("updateGroupCall", update); } async handleUpdate(update: VideoChatManagerUpdate): Promise { let chatId = Number(-update.chat_id); - const fullChat = await this.#c.storage.getFullChat(chatId).then((v) => v == null ? this.#c.storage.getFullChat(chatId = ZERO_CHANNEL_ID - Number(update.chat_id)) : v) as types.ChannelFull | types.ChatFull | null; + const fullChat = await this.#c.storage.getFullChat(chatId).then((v) => v == null ? this.#c.storage.getFullChat(chatId = ZERO_CHANNEL_ID - Number(update.chat_id)) : v) as Api.channelFull | Api.chatFull | null; let updateFullChat = false; - if (update.call instanceof types.GroupCallDiscarded) { + if (is("groupCallDiscarded", update.call)) { await this.#c.storage.setGroupCall(update.call.id, null); await this.#c.storage.setGroupCallAccessHash(update.call.id, null); if (fullChat != null) { @@ -155,7 +144,7 @@ export class VideoChatManager { await this.#c.storage.setGroupCallAccessHash(update.call.id, update.call.access_hash); if (fullChat != null) { if (!("call" in fullChat) || !fullChat.call || fullChat.call.id != update.call.id) { - fullChat.call = new types.InputGroupCall(update.call); + fullChat.call = { ...update.call, _: "inputGroupCall" }; updateFullChat = true; } } @@ -169,13 +158,13 @@ export class VideoChatManager { async getLiveStreamChannels(id: string) { await this.#c.storage.assertUser("getLiveStreamChannels"); const call = await this.#getCall(id); - if (!(call instanceof types.GroupCall) || !call.rtmp_stream) { + if (!(is("groupCall", call)) || !call.rtmp_stream) { throw new InputError("Not a live stream."); } const client = this.#c.getCdnConnection(call.stream_dc_id); await client.connect(); try { - const streams = await client.api.phone.getGroupCallStreamChannels({ call: await this.#getInputGroupCall(id) }); + const streams = await client.invoke({ _: "phone.getGroupCallStreamChannels", call: await this.#getInputGroupCall(id) }); return streams.channels.map(constructLiveStreamChannel); } finally { await client.disconnect(); @@ -185,19 +174,20 @@ export class VideoChatManager { async *downloadLiveStreamChunk(id: string, channel: number, scale: number, timestamp: number, params?: DownloadLiveStreamChunkParams) { await this.#c.storage.assertUser("downloadLiveStreamChunk"); const call = await this.#getCall(id); - if (!(call instanceof types.GroupCall) || !call.rtmp_stream) { + if (!(is("groupCall", call)) || !call.rtmp_stream) { throw new InputError("Not a live stream."); } const quality = params?.quality ?? "low"; - const location = new types.InputGroupCallStream({ - call: new types.InputGroupCall(call), + const location: Api.inputGroupCallStream = { + _: "inputGroupCallStream", + call: { ...call, _: "inputGroupCall" }, scale, time_ms: BigInt(timestamp), video_channel: channel, video_quality: quality == "low" ? 0 : quality == "medium" ? 1 : quality == "high" ? 2 : (() => { throw new InputError("Got invalid quality."); })(), - }); + }; yield* this.#c.fileManager.downloadInner(location, call.stream_dc_id ?? unreachable()); } } diff --git a/client/4_callback_query_manager.ts b/client/4_callback_query_manager.ts index cc8b12d7..4c704af0 100644 --- a/client/4_callback_query_manager.ts +++ b/client/4_callback_query_manager.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { enums, peerToChatId, types } from "../2_tl.ts"; +import { Api, isOneOf, peerToChatId } from "../2_tl.ts"; import { CallbackQueryQuestion, constructCallbackQuery, constructCallbackQueryAnswer, ID, Update, validateCallbackQueryQuestion } from "../3_types.ts"; import { AnswerCallbackQueryParams } from "./0_params.ts"; import { C as C_ } from "./1_types.ts"; @@ -28,7 +28,7 @@ import { checkPassword } from "./0_password.ts"; type C = C_ & { messageManager: MessageManager }; -type CallbackQueryManagerUpdate = types.UpdateBotCallbackQuery | types.UpdateInlineBotCallbackQuery; +type CallbackQueryManagerUpdate = Api.updateBotCallbackQuery | Api.updateInlineBotCallbackQuery; export class CallbackQueryManager { #c: C; @@ -40,12 +40,7 @@ export class CallbackQueryManager { async answerCallbackQuery(id: string, params?: AnswerCallbackQueryParams) { await this.#c.storage.assertBot("answerCallbackQuery"); checkCallbackQueryId(id); - await this.#c.api.messages.setBotCallbackAnswer({ - query_id: BigInt(id), - cache_time: params?.cacheTime ?? 0, - message: params?.text, - alert: params?.alert ? true : undefined, - }); + await this.#c.invoke({ _: "messages.setBotCallbackAnswer", query_id: BigInt(id), cache_time: params?.cacheTime ?? 0, message: params?.text, alert: params?.alert ? true : undefined }); } static #enc = new TextEncoder(); @@ -58,13 +53,7 @@ export class CallbackQueryManager { if (maybeAnswer != null && !CallbackQueryManager.#isExpired(maybeAnswer[1], maybeAnswer[0].cache_time)) { return constructCallbackQueryAnswer(maybeAnswer[0]); } - const answer = await this.#c.api.messages.getBotCallbackAnswer({ - peer, - msg_id: messageId, - data: "data" in question ? CallbackQueryManager.#enc.encode(question.data) : undefined, - game: question.type == "game" ? true : undefined, - password: question.type == "password" ? await this.#getPasswordCheck(question.password) : undefined, - }); + const answer = await this.#c.invoke({ _: "messages.getBotCallbackAnswer", peer, msg_id: messageId, data: "data" in question ? CallbackQueryManager.#enc.encode(question.data) : undefined, game: question.type == "game" ? true : undefined, password: question.type == "password" ? await this.#getPasswordCheck(question.password) : undefined }); if (answer.cache_time >= 0) { await this.#c.messageStorage.setCallbackQueryAnswer(peerId, messageId, questionKey, answer); } @@ -76,12 +65,12 @@ export class CallbackQueryManager { } async #getPasswordCheck(password: string) { - const ap = await this.#c.api.account.getPassword(); + const ap = await this.#c.invoke({ _: "account.getPassword" }); return await checkPassword(password, ap); } - static canHandleUpdate(update: enums.Update): update is CallbackQueryManagerUpdate { - return update instanceof types.UpdateBotCallbackQuery || update instanceof types.UpdateInlineBotCallbackQuery; + static canHandleUpdate(update: Api.Update): update is CallbackQueryManagerUpdate { + return isOneOf(["updateBotCallbackQuery", "updateInlineBotCallbackQuery"], update); } async handleUpdate(update: CallbackQueryManagerUpdate): Promise { diff --git a/client/4_chat_list_manager.ts b/client/4_chat_list_manager.ts index 61d7c47a..a3629780 100644 --- a/client/4_chat_list_manager.ts +++ b/client/4_chat_list_manager.ts @@ -21,7 +21,7 @@ import { unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { getLogger, Logger, toUnixTimestamp } from "../1_utilities.ts"; -import { enums, peerToChatId, types } from "../2_tl.ts"; +import { Api, is, peerToChatId } from "../2_tl.ts"; import { ChatListItem, constructChat, constructChatListItem, constructChatListItem3, constructChatListItem4, getChatListItemOrder, ID } from "../3_types.ts"; import { C as C_ } from "./1_types.ts"; import { getChatListId } from "./0_utilities.ts"; @@ -31,14 +31,14 @@ import { MessageManager } from "./3_message_manager.ts"; type C = C_ & { fileManager: FileManager; messageManager: MessageManager }; type ChatListManagerUpdate = - | types.UpdateNewMessage - | types.UpdateNewChannelMessage - | types.UpdatePinnedDialogs - | types.UpdateFolderPeers - | types.UpdateChannel - | types.UpdateChat - | types.UpdateUser - | types.UpdateUserName; + | Api.updateNewMessage + | Api.updateNewChannelMessage + | Api.updatePinnedDialogs + | Api.updateFolderPeers + | Api.updateChannel + | Api.updateChat + | Api.updateUser + | Api.updateUserName; export class ChatListManager { #c: C; @@ -224,7 +224,7 @@ export class ChatListManager { } async #fetchPinnedChats(listId: number | null = null) { if (listId == null || listId == 0) { - const dialogs = await this.#c.api.messages.getPinnedDialogs({ folder_id: 0 }); + const dialogs = await this.#c.invoke({ _: "messages.getPinnedDialogs", folder_id: 0 }); const pinnedChats = new Array(); for (const dialog of dialogs.dialogs) { pinnedChats.push(peerToChatId(dialog.peer)); @@ -233,7 +233,7 @@ export class ChatListManager { await this.#c.storage.setPinnedChats(0, this.#pinnedChats); } if (listId == null || listId == 1) { - const dialogs = await this.#c.api.messages.getPinnedDialogs({ folder_id: 1 }); + const dialogs = await this.#c.invoke({ _: "messages.getPinnedDialogs", folder_id: 1 }); const pinnedArchiveChats = new Array(); for (const dialog of dialogs.dialogs) { pinnedArchiveChats.push(peerToChatId(dialog.peer)); @@ -286,7 +286,7 @@ export class ChatListManager { await this.#sendChatUpdate(chatId, false); } } - async #handleUpdateFolderPeers(update: types.UpdateFolderPeers) { + async #handleUpdateFolderPeers(update: Api.updateFolderPeers) { for (const { peer, folder_id: listId } of update.folder_peers) { const chatId = peerToChatId(peer); const [chat, currentListId] = this.#getChatAnywhere(chatId); @@ -297,7 +297,7 @@ export class ChatListManager { } } } - async #handleUpdatePinnedDialogs(update: types.UpdatePinnedDialogs) { + async #handleUpdatePinnedDialogs(update: Api.updatePinnedDialogs) { const listId = update.folder_id ?? 0; await this.#fetchPinnedChats(update.folder_id); const chats = this.#getChatList(listId); @@ -320,36 +320,36 @@ export class ChatListManager { await this.#c.storage.setPinnedChats(listId, await this.#getPinnedChats(listId)); } - async #handleUpdateChannel(update: types.UpdateChannel) { - const peer = new types.PeerChannel(update); + async #handleUpdateChannel(update: Api.updateChannel) { + const peer: Api.peerChannel = { ...update, _: "peerChannel" }; const channel = await this.#c.getEntity(peer); const chatId = peerToChatId(peer); await this.#c.storage.setFullChat(chatId, null); if (channel != null && "left" in channel && channel.left) { await this.#removeChat(chatId); - } else if (channel instanceof types.ChannelForbidden) { + } else if (is("channelForbidden", channel)) { await this.#removeChat(chatId); - } else if (channel instanceof types.Channel) { + } else if (is("channel", channel)) { await this.#updateOrAddChat(chatId); } } - async #handleUpdateChat(update: types.UpdateChat) { // TODO: handle deactivated (migration) - const peer = new types.PeerChat(update); + async #handleUpdateChat(update: Api.updateChat) { // TODO: handle deactivated (migration) + const peer: Api.peerChat = { ...update, _: "peerChat" }; const chat = await this.#c.getEntity(peer); const chatId = peerToChatId(peer); await this.#c.storage.setFullChat(chatId, null); if (chat != null && "left" in chat && chat.left) { await this.#removeChat(chatId); - } else if (chat instanceof types.ChatForbidden) { + } else if (is("chatForbidden", chat)) { await this.#removeChat(chatId); - } else if (chat instanceof types.Chat) { + } else if (is("chat", chat)) { await this.#updateOrAddChat(chatId); } } - async #handleUpdateUser(update: types.UpdateUser | types.UpdateUserName) { - const peer = new types.PeerUser(update); + async #handleUpdateUser(update: Api.updateUser | Api.updateUserName) { + const peer: Api.peerUser = { ...update, _: "peerUser" }; const chat = await this.#c.getEntity(peer); const chatId = peerToChatId(peer); await this.#c.storage.setFullChat(chatId, null); @@ -359,16 +359,9 @@ export class ChatListManager { } async #fetchChats(listId: number, limit: number, after?: ChatListItem) { - const dialogs = await this.#c.api.messages.getDialogs({ - limit, - offset_id: after?.lastMessage?.id ?? 0, - offset_date: after?.lastMessage?.date ? toUnixTimestamp(after.lastMessage.date) : 0, - offset_peer: after ? await this.#c.getInputPeer(after.chat.id) : new types.InputPeerEmpty(), - hash: 0n, - folder_id: listId, - }); + const dialogs = await this.#c.invoke({ _: "messages.getDialogs", limit, offset_id: after?.lastMessage?.id ?? 0, offset_date: after?.lastMessage?.date ? toUnixTimestamp(after.lastMessage.date) : 0, offset_peer: after ? await this.#c.getInputPeer(after.chat.id) : { _: "inputPeerEmpty" }, hash: 0n, folder_id: listId }); const pinnedChats = await this.#getPinnedChats(listId); - if (!(dialogs instanceof types.messages.Dialogs) && !(dialogs instanceof types.messages.DialogsSlice)) { + if (!(is("messages.dialogs", dialogs)) && !(is("messages.dialogsSlice", dialogs))) { unreachable(); } if (dialogs.dialogs.length < limit) { @@ -410,25 +403,25 @@ export class ChatListManager { return chats; } - static canHandleUpdate(update: enums.Update): update is ChatListManagerUpdate { - return update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdatePinnedDialogs || update instanceof types.UpdateFolderPeers || update instanceof types.UpdateChannel || update instanceof types.UpdateChat || update instanceof types.UpdateUser || update instanceof types.UpdateUserName; + static canHandleUpdate(update: Api.Update): update is ChatListManagerUpdate { + return is("updateNewMessage", update) || is("updateNewChannelMessage", update) || is("updatePinnedDialogs", update) || is("updateFolderPeers", update) || is("updateChannel", update) || is("updateChat", update) || is("updateUser", update) || is("updateUserName", update); } async handleUpdate(update: ChatListManagerUpdate) { - if (update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditMessage || update instanceof types.UpdateEditChannelMessage) { - if (update.message instanceof types.Message || update.message instanceof types.MessageService) { + if (is("updateNewMessage", update) || is("updateNewChannelMessage", update) || is("updateEditMessage", update) || is("updateEditChannelMessage", update)) { + if (is("message", update.message) || is("messageService", update.message)) { const chatId = peerToChatId(update.message.peer_id); await this.reassignChatLastMessage(chatId); } - } else if (update instanceof types.UpdatePinnedDialogs) { + } else if (is("updatePinnedDialogs", update)) { await this.#handleUpdatePinnedDialogs(update); - } else if (update instanceof types.UpdateFolderPeers) { + } else if (is("updateFolderPeers", update)) { await this.#handleUpdateFolderPeers(update); - } else if (update instanceof types.UpdateChannel) { + } else if (is("updateChannel", update)) { await this.#handleUpdateChannel(update); - } else if (update instanceof types.UpdateChat) { + } else if (is("updateChat", update)) { await this.#handleUpdateChat(update); - } else if (update instanceof types.UpdateUser || update instanceof types.UpdateUserName) { + } else if (is("updateUser", update) || is("updateUserName", update)) { await this.#handleUpdateUser(update); } else { unreachable(); @@ -442,12 +435,12 @@ export class ChatListManager { if (fullChat != null) { return fullChat; } - if (inputPeer instanceof types.InputPeerUser) { - fullChat = await this.#c.api.users.getFullUser({ id: new types.InputUser(inputPeer) }).then((v) => v.full_user); - } else if (inputPeer instanceof types.InputPeerChat) { - fullChat = await this.#c.api.messages.getFullChat(inputPeer).then((v) => v.full_chat); - } else if (inputPeer instanceof types.InputPeerChannel) { - fullChat = await this.#c.api.channels.getFullChannel({ channel: new types.InputChannel(inputPeer) }).then((v) => v.full_chat); + if (is("inputPeerUser", inputPeer)) { + fullChat = await this.#c.invoke({ _: "users.getFullUser", id: { ...inputPeer, _: "inputUser" } }).then((v) => v.full_user); + } else if (is("inputPeerChat", inputPeer)) { + fullChat = await this.#c.invoke({ ...inputPeer, _: "messages.getFullChat" }).then((v) => v.full_chat); + } else if (is("inputPeerChannel", inputPeer)) { + fullChat = await this.#c.invoke({ _: "channels.getFullChannel", channel: { ...inputPeer, _: "inputChannel" } }).then((v) => v.full_chat); } await this.#c.storage.setFullChat(chatId_, fullChat); if (fullChat != null && "call" in fullChat && fullChat.call) { diff --git a/client/4_inline_query_manager.ts b/client/4_inline_query_manager.ts index 98035f98..dae6933d 100644 --- a/client/4_inline_query_manager.ts +++ b/client/4_inline_query_manager.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, peerToChatId, types } from "../2_tl.ts"; +import { Api, is, peerToChatId } from "../2_tl.ts"; import { constructChosenInlineResult, constructInlineQuery, constructInlineQueryAnswer, ID, InlineQueryResult, inlineQueryResultToTlObject, Update } from "../3_types.ts"; import { AnswerInlineQueryParams, SendInlineQueryParams } from "./0_params.ts"; import { C as C_ } from "./1_types.ts"; @@ -28,7 +28,7 @@ import { MessageManager } from "./3_message_manager.ts"; type C = C_ & { messageManager: MessageManager }; -type InlineQueryManagerUpdate = types.UpdateBotInlineQuery | types.UpdateBotInlineSend; +type InlineQueryManagerUpdate = Api.updateBotInlineQuery | Api.updateBotInlineSend; export class InlineQueryManager { #c: C; @@ -40,26 +40,17 @@ export class InlineQueryManager { async answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams) { await this.#c.storage.assertBot("answerInlineQuery"); checkInlineQueryId(id); - await this.#c.api.messages.setInlineBotResults({ - query_id: BigInt(id), - results: await Promise.all(results.map((v) => inlineQueryResultToTlObject(v, this.#c.messageManager.parseText.bind(this.#c.messageManager), this.#c.messageManager.usernameResolver.bind(this.#c.messageManager)))), - cache_time: params?.cacheTime ?? 300, - private: params?.isPersonal ? true : undefined, - switch_webview: params?.button && params.button.miniApp ? new types.InlineBotWebView({ text: params.button.text, url: params.button.miniApp.url }) : undefined, - switch_pm: params?.button && params.button.startParameter ? new types.InlineBotSwitchPM({ text: params.button.text, start_param: params.button.startParameter }) : undefined, - gallery: params?.isGallery ? true : undefined, - next_offset: params?.nextOffset, - }); + await this.#c.invoke({ _: "messages.setInlineBotResults", query_id: BigInt(id), results: await Promise.all(results.map((v) => inlineQueryResultToTlObject(v, this.#c.messageManager.parseText.bind(this.#c.messageManager), this.#c.messageManager.usernameResolver.bind(this.#c.messageManager)))), cache_time: params?.cacheTime ?? 300, private: params?.isPersonal ? true : undefined, switch_webview: params?.button && params.button.miniApp ? ({ _: "inlineBotWebView", text: params.button.text, url: params.button.miniApp.url }) : undefined, switch_pm: params?.button && params.button.startParameter ? ({ _: "inlineBotSwitchPM", text: params.button.text, start_param: params.button.startParameter }) : undefined, gallery: params?.isGallery ? true : undefined, next_offset: params?.nextOffset }); } - static canHandleUpdate(update: enums.Update): update is InlineQueryManagerUpdate { - return update instanceof types.UpdateBotInlineQuery || update instanceof types.UpdateBotInlineSend; + static canHandleUpdate(update: Api.Update): update is InlineQueryManagerUpdate { + return is("updateBotInlineQuery", update) || is("updateBotInlineSend", update); } async handleUpdate(update: InlineQueryManagerUpdate): Promise { - if (update instanceof types.UpdateBotInlineQuery) { + if (is("updateBotInlineQuery", update)) { return { inlineQuery: await constructInlineQuery(update, this.#c.getEntity) }; - } else if (update instanceof types.UpdateBotInlineSend) { + } else if (is("updateBotInlineSend", update)) { return { chosenInlineResult: await constructChosenInlineResult(update, this.#c.getEntity) }; } else { unreachable(); @@ -78,7 +69,7 @@ export class InlineQueryManager { return constructInlineQueryAnswer(maybeResults[0]); } const then = new Date(); - const results = await this.#c.api.messages.getInlineBotResults({ bot, peer, query, offset }); + const results = await this.#c.invoke({ _: "messages.getInlineBotResults", bot, peer, query, offset }); if (results.cache_time > 0) { await this.#c.messageStorage.setInlineQueryAnswer(botId, peerId, query, offset, results, then); } diff --git a/client/4_story_manager.ts b/client/4_story_manager.ts index bd36bfb9..1bd56623 100644 --- a/client/4_story_manager.ts +++ b/client/4_story_manager.ts @@ -21,7 +21,7 @@ import { contentType, unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { getRandomId } from "../1_utilities.ts"; -import { as, enums, inputPeerToPeer, peerToChatId, types } from "../2_tl.ts"; +import { Api, as, inputPeerToPeer, is, peerToChatId } from "../2_tl.ts"; import { constructStory, FileType, ID, Story, storyInteractiveAreaToTlObject, storyPrivacyToTlObject, Update } from "../3_types.ts"; import { InputStoryContent } from "../types/1_input_story_content.ts"; import { CreateStoryParams } from "./0_params.ts"; @@ -32,7 +32,7 @@ import { MessageManager } from "./3_message_manager.ts"; type C = C_ & { fileManager: FileManager; messageManager: MessageManager }; -type StoryManagerUpdate = types.UpdateStory; +type StoryManagerUpdate = Api.updateStory; export class StoryManager { #c: C; @@ -41,10 +41,10 @@ export class StoryManager { this.#c = c; } - async #updatesToStory(updates: enums.Updates) { - if (updates instanceof types.Updates) { - const updateStory = updates.updates.find((v): v is types.UpdateStory => v instanceof types.UpdateStory); - if (updateStory && updateStory.story instanceof types.StoryItem) { + async #updatesToStory(updates: Api.Updates) { + if (is("updates", updates)) { + const updateStory = updates.updates.find((v): v is Api.updateStory => is("updateStory", v)); + if (updateStory && is("storyItem", updateStory.story)) { return await constructStory(updateStory.story, updateStory.peer, this.#c.getEntity); } } @@ -53,15 +53,13 @@ export class StoryManager { async createStory(chatId: ID, content: InputStoryContent, params?: CreateStoryParams) { await this.#c.storage.assertUser("createStory"); - let media: enums.InputMedia | null = null; + let media: Api.InputMedia | null = null; const source = "video" in content ? content.video : "photo" in content ? content.photo : unreachable(); if (typeof source === "string") { const fileId = this.#c.messageManager.resolveFileId(source, FileType.Photo); if (fileId != null) { - media = new types.InputMediaPhoto({ - id: new types.InputPhoto(fileId), - }); + media = { _: "inputMediaPhoto", id: { ...fileId, _: "inputPhoto" } }; } } @@ -72,13 +70,9 @@ export class StoryManager { const file = await this.#c.fileManager.upload(source, params, null, "video" in content); const mimeType = contentType(file.name.split(".").slice(-1)[0]) ?? "application/octet-stream"; if ("video" in content) { - media = new types.InputMediaUploadedDocument({ - file, - attributes: [new types.DocumentAttributeFilename({ file_name: file.name }), new types.DocumentAttributeVideo({ w: 720, h: 1280, duration: content.duration })], - mime_type: mimeType, - }); + media = { _: "inputMediaUploadedDocument", file, attributes: [{ _: "documentAttributeFilename", file_name: file.name }, { _: "documentAttributeVideo", w: 720, h: 1280, duration: content.duration }], mime_type: mimeType }; } else { - media = new types.InputMediaUploadedPhoto({ file }); + media = { _: "inputMediaUploadedPhoto", file }; } } } @@ -91,7 +85,7 @@ export class StoryManager { const peer = await this.#c.getInputPeer(chatId); const randomId = getRandomId(); const privacyRules = await storyPrivacyToTlObject(params?.privacy ?? { everyoneExcept: [] }, this.#c.getEntity); - const mediaAreas = new Array(); + const mediaAreas = new Array(); if (params?.interactiveAreas?.length) { for (const area of params.interactiveAreas) { @@ -99,18 +93,7 @@ export class StoryManager { } } - const updates = await this.#c.api.stories.sendStory({ - peer, - random_id: randomId, - media, - privacy_rules: privacyRules, - caption, - entities, - noforwards: params?.protectContent ? true : undefined, - period: params?.activeFor, - pinned: params?.highlight ? true : undefined, - media_areas: mediaAreas, - }); + const updates = await this.#c.invoke({ _: "stories.sendStory", peer, random_id: randomId, media, privacy_rules: privacyRules, caption, entities, noforwards: params?.protectContent ? true : undefined, period: params?.activeFor, pinned: params?.highlight ? true : undefined, media_areas: mediaAreas }); return await this.#updatesToStory(updates); } @@ -118,10 +101,10 @@ export class StoryManager { await this.#c.storage.assertUser("getStories"); checkArray(storyIds, checkStoryId); const peer = await this.#c.getInputPeer(chatId); - const stories_ = await this.#c.api.stories.getStoriesByID({ peer, id: storyIds }); + const stories_ = await this.#c.invoke({ _: "stories.getStoriesByID", peer, id: storyIds }); const stories = new Array(); for (const story of stories_.stories) { - stories.push(await constructStory(story[as](types.StoryItem), inputPeerToPeer(peer), this.#c.getEntity)); + stories.push(await constructStory(as("storyItem", story), inputPeerToPeer(peer), this.#c.getEntity)); } return stories; } @@ -134,7 +117,7 @@ export class StoryManager { async deleteStories(chatId: ID, storyIds: number[]) { await this.#c.storage.assertUser("deleteStories"); const peer = await this.#c.getInputPeer(chatId); - await this.#c.api.stories.deleteStories({ peer, id: storyIds }); + await this.#c.invoke({ _: "stories.deleteStories", peer, id: storyIds }); } async deleteStory(chatId: ID, storyId: number) { @@ -145,7 +128,7 @@ export class StoryManager { async #togglePinned(chatId: ID, storyIds: number[], pinned: boolean) { checkArray(storyIds, checkStoryId); const peer = await this.#c.getInputPeer(chatId); - await this.#c.api.stories.togglePinned({ peer, id: storyIds, pinned }); + await this.#c.invoke({ _: "stories.togglePinned", peer, id: storyIds, pinned }); } async addStoriesToHighlights(chatId: ID, storyIds: number[]) { @@ -168,16 +151,16 @@ export class StoryManager { await this.removeStoriesFromHighlights(chatId, [storyId]); } - static canHandleUpdate(update: enums.Update): update is StoryManagerUpdate { - return update instanceof types.UpdateStory; + static canHandleUpdate(update: Api.Update): update is StoryManagerUpdate { + return is("updateStory", update); } async handleUpdate(update: StoryManagerUpdate): Promise { - if (update.story instanceof types.StoryItemDeleted) { + if (is("storyItemDeleted", update.story)) { const chatId = peerToChatId(update.peer); const storyId = update.story.id; return { deletedStory: { chatId, storyId } }; - } else if (update.story instanceof types.StoryItem) { + } else if (is("storyItem", update.story)) { const story = await constructStory(update.story, update.peer, this.#c.getEntity); return { story }; } else { diff --git a/client/5_client.ts b/client/5_client.ts index b4db5db5..b774a094 100644 --- a/client/5_client.ts +++ b/client/5_client.ts @@ -21,15 +21,15 @@ import { unreachable } from "../0_deps.ts"; import { AccessError, InputError } from "../0_errors.ts"; import { cleanObject, drop, getLogger, getRandomId, Logger, MaybePromise, minute, mustPrompt, mustPromptOneOf, second, ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { as, chatIdToPeerId, enums, functions, getChatIdPeerType, name, peerToChatId, types } from "../2_tl.ts"; +import { Api, as, chatIdToPeerId, getChatIdPeerType, is, peerToChatId } from "../2_tl.ts"; import { Storage, StorageMemory } from "../2_storage.ts"; import { DC } from "../3_transport.ts"; +import { Invoke } from "./1_types.ts"; import { BotCommand, BusinessConnection, CallbackQueryAnswer, CallbackQueryQuestion, Chat, ChatAction, ChatListItem, ChatMember, ChatP, ConnectionState, constructUser, FileSource, ID, InactiveChat, InlineQueryAnswer, InlineQueryResult, InputMedia, InputStoryContent, InviteLink, LiveStreamChannel, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Poll, Reaction, Sticker, Story, Update, User, VideoChat, VideoChatActive, VideoChatScheduled } from "../3_types.ts"; import { APP_VERSION, DEVICE_MODEL, LANG_CODE, LANG_PACK, LAYER, MAX_CHANNEL_ID, MAX_CHAT_ID, PublicKeys, SYSTEM_LANG_CODE, SYSTEM_VERSION, USERNAME_TTL } from "../4_constants.ts"; import { AuthKeyUnregistered, ConnectionNotInited, FloodWait, Migrate, PasswordHashInvalid, PhoneNumberInvalid, SessionPasswordNeeded } from "../4_errors.ts"; import { _SendCommon, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamChunkParams, DownloadParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetMyCommandsParams, JoinVideoChatParams, PinMessageParams, ReplyParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendInlineQueryParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetMyCommandsParams, SetReactionsParams, SignInParams, StartVideoChatParams, StopPollParams } from "./0_params.ts"; import { checkPassword } from "./0_password.ts"; -import { Api } from "./1_types.ts"; import { getUsername, isMtprotoFunction, resolve } from "./0_utilities.ts"; import { AccountManager } from "./2_account_manager.ts"; import { BotInfoManager } from "./2_bot_info_manager.ts"; @@ -199,7 +199,7 @@ function skipInvoke(): InvokeErrorHandler> { return (_ctx, next) => next(); } export interface InvokeErrorHandler { - (ctx: { client: C; error: unknown; function: types.Type | functions.Function; n: number }, next: NextFunction): MaybePromise; + (ctx: { client: C; error: unknown; function: Api.AnyObject; n: number }, next: NextFunction): MaybePromise; } export const restartAuth = Symbol("restartAuth"); @@ -209,7 +209,6 @@ export const handleMigrationError = Symbol("handleMigrationError"); let id = 0; const getEntity = Symbol(); -const functionNamespaces = Object.entries(functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k); export interface ClientParams extends ClientPlainParams { /** The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the auth string. */ @@ -370,12 +369,11 @@ export class Client extends Composer { const c = { id, - api: this.api, - invoke: async | types.Type) = functions.Function, R = T extends functions.Function ? T["__R"] : void>(function_: T, businessConnectionId: string | undefined): Promise => { + invoke: async , P extends Api.Function, R extends unknown = Api.ReturnType>(function_: T, businessConnectionId: string | undefined): Promise => { if (businessConnectionId) { - return await this.api.invokeWithBusinessConnection({ connection_id: businessConnectionId, query: function_ as functions.Function }) as R; + return await this.invoke({ _: "invokeWithBusinessConnection", connection_id: businessConnectionId, query: function_ }); } else { - return await this.invoke(function_) as R; + return await this.invoke(function_); } }, storage: this.storage, @@ -472,56 +470,6 @@ export class Client extends Composer { return this.#client.disconnected; } - #namespaceProxies = (() => { - // deno-lint-ignore no-explicit-any - const proxies = {} as any; - for (const name of functionNamespaces) { - const ns = functions[name as keyof typeof functions]; - proxies[name] = new Proxy({}, { - get: (_, key) => { - if (key in ns) { - // deno-lint-ignore no-explicit-any - const func = ns[key as keyof typeof ns] as any; - if (func instanceof Function) { - // deno-lint-ignore no-explicit-any - return (params: any) => { - // deno-lint-ignore ban-ts-comment - // @ts-ignore - return this.invoke(new func(params)); - }; - } else { - unreachable(); - } - } - }, - set() { - return true; - }, - }); - } - return proxies; - })(); - api: Api = new Proxy({} as unknown as Api, { - get: (_, key) => { - if (key in functions) { - const func = functions[key as keyof typeof functions]; - if (func instanceof Function) { - // deno-lint-ignore no-explicit-any - return (params: any) => { - // deno-lint-ignore ban-ts-comment - // @ts-ignore - return this.invoke(new func(params)); - }; - } else { - return this.#namespaceProxies[key]; - } - } - }, - set() { - return true; - }, - }); - async #getApiId() { const apiId = this.#apiId || await this.storage.getApiId(); if (!apiId) { @@ -531,17 +479,17 @@ export class Client extends Composer { } #getCdnConnectionPool(connectionCount: number, dcId?: number) { - const connections = new Array<{ api: Api; connect: () => Promise; disconnect: () => Promise }>(); + const connections = new Array<{ invoke: Invoke; connect: () => Promise; disconnect: () => Promise }>(); for (let i = 0; i < connectionCount; ++i) { connections.push(this.#getCdnConnection(dcId)); } let prev = 0; return { size: connectionCount, - api: () => { + invoke: () => { if (prev + 1 > connections.length) prev = 0; const connection = connections[prev++]; - return connection.api; + return connection.invoke; }, connect: async () => { for await (const connection of connections) { @@ -577,8 +525,8 @@ export class Client extends Composer { client.invoke.use(async (ctx, next) => { if (ctx.error instanceof AuthKeyUnregistered && dcId) { try { - const exportedAuth = await this.api.auth.exportAuthorization({ dc_id: dcId }); - await client.api.auth.importAuthorization(exportedAuth); + const exportedAuth = await this.invoke({ _: "auth.exportAuthorization", dc_id: dcId }); + await client.invoke({ ...exportedAuth, _: "auth.importAuthorization" }); return true; } catch (err) { throw err; @@ -589,7 +537,7 @@ export class Client extends Composer { }); return { - api: client.api, + invoke: client.invoke, connect: async () => { await client.connect(); @@ -1094,13 +1042,13 @@ export class Client extends Composer { } } - this.#LsignIn.debug("authorizing with", typeof params === "string" ? "bot token" : params instanceof types.auth.ExportedAuthorization ? "exported authorization" : "AuthorizeUserParams"); + this.#LsignIn.debug("authorizing with", typeof params === "string" ? "bot token" : is("auth.exportedAuthorization", params) ? "exported authorization" : "AuthorizeUserParams"); if (params && "botToken" in params) { while (true) { try { - const auth = await this.api.auth.importBotAuthorization({ api_id: apiId, api_hash: this.#apiHash, bot_auth_token: params.botToken, flags: 0 }); - await this.storage.setAccountId(Number(auth[as](types.auth.Authorization).user.id)); + const auth = await this.invoke({ _: "auth.importBotAuthorization", api_id: apiId, api_hash: this.#apiHash, bot_auth_token: params.botToken, flags: 0 }); + await this.storage.setAccountId(Number(as("auth.authorization", auth).user.id)); await this.storage.setAccountType("bot"); break; } catch (err) { @@ -1121,17 +1069,18 @@ export class Client extends Composer { auth: while (true) { try { let phone: string; - let sentCode: types.auth.SentCode; + let sentCode: Api.auth_sentCode; while (true) { try { phone = typeof params.phone === "string" ? params.phone : await params.phone(); const sendCode = () => - this.api.auth.sendCode({ + this.invoke({ + _: "auth.sendCode", phone_number: phone, api_id: this.#apiId, api_hash: this.#apiHash, - settings: new types.CodeSettings(), - }).then((v) => v[as](types.auth.SentCode)); + settings: { _: "codeSettings" }, + }).then((v) => as("auth.sentCode", v)); try { sentCode = await sendCode(); } catch (err) { @@ -1157,12 +1106,13 @@ export class Client extends Composer { code: while (true) { const code = typeof params.code === "string" ? params.code : await params.code(); try { - const auth = await this.api.auth.signIn({ + const auth = await this.invoke({ + _: "auth.signIn", phone_number: phone, phone_code: code, phone_code_hash: sentCode.phone_code_hash, }); - await this.storage.setAccountId(Number(auth[as](types.auth.Authorization).user.id)); + await this.storage.setAccountId(Number(as("auth.authorization", auth).user.id)); await this.storage.setAccountType("user"); this.#LsignIn.debug("signed in as user"); await this.#propagateAuthorizationState(true); @@ -1183,16 +1133,16 @@ export class Client extends Composer { } password: while (true) { - const ap = await this.api.account.getPassword(); - if (!(ap.current_algo instanceof types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow)) { - throw new Error(`Handling ${ap.current_algo?.[name]} not implemented`); + const ap = await this.invoke({ _: "account.getPassword" }); + if (!(is("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", ap.current_algo))) { + throw new Error(`Handling ${ap.current_algo?._} not implemented`); } try { const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null); const input = await checkPassword(password, ap); - const auth = await this.api.auth.checkPassword({ password: input }); - await this.storage.setAccountId(Number(auth[as](types.auth.Authorization).user.id)); + const auth = await this.invoke({ _: "auth.checkPassword", password: input }); + await this.storage.setAccountId(Number(as("auth.authorization", auth).user.id)); await this.storage.setAccountType("user"); this.#LsignIn.debug("signed in as user"); await this.#propagateAuthorizationState(true); @@ -1220,7 +1170,7 @@ export class Client extends Composer { try { await Promise.all([ this.storage.reset(), - this.api.auth.logOut().then(() => { + this.invoke({ _: "auth.logOut" }).then(() => { this.#propagateAuthorizationState(false); }), ]); @@ -1260,7 +1210,7 @@ export class Client extends Composer { continue; } this.#pingLoopAbortController.signal.throwIfAborted(); - await this.api.ping_delay_disconnect({ ping_id: getRandomId(), disconnect_delay: this.#pingInterval / second + 15 }); + await this.invoke({ _: "ping_delay_disconnect", ping_id: getRandomId(), disconnect_delay: this.#pingInterval / second + 15 }); if (Date.now() - this.#lastUpdates.getTime() >= 15 * minute) { drop(this.#updateManager.recoverUpdateGap("lastUpdates")); } @@ -1273,32 +1223,31 @@ export class Client extends Composer { } } - async #invoke | types.Type) = functions.Function>(function_: T): Promise ? T["__R"] : void>; - async #invoke | types.Type) = functions.Function>(function_: T, noWait: true): Promise; - async #invoke | types.Type) = functions.Function>(function_: T, noWait?: boolean): Promise { + async #invoke, P extends Api.Function, R extends unknown = T["_"] extends keyof Api.Functions ? Api.ReturnType : never>(function_: T): Promise; + async #invoke, P extends Api.Function>(function_: T, noWait: true): Promise; + async #invoke, P extends Api.Function, R extends unknown = T["_"] extends keyof Api.Functions ? Api.ReturnType : never>(function_: T, noWait?: boolean): Promise { let n = 1; while (true) { try { - if (function_ instanceof functions.Function && !this.#connectionInited && !isMtprotoFunction(function_)) { - const result = await this.#client.invoke( - new functions.initConnection({ - api_id: await this.#getApiId(), - app_version: this.appVersion, - device_model: this.deviceModel, - lang_code: this.langCode, - lang_pack: this.langPack, - query: new functions.invokeWithLayer({ - layer: LAYER, - query: function_, - }), - system_lang_code: this.systemLangCode, - system_version: this.systemVersion, - }), - noWait, - ); + if (!this.#connectionInited && !isMtprotoFunction(function_)) { + const result = await this.#client.invoke({ + _: "initConnection", + api_id: await this.#getApiId(), + app_version: this.appVersion, + device_model: this.deviceModel, + lang_code: this.langCode, + lang_pack: this.langPack, + query: { + _: "invokeWithLayer", + layer: LAYER, + query: function_, + } as Api.Function, + system_lang_code: this.systemLangCode, + system_version: this.systemVersion, + }, noWait); this.#connectionInited = true; this.#L$initConncetion.debug("connection inited"); - return result as T | void; + return result as R | void; } else { return await this.#client.invoke(function_, noWait); } @@ -1329,10 +1278,10 @@ export class Client extends Composer { * @param function_ The function to invoke. */ invoke: { - | types.Type) = functions.Function>(function_: T): Promise ? T["__R"] : void>; - | types.Type) = functions.Function>(function_: T, noWait: true): Promise; - | types.Type) = functions.Function>(function_: T, noWait?: boolean): Promise; - use(handler: InvokeErrorHandler>): void; + , P extends Api.Function, R extends unknown = T["_"] extends keyof Api.Functions ? Api.ReturnType : never>(function_: T): Promise; + , P extends Api.Function>(function_: T, noWait: true): Promise; + , P extends Api.Function, R extends unknown = T["_"] extends keyof Api.Functions ? Api.ReturnType : never>(function_: T, noWait?: boolean): Promise; + use: (handler: InvokeErrorHandler>) => void; } = Object.assign( this.#invoke, { @@ -1353,7 +1302,7 @@ export class Client extends Composer { /** * Alias for `invoke` with its second parameter being `true`. */ - send | types.Type) = functions.Function>(function_: T): Promise { + send, P extends Api.Function>(function_: T): Promise { return this.invoke(function_, true); } @@ -1367,8 +1316,8 @@ export class Client extends Composer { } async #getUserAccessHash(userId: bigint) { - const users = await this.api.users.getUsers({ id: [new types.InputUser({ user_id: userId, access_hash: 0n })] }); - const user = users[0]?.[as](types.User); + const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUser", user_id: userId, access_hash: 0n }] }); + const user = as("user", users[0]); if (user) { await this.messageStorage.setEntity(user); } @@ -1376,8 +1325,8 @@ export class Client extends Composer { } async #getChannelAccessHash(channelId: bigint) { - const channels = await this.api.channels.getChannels({ id: [new types.InputChannel({ channel_id: channelId, access_hash: 0n })] }); - const channel = channels.chats[0][as](types.Channel); + const channels = await this.invoke({ _: "channels.getChannels", id: [{ _: "inputChannel", channel_id: channelId, access_hash: 0n }] }); + const channel = as("channel", channels.chats[0]); if (channel) { await this.messageStorage.setEntity(channel); } @@ -1389,19 +1338,19 @@ export class Client extends Composer { * * @param id The identifier of the chat. */ - async getInputPeer(id: ID): Promise { + async getInputPeer(id: ID): Promise { if (id === "me" || id == await this.#getSelfId()) { - return new types.InputPeerSelf(); + return { _: "inputPeerSelf" }; } const inputPeer = await this.#getInputPeerInner(id); - if (((inputPeer instanceof types.InputPeerUser || inputPeer instanceof types.InputPeerChannel) && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") { + if (((is("inputPeerUser", inputPeer) || is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") { if ("channel_id" in inputPeer) { inputPeer.access_hash = await this.#getChannelAccessHash(inputPeer.channel_id); } else { inputPeer.access_hash = await this.#getUserAccessHash(inputPeer.user_id); } } - if ((inputPeer instanceof types.InputPeerUser || inputPeer instanceof types.InputPeerChannel) && inputPeer.access_hash == 0n && await this.storage.getAccountType() == "user") { + if ((is("inputPeerUser", inputPeer) || is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n && await this.storage.getAccountType() == "user") { throw new AccessError(`Cannot access the chat ${id} because there is no access hash for it.`); } return inputPeer; @@ -1412,12 +1361,12 @@ export class Client extends Composer { * * @param id The identifier of the channel or the supergroup. */ - async getInputChannel(id: ID): Promise { + async getInputChannel(id: ID): Promise { const inputPeer = await this.getInputPeer(id); - if (!(inputPeer instanceof types.InputPeerChannel)) { + if (!(is("inputPeerChannel", inputPeer))) { throw new TypeError(`The chat ${id} is not a channel neither a supergroup.`); } - return new types.InputChannel(inputPeer); + return { ...inputPeer, _: "inputChannel" }; } /** @@ -1425,12 +1374,12 @@ export class Client extends Composer { * * @param id The identifier of the user. */ - async getInputUser(id: ID): Promise { + async getInputUser(id: ID): Promise { const inputPeer = await this.getInputPeer(id); - if (!(inputPeer instanceof types.InputPeerUser)) { + if (!(is("inputPeerUser", inputPeer))) { throw new TypeError(`The chat ${id} is not a private chat.`); } - return new types.InputUser(inputPeer); + return { ...inputPeer, _: "inputUser" }; } async #getInputPeerInner(id: ID) { @@ -1446,12 +1395,12 @@ export class Client extends Composer { const [id] = maybeUsername; resolvedId = id; } else { - const resolved = await this.api.contacts.resolveUsername({ username: id }); + const resolved = await this.invoke({ _: "contacts.resolveUsername", username: id }); await this.#updateManager.processChats(resolved.chats); await this.#updateManager.processUsers(resolved.users); - if (resolved.peer instanceof types.PeerUser) { + if (is("peerUser", resolved.peer)) { resolvedId = peerToChatId(resolved.peer); - } else if (resolved.peer instanceof types.PeerChannel) { + } else if (is("peerChannel", resolved.peer)) { resolvedId = peerToChatId(resolved.peer); } else { unreachable(); @@ -1460,34 +1409,34 @@ export class Client extends Composer { const resolvedIdType = getChatIdPeerType(resolvedId); if (resolvedIdType == "user") { const accessHash = await this.messageStorage.getUserAccessHash(resolvedId); - return new types.InputPeerUser({ user_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n }); + return { _: "inputPeerUser", user_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n } as Api.inputPeerUser; } else if (resolvedIdType == "channel") { const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId); - return new types.InputPeerChannel({ channel_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n }); + return { _: "inputPeerChannel", channel_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n } as Api.inputPeerChannel; } else { unreachable(); } } else if (id > 0) { const accessHash = await this.messageStorage.getUserAccessHash(id); - return new types.InputPeerUser({ user_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n }); + return { _: "inputPeerUser", user_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n } as Api.inputPeerUser; } else if (-MAX_CHAT_ID <= id) { - return new types.InputPeerChat({ chat_id: BigInt(Math.abs(id)) }); + return { _: "inputPeerChat", chat_id: BigInt(Math.abs(id)) } as Api.inputPeerChat; } else if (ZERO_CHANNEL_ID - MAX_CHANNEL_ID <= id && id != ZERO_CHANNEL_ID) { const accessHash = await this.messageStorage.getChannelAccessHash(id); - return new types.InputPeerChannel({ channel_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n }); + return { _: "inputPeerChannel", channel_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n } as Api.inputPeerChannel; } else { throw new InputError("The ID is of an format unknown."); } } - private [getEntity](peer: types.PeerUser): Promise; - private [getEntity](peer: types.PeerChat): Promise; - private [getEntity](peer: types.PeerChannel): Promise; - private [getEntity](peer: types.PeerUser | types.PeerChat | types.PeerChannel): Promise; - private async [getEntity](peer: types.PeerUser | types.PeerChat | types.PeerChannel) { + private [getEntity](peer: Api.peerUser): Promise; + private [getEntity](peer: Api.peerChat): Promise; + private [getEntity](peer: Api.peerChannel): Promise; + private [getEntity](peer: Api.peerUser | Api.peerChat | Api.peerChannel): Promise; + private async [getEntity](peer: Api.peerUser | Api.peerChat | Api.peerChannel) { const id = peerToChatId(peer); const entity = await this.messageStorage.getEntity(id); - if (entity == null && await this.storage.getAccountType() == "bot" && peer instanceof types.PeerUser || peer instanceof types.PeerChannel) { + if (entity == null && await this.storage.getAccountType() == "bot" && is("peerUser", peer) || is("peerChannel", peer)) { await this.getInputPeer(id); } else { return entity; @@ -1505,11 +1454,11 @@ export class Client extends Composer { }); } - async #handleUpdate(update: enums.Update) { + async #handleUpdate(update: Api.Update) { const promises = new Array>(); - if (update instanceof types.UpdateUserName) { + if (is("updateUserName", update)) { await this.messageStorage.updateUsernames(Number(update.user_id), update.usernames.map((v) => v.username)); - const peer = new types.PeerUser(update); + const peer: Api.peerUser = { ...update, _: "peerUser" }; const entity = await this[getEntity](peer); if (entity != null) { entity.usernames = update.usernames; @@ -1595,10 +1544,10 @@ export class Client extends Composer { * @method ac */ async getMe(): Promise { - let user_ = await this[getEntity](new types.PeerUser({ user_id: BigInt(await this.#getSelfId()) })); + let user_ = await this[getEntity]({ _: "peerUser", user_id: BigInt(await this.#getSelfId()) }); if (user_ == null) { - const users = await this.api.users.getUsers({ id: [new types.InputUserSelf()] }); - user_ = users[0][as](types.User); + const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUserSelf" }] }); + user_ = as("user", users[0]); await this.messageStorage.setEntity(user_); } const user = constructUser(user_); diff --git a/tl/0_api.ts b/tl/0_api.ts new file mode 100644 index 00000000..110fdf9d --- /dev/null +++ b/tl/0_api.ts @@ -0,0 +1,40710 @@ +declare const R: unique symbol; + +export type Function = { [R]?: unknown }; + +export type ReturnType = T extends Function ? NonNullable : never; + +export interface resPQ { + _: "resPQ"; + nonce: bigint; + server_nonce: bigint; + pq: Uint8Array; + server_public_key_fingerprints: Array; +} + +export interface p_q_inner_data_dc { + _: "p_q_inner_data_dc"; + pq: Uint8Array; + p: Uint8Array; + q: Uint8Array; + nonce: bigint; + server_nonce: bigint; + new_nonce: bigint; + dc: number; +} + +export interface p_q_inner_data_temp_dc { + _: "p_q_inner_data_temp_dc"; + pq: Uint8Array; + p: Uint8Array; + q: Uint8Array; + nonce: bigint; + server_nonce: bigint; + new_nonce: bigint; + dc: number; + expires_in: number; +} + +export interface server_DH_params_ok { + _: "server_DH_params_ok"; + nonce: bigint; + server_nonce: bigint; + encrypted_answer: Uint8Array; +} + +export interface server_DH_inner_data { + _: "server_DH_inner_data"; + nonce: bigint; + server_nonce: bigint; + g: number; + dh_prime: Uint8Array; + g_a: Uint8Array; + server_time: number; +} + +export interface client_DH_inner_data { + _: "client_DH_inner_data"; + nonce: bigint; + server_nonce: bigint; + retry_id: bigint; + g_b: Uint8Array; +} + +export interface dh_gen_ok { + _: "dh_gen_ok"; + nonce: bigint; + server_nonce: bigint; + new_nonce_hash1: bigint; +} + +export interface dh_gen_retry { + _: "dh_gen_retry"; + nonce: bigint; + server_nonce: bigint; + new_nonce_hash2: bigint; +} + +export interface dh_gen_fail { + _: "dh_gen_fail"; + nonce: bigint; + server_nonce: bigint; + new_nonce_hash3: bigint; +} + +export interface bind_auth_key_inner { + _: "bind_auth_key_inner"; + nonce: bigint; + temp_auth_key_id: bigint; + perm_auth_key_id: bigint; + temp_session_id: bigint; + expires_at: number; +} + +export interface rpc_error { + _: "rpc_error"; + error_code: number; + error_message: string; +} + +export interface rpc_answer_unknown { + _: "rpc_answer_unknown"; +} + +export interface rpc_answer_dropped_running { + _: "rpc_answer_dropped_running"; +} + +export interface rpc_answer_dropped { + _: "rpc_answer_dropped"; + msg_id: bigint; + seq_no: number; + bytes: number; +} + +export interface future_salt { + _: "future_salt"; + valid_since: number; + valid_until: number; + salt: bigint; +} + +export interface future_salts { + _: "future_salts"; + req_msg_id: bigint; + now: number; + salts: Array; +} + +export interface pong { + _: "pong"; + msg_id: bigint; + ping_id: bigint; +} + +export interface destroy_session_ok { + _: "destroy_session_ok"; + session_id: bigint; +} + +export interface destroy_session_none { + _: "destroy_session_none"; + session_id: bigint; +} + +export interface new_session_created { + _: "new_session_created"; + first_msg_id: bigint; + unique_id: bigint; + server_salt: bigint; +} + +export interface gzip_packed { + _: "gzip_packed"; + packed_data: Uint8Array; +} + +export interface msgs_ack { + _: "msgs_ack"; + msg_ids: Array; +} + +export interface bad_msg_notification { + _: "bad_msg_notification"; + bad_msg_id: bigint; + bad_msg_seqno: number; + error_code: number; +} + +export interface bad_server_salt { + _: "bad_server_salt"; + bad_msg_id: bigint; + bad_msg_seqno: number; + error_code: number; + new_server_salt: bigint; +} + +export interface msg_resend_req { + _: "msg_resend_req"; + msg_ids: Array; +} + +export interface msgs_state_req { + _: "msgs_state_req"; + msg_ids: Array; +} + +export interface msgs_state_info { + _: "msgs_state_info"; + req_msg_id: bigint; + info: Uint8Array; +} + +export interface msgs_all_info { + _: "msgs_all_info"; + msg_ids: Array; + info: Uint8Array; +} + +export interface msg_detailed_info { + _: "msg_detailed_info"; + msg_id: bigint; + answer_msg_id: bigint; + bytes: number; + status: number; +} + +export interface msg_new_detailed_info { + _: "msg_new_detailed_info"; + answer_msg_id: bigint; + bytes: number; + status: number; +} + +export interface destroy_auth_key_ok { + _: "destroy_auth_key_ok"; +} + +export interface destroy_auth_key_none { + _: "destroy_auth_key_none"; +} + +export interface destroy_auth_key_fail { + _: "destroy_auth_key_fail"; +} + +export interface http_wait { + _: "http_wait"; + max_delay: number; + wait_after: number; + max_wait: number; +} + +export interface true_ { + _: "true"; +} + +export interface error { + _: "error"; + code: number; + text: string; +} + +export interface ipPort { + _: "ipPort"; + ipv4: number; + port: number; +} + +export interface ipPortSecret { + _: "ipPortSecret"; + ipv4: number; + port: number; + secret: Uint8Array; +} + +export interface accessPointRule { + _: "accessPointRule"; + phone_prefix_rules: string; + dc_id: number; + ips: Array; +} + +export interface help_configSimple { + _: "help.configSimple"; + date: number; + expires: number; + rules: Array; +} + +export interface inputPeerPhotoFileLocationLegacy { + _: "inputPeerPhotoFileLocationLegacy"; + big?: true; + peer: InputPeer; + volume_id: bigint; + local_id: number; +} + +export interface inputStickerSetThumbLegacy { + _: "inputStickerSetThumbLegacy"; + stickerset: InputStickerSet; + volume_id: bigint; + local_id: number; +} + +export interface inputPeerEmpty { + _: "inputPeerEmpty"; +} + +export interface inputPeerSelf { + _: "inputPeerSelf"; +} + +export interface inputPeerChat { + _: "inputPeerChat"; + chat_id: bigint; +} + +export interface inputPeerUser { + _: "inputPeerUser"; + user_id: bigint; + access_hash: bigint; +} + +export interface inputPeerChannel { + _: "inputPeerChannel"; + channel_id: bigint; + access_hash: bigint; +} + +export interface inputPeerUserFromMessage { + _: "inputPeerUserFromMessage"; + peer: InputPeer; + msg_id: number; + user_id: bigint; +} + +export interface inputPeerChannelFromMessage { + _: "inputPeerChannelFromMessage"; + peer: InputPeer; + msg_id: number; + channel_id: bigint; +} + +export interface inputUserEmpty { + _: "inputUserEmpty"; +} + +export interface inputUserSelf { + _: "inputUserSelf"; +} + +export interface inputUser { + _: "inputUser"; + user_id: bigint; + access_hash: bigint; +} + +export interface inputUserFromMessage { + _: "inputUserFromMessage"; + peer: InputPeer; + msg_id: number; + user_id: bigint; +} + +export interface inputPhoneContact { + _: "inputPhoneContact"; + client_id: bigint; + phone: string; + first_name: string; + last_name: string; +} + +export interface inputFile { + _: "inputFile"; + id: bigint; + parts: number; + name: string; + md5_checksum: string; +} + +export interface inputFileBig { + _: "inputFileBig"; + id: bigint; + parts: number; + name: string; +} + +export interface inputMediaEmpty { + _: "inputMediaEmpty"; +} + +export interface inputMediaUploadedPhoto { + _: "inputMediaUploadedPhoto"; + spoiler?: true; + file: InputFile; + stickers?: Array; + ttl_seconds?: number; +} + +export interface inputMediaPhoto { + _: "inputMediaPhoto"; + spoiler?: true; + id: InputPhoto; + ttl_seconds?: number; +} + +export interface inputMediaGeoPoint { + _: "inputMediaGeoPoint"; + geo_point: InputGeoPoint; +} + +export interface inputMediaContact { + _: "inputMediaContact"; + phone_number: string; + first_name: string; + last_name: string; + vcard: string; +} + +export interface inputMediaUploadedDocument { + _: "inputMediaUploadedDocument"; + nosound_video?: true; + force_file?: true; + spoiler?: true; + file: InputFile; + thumb?: InputFile; + mime_type: string; + attributes: Array; + stickers?: Array; + ttl_seconds?: number; +} + +export interface inputMediaDocument { + _: "inputMediaDocument"; + spoiler?: true; + id: InputDocument; + ttl_seconds?: number; + query?: string; +} + +export interface inputMediaVenue { + _: "inputMediaVenue"; + geo_point: InputGeoPoint; + title: string; + address: string; + provider: string; + venue_id: string; + venue_type: string; +} + +export interface inputMediaPhotoExternal { + _: "inputMediaPhotoExternal"; + spoiler?: true; + url: string; + ttl_seconds?: number; +} + +export interface inputMediaDocumentExternal { + _: "inputMediaDocumentExternal"; + spoiler?: true; + url: string; + ttl_seconds?: number; +} + +export interface inputMediaGame { + _: "inputMediaGame"; + id: InputGame; +} + +export interface inputMediaInvoice { + _: "inputMediaInvoice"; + title: string; + description: string; + photo?: InputWebDocument; + invoice: Invoice; + payload: Uint8Array; + provider: string; + provider_data: DataJSON; + start_param?: string; + extended_media?: InputMedia; +} + +export interface inputMediaGeoLive { + _: "inputMediaGeoLive"; + stopped?: true; + geo_point: InputGeoPoint; + heading?: number; + period?: number; + proximity_notification_radius?: number; +} + +export interface inputMediaPoll { + _: "inputMediaPoll"; + poll: Poll; + correct_answers?: Array; + solution?: string; + solution_entities?: Array; +} + +export interface inputMediaDice { + _: "inputMediaDice"; + emoticon: string; +} + +export interface inputMediaStory { + _: "inputMediaStory"; + peer: InputPeer; + id: number; +} + +export interface inputMediaWebPage { + _: "inputMediaWebPage"; + force_large_media?: true; + force_small_media?: true; + optional?: true; + url: string; +} + +export interface inputChatPhotoEmpty { + _: "inputChatPhotoEmpty"; +} + +export interface inputChatUploadedPhoto { + _: "inputChatUploadedPhoto"; + file?: InputFile; + video?: InputFile; + video_start_ts?: number; + video_emoji_markup?: VideoSize; +} + +export interface inputChatPhoto { + _: "inputChatPhoto"; + id: InputPhoto; +} + +export interface inputGeoPointEmpty { + _: "inputGeoPointEmpty"; +} + +export interface inputGeoPoint { + _: "inputGeoPoint"; + lat: number; + long: number; + accuracy_radius?: number; +} + +export interface inputPhotoEmpty { + _: "inputPhotoEmpty"; +} + +export interface inputPhoto { + _: "inputPhoto"; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; +} + +export interface inputFileLocation { + _: "inputFileLocation"; + volume_id: bigint; + local_id: number; + secret: bigint; + file_reference: Uint8Array; +} + +export interface inputEncryptedFileLocation { + _: "inputEncryptedFileLocation"; + id: bigint; + access_hash: bigint; +} + +export interface inputDocumentFileLocation { + _: "inputDocumentFileLocation"; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; + thumb_size: string; +} + +export interface inputSecureFileLocation { + _: "inputSecureFileLocation"; + id: bigint; + access_hash: bigint; +} + +export interface inputTakeoutFileLocation { + _: "inputTakeoutFileLocation"; +} + +export interface inputPhotoFileLocation { + _: "inputPhotoFileLocation"; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; + thumb_size: string; +} + +export interface inputPhotoLegacyFileLocation { + _: "inputPhotoLegacyFileLocation"; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; + volume_id: bigint; + local_id: number; + secret: bigint; +} + +export interface inputPeerPhotoFileLocation { + _: "inputPeerPhotoFileLocation"; + big?: true; + peer: InputPeer; + photo_id: bigint; +} + +export interface inputStickerSetThumb { + _: "inputStickerSetThumb"; + stickerset: InputStickerSet; + thumb_version: number; +} + +export interface inputGroupCallStream { + _: "inputGroupCallStream"; + call: InputGroupCall; + time_ms: bigint; + scale: number; + video_channel?: number; + video_quality?: number; +} + +export interface peerUser { + _: "peerUser"; + user_id: bigint; +} + +export interface peerChat { + _: "peerChat"; + chat_id: bigint; +} + +export interface peerChannel { + _: "peerChannel"; + channel_id: bigint; +} + +export interface storage_fileUnknown { + _: "storage.fileUnknown"; +} + +export interface storage_filePartial { + _: "storage.filePartial"; +} + +export interface storage_fileJpeg { + _: "storage.fileJpeg"; +} + +export interface storage_fileGif { + _: "storage.fileGif"; +} + +export interface storage_filePng { + _: "storage.filePng"; +} + +export interface storage_filePdf { + _: "storage.filePdf"; +} + +export interface storage_fileMp3 { + _: "storage.fileMp3"; +} + +export interface storage_fileMov { + _: "storage.fileMov"; +} + +export interface storage_fileMp4 { + _: "storage.fileMp4"; +} + +export interface storage_fileWebp { + _: "storage.fileWebp"; +} + +export interface userEmpty { + _: "userEmpty"; + id: bigint; +} + +export interface user { + _: "user"; + self?: true; + contact?: true; + mutual_contact?: true; + deleted?: true; + bot?: true; + bot_chat_history?: true; + bot_nochats?: true; + verified?: true; + restricted?: true; + min?: true; + bot_inline_geo?: true; + support?: true; + scam?: true; + apply_min_photo?: true; + fake?: true; + bot_attach_menu?: true; + premium?: true; + attach_menu_enabled?: true; + bot_can_edit?: true; + close_friend?: true; + stories_hidden?: true; + stories_unavailable?: true; + contact_require_premium?: true; + bot_business?: true; + id: bigint; + access_hash?: bigint; + first_name?: string; + last_name?: string; + username?: string; + phone?: string; + photo?: UserProfilePhoto; + status?: UserStatus; + bot_info_version?: number; + restriction_reason?: Array; + bot_inline_placeholder?: string; + lang_code?: string; + emoji_status?: EmojiStatus; + usernames?: Array; + stories_max_id?: number; + color?: PeerColor; + profile_color?: PeerColor; +} + +export interface userProfilePhotoEmpty { + _: "userProfilePhotoEmpty"; +} + +export interface userProfilePhoto { + _: "userProfilePhoto"; + has_video?: true; + personal?: true; + photo_id: bigint; + stripped_thumb?: Uint8Array; + dc_id: number; +} + +export interface userStatusEmpty { + _: "userStatusEmpty"; +} + +export interface userStatusOnline { + _: "userStatusOnline"; + expires: number; +} + +export interface userStatusOffline { + _: "userStatusOffline"; + was_online: number; +} + +export interface userStatusRecently { + _: "userStatusRecently"; + by_me?: true; +} + +export interface userStatusLastWeek { + _: "userStatusLastWeek"; + by_me?: true; +} + +export interface userStatusLastMonth { + _: "userStatusLastMonth"; + by_me?: true; +} + +export interface chatEmpty { + _: "chatEmpty"; + id: bigint; +} + +export interface chat { + _: "chat"; + creator?: true; + left?: true; + deactivated?: true; + call_active?: true; + call_not_empty?: true; + noforwards?: true; + id: bigint; + title: string; + photo: ChatPhoto; + participants_count: number; + date: number; + version: number; + migrated_to?: InputChannel; + admin_rights?: ChatAdminRights; + default_banned_rights?: ChatBannedRights; +} + +export interface chatForbidden { + _: "chatForbidden"; + id: bigint; + title: string; +} + +export interface channel { + _: "channel"; + creator?: true; + left?: true; + broadcast?: true; + verified?: true; + megagroup?: true; + restricted?: true; + signatures?: true; + min?: true; + scam?: true; + has_link?: true; + has_geo?: true; + slowmode_enabled?: true; + call_active?: true; + call_not_empty?: true; + fake?: true; + gigagroup?: true; + noforwards?: true; + join_to_send?: true; + join_request?: true; + forum?: true; + stories_hidden?: true; + stories_hidden_min?: true; + stories_unavailable?: true; + id: bigint; + access_hash?: bigint; + title: string; + username?: string; + photo: ChatPhoto; + date: number; + restriction_reason?: Array; + admin_rights?: ChatAdminRights; + banned_rights?: ChatBannedRights; + default_banned_rights?: ChatBannedRights; + participants_count?: number; + usernames?: Array; + stories_max_id?: number; + color?: PeerColor; + profile_color?: PeerColor; + emoji_status?: EmojiStatus; + level?: number; +} + +export interface channelForbidden { + _: "channelForbidden"; + broadcast?: true; + megagroup?: true; + id: bigint; + access_hash: bigint; + title: string; + until_date?: number; +} + +export interface chatFull { + _: "chatFull"; + can_set_username?: true; + has_scheduled?: true; + translations_disabled?: true; + id: bigint; + about: string; + participants: ChatParticipants; + chat_photo?: Photo; + notify_settings: PeerNotifySettings; + exported_invite?: ExportedChatInvite; + bot_info?: Array; + pinned_msg_id?: number; + folder_id?: number; + call?: InputGroupCall; + ttl_period?: number; + groupcall_default_join_as?: Peer; + theme_emoticon?: string; + requests_pending?: number; + recent_requesters?: Array; + available_reactions?: ChatReactions; +} + +export interface channelFull { + _: "channelFull"; + can_view_participants?: true; + can_set_username?: true; + can_set_stickers?: true; + hidden_prehistory?: true; + can_set_location?: true; + has_scheduled?: true; + can_view_stats?: true; + blocked?: true; + can_delete_channel?: true; + antispam?: true; + participants_hidden?: true; + translations_disabled?: true; + stories_pinned_available?: true; + view_forum_as_messages?: true; + restricted_sponsored?: true; + can_view_revenue?: true; + id: bigint; + about: string; + participants_count?: number; + admins_count?: number; + kicked_count?: number; + banned_count?: number; + online_count?: number; + read_inbox_max_id: number; + read_outbox_max_id: number; + unread_count: number; + chat_photo: Photo; + notify_settings: PeerNotifySettings; + exported_invite?: ExportedChatInvite; + bot_info: Array; + migrated_from_chat_id?: bigint; + migrated_from_max_id?: number; + pinned_msg_id?: number; + stickerset?: StickerSet; + available_min_id?: number; + folder_id?: number; + linked_chat_id?: bigint; + location?: ChannelLocation; + slowmode_seconds?: number; + slowmode_next_send_date?: number; + stats_dc?: number; + pts: number; + call?: InputGroupCall; + ttl_period?: number; + pending_suggestions?: Array; + groupcall_default_join_as?: Peer; + theme_emoticon?: string; + requests_pending?: number; + recent_requesters?: Array; + default_send_as?: Peer; + available_reactions?: ChatReactions; + stories?: PeerStories; + wallpaper?: WallPaper; + boosts_applied?: number; + boosts_unrestrict?: number; + emojiset?: StickerSet; +} + +export interface chatParticipant { + _: "chatParticipant"; + user_id: bigint; + inviter_id: bigint; + date: number; +} + +export interface chatParticipantCreator { + _: "chatParticipantCreator"; + user_id: bigint; +} + +export interface chatParticipantAdmin { + _: "chatParticipantAdmin"; + user_id: bigint; + inviter_id: bigint; + date: number; +} + +export interface chatParticipantsForbidden { + _: "chatParticipantsForbidden"; + chat_id: bigint; + self_participant?: ChatParticipant; +} + +export interface chatParticipants { + _: "chatParticipants"; + chat_id: bigint; + participants: Array; + version: number; +} + +export interface chatPhotoEmpty { + _: "chatPhotoEmpty"; +} + +export interface chatPhoto { + _: "chatPhoto"; + has_video?: true; + photo_id: bigint; + stripped_thumb?: Uint8Array; + dc_id: number; +} + +export interface messageEmpty { + _: "messageEmpty"; + id: number; + peer_id?: Peer; +} + +export interface message { + _: "message"; + out?: true; + mentioned?: true; + media_unread?: true; + silent?: true; + post?: true; + from_scheduled?: true; + legacy?: true; + edit_hide?: true; + pinned?: true; + noforwards?: true; + invert_media?: true; + offline?: true; + id: number; + from_id?: Peer; + from_boosts_applied?: number; + peer_id: Peer; + saved_peer_id?: Peer; + fwd_from?: MessageFwdHeader; + via_bot_id?: bigint; + via_business_bot_id?: bigint; + reply_to?: MessageReplyHeader; + date: number; + message: string; + media?: MessageMedia; + reply_markup?: ReplyMarkup; + entities?: Array; + views?: number; + forwards?: number; + replies?: MessageReplies; + edit_date?: number; + post_author?: string; + grouped_id?: bigint; + reactions?: MessageReactions; + restriction_reason?: Array; + ttl_period?: number; + quick_reply_shortcut_id?: number; +} + +export interface messageService { + _: "messageService"; + out?: true; + mentioned?: true; + media_unread?: true; + silent?: true; + post?: true; + legacy?: true; + id: number; + from_id?: Peer; + peer_id: Peer; + reply_to?: MessageReplyHeader; + date: number; + action: MessageAction; + ttl_period?: number; +} + +export interface messageMediaEmpty { + _: "messageMediaEmpty"; +} + +export interface messageMediaPhoto { + _: "messageMediaPhoto"; + spoiler?: true; + photo?: Photo; + ttl_seconds?: number; +} + +export interface messageMediaGeo { + _: "messageMediaGeo"; + geo: GeoPoint; +} + +export interface messageMediaContact { + _: "messageMediaContact"; + phone_number: string; + first_name: string; + last_name: string; + vcard: string; + user_id: bigint; +} + +export interface messageMediaUnsupported { + _: "messageMediaUnsupported"; +} + +export interface messageMediaDocument { + _: "messageMediaDocument"; + nopremium?: true; + spoiler?: true; + video?: true; + round?: true; + voice?: true; + document?: Document; + alt_document?: Document; + ttl_seconds?: number; +} + +export interface messageMediaWebPage { + _: "messageMediaWebPage"; + force_large_media?: true; + force_small_media?: true; + manual?: true; + safe?: true; + webpage: WebPage; +} + +export interface messageMediaVenue { + _: "messageMediaVenue"; + geo: GeoPoint; + title: string; + address: string; + provider: string; + venue_id: string; + venue_type: string; +} + +export interface messageMediaGame { + _: "messageMediaGame"; + game: Game; +} + +export interface messageMediaInvoice { + _: "messageMediaInvoice"; + shipping_address_requested?: true; + test?: true; + title: string; + description: string; + photo?: WebDocument; + receipt_msg_id?: number; + currency: string; + total_amount: bigint; + start_param: string; + extended_media?: MessageExtendedMedia; +} + +export interface messageMediaGeoLive { + _: "messageMediaGeoLive"; + geo: GeoPoint; + heading?: number; + period: number; + proximity_notification_radius?: number; +} + +export interface messageMediaPoll { + _: "messageMediaPoll"; + poll: Poll; + results: PollResults; +} + +export interface messageMediaDice { + _: "messageMediaDice"; + value: number; + emoticon: string; +} + +export interface messageMediaStory { + _: "messageMediaStory"; + via_mention?: true; + peer: Peer; + id: number; + story?: StoryItem; +} + +export interface messageMediaGiveaway { + _: "messageMediaGiveaway"; + only_new_subscribers?: true; + winners_are_visible?: true; + channels: Array; + countries_iso2?: Array; + prize_description?: string; + quantity: number; + months: number; + until_date: number; +} + +export interface messageMediaGiveawayResults { + _: "messageMediaGiveawayResults"; + only_new_subscribers?: true; + refunded?: true; + channel_id: bigint; + additional_peers_count?: number; + launch_msg_id: number; + winners_count: number; + unclaimed_count: number; + winners: Array; + months: number; + prize_description?: string; + until_date: number; +} + +export interface messageActionEmpty { + _: "messageActionEmpty"; +} + +export interface messageActionChatCreate { + _: "messageActionChatCreate"; + title: string; + users: Array; +} + +export interface messageActionChatEditTitle { + _: "messageActionChatEditTitle"; + title: string; +} + +export interface messageActionChatEditPhoto { + _: "messageActionChatEditPhoto"; + photo: Photo; +} + +export interface messageActionChatDeletePhoto { + _: "messageActionChatDeletePhoto"; +} + +export interface messageActionChatAddUser { + _: "messageActionChatAddUser"; + users: Array; +} + +export interface messageActionChatDeleteUser { + _: "messageActionChatDeleteUser"; + user_id: bigint; +} + +export interface messageActionChatJoinedByLink { + _: "messageActionChatJoinedByLink"; + inviter_id: bigint; +} + +export interface messageActionChannelCreate { + _: "messageActionChannelCreate"; + title: string; +} + +export interface messageActionChatMigrateTo { + _: "messageActionChatMigrateTo"; + channel_id: bigint; +} + +export interface messageActionChannelMigrateFrom { + _: "messageActionChannelMigrateFrom"; + title: string; + chat_id: bigint; +} + +export interface messageActionPinMessage { + _: "messageActionPinMessage"; +} + +export interface messageActionHistoryClear { + _: "messageActionHistoryClear"; +} + +export interface messageActionGameScore { + _: "messageActionGameScore"; + game_id: bigint; + score: number; +} + +export interface messageActionPaymentSentMe { + _: "messageActionPaymentSentMe"; + recurring_init?: true; + recurring_used?: true; + currency: string; + total_amount: bigint; + payload: Uint8Array; + info?: PaymentRequestedInfo; + shipping_option_id?: string; + charge: PaymentCharge; +} + +export interface messageActionPaymentSent { + _: "messageActionPaymentSent"; + recurring_init?: true; + recurring_used?: true; + currency: string; + total_amount: bigint; + invoice_slug?: string; +} + +export interface messageActionPhoneCall { + _: "messageActionPhoneCall"; + video?: true; + call_id: bigint; + reason?: PhoneCallDiscardReason; + duration?: number; +} + +export interface messageActionScreenshotTaken { + _: "messageActionScreenshotTaken"; +} + +export interface messageActionCustomAction { + _: "messageActionCustomAction"; + message: string; +} + +export interface messageActionBotAllowed { + _: "messageActionBotAllowed"; + attach_menu?: true; + from_request?: true; + domain?: string; + app?: BotApp; +} + +export interface messageActionSecureValuesSentMe { + _: "messageActionSecureValuesSentMe"; + values: Array; + credentials: SecureCredentialsEncrypted; +} + +export interface messageActionSecureValuesSent { + _: "messageActionSecureValuesSent"; + types: Array; +} + +export interface messageActionContactSignUp { + _: "messageActionContactSignUp"; +} + +export interface messageActionGeoProximityReached { + _: "messageActionGeoProximityReached"; + from_id: Peer; + to_id: Peer; + distance: number; +} + +export interface messageActionGroupCall { + _: "messageActionGroupCall"; + call: InputGroupCall; + duration?: number; +} + +export interface messageActionInviteToGroupCall { + _: "messageActionInviteToGroupCall"; + call: InputGroupCall; + users: Array; +} + +export interface messageActionSetMessagesTTL { + _: "messageActionSetMessagesTTL"; + period: number; + auto_setting_from?: bigint; +} + +export interface messageActionGroupCallScheduled { + _: "messageActionGroupCallScheduled"; + call: InputGroupCall; + schedule_date: number; +} + +export interface messageActionSetChatTheme { + _: "messageActionSetChatTheme"; + emoticon: string; +} + +export interface messageActionChatJoinedByRequest { + _: "messageActionChatJoinedByRequest"; +} + +export interface messageActionWebViewDataSentMe { + _: "messageActionWebViewDataSentMe"; + text: string; + data: string; +} + +export interface messageActionWebViewDataSent { + _: "messageActionWebViewDataSent"; + text: string; +} + +export interface messageActionGiftPremium { + _: "messageActionGiftPremium"; + currency: string; + amount: bigint; + months: number; + crypto_currency?: string; + crypto_amount?: bigint; +} + +export interface messageActionTopicCreate { + _: "messageActionTopicCreate"; + title: string; + icon_color: number; + icon_emoji_id?: bigint; +} + +export interface messageActionTopicEdit { + _: "messageActionTopicEdit"; + title?: string; + icon_emoji_id?: bigint; + closed?: boolean; + hidden?: boolean; +} + +export interface messageActionSuggestProfilePhoto { + _: "messageActionSuggestProfilePhoto"; + photo: Photo; +} + +export interface messageActionRequestedPeer { + _: "messageActionRequestedPeer"; + button_id: number; + peers: Array; +} + +export interface messageActionSetChatWallPaper { + _: "messageActionSetChatWallPaper"; + same?: true; + for_both?: true; + wallpaper: WallPaper; +} + +export interface messageActionGiftCode { + _: "messageActionGiftCode"; + via_giveaway?: true; + unclaimed?: true; + boost_peer?: Peer; + months: number; + slug: string; + currency?: string; + amount?: bigint; + crypto_currency?: string; + crypto_amount?: bigint; +} + +export interface messageActionGiveawayLaunch { + _: "messageActionGiveawayLaunch"; +} + +export interface messageActionGiveawayResults { + _: "messageActionGiveawayResults"; + winners_count: number; + unclaimed_count: number; +} + +export interface messageActionBoostApply { + _: "messageActionBoostApply"; + boosts: number; +} + +export interface messageActionRequestedPeerSentMe { + _: "messageActionRequestedPeerSentMe"; + button_id: number; + peers: Array; +} + +export interface dialog { + _: "dialog"; + pinned?: true; + unread_mark?: true; + view_forum_as_messages?: true; + peer: Peer; + top_message: number; + read_inbox_max_id: number; + read_outbox_max_id: number; + unread_count: number; + unread_mentions_count: number; + unread_reactions_count: number; + notify_settings: PeerNotifySettings; + pts?: number; + draft?: DraftMessage; + folder_id?: number; + ttl_period?: number; +} + +export interface dialogFolder { + _: "dialogFolder"; + pinned?: true; + folder: Folder; + peer: Peer; + top_message: number; + unread_muted_peers_count: number; + unread_unmuted_peers_count: number; + unread_muted_messages_count: number; + unread_unmuted_messages_count: number; +} + +export interface photoEmpty { + _: "photoEmpty"; + id: bigint; +} + +export interface photo { + _: "photo"; + has_stickers?: true; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; + date: number; + sizes: Array; + video_sizes?: Array; + dc_id: number; +} + +export interface photoSizeEmpty { + _: "photoSizeEmpty"; + type: string; +} + +export interface photoSize { + _: "photoSize"; + type: string; + w: number; + h: number; + size: number; +} + +export interface photoCachedSize { + _: "photoCachedSize"; + type: string; + w: number; + h: number; + bytes: Uint8Array; +} + +export interface photoStrippedSize { + _: "photoStrippedSize"; + type: string; + bytes: Uint8Array; +} + +export interface photoSizeProgressive { + _: "photoSizeProgressive"; + type: string; + w: number; + h: number; + sizes: Array; +} + +export interface photoPathSize { + _: "photoPathSize"; + type: string; + bytes: Uint8Array; +} + +export interface geoPointEmpty { + _: "geoPointEmpty"; +} + +export interface geoPoint { + _: "geoPoint"; + long: number; + lat: number; + access_hash: bigint; + accuracy_radius?: number; +} + +export interface auth_sentCode { + _: "auth.sentCode"; + type: auth_SentCodeType; + phone_code_hash: string; + next_type?: auth_CodeType; + timeout?: number; +} + +export interface auth_sentCodeSuccess { + _: "auth.sentCodeSuccess"; + authorization: auth_Authorization; +} + +export interface auth_authorization { + _: "auth.authorization"; + setup_password_required?: true; + otherwise_relogin_days?: number; + tmp_sessions?: number; + future_auth_token?: Uint8Array; + user: User; +} + +export interface auth_authorizationSignUpRequired { + _: "auth.authorizationSignUpRequired"; + terms_of_service?: help_TermsOfService; +} + +export interface auth_exportedAuthorization { + _: "auth.exportedAuthorization"; + id: bigint; + bytes: Uint8Array; +} + +export interface inputNotifyPeer { + _: "inputNotifyPeer"; + peer: InputPeer; +} + +export interface inputNotifyUsers { + _: "inputNotifyUsers"; +} + +export interface inputNotifyChats { + _: "inputNotifyChats"; +} + +export interface inputNotifyBroadcasts { + _: "inputNotifyBroadcasts"; +} + +export interface inputNotifyForumTopic { + _: "inputNotifyForumTopic"; + peer: InputPeer; + top_msg_id: number; +} + +export interface inputPeerNotifySettings { + _: "inputPeerNotifySettings"; + show_previews?: boolean; + silent?: boolean; + mute_until?: number; + sound?: NotificationSound; + stories_muted?: boolean; + stories_hide_sender?: boolean; + stories_sound?: NotificationSound; +} + +export interface peerNotifySettings { + _: "peerNotifySettings"; + show_previews?: boolean; + silent?: boolean; + mute_until?: number; + ios_sound?: NotificationSound; + android_sound?: NotificationSound; + other_sound?: NotificationSound; + stories_muted?: boolean; + stories_hide_sender?: boolean; + stories_ios_sound?: NotificationSound; + stories_android_sound?: NotificationSound; + stories_other_sound?: NotificationSound; +} + +export interface peerSettings { + _: "peerSettings"; + report_spam?: true; + add_contact?: true; + block_contact?: true; + share_contact?: true; + need_contacts_exception?: true; + report_geo?: true; + autoarchived?: true; + invite_members?: true; + request_chat_broadcast?: true; + business_bot_paused?: true; + business_bot_can_reply?: true; + geo_distance?: number; + request_chat_title?: string; + request_chat_date?: number; + business_bot_id?: bigint; + business_bot_manage_url?: string; +} + +export interface wallPaper { + _: "wallPaper"; + id: bigint; + creator?: true; + default?: true; + pattern?: true; + dark?: true; + access_hash: bigint; + slug: string; + document: Document; + settings?: WallPaperSettings; +} + +export interface wallPaperNoFile { + _: "wallPaperNoFile"; + id: bigint; + default?: true; + dark?: true; + settings?: WallPaperSettings; +} + +export interface inputReportReasonSpam { + _: "inputReportReasonSpam"; +} + +export interface inputReportReasonViolence { + _: "inputReportReasonViolence"; +} + +export interface inputReportReasonPornography { + _: "inputReportReasonPornography"; +} + +export interface inputReportReasonChildAbuse { + _: "inputReportReasonChildAbuse"; +} + +export interface inputReportReasonOther { + _: "inputReportReasonOther"; +} + +export interface inputReportReasonCopyright { + _: "inputReportReasonCopyright"; +} + +export interface inputReportReasonGeoIrrelevant { + _: "inputReportReasonGeoIrrelevant"; +} + +export interface inputReportReasonFake { + _: "inputReportReasonFake"; +} + +export interface inputReportReasonIllegalDrugs { + _: "inputReportReasonIllegalDrugs"; +} + +export interface inputReportReasonPersonalDetails { + _: "inputReportReasonPersonalDetails"; +} + +export interface userFull { + _: "userFull"; + blocked?: true; + phone_calls_available?: true; + phone_calls_private?: true; + can_pin_message?: true; + has_scheduled?: true; + video_calls_available?: true; + voice_messages_forbidden?: true; + translations_disabled?: true; + stories_pinned_available?: true; + blocked_my_stories_from?: true; + wallpaper_overridden?: true; + contact_require_premium?: true; + read_dates_private?: true; + id: bigint; + about?: string; + settings: PeerSettings; + personal_photo?: Photo; + profile_photo?: Photo; + fallback_photo?: Photo; + notify_settings: PeerNotifySettings; + bot_info?: BotInfo; + pinned_msg_id?: number; + common_chats_count: number; + folder_id?: number; + ttl_period?: number; + theme_emoticon?: string; + private_forward_name?: string; + bot_group_admin_rights?: ChatAdminRights; + bot_broadcast_admin_rights?: ChatAdminRights; + premium_gifts?: Array; + wallpaper?: WallPaper; + stories?: PeerStories; + business_work_hours?: BusinessWorkHours; + business_location?: BusinessLocation; + business_greeting_message?: BusinessGreetingMessage; + business_away_message?: BusinessAwayMessage; + business_intro?: BusinessIntro; + birthday?: Birthday; + personal_channel_id?: bigint; + personal_channel_message?: number; +} + +export interface contact { + _: "contact"; + user_id: bigint; + mutual: boolean; +} + +export interface importedContact { + _: "importedContact"; + user_id: bigint; + client_id: bigint; +} + +export interface contactStatus { + _: "contactStatus"; + user_id: bigint; + status: UserStatus; +} + +export interface contacts_contactsNotModified { + _: "contacts.contactsNotModified"; +} + +export interface contacts_contacts { + _: "contacts.contacts"; + contacts: Array; + saved_count: number; + users: Array; +} + +export interface contacts_importedContacts { + _: "contacts.importedContacts"; + imported: Array; + popular_invites: Array; + retry_contacts: Array; + users: Array; +} + +export interface contacts_blocked { + _: "contacts.blocked"; + blocked: Array; + chats: Array; + users: Array; +} + +export interface contacts_blockedSlice { + _: "contacts.blockedSlice"; + count: number; + blocked: Array; + chats: Array; + users: Array; +} + +export interface messages_dialogs { + _: "messages.dialogs"; + dialogs: Array; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_dialogsSlice { + _: "messages.dialogsSlice"; + count: number; + dialogs: Array; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_dialogsNotModified { + _: "messages.dialogsNotModified"; + count: number; +} + +export interface messages_messages { + _: "messages.messages"; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_messagesSlice { + _: "messages.messagesSlice"; + inexact?: true; + count: number; + next_rate?: number; + offset_id_offset?: number; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_channelMessages { + _: "messages.channelMessages"; + inexact?: true; + pts: number; + count: number; + offset_id_offset?: number; + messages: Array; + topics: Array; + chats: Array; + users: Array; +} + +export interface messages_messagesNotModified { + _: "messages.messagesNotModified"; + count: number; +} + +export interface messages_chats { + _: "messages.chats"; + chats: Array; +} + +export interface messages_chatsSlice { + _: "messages.chatsSlice"; + count: number; + chats: Array; +} + +export interface messages_chatFull { + _: "messages.chatFull"; + full_chat: ChatFull; + chats: Array; + users: Array; +} + +export interface messages_affectedHistory { + _: "messages.affectedHistory"; + pts: number; + pts_count: number; + offset: number; +} + +export interface inputMessagesFilterEmpty { + _: "inputMessagesFilterEmpty"; +} + +export interface inputMessagesFilterPhotos { + _: "inputMessagesFilterPhotos"; +} + +export interface inputMessagesFilterVideo { + _: "inputMessagesFilterVideo"; +} + +export interface inputMessagesFilterPhotoVideo { + _: "inputMessagesFilterPhotoVideo"; +} + +export interface inputMessagesFilterDocument { + _: "inputMessagesFilterDocument"; +} + +export interface inputMessagesFilterUrl { + _: "inputMessagesFilterUrl"; +} + +export interface inputMessagesFilterGif { + _: "inputMessagesFilterGif"; +} + +export interface inputMessagesFilterVoice { + _: "inputMessagesFilterVoice"; +} + +export interface inputMessagesFilterMusic { + _: "inputMessagesFilterMusic"; +} + +export interface inputMessagesFilterChatPhotos { + _: "inputMessagesFilterChatPhotos"; +} + +export interface inputMessagesFilterPhoneCalls { + _: "inputMessagesFilterPhoneCalls"; + missed?: true; +} + +export interface inputMessagesFilterRoundVoice { + _: "inputMessagesFilterRoundVoice"; +} + +export interface inputMessagesFilterRoundVideo { + _: "inputMessagesFilterRoundVideo"; +} + +export interface inputMessagesFilterMyMentions { + _: "inputMessagesFilterMyMentions"; +} + +export interface inputMessagesFilterGeo { + _: "inputMessagesFilterGeo"; +} + +export interface inputMessagesFilterContacts { + _: "inputMessagesFilterContacts"; +} + +export interface inputMessagesFilterPinned { + _: "inputMessagesFilterPinned"; +} + +export interface updateNewMessage { + _: "updateNewMessage"; + message: Message; + pts: number; + pts_count: number; +} + +export interface updateMessageID { + _: "updateMessageID"; + id: number; + random_id: bigint; +} + +export interface updateDeleteMessages { + _: "updateDeleteMessages"; + messages: Array; + pts: number; + pts_count: number; +} + +export interface updateUserTyping { + _: "updateUserTyping"; + user_id: bigint; + action: SendMessageAction; +} + +export interface updateChatUserTyping { + _: "updateChatUserTyping"; + chat_id: bigint; + from_id: Peer; + action: SendMessageAction; +} + +export interface updateChatParticipants { + _: "updateChatParticipants"; + participants: ChatParticipants; +} + +export interface updateUserStatus { + _: "updateUserStatus"; + user_id: bigint; + status: UserStatus; +} + +export interface updateUserName { + _: "updateUserName"; + user_id: bigint; + first_name: string; + last_name: string; + usernames: Array; +} + +export interface updateNewAuthorization { + _: "updateNewAuthorization"; + unconfirmed?: true; + hash: bigint; + date?: number; + device?: string; + location?: string; +} + +export interface updateNewEncryptedMessage { + _: "updateNewEncryptedMessage"; + message: EncryptedMessage; + qts: number; +} + +export interface updateEncryptedChatTyping { + _: "updateEncryptedChatTyping"; + chat_id: number; +} + +export interface updateEncryption { + _: "updateEncryption"; + chat: EncryptedChat; + date: number; +} + +export interface updateEncryptedMessagesRead { + _: "updateEncryptedMessagesRead"; + chat_id: number; + max_date: number; + date: number; +} + +export interface updateChatParticipantAdd { + _: "updateChatParticipantAdd"; + chat_id: bigint; + user_id: bigint; + inviter_id: bigint; + date: number; + version: number; +} + +export interface updateChatParticipantDelete { + _: "updateChatParticipantDelete"; + chat_id: bigint; + user_id: bigint; + version: number; +} + +export interface updateDcOptions { + _: "updateDcOptions"; + dc_options: Array; +} + +export interface updateNotifySettings { + _: "updateNotifySettings"; + peer: NotifyPeer; + notify_settings: PeerNotifySettings; +} + +export interface updateServiceNotification { + _: "updateServiceNotification"; + popup?: true; + invert_media?: true; + inbox_date?: number; + type: string; + message: string; + media: MessageMedia; + entities: Array; +} + +export interface updatePrivacy { + _: "updatePrivacy"; + key: PrivacyKey; + rules: Array; +} + +export interface updateUserPhone { + _: "updateUserPhone"; + user_id: bigint; + phone: string; +} + +export interface updateReadHistoryInbox { + _: "updateReadHistoryInbox"; + folder_id?: number; + peer: Peer; + max_id: number; + still_unread_count: number; + pts: number; + pts_count: number; +} + +export interface updateReadHistoryOutbox { + _: "updateReadHistoryOutbox"; + peer: Peer; + max_id: number; + pts: number; + pts_count: number; +} + +export interface updateWebPage { + _: "updateWebPage"; + webpage: WebPage; + pts: number; + pts_count: number; +} + +export interface updateReadMessagesContents { + _: "updateReadMessagesContents"; + messages: Array; + pts: number; + pts_count: number; + date?: number; +} + +export interface updateChannelTooLong { + _: "updateChannelTooLong"; + channel_id: bigint; + pts?: number; +} + +export interface updateChannel { + _: "updateChannel"; + channel_id: bigint; +} + +export interface updateNewChannelMessage { + _: "updateNewChannelMessage"; + message: Message; + pts: number; + pts_count: number; +} + +export interface updateReadChannelInbox { + _: "updateReadChannelInbox"; + folder_id?: number; + channel_id: bigint; + max_id: number; + still_unread_count: number; + pts: number; +} + +export interface updateDeleteChannelMessages { + _: "updateDeleteChannelMessages"; + channel_id: bigint; + messages: Array; + pts: number; + pts_count: number; +} + +export interface updateChannelMessageViews { + _: "updateChannelMessageViews"; + channel_id: bigint; + id: number; + views: number; +} + +export interface updateChatParticipantAdmin { + _: "updateChatParticipantAdmin"; + chat_id: bigint; + user_id: bigint; + is_admin: boolean; + version: number; +} + +export interface updateNewStickerSet { + _: "updateNewStickerSet"; + stickerset: messages_StickerSet; +} + +export interface updateStickerSetsOrder { + _: "updateStickerSetsOrder"; + masks?: true; + emojis?: true; + order: Array; +} + +export interface updateStickerSets { + _: "updateStickerSets"; + masks?: true; + emojis?: true; +} + +export interface updateSavedGifs { + _: "updateSavedGifs"; +} + +export interface updateBotInlineQuery { + _: "updateBotInlineQuery"; + query_id: bigint; + user_id: bigint; + query: string; + geo?: GeoPoint; + peer_type?: InlineQueryPeerType; + offset: string; +} + +export interface updateBotInlineSend { + _: "updateBotInlineSend"; + user_id: bigint; + query: string; + geo?: GeoPoint; + id: string; + msg_id?: InputBotInlineMessageID; +} + +export interface updateEditChannelMessage { + _: "updateEditChannelMessage"; + message: Message; + pts: number; + pts_count: number; +} + +export interface updateBotCallbackQuery { + _: "updateBotCallbackQuery"; + query_id: bigint; + user_id: bigint; + peer: Peer; + msg_id: number; + chat_instance: bigint; + data?: Uint8Array; + game_short_name?: string; +} + +export interface updateEditMessage { + _: "updateEditMessage"; + message: Message; + pts: number; + pts_count: number; +} + +export interface updateInlineBotCallbackQuery { + _: "updateInlineBotCallbackQuery"; + query_id: bigint; + user_id: bigint; + msg_id: InputBotInlineMessageID; + chat_instance: bigint; + data?: Uint8Array; + game_short_name?: string; +} + +export interface updateReadChannelOutbox { + _: "updateReadChannelOutbox"; + channel_id: bigint; + max_id: number; +} + +export interface updateDraftMessage { + _: "updateDraftMessage"; + peer: Peer; + top_msg_id?: number; + draft: DraftMessage; +} + +export interface updateReadFeaturedStickers { + _: "updateReadFeaturedStickers"; +} + +export interface updateRecentStickers { + _: "updateRecentStickers"; +} + +export interface updateConfig { + _: "updateConfig"; +} + +export interface updatePtsChanged { + _: "updatePtsChanged"; +} + +export interface updateChannelWebPage { + _: "updateChannelWebPage"; + channel_id: bigint; + webpage: WebPage; + pts: number; + pts_count: number; +} + +export interface updateDialogPinned { + _: "updateDialogPinned"; + pinned?: true; + folder_id?: number; + peer: DialogPeer; +} + +export interface updatePinnedDialogs { + _: "updatePinnedDialogs"; + folder_id?: number; + order?: Array; +} + +export interface updateBotWebhookJSON { + _: "updateBotWebhookJSON"; + data: DataJSON; +} + +export interface updateBotWebhookJSONQuery { + _: "updateBotWebhookJSONQuery"; + query_id: bigint; + data: DataJSON; + timeout: number; +} + +export interface updateBotShippingQuery { + _: "updateBotShippingQuery"; + query_id: bigint; + user_id: bigint; + payload: Uint8Array; + shipping_address: PostAddress; +} + +export interface updateBotPrecheckoutQuery { + _: "updateBotPrecheckoutQuery"; + query_id: bigint; + user_id: bigint; + payload: Uint8Array; + info?: PaymentRequestedInfo; + shipping_option_id?: string; + currency: string; + total_amount: bigint; +} + +export interface updatePhoneCall { + _: "updatePhoneCall"; + phone_call: PhoneCall; +} + +export interface updateLangPackTooLong { + _: "updateLangPackTooLong"; + lang_code: string; +} + +export interface updateLangPack { + _: "updateLangPack"; + difference: LangPackDifference; +} + +export interface updateFavedStickers { + _: "updateFavedStickers"; +} + +export interface updateChannelReadMessagesContents { + _: "updateChannelReadMessagesContents"; + channel_id: bigint; + top_msg_id?: number; + messages: Array; +} + +export interface updateContactsReset { + _: "updateContactsReset"; +} + +export interface updateChannelAvailableMessages { + _: "updateChannelAvailableMessages"; + channel_id: bigint; + available_min_id: number; +} + +export interface updateDialogUnreadMark { + _: "updateDialogUnreadMark"; + unread?: true; + peer: DialogPeer; +} + +export interface updateMessagePoll { + _: "updateMessagePoll"; + poll_id: bigint; + poll?: Poll; + results: PollResults; +} + +export interface updateChatDefaultBannedRights { + _: "updateChatDefaultBannedRights"; + peer: Peer; + default_banned_rights: ChatBannedRights; + version: number; +} + +export interface updateFolderPeers { + _: "updateFolderPeers"; + folder_peers: Array; + pts: number; + pts_count: number; +} + +export interface updatePeerSettings { + _: "updatePeerSettings"; + peer: Peer; + settings: PeerSettings; +} + +export interface updatePeerLocated { + _: "updatePeerLocated"; + peers: Array; +} + +export interface updateNewScheduledMessage { + _: "updateNewScheduledMessage"; + message: Message; +} + +export interface updateDeleteScheduledMessages { + _: "updateDeleteScheduledMessages"; + peer: Peer; + messages: Array; +} + +export interface updateTheme { + _: "updateTheme"; + theme: Theme; +} + +export interface updateGeoLiveViewed { + _: "updateGeoLiveViewed"; + peer: Peer; + msg_id: number; +} + +export interface updateLoginToken { + _: "updateLoginToken"; +} + +export interface updateMessagePollVote { + _: "updateMessagePollVote"; + poll_id: bigint; + peer: Peer; + options: Array; + qts: number; +} + +export interface updateDialogFilter { + _: "updateDialogFilter"; + id: number; + filter?: DialogFilter; +} + +export interface updateDialogFilterOrder { + _: "updateDialogFilterOrder"; + order: Array; +} + +export interface updateDialogFilters { + _: "updateDialogFilters"; +} + +export interface updatePhoneCallSignalingData { + _: "updatePhoneCallSignalingData"; + phone_call_id: bigint; + data: Uint8Array; +} + +export interface updateChannelMessageForwards { + _: "updateChannelMessageForwards"; + channel_id: bigint; + id: number; + forwards: number; +} + +export interface updateReadChannelDiscussionInbox { + _: "updateReadChannelDiscussionInbox"; + channel_id: bigint; + top_msg_id: number; + read_max_id: number; + broadcast_id?: bigint; + broadcast_post?: number; +} + +export interface updateReadChannelDiscussionOutbox { + _: "updateReadChannelDiscussionOutbox"; + channel_id: bigint; + top_msg_id: number; + read_max_id: number; +} + +export interface updatePeerBlocked { + _: "updatePeerBlocked"; + blocked?: true; + blocked_my_stories_from?: true; + peer_id: Peer; +} + +export interface updateChannelUserTyping { + _: "updateChannelUserTyping"; + channel_id: bigint; + top_msg_id?: number; + from_id: Peer; + action: SendMessageAction; +} + +export interface updatePinnedMessages { + _: "updatePinnedMessages"; + pinned?: true; + peer: Peer; + messages: Array; + pts: number; + pts_count: number; +} + +export interface updatePinnedChannelMessages { + _: "updatePinnedChannelMessages"; + pinned?: true; + channel_id: bigint; + messages: Array; + pts: number; + pts_count: number; +} + +export interface updateChat { + _: "updateChat"; + chat_id: bigint; +} + +export interface updateGroupCallParticipants { + _: "updateGroupCallParticipants"; + call: InputGroupCall; + participants: Array; + version: number; +} + +export interface updateGroupCall { + _: "updateGroupCall"; + chat_id: bigint; + call: GroupCall; +} + +export interface updatePeerHistoryTTL { + _: "updatePeerHistoryTTL"; + peer: Peer; + ttl_period?: number; +} + +export interface updateChatParticipant { + _: "updateChatParticipant"; + chat_id: bigint; + date: number; + actor_id: bigint; + user_id: bigint; + prev_participant?: ChatParticipant; + new_participant?: ChatParticipant; + invite?: ExportedChatInvite; + qts: number; +} + +export interface updateChannelParticipant { + _: "updateChannelParticipant"; + via_chatlist?: true; + channel_id: bigint; + date: number; + actor_id: bigint; + user_id: bigint; + prev_participant?: ChannelParticipant; + new_participant?: ChannelParticipant; + invite?: ExportedChatInvite; + qts: number; +} + +export interface updateBotStopped { + _: "updateBotStopped"; + user_id: bigint; + date: number; + stopped: boolean; + qts: number; +} + +export interface updateGroupCallConnection { + _: "updateGroupCallConnection"; + presentation?: true; + params: DataJSON; +} + +export interface updateBotCommands { + _: "updateBotCommands"; + peer: Peer; + bot_id: bigint; + commands: Array; +} + +export interface updatePendingJoinRequests { + _: "updatePendingJoinRequests"; + peer: Peer; + requests_pending: number; + recent_requesters: Array; +} + +export interface updateBotChatInviteRequester { + _: "updateBotChatInviteRequester"; + peer: Peer; + date: number; + user_id: bigint; + about: string; + invite: ExportedChatInvite; + qts: number; +} + +export interface updateMessageReactions { + _: "updateMessageReactions"; + peer: Peer; + msg_id: number; + top_msg_id?: number; + reactions: MessageReactions; +} + +export interface updateAttachMenuBots { + _: "updateAttachMenuBots"; +} + +export interface updateWebViewResultSent { + _: "updateWebViewResultSent"; + query_id: bigint; +} + +export interface updateBotMenuButton { + _: "updateBotMenuButton"; + bot_id: bigint; + button: BotMenuButton; +} + +export interface updateSavedRingtones { + _: "updateSavedRingtones"; +} + +export interface updateTranscribedAudio { + _: "updateTranscribedAudio"; + pending?: true; + peer: Peer; + msg_id: number; + transcription_id: bigint; + text: string; +} + +export interface updateReadFeaturedEmojiStickers { + _: "updateReadFeaturedEmojiStickers"; +} + +export interface updateUserEmojiStatus { + _: "updateUserEmojiStatus"; + user_id: bigint; + emoji_status: EmojiStatus; +} + +export interface updateRecentEmojiStatuses { + _: "updateRecentEmojiStatuses"; +} + +export interface updateRecentReactions { + _: "updateRecentReactions"; +} + +export interface updateMoveStickerSetToTop { + _: "updateMoveStickerSetToTop"; + masks?: true; + emojis?: true; + stickerset: bigint; +} + +export interface updateMessageExtendedMedia { + _: "updateMessageExtendedMedia"; + peer: Peer; + msg_id: number; + extended_media: MessageExtendedMedia; +} + +export interface updateChannelPinnedTopic { + _: "updateChannelPinnedTopic"; + pinned?: true; + channel_id: bigint; + topic_id: number; +} + +export interface updateChannelPinnedTopics { + _: "updateChannelPinnedTopics"; + channel_id: bigint; + order?: Array; +} + +export interface updateUser { + _: "updateUser"; + user_id: bigint; +} + +export interface updateAutoSaveSettings { + _: "updateAutoSaveSettings"; +} + +export interface updateStory { + _: "updateStory"; + peer: Peer; + story: StoryItem; +} + +export interface updateReadStories { + _: "updateReadStories"; + peer: Peer; + max_id: number; +} + +export interface updateStoryID { + _: "updateStoryID"; + id: number; + random_id: bigint; +} + +export interface updateStoriesStealthMode { + _: "updateStoriesStealthMode"; + stealth_mode: StoriesStealthMode; +} + +export interface updateSentStoryReaction { + _: "updateSentStoryReaction"; + peer: Peer; + story_id: number; + reaction: Reaction; +} + +export interface updateBotChatBoost { + _: "updateBotChatBoost"; + peer: Peer; + boost: Boost; + qts: number; +} + +export interface updateChannelViewForumAsMessages { + _: "updateChannelViewForumAsMessages"; + channel_id: bigint; + enabled: boolean; +} + +export interface updatePeerWallpaper { + _: "updatePeerWallpaper"; + wallpaper_overridden?: true; + peer: Peer; + wallpaper?: WallPaper; +} + +export interface updateBotMessageReaction { + _: "updateBotMessageReaction"; + peer: Peer; + msg_id: number; + date: number; + actor: Peer; + old_reactions: Array; + new_reactions: Array; + qts: number; +} + +export interface updateBotMessageReactions { + _: "updateBotMessageReactions"; + peer: Peer; + msg_id: number; + date: number; + reactions: Array; + qts: number; +} + +export interface updateSavedDialogPinned { + _: "updateSavedDialogPinned"; + pinned?: true; + peer: DialogPeer; +} + +export interface updatePinnedSavedDialogs { + _: "updatePinnedSavedDialogs"; + order?: Array; +} + +export interface updateSavedReactionTags { + _: "updateSavedReactionTags"; +} + +export interface updateSmsJob { + _: "updateSmsJob"; + job_id: string; +} + +export interface updateQuickReplies { + _: "updateQuickReplies"; + quick_replies: Array; +} + +export interface updateNewQuickReply { + _: "updateNewQuickReply"; + quick_reply: QuickReply; +} + +export interface updateDeleteQuickReply { + _: "updateDeleteQuickReply"; + shortcut_id: number; +} + +export interface updateQuickReplyMessage { + _: "updateQuickReplyMessage"; + message: Message; +} + +export interface updateDeleteQuickReplyMessages { + _: "updateDeleteQuickReplyMessages"; + shortcut_id: number; + messages: Array; +} + +export interface updateBotBusinessConnect { + _: "updateBotBusinessConnect"; + connection: BotBusinessConnection; + qts: number; +} + +export interface updateBotNewBusinessMessage { + _: "updateBotNewBusinessMessage"; + connection_id: string; + message: Message; + reply_to_message?: Message; + qts: number; +} + +export interface updateBotEditBusinessMessage { + _: "updateBotEditBusinessMessage"; + connection_id: string; + message: Message; + reply_to_message?: Message; + qts: number; +} + +export interface updateBotDeleteBusinessMessage { + _: "updateBotDeleteBusinessMessage"; + connection_id: string; + peer: Peer; + messages: Array; + qts: number; +} + +export interface updates_state { + _: "updates.state"; + pts: number; + qts: number; + date: number; + seq: number; + unread_count: number; +} + +export interface updates_differenceEmpty { + _: "updates.differenceEmpty"; + date: number; + seq: number; +} + +export interface updates_difference { + _: "updates.difference"; + new_messages: Array; + new_encrypted_messages: Array; + other_updates: Array; + chats: Array; + users: Array; + state: updates_State; +} + +export interface updates_differenceSlice { + _: "updates.differenceSlice"; + new_messages: Array; + new_encrypted_messages: Array; + other_updates: Array; + chats: Array; + users: Array; + intermediate_state: updates_State; +} + +export interface updates_differenceTooLong { + _: "updates.differenceTooLong"; + pts: number; +} + +export interface updatesTooLong { + _: "updatesTooLong"; +} + +export interface updateShortMessage { + _: "updateShortMessage"; + out?: true; + mentioned?: true; + media_unread?: true; + silent?: true; + id: number; + user_id: bigint; + message: string; + pts: number; + pts_count: number; + date: number; + fwd_from?: MessageFwdHeader; + via_bot_id?: bigint; + reply_to?: MessageReplyHeader; + entities?: Array; + ttl_period?: number; +} + +export interface updateShortChatMessage { + _: "updateShortChatMessage"; + out?: true; + mentioned?: true; + media_unread?: true; + silent?: true; + id: number; + from_id: bigint; + chat_id: bigint; + message: string; + pts: number; + pts_count: number; + date: number; + fwd_from?: MessageFwdHeader; + via_bot_id?: bigint; + reply_to?: MessageReplyHeader; + entities?: Array; + ttl_period?: number; +} + +export interface updateShort { + _: "updateShort"; + update: Update; + date: number; +} + +export interface updatesCombined { + _: "updatesCombined"; + updates: Array; + users: Array; + chats: Array; + date: number; + seq_start: number; + seq: number; +} + +export interface updates { + _: "updates"; + updates: Array; + users: Array; + chats: Array; + date: number; + seq: number; +} + +export interface updateShortSentMessage { + _: "updateShortSentMessage"; + out?: true; + id: number; + pts: number; + pts_count: number; + date: number; + media?: MessageMedia; + entities?: Array; + ttl_period?: number; +} + +export interface photos_photos { + _: "photos.photos"; + photos: Array; + users: Array; +} + +export interface photos_photosSlice { + _: "photos.photosSlice"; + count: number; + photos: Array; + users: Array; +} + +export interface photos_photo { + _: "photos.photo"; + photo: Photo; + users: Array; +} + +export interface upload_file { + _: "upload.file"; + type: storage_FileType; + mtime: number; + bytes: Uint8Array; +} + +export interface upload_fileCdnRedirect { + _: "upload.fileCdnRedirect"; + dc_id: number; + file_token: Uint8Array; + encryption_key: Uint8Array; + encryption_iv: Uint8Array; + file_hashes: Array; +} + +export interface dcOption { + _: "dcOption"; + ipv6?: true; + media_only?: true; + tcpo_only?: true; + cdn?: true; + static?: true; + this_port_only?: true; + id: number; + ip_address: string; + port: number; + secret?: Uint8Array; +} + +export interface config { + _: "config"; + default_p2p_contacts?: true; + preload_featured_stickers?: true; + revoke_pm_inbox?: true; + blocked_mode?: true; + force_try_ipv6?: true; + date: number; + expires: number; + test_mode: boolean; + this_dc: number; + dc_options: Array; + dc_txt_domain_name: string; + chat_size_max: number; + megagroup_size_max: number; + forwarded_count_max: number; + online_update_period_ms: number; + offline_blur_timeout_ms: number; + offline_idle_timeout_ms: number; + online_cloud_timeout_ms: number; + notify_cloud_delay_ms: number; + notify_default_delay_ms: number; + push_chat_period_ms: number; + push_chat_limit: number; + edit_time_limit: number; + revoke_time_limit: number; + revoke_pm_time_limit: number; + rating_e_decay: number; + stickers_recent_limit: number; + channels_read_media_period: number; + tmp_sessions?: number; + call_receive_timeout_ms: number; + call_ring_timeout_ms: number; + call_connect_timeout_ms: number; + call_packet_timeout_ms: number; + me_url_prefix: string; + autoupdate_url_prefix?: string; + gif_search_username?: string; + venue_search_username?: string; + img_search_username?: string; + static_maps_provider?: string; + caption_length_max: number; + message_length_max: number; + webfile_dc_id: number; + suggested_lang_code?: string; + lang_pack_version?: number; + base_lang_pack_version?: number; + reactions_default?: Reaction; + autologin_token?: string; +} + +export interface nearestDc { + _: "nearestDc"; + country: string; + this_dc: number; + nearest_dc: number; +} + +export interface help_appUpdate { + _: "help.appUpdate"; + can_not_skip?: true; + id: number; + version: string; + text: string; + entities: Array; + document?: Document; + url?: string; + sticker?: Document; +} + +export interface help_noAppUpdate { + _: "help.noAppUpdate"; +} + +export interface help_inviteText { + _: "help.inviteText"; + message: string; +} + +export interface encryptedChatEmpty { + _: "encryptedChatEmpty"; + id: number; +} + +export interface encryptedChatWaiting { + _: "encryptedChatWaiting"; + id: number; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; +} + +export interface encryptedChatRequested { + _: "encryptedChatRequested"; + folder_id?: number; + id: number; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; + g_a: Uint8Array; +} + +export interface encryptedChat { + _: "encryptedChat"; + id: number; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; + g_a_or_b: Uint8Array; + key_fingerprint: bigint; +} + +export interface encryptedChatDiscarded { + _: "encryptedChatDiscarded"; + history_deleted?: true; + id: number; +} + +export interface inputEncryptedChat { + _: "inputEncryptedChat"; + chat_id: number; + access_hash: bigint; +} + +export interface encryptedFileEmpty { + _: "encryptedFileEmpty"; +} + +export interface encryptedFile { + _: "encryptedFile"; + id: bigint; + access_hash: bigint; + size: bigint; + dc_id: number; + key_fingerprint: number; +} + +export interface inputEncryptedFileEmpty { + _: "inputEncryptedFileEmpty"; +} + +export interface inputEncryptedFileUploaded { + _: "inputEncryptedFileUploaded"; + id: bigint; + parts: number; + md5_checksum: string; + key_fingerprint: number; +} + +export interface inputEncryptedFile { + _: "inputEncryptedFile"; + id: bigint; + access_hash: bigint; +} + +export interface inputEncryptedFileBigUploaded { + _: "inputEncryptedFileBigUploaded"; + id: bigint; + parts: number; + key_fingerprint: number; +} + +export interface encryptedMessage { + _: "encryptedMessage"; + random_id: bigint; + chat_id: number; + date: number; + bytes: Uint8Array; + file: EncryptedFile; +} + +export interface encryptedMessageService { + _: "encryptedMessageService"; + random_id: bigint; + chat_id: number; + date: number; + bytes: Uint8Array; +} + +export interface messages_dhConfigNotModified { + _: "messages.dhConfigNotModified"; + random: Uint8Array; +} + +export interface messages_dhConfig { + _: "messages.dhConfig"; + g: number; + p: Uint8Array; + version: number; + random: Uint8Array; +} + +export interface messages_sentEncryptedMessage { + _: "messages.sentEncryptedMessage"; + date: number; +} + +export interface messages_sentEncryptedFile { + _: "messages.sentEncryptedFile"; + date: number; + file: EncryptedFile; +} + +export interface inputDocumentEmpty { + _: "inputDocumentEmpty"; +} + +export interface inputDocument { + _: "inputDocument"; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; +} + +export interface documentEmpty { + _: "documentEmpty"; + id: bigint; +} + +export interface document { + _: "document"; + id: bigint; + access_hash: bigint; + file_reference: Uint8Array; + date: number; + mime_type: string; + size: bigint; + thumbs?: Array; + video_thumbs?: Array; + dc_id: number; + attributes: Array; +} + +export interface help_support { + _: "help.support"; + phone_number: string; + user: User; +} + +export interface notifyPeer { + _: "notifyPeer"; + peer: Peer; +} + +export interface notifyUsers { + _: "notifyUsers"; +} + +export interface notifyChats { + _: "notifyChats"; +} + +export interface notifyBroadcasts { + _: "notifyBroadcasts"; +} + +export interface notifyForumTopic { + _: "notifyForumTopic"; + peer: Peer; + top_msg_id: number; +} + +export interface sendMessageTypingAction { + _: "sendMessageTypingAction"; +} + +export interface sendMessageCancelAction { + _: "sendMessageCancelAction"; +} + +export interface sendMessageRecordVideoAction { + _: "sendMessageRecordVideoAction"; +} + +export interface sendMessageUploadVideoAction { + _: "sendMessageUploadVideoAction"; + progress: number; +} + +export interface sendMessageRecordAudioAction { + _: "sendMessageRecordAudioAction"; +} + +export interface sendMessageUploadAudioAction { + _: "sendMessageUploadAudioAction"; + progress: number; +} + +export interface sendMessageUploadPhotoAction { + _: "sendMessageUploadPhotoAction"; + progress: number; +} + +export interface sendMessageUploadDocumentAction { + _: "sendMessageUploadDocumentAction"; + progress: number; +} + +export interface sendMessageGeoLocationAction { + _: "sendMessageGeoLocationAction"; +} + +export interface sendMessageChooseContactAction { + _: "sendMessageChooseContactAction"; +} + +export interface sendMessageGamePlayAction { + _: "sendMessageGamePlayAction"; +} + +export interface sendMessageRecordRoundAction { + _: "sendMessageRecordRoundAction"; +} + +export interface sendMessageUploadRoundAction { + _: "sendMessageUploadRoundAction"; + progress: number; +} + +export interface speakingInGroupCallAction { + _: "speakingInGroupCallAction"; +} + +export interface sendMessageHistoryImportAction { + _: "sendMessageHistoryImportAction"; + progress: number; +} + +export interface sendMessageChooseStickerAction { + _: "sendMessageChooseStickerAction"; +} + +export interface sendMessageEmojiInteraction { + _: "sendMessageEmojiInteraction"; + emoticon: string; + msg_id: number; + interaction: DataJSON; +} + +export interface sendMessageEmojiInteractionSeen { + _: "sendMessageEmojiInteractionSeen"; + emoticon: string; +} + +export interface contacts_found { + _: "contacts.found"; + my_results: Array; + results: Array; + chats: Array; + users: Array; +} + +export interface inputPrivacyKeyStatusTimestamp { + _: "inputPrivacyKeyStatusTimestamp"; +} + +export interface inputPrivacyKeyChatInvite { + _: "inputPrivacyKeyChatInvite"; +} + +export interface inputPrivacyKeyPhoneCall { + _: "inputPrivacyKeyPhoneCall"; +} + +export interface inputPrivacyKeyPhoneP2P { + _: "inputPrivacyKeyPhoneP2P"; +} + +export interface inputPrivacyKeyForwards { + _: "inputPrivacyKeyForwards"; +} + +export interface inputPrivacyKeyProfilePhoto { + _: "inputPrivacyKeyProfilePhoto"; +} + +export interface inputPrivacyKeyPhoneNumber { + _: "inputPrivacyKeyPhoneNumber"; +} + +export interface inputPrivacyKeyAddedByPhone { + _: "inputPrivacyKeyAddedByPhone"; +} + +export interface inputPrivacyKeyVoiceMessages { + _: "inputPrivacyKeyVoiceMessages"; +} + +export interface inputPrivacyKeyAbout { + _: "inputPrivacyKeyAbout"; +} + +export interface inputPrivacyKeyBirthday { + _: "inputPrivacyKeyBirthday"; +} + +export interface privacyKeyStatusTimestamp { + _: "privacyKeyStatusTimestamp"; +} + +export interface privacyKeyChatInvite { + _: "privacyKeyChatInvite"; +} + +export interface privacyKeyPhoneCall { + _: "privacyKeyPhoneCall"; +} + +export interface privacyKeyPhoneP2P { + _: "privacyKeyPhoneP2P"; +} + +export interface privacyKeyForwards { + _: "privacyKeyForwards"; +} + +export interface privacyKeyProfilePhoto { + _: "privacyKeyProfilePhoto"; +} + +export interface privacyKeyPhoneNumber { + _: "privacyKeyPhoneNumber"; +} + +export interface privacyKeyAddedByPhone { + _: "privacyKeyAddedByPhone"; +} + +export interface privacyKeyVoiceMessages { + _: "privacyKeyVoiceMessages"; +} + +export interface privacyKeyAbout { + _: "privacyKeyAbout"; +} + +export interface privacyKeyBirthday { + _: "privacyKeyBirthday"; +} + +export interface inputPrivacyValueAllowContacts { + _: "inputPrivacyValueAllowContacts"; +} + +export interface inputPrivacyValueAllowAll { + _: "inputPrivacyValueAllowAll"; +} + +export interface inputPrivacyValueAllowUsers { + _: "inputPrivacyValueAllowUsers"; + users: Array; +} + +export interface inputPrivacyValueDisallowContacts { + _: "inputPrivacyValueDisallowContacts"; +} + +export interface inputPrivacyValueDisallowAll { + _: "inputPrivacyValueDisallowAll"; +} + +export interface inputPrivacyValueDisallowUsers { + _: "inputPrivacyValueDisallowUsers"; + users: Array; +} + +export interface inputPrivacyValueAllowChatParticipants { + _: "inputPrivacyValueAllowChatParticipants"; + chats: Array; +} + +export interface inputPrivacyValueDisallowChatParticipants { + _: "inputPrivacyValueDisallowChatParticipants"; + chats: Array; +} + +export interface inputPrivacyValueAllowCloseFriends { + _: "inputPrivacyValueAllowCloseFriends"; +} + +export interface inputPrivacyValueAllowPremium { + _: "inputPrivacyValueAllowPremium"; +} + +export interface privacyValueAllowContacts { + _: "privacyValueAllowContacts"; +} + +export interface privacyValueAllowAll { + _: "privacyValueAllowAll"; +} + +export interface privacyValueAllowUsers { + _: "privacyValueAllowUsers"; + users: Array; +} + +export interface privacyValueDisallowContacts { + _: "privacyValueDisallowContacts"; +} + +export interface privacyValueDisallowAll { + _: "privacyValueDisallowAll"; +} + +export interface privacyValueDisallowUsers { + _: "privacyValueDisallowUsers"; + users: Array; +} + +export interface privacyValueAllowChatParticipants { + _: "privacyValueAllowChatParticipants"; + chats: Array; +} + +export interface privacyValueDisallowChatParticipants { + _: "privacyValueDisallowChatParticipants"; + chats: Array; +} + +export interface privacyValueAllowCloseFriends { + _: "privacyValueAllowCloseFriends"; +} + +export interface privacyValueAllowPremium { + _: "privacyValueAllowPremium"; +} + +export interface account_privacyRules { + _: "account.privacyRules"; + rules: Array; + chats: Array; + users: Array; +} + +export interface accountDaysTTL { + _: "accountDaysTTL"; + days: number; +} + +export interface documentAttributeImageSize { + _: "documentAttributeImageSize"; + w: number; + h: number; +} + +export interface documentAttributeAnimated { + _: "documentAttributeAnimated"; +} + +export interface documentAttributeSticker { + _: "documentAttributeSticker"; + mask?: true; + alt: string; + stickerset: InputStickerSet; + mask_coords?: MaskCoords; +} + +export interface documentAttributeVideo { + _: "documentAttributeVideo"; + round_message?: true; + supports_streaming?: true; + nosound?: true; + duration: number; + w: number; + h: number; + preload_prefix_size?: number; +} + +export interface documentAttributeAudio { + _: "documentAttributeAudio"; + voice?: true; + duration: number; + title?: string; + performer?: string; + waveform?: Uint8Array; +} + +export interface documentAttributeFilename { + _: "documentAttributeFilename"; + file_name: string; +} + +export interface documentAttributeHasStickers { + _: "documentAttributeHasStickers"; +} + +export interface documentAttributeCustomEmoji { + _: "documentAttributeCustomEmoji"; + free?: true; + text_color?: true; + alt: string; + stickerset: InputStickerSet; +} + +export interface messages_stickersNotModified { + _: "messages.stickersNotModified"; +} + +export interface messages_stickers { + _: "messages.stickers"; + hash: bigint; + stickers: Array; +} + +export interface stickerPack { + _: "stickerPack"; + emoticon: string; + documents: Array; +} + +export interface messages_allStickersNotModified { + _: "messages.allStickersNotModified"; +} + +export interface messages_allStickers { + _: "messages.allStickers"; + hash: bigint; + sets: Array; +} + +export interface messages_affectedMessages { + _: "messages.affectedMessages"; + pts: number; + pts_count: number; +} + +export interface webPageEmpty { + _: "webPageEmpty"; + id: bigint; + url?: string; +} + +export interface webPagePending { + _: "webPagePending"; + id: bigint; + url?: string; + date: number; +} + +export interface webPage { + _: "webPage"; + has_large_media?: true; + id: bigint; + url: string; + display_url: string; + hash: number; + type?: string; + site_name?: string; + title?: string; + description?: string; + photo?: Photo; + embed_url?: string; + embed_type?: string; + embed_width?: number; + embed_height?: number; + duration?: number; + author?: string; + document?: Document; + cached_page?: Page; + attributes?: Array; +} + +export interface webPageNotModified { + _: "webPageNotModified"; + cached_page_views?: number; +} + +export interface authorization { + _: "authorization"; + current?: true; + official_app?: true; + password_pending?: true; + encrypted_requests_disabled?: true; + call_requests_disabled?: true; + unconfirmed?: true; + hash: bigint; + device_model: string; + platform: string; + system_version: string; + api_id: number; + app_name: string; + app_version: string; + date_created: number; + date_active: number; + ip: string; + country: string; + region: string; +} + +export interface account_authorizations { + _: "account.authorizations"; + authorization_ttl_days: number; + authorizations: Array; +} + +export interface account_password { + _: "account.password"; + has_recovery?: true; + has_secure_values?: true; + has_password?: true; + current_algo?: PasswordKdfAlgo; + srp_B?: Uint8Array; + srp_id?: bigint; + hint?: string; + email_unconfirmed_pattern?: string; + new_algo: PasswordKdfAlgo; + new_secure_algo: SecurePasswordKdfAlgo; + secure_random: Uint8Array; + pending_reset_date?: number; + login_email_pattern?: string; +} + +export interface account_passwordSettings { + _: "account.passwordSettings"; + email?: string; + secure_settings?: SecureSecretSettings; +} + +export interface account_passwordInputSettings { + _: "account.passwordInputSettings"; + new_algo?: PasswordKdfAlgo; + new_password_hash?: Uint8Array; + hint?: string; + email?: string; + new_secure_settings?: SecureSecretSettings; +} + +export interface auth_passwordRecovery { + _: "auth.passwordRecovery"; + email_pattern: string; +} + +export interface receivedNotifyMessage { + _: "receivedNotifyMessage"; + id: number; + flags: number; +} + +export interface chatInviteExported { + _: "chatInviteExported"; + revoked?: true; + permanent?: true; + request_needed?: true; + link: string; + admin_id: bigint; + date: number; + start_date?: number; + expire_date?: number; + usage_limit?: number; + usage?: number; + requested?: number; + title?: string; +} + +export interface chatInvitePublicJoinRequests { + _: "chatInvitePublicJoinRequests"; +} + +export interface chatInviteAlready { + _: "chatInviteAlready"; + chat: Chat; +} + +export interface chatInvite { + _: "chatInvite"; + channel?: true; + broadcast?: true; + public?: true; + megagroup?: true; + request_needed?: true; + verified?: true; + scam?: true; + fake?: true; + title: string; + about?: string; + photo: Photo; + participants_count: number; + participants?: Array; + color: number; +} + +export interface chatInvitePeek { + _: "chatInvitePeek"; + chat: Chat; + expires: number; +} + +export interface inputStickerSetEmpty { + _: "inputStickerSetEmpty"; +} + +export interface inputStickerSetID { + _: "inputStickerSetID"; + id: bigint; + access_hash: bigint; +} + +export interface inputStickerSetShortName { + _: "inputStickerSetShortName"; + short_name: string; +} + +export interface inputStickerSetAnimatedEmoji { + _: "inputStickerSetAnimatedEmoji"; +} + +export interface inputStickerSetDice { + _: "inputStickerSetDice"; + emoticon: string; +} + +export interface inputStickerSetAnimatedEmojiAnimations { + _: "inputStickerSetAnimatedEmojiAnimations"; +} + +export interface inputStickerSetPremiumGifts { + _: "inputStickerSetPremiumGifts"; +} + +export interface inputStickerSetEmojiGenericAnimations { + _: "inputStickerSetEmojiGenericAnimations"; +} + +export interface inputStickerSetEmojiDefaultStatuses { + _: "inputStickerSetEmojiDefaultStatuses"; +} + +export interface inputStickerSetEmojiDefaultTopicIcons { + _: "inputStickerSetEmojiDefaultTopicIcons"; +} + +export interface inputStickerSetEmojiChannelDefaultStatuses { + _: "inputStickerSetEmojiChannelDefaultStatuses"; +} + +export interface stickerSet { + _: "stickerSet"; + archived?: true; + official?: true; + masks?: true; + emojis?: true; + text_color?: true; + channel_emoji_status?: true; + creator?: true; + installed_date?: number; + id: bigint; + access_hash: bigint; + title: string; + short_name: string; + thumbs?: Array; + thumb_dc_id?: number; + thumb_version?: number; + thumb_document_id?: bigint; + count: number; + hash: number; +} + +export interface messages_stickerSet { + _: "messages.stickerSet"; + set: StickerSet; + packs: Array; + keywords: Array; + documents: Array; +} + +export interface messages_stickerSetNotModified { + _: "messages.stickerSetNotModified"; +} + +export interface botCommand { + _: "botCommand"; + command: string; + description: string; +} + +export interface botInfo { + _: "botInfo"; + user_id?: bigint; + description?: string; + description_photo?: Photo; + description_document?: Document; + commands?: Array; + menu_button?: BotMenuButton; +} + +export interface keyboardButton { + _: "keyboardButton"; + text: string; +} + +export interface keyboardButtonUrl { + _: "keyboardButtonUrl"; + text: string; + url: string; +} + +export interface keyboardButtonCallback { + _: "keyboardButtonCallback"; + requires_password?: true; + text: string; + data: Uint8Array; +} + +export interface keyboardButtonRequestPhone { + _: "keyboardButtonRequestPhone"; + text: string; +} + +export interface keyboardButtonRequestGeoLocation { + _: "keyboardButtonRequestGeoLocation"; + text: string; +} + +export interface keyboardButtonSwitchInline { + _: "keyboardButtonSwitchInline"; + same_peer?: true; + text: string; + query: string; + peer_types?: Array; +} + +export interface keyboardButtonGame { + _: "keyboardButtonGame"; + text: string; +} + +export interface keyboardButtonBuy { + _: "keyboardButtonBuy"; + text: string; +} + +export interface keyboardButtonUrlAuth { + _: "keyboardButtonUrlAuth"; + text: string; + fwd_text?: string; + url: string; + button_id: number; +} + +export interface inputKeyboardButtonUrlAuth { + _: "inputKeyboardButtonUrlAuth"; + request_write_access?: true; + text: string; + fwd_text?: string; + url: string; + bot: InputUser; +} + +export interface keyboardButtonRequestPoll { + _: "keyboardButtonRequestPoll"; + quiz?: boolean; + text: string; +} + +export interface inputKeyboardButtonUserProfile { + _: "inputKeyboardButtonUserProfile"; + text: string; + user_id: InputUser; +} + +export interface keyboardButtonUserProfile { + _: "keyboardButtonUserProfile"; + text: string; + user_id: bigint; +} + +export interface keyboardButtonWebView { + _: "keyboardButtonWebView"; + text: string; + url: string; +} + +export interface keyboardButtonSimpleWebView { + _: "keyboardButtonSimpleWebView"; + text: string; + url: string; +} + +export interface keyboardButtonRequestPeer { + _: "keyboardButtonRequestPeer"; + text: string; + button_id: number; + peer_type: RequestPeerType; + max_quantity: number; +} + +export interface inputKeyboardButtonRequestPeer { + _: "inputKeyboardButtonRequestPeer"; + name_requested?: true; + username_requested?: true; + photo_requested?: true; + text: string; + button_id: number; + peer_type: RequestPeerType; + max_quantity: number; +} + +export interface keyboardButtonRow { + _: "keyboardButtonRow"; + buttons: Array; +} + +export interface replyKeyboardHide { + _: "replyKeyboardHide"; + selective?: true; +} + +export interface replyKeyboardForceReply { + _: "replyKeyboardForceReply"; + single_use?: true; + selective?: true; + placeholder?: string; +} + +export interface replyKeyboardMarkup { + _: "replyKeyboardMarkup"; + resize?: true; + single_use?: true; + selective?: true; + persistent?: true; + rows: Array; + placeholder?: string; +} + +export interface replyInlineMarkup { + _: "replyInlineMarkup"; + rows: Array; +} + +export interface messageEntityUnknown { + _: "messageEntityUnknown"; + offset: number; + length: number; +} + +export interface messageEntityMention { + _: "messageEntityMention"; + offset: number; + length: number; +} + +export interface messageEntityHashtag { + _: "messageEntityHashtag"; + offset: number; + length: number; +} + +export interface messageEntityBotCommand { + _: "messageEntityBotCommand"; + offset: number; + length: number; +} + +export interface messageEntityUrl { + _: "messageEntityUrl"; + offset: number; + length: number; +} + +export interface messageEntityEmail { + _: "messageEntityEmail"; + offset: number; + length: number; +} + +export interface messageEntityBold { + _: "messageEntityBold"; + offset: number; + length: number; +} + +export interface messageEntityItalic { + _: "messageEntityItalic"; + offset: number; + length: number; +} + +export interface messageEntityCode { + _: "messageEntityCode"; + offset: number; + length: number; +} + +export interface messageEntityPre { + _: "messageEntityPre"; + offset: number; + length: number; + language: string; +} + +export interface messageEntityTextUrl { + _: "messageEntityTextUrl"; + offset: number; + length: number; + url: string; +} + +export interface messageEntityMentionName { + _: "messageEntityMentionName"; + offset: number; + length: number; + user_id: bigint; +} + +export interface inputMessageEntityMentionName { + _: "inputMessageEntityMentionName"; + offset: number; + length: number; + user_id: InputUser; +} + +export interface messageEntityPhone { + _: "messageEntityPhone"; + offset: number; + length: number; +} + +export interface messageEntityCashtag { + _: "messageEntityCashtag"; + offset: number; + length: number; +} + +export interface messageEntityUnderline { + _: "messageEntityUnderline"; + offset: number; + length: number; +} + +export interface messageEntityStrike { + _: "messageEntityStrike"; + offset: number; + length: number; +} + +export interface messageEntityBankCard { + _: "messageEntityBankCard"; + offset: number; + length: number; +} + +export interface messageEntitySpoiler { + _: "messageEntitySpoiler"; + offset: number; + length: number; +} + +export interface messageEntityCustomEmoji { + _: "messageEntityCustomEmoji"; + offset: number; + length: number; + document_id: bigint; +} + +export interface messageEntityBlockquote { + _: "messageEntityBlockquote"; + offset: number; + length: number; +} + +export interface inputChannelEmpty { + _: "inputChannelEmpty"; +} + +export interface inputChannel { + _: "inputChannel"; + channel_id: bigint; + access_hash: bigint; +} + +export interface inputChannelFromMessage { + _: "inputChannelFromMessage"; + peer: InputPeer; + msg_id: number; + channel_id: bigint; +} + +export interface contacts_resolvedPeer { + _: "contacts.resolvedPeer"; + peer: Peer; + chats: Array; + users: Array; +} + +export interface messageRange { + _: "messageRange"; + min_id: number; + max_id: number; +} + +export interface updates_channelDifferenceEmpty { + _: "updates.channelDifferenceEmpty"; + final?: true; + pts: number; + timeout?: number; +} + +export interface updates_channelDifferenceTooLong { + _: "updates.channelDifferenceTooLong"; + final?: true; + timeout?: number; + dialog: Dialog; + messages: Array; + chats: Array; + users: Array; +} + +export interface updates_channelDifference { + _: "updates.channelDifference"; + final?: true; + pts: number; + timeout?: number; + new_messages: Array; + other_updates: Array; + chats: Array; + users: Array; +} + +export interface channelMessagesFilterEmpty { + _: "channelMessagesFilterEmpty"; +} + +export interface channelMessagesFilter { + _: "channelMessagesFilter"; + exclude_new_messages?: true; + ranges: Array; +} + +export interface channelParticipant { + _: "channelParticipant"; + user_id: bigint; + date: number; +} + +export interface channelParticipantSelf { + _: "channelParticipantSelf"; + via_request?: true; + user_id: bigint; + inviter_id: bigint; + date: number; +} + +export interface channelParticipantCreator { + _: "channelParticipantCreator"; + user_id: bigint; + admin_rights: ChatAdminRights; + rank?: string; +} + +export interface channelParticipantAdmin { + _: "channelParticipantAdmin"; + can_edit?: true; + self?: true; + user_id: bigint; + inviter_id?: bigint; + promoted_by: bigint; + date: number; + admin_rights: ChatAdminRights; + rank?: string; +} + +export interface channelParticipantBanned { + _: "channelParticipantBanned"; + left?: true; + peer: Peer; + kicked_by: bigint; + date: number; + banned_rights: ChatBannedRights; +} + +export interface channelParticipantLeft { + _: "channelParticipantLeft"; + peer: Peer; +} + +export interface channelParticipantsRecent { + _: "channelParticipantsRecent"; +} + +export interface channelParticipantsAdmins { + _: "channelParticipantsAdmins"; +} + +export interface channelParticipantsKicked { + _: "channelParticipantsKicked"; + q: string; +} + +export interface channelParticipantsBots { + _: "channelParticipantsBots"; +} + +export interface channelParticipantsBanned { + _: "channelParticipantsBanned"; + q: string; +} + +export interface channelParticipantsSearch { + _: "channelParticipantsSearch"; + q: string; +} + +export interface channelParticipantsContacts { + _: "channelParticipantsContacts"; + q: string; +} + +export interface channelParticipantsMentions { + _: "channelParticipantsMentions"; + q?: string; + top_msg_id?: number; +} + +export interface channels_channelParticipants { + _: "channels.channelParticipants"; + count: number; + participants: Array; + chats: Array; + users: Array; +} + +export interface channels_channelParticipantsNotModified { + _: "channels.channelParticipantsNotModified"; +} + +export interface channels_channelParticipant { + _: "channels.channelParticipant"; + participant: ChannelParticipant; + chats: Array; + users: Array; +} + +export interface help_termsOfService { + _: "help.termsOfService"; + popup?: true; + id: DataJSON; + text: string; + entities: Array; + min_age_confirm?: number; +} + +export interface messages_savedGifsNotModified { + _: "messages.savedGifsNotModified"; +} + +export interface messages_savedGifs { + _: "messages.savedGifs"; + hash: bigint; + gifs: Array; +} + +export interface inputBotInlineMessageMediaAuto { + _: "inputBotInlineMessageMediaAuto"; + invert_media?: true; + message: string; + entities?: Array; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageText { + _: "inputBotInlineMessageText"; + no_webpage?: true; + invert_media?: true; + message: string; + entities?: Array; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageMediaGeo { + _: "inputBotInlineMessageMediaGeo"; + geo_point: InputGeoPoint; + heading?: number; + period?: number; + proximity_notification_radius?: number; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageMediaVenue { + _: "inputBotInlineMessageMediaVenue"; + geo_point: InputGeoPoint; + title: string; + address: string; + provider: string; + venue_id: string; + venue_type: string; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageMediaContact { + _: "inputBotInlineMessageMediaContact"; + phone_number: string; + first_name: string; + last_name: string; + vcard: string; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageGame { + _: "inputBotInlineMessageGame"; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageMediaInvoice { + _: "inputBotInlineMessageMediaInvoice"; + title: string; + description: string; + photo?: InputWebDocument; + invoice: Invoice; + payload: Uint8Array; + provider: string; + provider_data: DataJSON; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineMessageMediaWebPage { + _: "inputBotInlineMessageMediaWebPage"; + invert_media?: true; + force_large_media?: true; + force_small_media?: true; + optional?: true; + message: string; + entities?: Array; + url: string; + reply_markup?: ReplyMarkup; +} + +export interface inputBotInlineResult { + _: "inputBotInlineResult"; + id: string; + type: string; + title?: string; + description?: string; + url?: string; + thumb?: InputWebDocument; + content?: InputWebDocument; + send_message: InputBotInlineMessage; +} + +export interface inputBotInlineResultPhoto { + _: "inputBotInlineResultPhoto"; + id: string; + type: string; + photo: InputPhoto; + send_message: InputBotInlineMessage; +} + +export interface inputBotInlineResultDocument { + _: "inputBotInlineResultDocument"; + id: string; + type: string; + title?: string; + description?: string; + document: InputDocument; + send_message: InputBotInlineMessage; +} + +export interface inputBotInlineResultGame { + _: "inputBotInlineResultGame"; + id: string; + short_name: string; + send_message: InputBotInlineMessage; +} + +export interface botInlineMessageMediaAuto { + _: "botInlineMessageMediaAuto"; + invert_media?: true; + message: string; + entities?: Array; + reply_markup?: ReplyMarkup; +} + +export interface botInlineMessageText { + _: "botInlineMessageText"; + no_webpage?: true; + invert_media?: true; + message: string; + entities?: Array; + reply_markup?: ReplyMarkup; +} + +export interface botInlineMessageMediaGeo { + _: "botInlineMessageMediaGeo"; + geo: GeoPoint; + heading?: number; + period?: number; + proximity_notification_radius?: number; + reply_markup?: ReplyMarkup; +} + +export interface botInlineMessageMediaVenue { + _: "botInlineMessageMediaVenue"; + geo: GeoPoint; + title: string; + address: string; + provider: string; + venue_id: string; + venue_type: string; + reply_markup?: ReplyMarkup; +} + +export interface botInlineMessageMediaContact { + _: "botInlineMessageMediaContact"; + phone_number: string; + first_name: string; + last_name: string; + vcard: string; + reply_markup?: ReplyMarkup; +} + +export interface botInlineMessageMediaInvoice { + _: "botInlineMessageMediaInvoice"; + shipping_address_requested?: true; + test?: true; + title: string; + description: string; + photo?: WebDocument; + currency: string; + total_amount: bigint; + reply_markup?: ReplyMarkup; +} + +export interface botInlineMessageMediaWebPage { + _: "botInlineMessageMediaWebPage"; + invert_media?: true; + force_large_media?: true; + force_small_media?: true; + manual?: true; + safe?: true; + message: string; + entities?: Array; + url: string; + reply_markup?: ReplyMarkup; +} + +export interface botInlineResult { + _: "botInlineResult"; + id: string; + type: string; + title?: string; + description?: string; + url?: string; + thumb?: WebDocument; + content?: WebDocument; + send_message: BotInlineMessage; +} + +export interface botInlineMediaResult { + _: "botInlineMediaResult"; + id: string; + type: string; + photo?: Photo; + document?: Document; + title?: string; + description?: string; + send_message: BotInlineMessage; +} + +export interface messages_botResults { + _: "messages.botResults"; + gallery?: true; + query_id: bigint; + next_offset?: string; + switch_pm?: InlineBotSwitchPM; + switch_webview?: InlineBotWebView; + results: Array; + cache_time: number; + users: Array; +} + +export interface exportedMessageLink { + _: "exportedMessageLink"; + link: string; + html: string; +} + +export interface messageFwdHeader { + _: "messageFwdHeader"; + imported?: true; + saved_out?: true; + from_id?: Peer; + from_name?: string; + date: number; + channel_post?: number; + post_author?: string; + saved_from_peer?: Peer; + saved_from_msg_id?: number; + saved_from_id?: Peer; + saved_from_name?: string; + saved_date?: number; + psa_type?: string; +} + +export interface auth_codeTypeSms { + _: "auth.codeTypeSms"; +} + +export interface auth_codeTypeCall { + _: "auth.codeTypeCall"; +} + +export interface auth_codeTypeFlashCall { + _: "auth.codeTypeFlashCall"; +} + +export interface auth_codeTypeMissedCall { + _: "auth.codeTypeMissedCall"; +} + +export interface auth_codeTypeFragmentSms { + _: "auth.codeTypeFragmentSms"; +} + +export interface auth_sentCodeTypeApp { + _: "auth.sentCodeTypeApp"; + length: number; +} + +export interface auth_sentCodeTypeSms { + _: "auth.sentCodeTypeSms"; + length: number; +} + +export interface auth_sentCodeTypeCall { + _: "auth.sentCodeTypeCall"; + length: number; +} + +export interface auth_sentCodeTypeFlashCall { + _: "auth.sentCodeTypeFlashCall"; + pattern: string; +} + +export interface auth_sentCodeTypeMissedCall { + _: "auth.sentCodeTypeMissedCall"; + prefix: string; + length: number; +} + +export interface auth_sentCodeTypeEmailCode { + _: "auth.sentCodeTypeEmailCode"; + apple_signin_allowed?: true; + google_signin_allowed?: true; + email_pattern: string; + length: number; + reset_available_period?: number; + reset_pending_date?: number; +} + +export interface auth_sentCodeTypeSetUpEmailRequired { + _: "auth.sentCodeTypeSetUpEmailRequired"; + apple_signin_allowed?: true; + google_signin_allowed?: true; +} + +export interface auth_sentCodeTypeFragmentSms { + _: "auth.sentCodeTypeFragmentSms"; + url: string; + length: number; +} + +export interface auth_sentCodeTypeFirebaseSms { + _: "auth.sentCodeTypeFirebaseSms"; + nonce?: Uint8Array; + receipt?: string; + push_timeout?: number; + length: number; +} + +export interface messages_botCallbackAnswer { + _: "messages.botCallbackAnswer"; + alert?: true; + has_url?: true; + native_ui?: true; + message?: string; + url?: string; + cache_time: number; +} + +export interface messages_messageEditData { + _: "messages.messageEditData"; + caption?: true; +} + +export interface inputBotInlineMessageID { + _: "inputBotInlineMessageID"; + dc_id: number; + id: bigint; + access_hash: bigint; +} + +export interface inputBotInlineMessageID64 { + _: "inputBotInlineMessageID64"; + dc_id: number; + owner_id: bigint; + id: number; + access_hash: bigint; +} + +export interface inlineBotSwitchPM { + _: "inlineBotSwitchPM"; + text: string; + start_param: string; +} + +export interface messages_peerDialogs { + _: "messages.peerDialogs"; + dialogs: Array; + messages: Array; + chats: Array; + users: Array; + state: updates_State; +} + +export interface topPeer { + _: "topPeer"; + peer: Peer; + rating: number; +} + +export interface topPeerCategoryBotsPM { + _: "topPeerCategoryBotsPM"; +} + +export interface topPeerCategoryBotsInline { + _: "topPeerCategoryBotsInline"; +} + +export interface topPeerCategoryCorrespondents { + _: "topPeerCategoryCorrespondents"; +} + +export interface topPeerCategoryGroups { + _: "topPeerCategoryGroups"; +} + +export interface topPeerCategoryChannels { + _: "topPeerCategoryChannels"; +} + +export interface topPeerCategoryPhoneCalls { + _: "topPeerCategoryPhoneCalls"; +} + +export interface topPeerCategoryForwardUsers { + _: "topPeerCategoryForwardUsers"; +} + +export interface topPeerCategoryForwardChats { + _: "topPeerCategoryForwardChats"; +} + +export interface topPeerCategoryPeers { + _: "topPeerCategoryPeers"; + category: TopPeerCategory; + count: number; + peers: Array; +} + +export interface contacts_topPeersNotModified { + _: "contacts.topPeersNotModified"; +} + +export interface contacts_topPeers { + _: "contacts.topPeers"; + categories: Array; + chats: Array; + users: Array; +} + +export interface contacts_topPeersDisabled { + _: "contacts.topPeersDisabled"; +} + +export interface draftMessageEmpty { + _: "draftMessageEmpty"; + date?: number; +} + +export interface draftMessage { + _: "draftMessage"; + no_webpage?: true; + invert_media?: true; + reply_to?: InputReplyTo; + message: string; + entities?: Array; + media?: InputMedia; + date: number; +} + +export interface messages_featuredStickersNotModified { + _: "messages.featuredStickersNotModified"; + count: number; +} + +export interface messages_featuredStickers { + _: "messages.featuredStickers"; + premium?: true; + hash: bigint; + count: number; + sets: Array; + unread: Array; +} + +export interface messages_recentStickersNotModified { + _: "messages.recentStickersNotModified"; +} + +export interface messages_recentStickers { + _: "messages.recentStickers"; + hash: bigint; + packs: Array; + stickers: Array; + dates: Array; +} + +export interface messages_archivedStickers { + _: "messages.archivedStickers"; + count: number; + sets: Array; +} + +export interface messages_stickerSetInstallResultSuccess { + _: "messages.stickerSetInstallResultSuccess"; +} + +export interface messages_stickerSetInstallResultArchive { + _: "messages.stickerSetInstallResultArchive"; + sets: Array; +} + +export interface stickerSetCovered { + _: "stickerSetCovered"; + set: StickerSet; + cover: Document; +} + +export interface stickerSetMultiCovered { + _: "stickerSetMultiCovered"; + set: StickerSet; + covers: Array; +} + +export interface stickerSetFullCovered { + _: "stickerSetFullCovered"; + set: StickerSet; + packs: Array; + keywords: Array; + documents: Array; +} + +export interface stickerSetNoCovered { + _: "stickerSetNoCovered"; + set: StickerSet; +} + +export interface maskCoords { + _: "maskCoords"; + n: number; + x: number; + y: number; + zoom: number; +} + +export interface inputStickeredMediaPhoto { + _: "inputStickeredMediaPhoto"; + id: InputPhoto; +} + +export interface inputStickeredMediaDocument { + _: "inputStickeredMediaDocument"; + id: InputDocument; +} + +export interface game { + _: "game"; + id: bigint; + access_hash: bigint; + short_name: string; + title: string; + description: string; + photo: Photo; + document?: Document; +} + +export interface inputGameID { + _: "inputGameID"; + id: bigint; + access_hash: bigint; +} + +export interface inputGameShortName { + _: "inputGameShortName"; + bot_id: InputUser; + short_name: string; +} + +export interface highScore { + _: "highScore"; + pos: number; + user_id: bigint; + score: number; +} + +export interface messages_highScores { + _: "messages.highScores"; + scores: Array; + users: Array; +} + +export interface textEmpty { + _: "textEmpty"; +} + +export interface textPlain { + _: "textPlain"; + text: string; +} + +export interface textBold { + _: "textBold"; + text: RichText; +} + +export interface textItalic { + _: "textItalic"; + text: RichText; +} + +export interface textUnderline { + _: "textUnderline"; + text: RichText; +} + +export interface textStrike { + _: "textStrike"; + text: RichText; +} + +export interface textFixed { + _: "textFixed"; + text: RichText; +} + +export interface textUrl { + _: "textUrl"; + text: RichText; + url: string; + webpage_id: bigint; +} + +export interface textEmail { + _: "textEmail"; + text: RichText; + email: string; +} + +export interface textConcat { + _: "textConcat"; + texts: Array; +} + +export interface textSubscript { + _: "textSubscript"; + text: RichText; +} + +export interface textSuperscript { + _: "textSuperscript"; + text: RichText; +} + +export interface textMarked { + _: "textMarked"; + text: RichText; +} + +export interface textPhone { + _: "textPhone"; + text: RichText; + phone: string; +} + +export interface textImage { + _: "textImage"; + document_id: bigint; + w: number; + h: number; +} + +export interface textAnchor { + _: "textAnchor"; + text: RichText; + name: string; +} + +export interface pageBlockUnsupported { + _: "pageBlockUnsupported"; +} + +export interface pageBlockTitle { + _: "pageBlockTitle"; + text: RichText; +} + +export interface pageBlockSubtitle { + _: "pageBlockSubtitle"; + text: RichText; +} + +export interface pageBlockAuthorDate { + _: "pageBlockAuthorDate"; + author: RichText; + published_date: number; +} + +export interface pageBlockHeader { + _: "pageBlockHeader"; + text: RichText; +} + +export interface pageBlockSubheader { + _: "pageBlockSubheader"; + text: RichText; +} + +export interface pageBlockParagraph { + _: "pageBlockParagraph"; + text: RichText; +} + +export interface pageBlockPreformatted { + _: "pageBlockPreformatted"; + text: RichText; + language: string; +} + +export interface pageBlockFooter { + _: "pageBlockFooter"; + text: RichText; +} + +export interface pageBlockDivider { + _: "pageBlockDivider"; +} + +export interface pageBlockAnchor { + _: "pageBlockAnchor"; + name: string; +} + +export interface pageBlockList { + _: "pageBlockList"; + items: Array; +} + +export interface pageBlockBlockquote { + _: "pageBlockBlockquote"; + text: RichText; + caption: RichText; +} + +export interface pageBlockPullquote { + _: "pageBlockPullquote"; + text: RichText; + caption: RichText; +} + +export interface pageBlockPhoto { + _: "pageBlockPhoto"; + photo_id: bigint; + caption: PageCaption; + url?: string; + webpage_id?: bigint; +} + +export interface pageBlockVideo { + _: "pageBlockVideo"; + autoplay?: true; + loop?: true; + video_id: bigint; + caption: PageCaption; +} + +export interface pageBlockCover { + _: "pageBlockCover"; + cover: PageBlock; +} + +export interface pageBlockEmbed { + _: "pageBlockEmbed"; + full_width?: true; + allow_scrolling?: true; + url?: string; + html?: string; + poster_photo_id?: bigint; + w?: number; + h?: number; + caption: PageCaption; +} + +export interface pageBlockEmbedPost { + _: "pageBlockEmbedPost"; + url: string; + webpage_id: bigint; + author_photo_id: bigint; + author: string; + date: number; + blocks: Array; + caption: PageCaption; +} + +export interface pageBlockCollage { + _: "pageBlockCollage"; + items: Array; + caption: PageCaption; +} + +export interface pageBlockSlideshow { + _: "pageBlockSlideshow"; + items: Array; + caption: PageCaption; +} + +export interface pageBlockChannel { + _: "pageBlockChannel"; + channel: Chat; +} + +export interface pageBlockAudio { + _: "pageBlockAudio"; + audio_id: bigint; + caption: PageCaption; +} + +export interface pageBlockKicker { + _: "pageBlockKicker"; + text: RichText; +} + +export interface pageBlockTable { + _: "pageBlockTable"; + bordered?: true; + striped?: true; + title: RichText; + rows: Array; +} + +export interface pageBlockOrderedList { + _: "pageBlockOrderedList"; + items: Array; +} + +export interface pageBlockDetails { + _: "pageBlockDetails"; + open?: true; + blocks: Array; + title: RichText; +} + +export interface pageBlockRelatedArticles { + _: "pageBlockRelatedArticles"; + title: RichText; + articles: Array; +} + +export interface pageBlockMap { + _: "pageBlockMap"; + geo: GeoPoint; + zoom: number; + w: number; + h: number; + caption: PageCaption; +} + +export interface phoneCallDiscardReasonMissed { + _: "phoneCallDiscardReasonMissed"; +} + +export interface phoneCallDiscardReasonDisconnect { + _: "phoneCallDiscardReasonDisconnect"; +} + +export interface phoneCallDiscardReasonHangup { + _: "phoneCallDiscardReasonHangup"; +} + +export interface phoneCallDiscardReasonBusy { + _: "phoneCallDiscardReasonBusy"; +} + +export interface dataJSON { + _: "dataJSON"; + data: string; +} + +export interface labeledPrice { + _: "labeledPrice"; + label: string; + amount: bigint; +} + +export interface invoice { + _: "invoice"; + test?: true; + name_requested?: true; + phone_requested?: true; + email_requested?: true; + shipping_address_requested?: true; + flexible?: true; + phone_to_provider?: true; + email_to_provider?: true; + recurring?: true; + currency: string; + prices: Array; + max_tip_amount?: bigint; + suggested_tip_amounts?: Array; + terms_url?: string; +} + +export interface paymentCharge { + _: "paymentCharge"; + id: string; + provider_charge_id: string; +} + +export interface postAddress { + _: "postAddress"; + street_line1: string; + street_line2: string; + city: string; + state: string; + country_iso2: string; + post_code: string; +} + +export interface paymentRequestedInfo { + _: "paymentRequestedInfo"; + name?: string; + phone?: string; + email?: string; + shipping_address?: PostAddress; +} + +export interface paymentSavedCredentialsCard { + _: "paymentSavedCredentialsCard"; + id: string; + title: string; +} + +export interface webDocument { + _: "webDocument"; + url: string; + access_hash: bigint; + size: number; + mime_type: string; + attributes: Array; +} + +export interface webDocumentNoProxy { + _: "webDocumentNoProxy"; + url: string; + size: number; + mime_type: string; + attributes: Array; +} + +export interface inputWebDocument { + _: "inputWebDocument"; + url: string; + size: number; + mime_type: string; + attributes: Array; +} + +export interface inputWebFileLocation { + _: "inputWebFileLocation"; + url: string; + access_hash: bigint; +} + +export interface inputWebFileGeoPointLocation { + _: "inputWebFileGeoPointLocation"; + geo_point: InputGeoPoint; + access_hash: bigint; + w: number; + h: number; + zoom: number; + scale: number; +} + +export interface inputWebFileAudioAlbumThumbLocation { + _: "inputWebFileAudioAlbumThumbLocation"; + small?: true; + document?: InputDocument; + title?: string; + performer?: string; +} + +export interface upload_webFile { + _: "upload.webFile"; + size: number; + mime_type: string; + file_type: storage_FileType; + mtime: number; + bytes: Uint8Array; +} + +export interface payments_paymentForm { + _: "payments.paymentForm"; + can_save_credentials?: true; + password_missing?: true; + form_id: bigint; + bot_id: bigint; + title: string; + description: string; + photo?: WebDocument; + invoice: Invoice; + provider_id: bigint; + url: string; + native_provider?: string; + native_params?: DataJSON; + additional_methods?: Array; + saved_info?: PaymentRequestedInfo; + saved_credentials?: Array; + users: Array; +} + +export interface payments_validatedRequestedInfo { + _: "payments.validatedRequestedInfo"; + id?: string; + shipping_options?: Array; +} + +export interface payments_paymentResult { + _: "payments.paymentResult"; + updates: Updates; +} + +export interface payments_paymentVerificationNeeded { + _: "payments.paymentVerificationNeeded"; + url: string; +} + +export interface payments_paymentReceipt { + _: "payments.paymentReceipt"; + date: number; + bot_id: bigint; + provider_id: bigint; + title: string; + description: string; + photo?: WebDocument; + invoice: Invoice; + info?: PaymentRequestedInfo; + shipping?: ShippingOption; + tip_amount?: bigint; + currency: string; + total_amount: bigint; + credentials_title: string; + users: Array; +} + +export interface payments_savedInfo { + _: "payments.savedInfo"; + has_saved_credentials?: true; + saved_info?: PaymentRequestedInfo; +} + +export interface inputPaymentCredentialsSaved { + _: "inputPaymentCredentialsSaved"; + id: string; + tmp_password: Uint8Array; +} + +export interface inputPaymentCredentials { + _: "inputPaymentCredentials"; + save?: true; + data: DataJSON; +} + +export interface inputPaymentCredentialsApplePay { + _: "inputPaymentCredentialsApplePay"; + payment_data: DataJSON; +} + +export interface inputPaymentCredentialsGooglePay { + _: "inputPaymentCredentialsGooglePay"; + payment_token: DataJSON; +} + +export interface account_tmpPassword { + _: "account.tmpPassword"; + tmp_password: Uint8Array; + valid_until: number; +} + +export interface shippingOption { + _: "shippingOption"; + id: string; + title: string; + prices: Array; +} + +export interface inputStickerSetItem { + _: "inputStickerSetItem"; + document: InputDocument; + emoji: string; + mask_coords?: MaskCoords; + keywords?: string; +} + +export interface inputPhoneCall { + _: "inputPhoneCall"; + id: bigint; + access_hash: bigint; +} + +export interface phoneCallEmpty { + _: "phoneCallEmpty"; + id: bigint; +} + +export interface phoneCallWaiting { + _: "phoneCallWaiting"; + video?: true; + id: bigint; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; + protocol: PhoneCallProtocol; + receive_date?: number; +} + +export interface phoneCallRequested { + _: "phoneCallRequested"; + video?: true; + id: bigint; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; + g_a_hash: Uint8Array; + protocol: PhoneCallProtocol; +} + +export interface phoneCallAccepted { + _: "phoneCallAccepted"; + video?: true; + id: bigint; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; + g_b: Uint8Array; + protocol: PhoneCallProtocol; +} + +export interface phoneCall { + _: "phoneCall"; + p2p_allowed?: true; + video?: true; + id: bigint; + access_hash: bigint; + date: number; + admin_id: bigint; + participant_id: bigint; + g_a_or_b: Uint8Array; + key_fingerprint: bigint; + protocol: PhoneCallProtocol; + connections: Array; + start_date: number; + custom_parameters?: DataJSON; +} + +export interface phoneCallDiscarded { + _: "phoneCallDiscarded"; + need_rating?: true; + need_debug?: true; + video?: true; + id: bigint; + reason?: PhoneCallDiscardReason; + duration?: number; +} + +export interface phoneConnection { + _: "phoneConnection"; + tcp?: true; + id: bigint; + ip: string; + ipv6: string; + port: number; + peer_tag: Uint8Array; +} + +export interface phoneConnectionWebrtc { + _: "phoneConnectionWebrtc"; + turn?: true; + stun?: true; + id: bigint; + ip: string; + ipv6: string; + port: number; + username: string; + password: string; +} + +export interface phoneCallProtocol { + _: "phoneCallProtocol"; + udp_p2p?: true; + udp_reflector?: true; + min_layer: number; + max_layer: number; + library_versions: Array; +} + +export interface phone_phoneCall { + _: "phone.phoneCall"; + phone_call: PhoneCall; + users: Array; +} + +export interface upload_cdnFileReuploadNeeded { + _: "upload.cdnFileReuploadNeeded"; + request_token: Uint8Array; +} + +export interface upload_cdnFile { + _: "upload.cdnFile"; + bytes: Uint8Array; +} + +export interface cdnPublicKey { + _: "cdnPublicKey"; + dc_id: number; + public_key: string; +} + +export interface cdnConfig { + _: "cdnConfig"; + public_keys: Array; +} + +export interface langPackString { + _: "langPackString"; + key: string; + value: string; +} + +export interface langPackStringPluralized { + _: "langPackStringPluralized"; + key: string; + zero_value?: string; + one_value?: string; + two_value?: string; + few_value?: string; + many_value?: string; + other_value: string; +} + +export interface langPackStringDeleted { + _: "langPackStringDeleted"; + key: string; +} + +export interface langPackDifference { + _: "langPackDifference"; + lang_code: string; + from_version: number; + version: number; + strings: Array; +} + +export interface langPackLanguage { + _: "langPackLanguage"; + official?: true; + rtl?: true; + beta?: true; + name: string; + native_name: string; + lang_code: string; + base_lang_code?: string; + plural_code: string; + strings_count: number; + translated_count: number; + translations_url: string; +} + +export interface channelAdminLogEventActionChangeTitle { + _: "channelAdminLogEventActionChangeTitle"; + prev_value: string; + new_value: string; +} + +export interface channelAdminLogEventActionChangeAbout { + _: "channelAdminLogEventActionChangeAbout"; + prev_value: string; + new_value: string; +} + +export interface channelAdminLogEventActionChangeUsername { + _: "channelAdminLogEventActionChangeUsername"; + prev_value: string; + new_value: string; +} + +export interface channelAdminLogEventActionChangePhoto { + _: "channelAdminLogEventActionChangePhoto"; + prev_photo: Photo; + new_photo: Photo; +} + +export interface channelAdminLogEventActionToggleInvites { + _: "channelAdminLogEventActionToggleInvites"; + new_value: boolean; +} + +export interface channelAdminLogEventActionToggleSignatures { + _: "channelAdminLogEventActionToggleSignatures"; + new_value: boolean; +} + +export interface channelAdminLogEventActionUpdatePinned { + _: "channelAdminLogEventActionUpdatePinned"; + message: Message; +} + +export interface channelAdminLogEventActionEditMessage { + _: "channelAdminLogEventActionEditMessage"; + prev_message: Message; + new_message: Message; +} + +export interface channelAdminLogEventActionDeleteMessage { + _: "channelAdminLogEventActionDeleteMessage"; + message: Message; +} + +export interface channelAdminLogEventActionParticipantJoin { + _: "channelAdminLogEventActionParticipantJoin"; +} + +export interface channelAdminLogEventActionParticipantLeave { + _: "channelAdminLogEventActionParticipantLeave"; +} + +export interface channelAdminLogEventActionParticipantInvite { + _: "channelAdminLogEventActionParticipantInvite"; + participant: ChannelParticipant; +} + +export interface channelAdminLogEventActionParticipantToggleBan { + _: "channelAdminLogEventActionParticipantToggleBan"; + prev_participant: ChannelParticipant; + new_participant: ChannelParticipant; +} + +export interface channelAdminLogEventActionParticipantToggleAdmin { + _: "channelAdminLogEventActionParticipantToggleAdmin"; + prev_participant: ChannelParticipant; + new_participant: ChannelParticipant; +} + +export interface channelAdminLogEventActionChangeStickerSet { + _: "channelAdminLogEventActionChangeStickerSet"; + prev_stickerset: InputStickerSet; + new_stickerset: InputStickerSet; +} + +export interface channelAdminLogEventActionTogglePreHistoryHidden { + _: "channelAdminLogEventActionTogglePreHistoryHidden"; + new_value: boolean; +} + +export interface channelAdminLogEventActionDefaultBannedRights { + _: "channelAdminLogEventActionDefaultBannedRights"; + prev_banned_rights: ChatBannedRights; + new_banned_rights: ChatBannedRights; +} + +export interface channelAdminLogEventActionStopPoll { + _: "channelAdminLogEventActionStopPoll"; + message: Message; +} + +export interface channelAdminLogEventActionChangeLinkedChat { + _: "channelAdminLogEventActionChangeLinkedChat"; + prev_value: bigint; + new_value: bigint; +} + +export interface channelAdminLogEventActionChangeLocation { + _: "channelAdminLogEventActionChangeLocation"; + prev_value: ChannelLocation; + new_value: ChannelLocation; +} + +export interface channelAdminLogEventActionToggleSlowMode { + _: "channelAdminLogEventActionToggleSlowMode"; + prev_value: number; + new_value: number; +} + +export interface channelAdminLogEventActionStartGroupCall { + _: "channelAdminLogEventActionStartGroupCall"; + call: InputGroupCall; +} + +export interface channelAdminLogEventActionDiscardGroupCall { + _: "channelAdminLogEventActionDiscardGroupCall"; + call: InputGroupCall; +} + +export interface channelAdminLogEventActionParticipantMute { + _: "channelAdminLogEventActionParticipantMute"; + participant: GroupCallParticipant; +} + +export interface channelAdminLogEventActionParticipantUnmute { + _: "channelAdminLogEventActionParticipantUnmute"; + participant: GroupCallParticipant; +} + +export interface channelAdminLogEventActionToggleGroupCallSetting { + _: "channelAdminLogEventActionToggleGroupCallSetting"; + join_muted: boolean; +} + +export interface channelAdminLogEventActionParticipantJoinByInvite { + _: "channelAdminLogEventActionParticipantJoinByInvite"; + via_chatlist?: true; + invite: ExportedChatInvite; +} + +export interface channelAdminLogEventActionExportedInviteDelete { + _: "channelAdminLogEventActionExportedInviteDelete"; + invite: ExportedChatInvite; +} + +export interface channelAdminLogEventActionExportedInviteRevoke { + _: "channelAdminLogEventActionExportedInviteRevoke"; + invite: ExportedChatInvite; +} + +export interface channelAdminLogEventActionExportedInviteEdit { + _: "channelAdminLogEventActionExportedInviteEdit"; + prev_invite: ExportedChatInvite; + new_invite: ExportedChatInvite; +} + +export interface channelAdminLogEventActionParticipantVolume { + _: "channelAdminLogEventActionParticipantVolume"; + participant: GroupCallParticipant; +} + +export interface channelAdminLogEventActionChangeHistoryTTL { + _: "channelAdminLogEventActionChangeHistoryTTL"; + prev_value: number; + new_value: number; +} + +export interface channelAdminLogEventActionParticipantJoinByRequest { + _: "channelAdminLogEventActionParticipantJoinByRequest"; + invite: ExportedChatInvite; + approved_by: bigint; +} + +export interface channelAdminLogEventActionToggleNoForwards { + _: "channelAdminLogEventActionToggleNoForwards"; + new_value: boolean; +} + +export interface channelAdminLogEventActionSendMessage { + _: "channelAdminLogEventActionSendMessage"; + message: Message; +} + +export interface channelAdminLogEventActionChangeAvailableReactions { + _: "channelAdminLogEventActionChangeAvailableReactions"; + prev_value: ChatReactions; + new_value: ChatReactions; +} + +export interface channelAdminLogEventActionChangeUsernames { + _: "channelAdminLogEventActionChangeUsernames"; + prev_value: Array; + new_value: Array; +} + +export interface channelAdminLogEventActionToggleForum { + _: "channelAdminLogEventActionToggleForum"; + new_value: boolean; +} + +export interface channelAdminLogEventActionCreateTopic { + _: "channelAdminLogEventActionCreateTopic"; + topic: ForumTopic; +} + +export interface channelAdminLogEventActionEditTopic { + _: "channelAdminLogEventActionEditTopic"; + prev_topic: ForumTopic; + new_topic: ForumTopic; +} + +export interface channelAdminLogEventActionDeleteTopic { + _: "channelAdminLogEventActionDeleteTopic"; + topic: ForumTopic; +} + +export interface channelAdminLogEventActionPinTopic { + _: "channelAdminLogEventActionPinTopic"; + prev_topic?: ForumTopic; + new_topic?: ForumTopic; +} + +export interface channelAdminLogEventActionToggleAntiSpam { + _: "channelAdminLogEventActionToggleAntiSpam"; + new_value: boolean; +} + +export interface channelAdminLogEventActionChangePeerColor { + _: "channelAdminLogEventActionChangePeerColor"; + prev_value: PeerColor; + new_value: PeerColor; +} + +export interface channelAdminLogEventActionChangeProfilePeerColor { + _: "channelAdminLogEventActionChangeProfilePeerColor"; + prev_value: PeerColor; + new_value: PeerColor; +} + +export interface channelAdminLogEventActionChangeWallpaper { + _: "channelAdminLogEventActionChangeWallpaper"; + prev_value: WallPaper; + new_value: WallPaper; +} + +export interface channelAdminLogEventActionChangeEmojiStatus { + _: "channelAdminLogEventActionChangeEmojiStatus"; + prev_value: EmojiStatus; + new_value: EmojiStatus; +} + +export interface channelAdminLogEventActionChangeEmojiStickerSet { + _: "channelAdminLogEventActionChangeEmojiStickerSet"; + prev_stickerset: InputStickerSet; + new_stickerset: InputStickerSet; +} + +export interface channelAdminLogEvent { + _: "channelAdminLogEvent"; + id: bigint; + date: number; + user_id: bigint; + action: ChannelAdminLogEventAction; +} + +export interface channels_adminLogResults { + _: "channels.adminLogResults"; + events: Array; + chats: Array; + users: Array; +} + +export interface channelAdminLogEventsFilter { + _: "channelAdminLogEventsFilter"; + join?: true; + leave?: true; + invite?: true; + ban?: true; + unban?: true; + kick?: true; + unkick?: true; + promote?: true; + demote?: true; + info?: true; + settings?: true; + pinned?: true; + edit?: true; + delete?: true; + group_call?: true; + invites?: true; + send?: true; + forums?: true; +} + +export interface popularContact { + _: "popularContact"; + client_id: bigint; + importers: number; +} + +export interface messages_favedStickersNotModified { + _: "messages.favedStickersNotModified"; +} + +export interface messages_favedStickers { + _: "messages.favedStickers"; + hash: bigint; + packs: Array; + stickers: Array; +} + +export interface recentMeUrlUnknown { + _: "recentMeUrlUnknown"; + url: string; +} + +export interface recentMeUrlUser { + _: "recentMeUrlUser"; + url: string; + user_id: bigint; +} + +export interface recentMeUrlChat { + _: "recentMeUrlChat"; + url: string; + chat_id: bigint; +} + +export interface recentMeUrlChatInvite { + _: "recentMeUrlChatInvite"; + url: string; + chat_invite: ChatInvite; +} + +export interface recentMeUrlStickerSet { + _: "recentMeUrlStickerSet"; + url: string; + set: StickerSetCovered; +} + +export interface help_recentMeUrls { + _: "help.recentMeUrls"; + urls: Array; + chats: Array; + users: Array; +} + +export interface inputSingleMedia { + _: "inputSingleMedia"; + media: InputMedia; + random_id: bigint; + message: string; + entities?: Array; +} + +export interface webAuthorization { + _: "webAuthorization"; + hash: bigint; + bot_id: bigint; + domain: string; + browser: string; + platform: string; + date_created: number; + date_active: number; + ip: string; + region: string; +} + +export interface account_webAuthorizations { + _: "account.webAuthorizations"; + authorizations: Array; + users: Array; +} + +export interface inputMessageID { + _: "inputMessageID"; + id: number; +} + +export interface inputMessageReplyTo { + _: "inputMessageReplyTo"; + id: number; +} + +export interface inputMessagePinned { + _: "inputMessagePinned"; +} + +export interface inputMessageCallbackQuery { + _: "inputMessageCallbackQuery"; + id: number; + query_id: bigint; +} + +export interface inputDialogPeer { + _: "inputDialogPeer"; + peer: InputPeer; +} + +export interface inputDialogPeerFolder { + _: "inputDialogPeerFolder"; + folder_id: number; +} + +export interface dialogPeer { + _: "dialogPeer"; + peer: Peer; +} + +export interface dialogPeerFolder { + _: "dialogPeerFolder"; + folder_id: number; +} + +export interface messages_foundStickerSetsNotModified { + _: "messages.foundStickerSetsNotModified"; +} + +export interface messages_foundStickerSets { + _: "messages.foundStickerSets"; + hash: bigint; + sets: Array; +} + +export interface fileHash { + _: "fileHash"; + offset: bigint; + limit: number; + hash: Uint8Array; +} + +export interface inputClientProxy { + _: "inputClientProxy"; + address: string; + port: number; +} + +export interface help_termsOfServiceUpdateEmpty { + _: "help.termsOfServiceUpdateEmpty"; + expires: number; +} + +export interface help_termsOfServiceUpdate { + _: "help.termsOfServiceUpdate"; + expires: number; + terms_of_service: help_TermsOfService; +} + +export interface inputSecureFileUploaded { + _: "inputSecureFileUploaded"; + id: bigint; + parts: number; + md5_checksum: string; + file_hash: Uint8Array; + secret: Uint8Array; +} + +export interface inputSecureFile { + _: "inputSecureFile"; + id: bigint; + access_hash: bigint; +} + +export interface secureFileEmpty { + _: "secureFileEmpty"; +} + +export interface secureFile { + _: "secureFile"; + id: bigint; + access_hash: bigint; + size: bigint; + dc_id: number; + date: number; + file_hash: Uint8Array; + secret: Uint8Array; +} + +export interface secureData { + _: "secureData"; + data: Uint8Array; + data_hash: Uint8Array; + secret: Uint8Array; +} + +export interface securePlainPhone { + _: "securePlainPhone"; + phone: string; +} + +export interface securePlainEmail { + _: "securePlainEmail"; + email: string; +} + +export interface secureValueTypePersonalDetails { + _: "secureValueTypePersonalDetails"; +} + +export interface secureValueTypePassport { + _: "secureValueTypePassport"; +} + +export interface secureValueTypeDriverLicense { + _: "secureValueTypeDriverLicense"; +} + +export interface secureValueTypeIdentityCard { + _: "secureValueTypeIdentityCard"; +} + +export interface secureValueTypeInternalPassport { + _: "secureValueTypeInternalPassport"; +} + +export interface secureValueTypeAddress { + _: "secureValueTypeAddress"; +} + +export interface secureValueTypeUtilityBill { + _: "secureValueTypeUtilityBill"; +} + +export interface secureValueTypeBankStatement { + _: "secureValueTypeBankStatement"; +} + +export interface secureValueTypeRentalAgreement { + _: "secureValueTypeRentalAgreement"; +} + +export interface secureValueTypePassportRegistration { + _: "secureValueTypePassportRegistration"; +} + +export interface secureValueTypeTemporaryRegistration { + _: "secureValueTypeTemporaryRegistration"; +} + +export interface secureValueTypePhone { + _: "secureValueTypePhone"; +} + +export interface secureValueTypeEmail { + _: "secureValueTypeEmail"; +} + +export interface secureValue { + _: "secureValue"; + type: SecureValueType; + data?: SecureData; + front_side?: SecureFile; + reverse_side?: SecureFile; + selfie?: SecureFile; + translation?: Array; + files?: Array; + plain_data?: SecurePlainData; + hash: Uint8Array; +} + +export interface inputSecureValue { + _: "inputSecureValue"; + type: SecureValueType; + data?: SecureData; + front_side?: InputSecureFile; + reverse_side?: InputSecureFile; + selfie?: InputSecureFile; + translation?: Array; + files?: Array; + plain_data?: SecurePlainData; +} + +export interface secureValueHash { + _: "secureValueHash"; + type: SecureValueType; + hash: Uint8Array; +} + +export interface secureValueErrorData { + _: "secureValueErrorData"; + type: SecureValueType; + data_hash: Uint8Array; + field: string; + text: string; +} + +export interface secureValueErrorFrontSide { + _: "secureValueErrorFrontSide"; + type: SecureValueType; + file_hash: Uint8Array; + text: string; +} + +export interface secureValueErrorReverseSide { + _: "secureValueErrorReverseSide"; + type: SecureValueType; + file_hash: Uint8Array; + text: string; +} + +export interface secureValueErrorSelfie { + _: "secureValueErrorSelfie"; + type: SecureValueType; + file_hash: Uint8Array; + text: string; +} + +export interface secureValueErrorFile { + _: "secureValueErrorFile"; + type: SecureValueType; + file_hash: Uint8Array; + text: string; +} + +export interface secureValueErrorFiles { + _: "secureValueErrorFiles"; + type: SecureValueType; + file_hash: Array; + text: string; +} + +export interface secureValueError { + _: "secureValueError"; + type: SecureValueType; + hash: Uint8Array; + text: string; +} + +export interface secureValueErrorTranslationFile { + _: "secureValueErrorTranslationFile"; + type: SecureValueType; + file_hash: Uint8Array; + text: string; +} + +export interface secureValueErrorTranslationFiles { + _: "secureValueErrorTranslationFiles"; + type: SecureValueType; + file_hash: Array; + text: string; +} + +export interface secureCredentialsEncrypted { + _: "secureCredentialsEncrypted"; + data: Uint8Array; + hash: Uint8Array; + secret: Uint8Array; +} + +export interface account_authorizationForm { + _: "account.authorizationForm"; + required_types: Array; + values: Array; + errors: Array; + users: Array; + privacy_policy_url?: string; +} + +export interface account_sentEmailCode { + _: "account.sentEmailCode"; + email_pattern: string; + length: number; +} + +export interface help_deepLinkInfoEmpty { + _: "help.deepLinkInfoEmpty"; +} + +export interface help_deepLinkInfo { + _: "help.deepLinkInfo"; + update_app?: true; + message: string; + entities?: Array; +} + +export interface savedPhoneContact { + _: "savedPhoneContact"; + phone: string; + first_name: string; + last_name: string; + date: number; +} + +export interface account_takeout { + _: "account.takeout"; + id: bigint; +} + +export interface passwordKdfAlgoUnknown { + _: "passwordKdfAlgoUnknown"; +} + +export interface passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow { + _: "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow"; + salt1: Uint8Array; + salt2: Uint8Array; + g: number; + p: Uint8Array; +} + +export interface securePasswordKdfAlgoUnknown { + _: "securePasswordKdfAlgoUnknown"; +} + +export interface securePasswordKdfAlgoPBKDF2HMACSHA512iter100000 { + _: "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000"; + salt: Uint8Array; +} + +export interface securePasswordKdfAlgoSHA512 { + _: "securePasswordKdfAlgoSHA512"; + salt: Uint8Array; +} + +export interface secureSecretSettings { + _: "secureSecretSettings"; + secure_algo: SecurePasswordKdfAlgo; + secure_secret: Uint8Array; + secure_secret_id: bigint; +} + +export interface inputCheckPasswordEmpty { + _: "inputCheckPasswordEmpty"; +} + +export interface inputCheckPasswordSRP { + _: "inputCheckPasswordSRP"; + srp_id: bigint; + A: Uint8Array; + M1: Uint8Array; +} + +export interface secureRequiredType { + _: "secureRequiredType"; + native_names?: true; + selfie_required?: true; + translation_required?: true; + type: SecureValueType; +} + +export interface secureRequiredTypeOneOf { + _: "secureRequiredTypeOneOf"; + types: Array; +} + +export interface help_passportConfigNotModified { + _: "help.passportConfigNotModified"; +} + +export interface help_passportConfig { + _: "help.passportConfig"; + hash: number; + countries_langs: DataJSON; +} + +export interface inputAppEvent { + _: "inputAppEvent"; + time: number; + type: string; + peer: bigint; + data: JSONValue; +} + +export interface jsonObjectValue { + _: "jsonObjectValue"; + key: string; + value: JSONValue; +} + +export interface jsonNull { + _: "jsonNull"; +} + +export interface jsonBool { + _: "jsonBool"; + value: boolean; +} + +export interface jsonNumber { + _: "jsonNumber"; + value: number; +} + +export interface jsonString { + _: "jsonString"; + value: string; +} + +export interface jsonArray { + _: "jsonArray"; + value: Array; +} + +export interface jsonObject { + _: "jsonObject"; + value: Array; +} + +export interface pageTableCell { + _: "pageTableCell"; + header?: true; + align_center?: true; + align_right?: true; + valign_middle?: true; + valign_bottom?: true; + text?: RichText; + colspan?: number; + rowspan?: number; +} + +export interface pageTableRow { + _: "pageTableRow"; + cells: Array; +} + +export interface pageCaption { + _: "pageCaption"; + text: RichText; + credit: RichText; +} + +export interface pageListItemText { + _: "pageListItemText"; + text: RichText; +} + +export interface pageListItemBlocks { + _: "pageListItemBlocks"; + blocks: Array; +} + +export interface pageListOrderedItemText { + _: "pageListOrderedItemText"; + num: string; + text: RichText; +} + +export interface pageListOrderedItemBlocks { + _: "pageListOrderedItemBlocks"; + num: string; + blocks: Array; +} + +export interface pageRelatedArticle { + _: "pageRelatedArticle"; + url: string; + webpage_id: bigint; + title?: string; + description?: string; + photo_id?: bigint; + author?: string; + published_date?: number; +} + +export interface page { + _: "page"; + part?: true; + rtl?: true; + v2?: true; + url: string; + blocks: Array; + photos: Array; + documents: Array; + views?: number; +} + +export interface help_supportName { + _: "help.supportName"; + name: string; +} + +export interface help_userInfoEmpty { + _: "help.userInfoEmpty"; +} + +export interface help_userInfo { + _: "help.userInfo"; + message: string; + entities: Array; + author: string; + date: number; +} + +export interface pollAnswer { + _: "pollAnswer"; + text: string; + option: Uint8Array; +} + +export interface poll { + _: "poll"; + id: bigint; + closed?: true; + public_voters?: true; + multiple_choice?: true; + quiz?: true; + question: string; + answers: Array; + close_period?: number; + close_date?: number; +} + +export interface pollAnswerVoters { + _: "pollAnswerVoters"; + chosen?: true; + correct?: true; + option: Uint8Array; + voters: number; +} + +export interface pollResults { + _: "pollResults"; + min?: true; + results?: Array; + total_voters?: number; + recent_voters?: Array; + solution?: string; + solution_entities?: Array; +} + +export interface chatOnlines { + _: "chatOnlines"; + onlines: number; +} + +export interface statsURL { + _: "statsURL"; + url: string; +} + +export interface chatAdminRights { + _: "chatAdminRights"; + change_info?: true; + post_messages?: true; + edit_messages?: true; + delete_messages?: true; + ban_users?: true; + invite_users?: true; + pin_messages?: true; + add_admins?: true; + anonymous?: true; + manage_call?: true; + other?: true; + manage_topics?: true; + post_stories?: true; + edit_stories?: true; + delete_stories?: true; +} + +export interface chatBannedRights { + _: "chatBannedRights"; + view_messages?: true; + send_messages?: true; + send_media?: true; + send_stickers?: true; + send_gifs?: true; + send_games?: true; + send_inline?: true; + embed_links?: true; + send_polls?: true; + change_info?: true; + invite_users?: true; + pin_messages?: true; + manage_topics?: true; + send_photos?: true; + send_videos?: true; + send_roundvideos?: true; + send_audios?: true; + send_voices?: true; + send_docs?: true; + send_plain?: true; + until_date: number; +} + +export interface inputWallPaper { + _: "inputWallPaper"; + id: bigint; + access_hash: bigint; +} + +export interface inputWallPaperSlug { + _: "inputWallPaperSlug"; + slug: string; +} + +export interface inputWallPaperNoFile { + _: "inputWallPaperNoFile"; + id: bigint; +} + +export interface account_wallPapersNotModified { + _: "account.wallPapersNotModified"; +} + +export interface account_wallPapers { + _: "account.wallPapers"; + hash: bigint; + wallpapers: Array; +} + +export interface codeSettings { + _: "codeSettings"; + allow_flashcall?: true; + current_number?: true; + allow_app_hash?: true; + allow_missed_call?: true; + allow_firebase?: true; + logout_tokens?: Array; + token?: string; + app_sandbox?: boolean; +} + +export interface wallPaperSettings { + _: "wallPaperSettings"; + blur?: true; + motion?: true; + background_color?: number; + second_background_color?: number; + third_background_color?: number; + fourth_background_color?: number; + intensity?: number; + rotation?: number; + emoticon?: string; +} + +export interface autoDownloadSettings { + _: "autoDownloadSettings"; + disabled?: true; + video_preload_large?: true; + audio_preload_next?: true; + phonecalls_less_data?: true; + stories_preload?: true; + photo_size_max: number; + video_size_max: bigint; + file_size_max: bigint; + video_upload_maxbitrate: number; + small_queue_active_operations_max: number; + large_queue_active_operations_max: number; +} + +export interface account_autoDownloadSettings { + _: "account.autoDownloadSettings"; + low: AutoDownloadSettings; + medium: AutoDownloadSettings; + high: AutoDownloadSettings; +} + +export interface emojiKeyword { + _: "emojiKeyword"; + keyword: string; + emoticons: Array; +} + +export interface emojiKeywordDeleted { + _: "emojiKeywordDeleted"; + keyword: string; + emoticons: Array; +} + +export interface emojiKeywordsDifference { + _: "emojiKeywordsDifference"; + lang_code: string; + from_version: number; + version: number; + keywords: Array; +} + +export interface emojiURL { + _: "emojiURL"; + url: string; +} + +export interface emojiLanguage { + _: "emojiLanguage"; + lang_code: string; +} + +export interface folder { + _: "folder"; + autofill_new_broadcasts?: true; + autofill_public_groups?: true; + autofill_new_correspondents?: true; + id: number; + title: string; + photo?: ChatPhoto; +} + +export interface inputFolderPeer { + _: "inputFolderPeer"; + peer: InputPeer; + folder_id: number; +} + +export interface folderPeer { + _: "folderPeer"; + peer: Peer; + folder_id: number; +} + +export interface messages_searchCounter { + _: "messages.searchCounter"; + inexact?: true; + filter: MessagesFilter; + count: number; +} + +export interface urlAuthResultRequest { + _: "urlAuthResultRequest"; + request_write_access?: true; + bot: User; + domain: string; +} + +export interface urlAuthResultAccepted { + _: "urlAuthResultAccepted"; + url: string; +} + +export interface urlAuthResultDefault { + _: "urlAuthResultDefault"; +} + +export interface channelLocationEmpty { + _: "channelLocationEmpty"; +} + +export interface channelLocation { + _: "channelLocation"; + geo_point: GeoPoint; + address: string; +} + +export interface peerLocated { + _: "peerLocated"; + peer: Peer; + expires: number; + distance: number; +} + +export interface peerSelfLocated { + _: "peerSelfLocated"; + expires: number; +} + +export interface restrictionReason { + _: "restrictionReason"; + platform: string; + reason: string; + text: string; +} + +export interface inputTheme { + _: "inputTheme"; + id: bigint; + access_hash: bigint; +} + +export interface inputThemeSlug { + _: "inputThemeSlug"; + slug: string; +} + +export interface theme { + _: "theme"; + creator?: true; + default?: true; + for_chat?: true; + id: bigint; + access_hash: bigint; + slug: string; + title: string; + document?: Document; + settings?: Array; + emoticon?: string; + installs_count?: number; +} + +export interface account_themesNotModified { + _: "account.themesNotModified"; +} + +export interface account_themes { + _: "account.themes"; + hash: bigint; + themes: Array; +} + +export interface auth_loginToken { + _: "auth.loginToken"; + expires: number; + token: Uint8Array; +} + +export interface auth_loginTokenMigrateTo { + _: "auth.loginTokenMigrateTo"; + dc_id: number; + token: Uint8Array; +} + +export interface auth_loginTokenSuccess { + _: "auth.loginTokenSuccess"; + authorization: auth_Authorization; +} + +export interface account_contentSettings { + _: "account.contentSettings"; + sensitive_enabled?: true; + sensitive_can_change?: true; +} + +export interface messages_inactiveChats { + _: "messages.inactiveChats"; + dates: Array; + chats: Array; + users: Array; +} + +export interface baseThemeClassic { + _: "baseThemeClassic"; +} + +export interface baseThemeDay { + _: "baseThemeDay"; +} + +export interface baseThemeNight { + _: "baseThemeNight"; +} + +export interface baseThemeTinted { + _: "baseThemeTinted"; +} + +export interface baseThemeArctic { + _: "baseThemeArctic"; +} + +export interface inputThemeSettings { + _: "inputThemeSettings"; + message_colors_animated?: true; + base_theme: BaseTheme; + accent_color: number; + outbox_accent_color?: number; + message_colors?: Array; + wallpaper?: InputWallPaper; + wallpaper_settings?: WallPaperSettings; +} + +export interface themeSettings { + _: "themeSettings"; + message_colors_animated?: true; + base_theme: BaseTheme; + accent_color: number; + outbox_accent_color?: number; + message_colors?: Array; + wallpaper?: WallPaper; +} + +export interface webPageAttributeTheme { + _: "webPageAttributeTheme"; + documents?: Array; + settings?: ThemeSettings; +} + +export interface webPageAttributeStory { + _: "webPageAttributeStory"; + peer: Peer; + id: number; + story?: StoryItem; +} + +export interface messages_votesList { + _: "messages.votesList"; + count: number; + votes: Array; + chats: Array; + users: Array; + next_offset?: string; +} + +export interface bankCardOpenUrl { + _: "bankCardOpenUrl"; + url: string; + name: string; +} + +export interface payments_bankCardData { + _: "payments.bankCardData"; + title: string; + open_urls: Array; +} + +export interface dialogFilter { + _: "dialogFilter"; + contacts?: true; + non_contacts?: true; + groups?: true; + broadcasts?: true; + bots?: true; + exclude_muted?: true; + exclude_read?: true; + exclude_archived?: true; + id: number; + title: string; + emoticon?: string; + color?: number; + pinned_peers: Array; + include_peers: Array; + exclude_peers: Array; +} + +export interface dialogFilterDefault { + _: "dialogFilterDefault"; +} + +export interface dialogFilterChatlist { + _: "dialogFilterChatlist"; + has_my_invites?: true; + id: number; + title: string; + emoticon?: string; + color?: number; + pinned_peers: Array; + include_peers: Array; +} + +export interface dialogFilterSuggested { + _: "dialogFilterSuggested"; + filter: DialogFilter; + description: string; +} + +export interface statsDateRangeDays { + _: "statsDateRangeDays"; + min_date: number; + max_date: number; +} + +export interface statsAbsValueAndPrev { + _: "statsAbsValueAndPrev"; + current: number; + previous: number; +} + +export interface statsPercentValue { + _: "statsPercentValue"; + part: number; + total: number; +} + +export interface statsGraphAsync { + _: "statsGraphAsync"; + token: string; +} + +export interface statsGraphError { + _: "statsGraphError"; + error: string; +} + +export interface statsGraph { + _: "statsGraph"; + json: DataJSON; + zoom_token?: string; +} + +export interface stats_broadcastStats { + _: "stats.broadcastStats"; + period: StatsDateRangeDays; + followers: StatsAbsValueAndPrev; + views_per_post: StatsAbsValueAndPrev; + shares_per_post: StatsAbsValueAndPrev; + reactions_per_post: StatsAbsValueAndPrev; + views_per_story: StatsAbsValueAndPrev; + shares_per_story: StatsAbsValueAndPrev; + reactions_per_story: StatsAbsValueAndPrev; + enabled_notifications: StatsPercentValue; + growth_graph: StatsGraph; + followers_graph: StatsGraph; + mute_graph: StatsGraph; + top_hours_graph: StatsGraph; + interactions_graph: StatsGraph; + iv_interactions_graph: StatsGraph; + views_by_source_graph: StatsGraph; + new_followers_by_source_graph: StatsGraph; + languages_graph: StatsGraph; + reactions_by_emotion_graph: StatsGraph; + story_interactions_graph: StatsGraph; + story_reactions_by_emotion_graph: StatsGraph; + recent_posts_interactions: Array; +} + +export interface help_promoDataEmpty { + _: "help.promoDataEmpty"; + expires: number; +} + +export interface help_promoData { + _: "help.promoData"; + proxy?: true; + expires: number; + peer: Peer; + chats: Array; + users: Array; + psa_type?: string; + psa_message?: string; +} + +export interface videoSize { + _: "videoSize"; + type: string; + w: number; + h: number; + size: number; + video_start_ts?: number; +} + +export interface videoSizeEmojiMarkup { + _: "videoSizeEmojiMarkup"; + emoji_id: bigint; + background_colors: Array; +} + +export interface videoSizeStickerMarkup { + _: "videoSizeStickerMarkup"; + stickerset: InputStickerSet; + sticker_id: bigint; + background_colors: Array; +} + +export interface statsGroupTopPoster { + _: "statsGroupTopPoster"; + user_id: bigint; + messages: number; + avg_chars: number; +} + +export interface statsGroupTopAdmin { + _: "statsGroupTopAdmin"; + user_id: bigint; + deleted: number; + kicked: number; + banned: number; +} + +export interface statsGroupTopInviter { + _: "statsGroupTopInviter"; + user_id: bigint; + invitations: number; +} + +export interface stats_megagroupStats { + _: "stats.megagroupStats"; + period: StatsDateRangeDays; + members: StatsAbsValueAndPrev; + messages: StatsAbsValueAndPrev; + viewers: StatsAbsValueAndPrev; + posters: StatsAbsValueAndPrev; + growth_graph: StatsGraph; + members_graph: StatsGraph; + new_members_by_source_graph: StatsGraph; + languages_graph: StatsGraph; + messages_graph: StatsGraph; + actions_graph: StatsGraph; + top_hours_graph: StatsGraph; + weekdays_graph: StatsGraph; + top_posters: Array; + top_admins: Array; + top_inviters: Array; + users: Array; +} + +export interface globalPrivacySettings { + _: "globalPrivacySettings"; + archive_and_mute_new_noncontact_peers?: true; + keep_archived_unmuted?: true; + keep_archived_folders?: true; + hide_read_marks?: true; + new_noncontact_peers_require_premium?: true; +} + +export interface help_countryCode { + _: "help.countryCode"; + country_code: string; + prefixes?: Array; + patterns?: Array; +} + +export interface help_country { + _: "help.country"; + hidden?: true; + iso2: string; + default_name: string; + name?: string; + country_codes: Array; +} + +export interface help_countriesListNotModified { + _: "help.countriesListNotModified"; +} + +export interface help_countriesList { + _: "help.countriesList"; + countries: Array; + hash: number; +} + +export interface messageViews { + _: "messageViews"; + views?: number; + forwards?: number; + replies?: MessageReplies; +} + +export interface messages_messageViews { + _: "messages.messageViews"; + views: Array; + chats: Array; + users: Array; +} + +export interface messages_discussionMessage { + _: "messages.discussionMessage"; + messages: Array; + max_id?: number; + read_inbox_max_id?: number; + read_outbox_max_id?: number; + unread_count: number; + chats: Array; + users: Array; +} + +export interface messageReplyHeader { + _: "messageReplyHeader"; + reply_to_scheduled?: true; + forum_topic?: true; + quote?: true; + reply_to_msg_id?: number; + reply_to_peer_id?: Peer; + reply_from?: MessageFwdHeader; + reply_media?: MessageMedia; + reply_to_top_id?: number; + quote_text?: string; + quote_entities?: Array; + quote_offset?: number; +} + +export interface messageReplyStoryHeader { + _: "messageReplyStoryHeader"; + peer: Peer; + story_id: number; +} + +export interface messageReplies { + _: "messageReplies"; + comments?: true; + replies: number; + replies_pts: number; + recent_repliers?: Array; + channel_id?: bigint; + max_id?: number; + read_max_id?: number; +} + +export interface peerBlocked { + _: "peerBlocked"; + peer_id: Peer; + date: number; +} + +export interface stats_messageStats { + _: "stats.messageStats"; + views_graph: StatsGraph; + reactions_by_emotion_graph: StatsGraph; +} + +export interface groupCallDiscarded { + _: "groupCallDiscarded"; + id: bigint; + access_hash: bigint; + duration: number; +} + +export interface groupCall { + _: "groupCall"; + join_muted?: true; + can_change_join_muted?: true; + join_date_asc?: true; + schedule_start_subscribed?: true; + can_start_video?: true; + record_video_active?: true; + rtmp_stream?: true; + listeners_hidden?: true; + id: bigint; + access_hash: bigint; + participants_count: number; + title?: string; + stream_dc_id?: number; + record_start_date?: number; + schedule_date?: number; + unmuted_video_count?: number; + unmuted_video_limit: number; + version: number; +} + +export interface inputGroupCall { + _: "inputGroupCall"; + id: bigint; + access_hash: bigint; +} + +export interface groupCallParticipant { + _: "groupCallParticipant"; + muted?: true; + left?: true; + can_self_unmute?: true; + just_joined?: true; + versioned?: true; + min?: true; + muted_by_you?: true; + volume_by_admin?: true; + self?: true; + video_joined?: true; + peer: Peer; + date: number; + active_date?: number; + source: number; + volume?: number; + about?: string; + raise_hand_rating?: bigint; + video?: GroupCallParticipantVideo; + presentation?: GroupCallParticipantVideo; +} + +export interface phone_groupCall { + _: "phone.groupCall"; + call: GroupCall; + participants: Array; + participants_next_offset: string; + chats: Array; + users: Array; +} + +export interface phone_groupParticipants { + _: "phone.groupParticipants"; + count: number; + participants: Array; + next_offset: string; + chats: Array; + users: Array; + version: number; +} + +export interface inlineQueryPeerTypeSameBotPM { + _: "inlineQueryPeerTypeSameBotPM"; +} + +export interface inlineQueryPeerTypePM { + _: "inlineQueryPeerTypePM"; +} + +export interface inlineQueryPeerTypeChat { + _: "inlineQueryPeerTypeChat"; +} + +export interface inlineQueryPeerTypeMegagroup { + _: "inlineQueryPeerTypeMegagroup"; +} + +export interface inlineQueryPeerTypeBroadcast { + _: "inlineQueryPeerTypeBroadcast"; +} + +export interface inlineQueryPeerTypeBotPM { + _: "inlineQueryPeerTypeBotPM"; +} + +export interface messages_historyImport { + _: "messages.historyImport"; + id: bigint; +} + +export interface messages_historyImportParsed { + _: "messages.historyImportParsed"; + pm?: true; + group?: true; + title?: string; +} + +export interface messages_affectedFoundMessages { + _: "messages.affectedFoundMessages"; + pts: number; + pts_count: number; + offset: number; + messages: Array; +} + +export interface chatInviteImporter { + _: "chatInviteImporter"; + requested?: true; + via_chatlist?: true; + user_id: bigint; + date: number; + about?: string; + approved_by?: bigint; +} + +export interface messages_exportedChatInvites { + _: "messages.exportedChatInvites"; + count: number; + invites: Array; + users: Array; +} + +export interface messages_exportedChatInvite { + _: "messages.exportedChatInvite"; + invite: ExportedChatInvite; + users: Array; +} + +export interface messages_exportedChatInviteReplaced { + _: "messages.exportedChatInviteReplaced"; + invite: ExportedChatInvite; + new_invite: ExportedChatInvite; + users: Array; +} + +export interface messages_chatInviteImporters { + _: "messages.chatInviteImporters"; + count: number; + importers: Array; + users: Array; +} + +export interface chatAdminWithInvites { + _: "chatAdminWithInvites"; + admin_id: bigint; + invites_count: number; + revoked_invites_count: number; +} + +export interface messages_chatAdminsWithInvites { + _: "messages.chatAdminsWithInvites"; + admins: Array; + users: Array; +} + +export interface messages_checkedHistoryImportPeer { + _: "messages.checkedHistoryImportPeer"; + confirm_text: string; +} + +export interface phone_joinAsPeers { + _: "phone.joinAsPeers"; + peers: Array; + chats: Array; + users: Array; +} + +export interface phone_exportedGroupCallInvite { + _: "phone.exportedGroupCallInvite"; + link: string; +} + +export interface groupCallParticipantVideoSourceGroup { + _: "groupCallParticipantVideoSourceGroup"; + semantics: string; + sources: Array; +} + +export interface groupCallParticipantVideo { + _: "groupCallParticipantVideo"; + paused?: true; + endpoint: string; + source_groups: Array; + audio_source?: number; +} + +export interface stickers_suggestedShortName { + _: "stickers.suggestedShortName"; + short_name: string; +} + +export interface botCommandScopeDefault { + _: "botCommandScopeDefault"; +} + +export interface botCommandScopeUsers { + _: "botCommandScopeUsers"; +} + +export interface botCommandScopeChats { + _: "botCommandScopeChats"; +} + +export interface botCommandScopeChatAdmins { + _: "botCommandScopeChatAdmins"; +} + +export interface botCommandScopePeer { + _: "botCommandScopePeer"; + peer: InputPeer; +} + +export interface botCommandScopePeerAdmins { + _: "botCommandScopePeerAdmins"; + peer: InputPeer; +} + +export interface botCommandScopePeerUser { + _: "botCommandScopePeerUser"; + peer: InputPeer; + user_id: InputUser; +} + +export interface account_resetPasswordFailedWait { + _: "account.resetPasswordFailedWait"; + retry_date: number; +} + +export interface account_resetPasswordRequestedWait { + _: "account.resetPasswordRequestedWait"; + until_date: number; +} + +export interface account_resetPasswordOk { + _: "account.resetPasswordOk"; +} + +export interface sponsoredMessage { + _: "sponsoredMessage"; + recommended?: true; + show_peer_photo?: true; + can_report?: true; + random_id: Uint8Array; + from_id?: Peer; + chat_invite?: ChatInvite; + chat_invite_hash?: string; + channel_post?: number; + start_param?: string; + webpage?: SponsoredWebPage; + app?: BotApp; + message: string; + entities?: Array; + button_text?: string; + sponsor_info?: string; + additional_info?: string; +} + +export interface messages_sponsoredMessages { + _: "messages.sponsoredMessages"; + posts_between?: number; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_sponsoredMessagesEmpty { + _: "messages.sponsoredMessagesEmpty"; +} + +export interface searchResultsCalendarPeriod { + _: "searchResultsCalendarPeriod"; + date: number; + min_msg_id: number; + max_msg_id: number; + count: number; +} + +export interface messages_searchResultsCalendar { + _: "messages.searchResultsCalendar"; + inexact?: true; + count: number; + min_date: number; + min_msg_id: number; + offset_id_offset?: number; + periods: Array; + messages: Array; + chats: Array; + users: Array; +} + +export interface searchResultPosition { + _: "searchResultPosition"; + msg_id: number; + date: number; + offset: number; +} + +export interface messages_searchResultsPositions { + _: "messages.searchResultsPositions"; + count: number; + positions: Array; +} + +export interface channels_sendAsPeers { + _: "channels.sendAsPeers"; + peers: Array; + chats: Array; + users: Array; +} + +export interface users_userFull { + _: "users.userFull"; + full_user: UserFull; + chats: Array; + users: Array; +} + +export interface messages_peerSettings { + _: "messages.peerSettings"; + settings: PeerSettings; + chats: Array; + users: Array; +} + +export interface auth_loggedOut { + _: "auth.loggedOut"; + future_auth_token?: Uint8Array; +} + +export interface reactionCount { + _: "reactionCount"; + chosen_order?: number; + reaction: Reaction; + count: number; +} + +export interface messageReactions { + _: "messageReactions"; + min?: true; + can_see_list?: true; + reactions_as_tags?: true; + results: Array; + recent_reactions?: Array; +} + +export interface messages_messageReactionsList { + _: "messages.messageReactionsList"; + count: number; + reactions: Array; + chats: Array; + users: Array; + next_offset?: string; +} + +export interface availableReaction { + _: "availableReaction"; + inactive?: true; + premium?: true; + reaction: string; + title: string; + static_icon: Document; + appear_animation: Document; + select_animation: Document; + activate_animation: Document; + effect_animation: Document; + around_animation?: Document; + center_icon?: Document; +} + +export interface messages_availableReactionsNotModified { + _: "messages.availableReactionsNotModified"; +} + +export interface messages_availableReactions { + _: "messages.availableReactions"; + hash: number; + reactions: Array; +} + +export interface messagePeerReaction { + _: "messagePeerReaction"; + big?: true; + unread?: true; + my?: true; + peer_id: Peer; + date: number; + reaction: Reaction; +} + +export interface groupCallStreamChannel { + _: "groupCallStreamChannel"; + channel: number; + scale: number; + last_timestamp_ms: bigint; +} + +export interface phone_groupCallStreamChannels { + _: "phone.groupCallStreamChannels"; + channels: Array; +} + +export interface phone_groupCallStreamRtmpUrl { + _: "phone.groupCallStreamRtmpUrl"; + url: string; + key: string; +} + +export interface attachMenuBotIconColor { + _: "attachMenuBotIconColor"; + name: string; + color: number; +} + +export interface attachMenuBotIcon { + _: "attachMenuBotIcon"; + name: string; + icon: Document; + colors?: Array; +} + +export interface attachMenuBot { + _: "attachMenuBot"; + inactive?: true; + has_settings?: true; + request_write_access?: true; + show_in_attach_menu?: true; + show_in_side_menu?: true; + side_menu_disclaimer_needed?: true; + bot_id: bigint; + short_name: string; + peer_types?: Array; + icons: Array; +} + +export interface attachMenuBotsNotModified { + _: "attachMenuBotsNotModified"; +} + +export interface attachMenuBots { + _: "attachMenuBots"; + hash: bigint; + bots: Array; + users: Array; +} + +export interface attachMenuBotsBot { + _: "attachMenuBotsBot"; + bot: AttachMenuBot; + users: Array; +} + +export interface webViewResultUrl { + _: "webViewResultUrl"; + query_id: bigint; + url: string; +} + +export interface simpleWebViewResultUrl { + _: "simpleWebViewResultUrl"; + url: string; +} + +export interface webViewMessageSent { + _: "webViewMessageSent"; + msg_id?: InputBotInlineMessageID; +} + +export interface botMenuButtonDefault { + _: "botMenuButtonDefault"; +} + +export interface botMenuButtonCommands { + _: "botMenuButtonCommands"; +} + +export interface botMenuButton { + _: "botMenuButton"; + text: string; + url: string; +} + +export interface account_savedRingtonesNotModified { + _: "account.savedRingtonesNotModified"; +} + +export interface account_savedRingtones { + _: "account.savedRingtones"; + hash: bigint; + ringtones: Array; +} + +export interface notificationSoundDefault { + _: "notificationSoundDefault"; +} + +export interface notificationSoundNone { + _: "notificationSoundNone"; +} + +export interface notificationSoundLocal { + _: "notificationSoundLocal"; + title: string; + data: string; +} + +export interface notificationSoundRingtone { + _: "notificationSoundRingtone"; + id: bigint; +} + +export interface account_savedRingtone { + _: "account.savedRingtone"; +} + +export interface account_savedRingtoneConverted { + _: "account.savedRingtoneConverted"; + document: Document; +} + +export interface attachMenuPeerTypeSameBotPM { + _: "attachMenuPeerTypeSameBotPM"; +} + +export interface attachMenuPeerTypeBotPM { + _: "attachMenuPeerTypeBotPM"; +} + +export interface attachMenuPeerTypePM { + _: "attachMenuPeerTypePM"; +} + +export interface attachMenuPeerTypeChat { + _: "attachMenuPeerTypeChat"; +} + +export interface attachMenuPeerTypeBroadcast { + _: "attachMenuPeerTypeBroadcast"; +} + +export interface inputInvoiceMessage { + _: "inputInvoiceMessage"; + peer: InputPeer; + msg_id: number; +} + +export interface inputInvoiceSlug { + _: "inputInvoiceSlug"; + slug: string; +} + +export interface inputInvoicePremiumGiftCode { + _: "inputInvoicePremiumGiftCode"; + purpose: InputStorePaymentPurpose; + option: PremiumGiftCodeOption; +} + +export interface payments_exportedInvoice { + _: "payments.exportedInvoice"; + url: string; +} + +export interface messages_transcribedAudio { + _: "messages.transcribedAudio"; + pending?: true; + transcription_id: bigint; + text: string; + trial_remains_num?: number; + trial_remains_until_date?: number; +} + +export interface help_premiumPromo { + _: "help.premiumPromo"; + status_text: string; + status_entities: Array; + video_sections: Array; + videos: Array; + period_options: Array; + users: Array; +} + +export interface inputStorePaymentPremiumSubscription { + _: "inputStorePaymentPremiumSubscription"; + restore?: true; + upgrade?: true; +} + +export interface inputStorePaymentGiftPremium { + _: "inputStorePaymentGiftPremium"; + user_id: InputUser; + currency: string; + amount: bigint; +} + +export interface inputStorePaymentPremiumGiftCode { + _: "inputStorePaymentPremiumGiftCode"; + users: Array; + boost_peer?: InputPeer; + currency: string; + amount: bigint; +} + +export interface inputStorePaymentPremiumGiveaway { + _: "inputStorePaymentPremiumGiveaway"; + only_new_subscribers?: true; + winners_are_visible?: true; + boost_peer: InputPeer; + additional_peers?: Array; + countries_iso2?: Array; + prize_description?: string; + random_id: bigint; + until_date: number; + currency: string; + amount: bigint; +} + +export interface premiumGiftOption { + _: "premiumGiftOption"; + months: number; + currency: string; + amount: bigint; + bot_url: string; + store_product?: string; +} + +export interface paymentFormMethod { + _: "paymentFormMethod"; + url: string; + title: string; +} + +export interface emojiStatusEmpty { + _: "emojiStatusEmpty"; +} + +export interface emojiStatus { + _: "emojiStatus"; + document_id: bigint; +} + +export interface emojiStatusUntil { + _: "emojiStatusUntil"; + document_id: bigint; + until: number; +} + +export interface account_emojiStatusesNotModified { + _: "account.emojiStatusesNotModified"; +} + +export interface account_emojiStatuses { + _: "account.emojiStatuses"; + hash: bigint; + statuses: Array; +} + +export interface reactionEmpty { + _: "reactionEmpty"; +} + +export interface reactionEmoji { + _: "reactionEmoji"; + emoticon: string; +} + +export interface reactionCustomEmoji { + _: "reactionCustomEmoji"; + document_id: bigint; +} + +export interface chatReactionsNone { + _: "chatReactionsNone"; +} + +export interface chatReactionsAll { + _: "chatReactionsAll"; + allow_custom?: true; +} + +export interface chatReactionsSome { + _: "chatReactionsSome"; + reactions: Array; +} + +export interface messages_reactionsNotModified { + _: "messages.reactionsNotModified"; +} + +export interface messages_reactions { + _: "messages.reactions"; + hash: bigint; + reactions: Array; +} + +export interface emailVerifyPurposeLoginSetup { + _: "emailVerifyPurposeLoginSetup"; + phone_number: string; + phone_code_hash: string; +} + +export interface emailVerifyPurposeLoginChange { + _: "emailVerifyPurposeLoginChange"; +} + +export interface emailVerifyPurposePassport { + _: "emailVerifyPurposePassport"; +} + +export interface emailVerificationCode { + _: "emailVerificationCode"; + code: string; +} + +export interface emailVerificationGoogle { + _: "emailVerificationGoogle"; + token: string; +} + +export interface emailVerificationApple { + _: "emailVerificationApple"; + token: string; +} + +export interface account_emailVerified { + _: "account.emailVerified"; + email: string; +} + +export interface account_emailVerifiedLogin { + _: "account.emailVerifiedLogin"; + email: string; + sent_code: auth_SentCode; +} + +export interface premiumSubscriptionOption { + _: "premiumSubscriptionOption"; + current?: true; + can_purchase_upgrade?: true; + transaction?: string; + months: number; + currency: string; + amount: bigint; + bot_url: string; + store_product?: string; +} + +export interface sendAsPeer { + _: "sendAsPeer"; + premium_required?: true; + peer: Peer; +} + +export interface messageExtendedMediaPreview { + _: "messageExtendedMediaPreview"; + w?: number; + h?: number; + thumb?: PhotoSize; + video_duration?: number; +} + +export interface messageExtendedMedia { + _: "messageExtendedMedia"; + media: MessageMedia; +} + +export interface stickerKeyword { + _: "stickerKeyword"; + document_id: bigint; + keyword: Array; +} + +export interface username { + _: "username"; + editable?: true; + active?: true; + username: string; +} + +export interface forumTopicDeleted { + _: "forumTopicDeleted"; + id: number; +} + +export interface forumTopic { + _: "forumTopic"; + my?: true; + closed?: true; + pinned?: true; + short?: true; + hidden?: true; + id: number; + date: number; + title: string; + icon_color: number; + icon_emoji_id?: bigint; + top_message: number; + read_inbox_max_id: number; + read_outbox_max_id: number; + unread_count: number; + unread_mentions_count: number; + unread_reactions_count: number; + from_id: Peer; + notify_settings: PeerNotifySettings; + draft?: DraftMessage; +} + +export interface messages_forumTopics { + _: "messages.forumTopics"; + order_by_create_date?: true; + count: number; + topics: Array; + messages: Array; + chats: Array; + users: Array; + pts: number; +} + +export interface defaultHistoryTTL { + _: "defaultHistoryTTL"; + period: number; +} + +export interface exportedContactToken { + _: "exportedContactToken"; + url: string; + expires: number; +} + +export interface requestPeerTypeUser { + _: "requestPeerTypeUser"; + bot?: boolean; + premium?: boolean; +} + +export interface requestPeerTypeChat { + _: "requestPeerTypeChat"; + creator?: true; + bot_participant?: true; + has_username?: boolean; + forum?: boolean; + user_admin_rights?: ChatAdminRights; + bot_admin_rights?: ChatAdminRights; +} + +export interface requestPeerTypeBroadcast { + _: "requestPeerTypeBroadcast"; + creator?: true; + has_username?: boolean; + user_admin_rights?: ChatAdminRights; + bot_admin_rights?: ChatAdminRights; +} + +export interface emojiListNotModified { + _: "emojiListNotModified"; +} + +export interface emojiList { + _: "emojiList"; + hash: bigint; + document_id: Array; +} + +export interface emojiGroup { + _: "emojiGroup"; + title: string; + icon_emoji_id: bigint; + emoticons: Array; +} + +export interface messages_emojiGroupsNotModified { + _: "messages.emojiGroupsNotModified"; +} + +export interface messages_emojiGroups { + _: "messages.emojiGroups"; + hash: number; + groups: Array; +} + +export interface textWithEntities { + _: "textWithEntities"; + text: string; + entities: Array; +} + +export interface messages_translateResult { + _: "messages.translateResult"; + result: Array; +} + +export interface autoSaveSettings { + _: "autoSaveSettings"; + photos?: true; + videos?: true; + video_max_size?: bigint; +} + +export interface autoSaveException { + _: "autoSaveException"; + peer: Peer; + settings: AutoSaveSettings; +} + +export interface account_autoSaveSettings { + _: "account.autoSaveSettings"; + users_settings: AutoSaveSettings; + chats_settings: AutoSaveSettings; + broadcasts_settings: AutoSaveSettings; + exceptions: Array; + chats: Array; + users: Array; +} + +export interface help_appConfigNotModified { + _: "help.appConfigNotModified"; +} + +export interface help_appConfig { + _: "help.appConfig"; + hash: number; + config: JSONValue; +} + +export interface inputBotAppID { + _: "inputBotAppID"; + id: bigint; + access_hash: bigint; +} + +export interface inputBotAppShortName { + _: "inputBotAppShortName"; + bot_id: InputUser; + short_name: string; +} + +export interface botAppNotModified { + _: "botAppNotModified"; +} + +export interface botApp { + _: "botApp"; + id: bigint; + access_hash: bigint; + short_name: string; + title: string; + description: string; + photo: Photo; + document?: Document; + hash: bigint; +} + +export interface messages_botApp { + _: "messages.botApp"; + inactive?: true; + request_write_access?: true; + has_settings?: true; + app: BotApp; +} + +export interface appWebViewResultUrl { + _: "appWebViewResultUrl"; + url: string; +} + +export interface inlineBotWebView { + _: "inlineBotWebView"; + text: string; + url: string; +} + +export interface readParticipantDate { + _: "readParticipantDate"; + user_id: bigint; + date: number; +} + +export interface inputChatlistDialogFilter { + _: "inputChatlistDialogFilter"; + filter_id: number; +} + +export interface exportedChatlistInvite { + _: "exportedChatlistInvite"; + title: string; + url: string; + peers: Array; +} + +export interface chatlists_exportedChatlistInvite { + _: "chatlists.exportedChatlistInvite"; + filter: DialogFilter; + invite: ExportedChatlistInvite; +} + +export interface chatlists_exportedInvites { + _: "chatlists.exportedInvites"; + invites: Array; + chats: Array; + users: Array; +} + +export interface chatlists_chatlistInviteAlready { + _: "chatlists.chatlistInviteAlready"; + filter_id: number; + missing_peers: Array; + already_peers: Array; + chats: Array; + users: Array; +} + +export interface chatlists_chatlistInvite { + _: "chatlists.chatlistInvite"; + title: string; + emoticon?: string; + peers: Array; + chats: Array; + users: Array; +} + +export interface chatlists_chatlistUpdates { + _: "chatlists.chatlistUpdates"; + missing_peers: Array; + chats: Array; + users: Array; +} + +export interface bots_botInfo { + _: "bots.botInfo"; + name: string; + about: string; + description: string; +} + +export interface messagePeerVote { + _: "messagePeerVote"; + peer: Peer; + option: Uint8Array; + date: number; +} + +export interface messagePeerVoteInputOption { + _: "messagePeerVoteInputOption"; + peer: Peer; + date: number; +} + +export interface messagePeerVoteMultiple { + _: "messagePeerVoteMultiple"; + peer: Peer; + options: Array; + date: number; +} + +export interface sponsoredWebPage { + _: "sponsoredWebPage"; + url: string; + site_name: string; + photo?: Photo; +} + +export interface storyViews { + _: "storyViews"; + has_viewers?: true; + views_count: number; + forwards_count?: number; + reactions?: Array; + reactions_count?: number; + recent_viewers?: Array; +} + +export interface storyItemDeleted { + _: "storyItemDeleted"; + id: number; +} + +export interface storyItemSkipped { + _: "storyItemSkipped"; + close_friends?: true; + id: number; + date: number; + expire_date: number; +} + +export interface storyItem { + _: "storyItem"; + pinned?: true; + public?: true; + close_friends?: true; + min?: true; + noforwards?: true; + edited?: true; + contacts?: true; + selected_contacts?: true; + out?: true; + id: number; + date: number; + from_id?: Peer; + fwd_from?: StoryFwdHeader; + expire_date: number; + caption?: string; + entities?: Array; + media: MessageMedia; + media_areas?: Array; + privacy?: Array; + views?: StoryViews; + sent_reaction?: Reaction; +} + +export interface stories_allStoriesNotModified { + _: "stories.allStoriesNotModified"; + state: string; + stealth_mode: StoriesStealthMode; +} + +export interface stories_allStories { + _: "stories.allStories"; + has_more?: true; + count: number; + state: string; + peer_stories: Array; + chats: Array; + users: Array; + stealth_mode: StoriesStealthMode; +} + +export interface stories_stories { + _: "stories.stories"; + count: number; + stories: Array; + chats: Array; + users: Array; +} + +export interface storyView { + _: "storyView"; + blocked?: true; + blocked_my_stories_from?: true; + user_id: bigint; + date: number; + reaction?: Reaction; +} + +export interface storyViewPublicForward { + _: "storyViewPublicForward"; + blocked?: true; + blocked_my_stories_from?: true; + message: Message; +} + +export interface storyViewPublicRepost { + _: "storyViewPublicRepost"; + blocked?: true; + blocked_my_stories_from?: true; + peer_id: Peer; + story: StoryItem; +} + +export interface stories_storyViewsList { + _: "stories.storyViewsList"; + count: number; + views_count: number; + forwards_count: number; + reactions_count: number; + views: Array; + chats: Array; + users: Array; + next_offset?: string; +} + +export interface stories_storyViews { + _: "stories.storyViews"; + views: Array; + users: Array; +} + +export interface inputReplyToMessage { + _: "inputReplyToMessage"; + reply_to_msg_id: number; + top_msg_id?: number; + reply_to_peer_id?: InputPeer; + quote_text?: string; + quote_entities?: Array; + quote_offset?: number; +} + +export interface inputReplyToStory { + _: "inputReplyToStory"; + peer: InputPeer; + story_id: number; +} + +export interface exportedStoryLink { + _: "exportedStoryLink"; + link: string; +} + +export interface storiesStealthMode { + _: "storiesStealthMode"; + active_until_date?: number; + cooldown_until_date?: number; +} + +export interface mediaAreaCoordinates { + _: "mediaAreaCoordinates"; + x: number; + y: number; + w: number; + h: number; + rotation: number; +} + +export interface mediaAreaVenue { + _: "mediaAreaVenue"; + coordinates: MediaAreaCoordinates; + geo: GeoPoint; + title: string; + address: string; + provider: string; + venue_id: string; + venue_type: string; +} + +export interface inputMediaAreaVenue { + _: "inputMediaAreaVenue"; + coordinates: MediaAreaCoordinates; + query_id: bigint; + result_id: string; +} + +export interface mediaAreaGeoPoint { + _: "mediaAreaGeoPoint"; + coordinates: MediaAreaCoordinates; + geo: GeoPoint; +} + +export interface mediaAreaSuggestedReaction { + _: "mediaAreaSuggestedReaction"; + dark?: true; + flipped?: true; + coordinates: MediaAreaCoordinates; + reaction: Reaction; +} + +export interface mediaAreaChannelPost { + _: "mediaAreaChannelPost"; + coordinates: MediaAreaCoordinates; + channel_id: bigint; + msg_id: number; +} + +export interface inputMediaAreaChannelPost { + _: "inputMediaAreaChannelPost"; + coordinates: MediaAreaCoordinates; + channel: InputChannel; + msg_id: number; +} + +export interface peerStories { + _: "peerStories"; + peer: Peer; + max_read_id?: number; + stories: Array; +} + +export interface stories_peerStories { + _: "stories.peerStories"; + stories: PeerStories; + chats: Array; + users: Array; +} + +export interface messages_webPage { + _: "messages.webPage"; + webpage: WebPage; + chats: Array; + users: Array; +} + +export interface premiumGiftCodeOption { + _: "premiumGiftCodeOption"; + users: number; + months: number; + store_product?: string; + store_quantity?: number; + currency: string; + amount: bigint; +} + +export interface payments_checkedGiftCode { + _: "payments.checkedGiftCode"; + via_giveaway?: true; + from_id?: Peer; + giveaway_msg_id?: number; + to_id?: bigint; + date: number; + months: number; + used_date?: number; + chats: Array; + users: Array; +} + +export interface payments_giveawayInfo { + _: "payments.giveawayInfo"; + participating?: true; + preparing_results?: true; + start_date: number; + joined_too_early_date?: number; + admin_disallowed_chat_id?: bigint; + disallowed_country?: string; +} + +export interface payments_giveawayInfoResults { + _: "payments.giveawayInfoResults"; + winner?: true; + refunded?: true; + start_date: number; + gift_code_slug?: string; + finish_date: number; + winners_count: number; + activated_count: number; +} + +export interface prepaidGiveaway { + _: "prepaidGiveaway"; + id: bigint; + months: number; + quantity: number; + date: number; +} + +export interface boost { + _: "boost"; + gift?: true; + giveaway?: true; + unclaimed?: true; + id: string; + user_id?: bigint; + giveaway_msg_id?: number; + date: number; + expires: number; + used_gift_slug?: string; + multiplier?: number; +} + +export interface premium_boostsList { + _: "premium.boostsList"; + count: number; + boosts: Array; + next_offset?: string; + users: Array; +} + +export interface myBoost { + _: "myBoost"; + slot: number; + peer?: Peer; + date: number; + expires: number; + cooldown_until_date?: number; +} + +export interface premium_myBoosts { + _: "premium.myBoosts"; + my_boosts: Array; + chats: Array; + users: Array; +} + +export interface premium_boostsStatus { + _: "premium.boostsStatus"; + my_boost?: true; + level: number; + current_level_boosts: number; + boosts: number; + gift_boosts?: number; + next_level_boosts?: number; + premium_audience?: StatsPercentValue; + boost_url: string; + prepaid_giveaways?: Array; + my_boost_slots?: Array; +} + +export interface storyFwdHeader { + _: "storyFwdHeader"; + modified?: true; + from?: Peer; + from_name?: string; + story_id?: number; +} + +export interface postInteractionCountersMessage { + _: "postInteractionCountersMessage"; + msg_id: number; + views: number; + forwards: number; + reactions: number; +} + +export interface postInteractionCountersStory { + _: "postInteractionCountersStory"; + story_id: number; + views: number; + forwards: number; + reactions: number; +} + +export interface stats_storyStats { + _: "stats.storyStats"; + views_graph: StatsGraph; + reactions_by_emotion_graph: StatsGraph; +} + +export interface publicForwardMessage { + _: "publicForwardMessage"; + message: Message; +} + +export interface publicForwardStory { + _: "publicForwardStory"; + peer: Peer; + story: StoryItem; +} + +export interface stats_publicForwards { + _: "stats.publicForwards"; + count: number; + forwards: Array; + next_offset?: string; + chats: Array; + users: Array; +} + +export interface peerColor { + _: "peerColor"; + color?: number; + background_emoji_id?: bigint; +} + +export interface help_peerColorSet { + _: "help.peerColorSet"; + colors: Array; +} + +export interface help_peerColorProfileSet { + _: "help.peerColorProfileSet"; + palette_colors: Array; + bg_colors: Array; + story_colors: Array; +} + +export interface help_peerColorOption { + _: "help.peerColorOption"; + hidden?: true; + color_id: number; + colors?: help_PeerColorSet; + dark_colors?: help_PeerColorSet; + channel_min_level?: number; + group_min_level?: number; +} + +export interface help_peerColorsNotModified { + _: "help.peerColorsNotModified"; +} + +export interface help_peerColors { + _: "help.peerColors"; + hash: number; + colors: Array; +} + +export interface storyReaction { + _: "storyReaction"; + peer_id: Peer; + date: number; + reaction: Reaction; +} + +export interface storyReactionPublicForward { + _: "storyReactionPublicForward"; + message: Message; +} + +export interface storyReactionPublicRepost { + _: "storyReactionPublicRepost"; + peer_id: Peer; + story: StoryItem; +} + +export interface stories_storyReactionsList { + _: "stories.storyReactionsList"; + count: number; + reactions: Array; + chats: Array; + users: Array; + next_offset?: string; +} + +export interface savedDialog { + _: "savedDialog"; + pinned?: true; + peer: Peer; + top_message: number; +} + +export interface messages_savedDialogs { + _: "messages.savedDialogs"; + dialogs: Array; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_savedDialogsSlice { + _: "messages.savedDialogsSlice"; + count: number; + dialogs: Array; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_savedDialogsNotModified { + _: "messages.savedDialogsNotModified"; + count: number; +} + +export interface savedReactionTag { + _: "savedReactionTag"; + reaction: Reaction; + title?: string; + count: number; +} + +export interface messages_savedReactionTagsNotModified { + _: "messages.savedReactionTagsNotModified"; +} + +export interface messages_savedReactionTags { + _: "messages.savedReactionTags"; + tags: Array; + hash: bigint; +} + +export interface outboxReadDate { + _: "outboxReadDate"; + date: number; +} + +export interface smsjobs_eligibleToJoin { + _: "smsjobs.eligibleToJoin"; + terms_url: string; + monthly_sent_sms: number; +} + +export interface smsjobs_status { + _: "smsjobs.status"; + allow_international?: true; + recent_sent: number; + recent_since: number; + recent_remains: number; + total_sent: number; + total_since: number; + last_gift_slug?: string; + terms_url: string; +} + +export interface smsJob { + _: "smsJob"; + job_id: string; + phone_number: string; + text: string; +} + +export interface businessWeeklyOpen { + _: "businessWeeklyOpen"; + start_minute: number; + end_minute: number; +} + +export interface businessWorkHours { + _: "businessWorkHours"; + open_now?: true; + timezone_id: string; + weekly_open: Array; +} + +export interface businessLocation { + _: "businessLocation"; + geo_point?: GeoPoint; + address: string; +} + +export interface inputBusinessRecipients { + _: "inputBusinessRecipients"; + existing_chats?: true; + new_chats?: true; + contacts?: true; + non_contacts?: true; + exclude_selected?: true; + users?: Array; +} + +export interface businessRecipients { + _: "businessRecipients"; + existing_chats?: true; + new_chats?: true; + contacts?: true; + non_contacts?: true; + exclude_selected?: true; + users?: Array; +} + +export interface businessAwayMessageScheduleAlways { + _: "businessAwayMessageScheduleAlways"; +} + +export interface businessAwayMessageScheduleOutsideWorkHours { + _: "businessAwayMessageScheduleOutsideWorkHours"; +} + +export interface businessAwayMessageScheduleCustom { + _: "businessAwayMessageScheduleCustom"; + start_date: number; + end_date: number; +} + +export interface inputBusinessGreetingMessage { + _: "inputBusinessGreetingMessage"; + shortcut_id: number; + recipients: InputBusinessRecipients; + no_activity_days: number; +} + +export interface businessGreetingMessage { + _: "businessGreetingMessage"; + shortcut_id: number; + recipients: BusinessRecipients; + no_activity_days: number; +} + +export interface inputBusinessAwayMessage { + _: "inputBusinessAwayMessage"; + offline_only?: true; + shortcut_id: number; + schedule: BusinessAwayMessageSchedule; + recipients: InputBusinessRecipients; +} + +export interface businessAwayMessage { + _: "businessAwayMessage"; + offline_only?: true; + shortcut_id: number; + schedule: BusinessAwayMessageSchedule; + recipients: BusinessRecipients; +} + +export interface timezone { + _: "timezone"; + id: string; + name: string; + utc_offset: number; +} + +export interface help_timezonesListNotModified { + _: "help.timezonesListNotModified"; +} + +export interface help_timezonesList { + _: "help.timezonesList"; + timezones: Array; + hash: number; +} + +export interface quickReply { + _: "quickReply"; + shortcut_id: number; + shortcut: string; + top_message: number; + count: number; +} + +export interface inputQuickReplyShortcut { + _: "inputQuickReplyShortcut"; + shortcut: string; +} + +export interface inputQuickReplyShortcutId { + _: "inputQuickReplyShortcutId"; + shortcut_id: number; +} + +export interface messages_quickReplies { + _: "messages.quickReplies"; + quick_replies: Array; + messages: Array; + chats: Array; + users: Array; +} + +export interface messages_quickRepliesNotModified { + _: "messages.quickRepliesNotModified"; +} + +export interface connectedBot { + _: "connectedBot"; + can_reply?: true; + bot_id: bigint; + recipients: BusinessBotRecipients; +} + +export interface account_connectedBots { + _: "account.connectedBots"; + connected_bots: Array; + users: Array; +} + +export interface messages_dialogFilters { + _: "messages.dialogFilters"; + tags_enabled?: true; + filters: Array; +} + +export interface birthday { + _: "birthday"; + day: number; + month: number; + year?: number; +} + +export interface botBusinessConnection { + _: "botBusinessConnection"; + can_reply?: true; + disabled?: true; + connection_id: string; + user_id: bigint; + dc_id: number; + date: number; +} + +export interface inputBusinessIntro { + _: "inputBusinessIntro"; + title: string; + description: string; + sticker?: InputDocument; +} + +export interface businessIntro { + _: "businessIntro"; + title: string; + description: string; + sticker?: Document; +} + +export interface messages_myStickers { + _: "messages.myStickers"; + count: number; + sets: Array; +} + +export interface inputCollectibleUsername { + _: "inputCollectibleUsername"; + username: string; +} + +export interface inputCollectiblePhone { + _: "inputCollectiblePhone"; + phone: string; +} + +export interface fragment_collectibleInfo { + _: "fragment.collectibleInfo"; + purchase_date: number; + currency: string; + amount: bigint; + crypto_currency: string; + crypto_amount: bigint; + url: string; +} + +export interface inputBusinessBotRecipients { + _: "inputBusinessBotRecipients"; + existing_chats?: true; + new_chats?: true; + contacts?: true; + non_contacts?: true; + exclude_selected?: true; + users?: Array; + exclude_users?: Array; +} + +export interface businessBotRecipients { + _: "businessBotRecipients"; + existing_chats?: true; + new_chats?: true; + contacts?: true; + non_contacts?: true; + exclude_selected?: true; + users?: Array; + exclude_users?: Array; +} + +export interface contactBirthday { + _: "contactBirthday"; + contact_id: bigint; + birthday: Birthday; +} + +export interface contacts_contactBirthdays { + _: "contacts.contactBirthdays"; + contacts: Array; + users: Array; +} + +export interface missingInvitee { + _: "missingInvitee"; + premium_would_allow_invite?: true; + premium_required_for_pm?: true; + user_id: bigint; +} + +export interface messages_invitedUsers { + _: "messages.invitedUsers"; + updates: Updates; + missing_invitees: Array; +} + +export interface inputBusinessChatLink { + _: "inputBusinessChatLink"; + message: string; + entities?: Array; + title?: string; +} + +export interface businessChatLink { + _: "businessChatLink"; + link: string; + message: string; + entities?: Array; + title?: string; + views: number; +} + +export interface account_businessChatLinks { + _: "account.businessChatLinks"; + links: Array; + chats: Array; + users: Array; +} + +export interface account_resolvedBusinessChatLinks { + _: "account.resolvedBusinessChatLinks"; + peer: Peer; + message: string; + entities?: Array; + chats: Array; + users: Array; +} + +export interface requestedPeerUser { + _: "requestedPeerUser"; + user_id: bigint; + first_name?: string; + last_name?: string; + username?: string; + photo?: Photo; +} + +export interface requestedPeerChat { + _: "requestedPeerChat"; + chat_id: bigint; + title?: string; + photo?: Photo; +} + +export interface requestedPeerChannel { + _: "requestedPeerChannel"; + channel_id: bigint; + title?: string; + username?: string; + photo?: Photo; +} + +export interface sponsoredMessageReportOption { + _: "sponsoredMessageReportOption"; + text: string; + option: Uint8Array; +} + +export interface channels_sponsoredMessageReportResultChooseOption { + _: "channels.sponsoredMessageReportResultChooseOption"; + title: string; + options: Array; +} + +export interface channels_sponsoredMessageReportResultAdsHidden { + _: "channels.sponsoredMessageReportResultAdsHidden"; +} + +export interface channels_sponsoredMessageReportResultReported { + _: "channels.sponsoredMessageReportResultReported"; +} + +export interface stats_broadcastRevenueStats { + _: "stats.broadcastRevenueStats"; + top_hours_graph: StatsGraph; + revenue_graph: StatsGraph; + current_balance: bigint; + available_balance: bigint; + overall_revenue: bigint; + usd_rate: number; +} + +export interface stats_broadcastRevenueWithdrawalUrl { + _: "stats.broadcastRevenueWithdrawalUrl"; + url: string; +} + +export interface broadcastRevenueTransactionProceeds { + _: "broadcastRevenueTransactionProceeds"; + amount: bigint; + from_date: number; + to_date: number; +} + +export interface broadcastRevenueTransactionWithdrawal { + _: "broadcastRevenueTransactionWithdrawal"; + pending?: true; + failed?: true; + amount: bigint; + date: number; + provider: string; + transaction_date?: number; + transaction_url?: string; +} + +export interface broadcastRevenueTransactionRefund { + _: "broadcastRevenueTransactionRefund"; + amount: bigint; + date: number; + provider: string; +} + +export interface stats_broadcastRevenueTransactions { + _: "stats.broadcastRevenueTransactions"; + count: number; + transactions: Array; +} + +export interface req_pq_multi { + _: "req_pq_multi"; + nonce: bigint; + [R]?: ResPQ; +} + +export interface req_DH_params { + _: "req_DH_params"; + nonce: bigint; + server_nonce: bigint; + p: Uint8Array; + q: Uint8Array; + public_key_fingerprint: bigint; + encrypted_data: Uint8Array; + [R]?: Server_DH_Params; +} + +export interface set_client_DH_params { + _: "set_client_DH_params"; + nonce: bigint; + server_nonce: bigint; + encrypted_data: Uint8Array; + [R]?: Set_client_DH_params_answer; +} + +export interface rpc_drop_answer { + _: "rpc_drop_answer"; + req_msg_id: bigint; + [R]?: RpcDropAnswer; +} + +export interface get_future_salts { + _: "get_future_salts"; + num: number; + [R]?: FutureSalts; +} + +export interface ping { + _: "ping"; + ping_id: bigint; + [R]?: Pong; +} + +export interface ping_delay_disconnect { + _: "ping_delay_disconnect"; + ping_id: bigint; + disconnect_delay: number; + [R]?: Pong; +} + +export interface destroy_session { + _: "destroy_session"; + session_id: bigint; + [R]?: DestroySessionRes; +} + +export interface destroy_auth_key { + _: "destroy_auth_key"; + [R]?: DestroyAuthKeyRes; +} + +export interface invokeWithBusinessConnectionPrefix { + _: "invokeWithBusinessConnectionPrefix"; + connection_id: string; + [R]?: Error; +} + +export interface invokeAfterMsg { + _: "invokeAfterMsg"; + msg_id: bigint; + query: T; + [R]?: ReturnType; +} + +export interface invokeAfterMsgs { + _: "invokeAfterMsgs"; + msg_ids: Array; + query: T; + [R]?: ReturnType; +} + +export interface initConnection { + _: "initConnection"; + api_id: number; + device_model: string; + system_version: string; + app_version: string; + system_lang_code: string; + lang_pack: string; + lang_code: string; + proxy?: InputClientProxy; + params?: JSONValue; + query: T; + [R]?: ReturnType; +} + +export interface invokeWithLayer { + _: "invokeWithLayer"; + layer: number; + query: T; + [R]?: ReturnType; +} + +export interface invokeWithoutUpdates { + _: "invokeWithoutUpdates"; + query: T; + [R]?: ReturnType; +} + +export interface invokeWithMessagesRange { + _: "invokeWithMessagesRange"; + range: MessageRange; + query: T; + [R]?: ReturnType; +} + +export interface invokeWithTakeout { + _: "invokeWithTakeout"; + takeout_id: bigint; + query: T; + [R]?: ReturnType; +} + +export interface invokeWithBusinessConnection { + _: "invokeWithBusinessConnection"; + connection_id: string; + query: T; + [R]?: ReturnType; +} + +export interface auth_sendCode { + _: "auth.sendCode"; + phone_number: string; + api_id: number; + api_hash: string; + settings: CodeSettings; + [R]?: auth_SentCode; +} + +export interface auth_signUp { + _: "auth.signUp"; + no_joined_notifications?: true; + phone_number: string; + phone_code_hash: string; + first_name: string; + last_name: string; + [R]?: auth_Authorization; +} + +export interface auth_signIn { + _: "auth.signIn"; + phone_number: string; + phone_code_hash: string; + phone_code?: string; + email_verification?: EmailVerification; + [R]?: auth_Authorization; +} + +export interface auth_logOut { + _: "auth.logOut"; + [R]?: auth_LoggedOut; +} + +export interface auth_resetAuthorizations { + _: "auth.resetAuthorizations"; + [R]?: boolean; +} + +export interface auth_exportAuthorization { + _: "auth.exportAuthorization"; + dc_id: number; + [R]?: auth_ExportedAuthorization; +} + +export interface auth_importAuthorization { + _: "auth.importAuthorization"; + id: bigint; + bytes: Uint8Array; + [R]?: auth_Authorization; +} + +export interface auth_bindTempAuthKey { + _: "auth.bindTempAuthKey"; + perm_auth_key_id: bigint; + nonce: bigint; + expires_at: number; + encrypted_message: Uint8Array; + [R]?: boolean; +} + +export interface auth_importBotAuthorization { + _: "auth.importBotAuthorization"; + flags: number; + api_id: number; + api_hash: string; + bot_auth_token: string; + [R]?: auth_Authorization; +} + +export interface auth_checkPassword { + _: "auth.checkPassword"; + password: InputCheckPasswordSRP; + [R]?: auth_Authorization; +} + +export interface auth_requestPasswordRecovery { + _: "auth.requestPasswordRecovery"; + [R]?: auth_PasswordRecovery; +} + +export interface auth_recoverPassword { + _: "auth.recoverPassword"; + code: string; + new_settings?: account_PasswordInputSettings; + [R]?: auth_Authorization; +} + +export interface auth_resendCode { + _: "auth.resendCode"; + phone_number: string; + phone_code_hash: string; + [R]?: auth_SentCode; +} + +export interface auth_cancelCode { + _: "auth.cancelCode"; + phone_number: string; + phone_code_hash: string; + [R]?: boolean; +} + +export interface auth_dropTempAuthKeys { + _: "auth.dropTempAuthKeys"; + except_auth_keys: Array; + [R]?: boolean; +} + +export interface auth_exportLoginToken { + _: "auth.exportLoginToken"; + api_id: number; + api_hash: string; + except_ids: Array; + [R]?: auth_LoginToken; +} + +export interface auth_importLoginToken { + _: "auth.importLoginToken"; + token: Uint8Array; + [R]?: auth_LoginToken; +} + +export interface auth_acceptLoginToken { + _: "auth.acceptLoginToken"; + token: Uint8Array; + [R]?: Authorization; +} + +export interface auth_checkRecoveryPassword { + _: "auth.checkRecoveryPassword"; + code: string; + [R]?: boolean; +} + +export interface auth_importWebTokenAuthorization { + _: "auth.importWebTokenAuthorization"; + api_id: number; + api_hash: string; + web_auth_token: string; + [R]?: auth_Authorization; +} + +export interface auth_requestFirebaseSms { + _: "auth.requestFirebaseSms"; + phone_number: string; + phone_code_hash: string; + safety_net_token?: string; + ios_push_secret?: string; + [R]?: boolean; +} + +export interface auth_resetLoginEmail { + _: "auth.resetLoginEmail"; + phone_number: string; + phone_code_hash: string; + [R]?: auth_SentCode; +} + +export interface account_registerDevice { + _: "account.registerDevice"; + no_muted?: true; + token_type: number; + token: string; + app_sandbox: boolean; + secret: Uint8Array; + other_uids: Array; + [R]?: boolean; +} + +export interface account_unregisterDevice { + _: "account.unregisterDevice"; + token_type: number; + token: string; + other_uids: Array; + [R]?: boolean; +} + +export interface account_updateNotifySettings { + _: "account.updateNotifySettings"; + peer: InputNotifyPeer; + settings: InputPeerNotifySettings; + [R]?: boolean; +} + +export interface account_getNotifySettings { + _: "account.getNotifySettings"; + peer: InputNotifyPeer; + [R]?: PeerNotifySettings; +} + +export interface account_resetNotifySettings { + _: "account.resetNotifySettings"; + [R]?: boolean; +} + +export interface account_updateProfile { + _: "account.updateProfile"; + first_name?: string; + last_name?: string; + about?: string; + [R]?: User; +} + +export interface account_updateStatus { + _: "account.updateStatus"; + offline: boolean; + [R]?: boolean; +} + +export interface account_getWallPapers { + _: "account.getWallPapers"; + hash: bigint; + [R]?: account_WallPapers; +} + +export interface account_reportPeer { + _: "account.reportPeer"; + peer: InputPeer; + reason: ReportReason; + message: string; + [R]?: boolean; +} + +export interface account_checkUsername { + _: "account.checkUsername"; + username: string; + [R]?: boolean; +} + +export interface account_updateUsername { + _: "account.updateUsername"; + username: string; + [R]?: User; +} + +export interface account_getPrivacy { + _: "account.getPrivacy"; + key: InputPrivacyKey; + [R]?: account_PrivacyRules; +} + +export interface account_setPrivacy { + _: "account.setPrivacy"; + key: InputPrivacyKey; + rules: Array; + [R]?: account_PrivacyRules; +} + +export interface account_deleteAccount { + _: "account.deleteAccount"; + reason: string; + password?: InputCheckPasswordSRP; + [R]?: boolean; +} + +export interface account_getAccountTTL { + _: "account.getAccountTTL"; + [R]?: AccountDaysTTL; +} + +export interface account_setAccountTTL { + _: "account.setAccountTTL"; + ttl: AccountDaysTTL; + [R]?: boolean; +} + +export interface account_sendChangePhoneCode { + _: "account.sendChangePhoneCode"; + phone_number: string; + settings: CodeSettings; + [R]?: auth_SentCode; +} + +export interface account_changePhone { + _: "account.changePhone"; + phone_number: string; + phone_code_hash: string; + phone_code: string; + [R]?: User; +} + +export interface account_updateDeviceLocked { + _: "account.updateDeviceLocked"; + period: number; + [R]?: boolean; +} + +export interface account_getAuthorizations { + _: "account.getAuthorizations"; + [R]?: account_Authorizations; +} + +export interface account_resetAuthorization { + _: "account.resetAuthorization"; + hash: bigint; + [R]?: boolean; +} + +export interface account_getPassword { + _: "account.getPassword"; + [R]?: account_Password; +} + +export interface account_getPasswordSettings { + _: "account.getPasswordSettings"; + password: InputCheckPasswordSRP; + [R]?: account_PasswordSettings; +} + +export interface account_updatePasswordSettings { + _: "account.updatePasswordSettings"; + password: InputCheckPasswordSRP; + new_settings: account_PasswordInputSettings; + [R]?: boolean; +} + +export interface account_sendConfirmPhoneCode { + _: "account.sendConfirmPhoneCode"; + hash: string; + settings: CodeSettings; + [R]?: auth_SentCode; +} + +export interface account_confirmPhone { + _: "account.confirmPhone"; + phone_code_hash: string; + phone_code: string; + [R]?: boolean; +} + +export interface account_getTmpPassword { + _: "account.getTmpPassword"; + password: InputCheckPasswordSRP; + period: number; + [R]?: account_TmpPassword; +} + +export interface account_getWebAuthorizations { + _: "account.getWebAuthorizations"; + [R]?: account_WebAuthorizations; +} + +export interface account_resetWebAuthorization { + _: "account.resetWebAuthorization"; + hash: bigint; + [R]?: boolean; +} + +export interface account_resetWebAuthorizations { + _: "account.resetWebAuthorizations"; + [R]?: boolean; +} + +export interface account_getAllSecureValues { + _: "account.getAllSecureValues"; + [R]?: Array; +} + +export interface account_getSecureValue { + _: "account.getSecureValue"; + types: Array; + [R]?: Array; +} + +export interface account_saveSecureValue { + _: "account.saveSecureValue"; + value: InputSecureValue; + secure_secret_id: bigint; + [R]?: SecureValue; +} + +export interface account_deleteSecureValue { + _: "account.deleteSecureValue"; + types: Array; + [R]?: boolean; +} + +export interface account_getAuthorizationForm { + _: "account.getAuthorizationForm"; + bot_id: bigint; + scope: string; + public_key: string; + [R]?: account_AuthorizationForm; +} + +export interface account_acceptAuthorization { + _: "account.acceptAuthorization"; + bot_id: bigint; + scope: string; + public_key: string; + value_hashes: Array; + credentials: SecureCredentialsEncrypted; + [R]?: boolean; +} + +export interface account_sendVerifyPhoneCode { + _: "account.sendVerifyPhoneCode"; + phone_number: string; + settings: CodeSettings; + [R]?: auth_SentCode; +} + +export interface account_verifyPhone { + _: "account.verifyPhone"; + phone_number: string; + phone_code_hash: string; + phone_code: string; + [R]?: boolean; +} + +export interface account_sendVerifyEmailCode { + _: "account.sendVerifyEmailCode"; + purpose: EmailVerifyPurpose; + email: string; + [R]?: account_SentEmailCode; +} + +export interface account_verifyEmail { + _: "account.verifyEmail"; + purpose: EmailVerifyPurpose; + verification: EmailVerification; + [R]?: account_EmailVerified; +} + +export interface account_initTakeoutSession { + _: "account.initTakeoutSession"; + contacts?: true; + message_users?: true; + message_chats?: true; + message_megagroups?: true; + message_channels?: true; + files?: true; + file_max_size?: bigint; + [R]?: account_Takeout; +} + +export interface account_finishTakeoutSession { + _: "account.finishTakeoutSession"; + success?: true; + [R]?: boolean; +} + +export interface account_confirmPasswordEmail { + _: "account.confirmPasswordEmail"; + code: string; + [R]?: boolean; +} + +export interface account_resendPasswordEmail { + _: "account.resendPasswordEmail"; + [R]?: boolean; +} + +export interface account_cancelPasswordEmail { + _: "account.cancelPasswordEmail"; + [R]?: boolean; +} + +export interface account_getContactSignUpNotification { + _: "account.getContactSignUpNotification"; + [R]?: boolean; +} + +export interface account_setContactSignUpNotification { + _: "account.setContactSignUpNotification"; + silent: boolean; + [R]?: boolean; +} + +export interface account_getNotifyExceptions { + _: "account.getNotifyExceptions"; + compare_sound?: true; + compare_stories?: true; + peer?: InputNotifyPeer; + [R]?: Updates; +} + +export interface account_getWallPaper { + _: "account.getWallPaper"; + wallpaper: InputWallPaper; + [R]?: WallPaper; +} + +export interface account_uploadWallPaper { + _: "account.uploadWallPaper"; + for_chat?: true; + file: InputFile; + mime_type: string; + settings: WallPaperSettings; + [R]?: WallPaper; +} + +export interface account_saveWallPaper { + _: "account.saveWallPaper"; + wallpaper: InputWallPaper; + unsave: boolean; + settings: WallPaperSettings; + [R]?: boolean; +} + +export interface account_installWallPaper { + _: "account.installWallPaper"; + wallpaper: InputWallPaper; + settings: WallPaperSettings; + [R]?: boolean; +} + +export interface account_resetWallPapers { + _: "account.resetWallPapers"; + [R]?: boolean; +} + +export interface account_getAutoDownloadSettings { + _: "account.getAutoDownloadSettings"; + [R]?: account_AutoDownloadSettings; +} + +export interface account_saveAutoDownloadSettings { + _: "account.saveAutoDownloadSettings"; + low?: true; + high?: true; + settings: AutoDownloadSettings; + [R]?: boolean; +} + +export interface account_uploadTheme { + _: "account.uploadTheme"; + file: InputFile; + thumb?: InputFile; + file_name: string; + mime_type: string; + [R]?: Document; +} + +export interface account_createTheme { + _: "account.createTheme"; + slug: string; + title: string; + document?: InputDocument; + settings?: Array; + [R]?: Theme; +} + +export interface account_updateTheme { + _: "account.updateTheme"; + format: string; + theme: InputTheme; + slug?: string; + title?: string; + document?: InputDocument; + settings?: Array; + [R]?: Theme; +} + +export interface account_saveTheme { + _: "account.saveTheme"; + theme: InputTheme; + unsave: boolean; + [R]?: boolean; +} + +export interface account_installTheme { + _: "account.installTheme"; + dark?: true; + theme?: InputTheme; + format?: string; + base_theme?: BaseTheme; + [R]?: boolean; +} + +export interface account_getTheme { + _: "account.getTheme"; + format: string; + theme: InputTheme; + [R]?: Theme; +} + +export interface account_getThemes { + _: "account.getThemes"; + format: string; + hash: bigint; + [R]?: account_Themes; +} + +export interface account_setContentSettings { + _: "account.setContentSettings"; + sensitive_enabled?: true; + [R]?: boolean; +} + +export interface account_getContentSettings { + _: "account.getContentSettings"; + [R]?: account_ContentSettings; +} + +export interface account_getMultiWallPapers { + _: "account.getMultiWallPapers"; + wallpapers: Array; + [R]?: Array; +} + +export interface account_getGlobalPrivacySettings { + _: "account.getGlobalPrivacySettings"; + [R]?: GlobalPrivacySettings; +} + +export interface account_setGlobalPrivacySettings { + _: "account.setGlobalPrivacySettings"; + settings: GlobalPrivacySettings; + [R]?: GlobalPrivacySettings; +} + +export interface account_reportProfilePhoto { + _: "account.reportProfilePhoto"; + peer: InputPeer; + photo_id: InputPhoto; + reason: ReportReason; + message: string; + [R]?: boolean; +} + +export interface account_resetPassword { + _: "account.resetPassword"; + [R]?: account_ResetPasswordResult; +} + +export interface account_declinePasswordReset { + _: "account.declinePasswordReset"; + [R]?: boolean; +} + +export interface account_getChatThemes { + _: "account.getChatThemes"; + hash: bigint; + [R]?: account_Themes; +} + +export interface account_setAuthorizationTTL { + _: "account.setAuthorizationTTL"; + authorization_ttl_days: number; + [R]?: boolean; +} + +export interface account_changeAuthorizationSettings { + _: "account.changeAuthorizationSettings"; + confirmed?: true; + hash: bigint; + encrypted_requests_disabled?: boolean; + call_requests_disabled?: boolean; + [R]?: boolean; +} + +export interface account_getSavedRingtones { + _: "account.getSavedRingtones"; + hash: bigint; + [R]?: account_SavedRingtones; +} + +export interface account_saveRingtone { + _: "account.saveRingtone"; + id: InputDocument; + unsave: boolean; + [R]?: account_SavedRingtone; +} + +export interface account_uploadRingtone { + _: "account.uploadRingtone"; + file: InputFile; + file_name: string; + mime_type: string; + [R]?: Document; +} + +export interface account_updateEmojiStatus { + _: "account.updateEmojiStatus"; + emoji_status: EmojiStatus; + [R]?: boolean; +} + +export interface account_getDefaultEmojiStatuses { + _: "account.getDefaultEmojiStatuses"; + hash: bigint; + [R]?: account_EmojiStatuses; +} + +export interface account_getRecentEmojiStatuses { + _: "account.getRecentEmojiStatuses"; + hash: bigint; + [R]?: account_EmojiStatuses; +} + +export interface account_clearRecentEmojiStatuses { + _: "account.clearRecentEmojiStatuses"; + [R]?: boolean; +} + +export interface account_reorderUsernames { + _: "account.reorderUsernames"; + order: Array; + [R]?: boolean; +} + +export interface account_toggleUsername { + _: "account.toggleUsername"; + username: string; + active: boolean; + [R]?: boolean; +} + +export interface account_getDefaultProfilePhotoEmojis { + _: "account.getDefaultProfilePhotoEmojis"; + hash: bigint; + [R]?: EmojiList; +} + +export interface account_getDefaultGroupPhotoEmojis { + _: "account.getDefaultGroupPhotoEmojis"; + hash: bigint; + [R]?: EmojiList; +} + +export interface account_getAutoSaveSettings { + _: "account.getAutoSaveSettings"; + [R]?: account_AutoSaveSettings; +} + +export interface account_saveAutoSaveSettings { + _: "account.saveAutoSaveSettings"; + users?: true; + chats?: true; + broadcasts?: true; + peer?: InputPeer; + settings: AutoSaveSettings; + [R]?: boolean; +} + +export interface account_deleteAutoSaveExceptions { + _: "account.deleteAutoSaveExceptions"; + [R]?: boolean; +} + +export interface account_invalidateSignInCodes { + _: "account.invalidateSignInCodes"; + codes: Array; + [R]?: boolean; +} + +export interface account_updateColor { + _: "account.updateColor"; + for_profile?: true; + color?: number; + background_emoji_id?: bigint; + [R]?: boolean; +} + +export interface account_getDefaultBackgroundEmojis { + _: "account.getDefaultBackgroundEmojis"; + hash: bigint; + [R]?: EmojiList; +} + +export interface account_getChannelDefaultEmojiStatuses { + _: "account.getChannelDefaultEmojiStatuses"; + hash: bigint; + [R]?: account_EmojiStatuses; +} + +export interface account_getChannelRestrictedStatusEmojis { + _: "account.getChannelRestrictedStatusEmojis"; + hash: bigint; + [R]?: EmojiList; +} + +export interface account_updateBusinessWorkHours { + _: "account.updateBusinessWorkHours"; + business_work_hours?: BusinessWorkHours; + [R]?: boolean; +} + +export interface account_updateBusinessLocation { + _: "account.updateBusinessLocation"; + geo_point?: InputGeoPoint; + address?: string; + [R]?: boolean; +} + +export interface account_updateBusinessGreetingMessage { + _: "account.updateBusinessGreetingMessage"; + message?: InputBusinessGreetingMessage; + [R]?: boolean; +} + +export interface account_updateBusinessAwayMessage { + _: "account.updateBusinessAwayMessage"; + message?: InputBusinessAwayMessage; + [R]?: boolean; +} + +export interface account_updateConnectedBot { + _: "account.updateConnectedBot"; + can_reply?: true; + deleted?: true; + bot: InputUser; + recipients: InputBusinessBotRecipients; + [R]?: Updates; +} + +export interface account_getConnectedBots { + _: "account.getConnectedBots"; + [R]?: account_ConnectedBots; +} + +export interface account_getBotBusinessConnection { + _: "account.getBotBusinessConnection"; + connection_id: string; + [R]?: Updates; +} + +export interface account_updateBusinessIntro { + _: "account.updateBusinessIntro"; + intro?: InputBusinessIntro; + [R]?: boolean; +} + +export interface account_toggleConnectedBotPaused { + _: "account.toggleConnectedBotPaused"; + peer: InputPeer; + paused: boolean; + [R]?: boolean; +} + +export interface account_disablePeerConnectedBot { + _: "account.disablePeerConnectedBot"; + peer: InputPeer; + [R]?: boolean; +} + +export interface account_updateBirthday { + _: "account.updateBirthday"; + birthday?: Birthday; + [R]?: boolean; +} + +export interface account_createBusinessChatLink { + _: "account.createBusinessChatLink"; + link: InputBusinessChatLink; + [R]?: BusinessChatLink; +} + +export interface account_editBusinessChatLink { + _: "account.editBusinessChatLink"; + slug: string; + link: InputBusinessChatLink; + [R]?: BusinessChatLink; +} + +export interface account_deleteBusinessChatLink { + _: "account.deleteBusinessChatLink"; + slug: string; + [R]?: boolean; +} + +export interface account_getBusinessChatLinks { + _: "account.getBusinessChatLinks"; + [R]?: account_BusinessChatLinks; +} + +export interface account_resolveBusinessChatLink { + _: "account.resolveBusinessChatLink"; + slug: string; + [R]?: account_ResolvedBusinessChatLinks; +} + +export interface account_updatePersonalChannel { + _: "account.updatePersonalChannel"; + channel: InputChannel; + [R]?: boolean; +} + +export interface users_getUsers { + _: "users.getUsers"; + id: Array; + [R]?: Array; +} + +export interface users_getFullUser { + _: "users.getFullUser"; + id: InputUser; + [R]?: users_UserFull; +} + +export interface users_setSecureValueErrors { + _: "users.setSecureValueErrors"; + id: InputUser; + errors: Array; + [R]?: boolean; +} + +export interface users_getIsPremiumRequiredToContact { + _: "users.getIsPremiumRequiredToContact"; + id: Array; + [R]?: Array; +} + +export interface contacts_getContactIDs { + _: "contacts.getContactIDs"; + hash: bigint; + [R]?: Array; +} + +export interface contacts_getStatuses { + _: "contacts.getStatuses"; + [R]?: Array; +} + +export interface contacts_getContacts { + _: "contacts.getContacts"; + hash: bigint; + [R]?: contacts_Contacts; +} + +export interface contacts_importContacts { + _: "contacts.importContacts"; + contacts: Array; + [R]?: contacts_ImportedContacts; +} + +export interface contacts_deleteContacts { + _: "contacts.deleteContacts"; + id: Array; + [R]?: Updates; +} + +export interface contacts_deleteByPhones { + _: "contacts.deleteByPhones"; + phones: Array; + [R]?: boolean; +} + +export interface contacts_block { + _: "contacts.block"; + my_stories_from?: true; + id: InputPeer; + [R]?: boolean; +} + +export interface contacts_unblock { + _: "contacts.unblock"; + my_stories_from?: true; + id: InputPeer; + [R]?: boolean; +} + +export interface contacts_getBlocked { + _: "contacts.getBlocked"; + my_stories_from?: true; + offset: number; + limit: number; + [R]?: contacts_Blocked; +} + +export interface contacts_search { + _: "contacts.search"; + q: string; + limit: number; + [R]?: contacts_Found; +} + +export interface contacts_resolveUsername { + _: "contacts.resolveUsername"; + username: string; + [R]?: contacts_ResolvedPeer; +} + +export interface contacts_getTopPeers { + _: "contacts.getTopPeers"; + correspondents?: true; + bots_pm?: true; + bots_inline?: true; + phone_calls?: true; + forward_users?: true; + forward_chats?: true; + groups?: true; + channels?: true; + offset: number; + limit: number; + hash: bigint; + [R]?: contacts_TopPeers; +} + +export interface contacts_resetTopPeerRating { + _: "contacts.resetTopPeerRating"; + category: TopPeerCategory; + peer: InputPeer; + [R]?: boolean; +} + +export interface contacts_resetSaved { + _: "contacts.resetSaved"; + [R]?: boolean; +} + +export interface contacts_getSaved { + _: "contacts.getSaved"; + [R]?: Array; +} + +export interface contacts_toggleTopPeers { + _: "contacts.toggleTopPeers"; + enabled: boolean; + [R]?: boolean; +} + +export interface contacts_addContact { + _: "contacts.addContact"; + add_phone_privacy_exception?: true; + id: InputUser; + first_name: string; + last_name: string; + phone: string; + [R]?: Updates; +} + +export interface contacts_acceptContact { + _: "contacts.acceptContact"; + id: InputUser; + [R]?: Updates; +} + +export interface contacts_getLocated { + _: "contacts.getLocated"; + background?: true; + geo_point: InputGeoPoint; + self_expires?: number; + [R]?: Updates; +} + +export interface contacts_blockFromReplies { + _: "contacts.blockFromReplies"; + delete_message?: true; + delete_history?: true; + report_spam?: true; + msg_id: number; + [R]?: Updates; +} + +export interface contacts_resolvePhone { + _: "contacts.resolvePhone"; + phone: string; + [R]?: contacts_ResolvedPeer; +} + +export interface contacts_exportContactToken { + _: "contacts.exportContactToken"; + [R]?: ExportedContactToken; +} + +export interface contacts_importContactToken { + _: "contacts.importContactToken"; + token: string; + [R]?: User; +} + +export interface contacts_editCloseFriends { + _: "contacts.editCloseFriends"; + id: Array; + [R]?: boolean; +} + +export interface contacts_setBlocked { + _: "contacts.setBlocked"; + my_stories_from?: true; + id: Array; + limit: number; + [R]?: boolean; +} + +export interface contacts_getBirthdays { + _: "contacts.getBirthdays"; + [R]?: contacts_ContactBirthdays; +} + +export interface messages_getMessages { + _: "messages.getMessages"; + id: Array; + [R]?: messages_Messages; +} + +export interface messages_getDialogs { + _: "messages.getDialogs"; + exclude_pinned?: true; + folder_id?: number; + offset_date: number; + offset_id: number; + offset_peer: InputPeer; + limit: number; + hash: bigint; + [R]?: messages_Dialogs; +} + +export interface messages_getHistory { + _: "messages.getHistory"; + peer: InputPeer; + offset_id: number; + offset_date: number; + add_offset: number; + limit: number; + max_id: number; + min_id: number; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_search { + _: "messages.search"; + peer: InputPeer; + q: string; + from_id?: InputPeer; + saved_peer_id?: InputPeer; + saved_reaction?: Array; + top_msg_id?: number; + filter: MessagesFilter; + min_date: number; + max_date: number; + offset_id: number; + add_offset: number; + limit: number; + max_id: number; + min_id: number; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_readHistory { + _: "messages.readHistory"; + peer: InputPeer; + max_id: number; + [R]?: messages_AffectedMessages; +} + +export interface messages_deleteHistory { + _: "messages.deleteHistory"; + just_clear?: true; + revoke?: true; + peer: InputPeer; + max_id: number; + min_date?: number; + max_date?: number; + [R]?: messages_AffectedHistory; +} + +export interface messages_deleteMessages { + _: "messages.deleteMessages"; + revoke?: true; + id: Array; + [R]?: messages_AffectedMessages; +} + +export interface messages_receivedMessages { + _: "messages.receivedMessages"; + max_id: number; + [R]?: Array; +} + +export interface messages_setTyping { + _: "messages.setTyping"; + peer: InputPeer; + top_msg_id?: number; + action: SendMessageAction; + [R]?: boolean; +} + +export interface messages_sendMessage { + _: "messages.sendMessage"; + no_webpage?: true; + silent?: true; + background?: true; + clear_draft?: true; + noforwards?: true; + update_stickersets_order?: true; + invert_media?: true; + peer: InputPeer; + reply_to?: InputReplyTo; + message: string; + random_id: bigint; + reply_markup?: ReplyMarkup; + entities?: Array; + schedule_date?: number; + send_as?: InputPeer; + quick_reply_shortcut?: InputQuickReplyShortcut; + [R]?: Updates; +} + +export interface messages_sendMedia { + _: "messages.sendMedia"; + silent?: true; + background?: true; + clear_draft?: true; + noforwards?: true; + update_stickersets_order?: true; + invert_media?: true; + peer: InputPeer; + reply_to?: InputReplyTo; + media: InputMedia; + message: string; + random_id: bigint; + reply_markup?: ReplyMarkup; + entities?: Array; + schedule_date?: number; + send_as?: InputPeer; + quick_reply_shortcut?: InputQuickReplyShortcut; + [R]?: Updates; +} + +export interface messages_forwardMessages { + _: "messages.forwardMessages"; + silent?: true; + background?: true; + with_my_score?: true; + drop_author?: true; + drop_media_captions?: true; + noforwards?: true; + from_peer: InputPeer; + id: Array; + random_id: Array; + to_peer: InputPeer; + top_msg_id?: number; + schedule_date?: number; + send_as?: InputPeer; + quick_reply_shortcut?: InputQuickReplyShortcut; + [R]?: Updates; +} + +export interface messages_reportSpam { + _: "messages.reportSpam"; + peer: InputPeer; + [R]?: boolean; +} + +export interface messages_getPeerSettings { + _: "messages.getPeerSettings"; + peer: InputPeer; + [R]?: messages_PeerSettings; +} + +export interface messages_report { + _: "messages.report"; + peer: InputPeer; + id: Array; + reason: ReportReason; + message: string; + [R]?: boolean; +} + +export interface messages_getChats { + _: "messages.getChats"; + id: Array; + [R]?: messages_Chats; +} + +export interface messages_getFullChat { + _: "messages.getFullChat"; + chat_id: bigint; + [R]?: messages_ChatFull; +} + +export interface messages_editChatTitle { + _: "messages.editChatTitle"; + chat_id: bigint; + title: string; + [R]?: Updates; +} + +export interface messages_editChatPhoto { + _: "messages.editChatPhoto"; + chat_id: bigint; + photo: InputChatPhoto; + [R]?: Updates; +} + +export interface messages_addChatUser { + _: "messages.addChatUser"; + chat_id: bigint; + user_id: InputUser; + fwd_limit: number; + [R]?: messages_InvitedUsers; +} + +export interface messages_deleteChatUser { + _: "messages.deleteChatUser"; + revoke_history?: true; + chat_id: bigint; + user_id: InputUser; + [R]?: Updates; +} + +export interface messages_createChat { + _: "messages.createChat"; + users: Array; + title: string; + ttl_period?: number; + [R]?: messages_InvitedUsers; +} + +export interface messages_getDhConfig { + _: "messages.getDhConfig"; + version: number; + random_length: number; + [R]?: messages_DhConfig; +} + +export interface messages_requestEncryption { + _: "messages.requestEncryption"; + user_id: InputUser; + random_id: number; + g_a: Uint8Array; + [R]?: EncryptedChat; +} + +export interface messages_acceptEncryption { + _: "messages.acceptEncryption"; + peer: InputEncryptedChat; + g_b: Uint8Array; + key_fingerprint: bigint; + [R]?: EncryptedChat; +} + +export interface messages_discardEncryption { + _: "messages.discardEncryption"; + delete_history?: true; + chat_id: number; + [R]?: boolean; +} + +export interface messages_setEncryptedTyping { + _: "messages.setEncryptedTyping"; + peer: InputEncryptedChat; + typing: boolean; + [R]?: boolean; +} + +export interface messages_readEncryptedHistory { + _: "messages.readEncryptedHistory"; + peer: InputEncryptedChat; + max_date: number; + [R]?: boolean; +} + +export interface messages_sendEncrypted { + _: "messages.sendEncrypted"; + silent?: true; + peer: InputEncryptedChat; + random_id: bigint; + data: Uint8Array; + [R]?: messages_SentEncryptedMessage; +} + +export interface messages_sendEncryptedFile { + _: "messages.sendEncryptedFile"; + silent?: true; + peer: InputEncryptedChat; + random_id: bigint; + data: Uint8Array; + file: InputEncryptedFile; + [R]?: messages_SentEncryptedMessage; +} + +export interface messages_sendEncryptedService { + _: "messages.sendEncryptedService"; + peer: InputEncryptedChat; + random_id: bigint; + data: Uint8Array; + [R]?: messages_SentEncryptedMessage; +} + +export interface messages_receivedQueue { + _: "messages.receivedQueue"; + max_qts: number; + [R]?: Array; +} + +export interface messages_reportEncryptedSpam { + _: "messages.reportEncryptedSpam"; + peer: InputEncryptedChat; + [R]?: boolean; +} + +export interface messages_readMessageContents { + _: "messages.readMessageContents"; + id: Array; + [R]?: messages_AffectedMessages; +} + +export interface messages_getStickers { + _: "messages.getStickers"; + emoticon: string; + hash: bigint; + [R]?: messages_Stickers; +} + +export interface messages_getAllStickers { + _: "messages.getAllStickers"; + hash: bigint; + [R]?: messages_AllStickers; +} + +export interface messages_getWebPagePreview { + _: "messages.getWebPagePreview"; + message: string; + entities?: Array; + [R]?: MessageMedia; +} + +export interface messages_exportChatInvite { + _: "messages.exportChatInvite"; + legacy_revoke_permanent?: true; + request_needed?: true; + peer: InputPeer; + expire_date?: number; + usage_limit?: number; + title?: string; + [R]?: ExportedChatInvite; +} + +export interface messages_checkChatInvite { + _: "messages.checkChatInvite"; + hash: string; + [R]?: ChatInvite; +} + +export interface messages_importChatInvite { + _: "messages.importChatInvite"; + hash: string; + [R]?: Updates; +} + +export interface messages_getStickerSet { + _: "messages.getStickerSet"; + stickerset: InputStickerSet; + hash: number; + [R]?: messages_StickerSet; +} + +export interface messages_installStickerSet { + _: "messages.installStickerSet"; + stickerset: InputStickerSet; + archived: boolean; + [R]?: messages_StickerSetInstallResult; +} + +export interface messages_uninstallStickerSet { + _: "messages.uninstallStickerSet"; + stickerset: InputStickerSet; + [R]?: boolean; +} + +export interface messages_startBot { + _: "messages.startBot"; + bot: InputUser; + peer: InputPeer; + random_id: bigint; + start_param: string; + [R]?: Updates; +} + +export interface messages_getMessagesViews { + _: "messages.getMessagesViews"; + peer: InputPeer; + id: Array; + increment: boolean; + [R]?: messages_MessageViews; +} + +export interface messages_editChatAdmin { + _: "messages.editChatAdmin"; + chat_id: bigint; + user_id: InputUser; + is_admin: boolean; + [R]?: boolean; +} + +export interface messages_migrateChat { + _: "messages.migrateChat"; + chat_id: bigint; + [R]?: Updates; +} + +export interface messages_searchGlobal { + _: "messages.searchGlobal"; + folder_id?: number; + q: string; + filter: MessagesFilter; + min_date: number; + max_date: number; + offset_rate: number; + offset_peer: InputPeer; + offset_id: number; + limit: number; + [R]?: messages_Messages; +} + +export interface messages_reorderStickerSets { + _: "messages.reorderStickerSets"; + masks?: true; + emojis?: true; + order: Array; + [R]?: boolean; +} + +export interface messages_getDocumentByHash { + _: "messages.getDocumentByHash"; + sha256: Uint8Array; + size: bigint; + mime_type: string; + [R]?: Document; +} + +export interface messages_getSavedGifs { + _: "messages.getSavedGifs"; + hash: bigint; + [R]?: messages_SavedGifs; +} + +export interface messages_saveGif { + _: "messages.saveGif"; + id: InputDocument; + unsave: boolean; + [R]?: boolean; +} + +export interface messages_getInlineBotResults { + _: "messages.getInlineBotResults"; + bot: InputUser; + peer: InputPeer; + geo_point?: InputGeoPoint; + query: string; + offset: string; + [R]?: messages_BotResults; +} + +export interface messages_setInlineBotResults { + _: "messages.setInlineBotResults"; + gallery?: true; + private?: true; + query_id: bigint; + results: Array; + cache_time: number; + next_offset?: string; + switch_pm?: InlineBotSwitchPM; + switch_webview?: InlineBotWebView; + [R]?: boolean; +} + +export interface messages_sendInlineBotResult { + _: "messages.sendInlineBotResult"; + silent?: true; + background?: true; + clear_draft?: true; + hide_via?: true; + peer: InputPeer; + reply_to?: InputReplyTo; + random_id: bigint; + query_id: bigint; + id: string; + schedule_date?: number; + send_as?: InputPeer; + quick_reply_shortcut?: InputQuickReplyShortcut; + [R]?: Updates; +} + +export interface messages_getMessageEditData { + _: "messages.getMessageEditData"; + peer: InputPeer; + id: number; + [R]?: messages_MessageEditData; +} + +export interface messages_editMessage { + _: "messages.editMessage"; + no_webpage?: true; + invert_media?: true; + peer: InputPeer; + id: number; + message?: string; + media?: InputMedia; + reply_markup?: ReplyMarkup; + entities?: Array; + schedule_date?: number; + quick_reply_shortcut_id?: number; + [R]?: Updates; +} + +export interface messages_editInlineBotMessage { + _: "messages.editInlineBotMessage"; + no_webpage?: true; + invert_media?: true; + id: InputBotInlineMessageID; + message?: string; + media?: InputMedia; + reply_markup?: ReplyMarkup; + entities?: Array; + [R]?: boolean; +} + +export interface messages_getBotCallbackAnswer { + _: "messages.getBotCallbackAnswer"; + game?: true; + peer: InputPeer; + msg_id: number; + data?: Uint8Array; + password?: InputCheckPasswordSRP; + [R]?: messages_BotCallbackAnswer; +} + +export interface messages_setBotCallbackAnswer { + _: "messages.setBotCallbackAnswer"; + alert?: true; + query_id: bigint; + message?: string; + url?: string; + cache_time: number; + [R]?: boolean; +} + +export interface messages_getPeerDialogs { + _: "messages.getPeerDialogs"; + peers: Array; + [R]?: messages_PeerDialogs; +} + +export interface messages_saveDraft { + _: "messages.saveDraft"; + no_webpage?: true; + invert_media?: true; + reply_to?: InputReplyTo; + peer: InputPeer; + message: string; + entities?: Array; + media?: InputMedia; + [R]?: boolean; +} + +export interface messages_getAllDrafts { + _: "messages.getAllDrafts"; + [R]?: Updates; +} + +export interface messages_getFeaturedStickers { + _: "messages.getFeaturedStickers"; + hash: bigint; + [R]?: messages_FeaturedStickers; +} + +export interface messages_readFeaturedStickers { + _: "messages.readFeaturedStickers"; + id: Array; + [R]?: boolean; +} + +export interface messages_getRecentStickers { + _: "messages.getRecentStickers"; + attached?: true; + hash: bigint; + [R]?: messages_RecentStickers; +} + +export interface messages_saveRecentSticker { + _: "messages.saveRecentSticker"; + attached?: true; + id: InputDocument; + unsave: boolean; + [R]?: boolean; +} + +export interface messages_clearRecentStickers { + _: "messages.clearRecentStickers"; + attached?: true; + [R]?: boolean; +} + +export interface messages_getArchivedStickers { + _: "messages.getArchivedStickers"; + masks?: true; + emojis?: true; + offset_id: bigint; + limit: number; + [R]?: messages_ArchivedStickers; +} + +export interface messages_getMaskStickers { + _: "messages.getMaskStickers"; + hash: bigint; + [R]?: messages_AllStickers; +} + +export interface messages_getAttachedStickers { + _: "messages.getAttachedStickers"; + media: InputStickeredMedia; + [R]?: Array; +} + +export interface messages_setGameScore { + _: "messages.setGameScore"; + edit_message?: true; + force?: true; + peer: InputPeer; + id: number; + user_id: InputUser; + score: number; + [R]?: Updates; +} + +export interface messages_setInlineGameScore { + _: "messages.setInlineGameScore"; + edit_message?: true; + force?: true; + id: InputBotInlineMessageID; + user_id: InputUser; + score: number; + [R]?: boolean; +} + +export interface messages_getGameHighScores { + _: "messages.getGameHighScores"; + peer: InputPeer; + id: number; + user_id: InputUser; + [R]?: messages_HighScores; +} + +export interface messages_getInlineGameHighScores { + _: "messages.getInlineGameHighScores"; + id: InputBotInlineMessageID; + user_id: InputUser; + [R]?: messages_HighScores; +} + +export interface messages_getCommonChats { + _: "messages.getCommonChats"; + user_id: InputUser; + max_id: bigint; + limit: number; + [R]?: messages_Chats; +} + +export interface messages_getWebPage { + _: "messages.getWebPage"; + url: string; + hash: number; + [R]?: messages_WebPage; +} + +export interface messages_toggleDialogPin { + _: "messages.toggleDialogPin"; + pinned?: true; + peer: InputDialogPeer; + [R]?: boolean; +} + +export interface messages_reorderPinnedDialogs { + _: "messages.reorderPinnedDialogs"; + force?: true; + folder_id: number; + order: Array; + [R]?: boolean; +} + +export interface messages_getPinnedDialogs { + _: "messages.getPinnedDialogs"; + folder_id: number; + [R]?: messages_PeerDialogs; +} + +export interface messages_setBotShippingResults { + _: "messages.setBotShippingResults"; + query_id: bigint; + error?: string; + shipping_options?: Array; + [R]?: boolean; +} + +export interface messages_setBotPrecheckoutResults { + _: "messages.setBotPrecheckoutResults"; + success?: true; + query_id: bigint; + error?: string; + [R]?: boolean; +} + +export interface messages_uploadMedia { + _: "messages.uploadMedia"; + business_connection_id?: string; + peer: InputPeer; + media: InputMedia; + [R]?: MessageMedia; +} + +export interface messages_sendScreenshotNotification { + _: "messages.sendScreenshotNotification"; + peer: InputPeer; + reply_to: InputReplyTo; + random_id: bigint; + [R]?: Updates; +} + +export interface messages_getFavedStickers { + _: "messages.getFavedStickers"; + hash: bigint; + [R]?: messages_FavedStickers; +} + +export interface messages_faveSticker { + _: "messages.faveSticker"; + id: InputDocument; + unfave: boolean; + [R]?: boolean; +} + +export interface messages_getUnreadMentions { + _: "messages.getUnreadMentions"; + peer: InputPeer; + top_msg_id?: number; + offset_id: number; + add_offset: number; + limit: number; + max_id: number; + min_id: number; + [R]?: messages_Messages; +} + +export interface messages_readMentions { + _: "messages.readMentions"; + peer: InputPeer; + top_msg_id?: number; + [R]?: messages_AffectedHistory; +} + +export interface messages_getRecentLocations { + _: "messages.getRecentLocations"; + peer: InputPeer; + limit: number; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_sendMultiMedia { + _: "messages.sendMultiMedia"; + silent?: true; + background?: true; + clear_draft?: true; + noforwards?: true; + update_stickersets_order?: true; + invert_media?: true; + peer: InputPeer; + reply_to?: InputReplyTo; + multi_media: Array; + schedule_date?: number; + send_as?: InputPeer; + quick_reply_shortcut?: InputQuickReplyShortcut; + [R]?: Updates; +} + +export interface messages_uploadEncryptedFile { + _: "messages.uploadEncryptedFile"; + peer: InputEncryptedChat; + file: InputEncryptedFile; + [R]?: EncryptedFile; +} + +export interface messages_searchStickerSets { + _: "messages.searchStickerSets"; + exclude_featured?: true; + q: string; + hash: bigint; + [R]?: messages_FoundStickerSets; +} + +export interface messages_getSplitRanges { + _: "messages.getSplitRanges"; + [R]?: Array; +} + +export interface messages_markDialogUnread { + _: "messages.markDialogUnread"; + unread?: true; + peer: InputDialogPeer; + [R]?: boolean; +} + +export interface messages_getDialogUnreadMarks { + _: "messages.getDialogUnreadMarks"; + [R]?: Array; +} + +export interface messages_clearAllDrafts { + _: "messages.clearAllDrafts"; + [R]?: boolean; +} + +export interface messages_updatePinnedMessage { + _: "messages.updatePinnedMessage"; + silent?: true; + unpin?: true; + pm_oneside?: true; + peer: InputPeer; + id: number; + [R]?: Updates; +} + +export interface messages_sendVote { + _: "messages.sendVote"; + peer: InputPeer; + msg_id: number; + options: Array; + [R]?: Updates; +} + +export interface messages_getPollResults { + _: "messages.getPollResults"; + peer: InputPeer; + msg_id: number; + [R]?: Updates; +} + +export interface messages_getOnlines { + _: "messages.getOnlines"; + peer: InputPeer; + [R]?: ChatOnlines; +} + +export interface messages_editChatAbout { + _: "messages.editChatAbout"; + peer: InputPeer; + about: string; + [R]?: boolean; +} + +export interface messages_editChatDefaultBannedRights { + _: "messages.editChatDefaultBannedRights"; + peer: InputPeer; + banned_rights: ChatBannedRights; + [R]?: Updates; +} + +export interface messages_getEmojiKeywords { + _: "messages.getEmojiKeywords"; + lang_code: string; + [R]?: EmojiKeywordsDifference; +} + +export interface messages_getEmojiKeywordsDifference { + _: "messages.getEmojiKeywordsDifference"; + lang_code: string; + from_version: number; + [R]?: EmojiKeywordsDifference; +} + +export interface messages_getEmojiKeywordsLanguages { + _: "messages.getEmojiKeywordsLanguages"; + lang_codes: Array; + [R]?: Array; +} + +export interface messages_getEmojiURL { + _: "messages.getEmojiURL"; + lang_code: string; + [R]?: EmojiURL; +} + +export interface messages_getSearchCounters { + _: "messages.getSearchCounters"; + peer: InputPeer; + saved_peer_id?: InputPeer; + top_msg_id?: number; + filters: Array; + [R]?: Array; +} + +export interface messages_requestUrlAuth { + _: "messages.requestUrlAuth"; + peer?: InputPeer; + msg_id?: number; + button_id?: number; + url?: string; + [R]?: UrlAuthResult; +} + +export interface messages_acceptUrlAuth { + _: "messages.acceptUrlAuth"; + write_allowed?: true; + peer?: InputPeer; + msg_id?: number; + button_id?: number; + url?: string; + [R]?: UrlAuthResult; +} + +export interface messages_hidePeerSettingsBar { + _: "messages.hidePeerSettingsBar"; + peer: InputPeer; + [R]?: boolean; +} + +export interface messages_getScheduledHistory { + _: "messages.getScheduledHistory"; + peer: InputPeer; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_getScheduledMessages { + _: "messages.getScheduledMessages"; + peer: InputPeer; + id: Array; + [R]?: messages_Messages; +} + +export interface messages_sendScheduledMessages { + _: "messages.sendScheduledMessages"; + peer: InputPeer; + id: Array; + [R]?: Updates; +} + +export interface messages_deleteScheduledMessages { + _: "messages.deleteScheduledMessages"; + peer: InputPeer; + id: Array; + [R]?: Updates; +} + +export interface messages_getPollVotes { + _: "messages.getPollVotes"; + peer: InputPeer; + id: number; + option?: Uint8Array; + offset?: string; + limit: number; + [R]?: messages_VotesList; +} + +export interface messages_toggleStickerSets { + _: "messages.toggleStickerSets"; + uninstall?: true; + archive?: true; + unarchive?: true; + stickersets: Array; + [R]?: boolean; +} + +export interface messages_getDialogFilters { + _: "messages.getDialogFilters"; + [R]?: messages_DialogFilters; +} + +export interface messages_getSuggestedDialogFilters { + _: "messages.getSuggestedDialogFilters"; + [R]?: Array; +} + +export interface messages_updateDialogFilter { + _: "messages.updateDialogFilter"; + id: number; + filter?: DialogFilter; + [R]?: boolean; +} + +export interface messages_updateDialogFiltersOrder { + _: "messages.updateDialogFiltersOrder"; + order: Array; + [R]?: boolean; +} + +export interface messages_getOldFeaturedStickers { + _: "messages.getOldFeaturedStickers"; + offset: number; + limit: number; + hash: bigint; + [R]?: messages_FeaturedStickers; +} + +export interface messages_getReplies { + _: "messages.getReplies"; + peer: InputPeer; + msg_id: number; + offset_id: number; + offset_date: number; + add_offset: number; + limit: number; + max_id: number; + min_id: number; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_getDiscussionMessage { + _: "messages.getDiscussionMessage"; + peer: InputPeer; + msg_id: number; + [R]?: messages_DiscussionMessage; +} + +export interface messages_readDiscussion { + _: "messages.readDiscussion"; + peer: InputPeer; + msg_id: number; + read_max_id: number; + [R]?: boolean; +} + +export interface messages_unpinAllMessages { + _: "messages.unpinAllMessages"; + peer: InputPeer; + top_msg_id?: number; + [R]?: messages_AffectedHistory; +} + +export interface messages_deleteChat { + _: "messages.deleteChat"; + chat_id: bigint; + [R]?: boolean; +} + +export interface messages_deletePhoneCallHistory { + _: "messages.deletePhoneCallHistory"; + revoke?: true; + [R]?: messages_AffectedFoundMessages; +} + +export interface messages_checkHistoryImport { + _: "messages.checkHistoryImport"; + import_head: string; + [R]?: messages_HistoryImportParsed; +} + +export interface messages_initHistoryImport { + _: "messages.initHistoryImport"; + peer: InputPeer; + file: InputFile; + media_count: number; + [R]?: messages_HistoryImport; +} + +export interface messages_uploadImportedMedia { + _: "messages.uploadImportedMedia"; + peer: InputPeer; + import_id: bigint; + file_name: string; + media: InputMedia; + [R]?: MessageMedia; +} + +export interface messages_startHistoryImport { + _: "messages.startHistoryImport"; + peer: InputPeer; + import_id: bigint; + [R]?: boolean; +} + +export interface messages_getExportedChatInvites { + _: "messages.getExportedChatInvites"; + revoked?: true; + peer: InputPeer; + admin_id: InputUser; + offset_date?: number; + offset_link?: string; + limit: number; + [R]?: messages_ExportedChatInvites; +} + +export interface messages_getExportedChatInvite { + _: "messages.getExportedChatInvite"; + peer: InputPeer; + link: string; + [R]?: messages_ExportedChatInvite; +} + +export interface messages_editExportedChatInvite { + _: "messages.editExportedChatInvite"; + revoked?: true; + peer: InputPeer; + link: string; + expire_date?: number; + usage_limit?: number; + request_needed?: boolean; + title?: string; + [R]?: messages_ExportedChatInvite; +} + +export interface messages_deleteRevokedExportedChatInvites { + _: "messages.deleteRevokedExportedChatInvites"; + peer: InputPeer; + admin_id: InputUser; + [R]?: boolean; +} + +export interface messages_deleteExportedChatInvite { + _: "messages.deleteExportedChatInvite"; + peer: InputPeer; + link: string; + [R]?: boolean; +} + +export interface messages_getAdminsWithInvites { + _: "messages.getAdminsWithInvites"; + peer: InputPeer; + [R]?: messages_ChatAdminsWithInvites; +} + +export interface messages_getChatInviteImporters { + _: "messages.getChatInviteImporters"; + requested?: true; + peer: InputPeer; + link?: string; + q?: string; + offset_date: number; + offset_user: InputUser; + limit: number; + [R]?: messages_ChatInviteImporters; +} + +export interface messages_setHistoryTTL { + _: "messages.setHistoryTTL"; + peer: InputPeer; + period: number; + [R]?: Updates; +} + +export interface messages_checkHistoryImportPeer { + _: "messages.checkHistoryImportPeer"; + peer: InputPeer; + [R]?: messages_CheckedHistoryImportPeer; +} + +export interface messages_setChatTheme { + _: "messages.setChatTheme"; + peer: InputPeer; + emoticon: string; + [R]?: Updates; +} + +export interface messages_getMessageReadParticipants { + _: "messages.getMessageReadParticipants"; + peer: InputPeer; + msg_id: number; + [R]?: Array; +} + +export interface messages_getSearchResultsCalendar { + _: "messages.getSearchResultsCalendar"; + peer: InputPeer; + saved_peer_id?: InputPeer; + filter: MessagesFilter; + offset_id: number; + offset_date: number; + [R]?: messages_SearchResultsCalendar; +} + +export interface messages_getSearchResultsPositions { + _: "messages.getSearchResultsPositions"; + peer: InputPeer; + saved_peer_id?: InputPeer; + filter: MessagesFilter; + offset_id: number; + limit: number; + [R]?: messages_SearchResultsPositions; +} + +export interface messages_hideChatJoinRequest { + _: "messages.hideChatJoinRequest"; + approved?: true; + peer: InputPeer; + user_id: InputUser; + [R]?: Updates; +} + +export interface messages_hideAllChatJoinRequests { + _: "messages.hideAllChatJoinRequests"; + approved?: true; + peer: InputPeer; + link?: string; + [R]?: Updates; +} + +export interface messages_toggleNoForwards { + _: "messages.toggleNoForwards"; + peer: InputPeer; + enabled: boolean; + [R]?: Updates; +} + +export interface messages_saveDefaultSendAs { + _: "messages.saveDefaultSendAs"; + peer: InputPeer; + send_as: InputPeer; + [R]?: boolean; +} + +export interface messages_sendReaction { + _: "messages.sendReaction"; + big?: true; + add_to_recent?: true; + peer: InputPeer; + msg_id: number; + reaction?: Array; + [R]?: Updates; +} + +export interface messages_getMessagesReactions { + _: "messages.getMessagesReactions"; + peer: InputPeer; + id: Array; + [R]?: Updates; +} + +export interface messages_getMessageReactionsList { + _: "messages.getMessageReactionsList"; + peer: InputPeer; + id: number; + reaction?: Reaction; + offset?: string; + limit: number; + [R]?: messages_MessageReactionsList; +} + +export interface messages_setChatAvailableReactions { + _: "messages.setChatAvailableReactions"; + peer: InputPeer; + available_reactions: ChatReactions; + [R]?: Updates; +} + +export interface messages_getAvailableReactions { + _: "messages.getAvailableReactions"; + hash: number; + [R]?: messages_AvailableReactions; +} + +export interface messages_setDefaultReaction { + _: "messages.setDefaultReaction"; + reaction: Reaction; + [R]?: boolean; +} + +export interface messages_translateText { + _: "messages.translateText"; + peer?: InputPeer; + id?: Array; + text?: Array; + to_lang: string; + [R]?: messages_TranslatedText; +} + +export interface messages_getUnreadReactions { + _: "messages.getUnreadReactions"; + peer: InputPeer; + top_msg_id?: number; + offset_id: number; + add_offset: number; + limit: number; + max_id: number; + min_id: number; + [R]?: messages_Messages; +} + +export interface messages_readReactions { + _: "messages.readReactions"; + peer: InputPeer; + top_msg_id?: number; + [R]?: messages_AffectedHistory; +} + +export interface messages_searchSentMedia { + _: "messages.searchSentMedia"; + q: string; + filter: MessagesFilter; + limit: number; + [R]?: messages_Messages; +} + +export interface messages_getAttachMenuBots { + _: "messages.getAttachMenuBots"; + hash: bigint; + [R]?: AttachMenuBots; +} + +export interface messages_getAttachMenuBot { + _: "messages.getAttachMenuBot"; + bot: InputUser; + [R]?: AttachMenuBotsBot; +} + +export interface messages_toggleBotInAttachMenu { + _: "messages.toggleBotInAttachMenu"; + write_allowed?: true; + bot: InputUser; + enabled: boolean; + [R]?: boolean; +} + +export interface messages_requestWebView { + _: "messages.requestWebView"; + from_bot_menu?: true; + silent?: true; + peer: InputPeer; + bot: InputUser; + url?: string; + start_param?: string; + theme_params?: DataJSON; + platform: string; + reply_to?: InputReplyTo; + send_as?: InputPeer; + [R]?: WebViewResult; +} + +export interface messages_prolongWebView { + _: "messages.prolongWebView"; + silent?: true; + peer: InputPeer; + bot: InputUser; + query_id: bigint; + reply_to?: InputReplyTo; + send_as?: InputPeer; + [R]?: boolean; +} + +export interface messages_requestSimpleWebView { + _: "messages.requestSimpleWebView"; + from_switch_webview?: true; + from_side_menu?: true; + bot: InputUser; + url?: string; + start_param?: string; + theme_params?: DataJSON; + platform: string; + [R]?: SimpleWebViewResult; +} + +export interface messages_sendWebViewResultMessage { + _: "messages.sendWebViewResultMessage"; + bot_query_id: string; + result: InputBotInlineResult; + [R]?: WebViewMessageSent; +} + +export interface messages_sendWebViewData { + _: "messages.sendWebViewData"; + bot: InputUser; + random_id: bigint; + button_text: string; + data: string; + [R]?: Updates; +} + +export interface messages_transcribeAudio { + _: "messages.transcribeAudio"; + peer: InputPeer; + msg_id: number; + [R]?: messages_TranscribedAudio; +} + +export interface messages_rateTranscribedAudio { + _: "messages.rateTranscribedAudio"; + peer: InputPeer; + msg_id: number; + transcription_id: bigint; + good: boolean; + [R]?: boolean; +} + +export interface messages_getCustomEmojiDocuments { + _: "messages.getCustomEmojiDocuments"; + document_id: Array; + [R]?: Array; +} + +export interface messages_getEmojiStickers { + _: "messages.getEmojiStickers"; + hash: bigint; + [R]?: messages_AllStickers; +} + +export interface messages_getFeaturedEmojiStickers { + _: "messages.getFeaturedEmojiStickers"; + hash: bigint; + [R]?: messages_FeaturedStickers; +} + +export interface messages_reportReaction { + _: "messages.reportReaction"; + peer: InputPeer; + id: number; + reaction_peer: InputPeer; + [R]?: boolean; +} + +export interface messages_getTopReactions { + _: "messages.getTopReactions"; + limit: number; + hash: bigint; + [R]?: messages_Reactions; +} + +export interface messages_getRecentReactions { + _: "messages.getRecentReactions"; + limit: number; + hash: bigint; + [R]?: messages_Reactions; +} + +export interface messages_clearRecentReactions { + _: "messages.clearRecentReactions"; + [R]?: boolean; +} + +export interface messages_getExtendedMedia { + _: "messages.getExtendedMedia"; + peer: InputPeer; + id: Array; + [R]?: Updates; +} + +export interface messages_setDefaultHistoryTTL { + _: "messages.setDefaultHistoryTTL"; + period: number; + [R]?: boolean; +} + +export interface messages_getDefaultHistoryTTL { + _: "messages.getDefaultHistoryTTL"; + [R]?: DefaultHistoryTTL; +} + +export interface messages_sendBotRequestedPeer { + _: "messages.sendBotRequestedPeer"; + peer: InputPeer; + msg_id: number; + button_id: number; + requested_peers: Array; + [R]?: Updates; +} + +export interface messages_getEmojiGroups { + _: "messages.getEmojiGroups"; + hash: number; + [R]?: messages_EmojiGroups; +} + +export interface messages_getEmojiStatusGroups { + _: "messages.getEmojiStatusGroups"; + hash: number; + [R]?: messages_EmojiGroups; +} + +export interface messages_getEmojiProfilePhotoGroups { + _: "messages.getEmojiProfilePhotoGroups"; + hash: number; + [R]?: messages_EmojiGroups; +} + +export interface messages_searchCustomEmoji { + _: "messages.searchCustomEmoji"; + emoticon: string; + hash: bigint; + [R]?: EmojiList; +} + +export interface messages_togglePeerTranslations { + _: "messages.togglePeerTranslations"; + disabled?: true; + peer: InputPeer; + [R]?: boolean; +} + +export interface messages_getBotApp { + _: "messages.getBotApp"; + app: InputBotApp; + hash: bigint; + [R]?: messages_BotApp; +} + +export interface messages_requestAppWebView { + _: "messages.requestAppWebView"; + write_allowed?: true; + peer: InputPeer; + app: InputBotApp; + start_param?: string; + theme_params?: DataJSON; + platform: string; + [R]?: AppWebViewResult; +} + +export interface messages_setChatWallPaper { + _: "messages.setChatWallPaper"; + for_both?: true; + revert?: true; + peer: InputPeer; + wallpaper?: InputWallPaper; + settings?: WallPaperSettings; + id?: number; + [R]?: Updates; +} + +export interface messages_searchEmojiStickerSets { + _: "messages.searchEmojiStickerSets"; + exclude_featured?: true; + q: string; + hash: bigint; + [R]?: messages_FoundStickerSets; +} + +export interface messages_getSavedDialogs { + _: "messages.getSavedDialogs"; + exclude_pinned?: true; + offset_date: number; + offset_id: number; + offset_peer: InputPeer; + limit: number; + hash: bigint; + [R]?: messages_SavedDialogs; +} + +export interface messages_getSavedHistory { + _: "messages.getSavedHistory"; + peer: InputPeer; + offset_id: number; + offset_date: number; + add_offset: number; + limit: number; + max_id: number; + min_id: number; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_deleteSavedHistory { + _: "messages.deleteSavedHistory"; + peer: InputPeer; + max_id: number; + min_date?: number; + max_date?: number; + [R]?: messages_AffectedHistory; +} + +export interface messages_getPinnedSavedDialogs { + _: "messages.getPinnedSavedDialogs"; + [R]?: messages_SavedDialogs; +} + +export interface messages_toggleSavedDialogPin { + _: "messages.toggleSavedDialogPin"; + pinned?: true; + peer: InputDialogPeer; + [R]?: boolean; +} + +export interface messages_reorderPinnedSavedDialogs { + _: "messages.reorderPinnedSavedDialogs"; + force?: true; + order: Array; + [R]?: boolean; +} + +export interface messages_getSavedReactionTags { + _: "messages.getSavedReactionTags"; + peer?: InputPeer; + hash: bigint; + [R]?: messages_SavedReactionTags; +} + +export interface messages_updateSavedReactionTag { + _: "messages.updateSavedReactionTag"; + reaction: Reaction; + title?: string; + [R]?: boolean; +} + +export interface messages_getDefaultTagReactions { + _: "messages.getDefaultTagReactions"; + hash: bigint; + [R]?: messages_Reactions; +} + +export interface messages_getOutboxReadDate { + _: "messages.getOutboxReadDate"; + peer: InputPeer; + msg_id: number; + [R]?: OutboxReadDate; +} + +export interface messages_getQuickReplies { + _: "messages.getQuickReplies"; + hash: bigint; + [R]?: messages_QuickReplies; +} + +export interface messages_reorderQuickReplies { + _: "messages.reorderQuickReplies"; + order: Array; + [R]?: boolean; +} + +export interface messages_checkQuickReplyShortcut { + _: "messages.checkQuickReplyShortcut"; + shortcut: string; + [R]?: boolean; +} + +export interface messages_editQuickReplyShortcut { + _: "messages.editQuickReplyShortcut"; + shortcut_id: number; + shortcut: string; + [R]?: boolean; +} + +export interface messages_deleteQuickReplyShortcut { + _: "messages.deleteQuickReplyShortcut"; + shortcut_id: number; + [R]?: boolean; +} + +export interface messages_getQuickReplyMessages { + _: "messages.getQuickReplyMessages"; + shortcut_id: number; + id?: Array; + hash: bigint; + [R]?: messages_Messages; +} + +export interface messages_sendQuickReplyMessages { + _: "messages.sendQuickReplyMessages"; + peer: InputPeer; + shortcut_id: number; + id: Array; + random_id: Array; + [R]?: Updates; +} + +export interface messages_deleteQuickReplyMessages { + _: "messages.deleteQuickReplyMessages"; + shortcut_id: number; + id: Array; + [R]?: Updates; +} + +export interface messages_toggleDialogFilterTags { + _: "messages.toggleDialogFilterTags"; + enabled: boolean; + [R]?: boolean; +} + +export interface messages_getMyStickers { + _: "messages.getMyStickers"; + offset_id: bigint; + limit: number; + [R]?: messages_MyStickers; +} + +export interface updates_getState { + _: "updates.getState"; + [R]?: updates_State; +} + +export interface updates_getDifference { + _: "updates.getDifference"; + pts: number; + pts_limit?: number; + pts_total_limit?: number; + date: number; + qts: number; + qts_limit?: number; + [R]?: updates_Difference; +} + +export interface updates_getChannelDifference { + _: "updates.getChannelDifference"; + force?: true; + channel: InputChannel; + filter: ChannelMessagesFilter; + pts: number; + limit: number; + [R]?: updates_ChannelDifference; +} + +export interface photos_updateProfilePhoto { + _: "photos.updateProfilePhoto"; + fallback?: true; + bot?: InputUser; + id: InputPhoto; + [R]?: photos_Photo; +} + +export interface photos_uploadProfilePhoto { + _: "photos.uploadProfilePhoto"; + fallback?: true; + bot?: InputUser; + file?: InputFile; + video?: InputFile; + video_start_ts?: number; + video_emoji_markup?: VideoSize; + [R]?: photos_Photo; +} + +export interface photos_deletePhotos { + _: "photos.deletePhotos"; + id: Array; + [R]?: Array; +} + +export interface photos_getUserPhotos { + _: "photos.getUserPhotos"; + user_id: InputUser; + offset: number; + max_id: bigint; + limit: number; + [R]?: photos_Photos; +} + +export interface photos_uploadContactProfilePhoto { + _: "photos.uploadContactProfilePhoto"; + suggest?: true; + save?: true; + user_id: InputUser; + file?: InputFile; + video?: InputFile; + video_start_ts?: number; + video_emoji_markup?: VideoSize; + [R]?: photos_Photo; +} + +export interface upload_saveFilePart { + _: "upload.saveFilePart"; + file_id: bigint; + file_part: number; + bytes: Uint8Array; + [R]?: boolean; +} + +export interface upload_getFile { + _: "upload.getFile"; + precise?: true; + cdn_supported?: true; + location: InputFileLocation; + offset: bigint; + limit: number; + [R]?: upload_File; +} + +export interface upload_saveBigFilePart { + _: "upload.saveBigFilePart"; + file_id: bigint; + file_part: number; + file_total_parts: number; + bytes: Uint8Array; + [R]?: boolean; +} + +export interface upload_getWebFile { + _: "upload.getWebFile"; + location: InputWebFileLocation; + offset: number; + limit: number; + [R]?: upload_WebFile; +} + +export interface upload_getCdnFile { + _: "upload.getCdnFile"; + file_token: Uint8Array; + offset: bigint; + limit: number; + [R]?: upload_CdnFile; +} + +export interface upload_reuploadCdnFile { + _: "upload.reuploadCdnFile"; + file_token: Uint8Array; + request_token: Uint8Array; + [R]?: Array; +} + +export interface upload_getCdnFileHashes { + _: "upload.getCdnFileHashes"; + file_token: Uint8Array; + offset: bigint; + [R]?: Array; +} + +export interface upload_getFileHashes { + _: "upload.getFileHashes"; + location: InputFileLocation; + offset: bigint; + [R]?: Array; +} + +export interface help_getConfig { + _: "help.getConfig"; + [R]?: Config; +} + +export interface help_getNearestDc { + _: "help.getNearestDc"; + [R]?: NearestDc; +} + +export interface help_getAppUpdate { + _: "help.getAppUpdate"; + source: string; + [R]?: help_AppUpdate; +} + +export interface help_getInviteText { + _: "help.getInviteText"; + [R]?: help_InviteText; +} + +export interface help_getSupport { + _: "help.getSupport"; + [R]?: help_Support; +} + +export interface help_setBotUpdatesStatus { + _: "help.setBotUpdatesStatus"; + pending_updates_count: number; + message: string; + [R]?: boolean; +} + +export interface help_getCdnConfig { + _: "help.getCdnConfig"; + [R]?: CdnConfig; +} + +export interface help_getRecentMeUrls { + _: "help.getRecentMeUrls"; + referer: string; + [R]?: help_RecentMeUrls; +} + +export interface help_getTermsOfServiceUpdate { + _: "help.getTermsOfServiceUpdate"; + [R]?: help_TermsOfServiceUpdate; +} + +export interface help_acceptTermsOfService { + _: "help.acceptTermsOfService"; + id: DataJSON; + [R]?: boolean; +} + +export interface help_getDeepLinkInfo { + _: "help.getDeepLinkInfo"; + path: string; + [R]?: help_DeepLinkInfo; +} + +export interface help_getAppConfig { + _: "help.getAppConfig"; + hash: number; + [R]?: help_AppConfig; +} + +export interface help_saveAppLog { + _: "help.saveAppLog"; + events: Array; + [R]?: boolean; +} + +export interface help_getPassportConfig { + _: "help.getPassportConfig"; + hash: number; + [R]?: help_PassportConfig; +} + +export interface help_getSupportName { + _: "help.getSupportName"; + [R]?: help_SupportName; +} + +export interface help_getUserInfo { + _: "help.getUserInfo"; + user_id: InputUser; + [R]?: help_UserInfo; +} + +export interface help_editUserInfo { + _: "help.editUserInfo"; + user_id: InputUser; + message: string; + entities: Array; + [R]?: help_UserInfo; +} + +export interface help_getPromoData { + _: "help.getPromoData"; + [R]?: help_PromoData; +} + +export interface help_hidePromoData { + _: "help.hidePromoData"; + peer: InputPeer; + [R]?: boolean; +} + +export interface help_dismissSuggestion { + _: "help.dismissSuggestion"; + peer: InputPeer; + suggestion: string; + [R]?: boolean; +} + +export interface help_getCountriesList { + _: "help.getCountriesList"; + lang_code: string; + hash: number; + [R]?: help_CountriesList; +} + +export interface help_getPremiumPromo { + _: "help.getPremiumPromo"; + [R]?: help_PremiumPromo; +} + +export interface help_getPeerColors { + _: "help.getPeerColors"; + hash: number; + [R]?: help_PeerColors; +} + +export interface help_getPeerProfileColors { + _: "help.getPeerProfileColors"; + hash: number; + [R]?: help_PeerColors; +} + +export interface help_getTimezonesList { + _: "help.getTimezonesList"; + hash: number; + [R]?: help_TimezonesList; +} + +export interface channels_readHistory { + _: "channels.readHistory"; + channel: InputChannel; + max_id: number; + [R]?: boolean; +} + +export interface channels_deleteMessages { + _: "channels.deleteMessages"; + channel: InputChannel; + id: Array; + [R]?: messages_AffectedMessages; +} + +export interface channels_reportSpam { + _: "channels.reportSpam"; + channel: InputChannel; + participant: InputPeer; + id: Array; + [R]?: boolean; +} + +export interface channels_getMessages { + _: "channels.getMessages"; + channel: InputChannel; + id: Array; + [R]?: messages_Messages; +} + +export interface channels_getParticipants { + _: "channels.getParticipants"; + channel: InputChannel; + filter: ChannelParticipantsFilter; + offset: number; + limit: number; + hash: bigint; + [R]?: channels_ChannelParticipants; +} + +export interface channels_getParticipant { + _: "channels.getParticipant"; + channel: InputChannel; + participant: InputPeer; + [R]?: channels_ChannelParticipant; +} + +export interface channels_getChannels { + _: "channels.getChannels"; + id: Array; + [R]?: messages_Chats; +} + +export interface channels_getFullChannel { + _: "channels.getFullChannel"; + channel: InputChannel; + [R]?: messages_ChatFull; +} + +export interface channels_createChannel { + _: "channels.createChannel"; + broadcast?: true; + megagroup?: true; + for_import?: true; + forum?: true; + title: string; + about: string; + geo_point?: InputGeoPoint; + address?: string; + ttl_period?: number; + [R]?: Updates; +} + +export interface channels_editAdmin { + _: "channels.editAdmin"; + channel: InputChannel; + user_id: InputUser; + admin_rights: ChatAdminRights; + rank: string; + [R]?: Updates; +} + +export interface channels_editTitle { + _: "channels.editTitle"; + channel: InputChannel; + title: string; + [R]?: Updates; +} + +export interface channels_editPhoto { + _: "channels.editPhoto"; + channel: InputChannel; + photo: InputChatPhoto; + [R]?: Updates; +} + +export interface channels_checkUsername { + _: "channels.checkUsername"; + channel: InputChannel; + username: string; + [R]?: boolean; +} + +export interface channels_updateUsername { + _: "channels.updateUsername"; + channel: InputChannel; + username: string; + [R]?: boolean; +} + +export interface channels_joinChannel { + _: "channels.joinChannel"; + channel: InputChannel; + [R]?: Updates; +} + +export interface channels_leaveChannel { + _: "channels.leaveChannel"; + channel: InputChannel; + [R]?: Updates; +} + +export interface channels_inviteToChannel { + _: "channels.inviteToChannel"; + channel: InputChannel; + users: Array; + [R]?: messages_InvitedUsers; +} + +export interface channels_deleteChannel { + _: "channels.deleteChannel"; + channel: InputChannel; + [R]?: Updates; +} + +export interface channels_exportMessageLink { + _: "channels.exportMessageLink"; + grouped?: true; + thread?: true; + channel: InputChannel; + id: number; + [R]?: ExportedMessageLink; +} + +export interface channels_toggleSignatures { + _: "channels.toggleSignatures"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_getAdminedPublicChannels { + _: "channels.getAdminedPublicChannels"; + by_location?: true; + check_limit?: true; + for_personal?: true; + [R]?: messages_Chats; +} + +export interface channels_editBanned { + _: "channels.editBanned"; + channel: InputChannel; + participant: InputPeer; + banned_rights: ChatBannedRights; + [R]?: Updates; +} + +export interface channels_getAdminLog { + _: "channels.getAdminLog"; + channel: InputChannel; + q: string; + events_filter?: ChannelAdminLogEventsFilter; + admins?: Array; + max_id: bigint; + min_id: bigint; + limit: number; + [R]?: channels_AdminLogResults; +} + +export interface channels_setStickers { + _: "channels.setStickers"; + channel: InputChannel; + stickerset: InputStickerSet; + [R]?: boolean; +} + +export interface channels_readMessageContents { + _: "channels.readMessageContents"; + channel: InputChannel; + id: Array; + [R]?: boolean; +} + +export interface channels_deleteHistory { + _: "channels.deleteHistory"; + for_everyone?: true; + channel: InputChannel; + max_id: number; + [R]?: Updates; +} + +export interface channels_togglePreHistoryHidden { + _: "channels.togglePreHistoryHidden"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_getLeftChannels { + _: "channels.getLeftChannels"; + offset: number; + [R]?: messages_Chats; +} + +export interface channels_getGroupsForDiscussion { + _: "channels.getGroupsForDiscussion"; + [R]?: messages_Chats; +} + +export interface channels_setDiscussionGroup { + _: "channels.setDiscussionGroup"; + broadcast: InputChannel; + group: InputChannel; + [R]?: boolean; +} + +export interface channels_editCreator { + _: "channels.editCreator"; + channel: InputChannel; + user_id: InputUser; + password: InputCheckPasswordSRP; + [R]?: Updates; +} + +export interface channels_editLocation { + _: "channels.editLocation"; + channel: InputChannel; + geo_point: InputGeoPoint; + address: string; + [R]?: boolean; +} + +export interface channels_toggleSlowMode { + _: "channels.toggleSlowMode"; + channel: InputChannel; + seconds: number; + [R]?: Updates; +} + +export interface channels_getInactiveChannels { + _: "channels.getInactiveChannels"; + [R]?: messages_InactiveChats; +} + +export interface channels_convertToGigagroup { + _: "channels.convertToGigagroup"; + channel: InputChannel; + [R]?: Updates; +} + +export interface channels_viewSponsoredMessage { + _: "channels.viewSponsoredMessage"; + channel: InputChannel; + random_id: Uint8Array; + [R]?: boolean; +} + +export interface channels_getSponsoredMessages { + _: "channels.getSponsoredMessages"; + channel: InputChannel; + [R]?: messages_SponsoredMessages; +} + +export interface channels_getSendAs { + _: "channels.getSendAs"; + peer: InputPeer; + [R]?: channels_SendAsPeers; +} + +export interface channels_deleteParticipantHistory { + _: "channels.deleteParticipantHistory"; + channel: InputChannel; + participant: InputPeer; + [R]?: messages_AffectedHistory; +} + +export interface channels_toggleJoinToSend { + _: "channels.toggleJoinToSend"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_toggleJoinRequest { + _: "channels.toggleJoinRequest"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_reorderUsernames { + _: "channels.reorderUsernames"; + channel: InputChannel; + order: Array; + [R]?: boolean; +} + +export interface channels_toggleUsername { + _: "channels.toggleUsername"; + channel: InputChannel; + username: string; + active: boolean; + [R]?: boolean; +} + +export interface channels_deactivateAllUsernames { + _: "channels.deactivateAllUsernames"; + channel: InputChannel; + [R]?: boolean; +} + +export interface channels_toggleForum { + _: "channels.toggleForum"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_createForumTopic { + _: "channels.createForumTopic"; + channel: InputChannel; + title: string; + icon_color?: number; + icon_emoji_id?: bigint; + random_id: bigint; + send_as?: InputPeer; + [R]?: Updates; +} + +export interface channels_getForumTopics { + _: "channels.getForumTopics"; + channel: InputChannel; + q?: string; + offset_date: number; + offset_id: number; + offset_topic: number; + limit: number; + [R]?: messages_ForumTopics; +} + +export interface channels_getForumTopicsByID { + _: "channels.getForumTopicsByID"; + channel: InputChannel; + topics: Array; + [R]?: messages_ForumTopics; +} + +export interface channels_editForumTopic { + _: "channels.editForumTopic"; + channel: InputChannel; + topic_id: number; + title?: string; + icon_emoji_id?: bigint; + closed?: boolean; + hidden?: boolean; + [R]?: Updates; +} + +export interface channels_updatePinnedForumTopic { + _: "channels.updatePinnedForumTopic"; + channel: InputChannel; + topic_id: number; + pinned: boolean; + [R]?: Updates; +} + +export interface channels_deleteTopicHistory { + _: "channels.deleteTopicHistory"; + channel: InputChannel; + top_msg_id: number; + [R]?: messages_AffectedHistory; +} + +export interface channels_reorderPinnedForumTopics { + _: "channels.reorderPinnedForumTopics"; + force?: true; + channel: InputChannel; + order: Array; + [R]?: Updates; +} + +export interface channels_toggleAntiSpam { + _: "channels.toggleAntiSpam"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_reportAntiSpamFalsePositive { + _: "channels.reportAntiSpamFalsePositive"; + channel: InputChannel; + msg_id: number; + [R]?: boolean; +} + +export interface channels_toggleParticipantsHidden { + _: "channels.toggleParticipantsHidden"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_clickSponsoredMessage { + _: "channels.clickSponsoredMessage"; + channel: InputChannel; + random_id: Uint8Array; + [R]?: boolean; +} + +export interface channels_updateColor { + _: "channels.updateColor"; + for_profile?: true; + channel: InputChannel; + color?: number; + background_emoji_id?: bigint; + [R]?: Updates; +} + +export interface channels_toggleViewForumAsMessages { + _: "channels.toggleViewForumAsMessages"; + channel: InputChannel; + enabled: boolean; + [R]?: Updates; +} + +export interface channels_getChannelRecommendations { + _: "channels.getChannelRecommendations"; + channel: InputChannel; + [R]?: messages_Chats; +} + +export interface channels_updateEmojiStatus { + _: "channels.updateEmojiStatus"; + channel: InputChannel; + emoji_status: EmojiStatus; + [R]?: Updates; +} + +export interface channels_setBoostsToUnblockRestrictions { + _: "channels.setBoostsToUnblockRestrictions"; + channel: InputChannel; + boosts: number; + [R]?: Updates; +} + +export interface channels_setEmojiStickers { + _: "channels.setEmojiStickers"; + channel: InputChannel; + stickerset: InputStickerSet; + [R]?: boolean; +} + +export interface channels_reportSponsoredMessage { + _: "channels.reportSponsoredMessage"; + channel: InputChannel; + random_id: Uint8Array; + option: Uint8Array; + [R]?: channels_SponsoredMessageReportResult; +} + +export interface channels_restrictSponsoredMessages { + _: "channels.restrictSponsoredMessages"; + channel: InputChannel; + restricted: boolean; + [R]?: Updates; +} + +export interface bots_sendCustomRequest { + _: "bots.sendCustomRequest"; + custom_method: string; + params: DataJSON; + [R]?: DataJSON; +} + +export interface bots_answerWebhookJSONQuery { + _: "bots.answerWebhookJSONQuery"; + query_id: bigint; + data: DataJSON; + [R]?: boolean; +} + +export interface bots_setBotCommands { + _: "bots.setBotCommands"; + scope: BotCommandScope; + lang_code: string; + commands: Array; + [R]?: boolean; +} + +export interface bots_resetBotCommands { + _: "bots.resetBotCommands"; + scope: BotCommandScope; + lang_code: string; + [R]?: boolean; +} + +export interface bots_getBotCommands { + _: "bots.getBotCommands"; + scope: BotCommandScope; + lang_code: string; + [R]?: Array; +} + +export interface bots_setBotMenuButton { + _: "bots.setBotMenuButton"; + user_id: InputUser; + button: BotMenuButton; + [R]?: boolean; +} + +export interface bots_getBotMenuButton { + _: "bots.getBotMenuButton"; + user_id: InputUser; + [R]?: BotMenuButton; +} + +export interface bots_setBotBroadcastDefaultAdminRights { + _: "bots.setBotBroadcastDefaultAdminRights"; + admin_rights: ChatAdminRights; + [R]?: boolean; +} + +export interface bots_setBotGroupDefaultAdminRights { + _: "bots.setBotGroupDefaultAdminRights"; + admin_rights: ChatAdminRights; + [R]?: boolean; +} + +export interface bots_setBotInfo { + _: "bots.setBotInfo"; + bot?: InputUser; + lang_code: string; + name?: string; + about?: string; + description?: string; + [R]?: boolean; +} + +export interface bots_getBotInfo { + _: "bots.getBotInfo"; + bot?: InputUser; + lang_code: string; + [R]?: bots_BotInfo; +} + +export interface bots_reorderUsernames { + _: "bots.reorderUsernames"; + bot: InputUser; + order: Array; + [R]?: boolean; +} + +export interface bots_toggleUsername { + _: "bots.toggleUsername"; + bot: InputUser; + username: string; + active: boolean; + [R]?: boolean; +} + +export interface bots_canSendMessage { + _: "bots.canSendMessage"; + bot: InputUser; + [R]?: boolean; +} + +export interface bots_allowSendMessage { + _: "bots.allowSendMessage"; + bot: InputUser; + [R]?: Updates; +} + +export interface bots_invokeWebViewCustomMethod { + _: "bots.invokeWebViewCustomMethod"; + bot: InputUser; + custom_method: string; + params: DataJSON; + [R]?: DataJSON; +} + +export interface payments_getPaymentForm { + _: "payments.getPaymentForm"; + invoice: InputInvoice; + theme_params?: DataJSON; + [R]?: payments_PaymentForm; +} + +export interface payments_getPaymentReceipt { + _: "payments.getPaymentReceipt"; + peer: InputPeer; + msg_id: number; + [R]?: payments_PaymentReceipt; +} + +export interface payments_validateRequestedInfo { + _: "payments.validateRequestedInfo"; + save?: true; + invoice: InputInvoice; + info: PaymentRequestedInfo; + [R]?: payments_ValidatedRequestedInfo; +} + +export interface payments_sendPaymentForm { + _: "payments.sendPaymentForm"; + form_id: bigint; + invoice: InputInvoice; + requested_info_id?: string; + shipping_option_id?: string; + credentials: InputPaymentCredentials; + tip_amount?: bigint; + [R]?: payments_PaymentResult; +} + +export interface payments_getSavedInfo { + _: "payments.getSavedInfo"; + [R]?: payments_SavedInfo; +} + +export interface payments_clearSavedInfo { + _: "payments.clearSavedInfo"; + credentials?: true; + info?: true; + [R]?: boolean; +} + +export interface payments_getBankCardData { + _: "payments.getBankCardData"; + number: string; + [R]?: payments_BankCardData; +} + +export interface payments_exportInvoice { + _: "payments.exportInvoice"; + invoice_media: InputMedia; + [R]?: payments_ExportedInvoice; +} + +export interface payments_assignAppStoreTransaction { + _: "payments.assignAppStoreTransaction"; + receipt: Uint8Array; + purpose: InputStorePaymentPurpose; + [R]?: Updates; +} + +export interface payments_assignPlayMarketTransaction { + _: "payments.assignPlayMarketTransaction"; + receipt: DataJSON; + purpose: InputStorePaymentPurpose; + [R]?: Updates; +} + +export interface payments_canPurchasePremium { + _: "payments.canPurchasePremium"; + purpose: InputStorePaymentPurpose; + [R]?: boolean; +} + +export interface payments_getPremiumGiftCodeOptions { + _: "payments.getPremiumGiftCodeOptions"; + boost_peer?: InputPeer; + [R]?: Array; +} + +export interface payments_checkGiftCode { + _: "payments.checkGiftCode"; + slug: string; + [R]?: payments_CheckedGiftCode; +} + +export interface payments_applyGiftCode { + _: "payments.applyGiftCode"; + slug: string; + [R]?: Updates; +} + +export interface payments_getGiveawayInfo { + _: "payments.getGiveawayInfo"; + peer: InputPeer; + msg_id: number; + [R]?: payments_GiveawayInfo; +} + +export interface payments_launchPrepaidGiveaway { + _: "payments.launchPrepaidGiveaway"; + peer: InputPeer; + giveaway_id: bigint; + purpose: InputStorePaymentPurpose; + [R]?: Updates; +} + +export interface stickers_createStickerSet { + _: "stickers.createStickerSet"; + masks?: true; + emojis?: true; + text_color?: true; + user_id: InputUser; + title: string; + short_name: string; + thumb?: InputDocument; + stickers: Array; + software?: string; + [R]?: messages_StickerSet; +} + +export interface stickers_removeStickerFromSet { + _: "stickers.removeStickerFromSet"; + sticker: InputDocument; + [R]?: messages_StickerSet; +} + +export interface stickers_changeStickerPosition { + _: "stickers.changeStickerPosition"; + sticker: InputDocument; + position: number; + [R]?: messages_StickerSet; +} + +export interface stickers_addStickerToSet { + _: "stickers.addStickerToSet"; + stickerset: InputStickerSet; + sticker: InputStickerSetItem; + [R]?: messages_StickerSet; +} + +export interface stickers_setStickerSetThumb { + _: "stickers.setStickerSetThumb"; + stickerset: InputStickerSet; + thumb?: InputDocument; + thumb_document_id?: bigint; + [R]?: messages_StickerSet; +} + +export interface stickers_checkShortName { + _: "stickers.checkShortName"; + short_name: string; + [R]?: boolean; +} + +export interface stickers_suggestShortName { + _: "stickers.suggestShortName"; + title: string; + [R]?: stickers_SuggestedShortName; +} + +export interface stickers_changeSticker { + _: "stickers.changeSticker"; + sticker: InputDocument; + emoji?: string; + mask_coords?: MaskCoords; + keywords?: string; + [R]?: messages_StickerSet; +} + +export interface stickers_renameStickerSet { + _: "stickers.renameStickerSet"; + stickerset: InputStickerSet; + title: string; + [R]?: messages_StickerSet; +} + +export interface stickers_deleteStickerSet { + _: "stickers.deleteStickerSet"; + stickerset: InputStickerSet; + [R]?: boolean; +} + +export interface stickers_replaceSticker { + _: "stickers.replaceSticker"; + sticker: InputDocument; + new_sticker: InputStickerSetItem; + [R]?: messages_StickerSet; +} + +export interface phone_getCallConfig { + _: "phone.getCallConfig"; + [R]?: DataJSON; +} + +export interface phone_requestCall { + _: "phone.requestCall"; + video?: true; + user_id: InputUser; + random_id: number; + g_a_hash: Uint8Array; + protocol: PhoneCallProtocol; + [R]?: phone_PhoneCall; +} + +export interface phone_acceptCall { + _: "phone.acceptCall"; + peer: InputPhoneCall; + g_b: Uint8Array; + protocol: PhoneCallProtocol; + [R]?: phone_PhoneCall; +} + +export interface phone_confirmCall { + _: "phone.confirmCall"; + peer: InputPhoneCall; + g_a: Uint8Array; + key_fingerprint: bigint; + protocol: PhoneCallProtocol; + [R]?: phone_PhoneCall; +} + +export interface phone_receivedCall { + _: "phone.receivedCall"; + peer: InputPhoneCall; + [R]?: boolean; +} + +export interface phone_discardCall { + _: "phone.discardCall"; + video?: true; + peer: InputPhoneCall; + duration: number; + reason: PhoneCallDiscardReason; + connection_id: bigint; + [R]?: Updates; +} + +export interface phone_setCallRating { + _: "phone.setCallRating"; + user_initiative?: true; + peer: InputPhoneCall; + rating: number; + comment: string; + [R]?: Updates; +} + +export interface phone_saveCallDebug { + _: "phone.saveCallDebug"; + peer: InputPhoneCall; + debug: DataJSON; + [R]?: boolean; +} + +export interface phone_sendSignalingData { + _: "phone.sendSignalingData"; + peer: InputPhoneCall; + data: Uint8Array; + [R]?: boolean; +} + +export interface phone_createGroupCall { + _: "phone.createGroupCall"; + rtmp_stream?: true; + peer: InputPeer; + random_id: number; + title?: string; + schedule_date?: number; + [R]?: Updates; +} + +export interface phone_joinGroupCall { + _: "phone.joinGroupCall"; + muted?: true; + video_stopped?: true; + call: InputGroupCall; + join_as: InputPeer; + invite_hash?: string; + params: DataJSON; + [R]?: Updates; +} + +export interface phone_leaveGroupCall { + _: "phone.leaveGroupCall"; + call: InputGroupCall; + source: number; + [R]?: Updates; +} + +export interface phone_inviteToGroupCall { + _: "phone.inviteToGroupCall"; + call: InputGroupCall; + users: Array; + [R]?: Updates; +} + +export interface phone_discardGroupCall { + _: "phone.discardGroupCall"; + call: InputGroupCall; + [R]?: Updates; +} + +export interface phone_toggleGroupCallSettings { + _: "phone.toggleGroupCallSettings"; + reset_invite_hash?: true; + call: InputGroupCall; + join_muted?: boolean; + [R]?: Updates; +} + +export interface phone_getGroupCall { + _: "phone.getGroupCall"; + call: InputGroupCall; + limit: number; + [R]?: phone_GroupCall; +} + +export interface phone_getGroupParticipants { + _: "phone.getGroupParticipants"; + call: InputGroupCall; + ids: Array; + sources: Array; + offset: string; + limit: number; + [R]?: phone_GroupParticipants; +} + +export interface phone_checkGroupCall { + _: "phone.checkGroupCall"; + call: InputGroupCall; + sources: Array; + [R]?: Array; +} + +export interface phone_toggleGroupCallRecord { + _: "phone.toggleGroupCallRecord"; + start?: true; + video?: true; + call: InputGroupCall; + title?: string; + video_portrait?: boolean; + [R]?: Updates; +} + +export interface phone_editGroupCallParticipant { + _: "phone.editGroupCallParticipant"; + call: InputGroupCall; + participant: InputPeer; + muted?: boolean; + volume?: number; + raise_hand?: boolean; + video_stopped?: boolean; + video_paused?: boolean; + presentation_paused?: boolean; + [R]?: Updates; +} + +export interface phone_editGroupCallTitle { + _: "phone.editGroupCallTitle"; + call: InputGroupCall; + title: string; + [R]?: Updates; +} + +export interface phone_getGroupCallJoinAs { + _: "phone.getGroupCallJoinAs"; + peer: InputPeer; + [R]?: phone_JoinAsPeers; +} + +export interface phone_exportGroupCallInvite { + _: "phone.exportGroupCallInvite"; + can_self_unmute?: true; + call: InputGroupCall; + [R]?: phone_ExportedGroupCallInvite; +} + +export interface phone_toggleGroupCallStartSubscription { + _: "phone.toggleGroupCallStartSubscription"; + call: InputGroupCall; + subscribed: boolean; + [R]?: Updates; +} + +export interface phone_startScheduledGroupCall { + _: "phone.startScheduledGroupCall"; + call: InputGroupCall; + [R]?: Updates; +} + +export interface phone_saveDefaultGroupCallJoinAs { + _: "phone.saveDefaultGroupCallJoinAs"; + peer: InputPeer; + join_as: InputPeer; + [R]?: boolean; +} + +export interface phone_joinGroupCallPresentation { + _: "phone.joinGroupCallPresentation"; + call: InputGroupCall; + params: DataJSON; + [R]?: Updates; +} + +export interface phone_leaveGroupCallPresentation { + _: "phone.leaveGroupCallPresentation"; + call: InputGroupCall; + [R]?: Updates; +} + +export interface phone_getGroupCallStreamChannels { + _: "phone.getGroupCallStreamChannels"; + call: InputGroupCall; + [R]?: phone_GroupCallStreamChannels; +} + +export interface phone_getGroupCallStreamRtmpUrl { + _: "phone.getGroupCallStreamRtmpUrl"; + peer: InputPeer; + revoke: boolean; + [R]?: phone_GroupCallStreamRtmpUrl; +} + +export interface phone_saveCallLog { + _: "phone.saveCallLog"; + peer: InputPhoneCall; + file: InputFile; + [R]?: boolean; +} + +export interface langpack_getLangPack { + _: "langpack.getLangPack"; + lang_pack: string; + lang_code: string; + [R]?: LangPackDifference; +} + +export interface langpack_getStrings { + _: "langpack.getStrings"; + lang_pack: string; + lang_code: string; + keys: Array; + [R]?: Array; +} + +export interface langpack_getDifference { + _: "langpack.getDifference"; + lang_pack: string; + lang_code: string; + from_version: number; + [R]?: LangPackDifference; +} + +export interface langpack_getLanguages { + _: "langpack.getLanguages"; + lang_pack: string; + [R]?: Array; +} + +export interface langpack_getLanguage { + _: "langpack.getLanguage"; + lang_pack: string; + lang_code: string; + [R]?: LangPackLanguage; +} + +export interface folders_editPeerFolders { + _: "folders.editPeerFolders"; + folder_peers: Array; + [R]?: Updates; +} + +export interface stats_getBroadcastStats { + _: "stats.getBroadcastStats"; + dark?: true; + channel: InputChannel; + [R]?: stats_BroadcastStats; +} + +export interface stats_loadAsyncGraph { + _: "stats.loadAsyncGraph"; + token: string; + x?: bigint; + [R]?: StatsGraph; +} + +export interface stats_getMegagroupStats { + _: "stats.getMegagroupStats"; + dark?: true; + channel: InputChannel; + [R]?: stats_MegagroupStats; +} + +export interface stats_getMessagePublicForwards { + _: "stats.getMessagePublicForwards"; + channel: InputChannel; + msg_id: number; + offset: string; + limit: number; + [R]?: stats_PublicForwards; +} + +export interface stats_getMessageStats { + _: "stats.getMessageStats"; + dark?: true; + channel: InputChannel; + msg_id: number; + [R]?: stats_MessageStats; +} + +export interface stats_getStoryStats { + _: "stats.getStoryStats"; + dark?: true; + peer: InputPeer; + id: number; + [R]?: stats_StoryStats; +} + +export interface stats_getStoryPublicForwards { + _: "stats.getStoryPublicForwards"; + peer: InputPeer; + id: number; + offset: string; + limit: number; + [R]?: stats_PublicForwards; +} + +export interface stats_getBroadcastRevenueStats { + _: "stats.getBroadcastRevenueStats"; + dark?: true; + channel: InputChannel; + [R]?: stats_BroadcastRevenueStats; +} + +export interface stats_getBroadcastRevenueWithdrawalUrl { + _: "stats.getBroadcastRevenueWithdrawalUrl"; + channel: InputChannel; + password: InputCheckPasswordSRP; + [R]?: stats_BroadcastRevenueWithdrawalUrl; +} + +export interface stats_getBroadcastRevenueTransactions { + _: "stats.getBroadcastRevenueTransactions"; + channel: InputChannel; + offset: number; + limit: number; + [R]?: stats_BroadcastRevenueTransactions; +} + +export interface chatlists_exportChatlistInvite { + _: "chatlists.exportChatlistInvite"; + chatlist: InputChatlist; + title: string; + peers: Array; + [R]?: chatlists_ExportedChatlistInvite; +} + +export interface chatlists_deleteExportedInvite { + _: "chatlists.deleteExportedInvite"; + chatlist: InputChatlist; + slug: string; + [R]?: boolean; +} + +export interface chatlists_editExportedInvite { + _: "chatlists.editExportedInvite"; + chatlist: InputChatlist; + slug: string; + title?: string; + peers?: Array; + [R]?: ExportedChatlistInvite; +} + +export interface chatlists_getExportedInvites { + _: "chatlists.getExportedInvites"; + chatlist: InputChatlist; + [R]?: chatlists_ExportedInvites; +} + +export interface chatlists_checkChatlistInvite { + _: "chatlists.checkChatlistInvite"; + slug: string; + [R]?: chatlists_ChatlistInvite; +} + +export interface chatlists_joinChatlistInvite { + _: "chatlists.joinChatlistInvite"; + slug: string; + peers: Array; + [R]?: Updates; +} + +export interface chatlists_getChatlistUpdates { + _: "chatlists.getChatlistUpdates"; + chatlist: InputChatlist; + [R]?: chatlists_ChatlistUpdates; +} + +export interface chatlists_joinChatlistUpdates { + _: "chatlists.joinChatlistUpdates"; + chatlist: InputChatlist; + peers: Array; + [R]?: Updates; +} + +export interface chatlists_hideChatlistUpdates { + _: "chatlists.hideChatlistUpdates"; + chatlist: InputChatlist; + [R]?: boolean; +} + +export interface chatlists_getLeaveChatlistSuggestions { + _: "chatlists.getLeaveChatlistSuggestions"; + chatlist: InputChatlist; + [R]?: Array; +} + +export interface chatlists_leaveChatlist { + _: "chatlists.leaveChatlist"; + chatlist: InputChatlist; + peers: Array; + [R]?: Updates; +} + +export interface stories_canSendStory { + _: "stories.canSendStory"; + peer: InputPeer; + [R]?: boolean; +} + +export interface stories_sendStory { + _: "stories.sendStory"; + pinned?: true; + noforwards?: true; + fwd_modified?: true; + peer: InputPeer; + media: InputMedia; + media_areas?: Array; + caption?: string; + entities?: Array; + privacy_rules: Array; + random_id: bigint; + period?: number; + fwd_from_id?: InputPeer; + fwd_from_story?: number; + [R]?: Updates; +} + +export interface stories_editStory { + _: "stories.editStory"; + peer: InputPeer; + id: number; + media?: InputMedia; + media_areas?: Array; + caption?: string; + entities?: Array; + privacy_rules?: Array; + [R]?: Updates; +} + +export interface stories_deleteStories { + _: "stories.deleteStories"; + peer: InputPeer; + id: Array; + [R]?: Array; +} + +export interface stories_togglePinned { + _: "stories.togglePinned"; + peer: InputPeer; + id: Array; + pinned: boolean; + [R]?: Array; +} + +export interface stories_getAllStories { + _: "stories.getAllStories"; + next?: true; + hidden?: true; + state?: string; + [R]?: stories_AllStories; +} + +export interface stories_getPinnedStories { + _: "stories.getPinnedStories"; + peer: InputPeer; + offset_id: number; + limit: number; + [R]?: stories_Stories; +} + +export interface stories_getStoriesArchive { + _: "stories.getStoriesArchive"; + peer: InputPeer; + offset_id: number; + limit: number; + [R]?: stories_Stories; +} + +export interface stories_getStoriesByID { + _: "stories.getStoriesByID"; + peer: InputPeer; + id: Array; + [R]?: stories_Stories; +} + +export interface stories_toggleAllStoriesHidden { + _: "stories.toggleAllStoriesHidden"; + hidden: boolean; + [R]?: boolean; +} + +export interface stories_readStories { + _: "stories.readStories"; + peer: InputPeer; + max_id: number; + [R]?: Array; +} + +export interface stories_incrementStoryViews { + _: "stories.incrementStoryViews"; + peer: InputPeer; + id: Array; + [R]?: boolean; +} + +export interface stories_getStoryViewsList { + _: "stories.getStoryViewsList"; + just_contacts?: true; + reactions_first?: true; + forwards_first?: true; + peer: InputPeer; + q?: string; + id: number; + offset: string; + limit: number; + [R]?: stories_StoryViewsList; +} + +export interface stories_getStoriesViews { + _: "stories.getStoriesViews"; + peer: InputPeer; + id: Array; + [R]?: stories_StoryViews; +} + +export interface stories_exportStoryLink { + _: "stories.exportStoryLink"; + peer: InputPeer; + id: number; + [R]?: ExportedStoryLink; +} + +export interface stories_report { + _: "stories.report"; + peer: InputPeer; + id: Array; + reason: ReportReason; + message: string; + [R]?: boolean; +} + +export interface stories_activateStealthMode { + _: "stories.activateStealthMode"; + past?: true; + future?: true; + [R]?: Updates; +} + +export interface stories_sendReaction { + _: "stories.sendReaction"; + add_to_recent?: true; + peer: InputPeer; + story_id: number; + reaction: Reaction; + [R]?: Updates; +} + +export interface stories_getPeerStories { + _: "stories.getPeerStories"; + peer: InputPeer; + [R]?: stories_PeerStories; +} + +export interface stories_getAllReadPeerStories { + _: "stories.getAllReadPeerStories"; + [R]?: Updates; +} + +export interface stories_getPeerMaxIDs { + _: "stories.getPeerMaxIDs"; + id: Array; + [R]?: Array; +} + +export interface stories_getChatsToSend { + _: "stories.getChatsToSend"; + [R]?: messages_Chats; +} + +export interface stories_togglePeerStoriesHidden { + _: "stories.togglePeerStoriesHidden"; + peer: InputPeer; + hidden: boolean; + [R]?: boolean; +} + +export interface stories_getStoryReactionsList { + _: "stories.getStoryReactionsList"; + forwards_first?: true; + peer: InputPeer; + id: number; + reaction?: Reaction; + offset?: string; + limit: number; + [R]?: stories_StoryReactionsList; +} + +export interface premium_getBoostsList { + _: "premium.getBoostsList"; + gifts?: true; + peer: InputPeer; + offset: string; + limit: number; + [R]?: premium_BoostsList; +} + +export interface premium_getMyBoosts { + _: "premium.getMyBoosts"; + [R]?: premium_MyBoosts; +} + +export interface premium_applyBoost { + _: "premium.applyBoost"; + slots?: Array; + peer: InputPeer; + [R]?: premium_MyBoosts; +} + +export interface premium_getBoostsStatus { + _: "premium.getBoostsStatus"; + peer: InputPeer; + [R]?: premium_BoostsStatus; +} + +export interface premium_getUserBoosts { + _: "premium.getUserBoosts"; + peer: InputPeer; + user_id: InputUser; + [R]?: premium_BoostsList; +} + +export interface smsjobs_isEligibleToJoin { + _: "smsjobs.isEligibleToJoin"; + [R]?: smsjobs_EligibilityToJoin; +} + +export interface smsjobs_join { + _: "smsjobs.join"; + [R]?: boolean; +} + +export interface smsjobs_leave { + _: "smsjobs.leave"; + [R]?: boolean; +} + +export interface smsjobs_updateSettings { + _: "smsjobs.updateSettings"; + allow_international?: true; + [R]?: boolean; +} + +export interface smsjobs_getStatus { + _: "smsjobs.getStatus"; + [R]?: smsjobs_Status; +} + +export interface smsjobs_getSmsJob { + _: "smsjobs.getSmsJob"; + job_id: string; + [R]?: SmsJob; +} + +export interface smsjobs_finishJob { + _: "smsjobs.finishJob"; + job_id: string; + error?: string; + [R]?: boolean; +} + +export interface fragment_getCollectibleInfo { + _: "fragment.getCollectibleInfo"; + collectible: InputCollectible; + [R]?: fragment_CollectibleInfo; +} + +export interface Types { + "resPQ": resPQ; + "p_q_inner_data_dc": p_q_inner_data_dc; + "p_q_inner_data_temp_dc": p_q_inner_data_temp_dc; + "server_DH_params_ok": server_DH_params_ok; + "server_DH_inner_data": server_DH_inner_data; + "client_DH_inner_data": client_DH_inner_data; + "dh_gen_ok": dh_gen_ok; + "dh_gen_retry": dh_gen_retry; + "dh_gen_fail": dh_gen_fail; + "bind_auth_key_inner": bind_auth_key_inner; + "rpc_error": rpc_error; + "rpc_answer_unknown": rpc_answer_unknown; + "rpc_answer_dropped_running": rpc_answer_dropped_running; + "rpc_answer_dropped": rpc_answer_dropped; + "future_salt": future_salt; + "future_salts": future_salts; + "pong": pong; + "destroy_session_ok": destroy_session_ok; + "destroy_session_none": destroy_session_none; + "new_session_created": new_session_created; + "gzip_packed": gzip_packed; + "msgs_ack": msgs_ack; + "bad_msg_notification": bad_msg_notification; + "bad_server_salt": bad_server_salt; + "msg_resend_req": msg_resend_req; + "msgs_state_req": msgs_state_req; + "msgs_state_info": msgs_state_info; + "msgs_all_info": msgs_all_info; + "msg_detailed_info": msg_detailed_info; + "msg_new_detailed_info": msg_new_detailed_info; + "destroy_auth_key_ok": destroy_auth_key_ok; + "destroy_auth_key_none": destroy_auth_key_none; + "destroy_auth_key_fail": destroy_auth_key_fail; + "http_wait": http_wait; + "true": true_; + "error": error; + "ipPort": ipPort; + "ipPortSecret": ipPortSecret; + "accessPointRule": accessPointRule; + "help.configSimple": help_configSimple; + "inputPeerPhotoFileLocationLegacy": inputPeerPhotoFileLocationLegacy; + "inputStickerSetThumbLegacy": inputStickerSetThumbLegacy; + "inputPeerEmpty": inputPeerEmpty; + "inputPeerSelf": inputPeerSelf; + "inputPeerChat": inputPeerChat; + "inputPeerUser": inputPeerUser; + "inputPeerChannel": inputPeerChannel; + "inputPeerUserFromMessage": inputPeerUserFromMessage; + "inputPeerChannelFromMessage": inputPeerChannelFromMessage; + "inputUserEmpty": inputUserEmpty; + "inputUserSelf": inputUserSelf; + "inputUser": inputUser; + "inputUserFromMessage": inputUserFromMessage; + "inputPhoneContact": inputPhoneContact; + "inputFile": inputFile; + "inputFileBig": inputFileBig; + "inputMediaEmpty": inputMediaEmpty; + "inputMediaUploadedPhoto": inputMediaUploadedPhoto; + "inputMediaPhoto": inputMediaPhoto; + "inputMediaGeoPoint": inputMediaGeoPoint; + "inputMediaContact": inputMediaContact; + "inputMediaUploadedDocument": inputMediaUploadedDocument; + "inputMediaDocument": inputMediaDocument; + "inputMediaVenue": inputMediaVenue; + "inputMediaPhotoExternal": inputMediaPhotoExternal; + "inputMediaDocumentExternal": inputMediaDocumentExternal; + "inputMediaGame": inputMediaGame; + "inputMediaInvoice": inputMediaInvoice; + "inputMediaGeoLive": inputMediaGeoLive; + "inputMediaPoll": inputMediaPoll; + "inputMediaDice": inputMediaDice; + "inputMediaStory": inputMediaStory; + "inputMediaWebPage": inputMediaWebPage; + "inputChatPhotoEmpty": inputChatPhotoEmpty; + "inputChatUploadedPhoto": inputChatUploadedPhoto; + "inputChatPhoto": inputChatPhoto; + "inputGeoPointEmpty": inputGeoPointEmpty; + "inputGeoPoint": inputGeoPoint; + "inputPhotoEmpty": inputPhotoEmpty; + "inputPhoto": inputPhoto; + "inputFileLocation": inputFileLocation; + "inputEncryptedFileLocation": inputEncryptedFileLocation; + "inputDocumentFileLocation": inputDocumentFileLocation; + "inputSecureFileLocation": inputSecureFileLocation; + "inputTakeoutFileLocation": inputTakeoutFileLocation; + "inputPhotoFileLocation": inputPhotoFileLocation; + "inputPhotoLegacyFileLocation": inputPhotoLegacyFileLocation; + "inputPeerPhotoFileLocation": inputPeerPhotoFileLocation; + "inputStickerSetThumb": inputStickerSetThumb; + "inputGroupCallStream": inputGroupCallStream; + "peerUser": peerUser; + "peerChat": peerChat; + "peerChannel": peerChannel; + "storage.fileUnknown": storage_fileUnknown; + "storage.filePartial": storage_filePartial; + "storage.fileJpeg": storage_fileJpeg; + "storage.fileGif": storage_fileGif; + "storage.filePng": storage_filePng; + "storage.filePdf": storage_filePdf; + "storage.fileMp3": storage_fileMp3; + "storage.fileMov": storage_fileMov; + "storage.fileMp4": storage_fileMp4; + "storage.fileWebp": storage_fileWebp; + "userEmpty": userEmpty; + "user": user; + "userProfilePhotoEmpty": userProfilePhotoEmpty; + "userProfilePhoto": userProfilePhoto; + "userStatusEmpty": userStatusEmpty; + "userStatusOnline": userStatusOnline; + "userStatusOffline": userStatusOffline; + "userStatusRecently": userStatusRecently; + "userStatusLastWeek": userStatusLastWeek; + "userStatusLastMonth": userStatusLastMonth; + "chatEmpty": chatEmpty; + "chat": chat; + "chatForbidden": chatForbidden; + "channel": channel; + "channelForbidden": channelForbidden; + "chatFull": chatFull; + "channelFull": channelFull; + "chatParticipant": chatParticipant; + "chatParticipantCreator": chatParticipantCreator; + "chatParticipantAdmin": chatParticipantAdmin; + "chatParticipantsForbidden": chatParticipantsForbidden; + "chatParticipants": chatParticipants; + "chatPhotoEmpty": chatPhotoEmpty; + "chatPhoto": chatPhoto; + "messageEmpty": messageEmpty; + "message": message; + "messageService": messageService; + "messageMediaEmpty": messageMediaEmpty; + "messageMediaPhoto": messageMediaPhoto; + "messageMediaGeo": messageMediaGeo; + "messageMediaContact": messageMediaContact; + "messageMediaUnsupported": messageMediaUnsupported; + "messageMediaDocument": messageMediaDocument; + "messageMediaWebPage": messageMediaWebPage; + "messageMediaVenue": messageMediaVenue; + "messageMediaGame": messageMediaGame; + "messageMediaInvoice": messageMediaInvoice; + "messageMediaGeoLive": messageMediaGeoLive; + "messageMediaPoll": messageMediaPoll; + "messageMediaDice": messageMediaDice; + "messageMediaStory": messageMediaStory; + "messageMediaGiveaway": messageMediaGiveaway; + "messageMediaGiveawayResults": messageMediaGiveawayResults; + "messageActionEmpty": messageActionEmpty; + "messageActionChatCreate": messageActionChatCreate; + "messageActionChatEditTitle": messageActionChatEditTitle; + "messageActionChatEditPhoto": messageActionChatEditPhoto; + "messageActionChatDeletePhoto": messageActionChatDeletePhoto; + "messageActionChatAddUser": messageActionChatAddUser; + "messageActionChatDeleteUser": messageActionChatDeleteUser; + "messageActionChatJoinedByLink": messageActionChatJoinedByLink; + "messageActionChannelCreate": messageActionChannelCreate; + "messageActionChatMigrateTo": messageActionChatMigrateTo; + "messageActionChannelMigrateFrom": messageActionChannelMigrateFrom; + "messageActionPinMessage": messageActionPinMessage; + "messageActionHistoryClear": messageActionHistoryClear; + "messageActionGameScore": messageActionGameScore; + "messageActionPaymentSentMe": messageActionPaymentSentMe; + "messageActionPaymentSent": messageActionPaymentSent; + "messageActionPhoneCall": messageActionPhoneCall; + "messageActionScreenshotTaken": messageActionScreenshotTaken; + "messageActionCustomAction": messageActionCustomAction; + "messageActionBotAllowed": messageActionBotAllowed; + "messageActionSecureValuesSentMe": messageActionSecureValuesSentMe; + "messageActionSecureValuesSent": messageActionSecureValuesSent; + "messageActionContactSignUp": messageActionContactSignUp; + "messageActionGeoProximityReached": messageActionGeoProximityReached; + "messageActionGroupCall": messageActionGroupCall; + "messageActionInviteToGroupCall": messageActionInviteToGroupCall; + "messageActionSetMessagesTTL": messageActionSetMessagesTTL; + "messageActionGroupCallScheduled": messageActionGroupCallScheduled; + "messageActionSetChatTheme": messageActionSetChatTheme; + "messageActionChatJoinedByRequest": messageActionChatJoinedByRequest; + "messageActionWebViewDataSentMe": messageActionWebViewDataSentMe; + "messageActionWebViewDataSent": messageActionWebViewDataSent; + "messageActionGiftPremium": messageActionGiftPremium; + "messageActionTopicCreate": messageActionTopicCreate; + "messageActionTopicEdit": messageActionTopicEdit; + "messageActionSuggestProfilePhoto": messageActionSuggestProfilePhoto; + "messageActionRequestedPeer": messageActionRequestedPeer; + "messageActionSetChatWallPaper": messageActionSetChatWallPaper; + "messageActionGiftCode": messageActionGiftCode; + "messageActionGiveawayLaunch": messageActionGiveawayLaunch; + "messageActionGiveawayResults": messageActionGiveawayResults; + "messageActionBoostApply": messageActionBoostApply; + "messageActionRequestedPeerSentMe": messageActionRequestedPeerSentMe; + "dialog": dialog; + "dialogFolder": dialogFolder; + "photoEmpty": photoEmpty; + "photo": photo; + "photoSizeEmpty": photoSizeEmpty; + "photoSize": photoSize; + "photoCachedSize": photoCachedSize; + "photoStrippedSize": photoStrippedSize; + "photoSizeProgressive": photoSizeProgressive; + "photoPathSize": photoPathSize; + "geoPointEmpty": geoPointEmpty; + "geoPoint": geoPoint; + "auth.sentCode": auth_sentCode; + "auth.sentCodeSuccess": auth_sentCodeSuccess; + "auth.authorization": auth_authorization; + "auth.authorizationSignUpRequired": auth_authorizationSignUpRequired; + "auth.exportedAuthorization": auth_exportedAuthorization; + "inputNotifyPeer": inputNotifyPeer; + "inputNotifyUsers": inputNotifyUsers; + "inputNotifyChats": inputNotifyChats; + "inputNotifyBroadcasts": inputNotifyBroadcasts; + "inputNotifyForumTopic": inputNotifyForumTopic; + "inputPeerNotifySettings": inputPeerNotifySettings; + "peerNotifySettings": peerNotifySettings; + "peerSettings": peerSettings; + "wallPaper": wallPaper; + "wallPaperNoFile": wallPaperNoFile; + "inputReportReasonSpam": inputReportReasonSpam; + "inputReportReasonViolence": inputReportReasonViolence; + "inputReportReasonPornography": inputReportReasonPornography; + "inputReportReasonChildAbuse": inputReportReasonChildAbuse; + "inputReportReasonOther": inputReportReasonOther; + "inputReportReasonCopyright": inputReportReasonCopyright; + "inputReportReasonGeoIrrelevant": inputReportReasonGeoIrrelevant; + "inputReportReasonFake": inputReportReasonFake; + "inputReportReasonIllegalDrugs": inputReportReasonIllegalDrugs; + "inputReportReasonPersonalDetails": inputReportReasonPersonalDetails; + "userFull": userFull; + "contact": contact; + "importedContact": importedContact; + "contactStatus": contactStatus; + "contacts.contactsNotModified": contacts_contactsNotModified; + "contacts.contacts": contacts_contacts; + "contacts.importedContacts": contacts_importedContacts; + "contacts.blocked": contacts_blocked; + "contacts.blockedSlice": contacts_blockedSlice; + "messages.dialogs": messages_dialogs; + "messages.dialogsSlice": messages_dialogsSlice; + "messages.dialogsNotModified": messages_dialogsNotModified; + "messages.messages": messages_messages; + "messages.messagesSlice": messages_messagesSlice; + "messages.channelMessages": messages_channelMessages; + "messages.messagesNotModified": messages_messagesNotModified; + "messages.chats": messages_chats; + "messages.chatsSlice": messages_chatsSlice; + "messages.chatFull": messages_chatFull; + "messages.affectedHistory": messages_affectedHistory; + "inputMessagesFilterEmpty": inputMessagesFilterEmpty; + "inputMessagesFilterPhotos": inputMessagesFilterPhotos; + "inputMessagesFilterVideo": inputMessagesFilterVideo; + "inputMessagesFilterPhotoVideo": inputMessagesFilterPhotoVideo; + "inputMessagesFilterDocument": inputMessagesFilterDocument; + "inputMessagesFilterUrl": inputMessagesFilterUrl; + "inputMessagesFilterGif": inputMessagesFilterGif; + "inputMessagesFilterVoice": inputMessagesFilterVoice; + "inputMessagesFilterMusic": inputMessagesFilterMusic; + "inputMessagesFilterChatPhotos": inputMessagesFilterChatPhotos; + "inputMessagesFilterPhoneCalls": inputMessagesFilterPhoneCalls; + "inputMessagesFilterRoundVoice": inputMessagesFilterRoundVoice; + "inputMessagesFilterRoundVideo": inputMessagesFilterRoundVideo; + "inputMessagesFilterMyMentions": inputMessagesFilterMyMentions; + "inputMessagesFilterGeo": inputMessagesFilterGeo; + "inputMessagesFilterContacts": inputMessagesFilterContacts; + "inputMessagesFilterPinned": inputMessagesFilterPinned; + "updateNewMessage": updateNewMessage; + "updateMessageID": updateMessageID; + "updateDeleteMessages": updateDeleteMessages; + "updateUserTyping": updateUserTyping; + "updateChatUserTyping": updateChatUserTyping; + "updateChatParticipants": updateChatParticipants; + "updateUserStatus": updateUserStatus; + "updateUserName": updateUserName; + "updateNewAuthorization": updateNewAuthorization; + "updateNewEncryptedMessage": updateNewEncryptedMessage; + "updateEncryptedChatTyping": updateEncryptedChatTyping; + "updateEncryption": updateEncryption; + "updateEncryptedMessagesRead": updateEncryptedMessagesRead; + "updateChatParticipantAdd": updateChatParticipantAdd; + "updateChatParticipantDelete": updateChatParticipantDelete; + "updateDcOptions": updateDcOptions; + "updateNotifySettings": updateNotifySettings; + "updateServiceNotification": updateServiceNotification; + "updatePrivacy": updatePrivacy; + "updateUserPhone": updateUserPhone; + "updateReadHistoryInbox": updateReadHistoryInbox; + "updateReadHistoryOutbox": updateReadHistoryOutbox; + "updateWebPage": updateWebPage; + "updateReadMessagesContents": updateReadMessagesContents; + "updateChannelTooLong": updateChannelTooLong; + "updateChannel": updateChannel; + "updateNewChannelMessage": updateNewChannelMessage; + "updateReadChannelInbox": updateReadChannelInbox; + "updateDeleteChannelMessages": updateDeleteChannelMessages; + "updateChannelMessageViews": updateChannelMessageViews; + "updateChatParticipantAdmin": updateChatParticipantAdmin; + "updateNewStickerSet": updateNewStickerSet; + "updateStickerSetsOrder": updateStickerSetsOrder; + "updateStickerSets": updateStickerSets; + "updateSavedGifs": updateSavedGifs; + "updateBotInlineQuery": updateBotInlineQuery; + "updateBotInlineSend": updateBotInlineSend; + "updateEditChannelMessage": updateEditChannelMessage; + "updateBotCallbackQuery": updateBotCallbackQuery; + "updateEditMessage": updateEditMessage; + "updateInlineBotCallbackQuery": updateInlineBotCallbackQuery; + "updateReadChannelOutbox": updateReadChannelOutbox; + "updateDraftMessage": updateDraftMessage; + "updateReadFeaturedStickers": updateReadFeaturedStickers; + "updateRecentStickers": updateRecentStickers; + "updateConfig": updateConfig; + "updatePtsChanged": updatePtsChanged; + "updateChannelWebPage": updateChannelWebPage; + "updateDialogPinned": updateDialogPinned; + "updatePinnedDialogs": updatePinnedDialogs; + "updateBotWebhookJSON": updateBotWebhookJSON; + "updateBotWebhookJSONQuery": updateBotWebhookJSONQuery; + "updateBotShippingQuery": updateBotShippingQuery; + "updateBotPrecheckoutQuery": updateBotPrecheckoutQuery; + "updatePhoneCall": updatePhoneCall; + "updateLangPackTooLong": updateLangPackTooLong; + "updateLangPack": updateLangPack; + "updateFavedStickers": updateFavedStickers; + "updateChannelReadMessagesContents": updateChannelReadMessagesContents; + "updateContactsReset": updateContactsReset; + "updateChannelAvailableMessages": updateChannelAvailableMessages; + "updateDialogUnreadMark": updateDialogUnreadMark; + "updateMessagePoll": updateMessagePoll; + "updateChatDefaultBannedRights": updateChatDefaultBannedRights; + "updateFolderPeers": updateFolderPeers; + "updatePeerSettings": updatePeerSettings; + "updatePeerLocated": updatePeerLocated; + "updateNewScheduledMessage": updateNewScheduledMessage; + "updateDeleteScheduledMessages": updateDeleteScheduledMessages; + "updateTheme": updateTheme; + "updateGeoLiveViewed": updateGeoLiveViewed; + "updateLoginToken": updateLoginToken; + "updateMessagePollVote": updateMessagePollVote; + "updateDialogFilter": updateDialogFilter; + "updateDialogFilterOrder": updateDialogFilterOrder; + "updateDialogFilters": updateDialogFilters; + "updatePhoneCallSignalingData": updatePhoneCallSignalingData; + "updateChannelMessageForwards": updateChannelMessageForwards; + "updateReadChannelDiscussionInbox": updateReadChannelDiscussionInbox; + "updateReadChannelDiscussionOutbox": updateReadChannelDiscussionOutbox; + "updatePeerBlocked": updatePeerBlocked; + "updateChannelUserTyping": updateChannelUserTyping; + "updatePinnedMessages": updatePinnedMessages; + "updatePinnedChannelMessages": updatePinnedChannelMessages; + "updateChat": updateChat; + "updateGroupCallParticipants": updateGroupCallParticipants; + "updateGroupCall": updateGroupCall; + "updatePeerHistoryTTL": updatePeerHistoryTTL; + "updateChatParticipant": updateChatParticipant; + "updateChannelParticipant": updateChannelParticipant; + "updateBotStopped": updateBotStopped; + "updateGroupCallConnection": updateGroupCallConnection; + "updateBotCommands": updateBotCommands; + "updatePendingJoinRequests": updatePendingJoinRequests; + "updateBotChatInviteRequester": updateBotChatInviteRequester; + "updateMessageReactions": updateMessageReactions; + "updateAttachMenuBots": updateAttachMenuBots; + "updateWebViewResultSent": updateWebViewResultSent; + "updateBotMenuButton": updateBotMenuButton; + "updateSavedRingtones": updateSavedRingtones; + "updateTranscribedAudio": updateTranscribedAudio; + "updateReadFeaturedEmojiStickers": updateReadFeaturedEmojiStickers; + "updateUserEmojiStatus": updateUserEmojiStatus; + "updateRecentEmojiStatuses": updateRecentEmojiStatuses; + "updateRecentReactions": updateRecentReactions; + "updateMoveStickerSetToTop": updateMoveStickerSetToTop; + "updateMessageExtendedMedia": updateMessageExtendedMedia; + "updateChannelPinnedTopic": updateChannelPinnedTopic; + "updateChannelPinnedTopics": updateChannelPinnedTopics; + "updateUser": updateUser; + "updateAutoSaveSettings": updateAutoSaveSettings; + "updateStory": updateStory; + "updateReadStories": updateReadStories; + "updateStoryID": updateStoryID; + "updateStoriesStealthMode": updateStoriesStealthMode; + "updateSentStoryReaction": updateSentStoryReaction; + "updateBotChatBoost": updateBotChatBoost; + "updateChannelViewForumAsMessages": updateChannelViewForumAsMessages; + "updatePeerWallpaper": updatePeerWallpaper; + "updateBotMessageReaction": updateBotMessageReaction; + "updateBotMessageReactions": updateBotMessageReactions; + "updateSavedDialogPinned": updateSavedDialogPinned; + "updatePinnedSavedDialogs": updatePinnedSavedDialogs; + "updateSavedReactionTags": updateSavedReactionTags; + "updateSmsJob": updateSmsJob; + "updateQuickReplies": updateQuickReplies; + "updateNewQuickReply": updateNewQuickReply; + "updateDeleteQuickReply": updateDeleteQuickReply; + "updateQuickReplyMessage": updateQuickReplyMessage; + "updateDeleteQuickReplyMessages": updateDeleteQuickReplyMessages; + "updateBotBusinessConnect": updateBotBusinessConnect; + "updateBotNewBusinessMessage": updateBotNewBusinessMessage; + "updateBotEditBusinessMessage": updateBotEditBusinessMessage; + "updateBotDeleteBusinessMessage": updateBotDeleteBusinessMessage; + "updates.state": updates_state; + "updates.differenceEmpty": updates_differenceEmpty; + "updates.difference": updates_difference; + "updates.differenceSlice": updates_differenceSlice; + "updates.differenceTooLong": updates_differenceTooLong; + "updatesTooLong": updatesTooLong; + "updateShortMessage": updateShortMessage; + "updateShortChatMessage": updateShortChatMessage; + "updateShort": updateShort; + "updatesCombined": updatesCombined; + "updates": updates; + "updateShortSentMessage": updateShortSentMessage; + "photos.photos": photos_photos; + "photos.photosSlice": photos_photosSlice; + "photos.photo": photos_photo; + "upload.file": upload_file; + "upload.fileCdnRedirect": upload_fileCdnRedirect; + "dcOption": dcOption; + "config": config; + "nearestDc": nearestDc; + "help.appUpdate": help_appUpdate; + "help.noAppUpdate": help_noAppUpdate; + "help.inviteText": help_inviteText; + "encryptedChatEmpty": encryptedChatEmpty; + "encryptedChatWaiting": encryptedChatWaiting; + "encryptedChatRequested": encryptedChatRequested; + "encryptedChat": encryptedChat; + "encryptedChatDiscarded": encryptedChatDiscarded; + "inputEncryptedChat": inputEncryptedChat; + "encryptedFileEmpty": encryptedFileEmpty; + "encryptedFile": encryptedFile; + "inputEncryptedFileEmpty": inputEncryptedFileEmpty; + "inputEncryptedFileUploaded": inputEncryptedFileUploaded; + "inputEncryptedFile": inputEncryptedFile; + "inputEncryptedFileBigUploaded": inputEncryptedFileBigUploaded; + "encryptedMessage": encryptedMessage; + "encryptedMessageService": encryptedMessageService; + "messages.dhConfigNotModified": messages_dhConfigNotModified; + "messages.dhConfig": messages_dhConfig; + "messages.sentEncryptedMessage": messages_sentEncryptedMessage; + "messages.sentEncryptedFile": messages_sentEncryptedFile; + "inputDocumentEmpty": inputDocumentEmpty; + "inputDocument": inputDocument; + "documentEmpty": documentEmpty; + "document": document; + "help.support": help_support; + "notifyPeer": notifyPeer; + "notifyUsers": notifyUsers; + "notifyChats": notifyChats; + "notifyBroadcasts": notifyBroadcasts; + "notifyForumTopic": notifyForumTopic; + "sendMessageTypingAction": sendMessageTypingAction; + "sendMessageCancelAction": sendMessageCancelAction; + "sendMessageRecordVideoAction": sendMessageRecordVideoAction; + "sendMessageUploadVideoAction": sendMessageUploadVideoAction; + "sendMessageRecordAudioAction": sendMessageRecordAudioAction; + "sendMessageUploadAudioAction": sendMessageUploadAudioAction; + "sendMessageUploadPhotoAction": sendMessageUploadPhotoAction; + "sendMessageUploadDocumentAction": sendMessageUploadDocumentAction; + "sendMessageGeoLocationAction": sendMessageGeoLocationAction; + "sendMessageChooseContactAction": sendMessageChooseContactAction; + "sendMessageGamePlayAction": sendMessageGamePlayAction; + "sendMessageRecordRoundAction": sendMessageRecordRoundAction; + "sendMessageUploadRoundAction": sendMessageUploadRoundAction; + "speakingInGroupCallAction": speakingInGroupCallAction; + "sendMessageHistoryImportAction": sendMessageHistoryImportAction; + "sendMessageChooseStickerAction": sendMessageChooseStickerAction; + "sendMessageEmojiInteraction": sendMessageEmojiInteraction; + "sendMessageEmojiInteractionSeen": sendMessageEmojiInteractionSeen; + "contacts.found": contacts_found; + "inputPrivacyKeyStatusTimestamp": inputPrivacyKeyStatusTimestamp; + "inputPrivacyKeyChatInvite": inputPrivacyKeyChatInvite; + "inputPrivacyKeyPhoneCall": inputPrivacyKeyPhoneCall; + "inputPrivacyKeyPhoneP2P": inputPrivacyKeyPhoneP2P; + "inputPrivacyKeyForwards": inputPrivacyKeyForwards; + "inputPrivacyKeyProfilePhoto": inputPrivacyKeyProfilePhoto; + "inputPrivacyKeyPhoneNumber": inputPrivacyKeyPhoneNumber; + "inputPrivacyKeyAddedByPhone": inputPrivacyKeyAddedByPhone; + "inputPrivacyKeyVoiceMessages": inputPrivacyKeyVoiceMessages; + "inputPrivacyKeyAbout": inputPrivacyKeyAbout; + "inputPrivacyKeyBirthday": inputPrivacyKeyBirthday; + "privacyKeyStatusTimestamp": privacyKeyStatusTimestamp; + "privacyKeyChatInvite": privacyKeyChatInvite; + "privacyKeyPhoneCall": privacyKeyPhoneCall; + "privacyKeyPhoneP2P": privacyKeyPhoneP2P; + "privacyKeyForwards": privacyKeyForwards; + "privacyKeyProfilePhoto": privacyKeyProfilePhoto; + "privacyKeyPhoneNumber": privacyKeyPhoneNumber; + "privacyKeyAddedByPhone": privacyKeyAddedByPhone; + "privacyKeyVoiceMessages": privacyKeyVoiceMessages; + "privacyKeyAbout": privacyKeyAbout; + "privacyKeyBirthday": privacyKeyBirthday; + "inputPrivacyValueAllowContacts": inputPrivacyValueAllowContacts; + "inputPrivacyValueAllowAll": inputPrivacyValueAllowAll; + "inputPrivacyValueAllowUsers": inputPrivacyValueAllowUsers; + "inputPrivacyValueDisallowContacts": inputPrivacyValueDisallowContacts; + "inputPrivacyValueDisallowAll": inputPrivacyValueDisallowAll; + "inputPrivacyValueDisallowUsers": inputPrivacyValueDisallowUsers; + "inputPrivacyValueAllowChatParticipants": inputPrivacyValueAllowChatParticipants; + "inputPrivacyValueDisallowChatParticipants": inputPrivacyValueDisallowChatParticipants; + "inputPrivacyValueAllowCloseFriends": inputPrivacyValueAllowCloseFriends; + "inputPrivacyValueAllowPremium": inputPrivacyValueAllowPremium; + "privacyValueAllowContacts": privacyValueAllowContacts; + "privacyValueAllowAll": privacyValueAllowAll; + "privacyValueAllowUsers": privacyValueAllowUsers; + "privacyValueDisallowContacts": privacyValueDisallowContacts; + "privacyValueDisallowAll": privacyValueDisallowAll; + "privacyValueDisallowUsers": privacyValueDisallowUsers; + "privacyValueAllowChatParticipants": privacyValueAllowChatParticipants; + "privacyValueDisallowChatParticipants": privacyValueDisallowChatParticipants; + "privacyValueAllowCloseFriends": privacyValueAllowCloseFriends; + "privacyValueAllowPremium": privacyValueAllowPremium; + "account.privacyRules": account_privacyRules; + "accountDaysTTL": accountDaysTTL; + "documentAttributeImageSize": documentAttributeImageSize; + "documentAttributeAnimated": documentAttributeAnimated; + "documentAttributeSticker": documentAttributeSticker; + "documentAttributeVideo": documentAttributeVideo; + "documentAttributeAudio": documentAttributeAudio; + "documentAttributeFilename": documentAttributeFilename; + "documentAttributeHasStickers": documentAttributeHasStickers; + "documentAttributeCustomEmoji": documentAttributeCustomEmoji; + "messages.stickersNotModified": messages_stickersNotModified; + "messages.stickers": messages_stickers; + "stickerPack": stickerPack; + "messages.allStickersNotModified": messages_allStickersNotModified; + "messages.allStickers": messages_allStickers; + "messages.affectedMessages": messages_affectedMessages; + "webPageEmpty": webPageEmpty; + "webPagePending": webPagePending; + "webPage": webPage; + "webPageNotModified": webPageNotModified; + "authorization": authorization; + "account.authorizations": account_authorizations; + "account.password": account_password; + "account.passwordSettings": account_passwordSettings; + "account.passwordInputSettings": account_passwordInputSettings; + "auth.passwordRecovery": auth_passwordRecovery; + "receivedNotifyMessage": receivedNotifyMessage; + "chatInviteExported": chatInviteExported; + "chatInvitePublicJoinRequests": chatInvitePublicJoinRequests; + "chatInviteAlready": chatInviteAlready; + "chatInvite": chatInvite; + "chatInvitePeek": chatInvitePeek; + "inputStickerSetEmpty": inputStickerSetEmpty; + "inputStickerSetID": inputStickerSetID; + "inputStickerSetShortName": inputStickerSetShortName; + "inputStickerSetAnimatedEmoji": inputStickerSetAnimatedEmoji; + "inputStickerSetDice": inputStickerSetDice; + "inputStickerSetAnimatedEmojiAnimations": inputStickerSetAnimatedEmojiAnimations; + "inputStickerSetPremiumGifts": inputStickerSetPremiumGifts; + "inputStickerSetEmojiGenericAnimations": inputStickerSetEmojiGenericAnimations; + "inputStickerSetEmojiDefaultStatuses": inputStickerSetEmojiDefaultStatuses; + "inputStickerSetEmojiDefaultTopicIcons": inputStickerSetEmojiDefaultTopicIcons; + "inputStickerSetEmojiChannelDefaultStatuses": inputStickerSetEmojiChannelDefaultStatuses; + "stickerSet": stickerSet; + "messages.stickerSet": messages_stickerSet; + "messages.stickerSetNotModified": messages_stickerSetNotModified; + "botCommand": botCommand; + "botInfo": botInfo; + "keyboardButton": keyboardButton; + "keyboardButtonUrl": keyboardButtonUrl; + "keyboardButtonCallback": keyboardButtonCallback; + "keyboardButtonRequestPhone": keyboardButtonRequestPhone; + "keyboardButtonRequestGeoLocation": keyboardButtonRequestGeoLocation; + "keyboardButtonSwitchInline": keyboardButtonSwitchInline; + "keyboardButtonGame": keyboardButtonGame; + "keyboardButtonBuy": keyboardButtonBuy; + "keyboardButtonUrlAuth": keyboardButtonUrlAuth; + "inputKeyboardButtonUrlAuth": inputKeyboardButtonUrlAuth; + "keyboardButtonRequestPoll": keyboardButtonRequestPoll; + "inputKeyboardButtonUserProfile": inputKeyboardButtonUserProfile; + "keyboardButtonUserProfile": keyboardButtonUserProfile; + "keyboardButtonWebView": keyboardButtonWebView; + "keyboardButtonSimpleWebView": keyboardButtonSimpleWebView; + "keyboardButtonRequestPeer": keyboardButtonRequestPeer; + "inputKeyboardButtonRequestPeer": inputKeyboardButtonRequestPeer; + "keyboardButtonRow": keyboardButtonRow; + "replyKeyboardHide": replyKeyboardHide; + "replyKeyboardForceReply": replyKeyboardForceReply; + "replyKeyboardMarkup": replyKeyboardMarkup; + "replyInlineMarkup": replyInlineMarkup; + "messageEntityUnknown": messageEntityUnknown; + "messageEntityMention": messageEntityMention; + "messageEntityHashtag": messageEntityHashtag; + "messageEntityBotCommand": messageEntityBotCommand; + "messageEntityUrl": messageEntityUrl; + "messageEntityEmail": messageEntityEmail; + "messageEntityBold": messageEntityBold; + "messageEntityItalic": messageEntityItalic; + "messageEntityCode": messageEntityCode; + "messageEntityPre": messageEntityPre; + "messageEntityTextUrl": messageEntityTextUrl; + "messageEntityMentionName": messageEntityMentionName; + "inputMessageEntityMentionName": inputMessageEntityMentionName; + "messageEntityPhone": messageEntityPhone; + "messageEntityCashtag": messageEntityCashtag; + "messageEntityUnderline": messageEntityUnderline; + "messageEntityStrike": messageEntityStrike; + "messageEntityBankCard": messageEntityBankCard; + "messageEntitySpoiler": messageEntitySpoiler; + "messageEntityCustomEmoji": messageEntityCustomEmoji; + "messageEntityBlockquote": messageEntityBlockquote; + "inputChannelEmpty": inputChannelEmpty; + "inputChannel": inputChannel; + "inputChannelFromMessage": inputChannelFromMessage; + "contacts.resolvedPeer": contacts_resolvedPeer; + "messageRange": messageRange; + "updates.channelDifferenceEmpty": updates_channelDifferenceEmpty; + "updates.channelDifferenceTooLong": updates_channelDifferenceTooLong; + "updates.channelDifference": updates_channelDifference; + "channelMessagesFilterEmpty": channelMessagesFilterEmpty; + "channelMessagesFilter": channelMessagesFilter; + "channelParticipant": channelParticipant; + "channelParticipantSelf": channelParticipantSelf; + "channelParticipantCreator": channelParticipantCreator; + "channelParticipantAdmin": channelParticipantAdmin; + "channelParticipantBanned": channelParticipantBanned; + "channelParticipantLeft": channelParticipantLeft; + "channelParticipantsRecent": channelParticipantsRecent; + "channelParticipantsAdmins": channelParticipantsAdmins; + "channelParticipantsKicked": channelParticipantsKicked; + "channelParticipantsBots": channelParticipantsBots; + "channelParticipantsBanned": channelParticipantsBanned; + "channelParticipantsSearch": channelParticipantsSearch; + "channelParticipantsContacts": channelParticipantsContacts; + "channelParticipantsMentions": channelParticipantsMentions; + "channels.channelParticipants": channels_channelParticipants; + "channels.channelParticipantsNotModified": channels_channelParticipantsNotModified; + "channels.channelParticipant": channels_channelParticipant; + "help.termsOfService": help_termsOfService; + "messages.savedGifsNotModified": messages_savedGifsNotModified; + "messages.savedGifs": messages_savedGifs; + "inputBotInlineMessageMediaAuto": inputBotInlineMessageMediaAuto; + "inputBotInlineMessageText": inputBotInlineMessageText; + "inputBotInlineMessageMediaGeo": inputBotInlineMessageMediaGeo; + "inputBotInlineMessageMediaVenue": inputBotInlineMessageMediaVenue; + "inputBotInlineMessageMediaContact": inputBotInlineMessageMediaContact; + "inputBotInlineMessageGame": inputBotInlineMessageGame; + "inputBotInlineMessageMediaInvoice": inputBotInlineMessageMediaInvoice; + "inputBotInlineMessageMediaWebPage": inputBotInlineMessageMediaWebPage; + "inputBotInlineResult": inputBotInlineResult; + "inputBotInlineResultPhoto": inputBotInlineResultPhoto; + "inputBotInlineResultDocument": inputBotInlineResultDocument; + "inputBotInlineResultGame": inputBotInlineResultGame; + "botInlineMessageMediaAuto": botInlineMessageMediaAuto; + "botInlineMessageText": botInlineMessageText; + "botInlineMessageMediaGeo": botInlineMessageMediaGeo; + "botInlineMessageMediaVenue": botInlineMessageMediaVenue; + "botInlineMessageMediaContact": botInlineMessageMediaContact; + "botInlineMessageMediaInvoice": botInlineMessageMediaInvoice; + "botInlineMessageMediaWebPage": botInlineMessageMediaWebPage; + "botInlineResult": botInlineResult; + "botInlineMediaResult": botInlineMediaResult; + "messages.botResults": messages_botResults; + "exportedMessageLink": exportedMessageLink; + "messageFwdHeader": messageFwdHeader; + "auth.codeTypeSms": auth_codeTypeSms; + "auth.codeTypeCall": auth_codeTypeCall; + "auth.codeTypeFlashCall": auth_codeTypeFlashCall; + "auth.codeTypeMissedCall": auth_codeTypeMissedCall; + "auth.codeTypeFragmentSms": auth_codeTypeFragmentSms; + "auth.sentCodeTypeApp": auth_sentCodeTypeApp; + "auth.sentCodeTypeSms": auth_sentCodeTypeSms; + "auth.sentCodeTypeCall": auth_sentCodeTypeCall; + "auth.sentCodeTypeFlashCall": auth_sentCodeTypeFlashCall; + "auth.sentCodeTypeMissedCall": auth_sentCodeTypeMissedCall; + "auth.sentCodeTypeEmailCode": auth_sentCodeTypeEmailCode; + "auth.sentCodeTypeSetUpEmailRequired": auth_sentCodeTypeSetUpEmailRequired; + "auth.sentCodeTypeFragmentSms": auth_sentCodeTypeFragmentSms; + "auth.sentCodeTypeFirebaseSms": auth_sentCodeTypeFirebaseSms; + "messages.botCallbackAnswer": messages_botCallbackAnswer; + "messages.messageEditData": messages_messageEditData; + "inputBotInlineMessageID": inputBotInlineMessageID; + "inputBotInlineMessageID64": inputBotInlineMessageID64; + "inlineBotSwitchPM": inlineBotSwitchPM; + "messages.peerDialogs": messages_peerDialogs; + "topPeer": topPeer; + "topPeerCategoryBotsPM": topPeerCategoryBotsPM; + "topPeerCategoryBotsInline": topPeerCategoryBotsInline; + "topPeerCategoryCorrespondents": topPeerCategoryCorrespondents; + "topPeerCategoryGroups": topPeerCategoryGroups; + "topPeerCategoryChannels": topPeerCategoryChannels; + "topPeerCategoryPhoneCalls": topPeerCategoryPhoneCalls; + "topPeerCategoryForwardUsers": topPeerCategoryForwardUsers; + "topPeerCategoryForwardChats": topPeerCategoryForwardChats; + "topPeerCategoryPeers": topPeerCategoryPeers; + "contacts.topPeersNotModified": contacts_topPeersNotModified; + "contacts.topPeers": contacts_topPeers; + "contacts.topPeersDisabled": contacts_topPeersDisabled; + "draftMessageEmpty": draftMessageEmpty; + "draftMessage": draftMessage; + "messages.featuredStickersNotModified": messages_featuredStickersNotModified; + "messages.featuredStickers": messages_featuredStickers; + "messages.recentStickersNotModified": messages_recentStickersNotModified; + "messages.recentStickers": messages_recentStickers; + "messages.archivedStickers": messages_archivedStickers; + "messages.stickerSetInstallResultSuccess": messages_stickerSetInstallResultSuccess; + "messages.stickerSetInstallResultArchive": messages_stickerSetInstallResultArchive; + "stickerSetCovered": stickerSetCovered; + "stickerSetMultiCovered": stickerSetMultiCovered; + "stickerSetFullCovered": stickerSetFullCovered; + "stickerSetNoCovered": stickerSetNoCovered; + "maskCoords": maskCoords; + "inputStickeredMediaPhoto": inputStickeredMediaPhoto; + "inputStickeredMediaDocument": inputStickeredMediaDocument; + "game": game; + "inputGameID": inputGameID; + "inputGameShortName": inputGameShortName; + "highScore": highScore; + "messages.highScores": messages_highScores; + "textEmpty": textEmpty; + "textPlain": textPlain; + "textBold": textBold; + "textItalic": textItalic; + "textUnderline": textUnderline; + "textStrike": textStrike; + "textFixed": textFixed; + "textUrl": textUrl; + "textEmail": textEmail; + "textConcat": textConcat; + "textSubscript": textSubscript; + "textSuperscript": textSuperscript; + "textMarked": textMarked; + "textPhone": textPhone; + "textImage": textImage; + "textAnchor": textAnchor; + "pageBlockUnsupported": pageBlockUnsupported; + "pageBlockTitle": pageBlockTitle; + "pageBlockSubtitle": pageBlockSubtitle; + "pageBlockAuthorDate": pageBlockAuthorDate; + "pageBlockHeader": pageBlockHeader; + "pageBlockSubheader": pageBlockSubheader; + "pageBlockParagraph": pageBlockParagraph; + "pageBlockPreformatted": pageBlockPreformatted; + "pageBlockFooter": pageBlockFooter; + "pageBlockDivider": pageBlockDivider; + "pageBlockAnchor": pageBlockAnchor; + "pageBlockList": pageBlockList; + "pageBlockBlockquote": pageBlockBlockquote; + "pageBlockPullquote": pageBlockPullquote; + "pageBlockPhoto": pageBlockPhoto; + "pageBlockVideo": pageBlockVideo; + "pageBlockCover": pageBlockCover; + "pageBlockEmbed": pageBlockEmbed; + "pageBlockEmbedPost": pageBlockEmbedPost; + "pageBlockCollage": pageBlockCollage; + "pageBlockSlideshow": pageBlockSlideshow; + "pageBlockChannel": pageBlockChannel; + "pageBlockAudio": pageBlockAudio; + "pageBlockKicker": pageBlockKicker; + "pageBlockTable": pageBlockTable; + "pageBlockOrderedList": pageBlockOrderedList; + "pageBlockDetails": pageBlockDetails; + "pageBlockRelatedArticles": pageBlockRelatedArticles; + "pageBlockMap": pageBlockMap; + "phoneCallDiscardReasonMissed": phoneCallDiscardReasonMissed; + "phoneCallDiscardReasonDisconnect": phoneCallDiscardReasonDisconnect; + "phoneCallDiscardReasonHangup": phoneCallDiscardReasonHangup; + "phoneCallDiscardReasonBusy": phoneCallDiscardReasonBusy; + "dataJSON": dataJSON; + "labeledPrice": labeledPrice; + "invoice": invoice; + "paymentCharge": paymentCharge; + "postAddress": postAddress; + "paymentRequestedInfo": paymentRequestedInfo; + "paymentSavedCredentialsCard": paymentSavedCredentialsCard; + "webDocument": webDocument; + "webDocumentNoProxy": webDocumentNoProxy; + "inputWebDocument": inputWebDocument; + "inputWebFileLocation": inputWebFileLocation; + "inputWebFileGeoPointLocation": inputWebFileGeoPointLocation; + "inputWebFileAudioAlbumThumbLocation": inputWebFileAudioAlbumThumbLocation; + "upload.webFile": upload_webFile; + "payments.paymentForm": payments_paymentForm; + "payments.validatedRequestedInfo": payments_validatedRequestedInfo; + "payments.paymentResult": payments_paymentResult; + "payments.paymentVerificationNeeded": payments_paymentVerificationNeeded; + "payments.paymentReceipt": payments_paymentReceipt; + "payments.savedInfo": payments_savedInfo; + "inputPaymentCredentialsSaved": inputPaymentCredentialsSaved; + "inputPaymentCredentials": inputPaymentCredentials; + "inputPaymentCredentialsApplePay": inputPaymentCredentialsApplePay; + "inputPaymentCredentialsGooglePay": inputPaymentCredentialsGooglePay; + "account.tmpPassword": account_tmpPassword; + "shippingOption": shippingOption; + "inputStickerSetItem": inputStickerSetItem; + "inputPhoneCall": inputPhoneCall; + "phoneCallEmpty": phoneCallEmpty; + "phoneCallWaiting": phoneCallWaiting; + "phoneCallRequested": phoneCallRequested; + "phoneCallAccepted": phoneCallAccepted; + "phoneCall": phoneCall; + "phoneCallDiscarded": phoneCallDiscarded; + "phoneConnection": phoneConnection; + "phoneConnectionWebrtc": phoneConnectionWebrtc; + "phoneCallProtocol": phoneCallProtocol; + "phone.phoneCall": phone_phoneCall; + "upload.cdnFileReuploadNeeded": upload_cdnFileReuploadNeeded; + "upload.cdnFile": upload_cdnFile; + "cdnPublicKey": cdnPublicKey; + "cdnConfig": cdnConfig; + "langPackString": langPackString; + "langPackStringPluralized": langPackStringPluralized; + "langPackStringDeleted": langPackStringDeleted; + "langPackDifference": langPackDifference; + "langPackLanguage": langPackLanguage; + "channelAdminLogEventActionChangeTitle": channelAdminLogEventActionChangeTitle; + "channelAdminLogEventActionChangeAbout": channelAdminLogEventActionChangeAbout; + "channelAdminLogEventActionChangeUsername": channelAdminLogEventActionChangeUsername; + "channelAdminLogEventActionChangePhoto": channelAdminLogEventActionChangePhoto; + "channelAdminLogEventActionToggleInvites": channelAdminLogEventActionToggleInvites; + "channelAdminLogEventActionToggleSignatures": channelAdminLogEventActionToggleSignatures; + "channelAdminLogEventActionUpdatePinned": channelAdminLogEventActionUpdatePinned; + "channelAdminLogEventActionEditMessage": channelAdminLogEventActionEditMessage; + "channelAdminLogEventActionDeleteMessage": channelAdminLogEventActionDeleteMessage; + "channelAdminLogEventActionParticipantJoin": channelAdminLogEventActionParticipantJoin; + "channelAdminLogEventActionParticipantLeave": channelAdminLogEventActionParticipantLeave; + "channelAdminLogEventActionParticipantInvite": channelAdminLogEventActionParticipantInvite; + "channelAdminLogEventActionParticipantToggleBan": channelAdminLogEventActionParticipantToggleBan; + "channelAdminLogEventActionParticipantToggleAdmin": channelAdminLogEventActionParticipantToggleAdmin; + "channelAdminLogEventActionChangeStickerSet": channelAdminLogEventActionChangeStickerSet; + "channelAdminLogEventActionTogglePreHistoryHidden": channelAdminLogEventActionTogglePreHistoryHidden; + "channelAdminLogEventActionDefaultBannedRights": channelAdminLogEventActionDefaultBannedRights; + "channelAdminLogEventActionStopPoll": channelAdminLogEventActionStopPoll; + "channelAdminLogEventActionChangeLinkedChat": channelAdminLogEventActionChangeLinkedChat; + "channelAdminLogEventActionChangeLocation": channelAdminLogEventActionChangeLocation; + "channelAdminLogEventActionToggleSlowMode": channelAdminLogEventActionToggleSlowMode; + "channelAdminLogEventActionStartGroupCall": channelAdminLogEventActionStartGroupCall; + "channelAdminLogEventActionDiscardGroupCall": channelAdminLogEventActionDiscardGroupCall; + "channelAdminLogEventActionParticipantMute": channelAdminLogEventActionParticipantMute; + "channelAdminLogEventActionParticipantUnmute": channelAdminLogEventActionParticipantUnmute; + "channelAdminLogEventActionToggleGroupCallSetting": channelAdminLogEventActionToggleGroupCallSetting; + "channelAdminLogEventActionParticipantJoinByInvite": channelAdminLogEventActionParticipantJoinByInvite; + "channelAdminLogEventActionExportedInviteDelete": channelAdminLogEventActionExportedInviteDelete; + "channelAdminLogEventActionExportedInviteRevoke": channelAdminLogEventActionExportedInviteRevoke; + "channelAdminLogEventActionExportedInviteEdit": channelAdminLogEventActionExportedInviteEdit; + "channelAdminLogEventActionParticipantVolume": channelAdminLogEventActionParticipantVolume; + "channelAdminLogEventActionChangeHistoryTTL": channelAdminLogEventActionChangeHistoryTTL; + "channelAdminLogEventActionParticipantJoinByRequest": channelAdminLogEventActionParticipantJoinByRequest; + "channelAdminLogEventActionToggleNoForwards": channelAdminLogEventActionToggleNoForwards; + "channelAdminLogEventActionSendMessage": channelAdminLogEventActionSendMessage; + "channelAdminLogEventActionChangeAvailableReactions": channelAdminLogEventActionChangeAvailableReactions; + "channelAdminLogEventActionChangeUsernames": channelAdminLogEventActionChangeUsernames; + "channelAdminLogEventActionToggleForum": channelAdminLogEventActionToggleForum; + "channelAdminLogEventActionCreateTopic": channelAdminLogEventActionCreateTopic; + "channelAdminLogEventActionEditTopic": channelAdminLogEventActionEditTopic; + "channelAdminLogEventActionDeleteTopic": channelAdminLogEventActionDeleteTopic; + "channelAdminLogEventActionPinTopic": channelAdminLogEventActionPinTopic; + "channelAdminLogEventActionToggleAntiSpam": channelAdminLogEventActionToggleAntiSpam; + "channelAdminLogEventActionChangePeerColor": channelAdminLogEventActionChangePeerColor; + "channelAdminLogEventActionChangeProfilePeerColor": channelAdminLogEventActionChangeProfilePeerColor; + "channelAdminLogEventActionChangeWallpaper": channelAdminLogEventActionChangeWallpaper; + "channelAdminLogEventActionChangeEmojiStatus": channelAdminLogEventActionChangeEmojiStatus; + "channelAdminLogEventActionChangeEmojiStickerSet": channelAdminLogEventActionChangeEmojiStickerSet; + "channelAdminLogEvent": channelAdminLogEvent; + "channels.adminLogResults": channels_adminLogResults; + "channelAdminLogEventsFilter": channelAdminLogEventsFilter; + "popularContact": popularContact; + "messages.favedStickersNotModified": messages_favedStickersNotModified; + "messages.favedStickers": messages_favedStickers; + "recentMeUrlUnknown": recentMeUrlUnknown; + "recentMeUrlUser": recentMeUrlUser; + "recentMeUrlChat": recentMeUrlChat; + "recentMeUrlChatInvite": recentMeUrlChatInvite; + "recentMeUrlStickerSet": recentMeUrlStickerSet; + "help.recentMeUrls": help_recentMeUrls; + "inputSingleMedia": inputSingleMedia; + "webAuthorization": webAuthorization; + "account.webAuthorizations": account_webAuthorizations; + "inputMessageID": inputMessageID; + "inputMessageReplyTo": inputMessageReplyTo; + "inputMessagePinned": inputMessagePinned; + "inputMessageCallbackQuery": inputMessageCallbackQuery; + "inputDialogPeer": inputDialogPeer; + "inputDialogPeerFolder": inputDialogPeerFolder; + "dialogPeer": dialogPeer; + "dialogPeerFolder": dialogPeerFolder; + "messages.foundStickerSetsNotModified": messages_foundStickerSetsNotModified; + "messages.foundStickerSets": messages_foundStickerSets; + "fileHash": fileHash; + "inputClientProxy": inputClientProxy; + "help.termsOfServiceUpdateEmpty": help_termsOfServiceUpdateEmpty; + "help.termsOfServiceUpdate": help_termsOfServiceUpdate; + "inputSecureFileUploaded": inputSecureFileUploaded; + "inputSecureFile": inputSecureFile; + "secureFileEmpty": secureFileEmpty; + "secureFile": secureFile; + "secureData": secureData; + "securePlainPhone": securePlainPhone; + "securePlainEmail": securePlainEmail; + "secureValueTypePersonalDetails": secureValueTypePersonalDetails; + "secureValueTypePassport": secureValueTypePassport; + "secureValueTypeDriverLicense": secureValueTypeDriverLicense; + "secureValueTypeIdentityCard": secureValueTypeIdentityCard; + "secureValueTypeInternalPassport": secureValueTypeInternalPassport; + "secureValueTypeAddress": secureValueTypeAddress; + "secureValueTypeUtilityBill": secureValueTypeUtilityBill; + "secureValueTypeBankStatement": secureValueTypeBankStatement; + "secureValueTypeRentalAgreement": secureValueTypeRentalAgreement; + "secureValueTypePassportRegistration": secureValueTypePassportRegistration; + "secureValueTypeTemporaryRegistration": secureValueTypeTemporaryRegistration; + "secureValueTypePhone": secureValueTypePhone; + "secureValueTypeEmail": secureValueTypeEmail; + "secureValue": secureValue; + "inputSecureValue": inputSecureValue; + "secureValueHash": secureValueHash; + "secureValueErrorData": secureValueErrorData; + "secureValueErrorFrontSide": secureValueErrorFrontSide; + "secureValueErrorReverseSide": secureValueErrorReverseSide; + "secureValueErrorSelfie": secureValueErrorSelfie; + "secureValueErrorFile": secureValueErrorFile; + "secureValueErrorFiles": secureValueErrorFiles; + "secureValueError": secureValueError; + "secureValueErrorTranslationFile": secureValueErrorTranslationFile; + "secureValueErrorTranslationFiles": secureValueErrorTranslationFiles; + "secureCredentialsEncrypted": secureCredentialsEncrypted; + "account.authorizationForm": account_authorizationForm; + "account.sentEmailCode": account_sentEmailCode; + "help.deepLinkInfoEmpty": help_deepLinkInfoEmpty; + "help.deepLinkInfo": help_deepLinkInfo; + "savedPhoneContact": savedPhoneContact; + "account.takeout": account_takeout; + "passwordKdfAlgoUnknown": passwordKdfAlgoUnknown; + "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow": passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow; + "securePasswordKdfAlgoUnknown": securePasswordKdfAlgoUnknown; + "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000": securePasswordKdfAlgoPBKDF2HMACSHA512iter100000; + "securePasswordKdfAlgoSHA512": securePasswordKdfAlgoSHA512; + "secureSecretSettings": secureSecretSettings; + "inputCheckPasswordEmpty": inputCheckPasswordEmpty; + "inputCheckPasswordSRP": inputCheckPasswordSRP; + "secureRequiredType": secureRequiredType; + "secureRequiredTypeOneOf": secureRequiredTypeOneOf; + "help.passportConfigNotModified": help_passportConfigNotModified; + "help.passportConfig": help_passportConfig; + "inputAppEvent": inputAppEvent; + "jsonObjectValue": jsonObjectValue; + "jsonNull": jsonNull; + "jsonBool": jsonBool; + "jsonNumber": jsonNumber; + "jsonString": jsonString; + "jsonArray": jsonArray; + "jsonObject": jsonObject; + "pageTableCell": pageTableCell; + "pageTableRow": pageTableRow; + "pageCaption": pageCaption; + "pageListItemText": pageListItemText; + "pageListItemBlocks": pageListItemBlocks; + "pageListOrderedItemText": pageListOrderedItemText; + "pageListOrderedItemBlocks": pageListOrderedItemBlocks; + "pageRelatedArticle": pageRelatedArticle; + "page": page; + "help.supportName": help_supportName; + "help.userInfoEmpty": help_userInfoEmpty; + "help.userInfo": help_userInfo; + "pollAnswer": pollAnswer; + "poll": poll; + "pollAnswerVoters": pollAnswerVoters; + "pollResults": pollResults; + "chatOnlines": chatOnlines; + "statsURL": statsURL; + "chatAdminRights": chatAdminRights; + "chatBannedRights": chatBannedRights; + "inputWallPaper": inputWallPaper; + "inputWallPaperSlug": inputWallPaperSlug; + "inputWallPaperNoFile": inputWallPaperNoFile; + "account.wallPapersNotModified": account_wallPapersNotModified; + "account.wallPapers": account_wallPapers; + "codeSettings": codeSettings; + "wallPaperSettings": wallPaperSettings; + "autoDownloadSettings": autoDownloadSettings; + "account.autoDownloadSettings": account_autoDownloadSettings; + "emojiKeyword": emojiKeyword; + "emojiKeywordDeleted": emojiKeywordDeleted; + "emojiKeywordsDifference": emojiKeywordsDifference; + "emojiURL": emojiURL; + "emojiLanguage": emojiLanguage; + "folder": folder; + "inputFolderPeer": inputFolderPeer; + "folderPeer": folderPeer; + "messages.searchCounter": messages_searchCounter; + "urlAuthResultRequest": urlAuthResultRequest; + "urlAuthResultAccepted": urlAuthResultAccepted; + "urlAuthResultDefault": urlAuthResultDefault; + "channelLocationEmpty": channelLocationEmpty; + "channelLocation": channelLocation; + "peerLocated": peerLocated; + "peerSelfLocated": peerSelfLocated; + "restrictionReason": restrictionReason; + "inputTheme": inputTheme; + "inputThemeSlug": inputThemeSlug; + "theme": theme; + "account.themesNotModified": account_themesNotModified; + "account.themes": account_themes; + "auth.loginToken": auth_loginToken; + "auth.loginTokenMigrateTo": auth_loginTokenMigrateTo; + "auth.loginTokenSuccess": auth_loginTokenSuccess; + "account.contentSettings": account_contentSettings; + "messages.inactiveChats": messages_inactiveChats; + "baseThemeClassic": baseThemeClassic; + "baseThemeDay": baseThemeDay; + "baseThemeNight": baseThemeNight; + "baseThemeTinted": baseThemeTinted; + "baseThemeArctic": baseThemeArctic; + "inputThemeSettings": inputThemeSettings; + "themeSettings": themeSettings; + "webPageAttributeTheme": webPageAttributeTheme; + "webPageAttributeStory": webPageAttributeStory; + "messages.votesList": messages_votesList; + "bankCardOpenUrl": bankCardOpenUrl; + "payments.bankCardData": payments_bankCardData; + "dialogFilter": dialogFilter; + "dialogFilterDefault": dialogFilterDefault; + "dialogFilterChatlist": dialogFilterChatlist; + "dialogFilterSuggested": dialogFilterSuggested; + "statsDateRangeDays": statsDateRangeDays; + "statsAbsValueAndPrev": statsAbsValueAndPrev; + "statsPercentValue": statsPercentValue; + "statsGraphAsync": statsGraphAsync; + "statsGraphError": statsGraphError; + "statsGraph": statsGraph; + "stats.broadcastStats": stats_broadcastStats; + "help.promoDataEmpty": help_promoDataEmpty; + "help.promoData": help_promoData; + "videoSize": videoSize; + "videoSizeEmojiMarkup": videoSizeEmojiMarkup; + "videoSizeStickerMarkup": videoSizeStickerMarkup; + "statsGroupTopPoster": statsGroupTopPoster; + "statsGroupTopAdmin": statsGroupTopAdmin; + "statsGroupTopInviter": statsGroupTopInviter; + "stats.megagroupStats": stats_megagroupStats; + "globalPrivacySettings": globalPrivacySettings; + "help.countryCode": help_countryCode; + "help.country": help_country; + "help.countriesListNotModified": help_countriesListNotModified; + "help.countriesList": help_countriesList; + "messageViews": messageViews; + "messages.messageViews": messages_messageViews; + "messages.discussionMessage": messages_discussionMessage; + "messageReplyHeader": messageReplyHeader; + "messageReplyStoryHeader": messageReplyStoryHeader; + "messageReplies": messageReplies; + "peerBlocked": peerBlocked; + "stats.messageStats": stats_messageStats; + "groupCallDiscarded": groupCallDiscarded; + "groupCall": groupCall; + "inputGroupCall": inputGroupCall; + "groupCallParticipant": groupCallParticipant; + "phone.groupCall": phone_groupCall; + "phone.groupParticipants": phone_groupParticipants; + "inlineQueryPeerTypeSameBotPM": inlineQueryPeerTypeSameBotPM; + "inlineQueryPeerTypePM": inlineQueryPeerTypePM; + "inlineQueryPeerTypeChat": inlineQueryPeerTypeChat; + "inlineQueryPeerTypeMegagroup": inlineQueryPeerTypeMegagroup; + "inlineQueryPeerTypeBroadcast": inlineQueryPeerTypeBroadcast; + "inlineQueryPeerTypeBotPM": inlineQueryPeerTypeBotPM; + "messages.historyImport": messages_historyImport; + "messages.historyImportParsed": messages_historyImportParsed; + "messages.affectedFoundMessages": messages_affectedFoundMessages; + "chatInviteImporter": chatInviteImporter; + "messages.exportedChatInvites": messages_exportedChatInvites; + "messages.exportedChatInvite": messages_exportedChatInvite; + "messages.exportedChatInviteReplaced": messages_exportedChatInviteReplaced; + "messages.chatInviteImporters": messages_chatInviteImporters; + "chatAdminWithInvites": chatAdminWithInvites; + "messages.chatAdminsWithInvites": messages_chatAdminsWithInvites; + "messages.checkedHistoryImportPeer": messages_checkedHistoryImportPeer; + "phone.joinAsPeers": phone_joinAsPeers; + "phone.exportedGroupCallInvite": phone_exportedGroupCallInvite; + "groupCallParticipantVideoSourceGroup": groupCallParticipantVideoSourceGroup; + "groupCallParticipantVideo": groupCallParticipantVideo; + "stickers.suggestedShortName": stickers_suggestedShortName; + "botCommandScopeDefault": botCommandScopeDefault; + "botCommandScopeUsers": botCommandScopeUsers; + "botCommandScopeChats": botCommandScopeChats; + "botCommandScopeChatAdmins": botCommandScopeChatAdmins; + "botCommandScopePeer": botCommandScopePeer; + "botCommandScopePeerAdmins": botCommandScopePeerAdmins; + "botCommandScopePeerUser": botCommandScopePeerUser; + "account.resetPasswordFailedWait": account_resetPasswordFailedWait; + "account.resetPasswordRequestedWait": account_resetPasswordRequestedWait; + "account.resetPasswordOk": account_resetPasswordOk; + "sponsoredMessage": sponsoredMessage; + "messages.sponsoredMessages": messages_sponsoredMessages; + "messages.sponsoredMessagesEmpty": messages_sponsoredMessagesEmpty; + "searchResultsCalendarPeriod": searchResultsCalendarPeriod; + "messages.searchResultsCalendar": messages_searchResultsCalendar; + "searchResultPosition": searchResultPosition; + "messages.searchResultsPositions": messages_searchResultsPositions; + "channels.sendAsPeers": channels_sendAsPeers; + "users.userFull": users_userFull; + "messages.peerSettings": messages_peerSettings; + "auth.loggedOut": auth_loggedOut; + "reactionCount": reactionCount; + "messageReactions": messageReactions; + "messages.messageReactionsList": messages_messageReactionsList; + "availableReaction": availableReaction; + "messages.availableReactionsNotModified": messages_availableReactionsNotModified; + "messages.availableReactions": messages_availableReactions; + "messagePeerReaction": messagePeerReaction; + "groupCallStreamChannel": groupCallStreamChannel; + "phone.groupCallStreamChannels": phone_groupCallStreamChannels; + "phone.groupCallStreamRtmpUrl": phone_groupCallStreamRtmpUrl; + "attachMenuBotIconColor": attachMenuBotIconColor; + "attachMenuBotIcon": attachMenuBotIcon; + "attachMenuBot": attachMenuBot; + "attachMenuBotsNotModified": attachMenuBotsNotModified; + "attachMenuBots": attachMenuBots; + "attachMenuBotsBot": attachMenuBotsBot; + "webViewResultUrl": webViewResultUrl; + "simpleWebViewResultUrl": simpleWebViewResultUrl; + "webViewMessageSent": webViewMessageSent; + "botMenuButtonDefault": botMenuButtonDefault; + "botMenuButtonCommands": botMenuButtonCommands; + "botMenuButton": botMenuButton; + "account.savedRingtonesNotModified": account_savedRingtonesNotModified; + "account.savedRingtones": account_savedRingtones; + "notificationSoundDefault": notificationSoundDefault; + "notificationSoundNone": notificationSoundNone; + "notificationSoundLocal": notificationSoundLocal; + "notificationSoundRingtone": notificationSoundRingtone; + "account.savedRingtone": account_savedRingtone; + "account.savedRingtoneConverted": account_savedRingtoneConverted; + "attachMenuPeerTypeSameBotPM": attachMenuPeerTypeSameBotPM; + "attachMenuPeerTypeBotPM": attachMenuPeerTypeBotPM; + "attachMenuPeerTypePM": attachMenuPeerTypePM; + "attachMenuPeerTypeChat": attachMenuPeerTypeChat; + "attachMenuPeerTypeBroadcast": attachMenuPeerTypeBroadcast; + "inputInvoiceMessage": inputInvoiceMessage; + "inputInvoiceSlug": inputInvoiceSlug; + "inputInvoicePremiumGiftCode": inputInvoicePremiumGiftCode; + "payments.exportedInvoice": payments_exportedInvoice; + "messages.transcribedAudio": messages_transcribedAudio; + "help.premiumPromo": help_premiumPromo; + "inputStorePaymentPremiumSubscription": inputStorePaymentPremiumSubscription; + "inputStorePaymentGiftPremium": inputStorePaymentGiftPremium; + "inputStorePaymentPremiumGiftCode": inputStorePaymentPremiumGiftCode; + "inputStorePaymentPremiumGiveaway": inputStorePaymentPremiumGiveaway; + "premiumGiftOption": premiumGiftOption; + "paymentFormMethod": paymentFormMethod; + "emojiStatusEmpty": emojiStatusEmpty; + "emojiStatus": emojiStatus; + "emojiStatusUntil": emojiStatusUntil; + "account.emojiStatusesNotModified": account_emojiStatusesNotModified; + "account.emojiStatuses": account_emojiStatuses; + "reactionEmpty": reactionEmpty; + "reactionEmoji": reactionEmoji; + "reactionCustomEmoji": reactionCustomEmoji; + "chatReactionsNone": chatReactionsNone; + "chatReactionsAll": chatReactionsAll; + "chatReactionsSome": chatReactionsSome; + "messages.reactionsNotModified": messages_reactionsNotModified; + "messages.reactions": messages_reactions; + "emailVerifyPurposeLoginSetup": emailVerifyPurposeLoginSetup; + "emailVerifyPurposeLoginChange": emailVerifyPurposeLoginChange; + "emailVerifyPurposePassport": emailVerifyPurposePassport; + "emailVerificationCode": emailVerificationCode; + "emailVerificationGoogle": emailVerificationGoogle; + "emailVerificationApple": emailVerificationApple; + "account.emailVerified": account_emailVerified; + "account.emailVerifiedLogin": account_emailVerifiedLogin; + "premiumSubscriptionOption": premiumSubscriptionOption; + "sendAsPeer": sendAsPeer; + "messageExtendedMediaPreview": messageExtendedMediaPreview; + "messageExtendedMedia": messageExtendedMedia; + "stickerKeyword": stickerKeyword; + "username": username; + "forumTopicDeleted": forumTopicDeleted; + "forumTopic": forumTopic; + "messages.forumTopics": messages_forumTopics; + "defaultHistoryTTL": defaultHistoryTTL; + "exportedContactToken": exportedContactToken; + "requestPeerTypeUser": requestPeerTypeUser; + "requestPeerTypeChat": requestPeerTypeChat; + "requestPeerTypeBroadcast": requestPeerTypeBroadcast; + "emojiListNotModified": emojiListNotModified; + "emojiList": emojiList; + "emojiGroup": emojiGroup; + "messages.emojiGroupsNotModified": messages_emojiGroupsNotModified; + "messages.emojiGroups": messages_emojiGroups; + "textWithEntities": textWithEntities; + "messages.translateResult": messages_translateResult; + "autoSaveSettings": autoSaveSettings; + "autoSaveException": autoSaveException; + "account.autoSaveSettings": account_autoSaveSettings; + "help.appConfigNotModified": help_appConfigNotModified; + "help.appConfig": help_appConfig; + "inputBotAppID": inputBotAppID; + "inputBotAppShortName": inputBotAppShortName; + "botAppNotModified": botAppNotModified; + "botApp": botApp; + "messages.botApp": messages_botApp; + "appWebViewResultUrl": appWebViewResultUrl; + "inlineBotWebView": inlineBotWebView; + "readParticipantDate": readParticipantDate; + "inputChatlistDialogFilter": inputChatlistDialogFilter; + "exportedChatlistInvite": exportedChatlistInvite; + "chatlists.exportedChatlistInvite": chatlists_exportedChatlistInvite; + "chatlists.exportedInvites": chatlists_exportedInvites; + "chatlists.chatlistInviteAlready": chatlists_chatlistInviteAlready; + "chatlists.chatlistInvite": chatlists_chatlistInvite; + "chatlists.chatlistUpdates": chatlists_chatlistUpdates; + "bots.botInfo": bots_botInfo; + "messagePeerVote": messagePeerVote; + "messagePeerVoteInputOption": messagePeerVoteInputOption; + "messagePeerVoteMultiple": messagePeerVoteMultiple; + "sponsoredWebPage": sponsoredWebPage; + "storyViews": storyViews; + "storyItemDeleted": storyItemDeleted; + "storyItemSkipped": storyItemSkipped; + "storyItem": storyItem; + "stories.allStoriesNotModified": stories_allStoriesNotModified; + "stories.allStories": stories_allStories; + "stories.stories": stories_stories; + "storyView": storyView; + "storyViewPublicForward": storyViewPublicForward; + "storyViewPublicRepost": storyViewPublicRepost; + "stories.storyViewsList": stories_storyViewsList; + "stories.storyViews": stories_storyViews; + "inputReplyToMessage": inputReplyToMessage; + "inputReplyToStory": inputReplyToStory; + "exportedStoryLink": exportedStoryLink; + "storiesStealthMode": storiesStealthMode; + "mediaAreaCoordinates": mediaAreaCoordinates; + "mediaAreaVenue": mediaAreaVenue; + "inputMediaAreaVenue": inputMediaAreaVenue; + "mediaAreaGeoPoint": mediaAreaGeoPoint; + "mediaAreaSuggestedReaction": mediaAreaSuggestedReaction; + "mediaAreaChannelPost": mediaAreaChannelPost; + "inputMediaAreaChannelPost": inputMediaAreaChannelPost; + "peerStories": peerStories; + "stories.peerStories": stories_peerStories; + "messages.webPage": messages_webPage; + "premiumGiftCodeOption": premiumGiftCodeOption; + "payments.checkedGiftCode": payments_checkedGiftCode; + "payments.giveawayInfo": payments_giveawayInfo; + "payments.giveawayInfoResults": payments_giveawayInfoResults; + "prepaidGiveaway": prepaidGiveaway; + "boost": boost; + "premium.boostsList": premium_boostsList; + "myBoost": myBoost; + "premium.myBoosts": premium_myBoosts; + "premium.boostsStatus": premium_boostsStatus; + "storyFwdHeader": storyFwdHeader; + "postInteractionCountersMessage": postInteractionCountersMessage; + "postInteractionCountersStory": postInteractionCountersStory; + "stats.storyStats": stats_storyStats; + "publicForwardMessage": publicForwardMessage; + "publicForwardStory": publicForwardStory; + "stats.publicForwards": stats_publicForwards; + "peerColor": peerColor; + "help.peerColorSet": help_peerColorSet; + "help.peerColorProfileSet": help_peerColorProfileSet; + "help.peerColorOption": help_peerColorOption; + "help.peerColorsNotModified": help_peerColorsNotModified; + "help.peerColors": help_peerColors; + "storyReaction": storyReaction; + "storyReactionPublicForward": storyReactionPublicForward; + "storyReactionPublicRepost": storyReactionPublicRepost; + "stories.storyReactionsList": stories_storyReactionsList; + "savedDialog": savedDialog; + "messages.savedDialogs": messages_savedDialogs; + "messages.savedDialogsSlice": messages_savedDialogsSlice; + "messages.savedDialogsNotModified": messages_savedDialogsNotModified; + "savedReactionTag": savedReactionTag; + "messages.savedReactionTagsNotModified": messages_savedReactionTagsNotModified; + "messages.savedReactionTags": messages_savedReactionTags; + "outboxReadDate": outboxReadDate; + "smsjobs.eligibleToJoin": smsjobs_eligibleToJoin; + "smsjobs.status": smsjobs_status; + "smsJob": smsJob; + "businessWeeklyOpen": businessWeeklyOpen; + "businessWorkHours": businessWorkHours; + "businessLocation": businessLocation; + "inputBusinessRecipients": inputBusinessRecipients; + "businessRecipients": businessRecipients; + "businessAwayMessageScheduleAlways": businessAwayMessageScheduleAlways; + "businessAwayMessageScheduleOutsideWorkHours": businessAwayMessageScheduleOutsideWorkHours; + "businessAwayMessageScheduleCustom": businessAwayMessageScheduleCustom; + "inputBusinessGreetingMessage": inputBusinessGreetingMessage; + "businessGreetingMessage": businessGreetingMessage; + "inputBusinessAwayMessage": inputBusinessAwayMessage; + "businessAwayMessage": businessAwayMessage; + "timezone": timezone; + "help.timezonesListNotModified": help_timezonesListNotModified; + "help.timezonesList": help_timezonesList; + "quickReply": quickReply; + "inputQuickReplyShortcut": inputQuickReplyShortcut; + "inputQuickReplyShortcutId": inputQuickReplyShortcutId; + "messages.quickReplies": messages_quickReplies; + "messages.quickRepliesNotModified": messages_quickRepliesNotModified; + "connectedBot": connectedBot; + "account.connectedBots": account_connectedBots; + "messages.dialogFilters": messages_dialogFilters; + "birthday": birthday; + "botBusinessConnection": botBusinessConnection; + "inputBusinessIntro": inputBusinessIntro; + "businessIntro": businessIntro; + "messages.myStickers": messages_myStickers; + "inputCollectibleUsername": inputCollectibleUsername; + "inputCollectiblePhone": inputCollectiblePhone; + "fragment.collectibleInfo": fragment_collectibleInfo; + "inputBusinessBotRecipients": inputBusinessBotRecipients; + "businessBotRecipients": businessBotRecipients; + "contactBirthday": contactBirthday; + "contacts.contactBirthdays": contacts_contactBirthdays; + "missingInvitee": missingInvitee; + "messages.invitedUsers": messages_invitedUsers; + "inputBusinessChatLink": inputBusinessChatLink; + "businessChatLink": businessChatLink; + "account.businessChatLinks": account_businessChatLinks; + "account.resolvedBusinessChatLinks": account_resolvedBusinessChatLinks; + "requestedPeerUser": requestedPeerUser; + "requestedPeerChat": requestedPeerChat; + "requestedPeerChannel": requestedPeerChannel; + "sponsoredMessageReportOption": sponsoredMessageReportOption; + "channels.sponsoredMessageReportResultChooseOption": channels_sponsoredMessageReportResultChooseOption; + "channels.sponsoredMessageReportResultAdsHidden": channels_sponsoredMessageReportResultAdsHidden; + "channels.sponsoredMessageReportResultReported": channels_sponsoredMessageReportResultReported; + "stats.broadcastRevenueStats": stats_broadcastRevenueStats; + "stats.broadcastRevenueWithdrawalUrl": stats_broadcastRevenueWithdrawalUrl; + "broadcastRevenueTransactionProceeds": broadcastRevenueTransactionProceeds; + "broadcastRevenueTransactionWithdrawal": broadcastRevenueTransactionWithdrawal; + "broadcastRevenueTransactionRefund": broadcastRevenueTransactionRefund; + "stats.broadcastRevenueTransactions": stats_broadcastRevenueTransactions; +} + +export interface Functions { + "req_pq_multi": req_pq_multi; + "req_DH_params": req_DH_params; + "set_client_DH_params": set_client_DH_params; + "rpc_drop_answer": rpc_drop_answer; + "get_future_salts": get_future_salts; + "ping": ping; + "ping_delay_disconnect": ping_delay_disconnect; + "destroy_session": destroy_session; + "destroy_auth_key": destroy_auth_key; + "invokeWithBusinessConnectionPrefix": invokeWithBusinessConnectionPrefix; + "invokeAfterMsg": invokeAfterMsg; + "invokeAfterMsgs": invokeAfterMsgs; + "initConnection": initConnection; + "invokeWithLayer": invokeWithLayer; + "invokeWithoutUpdates": invokeWithoutUpdates; + "invokeWithMessagesRange": invokeWithMessagesRange; + "invokeWithTakeout": invokeWithTakeout; + "invokeWithBusinessConnection": invokeWithBusinessConnection; + "auth.sendCode": auth_sendCode; + "auth.signUp": auth_signUp; + "auth.signIn": auth_signIn; + "auth.logOut": auth_logOut; + "auth.resetAuthorizations": auth_resetAuthorizations; + "auth.exportAuthorization": auth_exportAuthorization; + "auth.importAuthorization": auth_importAuthorization; + "auth.bindTempAuthKey": auth_bindTempAuthKey; + "auth.importBotAuthorization": auth_importBotAuthorization; + "auth.checkPassword": auth_checkPassword; + "auth.requestPasswordRecovery": auth_requestPasswordRecovery; + "auth.recoverPassword": auth_recoverPassword; + "auth.resendCode": auth_resendCode; + "auth.cancelCode": auth_cancelCode; + "auth.dropTempAuthKeys": auth_dropTempAuthKeys; + "auth.exportLoginToken": auth_exportLoginToken; + "auth.importLoginToken": auth_importLoginToken; + "auth.acceptLoginToken": auth_acceptLoginToken; + "auth.checkRecoveryPassword": auth_checkRecoveryPassword; + "auth.importWebTokenAuthorization": auth_importWebTokenAuthorization; + "auth.requestFirebaseSms": auth_requestFirebaseSms; + "auth.resetLoginEmail": auth_resetLoginEmail; + "account.registerDevice": account_registerDevice; + "account.unregisterDevice": account_unregisterDevice; + "account.updateNotifySettings": account_updateNotifySettings; + "account.getNotifySettings": account_getNotifySettings; + "account.resetNotifySettings": account_resetNotifySettings; + "account.updateProfile": account_updateProfile; + "account.updateStatus": account_updateStatus; + "account.getWallPapers": account_getWallPapers; + "account.reportPeer": account_reportPeer; + "account.checkUsername": account_checkUsername; + "account.updateUsername": account_updateUsername; + "account.getPrivacy": account_getPrivacy; + "account.setPrivacy": account_setPrivacy; + "account.deleteAccount": account_deleteAccount; + "account.getAccountTTL": account_getAccountTTL; + "account.setAccountTTL": account_setAccountTTL; + "account.sendChangePhoneCode": account_sendChangePhoneCode; + "account.changePhone": account_changePhone; + "account.updateDeviceLocked": account_updateDeviceLocked; + "account.getAuthorizations": account_getAuthorizations; + "account.resetAuthorization": account_resetAuthorization; + "account.getPassword": account_getPassword; + "account.getPasswordSettings": account_getPasswordSettings; + "account.updatePasswordSettings": account_updatePasswordSettings; + "account.sendConfirmPhoneCode": account_sendConfirmPhoneCode; + "account.confirmPhone": account_confirmPhone; + "account.getTmpPassword": account_getTmpPassword; + "account.getWebAuthorizations": account_getWebAuthorizations; + "account.resetWebAuthorization": account_resetWebAuthorization; + "account.resetWebAuthorizations": account_resetWebAuthorizations; + "account.getAllSecureValues": account_getAllSecureValues; + "account.getSecureValue": account_getSecureValue; + "account.saveSecureValue": account_saveSecureValue; + "account.deleteSecureValue": account_deleteSecureValue; + "account.getAuthorizationForm": account_getAuthorizationForm; + "account.acceptAuthorization": account_acceptAuthorization; + "account.sendVerifyPhoneCode": account_sendVerifyPhoneCode; + "account.verifyPhone": account_verifyPhone; + "account.sendVerifyEmailCode": account_sendVerifyEmailCode; + "account.verifyEmail": account_verifyEmail; + "account.initTakeoutSession": account_initTakeoutSession; + "account.finishTakeoutSession": account_finishTakeoutSession; + "account.confirmPasswordEmail": account_confirmPasswordEmail; + "account.resendPasswordEmail": account_resendPasswordEmail; + "account.cancelPasswordEmail": account_cancelPasswordEmail; + "account.getContactSignUpNotification": account_getContactSignUpNotification; + "account.setContactSignUpNotification": account_setContactSignUpNotification; + "account.getNotifyExceptions": account_getNotifyExceptions; + "account.getWallPaper": account_getWallPaper; + "account.uploadWallPaper": account_uploadWallPaper; + "account.saveWallPaper": account_saveWallPaper; + "account.installWallPaper": account_installWallPaper; + "account.resetWallPapers": account_resetWallPapers; + "account.getAutoDownloadSettings": account_getAutoDownloadSettings; + "account.saveAutoDownloadSettings": account_saveAutoDownloadSettings; + "account.uploadTheme": account_uploadTheme; + "account.createTheme": account_createTheme; + "account.updateTheme": account_updateTheme; + "account.saveTheme": account_saveTheme; + "account.installTheme": account_installTheme; + "account.getTheme": account_getTheme; + "account.getThemes": account_getThemes; + "account.setContentSettings": account_setContentSettings; + "account.getContentSettings": account_getContentSettings; + "account.getMultiWallPapers": account_getMultiWallPapers; + "account.getGlobalPrivacySettings": account_getGlobalPrivacySettings; + "account.setGlobalPrivacySettings": account_setGlobalPrivacySettings; + "account.reportProfilePhoto": account_reportProfilePhoto; + "account.resetPassword": account_resetPassword; + "account.declinePasswordReset": account_declinePasswordReset; + "account.getChatThemes": account_getChatThemes; + "account.setAuthorizationTTL": account_setAuthorizationTTL; + "account.changeAuthorizationSettings": account_changeAuthorizationSettings; + "account.getSavedRingtones": account_getSavedRingtones; + "account.saveRingtone": account_saveRingtone; + "account.uploadRingtone": account_uploadRingtone; + "account.updateEmojiStatus": account_updateEmojiStatus; + "account.getDefaultEmojiStatuses": account_getDefaultEmojiStatuses; + "account.getRecentEmojiStatuses": account_getRecentEmojiStatuses; + "account.clearRecentEmojiStatuses": account_clearRecentEmojiStatuses; + "account.reorderUsernames": account_reorderUsernames; + "account.toggleUsername": account_toggleUsername; + "account.getDefaultProfilePhotoEmojis": account_getDefaultProfilePhotoEmojis; + "account.getDefaultGroupPhotoEmojis": account_getDefaultGroupPhotoEmojis; + "account.getAutoSaveSettings": account_getAutoSaveSettings; + "account.saveAutoSaveSettings": account_saveAutoSaveSettings; + "account.deleteAutoSaveExceptions": account_deleteAutoSaveExceptions; + "account.invalidateSignInCodes": account_invalidateSignInCodes; + "account.updateColor": account_updateColor; + "account.getDefaultBackgroundEmojis": account_getDefaultBackgroundEmojis; + "account.getChannelDefaultEmojiStatuses": account_getChannelDefaultEmojiStatuses; + "account.getChannelRestrictedStatusEmojis": account_getChannelRestrictedStatusEmojis; + "account.updateBusinessWorkHours": account_updateBusinessWorkHours; + "account.updateBusinessLocation": account_updateBusinessLocation; + "account.updateBusinessGreetingMessage": account_updateBusinessGreetingMessage; + "account.updateBusinessAwayMessage": account_updateBusinessAwayMessage; + "account.updateConnectedBot": account_updateConnectedBot; + "account.getConnectedBots": account_getConnectedBots; + "account.getBotBusinessConnection": account_getBotBusinessConnection; + "account.updateBusinessIntro": account_updateBusinessIntro; + "account.toggleConnectedBotPaused": account_toggleConnectedBotPaused; + "account.disablePeerConnectedBot": account_disablePeerConnectedBot; + "account.updateBirthday": account_updateBirthday; + "account.createBusinessChatLink": account_createBusinessChatLink; + "account.editBusinessChatLink": account_editBusinessChatLink; + "account.deleteBusinessChatLink": account_deleteBusinessChatLink; + "account.getBusinessChatLinks": account_getBusinessChatLinks; + "account.resolveBusinessChatLink": account_resolveBusinessChatLink; + "account.updatePersonalChannel": account_updatePersonalChannel; + "users.getUsers": users_getUsers; + "users.getFullUser": users_getFullUser; + "users.setSecureValueErrors": users_setSecureValueErrors; + "users.getIsPremiumRequiredToContact": users_getIsPremiumRequiredToContact; + "contacts.getContactIDs": contacts_getContactIDs; + "contacts.getStatuses": contacts_getStatuses; + "contacts.getContacts": contacts_getContacts; + "contacts.importContacts": contacts_importContacts; + "contacts.deleteContacts": contacts_deleteContacts; + "contacts.deleteByPhones": contacts_deleteByPhones; + "contacts.block": contacts_block; + "contacts.unblock": contacts_unblock; + "contacts.getBlocked": contacts_getBlocked; + "contacts.search": contacts_search; + "contacts.resolveUsername": contacts_resolveUsername; + "contacts.getTopPeers": contacts_getTopPeers; + "contacts.resetTopPeerRating": contacts_resetTopPeerRating; + "contacts.resetSaved": contacts_resetSaved; + "contacts.getSaved": contacts_getSaved; + "contacts.toggleTopPeers": contacts_toggleTopPeers; + "contacts.addContact": contacts_addContact; + "contacts.acceptContact": contacts_acceptContact; + "contacts.getLocated": contacts_getLocated; + "contacts.blockFromReplies": contacts_blockFromReplies; + "contacts.resolvePhone": contacts_resolvePhone; + "contacts.exportContactToken": contacts_exportContactToken; + "contacts.importContactToken": contacts_importContactToken; + "contacts.editCloseFriends": contacts_editCloseFriends; + "contacts.setBlocked": contacts_setBlocked; + "contacts.getBirthdays": contacts_getBirthdays; + "messages.getMessages": messages_getMessages; + "messages.getDialogs": messages_getDialogs; + "messages.getHistory": messages_getHistory; + "messages.search": messages_search; + "messages.readHistory": messages_readHistory; + "messages.deleteHistory": messages_deleteHistory; + "messages.deleteMessages": messages_deleteMessages; + "messages.receivedMessages": messages_receivedMessages; + "messages.setTyping": messages_setTyping; + "messages.sendMessage": messages_sendMessage; + "messages.sendMedia": messages_sendMedia; + "messages.forwardMessages": messages_forwardMessages; + "messages.reportSpam": messages_reportSpam; + "messages.getPeerSettings": messages_getPeerSettings; + "messages.report": messages_report; + "messages.getChats": messages_getChats; + "messages.getFullChat": messages_getFullChat; + "messages.editChatTitle": messages_editChatTitle; + "messages.editChatPhoto": messages_editChatPhoto; + "messages.addChatUser": messages_addChatUser; + "messages.deleteChatUser": messages_deleteChatUser; + "messages.createChat": messages_createChat; + "messages.getDhConfig": messages_getDhConfig; + "messages.requestEncryption": messages_requestEncryption; + "messages.acceptEncryption": messages_acceptEncryption; + "messages.discardEncryption": messages_discardEncryption; + "messages.setEncryptedTyping": messages_setEncryptedTyping; + "messages.readEncryptedHistory": messages_readEncryptedHistory; + "messages.sendEncrypted": messages_sendEncrypted; + "messages.sendEncryptedFile": messages_sendEncryptedFile; + "messages.sendEncryptedService": messages_sendEncryptedService; + "messages.receivedQueue": messages_receivedQueue; + "messages.reportEncryptedSpam": messages_reportEncryptedSpam; + "messages.readMessageContents": messages_readMessageContents; + "messages.getStickers": messages_getStickers; + "messages.getAllStickers": messages_getAllStickers; + "messages.getWebPagePreview": messages_getWebPagePreview; + "messages.exportChatInvite": messages_exportChatInvite; + "messages.checkChatInvite": messages_checkChatInvite; + "messages.importChatInvite": messages_importChatInvite; + "messages.getStickerSet": messages_getStickerSet; + "messages.installStickerSet": messages_installStickerSet; + "messages.uninstallStickerSet": messages_uninstallStickerSet; + "messages.startBot": messages_startBot; + "messages.getMessagesViews": messages_getMessagesViews; + "messages.editChatAdmin": messages_editChatAdmin; + "messages.migrateChat": messages_migrateChat; + "messages.searchGlobal": messages_searchGlobal; + "messages.reorderStickerSets": messages_reorderStickerSets; + "messages.getDocumentByHash": messages_getDocumentByHash; + "messages.getSavedGifs": messages_getSavedGifs; + "messages.saveGif": messages_saveGif; + "messages.getInlineBotResults": messages_getInlineBotResults; + "messages.setInlineBotResults": messages_setInlineBotResults; + "messages.sendInlineBotResult": messages_sendInlineBotResult; + "messages.getMessageEditData": messages_getMessageEditData; + "messages.editMessage": messages_editMessage; + "messages.editInlineBotMessage": messages_editInlineBotMessage; + "messages.getBotCallbackAnswer": messages_getBotCallbackAnswer; + "messages.setBotCallbackAnswer": messages_setBotCallbackAnswer; + "messages.getPeerDialogs": messages_getPeerDialogs; + "messages.saveDraft": messages_saveDraft; + "messages.getAllDrafts": messages_getAllDrafts; + "messages.getFeaturedStickers": messages_getFeaturedStickers; + "messages.readFeaturedStickers": messages_readFeaturedStickers; + "messages.getRecentStickers": messages_getRecentStickers; + "messages.saveRecentSticker": messages_saveRecentSticker; + "messages.clearRecentStickers": messages_clearRecentStickers; + "messages.getArchivedStickers": messages_getArchivedStickers; + "messages.getMaskStickers": messages_getMaskStickers; + "messages.getAttachedStickers": messages_getAttachedStickers; + "messages.setGameScore": messages_setGameScore; + "messages.setInlineGameScore": messages_setInlineGameScore; + "messages.getGameHighScores": messages_getGameHighScores; + "messages.getInlineGameHighScores": messages_getInlineGameHighScores; + "messages.getCommonChats": messages_getCommonChats; + "messages.getWebPage": messages_getWebPage; + "messages.toggleDialogPin": messages_toggleDialogPin; + "messages.reorderPinnedDialogs": messages_reorderPinnedDialogs; + "messages.getPinnedDialogs": messages_getPinnedDialogs; + "messages.setBotShippingResults": messages_setBotShippingResults; + "messages.setBotPrecheckoutResults": messages_setBotPrecheckoutResults; + "messages.uploadMedia": messages_uploadMedia; + "messages.sendScreenshotNotification": messages_sendScreenshotNotification; + "messages.getFavedStickers": messages_getFavedStickers; + "messages.faveSticker": messages_faveSticker; + "messages.getUnreadMentions": messages_getUnreadMentions; + "messages.readMentions": messages_readMentions; + "messages.getRecentLocations": messages_getRecentLocations; + "messages.sendMultiMedia": messages_sendMultiMedia; + "messages.uploadEncryptedFile": messages_uploadEncryptedFile; + "messages.searchStickerSets": messages_searchStickerSets; + "messages.getSplitRanges": messages_getSplitRanges; + "messages.markDialogUnread": messages_markDialogUnread; + "messages.getDialogUnreadMarks": messages_getDialogUnreadMarks; + "messages.clearAllDrafts": messages_clearAllDrafts; + "messages.updatePinnedMessage": messages_updatePinnedMessage; + "messages.sendVote": messages_sendVote; + "messages.getPollResults": messages_getPollResults; + "messages.getOnlines": messages_getOnlines; + "messages.editChatAbout": messages_editChatAbout; + "messages.editChatDefaultBannedRights": messages_editChatDefaultBannedRights; + "messages.getEmojiKeywords": messages_getEmojiKeywords; + "messages.getEmojiKeywordsDifference": messages_getEmojiKeywordsDifference; + "messages.getEmojiKeywordsLanguages": messages_getEmojiKeywordsLanguages; + "messages.getEmojiURL": messages_getEmojiURL; + "messages.getSearchCounters": messages_getSearchCounters; + "messages.requestUrlAuth": messages_requestUrlAuth; + "messages.acceptUrlAuth": messages_acceptUrlAuth; + "messages.hidePeerSettingsBar": messages_hidePeerSettingsBar; + "messages.getScheduledHistory": messages_getScheduledHistory; + "messages.getScheduledMessages": messages_getScheduledMessages; + "messages.sendScheduledMessages": messages_sendScheduledMessages; + "messages.deleteScheduledMessages": messages_deleteScheduledMessages; + "messages.getPollVotes": messages_getPollVotes; + "messages.toggleStickerSets": messages_toggleStickerSets; + "messages.getDialogFilters": messages_getDialogFilters; + "messages.getSuggestedDialogFilters": messages_getSuggestedDialogFilters; + "messages.updateDialogFilter": messages_updateDialogFilter; + "messages.updateDialogFiltersOrder": messages_updateDialogFiltersOrder; + "messages.getOldFeaturedStickers": messages_getOldFeaturedStickers; + "messages.getReplies": messages_getReplies; + "messages.getDiscussionMessage": messages_getDiscussionMessage; + "messages.readDiscussion": messages_readDiscussion; + "messages.unpinAllMessages": messages_unpinAllMessages; + "messages.deleteChat": messages_deleteChat; + "messages.deletePhoneCallHistory": messages_deletePhoneCallHistory; + "messages.checkHistoryImport": messages_checkHistoryImport; + "messages.initHistoryImport": messages_initHistoryImport; + "messages.uploadImportedMedia": messages_uploadImportedMedia; + "messages.startHistoryImport": messages_startHistoryImport; + "messages.getExportedChatInvites": messages_getExportedChatInvites; + "messages.getExportedChatInvite": messages_getExportedChatInvite; + "messages.editExportedChatInvite": messages_editExportedChatInvite; + "messages.deleteRevokedExportedChatInvites": messages_deleteRevokedExportedChatInvites; + "messages.deleteExportedChatInvite": messages_deleteExportedChatInvite; + "messages.getAdminsWithInvites": messages_getAdminsWithInvites; + "messages.getChatInviteImporters": messages_getChatInviteImporters; + "messages.setHistoryTTL": messages_setHistoryTTL; + "messages.checkHistoryImportPeer": messages_checkHistoryImportPeer; + "messages.setChatTheme": messages_setChatTheme; + "messages.getMessageReadParticipants": messages_getMessageReadParticipants; + "messages.getSearchResultsCalendar": messages_getSearchResultsCalendar; + "messages.getSearchResultsPositions": messages_getSearchResultsPositions; + "messages.hideChatJoinRequest": messages_hideChatJoinRequest; + "messages.hideAllChatJoinRequests": messages_hideAllChatJoinRequests; + "messages.toggleNoForwards": messages_toggleNoForwards; + "messages.saveDefaultSendAs": messages_saveDefaultSendAs; + "messages.sendReaction": messages_sendReaction; + "messages.getMessagesReactions": messages_getMessagesReactions; + "messages.getMessageReactionsList": messages_getMessageReactionsList; + "messages.setChatAvailableReactions": messages_setChatAvailableReactions; + "messages.getAvailableReactions": messages_getAvailableReactions; + "messages.setDefaultReaction": messages_setDefaultReaction; + "messages.translateText": messages_translateText; + "messages.getUnreadReactions": messages_getUnreadReactions; + "messages.readReactions": messages_readReactions; + "messages.searchSentMedia": messages_searchSentMedia; + "messages.getAttachMenuBots": messages_getAttachMenuBots; + "messages.getAttachMenuBot": messages_getAttachMenuBot; + "messages.toggleBotInAttachMenu": messages_toggleBotInAttachMenu; + "messages.requestWebView": messages_requestWebView; + "messages.prolongWebView": messages_prolongWebView; + "messages.requestSimpleWebView": messages_requestSimpleWebView; + "messages.sendWebViewResultMessage": messages_sendWebViewResultMessage; + "messages.sendWebViewData": messages_sendWebViewData; + "messages.transcribeAudio": messages_transcribeAudio; + "messages.rateTranscribedAudio": messages_rateTranscribedAudio; + "messages.getCustomEmojiDocuments": messages_getCustomEmojiDocuments; + "messages.getEmojiStickers": messages_getEmojiStickers; + "messages.getFeaturedEmojiStickers": messages_getFeaturedEmojiStickers; + "messages.reportReaction": messages_reportReaction; + "messages.getTopReactions": messages_getTopReactions; + "messages.getRecentReactions": messages_getRecentReactions; + "messages.clearRecentReactions": messages_clearRecentReactions; + "messages.getExtendedMedia": messages_getExtendedMedia; + "messages.setDefaultHistoryTTL": messages_setDefaultHistoryTTL; + "messages.getDefaultHistoryTTL": messages_getDefaultHistoryTTL; + "messages.sendBotRequestedPeer": messages_sendBotRequestedPeer; + "messages.getEmojiGroups": messages_getEmojiGroups; + "messages.getEmojiStatusGroups": messages_getEmojiStatusGroups; + "messages.getEmojiProfilePhotoGroups": messages_getEmojiProfilePhotoGroups; + "messages.searchCustomEmoji": messages_searchCustomEmoji; + "messages.togglePeerTranslations": messages_togglePeerTranslations; + "messages.getBotApp": messages_getBotApp; + "messages.requestAppWebView": messages_requestAppWebView; + "messages.setChatWallPaper": messages_setChatWallPaper; + "messages.searchEmojiStickerSets": messages_searchEmojiStickerSets; + "messages.getSavedDialogs": messages_getSavedDialogs; + "messages.getSavedHistory": messages_getSavedHistory; + "messages.deleteSavedHistory": messages_deleteSavedHistory; + "messages.getPinnedSavedDialogs": messages_getPinnedSavedDialogs; + "messages.toggleSavedDialogPin": messages_toggleSavedDialogPin; + "messages.reorderPinnedSavedDialogs": messages_reorderPinnedSavedDialogs; + "messages.getSavedReactionTags": messages_getSavedReactionTags; + "messages.updateSavedReactionTag": messages_updateSavedReactionTag; + "messages.getDefaultTagReactions": messages_getDefaultTagReactions; + "messages.getOutboxReadDate": messages_getOutboxReadDate; + "messages.getQuickReplies": messages_getQuickReplies; + "messages.reorderQuickReplies": messages_reorderQuickReplies; + "messages.checkQuickReplyShortcut": messages_checkQuickReplyShortcut; + "messages.editQuickReplyShortcut": messages_editQuickReplyShortcut; + "messages.deleteQuickReplyShortcut": messages_deleteQuickReplyShortcut; + "messages.getQuickReplyMessages": messages_getQuickReplyMessages; + "messages.sendQuickReplyMessages": messages_sendQuickReplyMessages; + "messages.deleteQuickReplyMessages": messages_deleteQuickReplyMessages; + "messages.toggleDialogFilterTags": messages_toggleDialogFilterTags; + "messages.getMyStickers": messages_getMyStickers; + "updates.getState": updates_getState; + "updates.getDifference": updates_getDifference; + "updates.getChannelDifference": updates_getChannelDifference; + "photos.updateProfilePhoto": photos_updateProfilePhoto; + "photos.uploadProfilePhoto": photos_uploadProfilePhoto; + "photos.deletePhotos": photos_deletePhotos; + "photos.getUserPhotos": photos_getUserPhotos; + "photos.uploadContactProfilePhoto": photos_uploadContactProfilePhoto; + "upload.saveFilePart": upload_saveFilePart; + "upload.getFile": upload_getFile; + "upload.saveBigFilePart": upload_saveBigFilePart; + "upload.getWebFile": upload_getWebFile; + "upload.getCdnFile": upload_getCdnFile; + "upload.reuploadCdnFile": upload_reuploadCdnFile; + "upload.getCdnFileHashes": upload_getCdnFileHashes; + "upload.getFileHashes": upload_getFileHashes; + "help.getConfig": help_getConfig; + "help.getNearestDc": help_getNearestDc; + "help.getAppUpdate": help_getAppUpdate; + "help.getInviteText": help_getInviteText; + "help.getSupport": help_getSupport; + "help.setBotUpdatesStatus": help_setBotUpdatesStatus; + "help.getCdnConfig": help_getCdnConfig; + "help.getRecentMeUrls": help_getRecentMeUrls; + "help.getTermsOfServiceUpdate": help_getTermsOfServiceUpdate; + "help.acceptTermsOfService": help_acceptTermsOfService; + "help.getDeepLinkInfo": help_getDeepLinkInfo; + "help.getAppConfig": help_getAppConfig; + "help.saveAppLog": help_saveAppLog; + "help.getPassportConfig": help_getPassportConfig; + "help.getSupportName": help_getSupportName; + "help.getUserInfo": help_getUserInfo; + "help.editUserInfo": help_editUserInfo; + "help.getPromoData": help_getPromoData; + "help.hidePromoData": help_hidePromoData; + "help.dismissSuggestion": help_dismissSuggestion; + "help.getCountriesList": help_getCountriesList; + "help.getPremiumPromo": help_getPremiumPromo; + "help.getPeerColors": help_getPeerColors; + "help.getPeerProfileColors": help_getPeerProfileColors; + "help.getTimezonesList": help_getTimezonesList; + "channels.readHistory": channels_readHistory; + "channels.deleteMessages": channels_deleteMessages; + "channels.reportSpam": channels_reportSpam; + "channels.getMessages": channels_getMessages; + "channels.getParticipants": channels_getParticipants; + "channels.getParticipant": channels_getParticipant; + "channels.getChannels": channels_getChannels; + "channels.getFullChannel": channels_getFullChannel; + "channels.createChannel": channels_createChannel; + "channels.editAdmin": channels_editAdmin; + "channels.editTitle": channels_editTitle; + "channels.editPhoto": channels_editPhoto; + "channels.checkUsername": channels_checkUsername; + "channels.updateUsername": channels_updateUsername; + "channels.joinChannel": channels_joinChannel; + "channels.leaveChannel": channels_leaveChannel; + "channels.inviteToChannel": channels_inviteToChannel; + "channels.deleteChannel": channels_deleteChannel; + "channels.exportMessageLink": channels_exportMessageLink; + "channels.toggleSignatures": channels_toggleSignatures; + "channels.getAdminedPublicChannels": channels_getAdminedPublicChannels; + "channels.editBanned": channels_editBanned; + "channels.getAdminLog": channels_getAdminLog; + "channels.setStickers": channels_setStickers; + "channels.readMessageContents": channels_readMessageContents; + "channels.deleteHistory": channels_deleteHistory; + "channels.togglePreHistoryHidden": channels_togglePreHistoryHidden; + "channels.getLeftChannels": channels_getLeftChannels; + "channels.getGroupsForDiscussion": channels_getGroupsForDiscussion; + "channels.setDiscussionGroup": channels_setDiscussionGroup; + "channels.editCreator": channels_editCreator; + "channels.editLocation": channels_editLocation; + "channels.toggleSlowMode": channels_toggleSlowMode; + "channels.getInactiveChannels": channels_getInactiveChannels; + "channels.convertToGigagroup": channels_convertToGigagroup; + "channels.viewSponsoredMessage": channels_viewSponsoredMessage; + "channels.getSponsoredMessages": channels_getSponsoredMessages; + "channels.getSendAs": channels_getSendAs; + "channels.deleteParticipantHistory": channels_deleteParticipantHistory; + "channels.toggleJoinToSend": channels_toggleJoinToSend; + "channels.toggleJoinRequest": channels_toggleJoinRequest; + "channels.reorderUsernames": channels_reorderUsernames; + "channels.toggleUsername": channels_toggleUsername; + "channels.deactivateAllUsernames": channels_deactivateAllUsernames; + "channels.toggleForum": channels_toggleForum; + "channels.createForumTopic": channels_createForumTopic; + "channels.getForumTopics": channels_getForumTopics; + "channels.getForumTopicsByID": channels_getForumTopicsByID; + "channels.editForumTopic": channels_editForumTopic; + "channels.updatePinnedForumTopic": channels_updatePinnedForumTopic; + "channels.deleteTopicHistory": channels_deleteTopicHistory; + "channels.reorderPinnedForumTopics": channels_reorderPinnedForumTopics; + "channels.toggleAntiSpam": channels_toggleAntiSpam; + "channels.reportAntiSpamFalsePositive": channels_reportAntiSpamFalsePositive; + "channels.toggleParticipantsHidden": channels_toggleParticipantsHidden; + "channels.clickSponsoredMessage": channels_clickSponsoredMessage; + "channels.updateColor": channels_updateColor; + "channels.toggleViewForumAsMessages": channels_toggleViewForumAsMessages; + "channels.getChannelRecommendations": channels_getChannelRecommendations; + "channels.updateEmojiStatus": channels_updateEmojiStatus; + "channels.setBoostsToUnblockRestrictions": channels_setBoostsToUnblockRestrictions; + "channels.setEmojiStickers": channels_setEmojiStickers; + "channels.reportSponsoredMessage": channels_reportSponsoredMessage; + "channels.restrictSponsoredMessages": channels_restrictSponsoredMessages; + "bots.sendCustomRequest": bots_sendCustomRequest; + "bots.answerWebhookJSONQuery": bots_answerWebhookJSONQuery; + "bots.setBotCommands": bots_setBotCommands; + "bots.resetBotCommands": bots_resetBotCommands; + "bots.getBotCommands": bots_getBotCommands; + "bots.setBotMenuButton": bots_setBotMenuButton; + "bots.getBotMenuButton": bots_getBotMenuButton; + "bots.setBotBroadcastDefaultAdminRights": bots_setBotBroadcastDefaultAdminRights; + "bots.setBotGroupDefaultAdminRights": bots_setBotGroupDefaultAdminRights; + "bots.setBotInfo": bots_setBotInfo; + "bots.getBotInfo": bots_getBotInfo; + "bots.reorderUsernames": bots_reorderUsernames; + "bots.toggleUsername": bots_toggleUsername; + "bots.canSendMessage": bots_canSendMessage; + "bots.allowSendMessage": bots_allowSendMessage; + "bots.invokeWebViewCustomMethod": bots_invokeWebViewCustomMethod; + "payments.getPaymentForm": payments_getPaymentForm; + "payments.getPaymentReceipt": payments_getPaymentReceipt; + "payments.validateRequestedInfo": payments_validateRequestedInfo; + "payments.sendPaymentForm": payments_sendPaymentForm; + "payments.getSavedInfo": payments_getSavedInfo; + "payments.clearSavedInfo": payments_clearSavedInfo; + "payments.getBankCardData": payments_getBankCardData; + "payments.exportInvoice": payments_exportInvoice; + "payments.assignAppStoreTransaction": payments_assignAppStoreTransaction; + "payments.assignPlayMarketTransaction": payments_assignPlayMarketTransaction; + "payments.canPurchasePremium": payments_canPurchasePremium; + "payments.getPremiumGiftCodeOptions": payments_getPremiumGiftCodeOptions; + "payments.checkGiftCode": payments_checkGiftCode; + "payments.applyGiftCode": payments_applyGiftCode; + "payments.getGiveawayInfo": payments_getGiveawayInfo; + "payments.launchPrepaidGiveaway": payments_launchPrepaidGiveaway; + "stickers.createStickerSet": stickers_createStickerSet; + "stickers.removeStickerFromSet": stickers_removeStickerFromSet; + "stickers.changeStickerPosition": stickers_changeStickerPosition; + "stickers.addStickerToSet": stickers_addStickerToSet; + "stickers.setStickerSetThumb": stickers_setStickerSetThumb; + "stickers.checkShortName": stickers_checkShortName; + "stickers.suggestShortName": stickers_suggestShortName; + "stickers.changeSticker": stickers_changeSticker; + "stickers.renameStickerSet": stickers_renameStickerSet; + "stickers.deleteStickerSet": stickers_deleteStickerSet; + "stickers.replaceSticker": stickers_replaceSticker; + "phone.getCallConfig": phone_getCallConfig; + "phone.requestCall": phone_requestCall; + "phone.acceptCall": phone_acceptCall; + "phone.confirmCall": phone_confirmCall; + "phone.receivedCall": phone_receivedCall; + "phone.discardCall": phone_discardCall; + "phone.setCallRating": phone_setCallRating; + "phone.saveCallDebug": phone_saveCallDebug; + "phone.sendSignalingData": phone_sendSignalingData; + "phone.createGroupCall": phone_createGroupCall; + "phone.joinGroupCall": phone_joinGroupCall; + "phone.leaveGroupCall": phone_leaveGroupCall; + "phone.inviteToGroupCall": phone_inviteToGroupCall; + "phone.discardGroupCall": phone_discardGroupCall; + "phone.toggleGroupCallSettings": phone_toggleGroupCallSettings; + "phone.getGroupCall": phone_getGroupCall; + "phone.getGroupParticipants": phone_getGroupParticipants; + "phone.checkGroupCall": phone_checkGroupCall; + "phone.toggleGroupCallRecord": phone_toggleGroupCallRecord; + "phone.editGroupCallParticipant": phone_editGroupCallParticipant; + "phone.editGroupCallTitle": phone_editGroupCallTitle; + "phone.getGroupCallJoinAs": phone_getGroupCallJoinAs; + "phone.exportGroupCallInvite": phone_exportGroupCallInvite; + "phone.toggleGroupCallStartSubscription": phone_toggleGroupCallStartSubscription; + "phone.startScheduledGroupCall": phone_startScheduledGroupCall; + "phone.saveDefaultGroupCallJoinAs": phone_saveDefaultGroupCallJoinAs; + "phone.joinGroupCallPresentation": phone_joinGroupCallPresentation; + "phone.leaveGroupCallPresentation": phone_leaveGroupCallPresentation; + "phone.getGroupCallStreamChannels": phone_getGroupCallStreamChannels; + "phone.getGroupCallStreamRtmpUrl": phone_getGroupCallStreamRtmpUrl; + "phone.saveCallLog": phone_saveCallLog; + "langpack.getLangPack": langpack_getLangPack; + "langpack.getStrings": langpack_getStrings; + "langpack.getDifference": langpack_getDifference; + "langpack.getLanguages": langpack_getLanguages; + "langpack.getLanguage": langpack_getLanguage; + "folders.editPeerFolders": folders_editPeerFolders; + "stats.getBroadcastStats": stats_getBroadcastStats; + "stats.loadAsyncGraph": stats_loadAsyncGraph; + "stats.getMegagroupStats": stats_getMegagroupStats; + "stats.getMessagePublicForwards": stats_getMessagePublicForwards; + "stats.getMessageStats": stats_getMessageStats; + "stats.getStoryStats": stats_getStoryStats; + "stats.getStoryPublicForwards": stats_getStoryPublicForwards; + "stats.getBroadcastRevenueStats": stats_getBroadcastRevenueStats; + "stats.getBroadcastRevenueWithdrawalUrl": stats_getBroadcastRevenueWithdrawalUrl; + "stats.getBroadcastRevenueTransactions": stats_getBroadcastRevenueTransactions; + "chatlists.exportChatlistInvite": chatlists_exportChatlistInvite; + "chatlists.deleteExportedInvite": chatlists_deleteExportedInvite; + "chatlists.editExportedInvite": chatlists_editExportedInvite; + "chatlists.getExportedInvites": chatlists_getExportedInvites; + "chatlists.checkChatlistInvite": chatlists_checkChatlistInvite; + "chatlists.joinChatlistInvite": chatlists_joinChatlistInvite; + "chatlists.getChatlistUpdates": chatlists_getChatlistUpdates; + "chatlists.joinChatlistUpdates": chatlists_joinChatlistUpdates; + "chatlists.hideChatlistUpdates": chatlists_hideChatlistUpdates; + "chatlists.getLeaveChatlistSuggestions": chatlists_getLeaveChatlistSuggestions; + "chatlists.leaveChatlist": chatlists_leaveChatlist; + "stories.canSendStory": stories_canSendStory; + "stories.sendStory": stories_sendStory; + "stories.editStory": stories_editStory; + "stories.deleteStories": stories_deleteStories; + "stories.togglePinned": stories_togglePinned; + "stories.getAllStories": stories_getAllStories; + "stories.getPinnedStories": stories_getPinnedStories; + "stories.getStoriesArchive": stories_getStoriesArchive; + "stories.getStoriesByID": stories_getStoriesByID; + "stories.toggleAllStoriesHidden": stories_toggleAllStoriesHidden; + "stories.readStories": stories_readStories; + "stories.incrementStoryViews": stories_incrementStoryViews; + "stories.getStoryViewsList": stories_getStoryViewsList; + "stories.getStoriesViews": stories_getStoriesViews; + "stories.exportStoryLink": stories_exportStoryLink; + "stories.report": stories_report; + "stories.activateStealthMode": stories_activateStealthMode; + "stories.sendReaction": stories_sendReaction; + "stories.getPeerStories": stories_getPeerStories; + "stories.getAllReadPeerStories": stories_getAllReadPeerStories; + "stories.getPeerMaxIDs": stories_getPeerMaxIDs; + "stories.getChatsToSend": stories_getChatsToSend; + "stories.togglePeerStoriesHidden": stories_togglePeerStoriesHidden; + "stories.getStoryReactionsList": stories_getStoryReactionsList; + "premium.getBoostsList": premium_getBoostsList; + "premium.getMyBoosts": premium_getMyBoosts; + "premium.applyBoost": premium_applyBoost; + "premium.getBoostsStatus": premium_getBoostsStatus; + "premium.getUserBoosts": premium_getUserBoosts; + "smsjobs.isEligibleToJoin": smsjobs_isEligibleToJoin; + "smsjobs.join": smsjobs_join; + "smsjobs.leave": smsjobs_leave; + "smsjobs.updateSettings": smsjobs_updateSettings; + "smsjobs.getStatus": smsjobs_getStatus; + "smsjobs.getSmsJob": smsjobs_getSmsJob; + "smsjobs.finishJob": smsjobs_finishJob; + "fragment.getCollectibleInfo": fragment_getCollectibleInfo; +} + +export interface Enums { + "ResPQ": ResPQ; + "P_Q_inner_data": P_Q_inner_data; + "Server_DH_Params": Server_DH_Params; + "Server_DH_inner_data": Server_DH_inner_data; + "Client_DH_Inner_Data": Client_DH_Inner_Data; + "Set_client_DH_params_answer": Set_client_DH_params_answer; + "BindAuthKeyInner": BindAuthKeyInner; + "RpcError": RpcError; + "RpcDropAnswer": RpcDropAnswer; + "FutureSalt": FutureSalt; + "FutureSalts": FutureSalts; + "Pong": Pong; + "DestroySessionRes": DestroySessionRes; + "NewSession": NewSession; + "Object": Object; + "MsgsAck": MsgsAck; + "BadMsgNotification": BadMsgNotification; + "MsgResendReq": MsgResendReq; + "MsgsStateReq": MsgsStateReq; + "MsgsStateInfo": MsgsStateInfo; + "MsgsAllInfo": MsgsAllInfo; + "MsgDetailedInfo": MsgDetailedInfo; + "DestroyAuthKeyRes": DestroyAuthKeyRes; + "HttpWait": HttpWait; + "True": True; + "Error": Error; + "IpPort": IpPort; + "AccessPointRule": AccessPointRule; + "help.ConfigSimple": help_ConfigSimple; + "InputFileLocation": InputFileLocation; + "InputPeer": InputPeer; + "InputUser": InputUser; + "InputContact": InputContact; + "InputFile": InputFile; + "InputMedia": InputMedia; + "InputChatPhoto": InputChatPhoto; + "InputGeoPoint": InputGeoPoint; + "InputPhoto": InputPhoto; + "Peer": Peer; + "storage.FileType": storage_FileType; + "User": User; + "UserProfilePhoto": UserProfilePhoto; + "UserStatus": UserStatus; + "Chat": Chat; + "ChatFull": ChatFull; + "ChatParticipant": ChatParticipant; + "ChatParticipants": ChatParticipants; + "ChatPhoto": ChatPhoto; + "Message": Message; + "MessageMedia": MessageMedia; + "MessageAction": MessageAction; + "Dialog": Dialog; + "Photo": Photo; + "PhotoSize": PhotoSize; + "GeoPoint": GeoPoint; + "auth.SentCode": auth_SentCode; + "auth.Authorization": auth_Authorization; + "auth.ExportedAuthorization": auth_ExportedAuthorization; + "InputNotifyPeer": InputNotifyPeer; + "InputPeerNotifySettings": InputPeerNotifySettings; + "PeerNotifySettings": PeerNotifySettings; + "PeerSettings": PeerSettings; + "WallPaper": WallPaper; + "ReportReason": ReportReason; + "UserFull": UserFull; + "Contact": Contact; + "ImportedContact": ImportedContact; + "ContactStatus": ContactStatus; + "contacts.Contacts": contacts_Contacts; + "contacts.ImportedContacts": contacts_ImportedContacts; + "contacts.Blocked": contacts_Blocked; + "messages.Dialogs": messages_Dialogs; + "messages.Messages": messages_Messages; + "messages.Chats": messages_Chats; + "messages.ChatFull": messages_ChatFull; + "messages.AffectedHistory": messages_AffectedHistory; + "MessagesFilter": MessagesFilter; + "Update": Update; + "updates.State": updates_State; + "updates.Difference": updates_Difference; + "Updates": Updates; + "photos.Photos": photos_Photos; + "photos.Photo": photos_Photo; + "upload.File": upload_File; + "DcOption": DcOption; + "Config": Config; + "NearestDc": NearestDc; + "help.AppUpdate": help_AppUpdate; + "help.InviteText": help_InviteText; + "EncryptedChat": EncryptedChat; + "InputEncryptedChat": InputEncryptedChat; + "EncryptedFile": EncryptedFile; + "InputEncryptedFile": InputEncryptedFile; + "EncryptedMessage": EncryptedMessage; + "messages.DhConfig": messages_DhConfig; + "messages.SentEncryptedMessage": messages_SentEncryptedMessage; + "InputDocument": InputDocument; + "Document": Document; + "help.Support": help_Support; + "NotifyPeer": NotifyPeer; + "SendMessageAction": SendMessageAction; + "contacts.Found": contacts_Found; + "InputPrivacyKey": InputPrivacyKey; + "PrivacyKey": PrivacyKey; + "InputPrivacyRule": InputPrivacyRule; + "PrivacyRule": PrivacyRule; + "account.PrivacyRules": account_PrivacyRules; + "AccountDaysTTL": AccountDaysTTL; + "DocumentAttribute": DocumentAttribute; + "messages.Stickers": messages_Stickers; + "StickerPack": StickerPack; + "messages.AllStickers": messages_AllStickers; + "messages.AffectedMessages": messages_AffectedMessages; + "WebPage": WebPage; + "Authorization": Authorization; + "account.Authorizations": account_Authorizations; + "account.Password": account_Password; + "account.PasswordSettings": account_PasswordSettings; + "account.PasswordInputSettings": account_PasswordInputSettings; + "auth.PasswordRecovery": auth_PasswordRecovery; + "ReceivedNotifyMessage": ReceivedNotifyMessage; + "ExportedChatInvite": ExportedChatInvite; + "ChatInvite": ChatInvite; + "InputStickerSet": InputStickerSet; + "StickerSet": StickerSet; + "messages.StickerSet": messages_StickerSet; + "BotCommand": BotCommand; + "BotInfo": BotInfo; + "KeyboardButton": KeyboardButton; + "KeyboardButtonRow": KeyboardButtonRow; + "ReplyMarkup": ReplyMarkup; + "MessageEntity": MessageEntity; + "InputChannel": InputChannel; + "contacts.ResolvedPeer": contacts_ResolvedPeer; + "MessageRange": MessageRange; + "updates.ChannelDifference": updates_ChannelDifference; + "ChannelMessagesFilter": ChannelMessagesFilter; + "ChannelParticipant": ChannelParticipant; + "ChannelParticipantsFilter": ChannelParticipantsFilter; + "channels.ChannelParticipants": channels_ChannelParticipants; + "channels.ChannelParticipant": channels_ChannelParticipant; + "help.TermsOfService": help_TermsOfService; + "messages.SavedGifs": messages_SavedGifs; + "InputBotInlineMessage": InputBotInlineMessage; + "InputBotInlineResult": InputBotInlineResult; + "BotInlineMessage": BotInlineMessage; + "BotInlineResult": BotInlineResult; + "messages.BotResults": messages_BotResults; + "ExportedMessageLink": ExportedMessageLink; + "MessageFwdHeader": MessageFwdHeader; + "auth.CodeType": auth_CodeType; + "auth.SentCodeType": auth_SentCodeType; + "messages.BotCallbackAnswer": messages_BotCallbackAnswer; + "messages.MessageEditData": messages_MessageEditData; + "InputBotInlineMessageID": InputBotInlineMessageID; + "InlineBotSwitchPM": InlineBotSwitchPM; + "messages.PeerDialogs": messages_PeerDialogs; + "TopPeer": TopPeer; + "TopPeerCategory": TopPeerCategory; + "TopPeerCategoryPeers": TopPeerCategoryPeers; + "contacts.TopPeers": contacts_TopPeers; + "DraftMessage": DraftMessage; + "messages.FeaturedStickers": messages_FeaturedStickers; + "messages.RecentStickers": messages_RecentStickers; + "messages.ArchivedStickers": messages_ArchivedStickers; + "messages.StickerSetInstallResult": messages_StickerSetInstallResult; + "StickerSetCovered": StickerSetCovered; + "MaskCoords": MaskCoords; + "InputStickeredMedia": InputStickeredMedia; + "Game": Game; + "InputGame": InputGame; + "HighScore": HighScore; + "messages.HighScores": messages_HighScores; + "RichText": RichText; + "PageBlock": PageBlock; + "PhoneCallDiscardReason": PhoneCallDiscardReason; + "DataJSON": DataJSON; + "LabeledPrice": LabeledPrice; + "Invoice": Invoice; + "PaymentCharge": PaymentCharge; + "PostAddress": PostAddress; + "PaymentRequestedInfo": PaymentRequestedInfo; + "PaymentSavedCredentials": PaymentSavedCredentials; + "WebDocument": WebDocument; + "InputWebDocument": InputWebDocument; + "InputWebFileLocation": InputWebFileLocation; + "upload.WebFile": upload_WebFile; + "payments.PaymentForm": payments_PaymentForm; + "payments.ValidatedRequestedInfo": payments_ValidatedRequestedInfo; + "payments.PaymentResult": payments_PaymentResult; + "payments.PaymentReceipt": payments_PaymentReceipt; + "payments.SavedInfo": payments_SavedInfo; + "InputPaymentCredentials": InputPaymentCredentials; + "account.TmpPassword": account_TmpPassword; + "ShippingOption": ShippingOption; + "InputStickerSetItem": InputStickerSetItem; + "InputPhoneCall": InputPhoneCall; + "PhoneCall": PhoneCall; + "PhoneConnection": PhoneConnection; + "PhoneCallProtocol": PhoneCallProtocol; + "phone.PhoneCall": phone_PhoneCall; + "upload.CdnFile": upload_CdnFile; + "CdnPublicKey": CdnPublicKey; + "CdnConfig": CdnConfig; + "LangPackString": LangPackString; + "LangPackDifference": LangPackDifference; + "LangPackLanguage": LangPackLanguage; + "ChannelAdminLogEventAction": ChannelAdminLogEventAction; + "ChannelAdminLogEvent": ChannelAdminLogEvent; + "channels.AdminLogResults": channels_AdminLogResults; + "ChannelAdminLogEventsFilter": ChannelAdminLogEventsFilter; + "PopularContact": PopularContact; + "messages.FavedStickers": messages_FavedStickers; + "RecentMeUrl": RecentMeUrl; + "help.RecentMeUrls": help_RecentMeUrls; + "InputSingleMedia": InputSingleMedia; + "WebAuthorization": WebAuthorization; + "account.WebAuthorizations": account_WebAuthorizations; + "InputMessage": InputMessage; + "InputDialogPeer": InputDialogPeer; + "DialogPeer": DialogPeer; + "messages.FoundStickerSets": messages_FoundStickerSets; + "FileHash": FileHash; + "InputClientProxy": InputClientProxy; + "help.TermsOfServiceUpdate": help_TermsOfServiceUpdate; + "InputSecureFile": InputSecureFile; + "SecureFile": SecureFile; + "SecureData": SecureData; + "SecurePlainData": SecurePlainData; + "SecureValueType": SecureValueType; + "SecureValue": SecureValue; + "InputSecureValue": InputSecureValue; + "SecureValueHash": SecureValueHash; + "SecureValueError": SecureValueError; + "SecureCredentialsEncrypted": SecureCredentialsEncrypted; + "account.AuthorizationForm": account_AuthorizationForm; + "account.SentEmailCode": account_SentEmailCode; + "help.DeepLinkInfo": help_DeepLinkInfo; + "SavedContact": SavedContact; + "account.Takeout": account_Takeout; + "PasswordKdfAlgo": PasswordKdfAlgo; + "SecurePasswordKdfAlgo": SecurePasswordKdfAlgo; + "SecureSecretSettings": SecureSecretSettings; + "InputCheckPasswordSRP": InputCheckPasswordSRP; + "SecureRequiredType": SecureRequiredType; + "help.PassportConfig": help_PassportConfig; + "InputAppEvent": InputAppEvent; + "JSONObjectValue": JSONObjectValue; + "JSONValue": JSONValue; + "PageTableCell": PageTableCell; + "PageTableRow": PageTableRow; + "PageCaption": PageCaption; + "PageListItem": PageListItem; + "PageListOrderedItem": PageListOrderedItem; + "PageRelatedArticle": PageRelatedArticle; + "Page": Page; + "help.SupportName": help_SupportName; + "help.UserInfo": help_UserInfo; + "PollAnswer": PollAnswer; + "Poll": Poll; + "PollAnswerVoters": PollAnswerVoters; + "PollResults": PollResults; + "ChatOnlines": ChatOnlines; + "StatsURL": StatsURL; + "ChatAdminRights": ChatAdminRights; + "ChatBannedRights": ChatBannedRights; + "InputWallPaper": InputWallPaper; + "account.WallPapers": account_WallPapers; + "CodeSettings": CodeSettings; + "WallPaperSettings": WallPaperSettings; + "AutoDownloadSettings": AutoDownloadSettings; + "account.AutoDownloadSettings": account_AutoDownloadSettings; + "EmojiKeyword": EmojiKeyword; + "EmojiKeywordsDifference": EmojiKeywordsDifference; + "EmojiURL": EmojiURL; + "EmojiLanguage": EmojiLanguage; + "Folder": Folder; + "InputFolderPeer": InputFolderPeer; + "FolderPeer": FolderPeer; + "messages.SearchCounter": messages_SearchCounter; + "UrlAuthResult": UrlAuthResult; + "ChannelLocation": ChannelLocation; + "PeerLocated": PeerLocated; + "RestrictionReason": RestrictionReason; + "InputTheme": InputTheme; + "Theme": Theme; + "account.Themes": account_Themes; + "auth.LoginToken": auth_LoginToken; + "account.ContentSettings": account_ContentSettings; + "messages.InactiveChats": messages_InactiveChats; + "BaseTheme": BaseTheme; + "InputThemeSettings": InputThemeSettings; + "ThemeSettings": ThemeSettings; + "WebPageAttribute": WebPageAttribute; + "messages.VotesList": messages_VotesList; + "BankCardOpenUrl": BankCardOpenUrl; + "payments.BankCardData": payments_BankCardData; + "DialogFilter": DialogFilter; + "DialogFilterSuggested": DialogFilterSuggested; + "StatsDateRangeDays": StatsDateRangeDays; + "StatsAbsValueAndPrev": StatsAbsValueAndPrev; + "StatsPercentValue": StatsPercentValue; + "StatsGraph": StatsGraph; + "stats.BroadcastStats": stats_BroadcastStats; + "help.PromoData": help_PromoData; + "VideoSize": VideoSize; + "StatsGroupTopPoster": StatsGroupTopPoster; + "StatsGroupTopAdmin": StatsGroupTopAdmin; + "StatsGroupTopInviter": StatsGroupTopInviter; + "stats.MegagroupStats": stats_MegagroupStats; + "GlobalPrivacySettings": GlobalPrivacySettings; + "help.CountryCode": help_CountryCode; + "help.Country": help_Country; + "help.CountriesList": help_CountriesList; + "MessageViews": MessageViews; + "messages.MessageViews": messages_MessageViews; + "messages.DiscussionMessage": messages_DiscussionMessage; + "MessageReplyHeader": MessageReplyHeader; + "MessageReplies": MessageReplies; + "PeerBlocked": PeerBlocked; + "stats.MessageStats": stats_MessageStats; + "GroupCall": GroupCall; + "InputGroupCall": InputGroupCall; + "GroupCallParticipant": GroupCallParticipant; + "phone.GroupCall": phone_GroupCall; + "phone.GroupParticipants": phone_GroupParticipants; + "InlineQueryPeerType": InlineQueryPeerType; + "messages.HistoryImport": messages_HistoryImport; + "messages.HistoryImportParsed": messages_HistoryImportParsed; + "messages.AffectedFoundMessages": messages_AffectedFoundMessages; + "ChatInviteImporter": ChatInviteImporter; + "messages.ExportedChatInvites": messages_ExportedChatInvites; + "messages.ExportedChatInvite": messages_ExportedChatInvite; + "messages.ChatInviteImporters": messages_ChatInviteImporters; + "ChatAdminWithInvites": ChatAdminWithInvites; + "messages.ChatAdminsWithInvites": messages_ChatAdminsWithInvites; + "messages.CheckedHistoryImportPeer": messages_CheckedHistoryImportPeer; + "phone.JoinAsPeers": phone_JoinAsPeers; + "phone.ExportedGroupCallInvite": phone_ExportedGroupCallInvite; + "GroupCallParticipantVideoSourceGroup": GroupCallParticipantVideoSourceGroup; + "GroupCallParticipantVideo": GroupCallParticipantVideo; + "stickers.SuggestedShortName": stickers_SuggestedShortName; + "BotCommandScope": BotCommandScope; + "account.ResetPasswordResult": account_ResetPasswordResult; + "SponsoredMessage": SponsoredMessage; + "messages.SponsoredMessages": messages_SponsoredMessages; + "SearchResultsCalendarPeriod": SearchResultsCalendarPeriod; + "messages.SearchResultsCalendar": messages_SearchResultsCalendar; + "SearchResultsPosition": SearchResultsPosition; + "messages.SearchResultsPositions": messages_SearchResultsPositions; + "channels.SendAsPeers": channels_SendAsPeers; + "users.UserFull": users_UserFull; + "messages.PeerSettings": messages_PeerSettings; + "auth.LoggedOut": auth_LoggedOut; + "ReactionCount": ReactionCount; + "MessageReactions": MessageReactions; + "messages.MessageReactionsList": messages_MessageReactionsList; + "AvailableReaction": AvailableReaction; + "messages.AvailableReactions": messages_AvailableReactions; + "MessagePeerReaction": MessagePeerReaction; + "GroupCallStreamChannel": GroupCallStreamChannel; + "phone.GroupCallStreamChannels": phone_GroupCallStreamChannels; + "phone.GroupCallStreamRtmpUrl": phone_GroupCallStreamRtmpUrl; + "AttachMenuBotIconColor": AttachMenuBotIconColor; + "AttachMenuBotIcon": AttachMenuBotIcon; + "AttachMenuBot": AttachMenuBot; + "AttachMenuBots": AttachMenuBots; + "AttachMenuBotsBot": AttachMenuBotsBot; + "WebViewResult": WebViewResult; + "SimpleWebViewResult": SimpleWebViewResult; + "WebViewMessageSent": WebViewMessageSent; + "BotMenuButton": BotMenuButton; + "account.SavedRingtones": account_SavedRingtones; + "NotificationSound": NotificationSound; + "account.SavedRingtone": account_SavedRingtone; + "AttachMenuPeerType": AttachMenuPeerType; + "InputInvoice": InputInvoice; + "payments.ExportedInvoice": payments_ExportedInvoice; + "messages.TranscribedAudio": messages_TranscribedAudio; + "help.PremiumPromo": help_PremiumPromo; + "InputStorePaymentPurpose": InputStorePaymentPurpose; + "PremiumGiftOption": PremiumGiftOption; + "PaymentFormMethod": PaymentFormMethod; + "EmojiStatus": EmojiStatus; + "account.EmojiStatuses": account_EmojiStatuses; + "Reaction": Reaction; + "ChatReactions": ChatReactions; + "messages.Reactions": messages_Reactions; + "EmailVerifyPurpose": EmailVerifyPurpose; + "EmailVerification": EmailVerification; + "account.EmailVerified": account_EmailVerified; + "PremiumSubscriptionOption": PremiumSubscriptionOption; + "SendAsPeer": SendAsPeer; + "MessageExtendedMedia": MessageExtendedMedia; + "StickerKeyword": StickerKeyword; + "Username": Username; + "ForumTopic": ForumTopic; + "messages.ForumTopics": messages_ForumTopics; + "DefaultHistoryTTL": DefaultHistoryTTL; + "ExportedContactToken": ExportedContactToken; + "RequestPeerType": RequestPeerType; + "EmojiList": EmojiList; + "EmojiGroup": EmojiGroup; + "messages.EmojiGroups": messages_EmojiGroups; + "TextWithEntities": TextWithEntities; + "messages.TranslatedText": messages_TranslatedText; + "AutoSaveSettings": AutoSaveSettings; + "AutoSaveException": AutoSaveException; + "account.AutoSaveSettings": account_AutoSaveSettings; + "help.AppConfig": help_AppConfig; + "InputBotApp": InputBotApp; + "BotApp": BotApp; + "messages.BotApp": messages_BotApp; + "AppWebViewResult": AppWebViewResult; + "InlineBotWebView": InlineBotWebView; + "ReadParticipantDate": ReadParticipantDate; + "InputChatlist": InputChatlist; + "ExportedChatlistInvite": ExportedChatlistInvite; + "chatlists.ExportedChatlistInvite": chatlists_ExportedChatlistInvite; + "chatlists.ExportedInvites": chatlists_ExportedInvites; + "chatlists.ChatlistInvite": chatlists_ChatlistInvite; + "chatlists.ChatlistUpdates": chatlists_ChatlistUpdates; + "bots.BotInfo": bots_BotInfo; + "MessagePeerVote": MessagePeerVote; + "SponsoredWebPage": SponsoredWebPage; + "StoryViews": StoryViews; + "StoryItem": StoryItem; + "stories.AllStories": stories_AllStories; + "stories.Stories": stories_Stories; + "StoryView": StoryView; + "stories.StoryViewsList": stories_StoryViewsList; + "stories.StoryViews": stories_StoryViews; + "InputReplyTo": InputReplyTo; + "ExportedStoryLink": ExportedStoryLink; + "StoriesStealthMode": StoriesStealthMode; + "MediaAreaCoordinates": MediaAreaCoordinates; + "MediaArea": MediaArea; + "PeerStories": PeerStories; + "stories.PeerStories": stories_PeerStories; + "messages.WebPage": messages_WebPage; + "PremiumGiftCodeOption": PremiumGiftCodeOption; + "payments.CheckedGiftCode": payments_CheckedGiftCode; + "payments.GiveawayInfo": payments_GiveawayInfo; + "PrepaidGiveaway": PrepaidGiveaway; + "Boost": Boost; + "premium.BoostsList": premium_BoostsList; + "MyBoost": MyBoost; + "premium.MyBoosts": premium_MyBoosts; + "premium.BoostsStatus": premium_BoostsStatus; + "StoryFwdHeader": StoryFwdHeader; + "PostInteractionCounters": PostInteractionCounters; + "stats.StoryStats": stats_StoryStats; + "PublicForward": PublicForward; + "stats.PublicForwards": stats_PublicForwards; + "PeerColor": PeerColor; + "help.PeerColorSet": help_PeerColorSet; + "help.PeerColorOption": help_PeerColorOption; + "help.PeerColors": help_PeerColors; + "StoryReaction": StoryReaction; + "stories.StoryReactionsList": stories_StoryReactionsList; + "SavedDialog": SavedDialog; + "messages.SavedDialogs": messages_SavedDialogs; + "SavedReactionTag": SavedReactionTag; + "messages.SavedReactionTags": messages_SavedReactionTags; + "OutboxReadDate": OutboxReadDate; + "smsjobs.EligibilityToJoin": smsjobs_EligibilityToJoin; + "smsjobs.Status": smsjobs_Status; + "SmsJob": SmsJob; + "BusinessWeeklyOpen": BusinessWeeklyOpen; + "BusinessWorkHours": BusinessWorkHours; + "BusinessLocation": BusinessLocation; + "InputBusinessRecipients": InputBusinessRecipients; + "BusinessRecipients": BusinessRecipients; + "BusinessAwayMessageSchedule": BusinessAwayMessageSchedule; + "InputBusinessGreetingMessage": InputBusinessGreetingMessage; + "BusinessGreetingMessage": BusinessGreetingMessage; + "InputBusinessAwayMessage": InputBusinessAwayMessage; + "BusinessAwayMessage": BusinessAwayMessage; + "Timezone": Timezone; + "help.TimezonesList": help_TimezonesList; + "QuickReply": QuickReply; + "InputQuickReplyShortcut": InputQuickReplyShortcut; + "messages.QuickReplies": messages_QuickReplies; + "ConnectedBot": ConnectedBot; + "account.ConnectedBots": account_ConnectedBots; + "messages.DialogFilters": messages_DialogFilters; + "Birthday": Birthday; + "BotBusinessConnection": BotBusinessConnection; + "InputBusinessIntro": InputBusinessIntro; + "BusinessIntro": BusinessIntro; + "messages.MyStickers": messages_MyStickers; + "InputCollectible": InputCollectible; + "fragment.CollectibleInfo": fragment_CollectibleInfo; + "InputBusinessBotRecipients": InputBusinessBotRecipients; + "BusinessBotRecipients": BusinessBotRecipients; + "ContactBirthday": ContactBirthday; + "contacts.ContactBirthdays": contacts_ContactBirthdays; + "MissingInvitee": MissingInvitee; + "messages.InvitedUsers": messages_InvitedUsers; + "InputBusinessChatLink": InputBusinessChatLink; + "BusinessChatLink": BusinessChatLink; + "account.BusinessChatLinks": account_BusinessChatLinks; + "account.ResolvedBusinessChatLinks": account_ResolvedBusinessChatLinks; + "RequestedPeer": RequestedPeer; + "SponsoredMessageReportOption": SponsoredMessageReportOption; + "channels.SponsoredMessageReportResult": channels_SponsoredMessageReportResult; + "stats.BroadcastRevenueStats": stats_BroadcastRevenueStats; + "stats.BroadcastRevenueWithdrawalUrl": stats_BroadcastRevenueWithdrawalUrl; + "BroadcastRevenueTransaction": BroadcastRevenueTransaction; + "stats.BroadcastRevenueTransactions": stats_BroadcastRevenueTransactions; +} + +export type AnyType = Types[keyof Types]; + +export type AnyFunction = Functions[keyof Functions]; + +export type AnyObject = AnyType | AnyFunction; + +export type ResPQ = resPQ; + +export type P_Q_inner_data = p_q_inner_data_dc | p_q_inner_data_temp_dc; + +export type Server_DH_Params = server_DH_params_ok; + +export type Server_DH_inner_data = server_DH_inner_data; + +export type Client_DH_Inner_Data = client_DH_inner_data; + +export type Set_client_DH_params_answer = dh_gen_ok | dh_gen_retry | dh_gen_fail; + +export type BindAuthKeyInner = bind_auth_key_inner; + +export type RpcError = rpc_error; + +export type RpcDropAnswer = rpc_answer_unknown | rpc_answer_dropped_running | rpc_answer_dropped; + +export type FutureSalt = future_salt; + +export type FutureSalts = future_salts; + +export type Pong = pong; + +export type DestroySessionRes = destroy_session_ok | destroy_session_none; + +export type NewSession = new_session_created; + +export type Object = gzip_packed; + +export type MsgsAck = msgs_ack; + +export type BadMsgNotification = bad_msg_notification | bad_server_salt; + +export type MsgResendReq = msg_resend_req; + +export type MsgsStateReq = msgs_state_req; + +export type MsgsStateInfo = msgs_state_info; + +export type MsgsAllInfo = msgs_all_info; + +export type MsgDetailedInfo = msg_detailed_info | msg_new_detailed_info; + +export type DestroyAuthKeyRes = destroy_auth_key_ok | destroy_auth_key_none | destroy_auth_key_fail; + +export type HttpWait = http_wait; + +export type True = true_; + +export type Error = error; + +export type IpPort = ipPort | ipPortSecret; + +export type AccessPointRule = accessPointRule; + +export type help_ConfigSimple = help_configSimple; + +export type InputFileLocation = inputPeerPhotoFileLocationLegacy | inputStickerSetThumbLegacy | inputFileLocation | inputEncryptedFileLocation | inputDocumentFileLocation | inputSecureFileLocation | inputTakeoutFileLocation | inputPhotoFileLocation | inputPhotoLegacyFileLocation | inputPeerPhotoFileLocation | inputStickerSetThumb | inputGroupCallStream; + +export type InputPeer = inputPeerEmpty | inputPeerSelf | inputPeerChat | inputPeerUser | inputPeerChannel | inputPeerUserFromMessage | inputPeerChannelFromMessage; + +export type InputUser = inputUserEmpty | inputUserSelf | inputUser | inputUserFromMessage; + +export type InputContact = inputPhoneContact; + +export type InputFile = inputFile | inputFileBig; + +export type InputMedia = inputMediaEmpty | inputMediaUploadedPhoto | inputMediaPhoto | inputMediaGeoPoint | inputMediaContact | inputMediaUploadedDocument | inputMediaDocument | inputMediaVenue | inputMediaPhotoExternal | inputMediaDocumentExternal | inputMediaGame | inputMediaInvoice | inputMediaGeoLive | inputMediaPoll | inputMediaDice | inputMediaStory | inputMediaWebPage; + +export type InputChatPhoto = inputChatPhotoEmpty | inputChatUploadedPhoto | inputChatPhoto; + +export type InputGeoPoint = inputGeoPointEmpty | inputGeoPoint; + +export type InputPhoto = inputPhotoEmpty | inputPhoto; + +export type Peer = peerUser | peerChat | peerChannel; + +export type storage_FileType = storage_fileUnknown | storage_filePartial | storage_fileJpeg | storage_fileGif | storage_filePng | storage_filePdf | storage_fileMp3 | storage_fileMov | storage_fileMp4 | storage_fileWebp; + +export type User = userEmpty | user; + +export type UserProfilePhoto = userProfilePhotoEmpty | userProfilePhoto; + +export type UserStatus = userStatusEmpty | userStatusOnline | userStatusOffline | userStatusRecently | userStatusLastWeek | userStatusLastMonth; + +export type Chat = chatEmpty | chat | chatForbidden | channel | channelForbidden; + +export type ChatFull = chatFull | channelFull; + +export type ChatParticipant = chatParticipant | chatParticipantCreator | chatParticipantAdmin; + +export type ChatParticipants = chatParticipantsForbidden | chatParticipants; + +export type ChatPhoto = chatPhotoEmpty | chatPhoto; + +export type Message = messageEmpty | message | messageService; + +export type MessageMedia = messageMediaEmpty | messageMediaPhoto | messageMediaGeo | messageMediaContact | messageMediaUnsupported | messageMediaDocument | messageMediaWebPage | messageMediaVenue | messageMediaGame | messageMediaInvoice | messageMediaGeoLive | messageMediaPoll | messageMediaDice | messageMediaStory | messageMediaGiveaway | messageMediaGiveawayResults; + +export type MessageAction = + | messageActionEmpty + | messageActionChatCreate + | messageActionChatEditTitle + | messageActionChatEditPhoto + | messageActionChatDeletePhoto + | messageActionChatAddUser + | messageActionChatDeleteUser + | messageActionChatJoinedByLink + | messageActionChannelCreate + | messageActionChatMigrateTo + | messageActionChannelMigrateFrom + | messageActionPinMessage + | messageActionHistoryClear + | messageActionGameScore + | messageActionPaymentSentMe + | messageActionPaymentSent + | messageActionPhoneCall + | messageActionScreenshotTaken + | messageActionCustomAction + | messageActionBotAllowed + | messageActionSecureValuesSentMe + | messageActionSecureValuesSent + | messageActionContactSignUp + | messageActionGeoProximityReached + | messageActionGroupCall + | messageActionInviteToGroupCall + | messageActionSetMessagesTTL + | messageActionGroupCallScheduled + | messageActionSetChatTheme + | messageActionChatJoinedByRequest + | messageActionWebViewDataSentMe + | messageActionWebViewDataSent + | messageActionGiftPremium + | messageActionTopicCreate + | messageActionTopicEdit + | messageActionSuggestProfilePhoto + | messageActionRequestedPeer + | messageActionSetChatWallPaper + | messageActionGiftCode + | messageActionGiveawayLaunch + | messageActionGiveawayResults + | messageActionBoostApply + | messageActionRequestedPeerSentMe; + +export type Dialog = dialog | dialogFolder; + +export type Photo = photoEmpty | photo; + +export type PhotoSize = photoSizeEmpty | photoSize | photoCachedSize | photoStrippedSize | photoSizeProgressive | photoPathSize; + +export type GeoPoint = geoPointEmpty | geoPoint; + +export type auth_SentCode = auth_sentCode | auth_sentCodeSuccess; + +export type auth_Authorization = auth_authorization | auth_authorizationSignUpRequired; + +export type auth_ExportedAuthorization = auth_exportedAuthorization; + +export type InputNotifyPeer = inputNotifyPeer | inputNotifyUsers | inputNotifyChats | inputNotifyBroadcasts | inputNotifyForumTopic; + +export type InputPeerNotifySettings = inputPeerNotifySettings; + +export type PeerNotifySettings = peerNotifySettings; + +export type PeerSettings = peerSettings; + +export type WallPaper = wallPaper | wallPaperNoFile; + +export type ReportReason = inputReportReasonSpam | inputReportReasonViolence | inputReportReasonPornography | inputReportReasonChildAbuse | inputReportReasonOther | inputReportReasonCopyright | inputReportReasonGeoIrrelevant | inputReportReasonFake | inputReportReasonIllegalDrugs | inputReportReasonPersonalDetails; + +export type UserFull = userFull; + +export type Contact = contact; + +export type ImportedContact = importedContact; + +export type ContactStatus = contactStatus; + +export type contacts_Contacts = contacts_contactsNotModified | contacts_contacts; + +export type contacts_ImportedContacts = contacts_importedContacts; + +export type contacts_Blocked = contacts_blocked | contacts_blockedSlice; + +export type messages_Dialogs = messages_dialogs | messages_dialogsSlice | messages_dialogsNotModified; + +export type messages_Messages = messages_messages | messages_messagesSlice | messages_channelMessages | messages_messagesNotModified; + +export type messages_Chats = messages_chats | messages_chatsSlice; + +export type messages_ChatFull = messages_chatFull; + +export type messages_AffectedHistory = messages_affectedHistory; + +export type MessagesFilter = inputMessagesFilterEmpty | inputMessagesFilterPhotos | inputMessagesFilterVideo | inputMessagesFilterPhotoVideo | inputMessagesFilterDocument | inputMessagesFilterUrl | inputMessagesFilterGif | inputMessagesFilterVoice | inputMessagesFilterMusic | inputMessagesFilterChatPhotos | inputMessagesFilterPhoneCalls | inputMessagesFilterRoundVoice | inputMessagesFilterRoundVideo | inputMessagesFilterMyMentions | inputMessagesFilterGeo | inputMessagesFilterContacts | inputMessagesFilterPinned; + +export type Update = + | updateNewMessage + | updateMessageID + | updateDeleteMessages + | updateUserTyping + | updateChatUserTyping + | updateChatParticipants + | updateUserStatus + | updateUserName + | updateNewAuthorization + | updateNewEncryptedMessage + | updateEncryptedChatTyping + | updateEncryption + | updateEncryptedMessagesRead + | updateChatParticipantAdd + | updateChatParticipantDelete + | updateDcOptions + | updateNotifySettings + | updateServiceNotification + | updatePrivacy + | updateUserPhone + | updateReadHistoryInbox + | updateReadHistoryOutbox + | updateWebPage + | updateReadMessagesContents + | updateChannelTooLong + | updateChannel + | updateNewChannelMessage + | updateReadChannelInbox + | updateDeleteChannelMessages + | updateChannelMessageViews + | updateChatParticipantAdmin + | updateNewStickerSet + | updateStickerSetsOrder + | updateStickerSets + | updateSavedGifs + | updateBotInlineQuery + | updateBotInlineSend + | updateEditChannelMessage + | updateBotCallbackQuery + | updateEditMessage + | updateInlineBotCallbackQuery + | updateReadChannelOutbox + | updateDraftMessage + | updateReadFeaturedStickers + | updateRecentStickers + | updateConfig + | updatePtsChanged + | updateChannelWebPage + | updateDialogPinned + | updatePinnedDialogs + | updateBotWebhookJSON + | updateBotWebhookJSONQuery + | updateBotShippingQuery + | updateBotPrecheckoutQuery + | updatePhoneCall + | updateLangPackTooLong + | updateLangPack + | updateFavedStickers + | updateChannelReadMessagesContents + | updateContactsReset + | updateChannelAvailableMessages + | updateDialogUnreadMark + | updateMessagePoll + | updateChatDefaultBannedRights + | updateFolderPeers + | updatePeerSettings + | updatePeerLocated + | updateNewScheduledMessage + | updateDeleteScheduledMessages + | updateTheme + | updateGeoLiveViewed + | updateLoginToken + | updateMessagePollVote + | updateDialogFilter + | updateDialogFilterOrder + | updateDialogFilters + | updatePhoneCallSignalingData + | updateChannelMessageForwards + | updateReadChannelDiscussionInbox + | updateReadChannelDiscussionOutbox + | updatePeerBlocked + | updateChannelUserTyping + | updatePinnedMessages + | updatePinnedChannelMessages + | updateChat + | updateGroupCallParticipants + | updateGroupCall + | updatePeerHistoryTTL + | updateChatParticipant + | updateChannelParticipant + | updateBotStopped + | updateGroupCallConnection + | updateBotCommands + | updatePendingJoinRequests + | updateBotChatInviteRequester + | updateMessageReactions + | updateAttachMenuBots + | updateWebViewResultSent + | updateBotMenuButton + | updateSavedRingtones + | updateTranscribedAudio + | updateReadFeaturedEmojiStickers + | updateUserEmojiStatus + | updateRecentEmojiStatuses + | updateRecentReactions + | updateMoveStickerSetToTop + | updateMessageExtendedMedia + | updateChannelPinnedTopic + | updateChannelPinnedTopics + | updateUser + | updateAutoSaveSettings + | updateStory + | updateReadStories + | updateStoryID + | updateStoriesStealthMode + | updateSentStoryReaction + | updateBotChatBoost + | updateChannelViewForumAsMessages + | updatePeerWallpaper + | updateBotMessageReaction + | updateBotMessageReactions + | updateSavedDialogPinned + | updatePinnedSavedDialogs + | updateSavedReactionTags + | updateSmsJob + | updateQuickReplies + | updateNewQuickReply + | updateDeleteQuickReply + | updateQuickReplyMessage + | updateDeleteQuickReplyMessages + | updateBotBusinessConnect + | updateBotNewBusinessMessage + | updateBotEditBusinessMessage + | updateBotDeleteBusinessMessage; + +export type updates_State = updates_state; + +export type updates_Difference = updates_differenceEmpty | updates_difference | updates_differenceSlice | updates_differenceTooLong; + +export type Updates = updatesTooLong | updateShortMessage | updateShortChatMessage | updateShort | updatesCombined | updates | updateShortSentMessage; + +export type photos_Photos = photos_photos | photos_photosSlice; + +export type photos_Photo = photos_photo; + +export type upload_File = upload_file | upload_fileCdnRedirect; + +export type DcOption = dcOption; + +export type Config = config; + +export type NearestDc = nearestDc; + +export type help_AppUpdate = help_appUpdate | help_noAppUpdate; + +export type help_InviteText = help_inviteText; + +export type EncryptedChat = encryptedChatEmpty | encryptedChatWaiting | encryptedChatRequested | encryptedChat | encryptedChatDiscarded; + +export type InputEncryptedChat = inputEncryptedChat; + +export type EncryptedFile = encryptedFileEmpty | encryptedFile; + +export type InputEncryptedFile = inputEncryptedFileEmpty | inputEncryptedFileUploaded | inputEncryptedFile | inputEncryptedFileBigUploaded; + +export type EncryptedMessage = encryptedMessage | encryptedMessageService; + +export type messages_DhConfig = messages_dhConfigNotModified | messages_dhConfig; + +export type messages_SentEncryptedMessage = messages_sentEncryptedMessage | messages_sentEncryptedFile; + +export type InputDocument = inputDocumentEmpty | inputDocument; + +export type Document = documentEmpty | document; + +export type help_Support = help_support; + +export type NotifyPeer = notifyPeer | notifyUsers | notifyChats | notifyBroadcasts | notifyForumTopic; + +export type SendMessageAction = sendMessageTypingAction | sendMessageCancelAction | sendMessageRecordVideoAction | sendMessageUploadVideoAction | sendMessageRecordAudioAction | sendMessageUploadAudioAction | sendMessageUploadPhotoAction | sendMessageUploadDocumentAction | sendMessageGeoLocationAction | sendMessageChooseContactAction | sendMessageGamePlayAction | sendMessageRecordRoundAction | sendMessageUploadRoundAction | speakingInGroupCallAction | sendMessageHistoryImportAction | sendMessageChooseStickerAction | sendMessageEmojiInteraction | sendMessageEmojiInteractionSeen; + +export type contacts_Found = contacts_found; + +export type InputPrivacyKey = inputPrivacyKeyStatusTimestamp | inputPrivacyKeyChatInvite | inputPrivacyKeyPhoneCall | inputPrivacyKeyPhoneP2P | inputPrivacyKeyForwards | inputPrivacyKeyProfilePhoto | inputPrivacyKeyPhoneNumber | inputPrivacyKeyAddedByPhone | inputPrivacyKeyVoiceMessages | inputPrivacyKeyAbout | inputPrivacyKeyBirthday; + +export type PrivacyKey = privacyKeyStatusTimestamp | privacyKeyChatInvite | privacyKeyPhoneCall | privacyKeyPhoneP2P | privacyKeyForwards | privacyKeyProfilePhoto | privacyKeyPhoneNumber | privacyKeyAddedByPhone | privacyKeyVoiceMessages | privacyKeyAbout | privacyKeyBirthday; + +export type InputPrivacyRule = inputPrivacyValueAllowContacts | inputPrivacyValueAllowAll | inputPrivacyValueAllowUsers | inputPrivacyValueDisallowContacts | inputPrivacyValueDisallowAll | inputPrivacyValueDisallowUsers | inputPrivacyValueAllowChatParticipants | inputPrivacyValueDisallowChatParticipants | inputPrivacyValueAllowCloseFriends | inputPrivacyValueAllowPremium; + +export type PrivacyRule = privacyValueAllowContacts | privacyValueAllowAll | privacyValueAllowUsers | privacyValueDisallowContacts | privacyValueDisallowAll | privacyValueDisallowUsers | privacyValueAllowChatParticipants | privacyValueDisallowChatParticipants | privacyValueAllowCloseFriends | privacyValueAllowPremium; + +export type account_PrivacyRules = account_privacyRules; + +export type AccountDaysTTL = accountDaysTTL; + +export type DocumentAttribute = documentAttributeImageSize | documentAttributeAnimated | documentAttributeSticker | documentAttributeVideo | documentAttributeAudio | documentAttributeFilename | documentAttributeHasStickers | documentAttributeCustomEmoji; + +export type messages_Stickers = messages_stickersNotModified | messages_stickers; + +export type StickerPack = stickerPack; + +export type messages_AllStickers = messages_allStickersNotModified | messages_allStickers; + +export type messages_AffectedMessages = messages_affectedMessages; + +export type WebPage = webPageEmpty | webPagePending | webPage | webPageNotModified; + +export type Authorization = authorization; + +export type account_Authorizations = account_authorizations; + +export type account_Password = account_password; + +export type account_PasswordSettings = account_passwordSettings; + +export type account_PasswordInputSettings = account_passwordInputSettings; + +export type auth_PasswordRecovery = auth_passwordRecovery; + +export type ReceivedNotifyMessage = receivedNotifyMessage; + +export type ExportedChatInvite = chatInviteExported | chatInvitePublicJoinRequests; + +export type ChatInvite = chatInviteAlready | chatInvite | chatInvitePeek; + +export type InputStickerSet = inputStickerSetEmpty | inputStickerSetID | inputStickerSetShortName | inputStickerSetAnimatedEmoji | inputStickerSetDice | inputStickerSetAnimatedEmojiAnimations | inputStickerSetPremiumGifts | inputStickerSetEmojiGenericAnimations | inputStickerSetEmojiDefaultStatuses | inputStickerSetEmojiDefaultTopicIcons | inputStickerSetEmojiChannelDefaultStatuses; + +export type StickerSet = stickerSet; + +export type messages_StickerSet = messages_stickerSet | messages_stickerSetNotModified; + +export type BotCommand = botCommand; + +export type BotInfo = botInfo; + +export type KeyboardButton = keyboardButton | keyboardButtonUrl | keyboardButtonCallback | keyboardButtonRequestPhone | keyboardButtonRequestGeoLocation | keyboardButtonSwitchInline | keyboardButtonGame | keyboardButtonBuy | keyboardButtonUrlAuth | inputKeyboardButtonUrlAuth | keyboardButtonRequestPoll | inputKeyboardButtonUserProfile | keyboardButtonUserProfile | keyboardButtonWebView | keyboardButtonSimpleWebView | keyboardButtonRequestPeer | inputKeyboardButtonRequestPeer; + +export type KeyboardButtonRow = keyboardButtonRow; + +export type ReplyMarkup = replyKeyboardHide | replyKeyboardForceReply | replyKeyboardMarkup | replyInlineMarkup; + +export type MessageEntity = messageEntityUnknown | messageEntityMention | messageEntityHashtag | messageEntityBotCommand | messageEntityUrl | messageEntityEmail | messageEntityBold | messageEntityItalic | messageEntityCode | messageEntityPre | messageEntityTextUrl | messageEntityMentionName | inputMessageEntityMentionName | messageEntityPhone | messageEntityCashtag | messageEntityUnderline | messageEntityStrike | messageEntityBankCard | messageEntitySpoiler | messageEntityCustomEmoji | messageEntityBlockquote; + +export type InputChannel = inputChannelEmpty | inputChannel | inputChannelFromMessage; + +export type contacts_ResolvedPeer = contacts_resolvedPeer; + +export type MessageRange = messageRange; + +export type updates_ChannelDifference = updates_channelDifferenceEmpty | updates_channelDifferenceTooLong | updates_channelDifference; + +export type ChannelMessagesFilter = channelMessagesFilterEmpty | channelMessagesFilter; + +export type ChannelParticipant = channelParticipant | channelParticipantSelf | channelParticipantCreator | channelParticipantAdmin | channelParticipantBanned | channelParticipantLeft; + +export type ChannelParticipantsFilter = channelParticipantsRecent | channelParticipantsAdmins | channelParticipantsKicked | channelParticipantsBots | channelParticipantsBanned | channelParticipantsSearch | channelParticipantsContacts | channelParticipantsMentions; + +export type channels_ChannelParticipants = channels_channelParticipants | channels_channelParticipantsNotModified; + +export type channels_ChannelParticipant = channels_channelParticipant; + +export type help_TermsOfService = help_termsOfService; + +export type messages_SavedGifs = messages_savedGifsNotModified | messages_savedGifs; + +export type InputBotInlineMessage = inputBotInlineMessageMediaAuto | inputBotInlineMessageText | inputBotInlineMessageMediaGeo | inputBotInlineMessageMediaVenue | inputBotInlineMessageMediaContact | inputBotInlineMessageGame | inputBotInlineMessageMediaInvoice | inputBotInlineMessageMediaWebPage; + +export type InputBotInlineResult = inputBotInlineResult | inputBotInlineResultPhoto | inputBotInlineResultDocument | inputBotInlineResultGame; + +export type BotInlineMessage = botInlineMessageMediaAuto | botInlineMessageText | botInlineMessageMediaGeo | botInlineMessageMediaVenue | botInlineMessageMediaContact | botInlineMessageMediaInvoice | botInlineMessageMediaWebPage; + +export type BotInlineResult = botInlineResult | botInlineMediaResult; + +export type messages_BotResults = messages_botResults; + +export type ExportedMessageLink = exportedMessageLink; + +export type MessageFwdHeader = messageFwdHeader; + +export type auth_CodeType = auth_codeTypeSms | auth_codeTypeCall | auth_codeTypeFlashCall | auth_codeTypeMissedCall | auth_codeTypeFragmentSms; + +export type auth_SentCodeType = auth_sentCodeTypeApp | auth_sentCodeTypeSms | auth_sentCodeTypeCall | auth_sentCodeTypeFlashCall | auth_sentCodeTypeMissedCall | auth_sentCodeTypeEmailCode | auth_sentCodeTypeSetUpEmailRequired | auth_sentCodeTypeFragmentSms | auth_sentCodeTypeFirebaseSms; + +export type messages_BotCallbackAnswer = messages_botCallbackAnswer; + +export type messages_MessageEditData = messages_messageEditData; + +export type InputBotInlineMessageID = inputBotInlineMessageID | inputBotInlineMessageID64; + +export type InlineBotSwitchPM = inlineBotSwitchPM; + +export type messages_PeerDialogs = messages_peerDialogs; + +export type TopPeer = topPeer; + +export type TopPeerCategory = topPeerCategoryBotsPM | topPeerCategoryBotsInline | topPeerCategoryCorrespondents | topPeerCategoryGroups | topPeerCategoryChannels | topPeerCategoryPhoneCalls | topPeerCategoryForwardUsers | topPeerCategoryForwardChats; + +export type TopPeerCategoryPeers = topPeerCategoryPeers; + +export type contacts_TopPeers = contacts_topPeersNotModified | contacts_topPeers | contacts_topPeersDisabled; + +export type DraftMessage = draftMessageEmpty | draftMessage; + +export type messages_FeaturedStickers = messages_featuredStickersNotModified | messages_featuredStickers; + +export type messages_RecentStickers = messages_recentStickersNotModified | messages_recentStickers; + +export type messages_ArchivedStickers = messages_archivedStickers; + +export type messages_StickerSetInstallResult = messages_stickerSetInstallResultSuccess | messages_stickerSetInstallResultArchive; + +export type StickerSetCovered = stickerSetCovered | stickerSetMultiCovered | stickerSetFullCovered | stickerSetNoCovered; + +export type MaskCoords = maskCoords; + +export type InputStickeredMedia = inputStickeredMediaPhoto | inputStickeredMediaDocument; + +export type Game = game; + +export type InputGame = inputGameID | inputGameShortName; + +export type HighScore = highScore; + +export type messages_HighScores = messages_highScores; + +export type RichText = textEmpty | textPlain | textBold | textItalic | textUnderline | textStrike | textFixed | textUrl | textEmail | textConcat | textSubscript | textSuperscript | textMarked | textPhone | textImage | textAnchor; + +export type PageBlock = pageBlockUnsupported | pageBlockTitle | pageBlockSubtitle | pageBlockAuthorDate | pageBlockHeader | pageBlockSubheader | pageBlockParagraph | pageBlockPreformatted | pageBlockFooter | pageBlockDivider | pageBlockAnchor | pageBlockList | pageBlockBlockquote | pageBlockPullquote | pageBlockPhoto | pageBlockVideo | pageBlockCover | pageBlockEmbed | pageBlockEmbedPost | pageBlockCollage | pageBlockSlideshow | pageBlockChannel | pageBlockAudio | pageBlockKicker | pageBlockTable | pageBlockOrderedList | pageBlockDetails | pageBlockRelatedArticles | pageBlockMap; + +export type PhoneCallDiscardReason = phoneCallDiscardReasonMissed | phoneCallDiscardReasonDisconnect | phoneCallDiscardReasonHangup | phoneCallDiscardReasonBusy; + +export type DataJSON = dataJSON; + +export type LabeledPrice = labeledPrice; + +export type Invoice = invoice; + +export type PaymentCharge = paymentCharge; + +export type PostAddress = postAddress; + +export type PaymentRequestedInfo = paymentRequestedInfo; + +export type PaymentSavedCredentials = paymentSavedCredentialsCard; + +export type WebDocument = webDocument | webDocumentNoProxy; + +export type InputWebDocument = inputWebDocument; + +export type InputWebFileLocation = inputWebFileLocation | inputWebFileGeoPointLocation | inputWebFileAudioAlbumThumbLocation; + +export type upload_WebFile = upload_webFile; + +export type payments_PaymentForm = payments_paymentForm; + +export type payments_ValidatedRequestedInfo = payments_validatedRequestedInfo; + +export type payments_PaymentResult = payments_paymentResult | payments_paymentVerificationNeeded; + +export type payments_PaymentReceipt = payments_paymentReceipt; + +export type payments_SavedInfo = payments_savedInfo; + +export type InputPaymentCredentials = inputPaymentCredentialsSaved | inputPaymentCredentials | inputPaymentCredentialsApplePay | inputPaymentCredentialsGooglePay; + +export type account_TmpPassword = account_tmpPassword; + +export type ShippingOption = shippingOption; + +export type InputStickerSetItem = inputStickerSetItem; + +export type InputPhoneCall = inputPhoneCall; + +export type PhoneCall = phoneCallEmpty | phoneCallWaiting | phoneCallRequested | phoneCallAccepted | phoneCall | phoneCallDiscarded; + +export type PhoneConnection = phoneConnection | phoneConnectionWebrtc; + +export type PhoneCallProtocol = phoneCallProtocol; + +export type phone_PhoneCall = phone_phoneCall; + +export type upload_CdnFile = upload_cdnFileReuploadNeeded | upload_cdnFile; + +export type CdnPublicKey = cdnPublicKey; + +export type CdnConfig = cdnConfig; + +export type LangPackString = langPackString | langPackStringPluralized | langPackStringDeleted; + +export type LangPackDifference = langPackDifference; + +export type LangPackLanguage = langPackLanguage; + +export type ChannelAdminLogEventAction = + | channelAdminLogEventActionChangeTitle + | channelAdminLogEventActionChangeAbout + | channelAdminLogEventActionChangeUsername + | channelAdminLogEventActionChangePhoto + | channelAdminLogEventActionToggleInvites + | channelAdminLogEventActionToggleSignatures + | channelAdminLogEventActionUpdatePinned + | channelAdminLogEventActionEditMessage + | channelAdminLogEventActionDeleteMessage + | channelAdminLogEventActionParticipantJoin + | channelAdminLogEventActionParticipantLeave + | channelAdminLogEventActionParticipantInvite + | channelAdminLogEventActionParticipantToggleBan + | channelAdminLogEventActionParticipantToggleAdmin + | channelAdminLogEventActionChangeStickerSet + | channelAdminLogEventActionTogglePreHistoryHidden + | channelAdminLogEventActionDefaultBannedRights + | channelAdminLogEventActionStopPoll + | channelAdminLogEventActionChangeLinkedChat + | channelAdminLogEventActionChangeLocation + | channelAdminLogEventActionToggleSlowMode + | channelAdminLogEventActionStartGroupCall + | channelAdminLogEventActionDiscardGroupCall + | channelAdminLogEventActionParticipantMute + | channelAdminLogEventActionParticipantUnmute + | channelAdminLogEventActionToggleGroupCallSetting + | channelAdminLogEventActionParticipantJoinByInvite + | channelAdminLogEventActionExportedInviteDelete + | channelAdminLogEventActionExportedInviteRevoke + | channelAdminLogEventActionExportedInviteEdit + | channelAdminLogEventActionParticipantVolume + | channelAdminLogEventActionChangeHistoryTTL + | channelAdminLogEventActionParticipantJoinByRequest + | channelAdminLogEventActionToggleNoForwards + | channelAdminLogEventActionSendMessage + | channelAdminLogEventActionChangeAvailableReactions + | channelAdminLogEventActionChangeUsernames + | channelAdminLogEventActionToggleForum + | channelAdminLogEventActionCreateTopic + | channelAdminLogEventActionEditTopic + | channelAdminLogEventActionDeleteTopic + | channelAdminLogEventActionPinTopic + | channelAdminLogEventActionToggleAntiSpam + | channelAdminLogEventActionChangePeerColor + | channelAdminLogEventActionChangeProfilePeerColor + | channelAdminLogEventActionChangeWallpaper + | channelAdminLogEventActionChangeEmojiStatus + | channelAdminLogEventActionChangeEmojiStickerSet; + +export type ChannelAdminLogEvent = channelAdminLogEvent; + +export type channels_AdminLogResults = channels_adminLogResults; + +export type ChannelAdminLogEventsFilter = channelAdminLogEventsFilter; + +export type PopularContact = popularContact; + +export type messages_FavedStickers = messages_favedStickersNotModified | messages_favedStickers; + +export type RecentMeUrl = recentMeUrlUnknown | recentMeUrlUser | recentMeUrlChat | recentMeUrlChatInvite | recentMeUrlStickerSet; + +export type help_RecentMeUrls = help_recentMeUrls; + +export type InputSingleMedia = inputSingleMedia; + +export type WebAuthorization = webAuthorization; + +export type account_WebAuthorizations = account_webAuthorizations; + +export type InputMessage = inputMessageID | inputMessageReplyTo | inputMessagePinned | inputMessageCallbackQuery; + +export type InputDialogPeer = inputDialogPeer | inputDialogPeerFolder; + +export type DialogPeer = dialogPeer | dialogPeerFolder; + +export type messages_FoundStickerSets = messages_foundStickerSetsNotModified | messages_foundStickerSets; + +export type FileHash = fileHash; + +export type InputClientProxy = inputClientProxy; + +export type help_TermsOfServiceUpdate = help_termsOfServiceUpdateEmpty | help_termsOfServiceUpdate; + +export type InputSecureFile = inputSecureFileUploaded | inputSecureFile; + +export type SecureFile = secureFileEmpty | secureFile; + +export type SecureData = secureData; + +export type SecurePlainData = securePlainPhone | securePlainEmail; + +export type SecureValueType = secureValueTypePersonalDetails | secureValueTypePassport | secureValueTypeDriverLicense | secureValueTypeIdentityCard | secureValueTypeInternalPassport | secureValueTypeAddress | secureValueTypeUtilityBill | secureValueTypeBankStatement | secureValueTypeRentalAgreement | secureValueTypePassportRegistration | secureValueTypeTemporaryRegistration | secureValueTypePhone | secureValueTypeEmail; + +export type SecureValue = secureValue; + +export type InputSecureValue = inputSecureValue; + +export type SecureValueHash = secureValueHash; + +export type SecureValueError = secureValueErrorData | secureValueErrorFrontSide | secureValueErrorReverseSide | secureValueErrorSelfie | secureValueErrorFile | secureValueErrorFiles | secureValueError | secureValueErrorTranslationFile | secureValueErrorTranslationFiles; + +export type SecureCredentialsEncrypted = secureCredentialsEncrypted; + +export type account_AuthorizationForm = account_authorizationForm; + +export type account_SentEmailCode = account_sentEmailCode; + +export type help_DeepLinkInfo = help_deepLinkInfoEmpty | help_deepLinkInfo; + +export type SavedContact = savedPhoneContact; + +export type account_Takeout = account_takeout; + +export type PasswordKdfAlgo = passwordKdfAlgoUnknown | passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow; + +export type SecurePasswordKdfAlgo = securePasswordKdfAlgoUnknown | securePasswordKdfAlgoPBKDF2HMACSHA512iter100000 | securePasswordKdfAlgoSHA512; + +export type SecureSecretSettings = secureSecretSettings; + +export type InputCheckPasswordSRP = inputCheckPasswordEmpty | inputCheckPasswordSRP; + +export type SecureRequiredType = secureRequiredType | secureRequiredTypeOneOf; + +export type help_PassportConfig = help_passportConfigNotModified | help_passportConfig; + +export type InputAppEvent = inputAppEvent; + +export type JSONObjectValue = jsonObjectValue; + +export type JSONValue = jsonNull | jsonBool | jsonNumber | jsonString | jsonArray | jsonObject; + +export type PageTableCell = pageTableCell; + +export type PageTableRow = pageTableRow; + +export type PageCaption = pageCaption; + +export type PageListItem = pageListItemText | pageListItemBlocks; + +export type PageListOrderedItem = pageListOrderedItemText | pageListOrderedItemBlocks; + +export type PageRelatedArticle = pageRelatedArticle; + +export type Page = page; + +export type help_SupportName = help_supportName; + +export type help_UserInfo = help_userInfoEmpty | help_userInfo; + +export type PollAnswer = pollAnswer; + +export type Poll = poll; + +export type PollAnswerVoters = pollAnswerVoters; + +export type PollResults = pollResults; + +export type ChatOnlines = chatOnlines; + +export type StatsURL = statsURL; + +export type ChatAdminRights = chatAdminRights; + +export type ChatBannedRights = chatBannedRights; + +export type InputWallPaper = inputWallPaper | inputWallPaperSlug | inputWallPaperNoFile; + +export type account_WallPapers = account_wallPapersNotModified | account_wallPapers; + +export type CodeSettings = codeSettings; + +export type WallPaperSettings = wallPaperSettings; + +export type AutoDownloadSettings = autoDownloadSettings; + +export type account_AutoDownloadSettings = account_autoDownloadSettings; + +export type EmojiKeyword = emojiKeyword | emojiKeywordDeleted; + +export type EmojiKeywordsDifference = emojiKeywordsDifference; + +export type EmojiURL = emojiURL; + +export type EmojiLanguage = emojiLanguage; + +export type Folder = folder; + +export type InputFolderPeer = inputFolderPeer; + +export type FolderPeer = folderPeer; + +export type messages_SearchCounter = messages_searchCounter; + +export type UrlAuthResult = urlAuthResultRequest | urlAuthResultAccepted | urlAuthResultDefault; + +export type ChannelLocation = channelLocationEmpty | channelLocation; + +export type PeerLocated = peerLocated | peerSelfLocated; + +export type RestrictionReason = restrictionReason; + +export type InputTheme = inputTheme | inputThemeSlug; + +export type Theme = theme; + +export type account_Themes = account_themesNotModified | account_themes; + +export type auth_LoginToken = auth_loginToken | auth_loginTokenMigrateTo | auth_loginTokenSuccess; + +export type account_ContentSettings = account_contentSettings; + +export type messages_InactiveChats = messages_inactiveChats; + +export type BaseTheme = baseThemeClassic | baseThemeDay | baseThemeNight | baseThemeTinted | baseThemeArctic; + +export type InputThemeSettings = inputThemeSettings; + +export type ThemeSettings = themeSettings; + +export type WebPageAttribute = webPageAttributeTheme | webPageAttributeStory; + +export type messages_VotesList = messages_votesList; + +export type BankCardOpenUrl = bankCardOpenUrl; + +export type payments_BankCardData = payments_bankCardData; + +export type DialogFilter = dialogFilter | dialogFilterDefault | dialogFilterChatlist; + +export type DialogFilterSuggested = dialogFilterSuggested; + +export type StatsDateRangeDays = statsDateRangeDays; + +export type StatsAbsValueAndPrev = statsAbsValueAndPrev; + +export type StatsPercentValue = statsPercentValue; + +export type StatsGraph = statsGraphAsync | statsGraphError | statsGraph; + +export type stats_BroadcastStats = stats_broadcastStats; + +export type help_PromoData = help_promoDataEmpty | help_promoData; + +export type VideoSize = videoSize | videoSizeEmojiMarkup | videoSizeStickerMarkup; + +export type StatsGroupTopPoster = statsGroupTopPoster; + +export type StatsGroupTopAdmin = statsGroupTopAdmin; + +export type StatsGroupTopInviter = statsGroupTopInviter; + +export type stats_MegagroupStats = stats_megagroupStats; + +export type GlobalPrivacySettings = globalPrivacySettings; + +export type help_CountryCode = help_countryCode; + +export type help_Country = help_country; + +export type help_CountriesList = help_countriesListNotModified | help_countriesList; + +export type MessageViews = messageViews; + +export type messages_MessageViews = messages_messageViews; + +export type messages_DiscussionMessage = messages_discussionMessage; + +export type MessageReplyHeader = messageReplyHeader | messageReplyStoryHeader; + +export type MessageReplies = messageReplies; + +export type PeerBlocked = peerBlocked; + +export type stats_MessageStats = stats_messageStats; + +export type GroupCall = groupCallDiscarded | groupCall; + +export type InputGroupCall = inputGroupCall; + +export type GroupCallParticipant = groupCallParticipant; + +export type phone_GroupCall = phone_groupCall; + +export type phone_GroupParticipants = phone_groupParticipants; + +export type InlineQueryPeerType = inlineQueryPeerTypeSameBotPM | inlineQueryPeerTypePM | inlineQueryPeerTypeChat | inlineQueryPeerTypeMegagroup | inlineQueryPeerTypeBroadcast | inlineQueryPeerTypeBotPM; + +export type messages_HistoryImport = messages_historyImport; + +export type messages_HistoryImportParsed = messages_historyImportParsed; + +export type messages_AffectedFoundMessages = messages_affectedFoundMessages; + +export type ChatInviteImporter = chatInviteImporter; + +export type messages_ExportedChatInvites = messages_exportedChatInvites; + +export type messages_ExportedChatInvite = messages_exportedChatInvite | messages_exportedChatInviteReplaced; + +export type messages_ChatInviteImporters = messages_chatInviteImporters; + +export type ChatAdminWithInvites = chatAdminWithInvites; + +export type messages_ChatAdminsWithInvites = messages_chatAdminsWithInvites; + +export type messages_CheckedHistoryImportPeer = messages_checkedHistoryImportPeer; + +export type phone_JoinAsPeers = phone_joinAsPeers; + +export type phone_ExportedGroupCallInvite = phone_exportedGroupCallInvite; + +export type GroupCallParticipantVideoSourceGroup = groupCallParticipantVideoSourceGroup; + +export type GroupCallParticipantVideo = groupCallParticipantVideo; + +export type stickers_SuggestedShortName = stickers_suggestedShortName; + +export type BotCommandScope = botCommandScopeDefault | botCommandScopeUsers | botCommandScopeChats | botCommandScopeChatAdmins | botCommandScopePeer | botCommandScopePeerAdmins | botCommandScopePeerUser; + +export type account_ResetPasswordResult = account_resetPasswordFailedWait | account_resetPasswordRequestedWait | account_resetPasswordOk; + +export type SponsoredMessage = sponsoredMessage; + +export type messages_SponsoredMessages = messages_sponsoredMessages | messages_sponsoredMessagesEmpty; + +export type SearchResultsCalendarPeriod = searchResultsCalendarPeriod; + +export type messages_SearchResultsCalendar = messages_searchResultsCalendar; + +export type SearchResultsPosition = searchResultPosition; + +export type messages_SearchResultsPositions = messages_searchResultsPositions; + +export type channels_SendAsPeers = channels_sendAsPeers; + +export type users_UserFull = users_userFull; + +export type messages_PeerSettings = messages_peerSettings; + +export type auth_LoggedOut = auth_loggedOut; + +export type ReactionCount = reactionCount; + +export type MessageReactions = messageReactions; + +export type messages_MessageReactionsList = messages_messageReactionsList; + +export type AvailableReaction = availableReaction; + +export type messages_AvailableReactions = messages_availableReactionsNotModified | messages_availableReactions; + +export type MessagePeerReaction = messagePeerReaction; + +export type GroupCallStreamChannel = groupCallStreamChannel; + +export type phone_GroupCallStreamChannels = phone_groupCallStreamChannels; + +export type phone_GroupCallStreamRtmpUrl = phone_groupCallStreamRtmpUrl; + +export type AttachMenuBotIconColor = attachMenuBotIconColor; + +export type AttachMenuBotIcon = attachMenuBotIcon; + +export type AttachMenuBot = attachMenuBot; + +export type AttachMenuBots = attachMenuBotsNotModified | attachMenuBots; + +export type AttachMenuBotsBot = attachMenuBotsBot; + +export type WebViewResult = webViewResultUrl; + +export type SimpleWebViewResult = simpleWebViewResultUrl; + +export type WebViewMessageSent = webViewMessageSent; + +export type BotMenuButton = botMenuButtonDefault | botMenuButtonCommands | botMenuButton; + +export type account_SavedRingtones = account_savedRingtonesNotModified | account_savedRingtones; + +export type NotificationSound = notificationSoundDefault | notificationSoundNone | notificationSoundLocal | notificationSoundRingtone; + +export type account_SavedRingtone = account_savedRingtone | account_savedRingtoneConverted; + +export type AttachMenuPeerType = attachMenuPeerTypeSameBotPM | attachMenuPeerTypeBotPM | attachMenuPeerTypePM | attachMenuPeerTypeChat | attachMenuPeerTypeBroadcast; + +export type InputInvoice = inputInvoiceMessage | inputInvoiceSlug | inputInvoicePremiumGiftCode; + +export type payments_ExportedInvoice = payments_exportedInvoice; + +export type messages_TranscribedAudio = messages_transcribedAudio; + +export type help_PremiumPromo = help_premiumPromo; + +export type InputStorePaymentPurpose = inputStorePaymentPremiumSubscription | inputStorePaymentGiftPremium | inputStorePaymentPremiumGiftCode | inputStorePaymentPremiumGiveaway; + +export type PremiumGiftOption = premiumGiftOption; + +export type PaymentFormMethod = paymentFormMethod; + +export type EmojiStatus = emojiStatusEmpty | emojiStatus | emojiStatusUntil; + +export type account_EmojiStatuses = account_emojiStatusesNotModified | account_emojiStatuses; + +export type Reaction = reactionEmpty | reactionEmoji | reactionCustomEmoji; + +export type ChatReactions = chatReactionsNone | chatReactionsAll | chatReactionsSome; + +export type messages_Reactions = messages_reactionsNotModified | messages_reactions; + +export type EmailVerifyPurpose = emailVerifyPurposeLoginSetup | emailVerifyPurposeLoginChange | emailVerifyPurposePassport; + +export type EmailVerification = emailVerificationCode | emailVerificationGoogle | emailVerificationApple; + +export type account_EmailVerified = account_emailVerified | account_emailVerifiedLogin; + +export type PremiumSubscriptionOption = premiumSubscriptionOption; + +export type SendAsPeer = sendAsPeer; + +export type MessageExtendedMedia = messageExtendedMediaPreview | messageExtendedMedia; + +export type StickerKeyword = stickerKeyword; + +export type Username = username; + +export type ForumTopic = forumTopicDeleted | forumTopic; + +export type messages_ForumTopics = messages_forumTopics; + +export type DefaultHistoryTTL = defaultHistoryTTL; + +export type ExportedContactToken = exportedContactToken; + +export type RequestPeerType = requestPeerTypeUser | requestPeerTypeChat | requestPeerTypeBroadcast; + +export type EmojiList = emojiListNotModified | emojiList; + +export type EmojiGroup = emojiGroup; + +export type messages_EmojiGroups = messages_emojiGroupsNotModified | messages_emojiGroups; + +export type TextWithEntities = textWithEntities; + +export type messages_TranslatedText = messages_translateResult; + +export type AutoSaveSettings = autoSaveSettings; + +export type AutoSaveException = autoSaveException; + +export type account_AutoSaveSettings = account_autoSaveSettings; + +export type help_AppConfig = help_appConfigNotModified | help_appConfig; + +export type InputBotApp = inputBotAppID | inputBotAppShortName; + +export type BotApp = botAppNotModified | botApp; + +export type messages_BotApp = messages_botApp; + +export type AppWebViewResult = appWebViewResultUrl; + +export type InlineBotWebView = inlineBotWebView; + +export type ReadParticipantDate = readParticipantDate; + +export type InputChatlist = inputChatlistDialogFilter; + +export type ExportedChatlistInvite = exportedChatlistInvite; + +export type chatlists_ExportedChatlistInvite = chatlists_exportedChatlistInvite; + +export type chatlists_ExportedInvites = chatlists_exportedInvites; + +export type chatlists_ChatlistInvite = chatlists_chatlistInviteAlready | chatlists_chatlistInvite; + +export type chatlists_ChatlistUpdates = chatlists_chatlistUpdates; + +export type bots_BotInfo = bots_botInfo; + +export type MessagePeerVote = messagePeerVote | messagePeerVoteInputOption | messagePeerVoteMultiple; + +export type SponsoredWebPage = sponsoredWebPage; + +export type StoryViews = storyViews; + +export type StoryItem = storyItemDeleted | storyItemSkipped | storyItem; + +export type stories_AllStories = stories_allStoriesNotModified | stories_allStories; + +export type stories_Stories = stories_stories; + +export type StoryView = storyView | storyViewPublicForward | storyViewPublicRepost; + +export type stories_StoryViewsList = stories_storyViewsList; + +export type stories_StoryViews = stories_storyViews; + +export type InputReplyTo = inputReplyToMessage | inputReplyToStory; + +export type ExportedStoryLink = exportedStoryLink; + +export type StoriesStealthMode = storiesStealthMode; + +export type MediaAreaCoordinates = mediaAreaCoordinates; + +export type MediaArea = mediaAreaVenue | inputMediaAreaVenue | mediaAreaGeoPoint | mediaAreaSuggestedReaction | mediaAreaChannelPost | inputMediaAreaChannelPost; + +export type PeerStories = peerStories; + +export type stories_PeerStories = stories_peerStories; + +export type messages_WebPage = messages_webPage; + +export type PremiumGiftCodeOption = premiumGiftCodeOption; + +export type payments_CheckedGiftCode = payments_checkedGiftCode; + +export type payments_GiveawayInfo = payments_giveawayInfo | payments_giveawayInfoResults; + +export type PrepaidGiveaway = prepaidGiveaway; + +export type Boost = boost; + +export type premium_BoostsList = premium_boostsList; + +export type MyBoost = myBoost; + +export type premium_MyBoosts = premium_myBoosts; + +export type premium_BoostsStatus = premium_boostsStatus; + +export type StoryFwdHeader = storyFwdHeader; + +export type PostInteractionCounters = postInteractionCountersMessage | postInteractionCountersStory; + +export type stats_StoryStats = stats_storyStats; + +export type PublicForward = publicForwardMessage | publicForwardStory; + +export type stats_PublicForwards = stats_publicForwards; + +export type PeerColor = peerColor; + +export type help_PeerColorSet = help_peerColorSet | help_peerColorProfileSet; + +export type help_PeerColorOption = help_peerColorOption; + +export type help_PeerColors = help_peerColorsNotModified | help_peerColors; + +export type StoryReaction = storyReaction | storyReactionPublicForward | storyReactionPublicRepost; + +export type stories_StoryReactionsList = stories_storyReactionsList; + +export type SavedDialog = savedDialog; + +export type messages_SavedDialogs = messages_savedDialogs | messages_savedDialogsSlice | messages_savedDialogsNotModified; + +export type SavedReactionTag = savedReactionTag; + +export type messages_SavedReactionTags = messages_savedReactionTagsNotModified | messages_savedReactionTags; + +export type OutboxReadDate = outboxReadDate; + +export type smsjobs_EligibilityToJoin = smsjobs_eligibleToJoin; + +export type smsjobs_Status = smsjobs_status; + +export type SmsJob = smsJob; + +export type BusinessWeeklyOpen = businessWeeklyOpen; + +export type BusinessWorkHours = businessWorkHours; + +export type BusinessLocation = businessLocation; + +export type InputBusinessRecipients = inputBusinessRecipients; + +export type BusinessRecipients = businessRecipients; + +export type BusinessAwayMessageSchedule = businessAwayMessageScheduleAlways | businessAwayMessageScheduleOutsideWorkHours | businessAwayMessageScheduleCustom; + +export type InputBusinessGreetingMessage = inputBusinessGreetingMessage; + +export type BusinessGreetingMessage = businessGreetingMessage; + +export type InputBusinessAwayMessage = inputBusinessAwayMessage; + +export type BusinessAwayMessage = businessAwayMessage; + +export type Timezone = timezone; + +export type help_TimezonesList = help_timezonesListNotModified | help_timezonesList; + +export type QuickReply = quickReply; + +export type InputQuickReplyShortcut = inputQuickReplyShortcut | inputQuickReplyShortcutId; + +export type messages_QuickReplies = messages_quickReplies | messages_quickRepliesNotModified; + +export type ConnectedBot = connectedBot; + +export type account_ConnectedBots = account_connectedBots; + +export type messages_DialogFilters = messages_dialogFilters; + +export type Birthday = birthday; + +export type BotBusinessConnection = botBusinessConnection; + +export type InputBusinessIntro = inputBusinessIntro; + +export type BusinessIntro = businessIntro; + +export type messages_MyStickers = messages_myStickers; + +export type InputCollectible = inputCollectibleUsername | inputCollectiblePhone; + +export type fragment_CollectibleInfo = fragment_collectibleInfo; + +export type InputBusinessBotRecipients = inputBusinessBotRecipients; + +export type BusinessBotRecipients = businessBotRecipients; + +export type ContactBirthday = contactBirthday; + +export type contacts_ContactBirthdays = contacts_contactBirthdays; + +export type MissingInvitee = missingInvitee; + +export type messages_InvitedUsers = messages_invitedUsers; + +export type InputBusinessChatLink = inputBusinessChatLink; + +export type BusinessChatLink = businessChatLink; + +export type account_BusinessChatLinks = account_businessChatLinks; + +export type account_ResolvedBusinessChatLinks = account_resolvedBusinessChatLinks; + +export type RequestedPeer = requestedPeerUser | requestedPeerChat | requestedPeerChannel; + +export type SponsoredMessageReportOption = sponsoredMessageReportOption; + +export type channels_SponsoredMessageReportResult = channels_sponsoredMessageReportResultChooseOption | channels_sponsoredMessageReportResultAdsHidden | channels_sponsoredMessageReportResultReported; + +export type stats_BroadcastRevenueStats = stats_broadcastRevenueStats; + +export type stats_BroadcastRevenueWithdrawalUrl = stats_broadcastRevenueWithdrawalUrl; + +export type BroadcastRevenueTransaction = broadcastRevenueTransactionProceeds | broadcastRevenueTransactionWithdrawal | broadcastRevenueTransactionRefund; + +export type stats_BroadcastRevenueTransactions = stats_broadcastRevenueTransactions; + +const map: Map = new Map([ + [0x05162463, "resPQ"], + [0xA9F55F95, "p_q_inner_data_dc"], + [0x56FDDF88, "p_q_inner_data_temp_dc"], + [0xD0E8075C, "server_DH_params_ok"], + [0xB5890DBA, "server_DH_inner_data"], + [0x6643B654, "client_DH_inner_data"], + [0x3BCBF734, "dh_gen_ok"], + [0x46DC1FB9, "dh_gen_retry"], + [0xA69DAE02, "dh_gen_fail"], + [0x75A3F765, "bind_auth_key_inner"], + [0x2144CA19, "rpc_error"], + [0x5E2AD36E, "rpc_answer_unknown"], + [0xCD78E586, "rpc_answer_dropped_running"], + [0xA43AD8B7, "rpc_answer_dropped"], + [0x0949D9DC, "future_salt"], + [0xAE500895, "future_salts"], + [0x347773C5, "pong"], + [0xE22045FC, "destroy_session_ok"], + [0x62D350C9, "destroy_session_none"], + [0x9EC20908, "new_session_created"], + [0x3072CFA1, "gzip_packed"], + [0x62D6B459, "msgs_ack"], + [0xA7EFF811, "bad_msg_notification"], + [0xEDAB447B, "bad_server_salt"], + [0x7D861A08, "msg_resend_req"], + [0xDA69FB52, "msgs_state_req"], + [0x04DEB57D, "msgs_state_info"], + [0x8CC0D131, "msgs_all_info"], + [0x276D3EC6, "msg_detailed_info"], + [0x809DB6DF, "msg_new_detailed_info"], + [0xF660E1D4, "destroy_auth_key_ok"], + [0x0A9F2259, "destroy_auth_key_none"], + [0xEA109B13, "destroy_auth_key_fail"], + [0x9299359F, "http_wait"], + [0x3FEDD339, "true"], + [0xC4B9F9BB, "error"], + [0xD433AD73, "ipPort"], + [0x37982646, "ipPortSecret"], + [0x4679B65F, "accessPointRule"], + [0x5A592A6C, "help.configSimple"], + [0x27D69997, "inputPeerPhotoFileLocationLegacy"], + [0x0DBAEAE9, "inputStickerSetThumbLegacy"], + [0x7F3B18EA, "inputPeerEmpty"], + [0x7DA07EC9, "inputPeerSelf"], + [0x35A95CB9, "inputPeerChat"], + [0xDDE8A54C, "inputPeerUser"], + [0x27BCBBFC, "inputPeerChannel"], + [0xA87B0A1C, "inputPeerUserFromMessage"], + [0xBD2A0840, "inputPeerChannelFromMessage"], + [0xB98886CF, "inputUserEmpty"], + [0xF7C1B13F, "inputUserSelf"], + [0xF21158C6, "inputUser"], + [0x1DA448E2, "inputUserFromMessage"], + [0xF392B7F4, "inputPhoneContact"], + [0xF52FF27F, "inputFile"], + [0xFA4F0BB5, "inputFileBig"], + [0x9664F57F, "inputMediaEmpty"], + [0x1E287D04, "inputMediaUploadedPhoto"], + [0xB3BA0635, "inputMediaPhoto"], + [0xF9C44144, "inputMediaGeoPoint"], + [0xF8AB7DFB, "inputMediaContact"], + [0x5B38C6C1, "inputMediaUploadedDocument"], + [0x33473058, "inputMediaDocument"], + [0xC13D1C11, "inputMediaVenue"], + [0xE5BBFE1A, "inputMediaPhotoExternal"], + [0xFB52DC99, "inputMediaDocumentExternal"], + [0xD33F43F3, "inputMediaGame"], + [0x8EB5A6D5, "inputMediaInvoice"], + [0x971FA843, "inputMediaGeoLive"], + [0x0F94E5F1, "inputMediaPoll"], + [0xE66FBF7B, "inputMediaDice"], + [0x89FDD778, "inputMediaStory"], + [0xC21B8849, "inputMediaWebPage"], + [0x1CA48F57, "inputChatPhotoEmpty"], + [0xBDCDAEC0, "inputChatUploadedPhoto"], + [0x8953AD37, "inputChatPhoto"], + [0xE4C123D6, "inputGeoPointEmpty"], + [0x48222FAF, "inputGeoPoint"], + [0x1CD7BF0D, "inputPhotoEmpty"], + [0x3BB3B94A, "inputPhoto"], + [0xDFDAABE1, "inputFileLocation"], + [0xF5235D55, "inputEncryptedFileLocation"], + [0xBAD07584, "inputDocumentFileLocation"], + [0xCBC7EE28, "inputSecureFileLocation"], + [0x29BE5899, "inputTakeoutFileLocation"], + [0x40181FFE, "inputPhotoFileLocation"], + [0xD83466F3, "inputPhotoLegacyFileLocation"], + [0x37257E99, "inputPeerPhotoFileLocation"], + [0x9D84F3DB, "inputStickerSetThumb"], + [0x0598A92A, "inputGroupCallStream"], + [0x59511722, "peerUser"], + [0x36C6019A, "peerChat"], + [0xA2A5371E, "peerChannel"], + [0xAA963B05, "storage.fileUnknown"], + [0x40BC6F52, "storage.filePartial"], + [0x007EFE0E, "storage.fileJpeg"], + [0xCAE1AADF, "storage.fileGif"], + [0x0A4F63C0, "storage.filePng"], + [0xAE1E508D, "storage.filePdf"], + [0x528A0677, "storage.fileMp3"], + [0x4B09EBBC, "storage.fileMov"], + [0xB3CEA0E4, "storage.fileMp4"], + [0x1081464C, "storage.fileWebp"], + [0xD3BC4B7A, "userEmpty"], + [0x215C4438, "user"], + [0x4F11BAE1, "userProfilePhotoEmpty"], + [0x82D1F706, "userProfilePhoto"], + [0x09D05049, "userStatusEmpty"], + [0xEDB93949, "userStatusOnline"], + [0x008C703F, "userStatusOffline"], + [0x7B197DC8, "userStatusRecently"], + [0x541A1D1A, "userStatusLastWeek"], + [0x65899777, "userStatusLastMonth"], + [0x29562865, "chatEmpty"], + [0x41CBF256, "chat"], + [0x6592A1A7, "chatForbidden"], + [0x0AADFC8F, "channel"], + [0x17D493D5, "channelForbidden"], + [0xC9D31138, "chatFull"], + [0x44C054A7, "channelFull"], + [0xC02D4007, "chatParticipant"], + [0xE46BCEE4, "chatParticipantCreator"], + [0xA0933F5B, "chatParticipantAdmin"], + [0x8763D3E1, "chatParticipantsForbidden"], + [0x3CBC93F8, "chatParticipants"], + [0x37C1011C, "chatPhotoEmpty"], + [0x1C6E1C11, "chatPhoto"], + [0x90A6CA84, "messageEmpty"], + [0x2357BF25, "message"], + [0x2B085862, "messageService"], + [0x3DED6320, "messageMediaEmpty"], + [0x695150D7, "messageMediaPhoto"], + [0x56E0D474, "messageMediaGeo"], + [0x70322949, "messageMediaContact"], + [0x9F84F49E, "messageMediaUnsupported"], + [0x4CF4D72D, "messageMediaDocument"], + [0xDDF10C3B, "messageMediaWebPage"], + [0x2EC0533F, "messageMediaVenue"], + [0xFDB19008, "messageMediaGame"], + [0xF6A548D3, "messageMediaInvoice"], + [0xB940C666, "messageMediaGeoLive"], + [0x4BD6E798, "messageMediaPoll"], + [0x3F7EE58B, "messageMediaDice"], + [0x68CB6283, "messageMediaStory"], + [0xDAAD85B0, "messageMediaGiveaway"], + [0xC6991068, "messageMediaGiveawayResults"], + [0xB6AEF7B0, "messageActionEmpty"], + [0xBD47CBAD, "messageActionChatCreate"], + [0xB5A1CE5A, "messageActionChatEditTitle"], + [0x7FCB13A8, "messageActionChatEditPhoto"], + [0x95E3FBEF, "messageActionChatDeletePhoto"], + [0x15CEFD00, "messageActionChatAddUser"], + [0xA43F30CC, "messageActionChatDeleteUser"], + [0x031224C3, "messageActionChatJoinedByLink"], + [0x95D2AC92, "messageActionChannelCreate"], + [0xE1037F92, "messageActionChatMigrateTo"], + [0xEA3948E9, "messageActionChannelMigrateFrom"], + [0x94BD38ED, "messageActionPinMessage"], + [0x9FBAB604, "messageActionHistoryClear"], + [0x92A72876, "messageActionGameScore"], + [0x8F31B327, "messageActionPaymentSentMe"], + [0x96163F56, "messageActionPaymentSent"], + [0x80E11A7F, "messageActionPhoneCall"], + [0x4792929B, "messageActionScreenshotTaken"], + [0xFAE69F56, "messageActionCustomAction"], + [0xC516D679, "messageActionBotAllowed"], + [0x1B287353, "messageActionSecureValuesSentMe"], + [0xD95C6154, "messageActionSecureValuesSent"], + [0xF3F25F76, "messageActionContactSignUp"], + [0x98E0D697, "messageActionGeoProximityReached"], + [0x7A0D7F42, "messageActionGroupCall"], + [0x502F92F7, "messageActionInviteToGroupCall"], + [0x3C134D7B, "messageActionSetMessagesTTL"], + [0xB3A07661, "messageActionGroupCallScheduled"], + [0xAA786345, "messageActionSetChatTheme"], + [0xEBBCA3CB, "messageActionChatJoinedByRequest"], + [0x47DD8079, "messageActionWebViewDataSentMe"], + [0xB4C38CB5, "messageActionWebViewDataSent"], + [0xC83D6AEC, "messageActionGiftPremium"], + [0x0D999256, "messageActionTopicCreate"], + [0xC0944820, "messageActionTopicEdit"], + [0x57DE635E, "messageActionSuggestProfilePhoto"], + [0x31518E9B, "messageActionRequestedPeer"], + [0x5060A3F4, "messageActionSetChatWallPaper"], + [0x678C2E09, "messageActionGiftCode"], + [0x332BA9ED, "messageActionGiveawayLaunch"], + [0x2A9FADC5, "messageActionGiveawayResults"], + [0xCC02AA6D, "messageActionBoostApply"], + [0x93B31848, "messageActionRequestedPeerSentMe"], + [0xD58A08C6, "dialog"], + [0x71BD134C, "dialogFolder"], + [0x2331B22D, "photoEmpty"], + [0xFB197A65, "photo"], + [0x0E17E23C, "photoSizeEmpty"], + [0x75C78E60, "photoSize"], + [0x021E1AD6, "photoCachedSize"], + [0xE0B0BC2E, "photoStrippedSize"], + [0xFA3EFB95, "photoSizeProgressive"], + [0xD8214D41, "photoPathSize"], + [0x1117DD5F, "geoPointEmpty"], + [0xB2A2F663, "geoPoint"], + [0x5E002502, "auth.sentCode"], + [0x2390FE44, "auth.sentCodeSuccess"], + [0x2EA2C0D4, "auth.authorization"], + [0x44747E9A, "auth.authorizationSignUpRequired"], + [0xB434E2B8, "auth.exportedAuthorization"], + [0xB8BC5B0C, "inputNotifyPeer"], + [0x193B4417, "inputNotifyUsers"], + [0x4A95E84E, "inputNotifyChats"], + [0xB1DB7C7E, "inputNotifyBroadcasts"], + [0x5C467992, "inputNotifyForumTopic"], + [0xCACB6AE2, "inputPeerNotifySettings"], + [0x99622C0C, "peerNotifySettings"], + [0xACD66C5E, "peerSettings"], + [0xA437C3ED, "wallPaper"], + [0xE0804116, "wallPaperNoFile"], + [0x58DBCAB8, "inputReportReasonSpam"], + [0x1E22C78D, "inputReportReasonViolence"], + [0x2E59D922, "inputReportReasonPornography"], + [0xADF44EE3, "inputReportReasonChildAbuse"], + [0xC1E4A2B1, "inputReportReasonOther"], + [0x9B89F93A, "inputReportReasonCopyright"], + [0xDBD4FEED, "inputReportReasonGeoIrrelevant"], + [0xF5DDD6E7, "inputReportReasonFake"], + [0x0A8EB2BE, "inputReportReasonIllegalDrugs"], + [0x9EC7863D, "inputReportReasonPersonalDetails"], + [0xCC997720, "userFull"], + [0x145ADE0B, "contact"], + [0xC13E3C50, "importedContact"], + [0x16D9703B, "contactStatus"], + [0xB74BA9D2, "contacts.contactsNotModified"], + [0xEAE87E42, "contacts.contacts"], + [0x77D01C3B, "contacts.importedContacts"], + [0x0ADE1591, "contacts.blocked"], + [0xE1664194, "contacts.blockedSlice"], + [0x15BA6C40, "messages.dialogs"], + [0x71E094F3, "messages.dialogsSlice"], + [0xF0E3E596, "messages.dialogsNotModified"], + [0x8C718E87, "messages.messages"], + [0x3A54685E, "messages.messagesSlice"], + [0xC776BA4E, "messages.channelMessages"], + [0x74535F21, "messages.messagesNotModified"], + [0x64FF9FD5, "messages.chats"], + [0x9CD81144, "messages.chatsSlice"], + [0xE5D7D19C, "messages.chatFull"], + [0xB45C69D1, "messages.affectedHistory"], + [0x57E2F66C, "inputMessagesFilterEmpty"], + [0x9609A51C, "inputMessagesFilterPhotos"], + [0x9FC00E65, "inputMessagesFilterVideo"], + [0x56E9F0E4, "inputMessagesFilterPhotoVideo"], + [0x9EDDF188, "inputMessagesFilterDocument"], + [0x7EF0DD87, "inputMessagesFilterUrl"], + [0xFFC86587, "inputMessagesFilterGif"], + [0x50F5C392, "inputMessagesFilterVoice"], + [0x3751B49E, "inputMessagesFilterMusic"], + [0x3A20ECB8, "inputMessagesFilterChatPhotos"], + [0x80C99768, "inputMessagesFilterPhoneCalls"], + [0x7A7C17A4, "inputMessagesFilterRoundVoice"], + [0xB549DA53, "inputMessagesFilterRoundVideo"], + [0xC1F8E69A, "inputMessagesFilterMyMentions"], + [0xE7026D0D, "inputMessagesFilterGeo"], + [0xE062DB83, "inputMessagesFilterContacts"], + [0x1BB00451, "inputMessagesFilterPinned"], + [0x1F2B0AFD, "updateNewMessage"], + [0x4E90BFD6, "updateMessageID"], + [0xA20DB0E5, "updateDeleteMessages"], + [0xC01E857F, "updateUserTyping"], + [0x83487AF0, "updateChatUserTyping"], + [0x07761198, "updateChatParticipants"], + [0xE5BDF8DE, "updateUserStatus"], + [0xA7848924, "updateUserName"], + [0x8951ABEF, "updateNewAuthorization"], + [0x12BCBD9A, "updateNewEncryptedMessage"], + [0x1710F156, "updateEncryptedChatTyping"], + [0xB4A2E88D, "updateEncryption"], + [0x38FE25B7, "updateEncryptedMessagesRead"], + [0x3DDA5451, "updateChatParticipantAdd"], + [0xE32F3D77, "updateChatParticipantDelete"], + [0x8E5E9873, "updateDcOptions"], + [0xBEC268EF, "updateNotifySettings"], + [0xEBE46819, "updateServiceNotification"], + [0xEE3B272A, "updatePrivacy"], + [0x05492A13, "updateUserPhone"], + [0x9C974FDF, "updateReadHistoryInbox"], + [0x2F2F21BF, "updateReadHistoryOutbox"], + [0x7F891213, "updateWebPage"], + [0xF8227181, "updateReadMessagesContents"], + [0x108D941F, "updateChannelTooLong"], + [0x635B4C09, "updateChannel"], + [0x62BA04D9, "updateNewChannelMessage"], + [0x922E6E10, "updateReadChannelInbox"], + [0xC32D5B12, "updateDeleteChannelMessages"], + [0xF226AC08, "updateChannelMessageViews"], + [0xD7CA61A2, "updateChatParticipantAdmin"], + [0x688A30AA, "updateNewStickerSet"], + [0x0BB2D201, "updateStickerSetsOrder"], + [0x31C24808, "updateStickerSets"], + [0x9375341E, "updateSavedGifs"], + [0x496F379C, "updateBotInlineQuery"], + [0x12F12A07, "updateBotInlineSend"], + [0x1B3F4DF7, "updateEditChannelMessage"], + [0xB9CFC48D, "updateBotCallbackQuery"], + [0xE40370A3, "updateEditMessage"], + [0x691E9052, "updateInlineBotCallbackQuery"], + [0xB75F99A9, "updateReadChannelOutbox"], + [0x1B49EC6D, "updateDraftMessage"], + [0x571D2742, "updateReadFeaturedStickers"], + [0x9A422C20, "updateRecentStickers"], + [0xA229DD06, "updateConfig"], + [0x3354678F, "updatePtsChanged"], + [0x2F2BA99F, "updateChannelWebPage"], + [0x6E6FE51C, "updateDialogPinned"], + [0xFA0F3CA2, "updatePinnedDialogs"], + [0x8317C0C3, "updateBotWebhookJSON"], + [0x9B9240A6, "updateBotWebhookJSONQuery"], + [0xB5AEFD7D, "updateBotShippingQuery"], + [0x8CAA9A96, "updateBotPrecheckoutQuery"], + [0xAB0F6B1E, "updatePhoneCall"], + [0x46560264, "updateLangPackTooLong"], + [0x56022F4D, "updateLangPack"], + [0xE511996D, "updateFavedStickers"], + [0xEA29055D, "updateChannelReadMessagesContents"], + [0x7084A7BE, "updateContactsReset"], + [0xB23FC698, "updateChannelAvailableMessages"], + [0xE16459C3, "updateDialogUnreadMark"], + [0xACA1657B, "updateMessagePoll"], + [0x54C01850, "updateChatDefaultBannedRights"], + [0x19360DC0, "updateFolderPeers"], + [0x6A7E7366, "updatePeerSettings"], + [0xB4AFCFB0, "updatePeerLocated"], + [0x39A51DFB, "updateNewScheduledMessage"], + [0x90866CEE, "updateDeleteScheduledMessages"], + [0x8216FBA3, "updateTheme"], + [0x871FB939, "updateGeoLiveViewed"], + [0x564FE691, "updateLoginToken"], + [0x24F40E77, "updateMessagePollVote"], + [0x26FFDE7D, "updateDialogFilter"], + [0xA5D72105, "updateDialogFilterOrder"], + [0x3504914F, "updateDialogFilters"], + [0x2661BF09, "updatePhoneCallSignalingData"], + [0xD29A27F4, "updateChannelMessageForwards"], + [0xD6B19546, "updateReadChannelDiscussionInbox"], + [0x695C9E7C, "updateReadChannelDiscussionOutbox"], + [0xEBE07752, "updatePeerBlocked"], + [0x8C88C923, "updateChannelUserTyping"], + [0xED85EAB5, "updatePinnedMessages"], + [0x5BB98608, "updatePinnedChannelMessages"], + [0xF89A6A4E, "updateChat"], + [0xF2EBDB4E, "updateGroupCallParticipants"], + [0x14B24500, "updateGroupCall"], + [0xBB9BB9A5, "updatePeerHistoryTTL"], + [0xD087663A, "updateChatParticipant"], + [0x985D3ABB, "updateChannelParticipant"], + [0xC4870A49, "updateBotStopped"], + [0x0B783982, "updateGroupCallConnection"], + [0x4D712F2E, "updateBotCommands"], + [0x7063C3DB, "updatePendingJoinRequests"], + [0x11DFA986, "updateBotChatInviteRequester"], + [0x5E1B3CB8, "updateMessageReactions"], + [0x17B7A20B, "updateAttachMenuBots"], + [0x1592B79D, "updateWebViewResultSent"], + [0x14B85813, "updateBotMenuButton"], + [0x74D8BE99, "updateSavedRingtones"], + [0x0084CD5A, "updateTranscribedAudio"], + [0xFB4C496C, "updateReadFeaturedEmojiStickers"], + [0x28373599, "updateUserEmojiStatus"], + [0x30F443DB, "updateRecentEmojiStatuses"], + [0x6F7863F4, "updateRecentReactions"], + [0x86FCCF85, "updateMoveStickerSetToTop"], + [0x5A73A98C, "updateMessageExtendedMedia"], + [0x192EFBE3, "updateChannelPinnedTopic"], + [0xFE198602, "updateChannelPinnedTopics"], + [0x20529438, "updateUser"], + [0xEC05B097, "updateAutoSaveSettings"], + [0x75B3B798, "updateStory"], + [0xF74E932B, "updateReadStories"], + [0x1BF335B9, "updateStoryID"], + [0x2C084DC1, "updateStoriesStealthMode"], + [0x7D627683, "updateSentStoryReaction"], + [0x904DD49C, "updateBotChatBoost"], + [0x07B68920, "updateChannelViewForumAsMessages"], + [0xAE3F101D, "updatePeerWallpaper"], + [0xAC21D3CE, "updateBotMessageReaction"], + [0x09CB7759, "updateBotMessageReactions"], + [0xAEAF9E74, "updateSavedDialogPinned"], + [0x686C85A6, "updatePinnedSavedDialogs"], + [0x39C67432, "updateSavedReactionTags"], + [0xF16269D4, "updateSmsJob"], + [0xF9470AB2, "updateQuickReplies"], + [0xF53DA717, "updateNewQuickReply"], + [0x53E6F1EC, "updateDeleteQuickReply"], + [0x3E050D0F, "updateQuickReplyMessage"], + [0x566FE7CD, "updateDeleteQuickReplyMessages"], + [0x8AE5C97A, "updateBotBusinessConnect"], + [0x9DDB347C, "updateBotNewBusinessMessage"], + [0x07DF587C, "updateBotEditBusinessMessage"], + [0xA02A982E, "updateBotDeleteBusinessMessage"], + [0xA56C2A3E, "updates.state"], + [0x5D75A138, "updates.differenceEmpty"], + [0x00F49CA0, "updates.difference"], + [0xA8FB1981, "updates.differenceSlice"], + [0x4AFE8F6D, "updates.differenceTooLong"], + [0xE317AF7E, "updatesTooLong"], + [0x313BC7F8, "updateShortMessage"], + [0x4D6DEEA5, "updateShortChatMessage"], + [0x78D4DEC1, "updateShort"], + [0x725B04C3, "updatesCombined"], + [0x74AE4240, "updates"], + [0x9015E101, "updateShortSentMessage"], + [0x8DCA6AA5, "photos.photos"], + [0x15051F54, "photos.photosSlice"], + [0x20212CA8, "photos.photo"], + [0x096A18D5, "upload.file"], + [0xF18CDA44, "upload.fileCdnRedirect"], + [0x18B7A10D, "dcOption"], + [0xCC1A241E, "config"], + [0x8E1A1775, "nearestDc"], + [0xCCBBCE30, "help.appUpdate"], + [0xC45A6536, "help.noAppUpdate"], + [0x18CB9F78, "help.inviteText"], + [0xAB7EC0A0, "encryptedChatEmpty"], + [0x66B25953, "encryptedChatWaiting"], + [0x48F1D94C, "encryptedChatRequested"], + [0x61F0D4C7, "encryptedChat"], + [0x1E1C7C45, "encryptedChatDiscarded"], + [0xF141B5E1, "inputEncryptedChat"], + [0xC21F497E, "encryptedFileEmpty"], + [0xA8008CD8, "encryptedFile"], + [0x1837C364, "inputEncryptedFileEmpty"], + [0x64BD0306, "inputEncryptedFileUploaded"], + [0x5A17B5E5, "inputEncryptedFile"], + [0x2DC173C8, "inputEncryptedFileBigUploaded"], + [0xED18C118, "encryptedMessage"], + [0x23734B06, "encryptedMessageService"], + [0xC0E24635, "messages.dhConfigNotModified"], + [0x2C221EDD, "messages.dhConfig"], + [0x560F8935, "messages.sentEncryptedMessage"], + [0x9493FF32, "messages.sentEncryptedFile"], + [0x72F0EAAE, "inputDocumentEmpty"], + [0x1ABFB575, "inputDocument"], + [0x36F8C871, "documentEmpty"], + [0x8FD4C4D8, "document"], + [0x17C6B5F6, "help.support"], + [0x9FD40BD8, "notifyPeer"], + [0xB4C83B4C, "notifyUsers"], + [0xC007CEC3, "notifyChats"], + [0xD612E8EF, "notifyBroadcasts"], + [0x226E6308, "notifyForumTopic"], + [0x16BF744E, "sendMessageTypingAction"], + [0xFD5EC8F5, "sendMessageCancelAction"], + [0xA187D66F, "sendMessageRecordVideoAction"], + [0xE9763AEC, "sendMessageUploadVideoAction"], + [0xD52F73F7, "sendMessageRecordAudioAction"], + [0xF351D7AB, "sendMessageUploadAudioAction"], + [0xD1D34A26, "sendMessageUploadPhotoAction"], + [0xAA0CD9E4, "sendMessageUploadDocumentAction"], + [0x176F8BA1, "sendMessageGeoLocationAction"], + [0x628CBC6F, "sendMessageChooseContactAction"], + [0xDD6A8F48, "sendMessageGamePlayAction"], + [0x88F27FBC, "sendMessageRecordRoundAction"], + [0x243E1C66, "sendMessageUploadRoundAction"], + [0xD92C2285, "speakingInGroupCallAction"], + [0xDBDA9246, "sendMessageHistoryImportAction"], + [0xB05AC6B1, "sendMessageChooseStickerAction"], + [0x25972BCB, "sendMessageEmojiInteraction"], + [0xB665902E, "sendMessageEmojiInteractionSeen"], + [0xB3134D9D, "contacts.found"], + [0x4F96CB18, "inputPrivacyKeyStatusTimestamp"], + [0xBDFB0426, "inputPrivacyKeyChatInvite"], + [0xFABADC5F, "inputPrivacyKeyPhoneCall"], + [0xDB9E70D2, "inputPrivacyKeyPhoneP2P"], + [0xA4DD4C08, "inputPrivacyKeyForwards"], + [0x5719BACC, "inputPrivacyKeyProfilePhoto"], + [0x0352DAFA, "inputPrivacyKeyPhoneNumber"], + [0xD1219BDD, "inputPrivacyKeyAddedByPhone"], + [0xAEE69D68, "inputPrivacyKeyVoiceMessages"], + [0x3823CC40, "inputPrivacyKeyAbout"], + [0xD65A11CC, "inputPrivacyKeyBirthday"], + [0xBC2EAB30, "privacyKeyStatusTimestamp"], + [0x500E6DFA, "privacyKeyChatInvite"], + [0x3D662B7B, "privacyKeyPhoneCall"], + [0x39491CC8, "privacyKeyPhoneP2P"], + [0x69EC56A3, "privacyKeyForwards"], + [0x96151FED, "privacyKeyProfilePhoto"], + [0xD19AE46D, "privacyKeyPhoneNumber"], + [0x42FFD42B, "privacyKeyAddedByPhone"], + [0x0697F414, "privacyKeyVoiceMessages"], + [0xA486B761, "privacyKeyAbout"], + [0x2000A518, "privacyKeyBirthday"], + [0x0D09E07B, "inputPrivacyValueAllowContacts"], + [0x184B35CE, "inputPrivacyValueAllowAll"], + [0x131CC67F, "inputPrivacyValueAllowUsers"], + [0x0BA52007, "inputPrivacyValueDisallowContacts"], + [0xD66B66C9, "inputPrivacyValueDisallowAll"], + [0x90110467, "inputPrivacyValueDisallowUsers"], + [0x840649CF, "inputPrivacyValueAllowChatParticipants"], + [0xE94F0F86, "inputPrivacyValueDisallowChatParticipants"], + [0x2F453E49, "inputPrivacyValueAllowCloseFriends"], + [0x77CDC9F1, "inputPrivacyValueAllowPremium"], + [0xFFFE1BAC, "privacyValueAllowContacts"], + [0x65427B82, "privacyValueAllowAll"], + [0xB8905FB2, "privacyValueAllowUsers"], + [0xF888FA1A, "privacyValueDisallowContacts"], + [0x8B73E763, "privacyValueDisallowAll"], + [0xE4621141, "privacyValueDisallowUsers"], + [0x6B134E8E, "privacyValueAllowChatParticipants"], + [0x41C87565, "privacyValueDisallowChatParticipants"], + [0xF7E8D89B, "privacyValueAllowCloseFriends"], + [0xECE9814B, "privacyValueAllowPremium"], + [0x50A04E45, "account.privacyRules"], + [0xB8D0AFDF, "accountDaysTTL"], + [0x6C37C15C, "documentAttributeImageSize"], + [0x11B58939, "documentAttributeAnimated"], + [0x6319D612, "documentAttributeSticker"], + [0xD38FF1C2, "documentAttributeVideo"], + [0x9852F9C6, "documentAttributeAudio"], + [0x15590068, "documentAttributeFilename"], + [0x9801D2F7, "documentAttributeHasStickers"], + [0xFD149899, "documentAttributeCustomEmoji"], + [0xF1749A22, "messages.stickersNotModified"], + [0x30A6EC7E, "messages.stickers"], + [0x12B299D4, "stickerPack"], + [0xE86602C3, "messages.allStickersNotModified"], + [0xCDBBCEBB, "messages.allStickers"], + [0x84D19185, "messages.affectedMessages"], + [0x211A1788, "webPageEmpty"], + [0xB0D13E47, "webPagePending"], + [0xE89C45B2, "webPage"], + [0x7311CA11, "webPageNotModified"], + [0xAD01D61D, "authorization"], + [0x4BFF8EA0, "account.authorizations"], + [0x957B50FB, "account.password"], + [0x9A5C33E5, "account.passwordSettings"], + [0xC23727C9, "account.passwordInputSettings"], + [0x137948A5, "auth.passwordRecovery"], + [0xA384B779, "receivedNotifyMessage"], + [0x0AB4A819, "chatInviteExported"], + [0xED107AB7, "chatInvitePublicJoinRequests"], + [0x5A686D7C, "chatInviteAlready"], + [0xCDE0EC40, "chatInvite"], + [0x61695CB0, "chatInvitePeek"], + [0xFFB62B95, "inputStickerSetEmpty"], + [0x9DE7A269, "inputStickerSetID"], + [0x861CC8A0, "inputStickerSetShortName"], + [0x028703C8, "inputStickerSetAnimatedEmoji"], + [0xE67F520E, "inputStickerSetDice"], + [0x0CDE3739, "inputStickerSetAnimatedEmojiAnimations"], + [0xC88B3B02, "inputStickerSetPremiumGifts"], + [0x04C4D4CE, "inputStickerSetEmojiGenericAnimations"], + [0x29D0F5EE, "inputStickerSetEmojiDefaultStatuses"], + [0x44C1F8E9, "inputStickerSetEmojiDefaultTopicIcons"], + [0x49748553, "inputStickerSetEmojiChannelDefaultStatuses"], + [0x2DD14EDC, "stickerSet"], + [0x6E153F16, "messages.stickerSet"], + [0xD3F924EB, "messages.stickerSetNotModified"], + [0xC27AC8C7, "botCommand"], + [0x8F300B57, "botInfo"], + [0xA2FA4880, "keyboardButton"], + [0x258AFF05, "keyboardButtonUrl"], + [0x35BBDB6B, "keyboardButtonCallback"], + [0xB16A6C29, "keyboardButtonRequestPhone"], + [0xFC796B3F, "keyboardButtonRequestGeoLocation"], + [0x93B9FBB5, "keyboardButtonSwitchInline"], + [0x50F41CCF, "keyboardButtonGame"], + [0xAFD93FBB, "keyboardButtonBuy"], + [0x10B78D29, "keyboardButtonUrlAuth"], + [0xD02E7FD4, "inputKeyboardButtonUrlAuth"], + [0xBBC7515D, "keyboardButtonRequestPoll"], + [0xE988037B, "inputKeyboardButtonUserProfile"], + [0x308660C1, "keyboardButtonUserProfile"], + [0x13767230, "keyboardButtonWebView"], + [0xA0C0505C, "keyboardButtonSimpleWebView"], + [0x53D7BFD8, "keyboardButtonRequestPeer"], + [0xC9662D05, "inputKeyboardButtonRequestPeer"], + [0x77608B83, "keyboardButtonRow"], + [0xA03E5B85, "replyKeyboardHide"], + [0x86B40B08, "replyKeyboardForceReply"], + [0x85DD99D1, "replyKeyboardMarkup"], + [0x48A30254, "replyInlineMarkup"], + [0xBB92BA95, "messageEntityUnknown"], + [0xFA04579D, "messageEntityMention"], + [0x6F635B0D, "messageEntityHashtag"], + [0x6CEF8AC7, "messageEntityBotCommand"], + [0x6ED02538, "messageEntityUrl"], + [0x64E475C2, "messageEntityEmail"], + [0xBD610BC9, "messageEntityBold"], + [0x826F8B60, "messageEntityItalic"], + [0x28A20571, "messageEntityCode"], + [0x73924BE0, "messageEntityPre"], + [0x76A6D327, "messageEntityTextUrl"], + [0xDC7B1140, "messageEntityMentionName"], + [0x208E68C9, "inputMessageEntityMentionName"], + [0x9B69E34B, "messageEntityPhone"], + [0x4C4E743F, "messageEntityCashtag"], + [0x9C4E7E8B, "messageEntityUnderline"], + [0xBF0693D4, "messageEntityStrike"], + [0x761E6AF4, "messageEntityBankCard"], + [0x32CA960F, "messageEntitySpoiler"], + [0xC8CF05F8, "messageEntityCustomEmoji"], + [0x020DF5D0, "messageEntityBlockquote"], + [0xEE8C1E86, "inputChannelEmpty"], + [0xF35AEC28, "inputChannel"], + [0x5B934F9D, "inputChannelFromMessage"], + [0x7F077AD9, "contacts.resolvedPeer"], + [0x0AE30253, "messageRange"], + [0x3E11AFFB, "updates.channelDifferenceEmpty"], + [0xA4BCC6FE, "updates.channelDifferenceTooLong"], + [0x2064674E, "updates.channelDifference"], + [0x94D42EE7, "channelMessagesFilterEmpty"], + [0xCD77D957, "channelMessagesFilter"], + [0xC00C07C0, "channelParticipant"], + [0x35A8BFA7, "channelParticipantSelf"], + [0x2FE601D3, "channelParticipantCreator"], + [0x34C3BB53, "channelParticipantAdmin"], + [0x6DF8014E, "channelParticipantBanned"], + [0x1B03F006, "channelParticipantLeft"], + [0xDE3F3C79, "channelParticipantsRecent"], + [0xB4608969, "channelParticipantsAdmins"], + [0xA3B54985, "channelParticipantsKicked"], + [0xB0D1865B, "channelParticipantsBots"], + [0x1427A5E1, "channelParticipantsBanned"], + [0x0656AC4B, "channelParticipantsSearch"], + [0xBB6AE88D, "channelParticipantsContacts"], + [0xE04B5CEB, "channelParticipantsMentions"], + [0x9AB0FEAF, "channels.channelParticipants"], + [0xF0173FE9, "channels.channelParticipantsNotModified"], + [0xDFB80317, "channels.channelParticipant"], + [0x780A0310, "help.termsOfService"], + [0xE8025CA2, "messages.savedGifsNotModified"], + [0x84A02A0D, "messages.savedGifs"], + [0x3380C786, "inputBotInlineMessageMediaAuto"], + [0x3DCD7A87, "inputBotInlineMessageText"], + [0x96929A85, "inputBotInlineMessageMediaGeo"], + [0x417BBF11, "inputBotInlineMessageMediaVenue"], + [0xA6EDBFFD, "inputBotInlineMessageMediaContact"], + [0x4B425864, "inputBotInlineMessageGame"], + [0xD7E78225, "inputBotInlineMessageMediaInvoice"], + [0xBDDCC510, "inputBotInlineMessageMediaWebPage"], + [0x88BF9319, "inputBotInlineResult"], + [0xA8D864A7, "inputBotInlineResultPhoto"], + [0xFFF8FDC4, "inputBotInlineResultDocument"], + [0x4FA417F2, "inputBotInlineResultGame"], + [0x764CF810, "botInlineMessageMediaAuto"], + [0x8C7F65E2, "botInlineMessageText"], + [0x051846FD, "botInlineMessageMediaGeo"], + [0x8A86659C, "botInlineMessageMediaVenue"], + [0x18D1CDC2, "botInlineMessageMediaContact"], + [0x354A9B09, "botInlineMessageMediaInvoice"], + [0x809AD9A6, "botInlineMessageMediaWebPage"], + [0x11965F3A, "botInlineResult"], + [0x17DB940B, "botInlineMediaResult"], + [0xE021F2F6, "messages.botResults"], + [0x5DAB1AF4, "exportedMessageLink"], + [0x4E4DF4BB, "messageFwdHeader"], + [0x72A3158C, "auth.codeTypeSms"], + [0x741CD3E3, "auth.codeTypeCall"], + [0x226CCEFB, "auth.codeTypeFlashCall"], + [0xD61AD6EE, "auth.codeTypeMissedCall"], + [0x06ED998C, "auth.codeTypeFragmentSms"], + [0x3DBB5986, "auth.sentCodeTypeApp"], + [0xC000BBA2, "auth.sentCodeTypeSms"], + [0x5353E5A7, "auth.sentCodeTypeCall"], + [0xAB03C6D9, "auth.sentCodeTypeFlashCall"], + [0x82006484, "auth.sentCodeTypeMissedCall"], + [0xF450F59B, "auth.sentCodeTypeEmailCode"], + [0xA5491DEA, "auth.sentCodeTypeSetUpEmailRequired"], + [0xD9565C39, "auth.sentCodeTypeFragmentSms"], + [0xE57B1432, "auth.sentCodeTypeFirebaseSms"], + [0x36585EA4, "messages.botCallbackAnswer"], + [0x26B5DDE6, "messages.messageEditData"], + [0x890C3D89, "inputBotInlineMessageID"], + [0xB6D915D7, "inputBotInlineMessageID64"], + [0x3C20629F, "inlineBotSwitchPM"], + [0x3371C354, "messages.peerDialogs"], + [0xEDCDC05B, "topPeer"], + [0xAB661B5B, "topPeerCategoryBotsPM"], + [0x148677E2, "topPeerCategoryBotsInline"], + [0x0637B7ED, "topPeerCategoryCorrespondents"], + [0xBD17A14A, "topPeerCategoryGroups"], + [0x161D9628, "topPeerCategoryChannels"], + [0x1E76A78C, "topPeerCategoryPhoneCalls"], + [0xA8406CA9, "topPeerCategoryForwardUsers"], + [0xFBEEC0F0, "topPeerCategoryForwardChats"], + [0xFB834291, "topPeerCategoryPeers"], + [0xDE266EF5, "contacts.topPeersNotModified"], + [0x70B772A8, "contacts.topPeers"], + [0xB52C939D, "contacts.topPeersDisabled"], + [0x1B0C841A, "draftMessageEmpty"], + [0x3FCCF7EF, "draftMessage"], + [0xC6DC0C66, "messages.featuredStickersNotModified"], + [0xBE382906, "messages.featuredStickers"], + [0x0B17F890, "messages.recentStickersNotModified"], + [0x88D37C56, "messages.recentStickers"], + [0x4FCBA9C8, "messages.archivedStickers"], + [0x38641628, "messages.stickerSetInstallResultSuccess"], + [0x35E410A8, "messages.stickerSetInstallResultArchive"], + [0x6410A5D2, "stickerSetCovered"], + [0x3407E51B, "stickerSetMultiCovered"], + [0x40D13C0E, "stickerSetFullCovered"], + [0x77B15D1C, "stickerSetNoCovered"], + [0xAED6DBB2, "maskCoords"], + [0x4A992157, "inputStickeredMediaPhoto"], + [0x0438865B, "inputStickeredMediaDocument"], + [0xBDF9653B, "game"], + [0x032C3E77, "inputGameID"], + [0xC331E80A, "inputGameShortName"], + [0x73A379EB, "highScore"], + [0x9A3BFD99, "messages.highScores"], + [0xDC3D824F, "textEmpty"], + [0x744694E0, "textPlain"], + [0x6724ABC4, "textBold"], + [0xD912A59C, "textItalic"], + [0xC12622C4, "textUnderline"], + [0x9BF8BB95, "textStrike"], + [0x6C3F19B9, "textFixed"], + [0x3C2884C1, "textUrl"], + [0xDE5A0DD6, "textEmail"], + [0x7E6260D7, "textConcat"], + [0xED6A8504, "textSubscript"], + [0xC7FB5E01, "textSuperscript"], + [0x034B8621, "textMarked"], + [0x1CCB966A, "textPhone"], + [0x081CCF4F, "textImage"], + [0x35553762, "textAnchor"], + [0x13567E8A, "pageBlockUnsupported"], + [0x70ABC3FD, "pageBlockTitle"], + [0x8FFA9A1F, "pageBlockSubtitle"], + [0xBAAFE5E0, "pageBlockAuthorDate"], + [0xBFD064EC, "pageBlockHeader"], + [0xF12BB6E1, "pageBlockSubheader"], + [0x467A0766, "pageBlockParagraph"], + [0xC070D93E, "pageBlockPreformatted"], + [0x48870999, "pageBlockFooter"], + [0xDB20B188, "pageBlockDivider"], + [0xCE0D37B0, "pageBlockAnchor"], + [0xE4E88011, "pageBlockList"], + [0x263D7C26, "pageBlockBlockquote"], + [0x4F4456D3, "pageBlockPullquote"], + [0x1759C560, "pageBlockPhoto"], + [0x7C8FE7B6, "pageBlockVideo"], + [0x39F23300, "pageBlockCover"], + [0xA8718DC5, "pageBlockEmbed"], + [0xF259A80B, "pageBlockEmbedPost"], + [0x65A0FA4D, "pageBlockCollage"], + [0x031F9590, "pageBlockSlideshow"], + [0xEF1751B5, "pageBlockChannel"], + [0x804361EA, "pageBlockAudio"], + [0x1E148390, "pageBlockKicker"], + [0xBF4DEA82, "pageBlockTable"], + [0x9A8AE1E1, "pageBlockOrderedList"], + [0x76768BED, "pageBlockDetails"], + [0x16115A96, "pageBlockRelatedArticles"], + [0xA44F3EF6, "pageBlockMap"], + [0x85E42301, "phoneCallDiscardReasonMissed"], + [0xE095C1A0, "phoneCallDiscardReasonDisconnect"], + [0x57ADC690, "phoneCallDiscardReasonHangup"], + [0xFAF7E8C9, "phoneCallDiscardReasonBusy"], + [0x7D748D04, "dataJSON"], + [0xCB296BF8, "labeledPrice"], + [0x5DB95A15, "invoice"], + [0xEA02C27E, "paymentCharge"], + [0x1E8CAAEB, "postAddress"], + [0x909C3F94, "paymentRequestedInfo"], + [0xCDC27A1F, "paymentSavedCredentialsCard"], + [0x1C570ED1, "webDocument"], + [0xF9C8BCC6, "webDocumentNoProxy"], + [0x9BED434D, "inputWebDocument"], + [0xC239D686, "inputWebFileLocation"], + [0x9F2221C9, "inputWebFileGeoPointLocation"], + [0xF46FE924, "inputWebFileAudioAlbumThumbLocation"], + [0x21E753BC, "upload.webFile"], + [0xA0058751, "payments.paymentForm"], + [0xD1451883, "payments.validatedRequestedInfo"], + [0x4E5F810D, "payments.paymentResult"], + [0xD8411139, "payments.paymentVerificationNeeded"], + [0x70C4FE03, "payments.paymentReceipt"], + [0xFB8FE43C, "payments.savedInfo"], + [0xC10EB2CF, "inputPaymentCredentialsSaved"], + [0x3417D728, "inputPaymentCredentials"], + [0x0AA1C39F, "inputPaymentCredentialsApplePay"], + [0x8AC32801, "inputPaymentCredentialsGooglePay"], + [0xDB64FD34, "account.tmpPassword"], + [0xB6213CDF, "shippingOption"], + [0x32DA9E9C, "inputStickerSetItem"], + [0x1E36FDED, "inputPhoneCall"], + [0x5366C915, "phoneCallEmpty"], + [0xC5226F17, "phoneCallWaiting"], + [0x14B0ED0C, "phoneCallRequested"], + [0x3660C311, "phoneCallAccepted"], + [0x30535AF5, "phoneCall"], + [0x50CA4DE1, "phoneCallDiscarded"], + [0x9CC123C7, "phoneConnection"], + [0x635FE375, "phoneConnectionWebrtc"], + [0xFC878FC8, "phoneCallProtocol"], + [0xEC82E140, "phone.phoneCall"], + [0xEEA8E46E, "upload.cdnFileReuploadNeeded"], + [0xA99FCA4F, "upload.cdnFile"], + [0xC982EABA, "cdnPublicKey"], + [0x5725E40A, "cdnConfig"], + [0xCAD181F6, "langPackString"], + [0x6C47AC9F, "langPackStringPluralized"], + [0x2979EEB2, "langPackStringDeleted"], + [0xF385C1F6, "langPackDifference"], + [0xEECA5CE3, "langPackLanguage"], + [0xE6DFB825, "channelAdminLogEventActionChangeTitle"], + [0x55188A2E, "channelAdminLogEventActionChangeAbout"], + [0x6A4AFC38, "channelAdminLogEventActionChangeUsername"], + [0x434BD2AF, "channelAdminLogEventActionChangePhoto"], + [0x1B7907AE, "channelAdminLogEventActionToggleInvites"], + [0x26AE0971, "channelAdminLogEventActionToggleSignatures"], + [0xE9E82C18, "channelAdminLogEventActionUpdatePinned"], + [0x709B2405, "channelAdminLogEventActionEditMessage"], + [0x42E047BB, "channelAdminLogEventActionDeleteMessage"], + [0x183040D3, "channelAdminLogEventActionParticipantJoin"], + [0xF89777F2, "channelAdminLogEventActionParticipantLeave"], + [0xE31C34D8, "channelAdminLogEventActionParticipantInvite"], + [0xE6D83D7E, "channelAdminLogEventActionParticipantToggleBan"], + [0xD5676710, "channelAdminLogEventActionParticipantToggleAdmin"], + [0xB1C3CAA7, "channelAdminLogEventActionChangeStickerSet"], + [0x5F5C95F1, "channelAdminLogEventActionTogglePreHistoryHidden"], + [0x2DF5FC0A, "channelAdminLogEventActionDefaultBannedRights"], + [0x8F079643, "channelAdminLogEventActionStopPoll"], + [0x050C7AC8, "channelAdminLogEventActionChangeLinkedChat"], + [0x0E6B76AE, "channelAdminLogEventActionChangeLocation"], + [0x53909779, "channelAdminLogEventActionToggleSlowMode"], + [0x23209745, "channelAdminLogEventActionStartGroupCall"], + [0xDB9F9140, "channelAdminLogEventActionDiscardGroupCall"], + [0xF92424D2, "channelAdminLogEventActionParticipantMute"], + [0xE64429C0, "channelAdminLogEventActionParticipantUnmute"], + [0x56D6A247, "channelAdminLogEventActionToggleGroupCallSetting"], + [0xFE9FC158, "channelAdminLogEventActionParticipantJoinByInvite"], + [0x5A50FCA4, "channelAdminLogEventActionExportedInviteDelete"], + [0x410A134E, "channelAdminLogEventActionExportedInviteRevoke"], + [0xE90EBB59, "channelAdminLogEventActionExportedInviteEdit"], + [0x3E7F6847, "channelAdminLogEventActionParticipantVolume"], + [0x6E941A38, "channelAdminLogEventActionChangeHistoryTTL"], + [0xAFB6144A, "channelAdminLogEventActionParticipantJoinByRequest"], + [0xCB2AC766, "channelAdminLogEventActionToggleNoForwards"], + [0x278F2868, "channelAdminLogEventActionSendMessage"], + [0xBE4E0EF8, "channelAdminLogEventActionChangeAvailableReactions"], + [0xF04FB3A9, "channelAdminLogEventActionChangeUsernames"], + [0x02CC6383, "channelAdminLogEventActionToggleForum"], + [0x58707D28, "channelAdminLogEventActionCreateTopic"], + [0xF06FE208, "channelAdminLogEventActionEditTopic"], + [0xAE168909, "channelAdminLogEventActionDeleteTopic"], + [0x5D8D353B, "channelAdminLogEventActionPinTopic"], + [0x64F36DFC, "channelAdminLogEventActionToggleAntiSpam"], + [0x5796E780, "channelAdminLogEventActionChangePeerColor"], + [0x5E477B25, "channelAdminLogEventActionChangeProfilePeerColor"], + [0x31BB5D52, "channelAdminLogEventActionChangeWallpaper"], + [0x3EA9FEB1, "channelAdminLogEventActionChangeEmojiStatus"], + [0x46D840AB, "channelAdminLogEventActionChangeEmojiStickerSet"], + [0x1FAD68CD, "channelAdminLogEvent"], + [0xED8AF74D, "channels.adminLogResults"], + [0xEA107AE4, "channelAdminLogEventsFilter"], + [0x5CE14175, "popularContact"], + [0x9E8FA6D3, "messages.favedStickersNotModified"], + [0x2CB51097, "messages.favedStickers"], + [0x46E1D13D, "recentMeUrlUnknown"], + [0xB92C09E2, "recentMeUrlUser"], + [0xB2DA71D2, "recentMeUrlChat"], + [0xEB49081D, "recentMeUrlChatInvite"], + [0xBC0A57DC, "recentMeUrlStickerSet"], + [0x0E0310D7, "help.recentMeUrls"], + [0x1CC6E91F, "inputSingleMedia"], + [0xA6F8F452, "webAuthorization"], + [0xED56C9FC, "account.webAuthorizations"], + [0xA676A322, "inputMessageID"], + [0xBAD88395, "inputMessageReplyTo"], + [0x86872538, "inputMessagePinned"], + [0xACFA1A7E, "inputMessageCallbackQuery"], + [0xFCAAFEB7, "inputDialogPeer"], + [0x64600527, "inputDialogPeerFolder"], + [0xE56DBF05, "dialogPeer"], + [0x514519E2, "dialogPeerFolder"], + [0x0D54B65D, "messages.foundStickerSetsNotModified"], + [0x8AF09DD2, "messages.foundStickerSets"], + [0xF39B035C, "fileHash"], + [0x75588B3F, "inputClientProxy"], + [0xE3309F7F, "help.termsOfServiceUpdateEmpty"], + [0x28ECF961, "help.termsOfServiceUpdate"], + [0x3334B0F0, "inputSecureFileUploaded"], + [0x5367E5BE, "inputSecureFile"], + [0x64199744, "secureFileEmpty"], + [0x7D09C27E, "secureFile"], + [0x8AEABEC3, "secureData"], + [0x7D6099DD, "securePlainPhone"], + [0x21EC5A5F, "securePlainEmail"], + [0x9D2A81E3, "secureValueTypePersonalDetails"], + [0x3DAC6A00, "secureValueTypePassport"], + [0x06E425C4, "secureValueTypeDriverLicense"], + [0xA0D0744B, "secureValueTypeIdentityCard"], + [0x99A48F23, "secureValueTypeInternalPassport"], + [0xCBE31E26, "secureValueTypeAddress"], + [0xFC36954E, "secureValueTypeUtilityBill"], + [0x89137C0D, "secureValueTypeBankStatement"], + [0x8B883488, "secureValueTypeRentalAgreement"], + [0x99E3806A, "secureValueTypePassportRegistration"], + [0xEA02EC33, "secureValueTypeTemporaryRegistration"], + [0xB320AADB, "secureValueTypePhone"], + [0x8E3CA7EE, "secureValueTypeEmail"], + [0x187FA0CA, "secureValue"], + [0xDB21D0A7, "inputSecureValue"], + [0xED1ECDB0, "secureValueHash"], + [0xE8A40BD9, "secureValueErrorData"], + [0x00BE3DFA, "secureValueErrorFrontSide"], + [0x868A2AA5, "secureValueErrorReverseSide"], + [0xE537CED6, "secureValueErrorSelfie"], + [0x7A700873, "secureValueErrorFile"], + [0x666220E9, "secureValueErrorFiles"], + [0x869D758F, "secureValueError"], + [0xA1144770, "secureValueErrorTranslationFile"], + [0x34636DD8, "secureValueErrorTranslationFiles"], + [0x33F0EA47, "secureCredentialsEncrypted"], + [0xAD2E1CD8, "account.authorizationForm"], + [0x811F854F, "account.sentEmailCode"], + [0x66AFA166, "help.deepLinkInfoEmpty"], + [0x6A4EE832, "help.deepLinkInfo"], + [0x1142BD56, "savedPhoneContact"], + [0x4DBA4501, "account.takeout"], + [0xD45AB096, "passwordKdfAlgoUnknown"], + [0x3A912D4A, "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow"], + [0x004A8537, "securePasswordKdfAlgoUnknown"], + [0xBBF2DDA0, "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000"], + [0x86471D92, "securePasswordKdfAlgoSHA512"], + [0x1527BCAC, "secureSecretSettings"], + [0x9880F658, "inputCheckPasswordEmpty"], + [0xD27FF082, "inputCheckPasswordSRP"], + [0x829D99DA, "secureRequiredType"], + [0x027477B4, "secureRequiredTypeOneOf"], + [0xBFB9F457, "help.passportConfigNotModified"], + [0xA098D6AF, "help.passportConfig"], + [0x1D1B1245, "inputAppEvent"], + [0xC0DE1BD9, "jsonObjectValue"], + [0x3F6D7B68, "jsonNull"], + [0xC7345E6A, "jsonBool"], + [0x2BE0DFA4, "jsonNumber"], + [0xB71E767A, "jsonString"], + [0xF7444763, "jsonArray"], + [0x99C1D49D, "jsonObject"], + [0x34566B6A, "pageTableCell"], + [0xE0C0C5E5, "pageTableRow"], + [0x6F747657, "pageCaption"], + [0xB92FB6CD, "pageListItemText"], + [0x25E073FC, "pageListItemBlocks"], + [0x5E068047, "pageListOrderedItemText"], + [0x98DD8936, "pageListOrderedItemBlocks"], + [0xB390DC08, "pageRelatedArticle"], + [0x98657F0D, "page"], + [0x8C05F1C9, "help.supportName"], + [0xF3AE2EED, "help.userInfoEmpty"], + [0x01EB3758, "help.userInfo"], + [0x6CA9C2E9, "pollAnswer"], + [0x86E18161, "poll"], + [0x3B6DDAD2, "pollAnswerVoters"], + [0x7ADF2420, "pollResults"], + [0xF041E250, "chatOnlines"], + [0x47A971E0, "statsURL"], + [0x5FB224D5, "chatAdminRights"], + [0x9F120418, "chatBannedRights"], + [0xE630B979, "inputWallPaper"], + [0x72091C80, "inputWallPaperSlug"], + [0x967A462E, "inputWallPaperNoFile"], + [0x1C199183, "account.wallPapersNotModified"], + [0xCDC3858C, "account.wallPapers"], + [0xAD253D78, "codeSettings"], + [0x372EFCD0, "wallPaperSettings"], + [0xBAA57628, "autoDownloadSettings"], + [0x63CACF26, "account.autoDownloadSettings"], + [0xD5B3B9F9, "emojiKeyword"], + [0x236DF622, "emojiKeywordDeleted"], + [0x5CC761BD, "emojiKeywordsDifference"], + [0xA575739D, "emojiURL"], + [0xB3FB5361, "emojiLanguage"], + [0xFF544E65, "folder"], + [0xFBD2C296, "inputFolderPeer"], + [0xE9BAA668, "folderPeer"], + [0xE844EBFF, "messages.searchCounter"], + [0x92D33A0E, "urlAuthResultRequest"], + [0x8F8C0E4E, "urlAuthResultAccepted"], + [0xA9D6DB1F, "urlAuthResultDefault"], + [0xBFB5AD8B, "channelLocationEmpty"], + [0x209B82DB, "channelLocation"], + [0xCA461B5D, "peerLocated"], + [0xF8EC284B, "peerSelfLocated"], + [0xD072ACB4, "restrictionReason"], + [0x3C5693E9, "inputTheme"], + [0xF5890DF1, "inputThemeSlug"], + [0xA00E67D6, "theme"], + [0xF41EB622, "account.themesNotModified"], + [0x9A3D8C6D, "account.themes"], + [0x629F1980, "auth.loginToken"], + [0x068E9916, "auth.loginTokenMigrateTo"], + [0x390D5C5E, "auth.loginTokenSuccess"], + [0x57E28221, "account.contentSettings"], + [0xA927FEC5, "messages.inactiveChats"], + [0xC3A12462, "baseThemeClassic"], + [0xFBD81688, "baseThemeDay"], + [0xB7B31EA8, "baseThemeNight"], + [0x6D5F77EE, "baseThemeTinted"], + [0x5B11125A, "baseThemeArctic"], + [0x8FDE504F, "inputThemeSettings"], + [0xFA58B6D4, "themeSettings"], + [0x54B56617, "webPageAttributeTheme"], + [0x2E94C3E7, "webPageAttributeStory"], + [0x4899484E, "messages.votesList"], + [0xF568028A, "bankCardOpenUrl"], + [0x3E24E573, "payments.bankCardData"], + [0x5FB5523B, "dialogFilter"], + [0x363293AE, "dialogFilterDefault"], + [0x9FE28EA4, "dialogFilterChatlist"], + [0x77744D4A, "dialogFilterSuggested"], + [0xB637EDAF, "statsDateRangeDays"], + [0xCB43ACDE, "statsAbsValueAndPrev"], + [0xCBCE2FE0, "statsPercentValue"], + [0x4A27EB2D, "statsGraphAsync"], + [0xBEDC9822, "statsGraphError"], + [0x8EA464B6, "statsGraph"], + [0x396CA5FC, "stats.broadcastStats"], + [0x98F6AC75, "help.promoDataEmpty"], + [0x8C39793F, "help.promoData"], + [0xDE33B094, "videoSize"], + [0xF85C413C, "videoSizeEmojiMarkup"], + [0x0DA082FE, "videoSizeStickerMarkup"], + [0x9D04AF9B, "statsGroupTopPoster"], + [0xD7584C87, "statsGroupTopAdmin"], + [0x535F779D, "statsGroupTopInviter"], + [0xEF7FF916, "stats.megagroupStats"], + [0x734C4CCB, "globalPrivacySettings"], + [0x4203C5EF, "help.countryCode"], + [0xC3878E23, "help.country"], + [0x93CC1F32, "help.countriesListNotModified"], + [0x87D0759E, "help.countriesList"], + [0x455B853D, "messageViews"], + [0xB6C4F543, "messages.messageViews"], + [0xA6341782, "messages.discussionMessage"], + [0xAFBC09DB, "messageReplyHeader"], + [0x0E5AF939, "messageReplyStoryHeader"], + [0x83D60FC2, "messageReplies"], + [0xE8FD8014, "peerBlocked"], + [0x7FE91C14, "stats.messageStats"], + [0x7780BCB4, "groupCallDiscarded"], + [0xD597650C, "groupCall"], + [0xD8AA840F, "inputGroupCall"], + [0xEBA636FE, "groupCallParticipant"], + [0x9E727AAD, "phone.groupCall"], + [0xF47751B6, "phone.groupParticipants"], + [0x3081ED9D, "inlineQueryPeerTypeSameBotPM"], + [0x833C0FAC, "inlineQueryPeerTypePM"], + [0xD766C50A, "inlineQueryPeerTypeChat"], + [0x5EC4BE43, "inlineQueryPeerTypeMegagroup"], + [0x6334EE9A, "inlineQueryPeerTypeBroadcast"], + [0x0E3B2D0C, "inlineQueryPeerTypeBotPM"], + [0x1662AF0B, "messages.historyImport"], + [0x5E0FB7B9, "messages.historyImportParsed"], + [0xEF8D3E6C, "messages.affectedFoundMessages"], + [0x8C5ADFD9, "chatInviteImporter"], + [0xBDC62DCC, "messages.exportedChatInvites"], + [0x1871BE50, "messages.exportedChatInvite"], + [0x222600EF, "messages.exportedChatInviteReplaced"], + [0x81B6B00A, "messages.chatInviteImporters"], + [0xF2ECEF23, "chatAdminWithInvites"], + [0xB69B72D7, "messages.chatAdminsWithInvites"], + [0xA24DE717, "messages.checkedHistoryImportPeer"], + [0xAFE5623F, "phone.joinAsPeers"], + [0x204BD158, "phone.exportedGroupCallInvite"], + [0xDCB118B7, "groupCallParticipantVideoSourceGroup"], + [0x67753AC8, "groupCallParticipantVideo"], + [0x85FEA03F, "stickers.suggestedShortName"], + [0x2F6CB2AB, "botCommandScopeDefault"], + [0x3C4F04D8, "botCommandScopeUsers"], + [0x6FE1A881, "botCommandScopeChats"], + [0xB9AA606A, "botCommandScopeChatAdmins"], + [0xDB9D897D, "botCommandScopePeer"], + [0x3FD863D1, "botCommandScopePeerAdmins"], + [0x0A1321F3, "botCommandScopePeerUser"], + [0xE3779861, "account.resetPasswordFailedWait"], + [0xE9EFFC7D, "account.resetPasswordRequestedWait"], + [0xE926D63E, "account.resetPasswordOk"], + [0xED5383F7, "sponsoredMessage"], + [0xC9EE1D87, "messages.sponsoredMessages"], + [0x1839490F, "messages.sponsoredMessagesEmpty"], + [0xC9B0539F, "searchResultsCalendarPeriod"], + [0x147EE23C, "messages.searchResultsCalendar"], + [0x7F648B67, "searchResultPosition"], + [0x53B22BAF, "messages.searchResultsPositions"], + [0xF496B0C6, "channels.sendAsPeers"], + [0x3B6D152E, "users.userFull"], + [0x6880B94D, "messages.peerSettings"], + [0xC3A2835F, "auth.loggedOut"], + [0xA3D1CB80, "reactionCount"], + [0x4F2B9479, "messageReactions"], + [0x31BD492D, "messages.messageReactionsList"], + [0xC077EC01, "availableReaction"], + [0x9F071957, "messages.availableReactionsNotModified"], + [0x768E3AAD, "messages.availableReactions"], + [0x8C79B63C, "messagePeerReaction"], + [0x80EB48AF, "groupCallStreamChannel"], + [0xD0E482B2, "phone.groupCallStreamChannels"], + [0x2DBF3432, "phone.groupCallStreamRtmpUrl"], + [0x4576F3F0, "attachMenuBotIconColor"], + [0xB2A7386B, "attachMenuBotIcon"], + [0xD90D8DFE, "attachMenuBot"], + [0xF1D88A5C, "attachMenuBotsNotModified"], + [0x3C4301C0, "attachMenuBots"], + [0x93BF667F, "attachMenuBotsBot"], + [0x0C14557C, "webViewResultUrl"], + [0x882F76BB, "simpleWebViewResultUrl"], + [0x0C94511C, "webViewMessageSent"], + [0x7533A588, "botMenuButtonDefault"], + [0x4258C205, "botMenuButtonCommands"], + [0xC7B57CE6, "botMenuButton"], + [0xFBF6E8B1, "account.savedRingtonesNotModified"], + [0xC1E92CC5, "account.savedRingtones"], + [0x97E8BEBE, "notificationSoundDefault"], + [0x6F0C34DF, "notificationSoundNone"], + [0x830B9AE4, "notificationSoundLocal"], + [0xFF6C8049, "notificationSoundRingtone"], + [0xB7263F6D, "account.savedRingtone"], + [0x1F307EB7, "account.savedRingtoneConverted"], + [0x7D6BE90E, "attachMenuPeerTypeSameBotPM"], + [0xC32BFA1A, "attachMenuPeerTypeBotPM"], + [0xF146D31F, "attachMenuPeerTypePM"], + [0x0509113F, "attachMenuPeerTypeChat"], + [0x7BFBDEFC, "attachMenuPeerTypeBroadcast"], + [0xC5B56859, "inputInvoiceMessage"], + [0xC326CAEF, "inputInvoiceSlug"], + [0x98986C0D, "inputInvoicePremiumGiftCode"], + [0xAED0CBD9, "payments.exportedInvoice"], + [0xCFB9D957, "messages.transcribedAudio"], + [0x5334759C, "help.premiumPromo"], + [0xA6751E66, "inputStorePaymentPremiumSubscription"], + [0x616F7FE8, "inputStorePaymentGiftPremium"], + [0xA3805F3F, "inputStorePaymentPremiumGiftCode"], + [0x160544CA, "inputStorePaymentPremiumGiveaway"], + [0x74C34319, "premiumGiftOption"], + [0x88F8F21B, "paymentFormMethod"], + [0x2DE11AAE, "emojiStatusEmpty"], + [0x929B619D, "emojiStatus"], + [0xFA30A8C7, "emojiStatusUntil"], + [0xD08CE645, "account.emojiStatusesNotModified"], + [0x90C467D1, "account.emojiStatuses"], + [0x79F5D419, "reactionEmpty"], + [0x1B2286B8, "reactionEmoji"], + [0x8935FC73, "reactionCustomEmoji"], + [0xEAFC32BC, "chatReactionsNone"], + [0x52928BCA, "chatReactionsAll"], + [0x661D4037, "chatReactionsSome"], + [0xB06FDBDF, "messages.reactionsNotModified"], + [0xEAFDF716, "messages.reactions"], + [0x4345BE73, "emailVerifyPurposeLoginSetup"], + [0x527D22EB, "emailVerifyPurposeLoginChange"], + [0xBBF51685, "emailVerifyPurposePassport"], + [0x922E55A9, "emailVerificationCode"], + [0xDB909EC2, "emailVerificationGoogle"], + [0x96D074FD, "emailVerificationApple"], + [0x2B96CD1B, "account.emailVerified"], + [0xE1BB0D61, "account.emailVerifiedLogin"], + [0x5F2D1DF2, "premiumSubscriptionOption"], + [0xB81C7034, "sendAsPeer"], + [0xAD628CC8, "messageExtendedMediaPreview"], + [0xEE479C64, "messageExtendedMedia"], + [0xFCFEB29C, "stickerKeyword"], + [0xB4073647, "username"], + [0x023F109B, "forumTopicDeleted"], + [0x71701DA9, "forumTopic"], + [0x367617D3, "messages.forumTopics"], + [0x43B46B20, "defaultHistoryTTL"], + [0x41BF109B, "exportedContactToken"], + [0x5F3B8A00, "requestPeerTypeUser"], + [0xC9F06E1B, "requestPeerTypeChat"], + [0x339BEF6C, "requestPeerTypeBroadcast"], + [0x481EADFA, "emojiListNotModified"], + [0x7A1E11D1, "emojiList"], + [0x7A9ABDA9, "emojiGroup"], + [0x6FB4AD87, "messages.emojiGroupsNotModified"], + [0x881FB94B, "messages.emojiGroups"], + [0x751F3146, "textWithEntities"], + [0x33DB32F8, "messages.translateResult"], + [0xC84834CE, "autoSaveSettings"], + [0x81602D47, "autoSaveException"], + [0x4C3E069D, "account.autoSaveSettings"], + [0x7CDE641D, "help.appConfigNotModified"], + [0xDD18782E, "help.appConfig"], + [0xA920BD7A, "inputBotAppID"], + [0x908C0407, "inputBotAppShortName"], + [0x5DA674B7, "botAppNotModified"], + [0x95FCD1D6, "botApp"], + [0xEB50ADF5, "messages.botApp"], + [0x3C1B4F0D, "appWebViewResultUrl"], + [0xB57295D5, "inlineBotWebView"], + [0x4A4FF172, "readParticipantDate"], + [0xF3E0DA33, "inputChatlistDialogFilter"], + [0x0C5181AC, "exportedChatlistInvite"], + [0x10E6E3A6, "chatlists.exportedChatlistInvite"], + [0x10AB6DC7, "chatlists.exportedInvites"], + [0xFA87F659, "chatlists.chatlistInviteAlready"], + [0x1DCD839D, "chatlists.chatlistInvite"], + [0x93BD878D, "chatlists.chatlistUpdates"], + [0xE8A775B0, "bots.botInfo"], + [0xB6CC2D5C, "messagePeerVote"], + [0x74CDA504, "messagePeerVoteInputOption"], + [0x4628F6E6, "messagePeerVoteMultiple"], + [0x3DB8EC63, "sponsoredWebPage"], + [0x8D595CD6, "storyViews"], + [0x51E6EE4F, "storyItemDeleted"], + [0xFFADC913, "storyItemSkipped"], + [0x79B26A24, "storyItem"], + [0x1158FE3E, "stories.allStoriesNotModified"], + [0x6EFC5E81, "stories.allStories"], + [0x5DD8C3C8, "stories.stories"], + [0xB0BDEAC5, "storyView"], + [0x9083670B, "storyViewPublicForward"], + [0xBD74CF49, "storyViewPublicRepost"], + [0x59D78FC5, "stories.storyViewsList"], + [0xDE9EED1D, "stories.storyViews"], + [0x22C0F6D5, "inputReplyToMessage"], + [0x5881323A, "inputReplyToStory"], + [0x3FC9053B, "exportedStoryLink"], + [0x712E27FD, "storiesStealthMode"], + [0x03D1EA4E, "mediaAreaCoordinates"], + [0xBE82DB9C, "mediaAreaVenue"], + [0xB282217F, "inputMediaAreaVenue"], + [0xDF8B3B22, "mediaAreaGeoPoint"], + [0x14455871, "mediaAreaSuggestedReaction"], + [0x770416AF, "mediaAreaChannelPost"], + [0x2271F2BF, "inputMediaAreaChannelPost"], + [0x9A35E999, "peerStories"], + [0xCAE68768, "stories.peerStories"], + [0xFD5E12BD, "messages.webPage"], + [0x257E962B, "premiumGiftCodeOption"], + [0x284A1096, "payments.checkedGiftCode"], + [0x4367DAA0, "payments.giveawayInfo"], + [0x00CD5570, "payments.giveawayInfoResults"], + [0xB2539D54, "prepaidGiveaway"], + [0x2A1C8C71, "boost"], + [0x86F8613C, "premium.boostsList"], + [0xC448415C, "myBoost"], + [0x9AE228E2, "premium.myBoosts"], + [0x4959427A, "premium.boostsStatus"], + [0xB826E150, "storyFwdHeader"], + [0xE7058E7F, "postInteractionCountersMessage"], + [0x8A480E27, "postInteractionCountersStory"], + [0x50CD067C, "stats.storyStats"], + [0x01F2BF4A, "publicForwardMessage"], + [0xEDF3ADD0, "publicForwardStory"], + [0x93037E20, "stats.publicForwards"], + [0xB54B5ACF, "peerColor"], + [0x26219A58, "help.peerColorSet"], + [0x767D61EB, "help.peerColorProfileSet"], + [0xADEC6EBE, "help.peerColorOption"], + [0x2BA1F5CE, "help.peerColorsNotModified"], + [0x00F8ED08, "help.peerColors"], + [0x6090D6D5, "storyReaction"], + [0xBBAB2643, "storyReactionPublicForward"], + [0xCFCD0F13, "storyReactionPublicRepost"], + [0xAA5F789C, "stories.storyReactionsList"], + [0xBD87CB6C, "savedDialog"], + [0xF83AE221, "messages.savedDialogs"], + [0x44BA9DD9, "messages.savedDialogsSlice"], + [0xC01F6FE8, "messages.savedDialogsNotModified"], + [0xCB6FF828, "savedReactionTag"], + [0x889B59EF, "messages.savedReactionTagsNotModified"], + [0x3259950A, "messages.savedReactionTags"], + [0x3BB842AC, "outboxReadDate"], + [0xDC8B44CF, "smsjobs.eligibleToJoin"], + [0x2AEE9191, "smsjobs.status"], + [0xE6A1EEB8, "smsJob"], + [0x120B1AB9, "businessWeeklyOpen"], + [0x8C92B098, "businessWorkHours"], + [0xAC5C1AF7, "businessLocation"], + [0x6F8B32AA, "inputBusinessRecipients"], + [0x21108FF7, "businessRecipients"], + [0xC9B9E2B9, "businessAwayMessageScheduleAlways"], + [0xC3F2F501, "businessAwayMessageScheduleOutsideWorkHours"], + [0xCC4D9ECC, "businessAwayMessageScheduleCustom"], + [0x0194CB3B, "inputBusinessGreetingMessage"], + [0xE519ABAB, "businessGreetingMessage"], + [0x832175E0, "inputBusinessAwayMessage"], + [0xEF156A5C, "businessAwayMessage"], + [0xFF9289F5, "timezone"], + [0x970708CC, "help.timezonesListNotModified"], + [0x7B74ED71, "help.timezonesList"], + [0x0697102B, "quickReply"], + [0x24596D41, "inputQuickReplyShortcut"], + [0x01190CF1, "inputQuickReplyShortcutId"], + [0xC68D6695, "messages.quickReplies"], + [0x5F91EB5B, "messages.quickRepliesNotModified"], + [0xBD068601, "connectedBot"], + [0x17D7F87B, "account.connectedBots"], + [0x2AD93719, "messages.dialogFilters"], + [0x6C8E1E06, "birthday"], + [0x896433B4, "botBusinessConnection"], + [0x09C469CD, "inputBusinessIntro"], + [0x5A0A066D, "businessIntro"], + [0xFAFF629D, "messages.myStickers"], + [0xE39460A9, "inputCollectibleUsername"], + [0xA2E214A4, "inputCollectiblePhone"], + [0x6EBDFF91, "fragment.collectibleInfo"], + [0xC4E5921E, "inputBusinessBotRecipients"], + [0xB88CF373, "businessBotRecipients"], + [0x1D998733, "contactBirthday"], + [0x114FF30D, "contacts.contactBirthdays"], + [0x628C9224, "missingInvitee"], + [0x7F5DEFA6, "messages.invitedUsers"], + [0x11679FA7, "inputBusinessChatLink"], + [0xB4AE666F, "businessChatLink"], + [0xEC43A2D1, "account.businessChatLinks"], + [0x9A23AF21, "account.resolvedBusinessChatLinks"], + [0xD62FF46A, "requestedPeerUser"], + [0x7307544F, "requestedPeerChat"], + [0x8BA403E4, "requestedPeerChannel"], + [0x430D3150, "sponsoredMessageReportOption"], + [0x846F9E42, "channels.sponsoredMessageReportResultChooseOption"], + [0x3E3BCF2F, "channels.sponsoredMessageReportResultAdsHidden"], + [0xAD798849, "channels.sponsoredMessageReportResultReported"], + [0xD07B4BAD, "stats.broadcastRevenueStats"], + [0xEC659737, "stats.broadcastRevenueWithdrawalUrl"], + [0x557E2CC4, "broadcastRevenueTransactionProceeds"], + [0x5A590978, "broadcastRevenueTransactionWithdrawal"], + [0x42D30D2E, "broadcastRevenueTransactionRefund"], + [0x87158466, "stats.broadcastRevenueTransactions"], +]); + +export const getTypeName: (id: number) => string | undefined = map.get.bind(map); + +export const flags: symbol = Symbol(); + +export type Parameters = [number, [string, unknown, string][]]; + +const enums: Map = new Map([ + ["ResPQ", ["resPQ"]], + ["P_Q_inner_data", ["p_q_inner_data_dc", "p_q_inner_data_temp_dc"]], + ["Server_DH_Params", ["server_DH_params_ok"]], + ["Server_DH_inner_data", ["server_DH_inner_data"]], + ["Client_DH_Inner_Data", ["client_DH_inner_data"]], + ["Set_client_DH_params_answer", ["dh_gen_ok", "dh_gen_retry", "dh_gen_fail"]], + ["BindAuthKeyInner", ["bind_auth_key_inner"]], + ["RpcError", ["rpc_error"]], + ["RpcDropAnswer", ["rpc_answer_unknown", "rpc_answer_dropped_running", "rpc_answer_dropped"]], + ["FutureSalt", ["future_salt"]], + ["FutureSalts", ["future_salts"]], + ["Pong", ["pong"]], + ["DestroySessionRes", ["destroy_session_ok", "destroy_session_none"]], + ["NewSession", ["new_session_created"]], + ["Object", ["gzip_packed"]], + ["MsgsAck", ["msgs_ack"]], + ["BadMsgNotification", ["bad_msg_notification", "bad_server_salt"]], + ["MsgResendReq", ["msg_resend_req"]], + ["MsgsStateReq", ["msgs_state_req"]], + ["MsgsStateInfo", ["msgs_state_info"]], + ["MsgsAllInfo", ["msgs_all_info"]], + ["MsgDetailedInfo", ["msg_detailed_info", "msg_new_detailed_info"]], + ["DestroyAuthKeyRes", ["destroy_auth_key_ok", "destroy_auth_key_none", "destroy_auth_key_fail"]], + ["HttpWait", ["http_wait"]], + ["True", ["true"]], + ["Error", ["error"]], + ["IpPort", ["ipPort", "ipPortSecret"]], + ["AccessPointRule", ["accessPointRule"]], + ["help.ConfigSimple", ["help.configSimple"]], + ["InputFileLocation", ["inputPeerPhotoFileLocationLegacy", "inputStickerSetThumbLegacy", "inputFileLocation", "inputEncryptedFileLocation", "inputDocumentFileLocation", "inputSecureFileLocation", "inputTakeoutFileLocation", "inputPhotoFileLocation", "inputPhotoLegacyFileLocation", "inputPeerPhotoFileLocation", "inputStickerSetThumb", "inputGroupCallStream"]], + ["InputPeer", ["inputPeerEmpty", "inputPeerSelf", "inputPeerChat", "inputPeerUser", "inputPeerChannel", "inputPeerUserFromMessage", "inputPeerChannelFromMessage"]], + ["InputUser", ["inputUserEmpty", "inputUserSelf", "inputUser", "inputUserFromMessage"]], + ["InputContact", ["inputPhoneContact"]], + ["InputFile", ["inputFile", "inputFileBig"]], + ["InputMedia", ["inputMediaEmpty", "inputMediaUploadedPhoto", "inputMediaPhoto", "inputMediaGeoPoint", "inputMediaContact", "inputMediaUploadedDocument", "inputMediaDocument", "inputMediaVenue", "inputMediaPhotoExternal", "inputMediaDocumentExternal", "inputMediaGame", "inputMediaInvoice", "inputMediaGeoLive", "inputMediaPoll", "inputMediaDice", "inputMediaStory", "inputMediaWebPage"]], + ["InputChatPhoto", ["inputChatPhotoEmpty", "inputChatUploadedPhoto", "inputChatPhoto"]], + ["InputGeoPoint", ["inputGeoPointEmpty", "inputGeoPoint"]], + ["InputPhoto", ["inputPhotoEmpty", "inputPhoto"]], + ["Peer", ["peerUser", "peerChat", "peerChannel"]], + ["storage.FileType", ["storage.fileUnknown", "storage.filePartial", "storage.fileJpeg", "storage.fileGif", "storage.filePng", "storage.filePdf", "storage.fileMp3", "storage.fileMov", "storage.fileMp4", "storage.fileWebp"]], + ["User", ["userEmpty", "user"]], + ["UserProfilePhoto", ["userProfilePhotoEmpty", "userProfilePhoto"]], + ["UserStatus", ["userStatusEmpty", "userStatusOnline", "userStatusOffline", "userStatusRecently", "userStatusLastWeek", "userStatusLastMonth"]], + ["Chat", ["chatEmpty", "chat", "chatForbidden", "channel", "channelForbidden"]], + ["ChatFull", ["chatFull", "channelFull"]], + ["ChatParticipant", ["chatParticipant", "chatParticipantCreator", "chatParticipantAdmin"]], + ["ChatParticipants", ["chatParticipantsForbidden", "chatParticipants"]], + ["ChatPhoto", ["chatPhotoEmpty", "chatPhoto"]], + ["Message", ["messageEmpty", "message", "messageService"]], + ["MessageMedia", ["messageMediaEmpty", "messageMediaPhoto", "messageMediaGeo", "messageMediaContact", "messageMediaUnsupported", "messageMediaDocument", "messageMediaWebPage", "messageMediaVenue", "messageMediaGame", "messageMediaInvoice", "messageMediaGeoLive", "messageMediaPoll", "messageMediaDice", "messageMediaStory", "messageMediaGiveaway", "messageMediaGiveawayResults"]], + ["MessageAction", [ + "messageActionEmpty", + "messageActionChatCreate", + "messageActionChatEditTitle", + "messageActionChatEditPhoto", + "messageActionChatDeletePhoto", + "messageActionChatAddUser", + "messageActionChatDeleteUser", + "messageActionChatJoinedByLink", + "messageActionChannelCreate", + "messageActionChatMigrateTo", + "messageActionChannelMigrateFrom", + "messageActionPinMessage", + "messageActionHistoryClear", + "messageActionGameScore", + "messageActionPaymentSentMe", + "messageActionPaymentSent", + "messageActionPhoneCall", + "messageActionScreenshotTaken", + "messageActionCustomAction", + "messageActionBotAllowed", + "messageActionSecureValuesSentMe", + "messageActionSecureValuesSent", + "messageActionContactSignUp", + "messageActionGeoProximityReached", + "messageActionGroupCall", + "messageActionInviteToGroupCall", + "messageActionSetMessagesTTL", + "messageActionGroupCallScheduled", + "messageActionSetChatTheme", + "messageActionChatJoinedByRequest", + "messageActionWebViewDataSentMe", + "messageActionWebViewDataSent", + "messageActionGiftPremium", + "messageActionTopicCreate", + "messageActionTopicEdit", + "messageActionSuggestProfilePhoto", + "messageActionRequestedPeer", + "messageActionSetChatWallPaper", + "messageActionGiftCode", + "messageActionGiveawayLaunch", + "messageActionGiveawayResults", + "messageActionBoostApply", + "messageActionRequestedPeerSentMe", + ]], + ["Dialog", ["dialog", "dialogFolder"]], + ["Photo", ["photoEmpty", "photo"]], + ["PhotoSize", ["photoSizeEmpty", "photoSize", "photoCachedSize", "photoStrippedSize", "photoSizeProgressive", "photoPathSize"]], + ["GeoPoint", ["geoPointEmpty", "geoPoint"]], + ["auth.SentCode", ["auth.sentCode", "auth.sentCodeSuccess"]], + ["auth.Authorization", ["auth.authorization", "auth.authorizationSignUpRequired"]], + ["auth.ExportedAuthorization", ["auth.exportedAuthorization"]], + ["InputNotifyPeer", ["inputNotifyPeer", "inputNotifyUsers", "inputNotifyChats", "inputNotifyBroadcasts", "inputNotifyForumTopic"]], + ["InputPeerNotifySettings", ["inputPeerNotifySettings"]], + ["PeerNotifySettings", ["peerNotifySettings"]], + ["PeerSettings", ["peerSettings"]], + ["WallPaper", ["wallPaper", "wallPaperNoFile"]], + ["ReportReason", ["inputReportReasonSpam", "inputReportReasonViolence", "inputReportReasonPornography", "inputReportReasonChildAbuse", "inputReportReasonOther", "inputReportReasonCopyright", "inputReportReasonGeoIrrelevant", "inputReportReasonFake", "inputReportReasonIllegalDrugs", "inputReportReasonPersonalDetails"]], + ["UserFull", ["userFull"]], + ["Contact", ["contact"]], + ["ImportedContact", ["importedContact"]], + ["ContactStatus", ["contactStatus"]], + ["contacts.Contacts", ["contacts.contactsNotModified", "contacts.contacts"]], + ["contacts.ImportedContacts", ["contacts.importedContacts"]], + ["contacts.Blocked", ["contacts.blocked", "contacts.blockedSlice"]], + ["messages.Dialogs", ["messages.dialogs", "messages.dialogsSlice", "messages.dialogsNotModified"]], + ["messages.Messages", ["messages.messages", "messages.messagesSlice", "messages.channelMessages", "messages.messagesNotModified"]], + ["messages.Chats", ["messages.chats", "messages.chatsSlice"]], + ["messages.ChatFull", ["messages.chatFull"]], + ["messages.AffectedHistory", ["messages.affectedHistory"]], + ["MessagesFilter", ["inputMessagesFilterEmpty", "inputMessagesFilterPhotos", "inputMessagesFilterVideo", "inputMessagesFilterPhotoVideo", "inputMessagesFilterDocument", "inputMessagesFilterUrl", "inputMessagesFilterGif", "inputMessagesFilterVoice", "inputMessagesFilterMusic", "inputMessagesFilterChatPhotos", "inputMessagesFilterPhoneCalls", "inputMessagesFilterRoundVoice", "inputMessagesFilterRoundVideo", "inputMessagesFilterMyMentions", "inputMessagesFilterGeo", "inputMessagesFilterContacts", "inputMessagesFilterPinned"]], + ["Update", [ + "updateNewMessage", + "updateMessageID", + "updateDeleteMessages", + "updateUserTyping", + "updateChatUserTyping", + "updateChatParticipants", + "updateUserStatus", + "updateUserName", + "updateNewAuthorization", + "updateNewEncryptedMessage", + "updateEncryptedChatTyping", + "updateEncryption", + "updateEncryptedMessagesRead", + "updateChatParticipantAdd", + "updateChatParticipantDelete", + "updateDcOptions", + "updateNotifySettings", + "updateServiceNotification", + "updatePrivacy", + "updateUserPhone", + "updateReadHistoryInbox", + "updateReadHistoryOutbox", + "updateWebPage", + "updateReadMessagesContents", + "updateChannelTooLong", + "updateChannel", + "updateNewChannelMessage", + "updateReadChannelInbox", + "updateDeleteChannelMessages", + "updateChannelMessageViews", + "updateChatParticipantAdmin", + "updateNewStickerSet", + "updateStickerSetsOrder", + "updateStickerSets", + "updateSavedGifs", + "updateBotInlineQuery", + "updateBotInlineSend", + "updateEditChannelMessage", + "updateBotCallbackQuery", + "updateEditMessage", + "updateInlineBotCallbackQuery", + "updateReadChannelOutbox", + "updateDraftMessage", + "updateReadFeaturedStickers", + "updateRecentStickers", + "updateConfig", + "updatePtsChanged", + "updateChannelWebPage", + "updateDialogPinned", + "updatePinnedDialogs", + "updateBotWebhookJSON", + "updateBotWebhookJSONQuery", + "updateBotShippingQuery", + "updateBotPrecheckoutQuery", + "updatePhoneCall", + "updateLangPackTooLong", + "updateLangPack", + "updateFavedStickers", + "updateChannelReadMessagesContents", + "updateContactsReset", + "updateChannelAvailableMessages", + "updateDialogUnreadMark", + "updateMessagePoll", + "updateChatDefaultBannedRights", + "updateFolderPeers", + "updatePeerSettings", + "updatePeerLocated", + "updateNewScheduledMessage", + "updateDeleteScheduledMessages", + "updateTheme", + "updateGeoLiveViewed", + "updateLoginToken", + "updateMessagePollVote", + "updateDialogFilter", + "updateDialogFilterOrder", + "updateDialogFilters", + "updatePhoneCallSignalingData", + "updateChannelMessageForwards", + "updateReadChannelDiscussionInbox", + "updateReadChannelDiscussionOutbox", + "updatePeerBlocked", + "updateChannelUserTyping", + "updatePinnedMessages", + "updatePinnedChannelMessages", + "updateChat", + "updateGroupCallParticipants", + "updateGroupCall", + "updatePeerHistoryTTL", + "updateChatParticipant", + "updateChannelParticipant", + "updateBotStopped", + "updateGroupCallConnection", + "updateBotCommands", + "updatePendingJoinRequests", + "updateBotChatInviteRequester", + "updateMessageReactions", + "updateAttachMenuBots", + "updateWebViewResultSent", + "updateBotMenuButton", + "updateSavedRingtones", + "updateTranscribedAudio", + "updateReadFeaturedEmojiStickers", + "updateUserEmojiStatus", + "updateRecentEmojiStatuses", + "updateRecentReactions", + "updateMoveStickerSetToTop", + "updateMessageExtendedMedia", + "updateChannelPinnedTopic", + "updateChannelPinnedTopics", + "updateUser", + "updateAutoSaveSettings", + "updateStory", + "updateReadStories", + "updateStoryID", + "updateStoriesStealthMode", + "updateSentStoryReaction", + "updateBotChatBoost", + "updateChannelViewForumAsMessages", + "updatePeerWallpaper", + "updateBotMessageReaction", + "updateBotMessageReactions", + "updateSavedDialogPinned", + "updatePinnedSavedDialogs", + "updateSavedReactionTags", + "updateSmsJob", + "updateQuickReplies", + "updateNewQuickReply", + "updateDeleteQuickReply", + "updateQuickReplyMessage", + "updateDeleteQuickReplyMessages", + "updateBotBusinessConnect", + "updateBotNewBusinessMessage", + "updateBotEditBusinessMessage", + "updateBotDeleteBusinessMessage", + ]], + ["updates.State", ["updates.state"]], + ["updates.Difference", ["updates.differenceEmpty", "updates.difference", "updates.differenceSlice", "updates.differenceTooLong"]], + ["Updates", ["updatesTooLong", "updateShortMessage", "updateShortChatMessage", "updateShort", "updatesCombined", "updates", "updateShortSentMessage"]], + ["photos.Photos", ["photos.photos", "photos.photosSlice"]], + ["photos.Photo", ["photos.photo"]], + ["upload.File", ["upload.file", "upload.fileCdnRedirect"]], + ["DcOption", ["dcOption"]], + ["Config", ["config"]], + ["NearestDc", ["nearestDc"]], + ["help.AppUpdate", ["help.appUpdate", "help.noAppUpdate"]], + ["help.InviteText", ["help.inviteText"]], + ["EncryptedChat", ["encryptedChatEmpty", "encryptedChatWaiting", "encryptedChatRequested", "encryptedChat", "encryptedChatDiscarded"]], + ["InputEncryptedChat", ["inputEncryptedChat"]], + ["EncryptedFile", ["encryptedFileEmpty", "encryptedFile"]], + ["InputEncryptedFile", ["inputEncryptedFileEmpty", "inputEncryptedFileUploaded", "inputEncryptedFile", "inputEncryptedFileBigUploaded"]], + ["EncryptedMessage", ["encryptedMessage", "encryptedMessageService"]], + ["messages.DhConfig", ["messages.dhConfigNotModified", "messages.dhConfig"]], + ["messages.SentEncryptedMessage", ["messages.sentEncryptedMessage", "messages.sentEncryptedFile"]], + ["InputDocument", ["inputDocumentEmpty", "inputDocument"]], + ["Document", ["documentEmpty", "document"]], + ["help.Support", ["help.support"]], + ["NotifyPeer", ["notifyPeer", "notifyUsers", "notifyChats", "notifyBroadcasts", "notifyForumTopic"]], + ["SendMessageAction", ["sendMessageTypingAction", "sendMessageCancelAction", "sendMessageRecordVideoAction", "sendMessageUploadVideoAction", "sendMessageRecordAudioAction", "sendMessageUploadAudioAction", "sendMessageUploadPhotoAction", "sendMessageUploadDocumentAction", "sendMessageGeoLocationAction", "sendMessageChooseContactAction", "sendMessageGamePlayAction", "sendMessageRecordRoundAction", "sendMessageUploadRoundAction", "speakingInGroupCallAction", "sendMessageHistoryImportAction", "sendMessageChooseStickerAction", "sendMessageEmojiInteraction", "sendMessageEmojiInteractionSeen"]], + ["contacts.Found", ["contacts.found"]], + ["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday"]], + ["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday"]], + ["InputPrivacyRule", ["inputPrivacyValueAllowContacts", "inputPrivacyValueAllowAll", "inputPrivacyValueAllowUsers", "inputPrivacyValueDisallowContacts", "inputPrivacyValueDisallowAll", "inputPrivacyValueDisallowUsers", "inputPrivacyValueAllowChatParticipants", "inputPrivacyValueDisallowChatParticipants", "inputPrivacyValueAllowCloseFriends", "inputPrivacyValueAllowPremium"]], + ["PrivacyRule", ["privacyValueAllowContacts", "privacyValueAllowAll", "privacyValueAllowUsers", "privacyValueDisallowContacts", "privacyValueDisallowAll", "privacyValueDisallowUsers", "privacyValueAllowChatParticipants", "privacyValueDisallowChatParticipants", "privacyValueAllowCloseFriends", "privacyValueAllowPremium"]], + ["account.PrivacyRules", ["account.privacyRules"]], + ["AccountDaysTTL", ["accountDaysTTL"]], + ["DocumentAttribute", ["documentAttributeImageSize", "documentAttributeAnimated", "documentAttributeSticker", "documentAttributeVideo", "documentAttributeAudio", "documentAttributeFilename", "documentAttributeHasStickers", "documentAttributeCustomEmoji"]], + ["messages.Stickers", ["messages.stickersNotModified", "messages.stickers"]], + ["StickerPack", ["stickerPack"]], + ["messages.AllStickers", ["messages.allStickersNotModified", "messages.allStickers"]], + ["messages.AffectedMessages", ["messages.affectedMessages"]], + ["WebPage", ["webPageEmpty", "webPagePending", "webPage", "webPageNotModified"]], + ["Authorization", ["authorization"]], + ["account.Authorizations", ["account.authorizations"]], + ["account.Password", ["account.password"]], + ["account.PasswordSettings", ["account.passwordSettings"]], + ["account.PasswordInputSettings", ["account.passwordInputSettings"]], + ["auth.PasswordRecovery", ["auth.passwordRecovery"]], + ["ReceivedNotifyMessage", ["receivedNotifyMessage"]], + ["ExportedChatInvite", ["chatInviteExported", "chatInvitePublicJoinRequests"]], + ["ChatInvite", ["chatInviteAlready", "chatInvite", "chatInvitePeek"]], + ["InputStickerSet", ["inputStickerSetEmpty", "inputStickerSetID", "inputStickerSetShortName", "inputStickerSetAnimatedEmoji", "inputStickerSetDice", "inputStickerSetAnimatedEmojiAnimations", "inputStickerSetPremiumGifts", "inputStickerSetEmojiGenericAnimations", "inputStickerSetEmojiDefaultStatuses", "inputStickerSetEmojiDefaultTopicIcons", "inputStickerSetEmojiChannelDefaultStatuses"]], + ["StickerSet", ["stickerSet"]], + ["messages.StickerSet", ["messages.stickerSet", "messages.stickerSetNotModified"]], + ["BotCommand", ["botCommand"]], + ["BotInfo", ["botInfo"]], + ["KeyboardButton", ["keyboardButton", "keyboardButtonUrl", "keyboardButtonCallback", "keyboardButtonRequestPhone", "keyboardButtonRequestGeoLocation", "keyboardButtonSwitchInline", "keyboardButtonGame", "keyboardButtonBuy", "keyboardButtonUrlAuth", "inputKeyboardButtonUrlAuth", "keyboardButtonRequestPoll", "inputKeyboardButtonUserProfile", "keyboardButtonUserProfile", "keyboardButtonWebView", "keyboardButtonSimpleWebView", "keyboardButtonRequestPeer", "inputKeyboardButtonRequestPeer"]], + ["KeyboardButtonRow", ["keyboardButtonRow"]], + ["ReplyMarkup", ["replyKeyboardHide", "replyKeyboardForceReply", "replyKeyboardMarkup", "replyInlineMarkup"]], + ["MessageEntity", ["messageEntityUnknown", "messageEntityMention", "messageEntityHashtag", "messageEntityBotCommand", "messageEntityUrl", "messageEntityEmail", "messageEntityBold", "messageEntityItalic", "messageEntityCode", "messageEntityPre", "messageEntityTextUrl", "messageEntityMentionName", "inputMessageEntityMentionName", "messageEntityPhone", "messageEntityCashtag", "messageEntityUnderline", "messageEntityStrike", "messageEntityBankCard", "messageEntitySpoiler", "messageEntityCustomEmoji", "messageEntityBlockquote"]], + ["InputChannel", ["inputChannelEmpty", "inputChannel", "inputChannelFromMessage"]], + ["contacts.ResolvedPeer", ["contacts.resolvedPeer"]], + ["MessageRange", ["messageRange"]], + ["updates.ChannelDifference", ["updates.channelDifferenceEmpty", "updates.channelDifferenceTooLong", "updates.channelDifference"]], + ["ChannelMessagesFilter", ["channelMessagesFilterEmpty", "channelMessagesFilter"]], + ["ChannelParticipant", ["channelParticipant", "channelParticipantSelf", "channelParticipantCreator", "channelParticipantAdmin", "channelParticipantBanned", "channelParticipantLeft"]], + ["ChannelParticipantsFilter", ["channelParticipantsRecent", "channelParticipantsAdmins", "channelParticipantsKicked", "channelParticipantsBots", "channelParticipantsBanned", "channelParticipantsSearch", "channelParticipantsContacts", "channelParticipantsMentions"]], + ["channels.ChannelParticipants", ["channels.channelParticipants", "channels.channelParticipantsNotModified"]], + ["channels.ChannelParticipant", ["channels.channelParticipant"]], + ["help.TermsOfService", ["help.termsOfService"]], + ["messages.SavedGifs", ["messages.savedGifsNotModified", "messages.savedGifs"]], + ["InputBotInlineMessage", ["inputBotInlineMessageMediaAuto", "inputBotInlineMessageText", "inputBotInlineMessageMediaGeo", "inputBotInlineMessageMediaVenue", "inputBotInlineMessageMediaContact", "inputBotInlineMessageGame", "inputBotInlineMessageMediaInvoice", "inputBotInlineMessageMediaWebPage"]], + ["InputBotInlineResult", ["inputBotInlineResult", "inputBotInlineResultPhoto", "inputBotInlineResultDocument", "inputBotInlineResultGame"]], + ["BotInlineMessage", ["botInlineMessageMediaAuto", "botInlineMessageText", "botInlineMessageMediaGeo", "botInlineMessageMediaVenue", "botInlineMessageMediaContact", "botInlineMessageMediaInvoice", "botInlineMessageMediaWebPage"]], + ["BotInlineResult", ["botInlineResult", "botInlineMediaResult"]], + ["messages.BotResults", ["messages.botResults"]], + ["ExportedMessageLink", ["exportedMessageLink"]], + ["MessageFwdHeader", ["messageFwdHeader"]], + ["auth.CodeType", ["auth.codeTypeSms", "auth.codeTypeCall", "auth.codeTypeFlashCall", "auth.codeTypeMissedCall", "auth.codeTypeFragmentSms"]], + ["auth.SentCodeType", ["auth.sentCodeTypeApp", "auth.sentCodeTypeSms", "auth.sentCodeTypeCall", "auth.sentCodeTypeFlashCall", "auth.sentCodeTypeMissedCall", "auth.sentCodeTypeEmailCode", "auth.sentCodeTypeSetUpEmailRequired", "auth.sentCodeTypeFragmentSms", "auth.sentCodeTypeFirebaseSms"]], + ["messages.BotCallbackAnswer", ["messages.botCallbackAnswer"]], + ["messages.MessageEditData", ["messages.messageEditData"]], + ["InputBotInlineMessageID", ["inputBotInlineMessageID", "inputBotInlineMessageID64"]], + ["InlineBotSwitchPM", ["inlineBotSwitchPM"]], + ["messages.PeerDialogs", ["messages.peerDialogs"]], + ["TopPeer", ["topPeer"]], + ["TopPeerCategory", ["topPeerCategoryBotsPM", "topPeerCategoryBotsInline", "topPeerCategoryCorrespondents", "topPeerCategoryGroups", "topPeerCategoryChannels", "topPeerCategoryPhoneCalls", "topPeerCategoryForwardUsers", "topPeerCategoryForwardChats"]], + ["TopPeerCategoryPeers", ["topPeerCategoryPeers"]], + ["contacts.TopPeers", ["contacts.topPeersNotModified", "contacts.topPeers", "contacts.topPeersDisabled"]], + ["DraftMessage", ["draftMessageEmpty", "draftMessage"]], + ["messages.FeaturedStickers", ["messages.featuredStickersNotModified", "messages.featuredStickers"]], + ["messages.RecentStickers", ["messages.recentStickersNotModified", "messages.recentStickers"]], + ["messages.ArchivedStickers", ["messages.archivedStickers"]], + ["messages.StickerSetInstallResult", ["messages.stickerSetInstallResultSuccess", "messages.stickerSetInstallResultArchive"]], + ["StickerSetCovered", ["stickerSetCovered", "stickerSetMultiCovered", "stickerSetFullCovered", "stickerSetNoCovered"]], + ["MaskCoords", ["maskCoords"]], + ["InputStickeredMedia", ["inputStickeredMediaPhoto", "inputStickeredMediaDocument"]], + ["Game", ["game"]], + ["InputGame", ["inputGameID", "inputGameShortName"]], + ["HighScore", ["highScore"]], + ["messages.HighScores", ["messages.highScores"]], + ["RichText", ["textEmpty", "textPlain", "textBold", "textItalic", "textUnderline", "textStrike", "textFixed", "textUrl", "textEmail", "textConcat", "textSubscript", "textSuperscript", "textMarked", "textPhone", "textImage", "textAnchor"]], + ["PageBlock", ["pageBlockUnsupported", "pageBlockTitle", "pageBlockSubtitle", "pageBlockAuthorDate", "pageBlockHeader", "pageBlockSubheader", "pageBlockParagraph", "pageBlockPreformatted", "pageBlockFooter", "pageBlockDivider", "pageBlockAnchor", "pageBlockList", "pageBlockBlockquote", "pageBlockPullquote", "pageBlockPhoto", "pageBlockVideo", "pageBlockCover", "pageBlockEmbed", "pageBlockEmbedPost", "pageBlockCollage", "pageBlockSlideshow", "pageBlockChannel", "pageBlockAudio", "pageBlockKicker", "pageBlockTable", "pageBlockOrderedList", "pageBlockDetails", "pageBlockRelatedArticles", "pageBlockMap"]], + ["PhoneCallDiscardReason", ["phoneCallDiscardReasonMissed", "phoneCallDiscardReasonDisconnect", "phoneCallDiscardReasonHangup", "phoneCallDiscardReasonBusy"]], + ["DataJSON", ["dataJSON"]], + ["LabeledPrice", ["labeledPrice"]], + ["Invoice", ["invoice"]], + ["PaymentCharge", ["paymentCharge"]], + ["PostAddress", ["postAddress"]], + ["PaymentRequestedInfo", ["paymentRequestedInfo"]], + ["PaymentSavedCredentials", ["paymentSavedCredentialsCard"]], + ["WebDocument", ["webDocument", "webDocumentNoProxy"]], + ["InputWebDocument", ["inputWebDocument"]], + ["InputWebFileLocation", ["inputWebFileLocation", "inputWebFileGeoPointLocation", "inputWebFileAudioAlbumThumbLocation"]], + ["upload.WebFile", ["upload.webFile"]], + ["payments.PaymentForm", ["payments.paymentForm"]], + ["payments.ValidatedRequestedInfo", ["payments.validatedRequestedInfo"]], + ["payments.PaymentResult", ["payments.paymentResult", "payments.paymentVerificationNeeded"]], + ["payments.PaymentReceipt", ["payments.paymentReceipt"]], + ["payments.SavedInfo", ["payments.savedInfo"]], + ["InputPaymentCredentials", ["inputPaymentCredentialsSaved", "inputPaymentCredentials", "inputPaymentCredentialsApplePay", "inputPaymentCredentialsGooglePay"]], + ["account.TmpPassword", ["account.tmpPassword"]], + ["ShippingOption", ["shippingOption"]], + ["InputStickerSetItem", ["inputStickerSetItem"]], + ["InputPhoneCall", ["inputPhoneCall"]], + ["PhoneCall", ["phoneCallEmpty", "phoneCallWaiting", "phoneCallRequested", "phoneCallAccepted", "phoneCall", "phoneCallDiscarded"]], + ["PhoneConnection", ["phoneConnection", "phoneConnectionWebrtc"]], + ["PhoneCallProtocol", ["phoneCallProtocol"]], + ["phone.PhoneCall", ["phone.phoneCall"]], + ["upload.CdnFile", ["upload.cdnFileReuploadNeeded", "upload.cdnFile"]], + ["CdnPublicKey", ["cdnPublicKey"]], + ["CdnConfig", ["cdnConfig"]], + ["LangPackString", ["langPackString", "langPackStringPluralized", "langPackStringDeleted"]], + ["LangPackDifference", ["langPackDifference"]], + ["LangPackLanguage", ["langPackLanguage"]], + ["ChannelAdminLogEventAction", [ + "channelAdminLogEventActionChangeTitle", + "channelAdminLogEventActionChangeAbout", + "channelAdminLogEventActionChangeUsername", + "channelAdminLogEventActionChangePhoto", + "channelAdminLogEventActionToggleInvites", + "channelAdminLogEventActionToggleSignatures", + "channelAdminLogEventActionUpdatePinned", + "channelAdminLogEventActionEditMessage", + "channelAdminLogEventActionDeleteMessage", + "channelAdminLogEventActionParticipantJoin", + "channelAdminLogEventActionParticipantLeave", + "channelAdminLogEventActionParticipantInvite", + "channelAdminLogEventActionParticipantToggleBan", + "channelAdminLogEventActionParticipantToggleAdmin", + "channelAdminLogEventActionChangeStickerSet", + "channelAdminLogEventActionTogglePreHistoryHidden", + "channelAdminLogEventActionDefaultBannedRights", + "channelAdminLogEventActionStopPoll", + "channelAdminLogEventActionChangeLinkedChat", + "channelAdminLogEventActionChangeLocation", + "channelAdminLogEventActionToggleSlowMode", + "channelAdminLogEventActionStartGroupCall", + "channelAdminLogEventActionDiscardGroupCall", + "channelAdminLogEventActionParticipantMute", + "channelAdminLogEventActionParticipantUnmute", + "channelAdminLogEventActionToggleGroupCallSetting", + "channelAdminLogEventActionParticipantJoinByInvite", + "channelAdminLogEventActionExportedInviteDelete", + "channelAdminLogEventActionExportedInviteRevoke", + "channelAdminLogEventActionExportedInviteEdit", + "channelAdminLogEventActionParticipantVolume", + "channelAdminLogEventActionChangeHistoryTTL", + "channelAdminLogEventActionParticipantJoinByRequest", + "channelAdminLogEventActionToggleNoForwards", + "channelAdminLogEventActionSendMessage", + "channelAdminLogEventActionChangeAvailableReactions", + "channelAdminLogEventActionChangeUsernames", + "channelAdminLogEventActionToggleForum", + "channelAdminLogEventActionCreateTopic", + "channelAdminLogEventActionEditTopic", + "channelAdminLogEventActionDeleteTopic", + "channelAdminLogEventActionPinTopic", + "channelAdminLogEventActionToggleAntiSpam", + "channelAdminLogEventActionChangePeerColor", + "channelAdminLogEventActionChangeProfilePeerColor", + "channelAdminLogEventActionChangeWallpaper", + "channelAdminLogEventActionChangeEmojiStatus", + "channelAdminLogEventActionChangeEmojiStickerSet", + ]], + ["ChannelAdminLogEvent", ["channelAdminLogEvent"]], + ["channels.AdminLogResults", ["channels.adminLogResults"]], + ["ChannelAdminLogEventsFilter", ["channelAdminLogEventsFilter"]], + ["PopularContact", ["popularContact"]], + ["messages.FavedStickers", ["messages.favedStickersNotModified", "messages.favedStickers"]], + ["RecentMeUrl", ["recentMeUrlUnknown", "recentMeUrlUser", "recentMeUrlChat", "recentMeUrlChatInvite", "recentMeUrlStickerSet"]], + ["help.RecentMeUrls", ["help.recentMeUrls"]], + ["InputSingleMedia", ["inputSingleMedia"]], + ["WebAuthorization", ["webAuthorization"]], + ["account.WebAuthorizations", ["account.webAuthorizations"]], + ["InputMessage", ["inputMessageID", "inputMessageReplyTo", "inputMessagePinned", "inputMessageCallbackQuery"]], + ["InputDialogPeer", ["inputDialogPeer", "inputDialogPeerFolder"]], + ["DialogPeer", ["dialogPeer", "dialogPeerFolder"]], + ["messages.FoundStickerSets", ["messages.foundStickerSetsNotModified", "messages.foundStickerSets"]], + ["FileHash", ["fileHash"]], + ["InputClientProxy", ["inputClientProxy"]], + ["help.TermsOfServiceUpdate", ["help.termsOfServiceUpdateEmpty", "help.termsOfServiceUpdate"]], + ["InputSecureFile", ["inputSecureFileUploaded", "inputSecureFile"]], + ["SecureFile", ["secureFileEmpty", "secureFile"]], + ["SecureData", ["secureData"]], + ["SecurePlainData", ["securePlainPhone", "securePlainEmail"]], + ["SecureValueType", ["secureValueTypePersonalDetails", "secureValueTypePassport", "secureValueTypeDriverLicense", "secureValueTypeIdentityCard", "secureValueTypeInternalPassport", "secureValueTypeAddress", "secureValueTypeUtilityBill", "secureValueTypeBankStatement", "secureValueTypeRentalAgreement", "secureValueTypePassportRegistration", "secureValueTypeTemporaryRegistration", "secureValueTypePhone", "secureValueTypeEmail"]], + ["SecureValue", ["secureValue"]], + ["InputSecureValue", ["inputSecureValue"]], + ["SecureValueHash", ["secureValueHash"]], + ["SecureValueError", ["secureValueErrorData", "secureValueErrorFrontSide", "secureValueErrorReverseSide", "secureValueErrorSelfie", "secureValueErrorFile", "secureValueErrorFiles", "secureValueError", "secureValueErrorTranslationFile", "secureValueErrorTranslationFiles"]], + ["SecureCredentialsEncrypted", ["secureCredentialsEncrypted"]], + ["account.AuthorizationForm", ["account.authorizationForm"]], + ["account.SentEmailCode", ["account.sentEmailCode"]], + ["help.DeepLinkInfo", ["help.deepLinkInfoEmpty", "help.deepLinkInfo"]], + ["SavedContact", ["savedPhoneContact"]], + ["account.Takeout", ["account.takeout"]], + ["PasswordKdfAlgo", ["passwordKdfAlgoUnknown", "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow"]], + ["SecurePasswordKdfAlgo", ["securePasswordKdfAlgoUnknown", "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", "securePasswordKdfAlgoSHA512"]], + ["SecureSecretSettings", ["secureSecretSettings"]], + ["InputCheckPasswordSRP", ["inputCheckPasswordEmpty", "inputCheckPasswordSRP"]], + ["SecureRequiredType", ["secureRequiredType", "secureRequiredTypeOneOf"]], + ["help.PassportConfig", ["help.passportConfigNotModified", "help.passportConfig"]], + ["InputAppEvent", ["inputAppEvent"]], + ["JSONObjectValue", ["jsonObjectValue"]], + ["JSONValue", ["jsonNull", "jsonBool", "jsonNumber", "jsonString", "jsonArray", "jsonObject"]], + ["PageTableCell", ["pageTableCell"]], + ["PageTableRow", ["pageTableRow"]], + ["PageCaption", ["pageCaption"]], + ["PageListItem", ["pageListItemText", "pageListItemBlocks"]], + ["PageListOrderedItem", ["pageListOrderedItemText", "pageListOrderedItemBlocks"]], + ["PageRelatedArticle", ["pageRelatedArticle"]], + ["Page", ["page"]], + ["help.SupportName", ["help.supportName"]], + ["help.UserInfo", ["help.userInfoEmpty", "help.userInfo"]], + ["PollAnswer", ["pollAnswer"]], + ["Poll", ["poll"]], + ["PollAnswerVoters", ["pollAnswerVoters"]], + ["PollResults", ["pollResults"]], + ["ChatOnlines", ["chatOnlines"]], + ["StatsURL", ["statsURL"]], + ["ChatAdminRights", ["chatAdminRights"]], + ["ChatBannedRights", ["chatBannedRights"]], + ["InputWallPaper", ["inputWallPaper", "inputWallPaperSlug", "inputWallPaperNoFile"]], + ["account.WallPapers", ["account.wallPapersNotModified", "account.wallPapers"]], + ["CodeSettings", ["codeSettings"]], + ["WallPaperSettings", ["wallPaperSettings"]], + ["AutoDownloadSettings", ["autoDownloadSettings"]], + ["account.AutoDownloadSettings", ["account.autoDownloadSettings"]], + ["EmojiKeyword", ["emojiKeyword", "emojiKeywordDeleted"]], + ["EmojiKeywordsDifference", ["emojiKeywordsDifference"]], + ["EmojiURL", ["emojiURL"]], + ["EmojiLanguage", ["emojiLanguage"]], + ["Folder", ["folder"]], + ["InputFolderPeer", ["inputFolderPeer"]], + ["FolderPeer", ["folderPeer"]], + ["messages.SearchCounter", ["messages.searchCounter"]], + ["UrlAuthResult", ["urlAuthResultRequest", "urlAuthResultAccepted", "urlAuthResultDefault"]], + ["ChannelLocation", ["channelLocationEmpty", "channelLocation"]], + ["PeerLocated", ["peerLocated", "peerSelfLocated"]], + ["RestrictionReason", ["restrictionReason"]], + ["InputTheme", ["inputTheme", "inputThemeSlug"]], + ["Theme", ["theme"]], + ["account.Themes", ["account.themesNotModified", "account.themes"]], + ["auth.LoginToken", ["auth.loginToken", "auth.loginTokenMigrateTo", "auth.loginTokenSuccess"]], + ["account.ContentSettings", ["account.contentSettings"]], + ["messages.InactiveChats", ["messages.inactiveChats"]], + ["BaseTheme", ["baseThemeClassic", "baseThemeDay", "baseThemeNight", "baseThemeTinted", "baseThemeArctic"]], + ["InputThemeSettings", ["inputThemeSettings"]], + ["ThemeSettings", ["themeSettings"]], + ["WebPageAttribute", ["webPageAttributeTheme", "webPageAttributeStory"]], + ["messages.VotesList", ["messages.votesList"]], + ["BankCardOpenUrl", ["bankCardOpenUrl"]], + ["payments.BankCardData", ["payments.bankCardData"]], + ["DialogFilter", ["dialogFilter", "dialogFilterDefault", "dialogFilterChatlist"]], + ["DialogFilterSuggested", ["dialogFilterSuggested"]], + ["StatsDateRangeDays", ["statsDateRangeDays"]], + ["StatsAbsValueAndPrev", ["statsAbsValueAndPrev"]], + ["StatsPercentValue", ["statsPercentValue"]], + ["StatsGraph", ["statsGraphAsync", "statsGraphError", "statsGraph"]], + ["stats.BroadcastStats", ["stats.broadcastStats"]], + ["help.PromoData", ["help.promoDataEmpty", "help.promoData"]], + ["VideoSize", ["videoSize", "videoSizeEmojiMarkup", "videoSizeStickerMarkup"]], + ["StatsGroupTopPoster", ["statsGroupTopPoster"]], + ["StatsGroupTopAdmin", ["statsGroupTopAdmin"]], + ["StatsGroupTopInviter", ["statsGroupTopInviter"]], + ["stats.MegagroupStats", ["stats.megagroupStats"]], + ["GlobalPrivacySettings", ["globalPrivacySettings"]], + ["help.CountryCode", ["help.countryCode"]], + ["help.Country", ["help.country"]], + ["help.CountriesList", ["help.countriesListNotModified", "help.countriesList"]], + ["MessageViews", ["messageViews"]], + ["messages.MessageViews", ["messages.messageViews"]], + ["messages.DiscussionMessage", ["messages.discussionMessage"]], + ["MessageReplyHeader", ["messageReplyHeader", "messageReplyStoryHeader"]], + ["MessageReplies", ["messageReplies"]], + ["PeerBlocked", ["peerBlocked"]], + ["stats.MessageStats", ["stats.messageStats"]], + ["GroupCall", ["groupCallDiscarded", "groupCall"]], + ["InputGroupCall", ["inputGroupCall"]], + ["GroupCallParticipant", ["groupCallParticipant"]], + ["phone.GroupCall", ["phone.groupCall"]], + ["phone.GroupParticipants", ["phone.groupParticipants"]], + ["InlineQueryPeerType", ["inlineQueryPeerTypeSameBotPM", "inlineQueryPeerTypePM", "inlineQueryPeerTypeChat", "inlineQueryPeerTypeMegagroup", "inlineQueryPeerTypeBroadcast", "inlineQueryPeerTypeBotPM"]], + ["messages.HistoryImport", ["messages.historyImport"]], + ["messages.HistoryImportParsed", ["messages.historyImportParsed"]], + ["messages.AffectedFoundMessages", ["messages.affectedFoundMessages"]], + ["ChatInviteImporter", ["chatInviteImporter"]], + ["messages.ExportedChatInvites", ["messages.exportedChatInvites"]], + ["messages.ExportedChatInvite", ["messages.exportedChatInvite", "messages.exportedChatInviteReplaced"]], + ["messages.ChatInviteImporters", ["messages.chatInviteImporters"]], + ["ChatAdminWithInvites", ["chatAdminWithInvites"]], + ["messages.ChatAdminsWithInvites", ["messages.chatAdminsWithInvites"]], + ["messages.CheckedHistoryImportPeer", ["messages.checkedHistoryImportPeer"]], + ["phone.JoinAsPeers", ["phone.joinAsPeers"]], + ["phone.ExportedGroupCallInvite", ["phone.exportedGroupCallInvite"]], + ["GroupCallParticipantVideoSourceGroup", ["groupCallParticipantVideoSourceGroup"]], + ["GroupCallParticipantVideo", ["groupCallParticipantVideo"]], + ["stickers.SuggestedShortName", ["stickers.suggestedShortName"]], + ["BotCommandScope", ["botCommandScopeDefault", "botCommandScopeUsers", "botCommandScopeChats", "botCommandScopeChatAdmins", "botCommandScopePeer", "botCommandScopePeerAdmins", "botCommandScopePeerUser"]], + ["account.ResetPasswordResult", ["account.resetPasswordFailedWait", "account.resetPasswordRequestedWait", "account.resetPasswordOk"]], + ["SponsoredMessage", ["sponsoredMessage"]], + ["messages.SponsoredMessages", ["messages.sponsoredMessages", "messages.sponsoredMessagesEmpty"]], + ["SearchResultsCalendarPeriod", ["searchResultsCalendarPeriod"]], + ["messages.SearchResultsCalendar", ["messages.searchResultsCalendar"]], + ["SearchResultsPosition", ["searchResultPosition"]], + ["messages.SearchResultsPositions", ["messages.searchResultsPositions"]], + ["channels.SendAsPeers", ["channels.sendAsPeers"]], + ["users.UserFull", ["users.userFull"]], + ["messages.PeerSettings", ["messages.peerSettings"]], + ["auth.LoggedOut", ["auth.loggedOut"]], + ["ReactionCount", ["reactionCount"]], + ["MessageReactions", ["messageReactions"]], + ["messages.MessageReactionsList", ["messages.messageReactionsList"]], + ["AvailableReaction", ["availableReaction"]], + ["messages.AvailableReactions", ["messages.availableReactionsNotModified", "messages.availableReactions"]], + ["MessagePeerReaction", ["messagePeerReaction"]], + ["GroupCallStreamChannel", ["groupCallStreamChannel"]], + ["phone.GroupCallStreamChannels", ["phone.groupCallStreamChannels"]], + ["phone.GroupCallStreamRtmpUrl", ["phone.groupCallStreamRtmpUrl"]], + ["AttachMenuBotIconColor", ["attachMenuBotIconColor"]], + ["AttachMenuBotIcon", ["attachMenuBotIcon"]], + ["AttachMenuBot", ["attachMenuBot"]], + ["AttachMenuBots", ["attachMenuBotsNotModified", "attachMenuBots"]], + ["AttachMenuBotsBot", ["attachMenuBotsBot"]], + ["WebViewResult", ["webViewResultUrl"]], + ["SimpleWebViewResult", ["simpleWebViewResultUrl"]], + ["WebViewMessageSent", ["webViewMessageSent"]], + ["BotMenuButton", ["botMenuButtonDefault", "botMenuButtonCommands", "botMenuButton"]], + ["account.SavedRingtones", ["account.savedRingtonesNotModified", "account.savedRingtones"]], + ["NotificationSound", ["notificationSoundDefault", "notificationSoundNone", "notificationSoundLocal", "notificationSoundRingtone"]], + ["account.SavedRingtone", ["account.savedRingtone", "account.savedRingtoneConverted"]], + ["AttachMenuPeerType", ["attachMenuPeerTypeSameBotPM", "attachMenuPeerTypeBotPM", "attachMenuPeerTypePM", "attachMenuPeerTypeChat", "attachMenuPeerTypeBroadcast"]], + ["InputInvoice", ["inputInvoiceMessage", "inputInvoiceSlug", "inputInvoicePremiumGiftCode"]], + ["payments.ExportedInvoice", ["payments.exportedInvoice"]], + ["messages.TranscribedAudio", ["messages.transcribedAudio"]], + ["help.PremiumPromo", ["help.premiumPromo"]], + ["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway"]], + ["PremiumGiftOption", ["premiumGiftOption"]], + ["PaymentFormMethod", ["paymentFormMethod"]], + ["EmojiStatus", ["emojiStatusEmpty", "emojiStatus", "emojiStatusUntil"]], + ["account.EmojiStatuses", ["account.emojiStatusesNotModified", "account.emojiStatuses"]], + ["Reaction", ["reactionEmpty", "reactionEmoji", "reactionCustomEmoji"]], + ["ChatReactions", ["chatReactionsNone", "chatReactionsAll", "chatReactionsSome"]], + ["messages.Reactions", ["messages.reactionsNotModified", "messages.reactions"]], + ["EmailVerifyPurpose", ["emailVerifyPurposeLoginSetup", "emailVerifyPurposeLoginChange", "emailVerifyPurposePassport"]], + ["EmailVerification", ["emailVerificationCode", "emailVerificationGoogle", "emailVerificationApple"]], + ["account.EmailVerified", ["account.emailVerified", "account.emailVerifiedLogin"]], + ["PremiumSubscriptionOption", ["premiumSubscriptionOption"]], + ["SendAsPeer", ["sendAsPeer"]], + ["MessageExtendedMedia", ["messageExtendedMediaPreview", "messageExtendedMedia"]], + ["StickerKeyword", ["stickerKeyword"]], + ["Username", ["username"]], + ["ForumTopic", ["forumTopicDeleted", "forumTopic"]], + ["messages.ForumTopics", ["messages.forumTopics"]], + ["DefaultHistoryTTL", ["defaultHistoryTTL"]], + ["ExportedContactToken", ["exportedContactToken"]], + ["RequestPeerType", ["requestPeerTypeUser", "requestPeerTypeChat", "requestPeerTypeBroadcast"]], + ["EmojiList", ["emojiListNotModified", "emojiList"]], + ["EmojiGroup", ["emojiGroup"]], + ["messages.EmojiGroups", ["messages.emojiGroupsNotModified", "messages.emojiGroups"]], + ["TextWithEntities", ["textWithEntities"]], + ["messages.TranslatedText", ["messages.translateResult"]], + ["AutoSaveSettings", ["autoSaveSettings"]], + ["AutoSaveException", ["autoSaveException"]], + ["account.AutoSaveSettings", ["account.autoSaveSettings"]], + ["help.AppConfig", ["help.appConfigNotModified", "help.appConfig"]], + ["InputBotApp", ["inputBotAppID", "inputBotAppShortName"]], + ["BotApp", ["botAppNotModified", "botApp"]], + ["messages.BotApp", ["messages.botApp"]], + ["AppWebViewResult", ["appWebViewResultUrl"]], + ["InlineBotWebView", ["inlineBotWebView"]], + ["ReadParticipantDate", ["readParticipantDate"]], + ["InputChatlist", ["inputChatlistDialogFilter"]], + ["ExportedChatlistInvite", ["exportedChatlistInvite"]], + ["chatlists.ExportedChatlistInvite", ["chatlists.exportedChatlistInvite"]], + ["chatlists.ExportedInvites", ["chatlists.exportedInvites"]], + ["chatlists.ChatlistInvite", ["chatlists.chatlistInviteAlready", "chatlists.chatlistInvite"]], + ["chatlists.ChatlistUpdates", ["chatlists.chatlistUpdates"]], + ["bots.BotInfo", ["bots.botInfo"]], + ["MessagePeerVote", ["messagePeerVote", "messagePeerVoteInputOption", "messagePeerVoteMultiple"]], + ["SponsoredWebPage", ["sponsoredWebPage"]], + ["StoryViews", ["storyViews"]], + ["StoryItem", ["storyItemDeleted", "storyItemSkipped", "storyItem"]], + ["stories.AllStories", ["stories.allStoriesNotModified", "stories.allStories"]], + ["stories.Stories", ["stories.stories"]], + ["StoryView", ["storyView", "storyViewPublicForward", "storyViewPublicRepost"]], + ["stories.StoryViewsList", ["stories.storyViewsList"]], + ["stories.StoryViews", ["stories.storyViews"]], + ["InputReplyTo", ["inputReplyToMessage", "inputReplyToStory"]], + ["ExportedStoryLink", ["exportedStoryLink"]], + ["StoriesStealthMode", ["storiesStealthMode"]], + ["MediaAreaCoordinates", ["mediaAreaCoordinates"]], + ["MediaArea", ["mediaAreaVenue", "inputMediaAreaVenue", "mediaAreaGeoPoint", "mediaAreaSuggestedReaction", "mediaAreaChannelPost", "inputMediaAreaChannelPost"]], + ["PeerStories", ["peerStories"]], + ["stories.PeerStories", ["stories.peerStories"]], + ["messages.WebPage", ["messages.webPage"]], + ["PremiumGiftCodeOption", ["premiumGiftCodeOption"]], + ["payments.CheckedGiftCode", ["payments.checkedGiftCode"]], + ["payments.GiveawayInfo", ["payments.giveawayInfo", "payments.giveawayInfoResults"]], + ["PrepaidGiveaway", ["prepaidGiveaway"]], + ["Boost", ["boost"]], + ["premium.BoostsList", ["premium.boostsList"]], + ["MyBoost", ["myBoost"]], + ["premium.MyBoosts", ["premium.myBoosts"]], + ["premium.BoostsStatus", ["premium.boostsStatus"]], + ["StoryFwdHeader", ["storyFwdHeader"]], + ["PostInteractionCounters", ["postInteractionCountersMessage", "postInteractionCountersStory"]], + ["stats.StoryStats", ["stats.storyStats"]], + ["PublicForward", ["publicForwardMessage", "publicForwardStory"]], + ["stats.PublicForwards", ["stats.publicForwards"]], + ["PeerColor", ["peerColor"]], + ["help.PeerColorSet", ["help.peerColorSet", "help.peerColorProfileSet"]], + ["help.PeerColorOption", ["help.peerColorOption"]], + ["help.PeerColors", ["help.peerColorsNotModified", "help.peerColors"]], + ["StoryReaction", ["storyReaction", "storyReactionPublicForward", "storyReactionPublicRepost"]], + ["stories.StoryReactionsList", ["stories.storyReactionsList"]], + ["SavedDialog", ["savedDialog"]], + ["messages.SavedDialogs", ["messages.savedDialogs", "messages.savedDialogsSlice", "messages.savedDialogsNotModified"]], + ["SavedReactionTag", ["savedReactionTag"]], + ["messages.SavedReactionTags", ["messages.savedReactionTagsNotModified", "messages.savedReactionTags"]], + ["OutboxReadDate", ["outboxReadDate"]], + ["smsjobs.EligibilityToJoin", ["smsjobs.eligibleToJoin"]], + ["smsjobs.Status", ["smsjobs.status"]], + ["SmsJob", ["smsJob"]], + ["BusinessWeeklyOpen", ["businessWeeklyOpen"]], + ["BusinessWorkHours", ["businessWorkHours"]], + ["BusinessLocation", ["businessLocation"]], + ["InputBusinessRecipients", ["inputBusinessRecipients"]], + ["BusinessRecipients", ["businessRecipients"]], + ["BusinessAwayMessageSchedule", ["businessAwayMessageScheduleAlways", "businessAwayMessageScheduleOutsideWorkHours", "businessAwayMessageScheduleCustom"]], + ["InputBusinessGreetingMessage", ["inputBusinessGreetingMessage"]], + ["BusinessGreetingMessage", ["businessGreetingMessage"]], + ["InputBusinessAwayMessage", ["inputBusinessAwayMessage"]], + ["BusinessAwayMessage", ["businessAwayMessage"]], + ["Timezone", ["timezone"]], + ["help.TimezonesList", ["help.timezonesListNotModified", "help.timezonesList"]], + ["QuickReply", ["quickReply"]], + ["InputQuickReplyShortcut", ["inputQuickReplyShortcut", "inputQuickReplyShortcutId"]], + ["messages.QuickReplies", ["messages.quickReplies", "messages.quickRepliesNotModified"]], + ["ConnectedBot", ["connectedBot"]], + ["account.ConnectedBots", ["account.connectedBots"]], + ["messages.DialogFilters", ["messages.dialogFilters"]], + ["Birthday", ["birthday"]], + ["BotBusinessConnection", ["botBusinessConnection"]], + ["InputBusinessIntro", ["inputBusinessIntro"]], + ["BusinessIntro", ["businessIntro"]], + ["messages.MyStickers", ["messages.myStickers"]], + ["InputCollectible", ["inputCollectibleUsername", "inputCollectiblePhone"]], + ["fragment.CollectibleInfo", ["fragment.collectibleInfo"]], + ["InputBusinessBotRecipients", ["inputBusinessBotRecipients"]], + ["BusinessBotRecipients", ["businessBotRecipients"]], + ["ContactBirthday", ["contactBirthday"]], + ["contacts.ContactBirthdays", ["contacts.contactBirthdays"]], + ["MissingInvitee", ["missingInvitee"]], + ["messages.InvitedUsers", ["messages.invitedUsers"]], + ["InputBusinessChatLink", ["inputBusinessChatLink"]], + ["BusinessChatLink", ["businessChatLink"]], + ["account.BusinessChatLinks", ["account.businessChatLinks"]], + ["account.ResolvedBusinessChatLinks", ["account.resolvedBusinessChatLinks"]], + ["RequestedPeer", ["requestedPeerUser", "requestedPeerChat", "requestedPeerChannel"]], + ["SponsoredMessageReportOption", ["sponsoredMessageReportOption"]], + ["channels.SponsoredMessageReportResult", ["channels.sponsoredMessageReportResultChooseOption", "channels.sponsoredMessageReportResultAdsHidden", "channels.sponsoredMessageReportResultReported"]], + ["stats.BroadcastRevenueStats", ["stats.broadcastRevenueStats"]], + ["stats.BroadcastRevenueWithdrawalUrl", ["stats.broadcastRevenueWithdrawalUrl"]], + ["BroadcastRevenueTransaction", ["broadcastRevenueTransactionProceeds", "broadcastRevenueTransactionWithdrawal", "broadcastRevenueTransactionRefund"]], + ["stats.BroadcastRevenueTransactions", ["stats.broadcastRevenueTransactions"]], +]); + +const types: Map = new Map([ + [ + "resPQ", + [ + 0x05162463, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["pq", Uint8Array, "bytes"], + ["server_public_key_fingerprints", ["bigint"], "Vector"], + ], + ], + ], + [ + "p_q_inner_data_dc", + [ + 0xA9F55F95, + [ + ["pq", Uint8Array, "bytes"], + ["p", Uint8Array, "bytes"], + ["q", Uint8Array, "bytes"], + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["new_nonce", "bigint", "int256"], + ["dc", "number", "int"], + ], + ], + ], + [ + "p_q_inner_data_temp_dc", + [ + 0x56FDDF88, + [ + ["pq", Uint8Array, "bytes"], + ["p", Uint8Array, "bytes"], + ["q", Uint8Array, "bytes"], + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["new_nonce", "bigint", "int256"], + ["dc", "number", "int"], + ["expires_in", "number", "int"], + ], + ], + ], + [ + "server_DH_params_ok", + [ + 0xD0E8075C, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["encrypted_answer", Uint8Array, "bytes"], + ], + ], + ], + [ + "server_DH_inner_data", + [ + 0xB5890DBA, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["g", "number", "int"], + ["dh_prime", Uint8Array, "bytes"], + ["g_a", Uint8Array, "bytes"], + ["server_time", "number", "int"], + ], + ], + ], + [ + "client_DH_inner_data", + [ + 0x6643B654, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["retry_id", "bigint", "long"], + ["g_b", Uint8Array, "bytes"], + ], + ], + ], + [ + "dh_gen_ok", + [ + 0x3BCBF734, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["new_nonce_hash1", "bigint", "int128"], + ], + ], + ], + [ + "dh_gen_retry", + [ + 0x46DC1FB9, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["new_nonce_hash2", "bigint", "int128"], + ], + ], + ], + [ + "dh_gen_fail", + [ + 0xA69DAE02, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["new_nonce_hash3", "bigint", "int128"], + ], + ], + ], + [ + "bind_auth_key_inner", + [ + 0x75A3F765, + [ + ["nonce", "bigint", "long"], + ["temp_auth_key_id", "bigint", "long"], + ["perm_auth_key_id", "bigint", "long"], + ["temp_session_id", "bigint", "long"], + ["expires_at", "number", "int"], + ], + ], + ], + [ + "rpc_error", + [ + 0x2144CA19, + [ + ["error_code", "number", "int"], + ["error_message", "string", "string"], + ], + ], + ], + [ + "rpc_answer_unknown", + [ + 0x5E2AD36E, + [], + ], + ], + [ + "rpc_answer_dropped_running", + [ + 0xCD78E586, + [], + ], + ], + [ + "rpc_answer_dropped", + [ + 0xA43AD8B7, + [ + ["msg_id", "bigint", "long"], + ["seq_no", "number", "int"], + ["bytes", "number", "int"], + ], + ], + ], + [ + "future_salt", + [ + 0x0949D9DC, + [ + ["valid_since", "number", "int"], + ["valid_until", "number", "int"], + ["salt", "bigint", "long"], + ], + ], + ], + [ + "future_salts", + [ + 0xAE500895, + [ + ["req_msg_id", "bigint", "long"], + ["now", "number", "int"], + ["salts", ["FutureSalt"], "vector"], + ], + ], + ], + [ + "pong", + [ + 0x347773C5, + [ + ["msg_id", "bigint", "long"], + ["ping_id", "bigint", "long"], + ], + ], + ], + [ + "destroy_session_ok", + [ + 0xE22045FC, + [ + ["session_id", "bigint", "long"], + ], + ], + ], + [ + "destroy_session_none", + [ + 0x62D350C9, + [ + ["session_id", "bigint", "long"], + ], + ], + ], + [ + "new_session_created", + [ + 0x9EC20908, + [ + ["first_msg_id", "bigint", "long"], + ["unique_id", "bigint", "long"], + ["server_salt", "bigint", "long"], + ], + ], + ], + [ + "gzip_packed", + [ + 0x3072CFA1, + [ + ["packed_data", Uint8Array, "bytes"], + ], + ], + ], + [ + "msgs_ack", + [ + 0x62D6B459, + [ + ["msg_ids", ["bigint"], "Vector"], + ], + ], + ], + [ + "bad_msg_notification", + [ + 0xA7EFF811, + [ + ["bad_msg_id", "bigint", "long"], + ["bad_msg_seqno", "number", "int"], + ["error_code", "number", "int"], + ], + ], + ], + [ + "bad_server_salt", + [ + 0xEDAB447B, + [ + ["bad_msg_id", "bigint", "long"], + ["bad_msg_seqno", "number", "int"], + ["error_code", "number", "int"], + ["new_server_salt", "bigint", "long"], + ], + ], + ], + [ + "msg_resend_req", + [ + 0x7D861A08, + [ + ["msg_ids", ["bigint"], "Vector"], + ], + ], + ], + [ + "msgs_state_req", + [ + 0xDA69FB52, + [ + ["msg_ids", ["bigint"], "Vector"], + ], + ], + ], + [ + "msgs_state_info", + [ + 0x04DEB57D, + [ + ["req_msg_id", "bigint", "long"], + ["info", Uint8Array, "bytes"], + ], + ], + ], + [ + "msgs_all_info", + [ + 0x8CC0D131, + [ + ["msg_ids", ["bigint"], "Vector"], + ["info", Uint8Array, "bytes"], + ], + ], + ], + [ + "msg_detailed_info", + [ + 0x276D3EC6, + [ + ["msg_id", "bigint", "long"], + ["answer_msg_id", "bigint", "long"], + ["bytes", "number", "int"], + ["status", "number", "int"], + ], + ], + ], + [ + "msg_new_detailed_info", + [ + 0x809DB6DF, + [ + ["answer_msg_id", "bigint", "long"], + ["bytes", "number", "int"], + ["status", "number", "int"], + ], + ], + ], + [ + "destroy_auth_key_ok", + [ + 0xF660E1D4, + [], + ], + ], + [ + "destroy_auth_key_none", + [ + 0x0A9F2259, + [], + ], + ], + [ + "destroy_auth_key_fail", + [ + 0xEA109B13, + [], + ], + ], + [ + "http_wait", + [ + 0x9299359F, + [ + ["max_delay", "number", "int"], + ["wait_after", "number", "int"], + ["max_wait", "number", "int"], + ], + ], + ], + [ + "true", + [ + 0x3FEDD339, + [], + ], + ], + [ + "error", + [ + 0xC4B9F9BB, + [ + ["code", "number", "int"], + ["text", "string", "string"], + ], + ], + ], + [ + "ipPort", + [ + 0xD433AD73, + [ + ["ipv4", "number", "int"], + ["port", "number", "int"], + ], + ], + ], + [ + "ipPortSecret", + [ + 0x37982646, + [ + ["ipv4", "number", "int"], + ["port", "number", "int"], + ["secret", Uint8Array, "bytes"], + ], + ], + ], + [ + "accessPointRule", + [ + 0x4679B65F, + [ + ["phone_prefix_rules", "string", "string"], + ["dc_id", "number", "int"], + ["ips", ["IpPort"], "vector"], + ], + ], + ], + [ + "help.configSimple", + [ + 0x5A592A6C, + [ + ["date", "number", "int"], + ["expires", "number", "int"], + ["rules", ["AccessPointRule"], "vector"], + ], + ], + ], + [ + "inputPeerPhotoFileLocationLegacy", + [ + 0x27D69997, + [ + ["flags", flags, "#"], + ["big", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["volume_id", "bigint", "long"], + ["local_id", "number", "int"], + ], + ], + ], + [ + "inputStickerSetThumbLegacy", + [ + 0x0DBAEAE9, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["volume_id", "bigint", "long"], + ["local_id", "number", "int"], + ], + ], + ], + [ + "inputPeerEmpty", + [ + 0x7F3B18EA, + [], + ], + ], + [ + "inputPeerSelf", + [ + 0x7DA07EC9, + [], + ], + ], + [ + "inputPeerChat", + [ + 0x35A95CB9, + [ + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "inputPeerUser", + [ + 0xDDE8A54C, + [ + ["user_id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputPeerChannel", + [ + 0x27BCBBFC, + [ + ["channel_id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputPeerUserFromMessage", + [ + 0xA87B0A1C, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "inputPeerChannelFromMessage", + [ + 0xBD2A0840, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["channel_id", "bigint", "long"], + ], + ], + ], + [ + "inputUserEmpty", + [ + 0xB98886CF, + [], + ], + ], + [ + "inputUserSelf", + [ + 0xF7C1B13F, + [], + ], + ], + [ + "inputUser", + [ + 0xF21158C6, + [ + ["user_id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputUserFromMessage", + [ + 0x1DA448E2, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "inputPhoneContact", + [ + 0xF392B7F4, + [ + ["client_id", "bigint", "long"], + ["phone", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ], + ], + ], + [ + "inputFile", + [ + 0xF52FF27F, + [ + ["id", "bigint", "long"], + ["parts", "number", "int"], + ["name", "string", "string"], + ["md5_checksum", "string", "string"], + ], + ], + ], + [ + "inputFileBig", + [ + 0xFA4F0BB5, + [ + ["id", "bigint", "long"], + ["parts", "number", "int"], + ["name", "string", "string"], + ], + ], + ], + [ + "inputMediaEmpty", + [ + 0x9664F57F, + [], + ], + ], + [ + "inputMediaUploadedPhoto", + [ + 0x1E287D04, + [ + ["flags", flags, "#"], + ["spoiler", "true", "flags.2?true"], + ["file", "InputFile", "InputFile"], + ["stickers", ["InputDocument"], "flags.0?Vector"], + ["ttl_seconds", "number", "flags.1?int"], + ], + ], + ], + [ + "inputMediaPhoto", + [ + 0xB3BA0635, + [ + ["flags", flags, "#"], + ["spoiler", "true", "flags.1?true"], + ["id", "InputPhoto", "InputPhoto"], + ["ttl_seconds", "number", "flags.0?int"], + ], + ], + ], + [ + "inputMediaGeoPoint", + [ + 0xF9C44144, + [ + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ], + ], + ], + [ + "inputMediaContact", + [ + 0xF8AB7DFB, + [ + ["phone_number", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["vcard", "string", "string"], + ], + ], + ], + [ + "inputMediaUploadedDocument", + [ + 0x5B38C6C1, + [ + ["flags", flags, "#"], + ["nosound_video", "true", "flags.3?true"], + ["force_file", "true", "flags.4?true"], + ["spoiler", "true", "flags.5?true"], + ["file", "InputFile", "InputFile"], + ["thumb", "InputFile", "flags.2?InputFile"], + ["mime_type", "string", "string"], + ["attributes", ["DocumentAttribute"], "Vector"], + ["stickers", ["InputDocument"], "flags.0?Vector"], + ["ttl_seconds", "number", "flags.1?int"], + ], + ], + ], + [ + "inputMediaDocument", + [ + 0x33473058, + [ + ["flags", flags, "#"], + ["spoiler", "true", "flags.2?true"], + ["id", "InputDocument", "InputDocument"], + ["ttl_seconds", "number", "flags.0?int"], + ["query", "string", "flags.1?string"], + ], + ], + ], + [ + "inputMediaVenue", + [ + 0xC13D1C11, + [ + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["title", "string", "string"], + ["address", "string", "string"], + ["provider", "string", "string"], + ["venue_id", "string", "string"], + ["venue_type", "string", "string"], + ], + ], + ], + [ + "inputMediaPhotoExternal", + [ + 0xE5BBFE1A, + [ + ["flags", flags, "#"], + ["spoiler", "true", "flags.1?true"], + ["url", "string", "string"], + ["ttl_seconds", "number", "flags.0?int"], + ], + ], + ], + [ + "inputMediaDocumentExternal", + [ + 0xFB52DC99, + [ + ["flags", flags, "#"], + ["spoiler", "true", "flags.1?true"], + ["url", "string", "string"], + ["ttl_seconds", "number", "flags.0?int"], + ], + ], + ], + [ + "inputMediaGame", + [ + 0xD33F43F3, + [ + ["id", "InputGame", "InputGame"], + ], + ], + ], + [ + "inputMediaInvoice", + [ + 0x8EB5A6D5, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "InputWebDocument", "flags.0?InputWebDocument"], + ["invoice", "Invoice", "Invoice"], + ["payload", Uint8Array, "bytes"], + ["provider", "string", "string"], + ["provider_data", "DataJSON", "DataJSON"], + ["start_param", "string", "flags.1?string"], + ["extended_media", "InputMedia", "flags.2?InputMedia"], + ], + ], + ], + [ + "inputMediaGeoLive", + [ + 0x971FA843, + [ + ["flags", flags, "#"], + ["stopped", "true", "flags.0?true"], + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["heading", "number", "flags.2?int"], + ["period", "number", "flags.1?int"], + ["proximity_notification_radius", "number", "flags.3?int"], + ], + ], + ], + [ + "inputMediaPoll", + [ + 0x0F94E5F1, + [ + ["flags", flags, "#"], + ["poll", "Poll", "Poll"], + ["correct_answers", [Uint8Array], "flags.0?Vector"], + ["solution", "string", "flags.1?string"], + ["solution_entities", ["MessageEntity"], "flags.1?Vector"], + ], + ], + ], + [ + "inputMediaDice", + [ + 0xE66FBF7B, + [ + ["emoticon", "string", "string"], + ], + ], + ], + [ + "inputMediaStory", + [ + 0x89FDD778, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ], + ], + ], + [ + "inputMediaWebPage", + [ + 0xC21B8849, + [ + ["flags", flags, "#"], + ["force_large_media", "true", "flags.0?true"], + ["force_small_media", "true", "flags.1?true"], + ["optional", "true", "flags.2?true"], + ["url", "string", "string"], + ], + ], + ], + [ + "inputChatPhotoEmpty", + [ + 0x1CA48F57, + [], + ], + ], + [ + "inputChatUploadedPhoto", + [ + 0xBDCDAEC0, + [ + ["flags", flags, "#"], + ["file", "InputFile", "flags.0?InputFile"], + ["video", "InputFile", "flags.1?InputFile"], + ["video_start_ts", "number", "flags.2?double"], + ["video_emoji_markup", "VideoSize", "flags.3?VideoSize"], + ], + ], + ], + [ + "inputChatPhoto", + [ + 0x8953AD37, + [ + ["id", "InputPhoto", "InputPhoto"], + ], + ], + ], + [ + "inputGeoPointEmpty", + [ + 0xE4C123D6, + [], + ], + ], + [ + "inputGeoPoint", + [ + 0x48222FAF, + [ + ["flags", flags, "#"], + ["lat", "number", "double"], + ["long", "number", "double"], + ["accuracy_radius", "number", "flags.0?int"], + ], + ], + ], + [ + "inputPhotoEmpty", + [ + 0x1CD7BF0D, + [], + ], + ], + [ + "inputPhoto", + [ + 0x3BB3B94A, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputFileLocation", + [ + 0xDFDAABE1, + [ + ["volume_id", "bigint", "long"], + ["local_id", "number", "int"], + ["secret", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputEncryptedFileLocation", + [ + 0xF5235D55, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputDocumentFileLocation", + [ + 0xBAD07584, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ["thumb_size", "string", "string"], + ], + ], + ], + [ + "inputSecureFileLocation", + [ + 0xCBC7EE28, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputTakeoutFileLocation", + [ + 0x29BE5899, + [], + ], + ], + [ + "inputPhotoFileLocation", + [ + 0x40181FFE, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ["thumb_size", "string", "string"], + ], + ], + ], + [ + "inputPhotoLegacyFileLocation", + [ + 0xD83466F3, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ["volume_id", "bigint", "long"], + ["local_id", "number", "int"], + ["secret", "bigint", "long"], + ], + ], + ], + [ + "inputPeerPhotoFileLocation", + [ + 0x37257E99, + [ + ["flags", flags, "#"], + ["big", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["photo_id", "bigint", "long"], + ], + ], + ], + [ + "inputStickerSetThumb", + [ + 0x9D84F3DB, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["thumb_version", "number", "int"], + ], + ], + ], + [ + "inputGroupCallStream", + [ + 0x0598A92A, + [ + ["flags", flags, "#"], + ["call", "InputGroupCall", "InputGroupCall"], + ["time_ms", "bigint", "long"], + ["scale", "number", "int"], + ["video_channel", "number", "flags.0?int"], + ["video_quality", "number", "flags.0?int"], + ], + ], + ], + [ + "peerUser", + [ + 0x59511722, + [ + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "peerChat", + [ + 0x36C6019A, + [ + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "peerChannel", + [ + 0xA2A5371E, + [ + ["channel_id", "bigint", "long"], + ], + ], + ], + [ + "storage.fileUnknown", + [ + 0xAA963B05, + [], + ], + ], + [ + "storage.filePartial", + [ + 0x40BC6F52, + [], + ], + ], + [ + "storage.fileJpeg", + [ + 0x007EFE0E, + [], + ], + ], + [ + "storage.fileGif", + [ + 0xCAE1AADF, + [], + ], + ], + [ + "storage.filePng", + [ + 0x0A4F63C0, + [], + ], + ], + [ + "storage.filePdf", + [ + 0xAE1E508D, + [], + ], + ], + [ + "storage.fileMp3", + [ + 0x528A0677, + [], + ], + ], + [ + "storage.fileMov", + [ + 0x4B09EBBC, + [], + ], + ], + [ + "storage.fileMp4", + [ + 0xB3CEA0E4, + [], + ], + ], + [ + "storage.fileWebp", + [ + 0x1081464C, + [], + ], + ], + [ + "userEmpty", + [ + 0xD3BC4B7A, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "user", + [ + 0x215C4438, + [ + ["flags", flags, "#"], + ["self", "true", "flags.10?true"], + ["contact", "true", "flags.11?true"], + ["mutual_contact", "true", "flags.12?true"], + ["deleted", "true", "flags.13?true"], + ["bot", "true", "flags.14?true"], + ["bot_chat_history", "true", "flags.15?true"], + ["bot_nochats", "true", "flags.16?true"], + ["verified", "true", "flags.17?true"], + ["restricted", "true", "flags.18?true"], + ["min", "true", "flags.20?true"], + ["bot_inline_geo", "true", "flags.21?true"], + ["support", "true", "flags.23?true"], + ["scam", "true", "flags.24?true"], + ["apply_min_photo", "true", "flags.25?true"], + ["fake", "true", "flags.26?true"], + ["bot_attach_menu", "true", "flags.27?true"], + ["premium", "true", "flags.28?true"], + ["attach_menu_enabled", "true", "flags.29?true"], + ["flags2", flags, "#"], + ["bot_can_edit", "true", "flags2.1?true"], + ["close_friend", "true", "flags2.2?true"], + ["stories_hidden", "true", "flags2.3?true"], + ["stories_unavailable", "true", "flags2.4?true"], + ["contact_require_premium", "true", "flags2.10?true"], + ["bot_business", "true", "flags2.11?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "flags.0?long"], + ["first_name", "string", "flags.1?string"], + ["last_name", "string", "flags.2?string"], + ["username", "string", "flags.3?string"], + ["phone", "string", "flags.4?string"], + ["photo", "UserProfilePhoto", "flags.5?UserProfilePhoto"], + ["status", "UserStatus", "flags.6?UserStatus"], + ["bot_info_version", "number", "flags.14?int"], + ["restriction_reason", ["RestrictionReason"], "flags.18?Vector"], + ["bot_inline_placeholder", "string", "flags.19?string"], + ["lang_code", "string", "flags.22?string"], + ["emoji_status", "EmojiStatus", "flags.30?EmojiStatus"], + ["usernames", ["Username"], "flags2.0?Vector"], + ["stories_max_id", "number", "flags2.5?int"], + ["color", "PeerColor", "flags2.8?PeerColor"], + ["profile_color", "PeerColor", "flags2.9?PeerColor"], + ], + ], + ], + [ + "userProfilePhotoEmpty", + [ + 0x4F11BAE1, + [], + ], + ], + [ + "userProfilePhoto", + [ + 0x82D1F706, + [ + ["flags", flags, "#"], + ["has_video", "true", "flags.0?true"], + ["personal", "true", "flags.2?true"], + ["photo_id", "bigint", "long"], + ["stripped_thumb", Uint8Array, "flags.1?bytes"], + ["dc_id", "number", "int"], + ], + ], + ], + [ + "userStatusEmpty", + [ + 0x09D05049, + [], + ], + ], + [ + "userStatusOnline", + [ + 0xEDB93949, + [ + ["expires", "number", "int"], + ], + ], + ], + [ + "userStatusOffline", + [ + 0x008C703F, + [ + ["was_online", "number", "int"], + ], + ], + ], + [ + "userStatusRecently", + [ + 0x7B197DC8, + [ + ["flags", flags, "#"], + ["by_me", "true", "flags.0?true"], + ], + ], + ], + [ + "userStatusLastWeek", + [ + 0x541A1D1A, + [ + ["flags", flags, "#"], + ["by_me", "true", "flags.0?true"], + ], + ], + ], + [ + "userStatusLastMonth", + [ + 0x65899777, + [ + ["flags", flags, "#"], + ["by_me", "true", "flags.0?true"], + ], + ], + ], + [ + "chatEmpty", + [ + 0x29562865, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "chat", + [ + 0x41CBF256, + [ + ["flags", flags, "#"], + ["creator", "true", "flags.0?true"], + ["left", "true", "flags.2?true"], + ["deactivated", "true", "flags.5?true"], + ["call_active", "true", "flags.23?true"], + ["call_not_empty", "true", "flags.24?true"], + ["noforwards", "true", "flags.25?true"], + ["id", "bigint", "long"], + ["title", "string", "string"], + ["photo", "ChatPhoto", "ChatPhoto"], + ["participants_count", "number", "int"], + ["date", "number", "int"], + ["version", "number", "int"], + ["migrated_to", "InputChannel", "flags.6?InputChannel"], + ["admin_rights", "ChatAdminRights", "flags.14?ChatAdminRights"], + ["default_banned_rights", "ChatBannedRights", "flags.18?ChatBannedRights"], + ], + ], + ], + [ + "chatForbidden", + [ + 0x6592A1A7, + [ + ["id", "bigint", "long"], + ["title", "string", "string"], + ], + ], + ], + [ + "channel", + [ + 0x0AADFC8F, + [ + ["flags", flags, "#"], + ["creator", "true", "flags.0?true"], + ["left", "true", "flags.2?true"], + ["broadcast", "true", "flags.5?true"], + ["verified", "true", "flags.7?true"], + ["megagroup", "true", "flags.8?true"], + ["restricted", "true", "flags.9?true"], + ["signatures", "true", "flags.11?true"], + ["min", "true", "flags.12?true"], + ["scam", "true", "flags.19?true"], + ["has_link", "true", "flags.20?true"], + ["has_geo", "true", "flags.21?true"], + ["slowmode_enabled", "true", "flags.22?true"], + ["call_active", "true", "flags.23?true"], + ["call_not_empty", "true", "flags.24?true"], + ["fake", "true", "flags.25?true"], + ["gigagroup", "true", "flags.26?true"], + ["noforwards", "true", "flags.27?true"], + ["join_to_send", "true", "flags.28?true"], + ["join_request", "true", "flags.29?true"], + ["forum", "true", "flags.30?true"], + ["flags2", flags, "#"], + ["stories_hidden", "true", "flags2.1?true"], + ["stories_hidden_min", "true", "flags2.2?true"], + ["stories_unavailable", "true", "flags2.3?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "flags.13?long"], + ["title", "string", "string"], + ["username", "string", "flags.6?string"], + ["photo", "ChatPhoto", "ChatPhoto"], + ["date", "number", "int"], + ["restriction_reason", ["RestrictionReason"], "flags.9?Vector"], + ["admin_rights", "ChatAdminRights", "flags.14?ChatAdminRights"], + ["banned_rights", "ChatBannedRights", "flags.15?ChatBannedRights"], + ["default_banned_rights", "ChatBannedRights", "flags.18?ChatBannedRights"], + ["participants_count", "number", "flags.17?int"], + ["usernames", ["Username"], "flags2.0?Vector"], + ["stories_max_id", "number", "flags2.4?int"], + ["color", "PeerColor", "flags2.7?PeerColor"], + ["profile_color", "PeerColor", "flags2.8?PeerColor"], + ["emoji_status", "EmojiStatus", "flags2.9?EmojiStatus"], + ["level", "number", "flags2.10?int"], + ], + ], + ], + [ + "channelForbidden", + [ + 0x17D493D5, + [ + ["flags", flags, "#"], + ["broadcast", "true", "flags.5?true"], + ["megagroup", "true", "flags.8?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["title", "string", "string"], + ["until_date", "number", "flags.16?int"], + ], + ], + ], + [ + "chatFull", + [ + 0xC9D31138, + [ + ["flags", flags, "#"], + ["can_set_username", "true", "flags.7?true"], + ["has_scheduled", "true", "flags.8?true"], + ["translations_disabled", "true", "flags.19?true"], + ["id", "bigint", "long"], + ["about", "string", "string"], + ["participants", "ChatParticipants", "ChatParticipants"], + ["chat_photo", "Photo", "flags.2?Photo"], + ["notify_settings", "PeerNotifySettings", "PeerNotifySettings"], + ["exported_invite", "ExportedChatInvite", "flags.13?ExportedChatInvite"], + ["bot_info", ["BotInfo"], "flags.3?Vector"], + ["pinned_msg_id", "number", "flags.6?int"], + ["folder_id", "number", "flags.11?int"], + ["call", "InputGroupCall", "flags.12?InputGroupCall"], + ["ttl_period", "number", "flags.14?int"], + ["groupcall_default_join_as", "Peer", "flags.15?Peer"], + ["theme_emoticon", "string", "flags.16?string"], + ["requests_pending", "number", "flags.17?int"], + ["recent_requesters", ["bigint"], "flags.17?Vector"], + ["available_reactions", "ChatReactions", "flags.18?ChatReactions"], + ], + ], + ], + [ + "channelFull", + [ + 0x44C054A7, + [ + ["flags", flags, "#"], + ["can_view_participants", "true", "flags.3?true"], + ["can_set_username", "true", "flags.6?true"], + ["can_set_stickers", "true", "flags.7?true"], + ["hidden_prehistory", "true", "flags.10?true"], + ["can_set_location", "true", "flags.16?true"], + ["has_scheduled", "true", "flags.19?true"], + ["can_view_stats", "true", "flags.20?true"], + ["blocked", "true", "flags.22?true"], + ["flags2", flags, "#"], + ["can_delete_channel", "true", "flags2.0?true"], + ["antispam", "true", "flags2.1?true"], + ["participants_hidden", "true", "flags2.2?true"], + ["translations_disabled", "true", "flags2.3?true"], + ["stories_pinned_available", "true", "flags2.5?true"], + ["view_forum_as_messages", "true", "flags2.6?true"], + ["restricted_sponsored", "true", "flags2.11?true"], + ["can_view_revenue", "true", "flags2.12?true"], + ["id", "bigint", "long"], + ["about", "string", "string"], + ["participants_count", "number", "flags.0?int"], + ["admins_count", "number", "flags.1?int"], + ["kicked_count", "number", "flags.2?int"], + ["banned_count", "number", "flags.2?int"], + ["online_count", "number", "flags.13?int"], + ["read_inbox_max_id", "number", "int"], + ["read_outbox_max_id", "number", "int"], + ["unread_count", "number", "int"], + ["chat_photo", "Photo", "Photo"], + ["notify_settings", "PeerNotifySettings", "PeerNotifySettings"], + ["exported_invite", "ExportedChatInvite", "flags.23?ExportedChatInvite"], + ["bot_info", ["BotInfo"], "Vector"], + ["migrated_from_chat_id", "bigint", "flags.4?long"], + ["migrated_from_max_id", "number", "flags.4?int"], + ["pinned_msg_id", "number", "flags.5?int"], + ["stickerset", "StickerSet", "flags.8?StickerSet"], + ["available_min_id", "number", "flags.9?int"], + ["folder_id", "number", "flags.11?int"], + ["linked_chat_id", "bigint", "flags.14?long"], + ["location", "ChannelLocation", "flags.15?ChannelLocation"], + ["slowmode_seconds", "number", "flags.17?int"], + ["slowmode_next_send_date", "number", "flags.18?int"], + ["stats_dc", "number", "flags.12?int"], + ["pts", "number", "int"], + ["call", "InputGroupCall", "flags.21?InputGroupCall"], + ["ttl_period", "number", "flags.24?int"], + ["pending_suggestions", ["string"], "flags.25?Vector"], + ["groupcall_default_join_as", "Peer", "flags.26?Peer"], + ["theme_emoticon", "string", "flags.27?string"], + ["requests_pending", "number", "flags.28?int"], + ["recent_requesters", ["bigint"], "flags.28?Vector"], + ["default_send_as", "Peer", "flags.29?Peer"], + ["available_reactions", "ChatReactions", "flags.30?ChatReactions"], + ["stories", "PeerStories", "flags2.4?PeerStories"], + ["wallpaper", "WallPaper", "flags2.7?WallPaper"], + ["boosts_applied", "number", "flags2.8?int"], + ["boosts_unrestrict", "number", "flags2.9?int"], + ["emojiset", "StickerSet", "flags2.10?StickerSet"], + ], + ], + ], + [ + "chatParticipant", + [ + 0xC02D4007, + [ + ["user_id", "bigint", "long"], + ["inviter_id", "bigint", "long"], + ["date", "number", "int"], + ], + ], + ], + [ + "chatParticipantCreator", + [ + 0xE46BCEE4, + [ + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "chatParticipantAdmin", + [ + 0xA0933F5B, + [ + ["user_id", "bigint", "long"], + ["inviter_id", "bigint", "long"], + ["date", "number", "int"], + ], + ], + ], + [ + "chatParticipantsForbidden", + [ + 0x8763D3E1, + [ + ["flags", flags, "#"], + ["chat_id", "bigint", "long"], + ["self_participant", "ChatParticipant", "flags.0?ChatParticipant"], + ], + ], + ], + [ + "chatParticipants", + [ + 0x3CBC93F8, + [ + ["chat_id", "bigint", "long"], + ["participants", ["ChatParticipant"], "Vector"], + ["version", "number", "int"], + ], + ], + ], + [ + "chatPhotoEmpty", + [ + 0x37C1011C, + [], + ], + ], + [ + "chatPhoto", + [ + 0x1C6E1C11, + [ + ["flags", flags, "#"], + ["has_video", "true", "flags.0?true"], + ["photo_id", "bigint", "long"], + ["stripped_thumb", Uint8Array, "flags.1?bytes"], + ["dc_id", "number", "int"], + ], + ], + ], + [ + "messageEmpty", + [ + 0x90A6CA84, + [ + ["flags", flags, "#"], + ["id", "number", "int"], + ["peer_id", "Peer", "flags.0?Peer"], + ], + ], + ], + [ + "message", + [ + 0x2357BF25, + [ + ["flags", flags, "#"], + ["out", "true", "flags.1?true"], + ["mentioned", "true", "flags.4?true"], + ["media_unread", "true", "flags.5?true"], + ["silent", "true", "flags.13?true"], + ["post", "true", "flags.14?true"], + ["from_scheduled", "true", "flags.18?true"], + ["legacy", "true", "flags.19?true"], + ["edit_hide", "true", "flags.21?true"], + ["pinned", "true", "flags.24?true"], + ["noforwards", "true", "flags.26?true"], + ["invert_media", "true", "flags.27?true"], + ["flags2", flags, "#"], + ["offline", "true", "flags2.1?true"], + ["id", "number", "int"], + ["from_id", "Peer", "flags.8?Peer"], + ["from_boosts_applied", "number", "flags.29?int"], + ["peer_id", "Peer", "Peer"], + ["saved_peer_id", "Peer", "flags.28?Peer"], + ["fwd_from", "MessageFwdHeader", "flags.2?MessageFwdHeader"], + ["via_bot_id", "bigint", "flags.11?long"], + ["via_business_bot_id", "bigint", "flags2.0?long"], + ["reply_to", "MessageReplyHeader", "flags.3?MessageReplyHeader"], + ["date", "number", "int"], + ["message", "string", "string"], + ["media", "MessageMedia", "flags.9?MessageMedia"], + ["reply_markup", "ReplyMarkup", "flags.6?ReplyMarkup"], + ["entities", ["MessageEntity"], "flags.7?Vector"], + ["views", "number", "flags.10?int"], + ["forwards", "number", "flags.10?int"], + ["replies", "MessageReplies", "flags.23?MessageReplies"], + ["edit_date", "number", "flags.15?int"], + ["post_author", "string", "flags.16?string"], + ["grouped_id", "bigint", "flags.17?long"], + ["reactions", "MessageReactions", "flags.20?MessageReactions"], + ["restriction_reason", ["RestrictionReason"], "flags.22?Vector"], + ["ttl_period", "number", "flags.25?int"], + ["quick_reply_shortcut_id", "number", "flags.30?int"], + ], + ], + ], + [ + "messageService", + [ + 0x2B085862, + [ + ["flags", flags, "#"], + ["out", "true", "flags.1?true"], + ["mentioned", "true", "flags.4?true"], + ["media_unread", "true", "flags.5?true"], + ["silent", "true", "flags.13?true"], + ["post", "true", "flags.14?true"], + ["legacy", "true", "flags.19?true"], + ["id", "number", "int"], + ["from_id", "Peer", "flags.8?Peer"], + ["peer_id", "Peer", "Peer"], + ["reply_to", "MessageReplyHeader", "flags.3?MessageReplyHeader"], + ["date", "number", "int"], + ["action", "MessageAction", "MessageAction"], + ["ttl_period", "number", "flags.25?int"], + ], + ], + ], + [ + "messageMediaEmpty", + [ + 0x3DED6320, + [], + ], + ], + [ + "messageMediaPhoto", + [ + 0x695150D7, + [ + ["flags", flags, "#"], + ["spoiler", "true", "flags.3?true"], + ["photo", "Photo", "flags.0?Photo"], + ["ttl_seconds", "number", "flags.2?int"], + ], + ], + ], + [ + "messageMediaGeo", + [ + 0x56E0D474, + [ + ["geo", "GeoPoint", "GeoPoint"], + ], + ], + ], + [ + "messageMediaContact", + [ + 0x70322949, + [ + ["phone_number", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["vcard", "string", "string"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "messageMediaUnsupported", + [ + 0x9F84F49E, + [], + ], + ], + [ + "messageMediaDocument", + [ + 0x4CF4D72D, + [ + ["flags", flags, "#"], + ["nopremium", "true", "flags.3?true"], + ["spoiler", "true", "flags.4?true"], + ["video", "true", "flags.6?true"], + ["round", "true", "flags.7?true"], + ["voice", "true", "flags.8?true"], + ["document", "Document", "flags.0?Document"], + ["alt_document", "Document", "flags.5?Document"], + ["ttl_seconds", "number", "flags.2?int"], + ], + ], + ], + [ + "messageMediaWebPage", + [ + 0xDDF10C3B, + [ + ["flags", flags, "#"], + ["force_large_media", "true", "flags.0?true"], + ["force_small_media", "true", "flags.1?true"], + ["manual", "true", "flags.3?true"], + ["safe", "true", "flags.4?true"], + ["webpage", "WebPage", "WebPage"], + ], + ], + ], + [ + "messageMediaVenue", + [ + 0x2EC0533F, + [ + ["geo", "GeoPoint", "GeoPoint"], + ["title", "string", "string"], + ["address", "string", "string"], + ["provider", "string", "string"], + ["venue_id", "string", "string"], + ["venue_type", "string", "string"], + ], + ], + ], + [ + "messageMediaGame", + [ + 0xFDB19008, + [ + ["game", "Game", "Game"], + ], + ], + ], + [ + "messageMediaInvoice", + [ + 0xF6A548D3, + [ + ["flags", flags, "#"], + ["shipping_address_requested", "true", "flags.1?true"], + ["test", "true", "flags.3?true"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "WebDocument", "flags.0?WebDocument"], + ["receipt_msg_id", "number", "flags.2?int"], + ["currency", "string", "string"], + ["total_amount", "bigint", "long"], + ["start_param", "string", "string"], + ["extended_media", "MessageExtendedMedia", "flags.4?MessageExtendedMedia"], + ], + ], + ], + [ + "messageMediaGeoLive", + [ + 0xB940C666, + [ + ["flags", flags, "#"], + ["geo", "GeoPoint", "GeoPoint"], + ["heading", "number", "flags.0?int"], + ["period", "number", "int"], + ["proximity_notification_radius", "number", "flags.1?int"], + ], + ], + ], + [ + "messageMediaPoll", + [ + 0x4BD6E798, + [ + ["poll", "Poll", "Poll"], + ["results", "PollResults", "PollResults"], + ], + ], + ], + [ + "messageMediaDice", + [ + 0x3F7EE58B, + [ + ["value", "number", "int"], + ["emoticon", "string", "string"], + ], + ], + ], + [ + "messageMediaStory", + [ + 0x68CB6283, + [ + ["flags", flags, "#"], + ["via_mention", "true", "flags.1?true"], + ["peer", "Peer", "Peer"], + ["id", "number", "int"], + ["story", "StoryItem", "flags.0?StoryItem"], + ], + ], + ], + [ + "messageMediaGiveaway", + [ + 0xDAAD85B0, + [ + ["flags", flags, "#"], + ["only_new_subscribers", "true", "flags.0?true"], + ["winners_are_visible", "true", "flags.2?true"], + ["channels", ["bigint"], "Vector"], + ["countries_iso2", ["string"], "flags.1?Vector"], + ["prize_description", "string", "flags.3?string"], + ["quantity", "number", "int"], + ["months", "number", "int"], + ["until_date", "number", "int"], + ], + ], + ], + [ + "messageMediaGiveawayResults", + [ + 0xC6991068, + [ + ["flags", flags, "#"], + ["only_new_subscribers", "true", "flags.0?true"], + ["refunded", "true", "flags.2?true"], + ["channel_id", "bigint", "long"], + ["additional_peers_count", "number", "flags.3?int"], + ["launch_msg_id", "number", "int"], + ["winners_count", "number", "int"], + ["unclaimed_count", "number", "int"], + ["winners", ["bigint"], "Vector"], + ["months", "number", "int"], + ["prize_description", "string", "flags.1?string"], + ["until_date", "number", "int"], + ], + ], + ], + [ + "messageActionEmpty", + [ + 0xB6AEF7B0, + [], + ], + ], + [ + "messageActionChatCreate", + [ + 0xBD47CBAD, + [ + ["title", "string", "string"], + ["users", ["bigint"], "Vector"], + ], + ], + ], + [ + "messageActionChatEditTitle", + [ + 0xB5A1CE5A, + [ + ["title", "string", "string"], + ], + ], + ], + [ + "messageActionChatEditPhoto", + [ + 0x7FCB13A8, + [ + ["photo", "Photo", "Photo"], + ], + ], + ], + [ + "messageActionChatDeletePhoto", + [ + 0x95E3FBEF, + [], + ], + ], + [ + "messageActionChatAddUser", + [ + 0x15CEFD00, + [ + ["users", ["bigint"], "Vector"], + ], + ], + ], + [ + "messageActionChatDeleteUser", + [ + 0xA43F30CC, + [ + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "messageActionChatJoinedByLink", + [ + 0x031224C3, + [ + ["inviter_id", "bigint", "long"], + ], + ], + ], + [ + "messageActionChannelCreate", + [ + 0x95D2AC92, + [ + ["title", "string", "string"], + ], + ], + ], + [ + "messageActionChatMigrateTo", + [ + 0xE1037F92, + [ + ["channel_id", "bigint", "long"], + ], + ], + ], + [ + "messageActionChannelMigrateFrom", + [ + 0xEA3948E9, + [ + ["title", "string", "string"], + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "messageActionPinMessage", + [ + 0x94BD38ED, + [], + ], + ], + [ + "messageActionHistoryClear", + [ + 0x9FBAB604, + [], + ], + ], + [ + "messageActionGameScore", + [ + 0x92A72876, + [ + ["game_id", "bigint", "long"], + ["score", "number", "int"], + ], + ], + ], + [ + "messageActionPaymentSentMe", + [ + 0x8F31B327, + [ + ["flags", flags, "#"], + ["recurring_init", "true", "flags.2?true"], + ["recurring_used", "true", "flags.3?true"], + ["currency", "string", "string"], + ["total_amount", "bigint", "long"], + ["payload", Uint8Array, "bytes"], + ["info", "PaymentRequestedInfo", "flags.0?PaymentRequestedInfo"], + ["shipping_option_id", "string", "flags.1?string"], + ["charge", "PaymentCharge", "PaymentCharge"], + ], + ], + ], + [ + "messageActionPaymentSent", + [ + 0x96163F56, + [ + ["flags", flags, "#"], + ["recurring_init", "true", "flags.2?true"], + ["recurring_used", "true", "flags.3?true"], + ["currency", "string", "string"], + ["total_amount", "bigint", "long"], + ["invoice_slug", "string", "flags.0?string"], + ], + ], + ], + [ + "messageActionPhoneCall", + [ + 0x80E11A7F, + [ + ["flags", flags, "#"], + ["video", "true", "flags.2?true"], + ["call_id", "bigint", "long"], + ["reason", "PhoneCallDiscardReason", "flags.0?PhoneCallDiscardReason"], + ["duration", "number", "flags.1?int"], + ], + ], + ], + [ + "messageActionScreenshotTaken", + [ + 0x4792929B, + [], + ], + ], + [ + "messageActionCustomAction", + [ + 0xFAE69F56, + [ + ["message", "string", "string"], + ], + ], + ], + [ + "messageActionBotAllowed", + [ + 0xC516D679, + [ + ["flags", flags, "#"], + ["attach_menu", "true", "flags.1?true"], + ["from_request", "true", "flags.3?true"], + ["domain", "string", "flags.0?string"], + ["app", "BotApp", "flags.2?BotApp"], + ], + ], + ], + [ + "messageActionSecureValuesSentMe", + [ + 0x1B287353, + [ + ["values", ["SecureValue"], "Vector"], + ["credentials", "SecureCredentialsEncrypted", "SecureCredentialsEncrypted"], + ], + ], + ], + [ + "messageActionSecureValuesSent", + [ + 0xD95C6154, + [ + ["types", ["SecureValueType"], "Vector"], + ], + ], + ], + [ + "messageActionContactSignUp", + [ + 0xF3F25F76, + [], + ], + ], + [ + "messageActionGeoProximityReached", + [ + 0x98E0D697, + [ + ["from_id", "Peer", "Peer"], + ["to_id", "Peer", "Peer"], + ["distance", "number", "int"], + ], + ], + ], + [ + "messageActionGroupCall", + [ + 0x7A0D7F42, + [ + ["flags", flags, "#"], + ["call", "InputGroupCall", "InputGroupCall"], + ["duration", "number", "flags.0?int"], + ], + ], + ], + [ + "messageActionInviteToGroupCall", + [ + 0x502F92F7, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["users", ["bigint"], "Vector"], + ], + ], + ], + [ + "messageActionSetMessagesTTL", + [ + 0x3C134D7B, + [ + ["flags", flags, "#"], + ["period", "number", "int"], + ["auto_setting_from", "bigint", "flags.0?long"], + ], + ], + ], + [ + "messageActionGroupCallScheduled", + [ + 0xB3A07661, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["schedule_date", "number", "int"], + ], + ], + ], + [ + "messageActionSetChatTheme", + [ + 0xAA786345, + [ + ["emoticon", "string", "string"], + ], + ], + ], + [ + "messageActionChatJoinedByRequest", + [ + 0xEBBCA3CB, + [], + ], + ], + [ + "messageActionWebViewDataSentMe", + [ + 0x47DD8079, + [ + ["text", "string", "string"], + ["data", "string", "string"], + ], + ], + ], + [ + "messageActionWebViewDataSent", + [ + 0xB4C38CB5, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "messageActionGiftPremium", + [ + 0xC83D6AEC, + [ + ["flags", flags, "#"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ["months", "number", "int"], + ["crypto_currency", "string", "flags.0?string"], + ["crypto_amount", "bigint", "flags.0?long"], + ], + ], + ], + [ + "messageActionTopicCreate", + [ + 0x0D999256, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["icon_color", "number", "int"], + ["icon_emoji_id", "bigint", "flags.0?long"], + ], + ], + ], + [ + "messageActionTopicEdit", + [ + 0xC0944820, + [ + ["flags", flags, "#"], + ["title", "string", "flags.0?string"], + ["icon_emoji_id", "bigint", "flags.1?long"], + ["closed", "boolean", "flags.2?Bool"], + ["hidden", "boolean", "flags.3?Bool"], + ], + ], + ], + [ + "messageActionSuggestProfilePhoto", + [ + 0x57DE635E, + [ + ["photo", "Photo", "Photo"], + ], + ], + ], + [ + "messageActionRequestedPeer", + [ + 0x31518E9B, + [ + ["button_id", "number", "int"], + ["peers", ["Peer"], "Vector"], + ], + ], + ], + [ + "messageActionSetChatWallPaper", + [ + 0x5060A3F4, + [ + ["flags", flags, "#"], + ["same", "true", "flags.0?true"], + ["for_both", "true", "flags.1?true"], + ["wallpaper", "WallPaper", "WallPaper"], + ], + ], + ], + [ + "messageActionGiftCode", + [ + 0x678C2E09, + [ + ["flags", flags, "#"], + ["via_giveaway", "true", "flags.0?true"], + ["unclaimed", "true", "flags.2?true"], + ["boost_peer", "Peer", "flags.1?Peer"], + ["months", "number", "int"], + ["slug", "string", "string"], + ["currency", "string", "flags.2?string"], + ["amount", "bigint", "flags.2?long"], + ["crypto_currency", "string", "flags.3?string"], + ["crypto_amount", "bigint", "flags.3?long"], + ], + ], + ], + [ + "messageActionGiveawayLaunch", + [ + 0x332BA9ED, + [], + ], + ], + [ + "messageActionGiveawayResults", + [ + 0x2A9FADC5, + [ + ["winners_count", "number", "int"], + ["unclaimed_count", "number", "int"], + ], + ], + ], + [ + "messageActionBoostApply", + [ + 0xCC02AA6D, + [ + ["boosts", "number", "int"], + ], + ], + ], + [ + "messageActionRequestedPeerSentMe", + [ + 0x93B31848, + [ + ["button_id", "number", "int"], + ["peers", ["RequestedPeer"], "Vector"], + ], + ], + ], + [ + "dialog", + [ + 0xD58A08C6, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.2?true"], + ["unread_mark", "true", "flags.3?true"], + ["view_forum_as_messages", "true", "flags.6?true"], + ["peer", "Peer", "Peer"], + ["top_message", "number", "int"], + ["read_inbox_max_id", "number", "int"], + ["read_outbox_max_id", "number", "int"], + ["unread_count", "number", "int"], + ["unread_mentions_count", "number", "int"], + ["unread_reactions_count", "number", "int"], + ["notify_settings", "PeerNotifySettings", "PeerNotifySettings"], + ["pts", "number", "flags.0?int"], + ["draft", "DraftMessage", "flags.1?DraftMessage"], + ["folder_id", "number", "flags.4?int"], + ["ttl_period", "number", "flags.5?int"], + ], + ], + ], + [ + "dialogFolder", + [ + 0x71BD134C, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.2?true"], + ["folder", "Folder", "Folder"], + ["peer", "Peer", "Peer"], + ["top_message", "number", "int"], + ["unread_muted_peers_count", "number", "int"], + ["unread_unmuted_peers_count", "number", "int"], + ["unread_muted_messages_count", "number", "int"], + ["unread_unmuted_messages_count", "number", "int"], + ], + ], + ], + [ + "photoEmpty", + [ + 0x2331B22D, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "photo", + [ + 0xFB197A65, + [ + ["flags", flags, "#"], + ["has_stickers", "true", "flags.0?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ["date", "number", "int"], + ["sizes", ["PhotoSize"], "Vector"], + ["video_sizes", ["VideoSize"], "flags.1?Vector"], + ["dc_id", "number", "int"], + ], + ], + ], + [ + "photoSizeEmpty", + [ + 0x0E17E23C, + [ + ["type", "string", "string"], + ], + ], + ], + [ + "photoSize", + [ + 0x75C78E60, + [ + ["type", "string", "string"], + ["w", "number", "int"], + ["h", "number", "int"], + ["size", "number", "int"], + ], + ], + ], + [ + "photoCachedSize", + [ + 0x021E1AD6, + [ + ["type", "string", "string"], + ["w", "number", "int"], + ["h", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "photoStrippedSize", + [ + 0xE0B0BC2E, + [ + ["type", "string", "string"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "photoSizeProgressive", + [ + 0xFA3EFB95, + [ + ["type", "string", "string"], + ["w", "number", "int"], + ["h", "number", "int"], + ["sizes", ["number"], "Vector"], + ], + ], + ], + [ + "photoPathSize", + [ + 0xD8214D41, + [ + ["type", "string", "string"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "geoPointEmpty", + [ + 0x1117DD5F, + [], + ], + ], + [ + "geoPoint", + [ + 0xB2A2F663, + [ + ["flags", flags, "#"], + ["long", "number", "double"], + ["lat", "number", "double"], + ["access_hash", "bigint", "long"], + ["accuracy_radius", "number", "flags.0?int"], + ], + ], + ], + [ + "auth.sentCode", + [ + 0x5E002502, + [ + ["flags", flags, "#"], + ["type", "auth_SentCodeType", "auth.SentCodeType"], + ["phone_code_hash", "string", "string"], + ["next_type", "auth_CodeType", "flags.1?auth.CodeType"], + ["timeout", "number", "flags.2?int"], + ], + ], + ], + [ + "auth.sentCodeSuccess", + [ + 0x2390FE44, + [ + ["authorization", "auth_Authorization", "auth.Authorization"], + ], + ], + ], + [ + "auth.authorization", + [ + 0x2EA2C0D4, + [ + ["flags", flags, "#"], + ["setup_password_required", "true", "flags.1?true"], + ["otherwise_relogin_days", "number", "flags.1?int"], + ["tmp_sessions", "number", "flags.0?int"], + ["future_auth_token", Uint8Array, "flags.2?bytes"], + ["user", "User", "User"], + ], + ], + ], + [ + "auth.authorizationSignUpRequired", + [ + 0x44747E9A, + [ + ["flags", flags, "#"], + ["terms_of_service", "help_TermsOfService", "flags.0?help.TermsOfService"], + ], + ], + ], + [ + "auth.exportedAuthorization", + [ + 0xB434E2B8, + [ + ["id", "bigint", "long"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputNotifyPeer", + [ + 0xB8BC5B0C, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "inputNotifyUsers", + [ + 0x193B4417, + [], + ], + ], + [ + "inputNotifyChats", + [ + 0x4A95E84E, + [], + ], + ], + [ + "inputNotifyBroadcasts", + [ + 0xB1DB7C7E, + [], + ], + ], + [ + "inputNotifyForumTopic", + [ + 0x5C467992, + [ + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "int"], + ], + ], + ], + [ + "inputPeerNotifySettings", + [ + 0xCACB6AE2, + [ + ["flags", flags, "#"], + ["show_previews", "boolean", "flags.0?Bool"], + ["silent", "boolean", "flags.1?Bool"], + ["mute_until", "number", "flags.2?int"], + ["sound", "NotificationSound", "flags.3?NotificationSound"], + ["stories_muted", "boolean", "flags.6?Bool"], + ["stories_hide_sender", "boolean", "flags.7?Bool"], + ["stories_sound", "NotificationSound", "flags.8?NotificationSound"], + ], + ], + ], + [ + "peerNotifySettings", + [ + 0x99622C0C, + [ + ["flags", flags, "#"], + ["show_previews", "boolean", "flags.0?Bool"], + ["silent", "boolean", "flags.1?Bool"], + ["mute_until", "number", "flags.2?int"], + ["ios_sound", "NotificationSound", "flags.3?NotificationSound"], + ["android_sound", "NotificationSound", "flags.4?NotificationSound"], + ["other_sound", "NotificationSound", "flags.5?NotificationSound"], + ["stories_muted", "boolean", "flags.6?Bool"], + ["stories_hide_sender", "boolean", "flags.7?Bool"], + ["stories_ios_sound", "NotificationSound", "flags.8?NotificationSound"], + ["stories_android_sound", "NotificationSound", "flags.9?NotificationSound"], + ["stories_other_sound", "NotificationSound", "flags.10?NotificationSound"], + ], + ], + ], + [ + "peerSettings", + [ + 0xACD66C5E, + [ + ["flags", flags, "#"], + ["report_spam", "true", "flags.0?true"], + ["add_contact", "true", "flags.1?true"], + ["block_contact", "true", "flags.2?true"], + ["share_contact", "true", "flags.3?true"], + ["need_contacts_exception", "true", "flags.4?true"], + ["report_geo", "true", "flags.5?true"], + ["autoarchived", "true", "flags.7?true"], + ["invite_members", "true", "flags.8?true"], + ["request_chat_broadcast", "true", "flags.10?true"], + ["business_bot_paused", "true", "flags.11?true"], + ["business_bot_can_reply", "true", "flags.12?true"], + ["geo_distance", "number", "flags.6?int"], + ["request_chat_title", "string", "flags.9?string"], + ["request_chat_date", "number", "flags.9?int"], + ["business_bot_id", "bigint", "flags.13?long"], + ["business_bot_manage_url", "string", "flags.13?string"], + ], + ], + ], + [ + "wallPaper", + [ + 0xA437C3ED, + [ + ["id", "bigint", "long"], + ["flags", flags, "#"], + ["creator", "true", "flags.0?true"], + ["default", "true", "flags.1?true"], + ["pattern", "true", "flags.3?true"], + ["dark", "true", "flags.4?true"], + ["access_hash", "bigint", "long"], + ["slug", "string", "string"], + ["document", "Document", "Document"], + ["settings", "WallPaperSettings", "flags.2?WallPaperSettings"], + ], + ], + ], + [ + "wallPaperNoFile", + [ + 0xE0804116, + [ + ["id", "bigint", "long"], + ["flags", flags, "#"], + ["default", "true", "flags.1?true"], + ["dark", "true", "flags.4?true"], + ["settings", "WallPaperSettings", "flags.2?WallPaperSettings"], + ], + ], + ], + [ + "inputReportReasonSpam", + [ + 0x58DBCAB8, + [], + ], + ], + [ + "inputReportReasonViolence", + [ + 0x1E22C78D, + [], + ], + ], + [ + "inputReportReasonPornography", + [ + 0x2E59D922, + [], + ], + ], + [ + "inputReportReasonChildAbuse", + [ + 0xADF44EE3, + [], + ], + ], + [ + "inputReportReasonOther", + [ + 0xC1E4A2B1, + [], + ], + ], + [ + "inputReportReasonCopyright", + [ + 0x9B89F93A, + [], + ], + ], + [ + "inputReportReasonGeoIrrelevant", + [ + 0xDBD4FEED, + [], + ], + ], + [ + "inputReportReasonFake", + [ + 0xF5DDD6E7, + [], + ], + ], + [ + "inputReportReasonIllegalDrugs", + [ + 0x0A8EB2BE, + [], + ], + ], + [ + "inputReportReasonPersonalDetails", + [ + 0x9EC7863D, + [], + ], + ], + [ + "userFull", + [ + 0xCC997720, + [ + ["flags", flags, "#"], + ["blocked", "true", "flags.0?true"], + ["phone_calls_available", "true", "flags.4?true"], + ["phone_calls_private", "true", "flags.5?true"], + ["can_pin_message", "true", "flags.7?true"], + ["has_scheduled", "true", "flags.12?true"], + ["video_calls_available", "true", "flags.13?true"], + ["voice_messages_forbidden", "true", "flags.20?true"], + ["translations_disabled", "true", "flags.23?true"], + ["stories_pinned_available", "true", "flags.26?true"], + ["blocked_my_stories_from", "true", "flags.27?true"], + ["wallpaper_overridden", "true", "flags.28?true"], + ["contact_require_premium", "true", "flags.29?true"], + ["read_dates_private", "true", "flags.30?true"], + ["flags2", flags, "#"], + ["id", "bigint", "long"], + ["about", "string", "flags.1?string"], + ["settings", "PeerSettings", "PeerSettings"], + ["personal_photo", "Photo", "flags.21?Photo"], + ["profile_photo", "Photo", "flags.2?Photo"], + ["fallback_photo", "Photo", "flags.22?Photo"], + ["notify_settings", "PeerNotifySettings", "PeerNotifySettings"], + ["bot_info", "BotInfo", "flags.3?BotInfo"], + ["pinned_msg_id", "number", "flags.6?int"], + ["common_chats_count", "number", "int"], + ["folder_id", "number", "flags.11?int"], + ["ttl_period", "number", "flags.14?int"], + ["theme_emoticon", "string", "flags.15?string"], + ["private_forward_name", "string", "flags.16?string"], + ["bot_group_admin_rights", "ChatAdminRights", "flags.17?ChatAdminRights"], + ["bot_broadcast_admin_rights", "ChatAdminRights", "flags.18?ChatAdminRights"], + ["premium_gifts", ["PremiumGiftOption"], "flags.19?Vector"], + ["wallpaper", "WallPaper", "flags.24?WallPaper"], + ["stories", "PeerStories", "flags.25?PeerStories"], + ["business_work_hours", "BusinessWorkHours", "flags2.0?BusinessWorkHours"], + ["business_location", "BusinessLocation", "flags2.1?BusinessLocation"], + ["business_greeting_message", "BusinessGreetingMessage", "flags2.2?BusinessGreetingMessage"], + ["business_away_message", "BusinessAwayMessage", "flags2.3?BusinessAwayMessage"], + ["business_intro", "BusinessIntro", "flags2.4?BusinessIntro"], + ["birthday", "Birthday", "flags2.5?Birthday"], + ["personal_channel_id", "bigint", "flags2.6?long"], + ["personal_channel_message", "number", "flags2.6?int"], + ], + ], + ], + [ + "contact", + [ + 0x145ADE0B, + [ + ["user_id", "bigint", "long"], + ["mutual", "boolean", "Bool"], + ], + ], + ], + [ + "importedContact", + [ + 0xC13E3C50, + [ + ["user_id", "bigint", "long"], + ["client_id", "bigint", "long"], + ], + ], + ], + [ + "contactStatus", + [ + 0x16D9703B, + [ + ["user_id", "bigint", "long"], + ["status", "UserStatus", "UserStatus"], + ], + ], + ], + [ + "contacts.contactsNotModified", + [ + 0xB74BA9D2, + [], + ], + ], + [ + "contacts.contacts", + [ + 0xEAE87E42, + [ + ["contacts", ["Contact"], "Vector"], + ["saved_count", "number", "int"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "contacts.importedContacts", + [ + 0x77D01C3B, + [ + ["imported", ["ImportedContact"], "Vector"], + ["popular_invites", ["PopularContact"], "Vector"], + ["retry_contacts", ["bigint"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "contacts.blocked", + [ + 0x0ADE1591, + [ + ["blocked", ["PeerBlocked"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "contacts.blockedSlice", + [ + 0xE1664194, + [ + ["count", "number", "int"], + ["blocked", ["PeerBlocked"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.dialogs", + [ + 0x15BA6C40, + [ + ["dialogs", ["Dialog"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.dialogsSlice", + [ + 0x71E094F3, + [ + ["count", "number", "int"], + ["dialogs", ["Dialog"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.dialogsNotModified", + [ + 0xF0E3E596, + [ + ["count", "number", "int"], + ], + ], + ], + [ + "messages.messages", + [ + 0x8C718E87, + [ + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.messagesSlice", + [ + 0x3A54685E, + [ + ["flags", flags, "#"], + ["inexact", "true", "flags.1?true"], + ["count", "number", "int"], + ["next_rate", "number", "flags.0?int"], + ["offset_id_offset", "number", "flags.2?int"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.channelMessages", + [ + 0xC776BA4E, + [ + ["flags", flags, "#"], + ["inexact", "true", "flags.1?true"], + ["pts", "number", "int"], + ["count", "number", "int"], + ["offset_id_offset", "number", "flags.2?int"], + ["messages", ["Message"], "Vector"], + ["topics", ["ForumTopic"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.messagesNotModified", + [ + 0x74535F21, + [ + ["count", "number", "int"], + ], + ], + ], + [ + "messages.chats", + [ + 0x64FF9FD5, + [ + ["chats", ["Chat"], "Vector"], + ], + ], + ], + [ + "messages.chatsSlice", + [ + 0x9CD81144, + [ + ["count", "number", "int"], + ["chats", ["Chat"], "Vector"], + ], + ], + ], + [ + "messages.chatFull", + [ + 0xE5D7D19C, + [ + ["full_chat", "ChatFull", "ChatFull"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.affectedHistory", + [ + 0xB45C69D1, + [ + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ["offset", "number", "int"], + ], + ], + ], + [ + "inputMessagesFilterEmpty", + [ + 0x57E2F66C, + [], + ], + ], + [ + "inputMessagesFilterPhotos", + [ + 0x9609A51C, + [], + ], + ], + [ + "inputMessagesFilterVideo", + [ + 0x9FC00E65, + [], + ], + ], + [ + "inputMessagesFilterPhotoVideo", + [ + 0x56E9F0E4, + [], + ], + ], + [ + "inputMessagesFilterDocument", + [ + 0x9EDDF188, + [], + ], + ], + [ + "inputMessagesFilterUrl", + [ + 0x7EF0DD87, + [], + ], + ], + [ + "inputMessagesFilterGif", + [ + 0xFFC86587, + [], + ], + ], + [ + "inputMessagesFilterVoice", + [ + 0x50F5C392, + [], + ], + ], + [ + "inputMessagesFilterMusic", + [ + 0x3751B49E, + [], + ], + ], + [ + "inputMessagesFilterChatPhotos", + [ + 0x3A20ECB8, + [], + ], + ], + [ + "inputMessagesFilterPhoneCalls", + [ + 0x80C99768, + [ + ["flags", flags, "#"], + ["missed", "true", "flags.0?true"], + ], + ], + ], + [ + "inputMessagesFilterRoundVoice", + [ + 0x7A7C17A4, + [], + ], + ], + [ + "inputMessagesFilterRoundVideo", + [ + 0xB549DA53, + [], + ], + ], + [ + "inputMessagesFilterMyMentions", + [ + 0xC1F8E69A, + [], + ], + ], + [ + "inputMessagesFilterGeo", + [ + 0xE7026D0D, + [], + ], + ], + [ + "inputMessagesFilterContacts", + [ + 0xE062DB83, + [], + ], + ], + [ + "inputMessagesFilterPinned", + [ + 0x1BB00451, + [], + ], + ], + [ + "updateNewMessage", + [ + 0x1F2B0AFD, + [ + ["message", "Message", "Message"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateMessageID", + [ + 0x4E90BFD6, + [ + ["id", "number", "int"], + ["random_id", "bigint", "long"], + ], + ], + ], + [ + "updateDeleteMessages", + [ + 0xA20DB0E5, + [ + ["messages", ["number"], "Vector"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateUserTyping", + [ + 0xC01E857F, + [ + ["user_id", "bigint", "long"], + ["action", "SendMessageAction", "SendMessageAction"], + ], + ], + ], + [ + "updateChatUserTyping", + [ + 0x83487AF0, + [ + ["chat_id", "bigint", "long"], + ["from_id", "Peer", "Peer"], + ["action", "SendMessageAction", "SendMessageAction"], + ], + ], + ], + [ + "updateChatParticipants", + [ + 0x07761198, + [ + ["participants", "ChatParticipants", "ChatParticipants"], + ], + ], + ], + [ + "updateUserStatus", + [ + 0xE5BDF8DE, + [ + ["user_id", "bigint", "long"], + ["status", "UserStatus", "UserStatus"], + ], + ], + ], + [ + "updateUserName", + [ + 0xA7848924, + [ + ["user_id", "bigint", "long"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["usernames", ["Username"], "Vector"], + ], + ], + ], + [ + "updateNewAuthorization", + [ + 0x8951ABEF, + [ + ["flags", flags, "#"], + ["unconfirmed", "true", "flags.0?true"], + ["hash", "bigint", "long"], + ["date", "number", "flags.0?int"], + ["device", "string", "flags.0?string"], + ["location", "string", "flags.0?string"], + ], + ], + ], + [ + "updateNewEncryptedMessage", + [ + 0x12BCBD9A, + [ + ["message", "EncryptedMessage", "EncryptedMessage"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateEncryptedChatTyping", + [ + 0x1710F156, + [ + ["chat_id", "number", "int"], + ], + ], + ], + [ + "updateEncryption", + [ + 0xB4A2E88D, + [ + ["chat", "EncryptedChat", "EncryptedChat"], + ["date", "number", "int"], + ], + ], + ], + [ + "updateEncryptedMessagesRead", + [ + 0x38FE25B7, + [ + ["chat_id", "number", "int"], + ["max_date", "number", "int"], + ["date", "number", "int"], + ], + ], + ], + [ + "updateChatParticipantAdd", + [ + 0x3DDA5451, + [ + ["chat_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["inviter_id", "bigint", "long"], + ["date", "number", "int"], + ["version", "number", "int"], + ], + ], + ], + [ + "updateChatParticipantDelete", + [ + 0xE32F3D77, + [ + ["chat_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["version", "number", "int"], + ], + ], + ], + [ + "updateDcOptions", + [ + 0x8E5E9873, + [ + ["dc_options", ["DcOption"], "Vector"], + ], + ], + ], + [ + "updateNotifySettings", + [ + 0xBEC268EF, + [ + ["peer", "NotifyPeer", "NotifyPeer"], + ["notify_settings", "PeerNotifySettings", "PeerNotifySettings"], + ], + ], + ], + [ + "updateServiceNotification", + [ + 0xEBE46819, + [ + ["flags", flags, "#"], + ["popup", "true", "flags.0?true"], + ["invert_media", "true", "flags.2?true"], + ["inbox_date", "number", "flags.1?int"], + ["type", "string", "string"], + ["message", "string", "string"], + ["media", "MessageMedia", "MessageMedia"], + ["entities", ["MessageEntity"], "Vector"], + ], + ], + ], + [ + "updatePrivacy", + [ + 0xEE3B272A, + [ + ["key", "PrivacyKey", "PrivacyKey"], + ["rules", ["PrivacyRule"], "Vector"], + ], + ], + ], + [ + "updateUserPhone", + [ + 0x05492A13, + [ + ["user_id", "bigint", "long"], + ["phone", "string", "string"], + ], + ], + ], + [ + "updateReadHistoryInbox", + [ + 0x9C974FDF, + [ + ["flags", flags, "#"], + ["folder_id", "number", "flags.0?int"], + ["peer", "Peer", "Peer"], + ["max_id", "number", "int"], + ["still_unread_count", "number", "int"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateReadHistoryOutbox", + [ + 0x2F2F21BF, + [ + ["peer", "Peer", "Peer"], + ["max_id", "number", "int"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateWebPage", + [ + 0x7F891213, + [ + ["webpage", "WebPage", "WebPage"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateReadMessagesContents", + [ + 0xF8227181, + [ + ["flags", flags, "#"], + ["messages", ["number"], "Vector"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ["date", "number", "flags.0?int"], + ], + ], + ], + [ + "updateChannelTooLong", + [ + 0x108D941F, + [ + ["flags", flags, "#"], + ["channel_id", "bigint", "long"], + ["pts", "number", "flags.0?int"], + ], + ], + ], + [ + "updateChannel", + [ + 0x635B4C09, + [ + ["channel_id", "bigint", "long"], + ], + ], + ], + [ + "updateNewChannelMessage", + [ + 0x62BA04D9, + [ + ["message", "Message", "Message"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateReadChannelInbox", + [ + 0x922E6E10, + [ + ["flags", flags, "#"], + ["folder_id", "number", "flags.0?int"], + ["channel_id", "bigint", "long"], + ["max_id", "number", "int"], + ["still_unread_count", "number", "int"], + ["pts", "number", "int"], + ], + ], + ], + [ + "updateDeleteChannelMessages", + [ + 0xC32D5B12, + [ + ["channel_id", "bigint", "long"], + ["messages", ["number"], "Vector"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateChannelMessageViews", + [ + 0xF226AC08, + [ + ["channel_id", "bigint", "long"], + ["id", "number", "int"], + ["views", "number", "int"], + ], + ], + ], + [ + "updateChatParticipantAdmin", + [ + 0xD7CA61A2, + [ + ["chat_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["is_admin", "boolean", "Bool"], + ["version", "number", "int"], + ], + ], + ], + [ + "updateNewStickerSet", + [ + 0x688A30AA, + [ + ["stickerset", "messages_StickerSet", "messages.StickerSet"], + ], + ], + ], + [ + "updateStickerSetsOrder", + [ + 0x0BB2D201, + [ + ["flags", flags, "#"], + ["masks", "true", "flags.0?true"], + ["emojis", "true", "flags.1?true"], + ["order", ["bigint"], "Vector"], + ], + ], + ], + [ + "updateStickerSets", + [ + 0x31C24808, + [ + ["flags", flags, "#"], + ["masks", "true", "flags.0?true"], + ["emojis", "true", "flags.1?true"], + ], + ], + ], + [ + "updateSavedGifs", + [ + 0x9375341E, + [], + ], + ], + [ + "updateBotInlineQuery", + [ + 0x496F379C, + [ + ["flags", flags, "#"], + ["query_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["query", "string", "string"], + ["geo", "GeoPoint", "flags.0?GeoPoint"], + ["peer_type", "InlineQueryPeerType", "flags.1?InlineQueryPeerType"], + ["offset", "string", "string"], + ], + ], + ], + [ + "updateBotInlineSend", + [ + 0x12F12A07, + [ + ["flags", flags, "#"], + ["user_id", "bigint", "long"], + ["query", "string", "string"], + ["geo", "GeoPoint", "flags.0?GeoPoint"], + ["id", "string", "string"], + ["msg_id", "InputBotInlineMessageID", "flags.1?InputBotInlineMessageID"], + ], + ], + ], + [ + "updateEditChannelMessage", + [ + 0x1B3F4DF7, + [ + ["message", "Message", "Message"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateBotCallbackQuery", + [ + 0xB9CFC48D, + [ + ["flags", flags, "#"], + ["query_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ["chat_instance", "bigint", "long"], + ["data", Uint8Array, "flags.0?bytes"], + ["game_short_name", "string", "flags.1?string"], + ], + ], + ], + [ + "updateEditMessage", + [ + 0xE40370A3, + [ + ["message", "Message", "Message"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateInlineBotCallbackQuery", + [ + 0x691E9052, + [ + ["flags", flags, "#"], + ["query_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["msg_id", "InputBotInlineMessageID", "InputBotInlineMessageID"], + ["chat_instance", "bigint", "long"], + ["data", Uint8Array, "flags.0?bytes"], + ["game_short_name", "string", "flags.1?string"], + ], + ], + ], + [ + "updateReadChannelOutbox", + [ + 0xB75F99A9, + [ + ["channel_id", "bigint", "long"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "updateDraftMessage", + [ + 0x1B49EC6D, + [ + ["flags", flags, "#"], + ["peer", "Peer", "Peer"], + ["top_msg_id", "number", "flags.0?int"], + ["draft", "DraftMessage", "DraftMessage"], + ], + ], + ], + [ + "updateReadFeaturedStickers", + [ + 0x571D2742, + [], + ], + ], + [ + "updateRecentStickers", + [ + 0x9A422C20, + [], + ], + ], + [ + "updateConfig", + [ + 0xA229DD06, + [], + ], + ], + [ + "updatePtsChanged", + [ + 0x3354678F, + [], + ], + ], + [ + "updateChannelWebPage", + [ + 0x2F2BA99F, + [ + ["channel_id", "bigint", "long"], + ["webpage", "WebPage", "WebPage"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateDialogPinned", + [ + 0x6E6FE51C, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["folder_id", "number", "flags.1?int"], + ["peer", "DialogPeer", "DialogPeer"], + ], + ], + ], + [ + "updatePinnedDialogs", + [ + 0xFA0F3CA2, + [ + ["flags", flags, "#"], + ["folder_id", "number", "flags.1?int"], + ["order", ["DialogPeer"], "flags.0?Vector"], + ], + ], + ], + [ + "updateBotWebhookJSON", + [ + 0x8317C0C3, + [ + ["data", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "updateBotWebhookJSONQuery", + [ + 0x9B9240A6, + [ + ["query_id", "bigint", "long"], + ["data", "DataJSON", "DataJSON"], + ["timeout", "number", "int"], + ], + ], + ], + [ + "updateBotShippingQuery", + [ + 0xB5AEFD7D, + [ + ["query_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["payload", Uint8Array, "bytes"], + ["shipping_address", "PostAddress", "PostAddress"], + ], + ], + ], + [ + "updateBotPrecheckoutQuery", + [ + 0x8CAA9A96, + [ + ["flags", flags, "#"], + ["query_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["payload", Uint8Array, "bytes"], + ["info", "PaymentRequestedInfo", "flags.0?PaymentRequestedInfo"], + ["shipping_option_id", "string", "flags.1?string"], + ["currency", "string", "string"], + ["total_amount", "bigint", "long"], + ], + ], + ], + [ + "updatePhoneCall", + [ + 0xAB0F6B1E, + [ + ["phone_call", "PhoneCall", "PhoneCall"], + ], + ], + ], + [ + "updateLangPackTooLong", + [ + 0x46560264, + [ + ["lang_code", "string", "string"], + ], + ], + ], + [ + "updateLangPack", + [ + 0x56022F4D, + [ + ["difference", "LangPackDifference", "LangPackDifference"], + ], + ], + ], + [ + "updateFavedStickers", + [ + 0xE511996D, + [], + ], + ], + [ + "updateChannelReadMessagesContents", + [ + 0xEA29055D, + [ + ["flags", flags, "#"], + ["channel_id", "bigint", "long"], + ["top_msg_id", "number", "flags.0?int"], + ["messages", ["number"], "Vector"], + ], + ], + ], + [ + "updateContactsReset", + [ + 0x7084A7BE, + [], + ], + ], + [ + "updateChannelAvailableMessages", + [ + 0xB23FC698, + [ + ["channel_id", "bigint", "long"], + ["available_min_id", "number", "int"], + ], + ], + ], + [ + "updateDialogUnreadMark", + [ + 0xE16459C3, + [ + ["flags", flags, "#"], + ["unread", "true", "flags.0?true"], + ["peer", "DialogPeer", "DialogPeer"], + ], + ], + ], + [ + "updateMessagePoll", + [ + 0xACA1657B, + [ + ["flags", flags, "#"], + ["poll_id", "bigint", "long"], + ["poll", "Poll", "flags.0?Poll"], + ["results", "PollResults", "PollResults"], + ], + ], + ], + [ + "updateChatDefaultBannedRights", + [ + 0x54C01850, + [ + ["peer", "Peer", "Peer"], + ["default_banned_rights", "ChatBannedRights", "ChatBannedRights"], + ["version", "number", "int"], + ], + ], + ], + [ + "updateFolderPeers", + [ + 0x19360DC0, + [ + ["folder_peers", ["FolderPeer"], "Vector"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updatePeerSettings", + [ + 0x6A7E7366, + [ + ["peer", "Peer", "Peer"], + ["settings", "PeerSettings", "PeerSettings"], + ], + ], + ], + [ + "updatePeerLocated", + [ + 0xB4AFCFB0, + [ + ["peers", ["PeerLocated"], "Vector"], + ], + ], + ], + [ + "updateNewScheduledMessage", + [ + 0x39A51DFB, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "updateDeleteScheduledMessages", + [ + 0x90866CEE, + [ + ["peer", "Peer", "Peer"], + ["messages", ["number"], "Vector"], + ], + ], + ], + [ + "updateTheme", + [ + 0x8216FBA3, + [ + ["theme", "Theme", "Theme"], + ], + ], + ], + [ + "updateGeoLiveViewed", + [ + 0x871FB939, + [ + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "updateLoginToken", + [ + 0x564FE691, + [], + ], + ], + [ + "updateMessagePollVote", + [ + 0x24F40E77, + [ + ["poll_id", "bigint", "long"], + ["peer", "Peer", "Peer"], + ["options", [Uint8Array], "Vector"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateDialogFilter", + [ + 0x26FFDE7D, + [ + ["flags", flags, "#"], + ["id", "number", "int"], + ["filter", "DialogFilter", "flags.0?DialogFilter"], + ], + ], + ], + [ + "updateDialogFilterOrder", + [ + 0xA5D72105, + [ + ["order", ["number"], "Vector"], + ], + ], + ], + [ + "updateDialogFilters", + [ + 0x3504914F, + [], + ], + ], + [ + "updatePhoneCallSignalingData", + [ + 0x2661BF09, + [ + ["phone_call_id", "bigint", "long"], + ["data", Uint8Array, "bytes"], + ], + ], + ], + [ + "updateChannelMessageForwards", + [ + 0xD29A27F4, + [ + ["channel_id", "bigint", "long"], + ["id", "number", "int"], + ["forwards", "number", "int"], + ], + ], + ], + [ + "updateReadChannelDiscussionInbox", + [ + 0xD6B19546, + [ + ["flags", flags, "#"], + ["channel_id", "bigint", "long"], + ["top_msg_id", "number", "int"], + ["read_max_id", "number", "int"], + ["broadcast_id", "bigint", "flags.0?long"], + ["broadcast_post", "number", "flags.0?int"], + ], + ], + ], + [ + "updateReadChannelDiscussionOutbox", + [ + 0x695C9E7C, + [ + ["channel_id", "bigint", "long"], + ["top_msg_id", "number", "int"], + ["read_max_id", "number", "int"], + ], + ], + ], + [ + "updatePeerBlocked", + [ + 0xEBE07752, + [ + ["flags", flags, "#"], + ["blocked", "true", "flags.0?true"], + ["blocked_my_stories_from", "true", "flags.1?true"], + ["peer_id", "Peer", "Peer"], + ], + ], + ], + [ + "updateChannelUserTyping", + [ + 0x8C88C923, + [ + ["flags", flags, "#"], + ["channel_id", "bigint", "long"], + ["top_msg_id", "number", "flags.0?int"], + ["from_id", "Peer", "Peer"], + ["action", "SendMessageAction", "SendMessageAction"], + ], + ], + ], + [ + "updatePinnedMessages", + [ + 0xED85EAB5, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["peer", "Peer", "Peer"], + ["messages", ["number"], "Vector"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updatePinnedChannelMessages", + [ + 0x5BB98608, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["channel_id", "bigint", "long"], + ["messages", ["number"], "Vector"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "updateChat", + [ + 0xF89A6A4E, + [ + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "updateGroupCallParticipants", + [ + 0xF2EBDB4E, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["participants", ["GroupCallParticipant"], "Vector"], + ["version", "number", "int"], + ], + ], + ], + [ + "updateGroupCall", + [ + 0x14B24500, + [ + ["chat_id", "bigint", "long"], + ["call", "GroupCall", "GroupCall"], + ], + ], + ], + [ + "updatePeerHistoryTTL", + [ + 0xBB9BB9A5, + [ + ["flags", flags, "#"], + ["peer", "Peer", "Peer"], + ["ttl_period", "number", "flags.0?int"], + ], + ], + ], + [ + "updateChatParticipant", + [ + 0xD087663A, + [ + ["flags", flags, "#"], + ["chat_id", "bigint", "long"], + ["date", "number", "int"], + ["actor_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["prev_participant", "ChatParticipant", "flags.0?ChatParticipant"], + ["new_participant", "ChatParticipant", "flags.1?ChatParticipant"], + ["invite", "ExportedChatInvite", "flags.2?ExportedChatInvite"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateChannelParticipant", + [ + 0x985D3ABB, + [ + ["flags", flags, "#"], + ["via_chatlist", "true", "flags.3?true"], + ["channel_id", "bigint", "long"], + ["date", "number", "int"], + ["actor_id", "bigint", "long"], + ["user_id", "bigint", "long"], + ["prev_participant", "ChannelParticipant", "flags.0?ChannelParticipant"], + ["new_participant", "ChannelParticipant", "flags.1?ChannelParticipant"], + ["invite", "ExportedChatInvite", "flags.2?ExportedChatInvite"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateBotStopped", + [ + 0xC4870A49, + [ + ["user_id", "bigint", "long"], + ["date", "number", "int"], + ["stopped", "boolean", "Bool"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateGroupCallConnection", + [ + 0x0B783982, + [ + ["flags", flags, "#"], + ["presentation", "true", "flags.0?true"], + ["params", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "updateBotCommands", + [ + 0x4D712F2E, + [ + ["peer", "Peer", "Peer"], + ["bot_id", "bigint", "long"], + ["commands", ["BotCommand"], "Vector"], + ], + ], + ], + [ + "updatePendingJoinRequests", + [ + 0x7063C3DB, + [ + ["peer", "Peer", "Peer"], + ["requests_pending", "number", "int"], + ["recent_requesters", ["bigint"], "Vector"], + ], + ], + ], + [ + "updateBotChatInviteRequester", + [ + 0x11DFA986, + [ + ["peer", "Peer", "Peer"], + ["date", "number", "int"], + ["user_id", "bigint", "long"], + ["about", "string", "string"], + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateMessageReactions", + [ + 0x5E1B3CB8, + [ + ["flags", flags, "#"], + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ["top_msg_id", "number", "flags.0?int"], + ["reactions", "MessageReactions", "MessageReactions"], + ], + ], + ], + [ + "updateAttachMenuBots", + [ + 0x17B7A20B, + [], + ], + ], + [ + "updateWebViewResultSent", + [ + 0x1592B79D, + [ + ["query_id", "bigint", "long"], + ], + ], + ], + [ + "updateBotMenuButton", + [ + 0x14B85813, + [ + ["bot_id", "bigint", "long"], + ["button", "BotMenuButton", "BotMenuButton"], + ], + ], + ], + [ + "updateSavedRingtones", + [ + 0x74D8BE99, + [], + ], + ], + [ + "updateTranscribedAudio", + [ + 0x0084CD5A, + [ + ["flags", flags, "#"], + ["pending", "true", "flags.0?true"], + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ["transcription_id", "bigint", "long"], + ["text", "string", "string"], + ], + ], + ], + [ + "updateReadFeaturedEmojiStickers", + [ + 0xFB4C496C, + [], + ], + ], + [ + "updateUserEmojiStatus", + [ + 0x28373599, + [ + ["user_id", "bigint", "long"], + ["emoji_status", "EmojiStatus", "EmojiStatus"], + ], + ], + ], + [ + "updateRecentEmojiStatuses", + [ + 0x30F443DB, + [], + ], + ], + [ + "updateRecentReactions", + [ + 0x6F7863F4, + [], + ], + ], + [ + "updateMoveStickerSetToTop", + [ + 0x86FCCF85, + [ + ["flags", flags, "#"], + ["masks", "true", "flags.0?true"], + ["emojis", "true", "flags.1?true"], + ["stickerset", "bigint", "long"], + ], + ], + ], + [ + "updateMessageExtendedMedia", + [ + 0x5A73A98C, + [ + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ["extended_media", "MessageExtendedMedia", "MessageExtendedMedia"], + ], + ], + ], + [ + "updateChannelPinnedTopic", + [ + 0x192EFBE3, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["channel_id", "bigint", "long"], + ["topic_id", "number", "int"], + ], + ], + ], + [ + "updateChannelPinnedTopics", + [ + 0xFE198602, + [ + ["flags", flags, "#"], + ["channel_id", "bigint", "long"], + ["order", ["number"], "flags.0?Vector"], + ], + ], + ], + [ + "updateUser", + [ + 0x20529438, + [ + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "updateAutoSaveSettings", + [ + 0xEC05B097, + [], + ], + ], + [ + "updateStory", + [ + 0x75B3B798, + [ + ["peer", "Peer", "Peer"], + ["story", "StoryItem", "StoryItem"], + ], + ], + ], + [ + "updateReadStories", + [ + 0xF74E932B, + [ + ["peer", "Peer", "Peer"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "updateStoryID", + [ + 0x1BF335B9, + [ + ["id", "number", "int"], + ["random_id", "bigint", "long"], + ], + ], + ], + [ + "updateStoriesStealthMode", + [ + 0x2C084DC1, + [ + ["stealth_mode", "StoriesStealthMode", "StoriesStealthMode"], + ], + ], + ], + [ + "updateSentStoryReaction", + [ + 0x7D627683, + [ + ["peer", "Peer", "Peer"], + ["story_id", "number", "int"], + ["reaction", "Reaction", "Reaction"], + ], + ], + ], + [ + "updateBotChatBoost", + [ + 0x904DD49C, + [ + ["peer", "Peer", "Peer"], + ["boost", "Boost", "Boost"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateChannelViewForumAsMessages", + [ + 0x07B68920, + [ + ["channel_id", "bigint", "long"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "updatePeerWallpaper", + [ + 0xAE3F101D, + [ + ["flags", flags, "#"], + ["wallpaper_overridden", "true", "flags.1?true"], + ["peer", "Peer", "Peer"], + ["wallpaper", "WallPaper", "flags.0?WallPaper"], + ], + ], + ], + [ + "updateBotMessageReaction", + [ + 0xAC21D3CE, + [ + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ["date", "number", "int"], + ["actor", "Peer", "Peer"], + ["old_reactions", ["Reaction"], "Vector"], + ["new_reactions", ["Reaction"], "Vector"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateBotMessageReactions", + [ + 0x09CB7759, + [ + ["peer", "Peer", "Peer"], + ["msg_id", "number", "int"], + ["date", "number", "int"], + ["reactions", ["ReactionCount"], "Vector"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateSavedDialogPinned", + [ + 0xAEAF9E74, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["peer", "DialogPeer", "DialogPeer"], + ], + ], + ], + [ + "updatePinnedSavedDialogs", + [ + 0x686C85A6, + [ + ["flags", flags, "#"], + ["order", ["DialogPeer"], "flags.0?Vector"], + ], + ], + ], + [ + "updateSavedReactionTags", + [ + 0x39C67432, + [], + ], + ], + [ + "updateSmsJob", + [ + 0xF16269D4, + [ + ["job_id", "string", "string"], + ], + ], + ], + [ + "updateQuickReplies", + [ + 0xF9470AB2, + [ + ["quick_replies", ["QuickReply"], "Vector"], + ], + ], + ], + [ + "updateNewQuickReply", + [ + 0xF53DA717, + [ + ["quick_reply", "QuickReply", "QuickReply"], + ], + ], + ], + [ + "updateDeleteQuickReply", + [ + 0x53E6F1EC, + [ + ["shortcut_id", "number", "int"], + ], + ], + ], + [ + "updateQuickReplyMessage", + [ + 0x3E050D0F, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "updateDeleteQuickReplyMessages", + [ + 0x566FE7CD, + [ + ["shortcut_id", "number", "int"], + ["messages", ["number"], "Vector"], + ], + ], + ], + [ + "updateBotBusinessConnect", + [ + 0x8AE5C97A, + [ + ["connection", "BotBusinessConnection", "BotBusinessConnection"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateBotNewBusinessMessage", + [ + 0x9DDB347C, + [ + ["flags", flags, "#"], + ["connection_id", "string", "string"], + ["message", "Message", "Message"], + ["reply_to_message", "Message", "flags.0?Message"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateBotEditBusinessMessage", + [ + 0x07DF587C, + [ + ["flags", flags, "#"], + ["connection_id", "string", "string"], + ["message", "Message", "Message"], + ["reply_to_message", "Message", "flags.0?Message"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updateBotDeleteBusinessMessage", + [ + 0xA02A982E, + [ + ["connection_id", "string", "string"], + ["peer", "Peer", "Peer"], + ["messages", ["number"], "Vector"], + ["qts", "number", "int"], + ], + ], + ], + [ + "updates.state", + [ + 0xA56C2A3E, + [ + ["pts", "number", "int"], + ["qts", "number", "int"], + ["date", "number", "int"], + ["seq", "number", "int"], + ["unread_count", "number", "int"], + ], + ], + ], + [ + "updates.differenceEmpty", + [ + 0x5D75A138, + [ + ["date", "number", "int"], + ["seq", "number", "int"], + ], + ], + ], + [ + "updates.difference", + [ + 0x00F49CA0, + [ + ["new_messages", ["Message"], "Vector"], + ["new_encrypted_messages", ["EncryptedMessage"], "Vector"], + ["other_updates", ["Update"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["state", "updates_State", "updates.State"], + ], + ], + ], + [ + "updates.differenceSlice", + [ + 0xA8FB1981, + [ + ["new_messages", ["Message"], "Vector"], + ["new_encrypted_messages", ["EncryptedMessage"], "Vector"], + ["other_updates", ["Update"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["intermediate_state", "updates_State", "updates.State"], + ], + ], + ], + [ + "updates.differenceTooLong", + [ + 0x4AFE8F6D, + [ + ["pts", "number", "int"], + ], + ], + ], + [ + "updatesTooLong", + [ + 0xE317AF7E, + [], + ], + ], + [ + "updateShortMessage", + [ + 0x313BC7F8, + [ + ["flags", flags, "#"], + ["out", "true", "flags.1?true"], + ["mentioned", "true", "flags.4?true"], + ["media_unread", "true", "flags.5?true"], + ["silent", "true", "flags.13?true"], + ["id", "number", "int"], + ["user_id", "bigint", "long"], + ["message", "string", "string"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ["date", "number", "int"], + ["fwd_from", "MessageFwdHeader", "flags.2?MessageFwdHeader"], + ["via_bot_id", "bigint", "flags.11?long"], + ["reply_to", "MessageReplyHeader", "flags.3?MessageReplyHeader"], + ["entities", ["MessageEntity"], "flags.7?Vector"], + ["ttl_period", "number", "flags.25?int"], + ], + ], + ], + [ + "updateShortChatMessage", + [ + 0x4D6DEEA5, + [ + ["flags", flags, "#"], + ["out", "true", "flags.1?true"], + ["mentioned", "true", "flags.4?true"], + ["media_unread", "true", "flags.5?true"], + ["silent", "true", "flags.13?true"], + ["id", "number", "int"], + ["from_id", "bigint", "long"], + ["chat_id", "bigint", "long"], + ["message", "string", "string"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ["date", "number", "int"], + ["fwd_from", "MessageFwdHeader", "flags.2?MessageFwdHeader"], + ["via_bot_id", "bigint", "flags.11?long"], + ["reply_to", "MessageReplyHeader", "flags.3?MessageReplyHeader"], + ["entities", ["MessageEntity"], "flags.7?Vector"], + ["ttl_period", "number", "flags.25?int"], + ], + ], + ], + [ + "updateShort", + [ + 0x78D4DEC1, + [ + ["update", "Update", "Update"], + ["date", "number", "int"], + ], + ], + ], + [ + "updatesCombined", + [ + 0x725B04C3, + [ + ["updates", ["Update"], "Vector"], + ["users", ["User"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["date", "number", "int"], + ["seq_start", "number", "int"], + ["seq", "number", "int"], + ], + ], + ], + [ + "updates", + [ + 0x74AE4240, + [ + ["updates", ["Update"], "Vector"], + ["users", ["User"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["date", "number", "int"], + ["seq", "number", "int"], + ], + ], + ], + [ + "updateShortSentMessage", + [ + 0x9015E101, + [ + ["flags", flags, "#"], + ["out", "true", "flags.1?true"], + ["id", "number", "int"], + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ["date", "number", "int"], + ["media", "MessageMedia", "flags.9?MessageMedia"], + ["entities", ["MessageEntity"], "flags.7?Vector"], + ["ttl_period", "number", "flags.25?int"], + ], + ], + ], + [ + "photos.photos", + [ + 0x8DCA6AA5, + [ + ["photos", ["Photo"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "photos.photosSlice", + [ + 0x15051F54, + [ + ["count", "number", "int"], + ["photos", ["Photo"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "photos.photo", + [ + 0x20212CA8, + [ + ["photo", "Photo", "Photo"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "upload.file", + [ + 0x096A18D5, + [ + ["type", "storage_FileType", "storage.FileType"], + ["mtime", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "upload.fileCdnRedirect", + [ + 0xF18CDA44, + [ + ["dc_id", "number", "int"], + ["file_token", Uint8Array, "bytes"], + ["encryption_key", Uint8Array, "bytes"], + ["encryption_iv", Uint8Array, "bytes"], + ["file_hashes", ["FileHash"], "Vector"], + ], + ], + ], + [ + "dcOption", + [ + 0x18B7A10D, + [ + ["flags", flags, "#"], + ["ipv6", "true", "flags.0?true"], + ["media_only", "true", "flags.1?true"], + ["tcpo_only", "true", "flags.2?true"], + ["cdn", "true", "flags.3?true"], + ["static", "true", "flags.4?true"], + ["this_port_only", "true", "flags.5?true"], + ["id", "number", "int"], + ["ip_address", "string", "string"], + ["port", "number", "int"], + ["secret", Uint8Array, "flags.10?bytes"], + ], + ], + ], + [ + "config", + [ + 0xCC1A241E, + [ + ["flags", flags, "#"], + ["default_p2p_contacts", "true", "flags.3?true"], + ["preload_featured_stickers", "true", "flags.4?true"], + ["revoke_pm_inbox", "true", "flags.6?true"], + ["blocked_mode", "true", "flags.8?true"], + ["force_try_ipv6", "true", "flags.14?true"], + ["date", "number", "int"], + ["expires", "number", "int"], + ["test_mode", "boolean", "Bool"], + ["this_dc", "number", "int"], + ["dc_options", ["DcOption"], "Vector"], + ["dc_txt_domain_name", "string", "string"], + ["chat_size_max", "number", "int"], + ["megagroup_size_max", "number", "int"], + ["forwarded_count_max", "number", "int"], + ["online_update_period_ms", "number", "int"], + ["offline_blur_timeout_ms", "number", "int"], + ["offline_idle_timeout_ms", "number", "int"], + ["online_cloud_timeout_ms", "number", "int"], + ["notify_cloud_delay_ms", "number", "int"], + ["notify_default_delay_ms", "number", "int"], + ["push_chat_period_ms", "number", "int"], + ["push_chat_limit", "number", "int"], + ["edit_time_limit", "number", "int"], + ["revoke_time_limit", "number", "int"], + ["revoke_pm_time_limit", "number", "int"], + ["rating_e_decay", "number", "int"], + ["stickers_recent_limit", "number", "int"], + ["channels_read_media_period", "number", "int"], + ["tmp_sessions", "number", "flags.0?int"], + ["call_receive_timeout_ms", "number", "int"], + ["call_ring_timeout_ms", "number", "int"], + ["call_connect_timeout_ms", "number", "int"], + ["call_packet_timeout_ms", "number", "int"], + ["me_url_prefix", "string", "string"], + ["autoupdate_url_prefix", "string", "flags.7?string"], + ["gif_search_username", "string", "flags.9?string"], + ["venue_search_username", "string", "flags.10?string"], + ["img_search_username", "string", "flags.11?string"], + ["static_maps_provider", "string", "flags.12?string"], + ["caption_length_max", "number", "int"], + ["message_length_max", "number", "int"], + ["webfile_dc_id", "number", "int"], + ["suggested_lang_code", "string", "flags.2?string"], + ["lang_pack_version", "number", "flags.2?int"], + ["base_lang_pack_version", "number", "flags.2?int"], + ["reactions_default", "Reaction", "flags.15?Reaction"], + ["autologin_token", "string", "flags.16?string"], + ], + ], + ], + [ + "nearestDc", + [ + 0x8E1A1775, + [ + ["country", "string", "string"], + ["this_dc", "number", "int"], + ["nearest_dc", "number", "int"], + ], + ], + ], + [ + "help.appUpdate", + [ + 0xCCBBCE30, + [ + ["flags", flags, "#"], + ["can_not_skip", "true", "flags.0?true"], + ["id", "number", "int"], + ["version", "string", "string"], + ["text", "string", "string"], + ["entities", ["MessageEntity"], "Vector"], + ["document", "Document", "flags.1?Document"], + ["url", "string", "flags.2?string"], + ["sticker", "Document", "flags.3?Document"], + ], + ], + ], + [ + "help.noAppUpdate", + [ + 0xC45A6536, + [], + ], + ], + [ + "help.inviteText", + [ + 0x18CB9F78, + [ + ["message", "string", "string"], + ], + ], + ], + [ + "encryptedChatEmpty", + [ + 0xAB7EC0A0, + [ + ["id", "number", "int"], + ], + ], + ], + [ + "encryptedChatWaiting", + [ + 0x66B25953, + [ + ["id", "number", "int"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ], + ], + ], + [ + "encryptedChatRequested", + [ + 0x48F1D94C, + [ + ["flags", flags, "#"], + ["folder_id", "number", "flags.0?int"], + ["id", "number", "int"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ["g_a", Uint8Array, "bytes"], + ], + ], + ], + [ + "encryptedChat", + [ + 0x61F0D4C7, + [ + ["id", "number", "int"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ["g_a_or_b", Uint8Array, "bytes"], + ["key_fingerprint", "bigint", "long"], + ], + ], + ], + [ + "encryptedChatDiscarded", + [ + 0x1E1C7C45, + [ + ["flags", flags, "#"], + ["history_deleted", "true", "flags.0?true"], + ["id", "number", "int"], + ], + ], + ], + [ + "inputEncryptedChat", + [ + 0xF141B5E1, + [ + ["chat_id", "number", "int"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "encryptedFileEmpty", + [ + 0xC21F497E, + [], + ], + ], + [ + "encryptedFile", + [ + 0xA8008CD8, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["size", "bigint", "long"], + ["dc_id", "number", "int"], + ["key_fingerprint", "number", "int"], + ], + ], + ], + [ + "inputEncryptedFileEmpty", + [ + 0x1837C364, + [], + ], + ], + [ + "inputEncryptedFileUploaded", + [ + 0x64BD0306, + [ + ["id", "bigint", "long"], + ["parts", "number", "int"], + ["md5_checksum", "string", "string"], + ["key_fingerprint", "number", "int"], + ], + ], + ], + [ + "inputEncryptedFile", + [ + 0x5A17B5E5, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputEncryptedFileBigUploaded", + [ + 0x2DC173C8, + [ + ["id", "bigint", "long"], + ["parts", "number", "int"], + ["key_fingerprint", "number", "int"], + ], + ], + ], + [ + "encryptedMessage", + [ + 0xED18C118, + [ + ["random_id", "bigint", "long"], + ["chat_id", "number", "int"], + ["date", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ["file", "EncryptedFile", "EncryptedFile"], + ], + ], + ], + [ + "encryptedMessageService", + [ + 0x23734B06, + [ + ["random_id", "bigint", "long"], + ["chat_id", "number", "int"], + ["date", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "messages.dhConfigNotModified", + [ + 0xC0E24635, + [ + ["random", Uint8Array, "bytes"], + ], + ], + ], + [ + "messages.dhConfig", + [ + 0x2C221EDD, + [ + ["g", "number", "int"], + ["p", Uint8Array, "bytes"], + ["version", "number", "int"], + ["random", Uint8Array, "bytes"], + ], + ], + ], + [ + "messages.sentEncryptedMessage", + [ + 0x560F8935, + [ + ["date", "number", "int"], + ], + ], + ], + [ + "messages.sentEncryptedFile", + [ + 0x9493FF32, + [ + ["date", "number", "int"], + ["file", "EncryptedFile", "EncryptedFile"], + ], + ], + ], + [ + "inputDocumentEmpty", + [ + 0x72F0EAAE, + [], + ], + ], + [ + "inputDocument", + [ + 0x1ABFB575, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ], + ], + ], + [ + "documentEmpty", + [ + 0x36F8C871, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "document", + [ + 0x8FD4C4D8, + [ + ["flags", flags, "#"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["file_reference", Uint8Array, "bytes"], + ["date", "number", "int"], + ["mime_type", "string", "string"], + ["size", "bigint", "long"], + ["thumbs", ["PhotoSize"], "flags.0?Vector"], + ["video_thumbs", ["VideoSize"], "flags.1?Vector"], + ["dc_id", "number", "int"], + ["attributes", ["DocumentAttribute"], "Vector"], + ], + ], + ], + [ + "help.support", + [ + 0x17C6B5F6, + [ + ["phone_number", "string", "string"], + ["user", "User", "User"], + ], + ], + ], + [ + "notifyPeer", + [ + 0x9FD40BD8, + [ + ["peer", "Peer", "Peer"], + ], + ], + ], + [ + "notifyUsers", + [ + 0xB4C83B4C, + [], + ], + ], + [ + "notifyChats", + [ + 0xC007CEC3, + [], + ], + ], + [ + "notifyBroadcasts", + [ + 0xD612E8EF, + [], + ], + ], + [ + "notifyForumTopic", + [ + 0x226E6308, + [ + ["peer", "Peer", "Peer"], + ["top_msg_id", "number", "int"], + ], + ], + ], + [ + "sendMessageTypingAction", + [ + 0x16BF744E, + [], + ], + ], + [ + "sendMessageCancelAction", + [ + 0xFD5EC8F5, + [], + ], + ], + [ + "sendMessageRecordVideoAction", + [ + 0xA187D66F, + [], + ], + ], + [ + "sendMessageUploadVideoAction", + [ + 0xE9763AEC, + [ + ["progress", "number", "int"], + ], + ], + ], + [ + "sendMessageRecordAudioAction", + [ + 0xD52F73F7, + [], + ], + ], + [ + "sendMessageUploadAudioAction", + [ + 0xF351D7AB, + [ + ["progress", "number", "int"], + ], + ], + ], + [ + "sendMessageUploadPhotoAction", + [ + 0xD1D34A26, + [ + ["progress", "number", "int"], + ], + ], + ], + [ + "sendMessageUploadDocumentAction", + [ + 0xAA0CD9E4, + [ + ["progress", "number", "int"], + ], + ], + ], + [ + "sendMessageGeoLocationAction", + [ + 0x176F8BA1, + [], + ], + ], + [ + "sendMessageChooseContactAction", + [ + 0x628CBC6F, + [], + ], + ], + [ + "sendMessageGamePlayAction", + [ + 0xDD6A8F48, + [], + ], + ], + [ + "sendMessageRecordRoundAction", + [ + 0x88F27FBC, + [], + ], + ], + [ + "sendMessageUploadRoundAction", + [ + 0x243E1C66, + [ + ["progress", "number", "int"], + ], + ], + ], + [ + "speakingInGroupCallAction", + [ + 0xD92C2285, + [], + ], + ], + [ + "sendMessageHistoryImportAction", + [ + 0xDBDA9246, + [ + ["progress", "number", "int"], + ], + ], + ], + [ + "sendMessageChooseStickerAction", + [ + 0xB05AC6B1, + [], + ], + ], + [ + "sendMessageEmojiInteraction", + [ + 0x25972BCB, + [ + ["emoticon", "string", "string"], + ["msg_id", "number", "int"], + ["interaction", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "sendMessageEmojiInteractionSeen", + [ + 0xB665902E, + [ + ["emoticon", "string", "string"], + ], + ], + ], + [ + "contacts.found", + [ + 0xB3134D9D, + [ + ["my_results", ["Peer"], "Vector"], + ["results", ["Peer"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "inputPrivacyKeyStatusTimestamp", + [ + 0x4F96CB18, + [], + ], + ], + [ + "inputPrivacyKeyChatInvite", + [ + 0xBDFB0426, + [], + ], + ], + [ + "inputPrivacyKeyPhoneCall", + [ + 0xFABADC5F, + [], + ], + ], + [ + "inputPrivacyKeyPhoneP2P", + [ + 0xDB9E70D2, + [], + ], + ], + [ + "inputPrivacyKeyForwards", + [ + 0xA4DD4C08, + [], + ], + ], + [ + "inputPrivacyKeyProfilePhoto", + [ + 0x5719BACC, + [], + ], + ], + [ + "inputPrivacyKeyPhoneNumber", + [ + 0x0352DAFA, + [], + ], + ], + [ + "inputPrivacyKeyAddedByPhone", + [ + 0xD1219BDD, + [], + ], + ], + [ + "inputPrivacyKeyVoiceMessages", + [ + 0xAEE69D68, + [], + ], + ], + [ + "inputPrivacyKeyAbout", + [ + 0x3823CC40, + [], + ], + ], + [ + "inputPrivacyKeyBirthday", + [ + 0xD65A11CC, + [], + ], + ], + [ + "privacyKeyStatusTimestamp", + [ + 0xBC2EAB30, + [], + ], + ], + [ + "privacyKeyChatInvite", + [ + 0x500E6DFA, + [], + ], + ], + [ + "privacyKeyPhoneCall", + [ + 0x3D662B7B, + [], + ], + ], + [ + "privacyKeyPhoneP2P", + [ + 0x39491CC8, + [], + ], + ], + [ + "privacyKeyForwards", + [ + 0x69EC56A3, + [], + ], + ], + [ + "privacyKeyProfilePhoto", + [ + 0x96151FED, + [], + ], + ], + [ + "privacyKeyPhoneNumber", + [ + 0xD19AE46D, + [], + ], + ], + [ + "privacyKeyAddedByPhone", + [ + 0x42FFD42B, + [], + ], + ], + [ + "privacyKeyVoiceMessages", + [ + 0x0697F414, + [], + ], + ], + [ + "privacyKeyAbout", + [ + 0xA486B761, + [], + ], + ], + [ + "privacyKeyBirthday", + [ + 0x2000A518, + [], + ], + ], + [ + "inputPrivacyValueAllowContacts", + [ + 0x0D09E07B, + [], + ], + ], + [ + "inputPrivacyValueAllowAll", + [ + 0x184B35CE, + [], + ], + ], + [ + "inputPrivacyValueAllowUsers", + [ + 0x131CC67F, + [ + ["users", ["InputUser"], "Vector"], + ], + ], + ], + [ + "inputPrivacyValueDisallowContacts", + [ + 0x0BA52007, + [], + ], + ], + [ + "inputPrivacyValueDisallowAll", + [ + 0xD66B66C9, + [], + ], + ], + [ + "inputPrivacyValueDisallowUsers", + [ + 0x90110467, + [ + ["users", ["InputUser"], "Vector"], + ], + ], + ], + [ + "inputPrivacyValueAllowChatParticipants", + [ + 0x840649CF, + [ + ["chats", ["bigint"], "Vector"], + ], + ], + ], + [ + "inputPrivacyValueDisallowChatParticipants", + [ + 0xE94F0F86, + [ + ["chats", ["bigint"], "Vector"], + ], + ], + ], + [ + "inputPrivacyValueAllowCloseFriends", + [ + 0x2F453E49, + [], + ], + ], + [ + "inputPrivacyValueAllowPremium", + [ + 0x77CDC9F1, + [], + ], + ], + [ + "privacyValueAllowContacts", + [ + 0xFFFE1BAC, + [], + ], + ], + [ + "privacyValueAllowAll", + [ + 0x65427B82, + [], + ], + ], + [ + "privacyValueAllowUsers", + [ + 0xB8905FB2, + [ + ["users", ["bigint"], "Vector"], + ], + ], + ], + [ + "privacyValueDisallowContacts", + [ + 0xF888FA1A, + [], + ], + ], + [ + "privacyValueDisallowAll", + [ + 0x8B73E763, + [], + ], + ], + [ + "privacyValueDisallowUsers", + [ + 0xE4621141, + [ + ["users", ["bigint"], "Vector"], + ], + ], + ], + [ + "privacyValueAllowChatParticipants", + [ + 0x6B134E8E, + [ + ["chats", ["bigint"], "Vector"], + ], + ], + ], + [ + "privacyValueDisallowChatParticipants", + [ + 0x41C87565, + [ + ["chats", ["bigint"], "Vector"], + ], + ], + ], + [ + "privacyValueAllowCloseFriends", + [ + 0xF7E8D89B, + [], + ], + ], + [ + "privacyValueAllowPremium", + [ + 0xECE9814B, + [], + ], + ], + [ + "account.privacyRules", + [ + 0x50A04E45, + [ + ["rules", ["PrivacyRule"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "accountDaysTTL", + [ + 0xB8D0AFDF, + [ + ["days", "number", "int"], + ], + ], + ], + [ + "documentAttributeImageSize", + [ + 0x6C37C15C, + [ + ["w", "number", "int"], + ["h", "number", "int"], + ], + ], + ], + [ + "documentAttributeAnimated", + [ + 0x11B58939, + [], + ], + ], + [ + "documentAttributeSticker", + [ + 0x6319D612, + [ + ["flags", flags, "#"], + ["mask", "true", "flags.1?true"], + ["alt", "string", "string"], + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["mask_coords", "MaskCoords", "flags.0?MaskCoords"], + ], + ], + ], + [ + "documentAttributeVideo", + [ + 0xD38FF1C2, + [ + ["flags", flags, "#"], + ["round_message", "true", "flags.0?true"], + ["supports_streaming", "true", "flags.1?true"], + ["nosound", "true", "flags.3?true"], + ["duration", "number", "double"], + ["w", "number", "int"], + ["h", "number", "int"], + ["preload_prefix_size", "number", "flags.2?int"], + ], + ], + ], + [ + "documentAttributeAudio", + [ + 0x9852F9C6, + [ + ["flags", flags, "#"], + ["voice", "true", "flags.10?true"], + ["duration", "number", "int"], + ["title", "string", "flags.0?string"], + ["performer", "string", "flags.1?string"], + ["waveform", Uint8Array, "flags.2?bytes"], + ], + ], + ], + [ + "documentAttributeFilename", + [ + 0x15590068, + [ + ["file_name", "string", "string"], + ], + ], + ], + [ + "documentAttributeHasStickers", + [ + 0x9801D2F7, + [], + ], + ], + [ + "documentAttributeCustomEmoji", + [ + 0xFD149899, + [ + ["flags", flags, "#"], + ["free", "true", "flags.0?true"], + ["text_color", "true", "flags.1?true"], + ["alt", "string", "string"], + ["stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "messages.stickersNotModified", + [ + 0xF1749A22, + [], + ], + ], + [ + "messages.stickers", + [ + 0x30A6EC7E, + [ + ["hash", "bigint", "long"], + ["stickers", ["Document"], "Vector"], + ], + ], + ], + [ + "stickerPack", + [ + 0x12B299D4, + [ + ["emoticon", "string", "string"], + ["documents", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.allStickersNotModified", + [ + 0xE86602C3, + [], + ], + ], + [ + "messages.allStickers", + [ + 0xCDBBCEBB, + [ + ["hash", "bigint", "long"], + ["sets", ["StickerSet"], "Vector"], + ], + ], + ], + [ + "messages.affectedMessages", + [ + 0x84D19185, + [ + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ], + ], + ], + [ + "webPageEmpty", + [ + 0x211A1788, + [ + ["flags", flags, "#"], + ["id", "bigint", "long"], + ["url", "string", "flags.0?string"], + ], + ], + ], + [ + "webPagePending", + [ + 0xB0D13E47, + [ + ["flags", flags, "#"], + ["id", "bigint", "long"], + ["url", "string", "flags.0?string"], + ["date", "number", "int"], + ], + ], + ], + [ + "webPage", + [ + 0xE89C45B2, + [ + ["flags", flags, "#"], + ["has_large_media", "true", "flags.13?true"], + ["id", "bigint", "long"], + ["url", "string", "string"], + ["display_url", "string", "string"], + ["hash", "number", "int"], + ["type", "string", "flags.0?string"], + ["site_name", "string", "flags.1?string"], + ["title", "string", "flags.2?string"], + ["description", "string", "flags.3?string"], + ["photo", "Photo", "flags.4?Photo"], + ["embed_url", "string", "flags.5?string"], + ["embed_type", "string", "flags.5?string"], + ["embed_width", "number", "flags.6?int"], + ["embed_height", "number", "flags.6?int"], + ["duration", "number", "flags.7?int"], + ["author", "string", "flags.8?string"], + ["document", "Document", "flags.9?Document"], + ["cached_page", "Page", "flags.10?Page"], + ["attributes", ["WebPageAttribute"], "flags.12?Vector"], + ], + ], + ], + [ + "webPageNotModified", + [ + 0x7311CA11, + [ + ["flags", flags, "#"], + ["cached_page_views", "number", "flags.0?int"], + ], + ], + ], + [ + "authorization", + [ + 0xAD01D61D, + [ + ["flags", flags, "#"], + ["current", "true", "flags.0?true"], + ["official_app", "true", "flags.1?true"], + ["password_pending", "true", "flags.2?true"], + ["encrypted_requests_disabled", "true", "flags.3?true"], + ["call_requests_disabled", "true", "flags.4?true"], + ["unconfirmed", "true", "flags.5?true"], + ["hash", "bigint", "long"], + ["device_model", "string", "string"], + ["platform", "string", "string"], + ["system_version", "string", "string"], + ["api_id", "number", "int"], + ["app_name", "string", "string"], + ["app_version", "string", "string"], + ["date_created", "number", "int"], + ["date_active", "number", "int"], + ["ip", "string", "string"], + ["country", "string", "string"], + ["region", "string", "string"], + ], + ], + ], + [ + "account.authorizations", + [ + 0x4BFF8EA0, + [ + ["authorization_ttl_days", "number", "int"], + ["authorizations", ["Authorization"], "Vector"], + ], + ], + ], + [ + "account.password", + [ + 0x957B50FB, + [ + ["flags", flags, "#"], + ["has_recovery", "true", "flags.0?true"], + ["has_secure_values", "true", "flags.1?true"], + ["has_password", "true", "flags.2?true"], + ["current_algo", "PasswordKdfAlgo", "flags.2?PasswordKdfAlgo"], + ["srp_B", Uint8Array, "flags.2?bytes"], + ["srp_id", "bigint", "flags.2?long"], + ["hint", "string", "flags.3?string"], + ["email_unconfirmed_pattern", "string", "flags.4?string"], + ["new_algo", "PasswordKdfAlgo", "PasswordKdfAlgo"], + ["new_secure_algo", "SecurePasswordKdfAlgo", "SecurePasswordKdfAlgo"], + ["secure_random", Uint8Array, "bytes"], + ["pending_reset_date", "number", "flags.5?int"], + ["login_email_pattern", "string", "flags.6?string"], + ], + ], + ], + [ + "account.passwordSettings", + [ + 0x9A5C33E5, + [ + ["flags", flags, "#"], + ["email", "string", "flags.0?string"], + ["secure_settings", "SecureSecretSettings", "flags.1?SecureSecretSettings"], + ], + ], + ], + [ + "account.passwordInputSettings", + [ + 0xC23727C9, + [ + ["flags", flags, "#"], + ["new_algo", "PasswordKdfAlgo", "flags.0?PasswordKdfAlgo"], + ["new_password_hash", Uint8Array, "flags.0?bytes"], + ["hint", "string", "flags.0?string"], + ["email", "string", "flags.1?string"], + ["new_secure_settings", "SecureSecretSettings", "flags.2?SecureSecretSettings"], + ], + ], + ], + [ + "auth.passwordRecovery", + [ + 0x137948A5, + [ + ["email_pattern", "string", "string"], + ], + ], + ], + [ + "receivedNotifyMessage", + [ + 0xA384B779, + [ + ["id", "number", "int"], + ["flags", "number", "int"], + ], + ], + ], + [ + "chatInviteExported", + [ + 0x0AB4A819, + [ + ["flags", flags, "#"], + ["revoked", "true", "flags.0?true"], + ["permanent", "true", "flags.5?true"], + ["request_needed", "true", "flags.6?true"], + ["link", "string", "string"], + ["admin_id", "bigint", "long"], + ["date", "number", "int"], + ["start_date", "number", "flags.4?int"], + ["expire_date", "number", "flags.1?int"], + ["usage_limit", "number", "flags.2?int"], + ["usage", "number", "flags.3?int"], + ["requested", "number", "flags.7?int"], + ["title", "string", "flags.8?string"], + ], + ], + ], + [ + "chatInvitePublicJoinRequests", + [ + 0xED107AB7, + [], + ], + ], + [ + "chatInviteAlready", + [ + 0x5A686D7C, + [ + ["chat", "Chat", "Chat"], + ], + ], + ], + [ + "chatInvite", + [ + 0xCDE0EC40, + [ + ["flags", flags, "#"], + ["channel", "true", "flags.0?true"], + ["broadcast", "true", "flags.1?true"], + ["public", "true", "flags.2?true"], + ["megagroup", "true", "flags.3?true"], + ["request_needed", "true", "flags.6?true"], + ["verified", "true", "flags.7?true"], + ["scam", "true", "flags.8?true"], + ["fake", "true", "flags.9?true"], + ["title", "string", "string"], + ["about", "string", "flags.5?string"], + ["photo", "Photo", "Photo"], + ["participants_count", "number", "int"], + ["participants", ["User"], "flags.4?Vector"], + ["color", "number", "int"], + ], + ], + ], + [ + "chatInvitePeek", + [ + 0x61695CB0, + [ + ["chat", "Chat", "Chat"], + ["expires", "number", "int"], + ], + ], + ], + [ + "inputStickerSetEmpty", + [ + 0xFFB62B95, + [], + ], + ], + [ + "inputStickerSetID", + [ + 0x9DE7A269, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputStickerSetShortName", + [ + 0x861CC8A0, + [ + ["short_name", "string", "string"], + ], + ], + ], + [ + "inputStickerSetAnimatedEmoji", + [ + 0x028703C8, + [], + ], + ], + [ + "inputStickerSetDice", + [ + 0xE67F520E, + [ + ["emoticon", "string", "string"], + ], + ], + ], + [ + "inputStickerSetAnimatedEmojiAnimations", + [ + 0x0CDE3739, + [], + ], + ], + [ + "inputStickerSetPremiumGifts", + [ + 0xC88B3B02, + [], + ], + ], + [ + "inputStickerSetEmojiGenericAnimations", + [ + 0x04C4D4CE, + [], + ], + ], + [ + "inputStickerSetEmojiDefaultStatuses", + [ + 0x29D0F5EE, + [], + ], + ], + [ + "inputStickerSetEmojiDefaultTopicIcons", + [ + 0x44C1F8E9, + [], + ], + ], + [ + "inputStickerSetEmojiChannelDefaultStatuses", + [ + 0x49748553, + [], + ], + ], + [ + "stickerSet", + [ + 0x2DD14EDC, + [ + ["flags", flags, "#"], + ["archived", "true", "flags.1?true"], + ["official", "true", "flags.2?true"], + ["masks", "true", "flags.3?true"], + ["emojis", "true", "flags.7?true"], + ["text_color", "true", "flags.9?true"], + ["channel_emoji_status", "true", "flags.10?true"], + ["creator", "true", "flags.11?true"], + ["installed_date", "number", "flags.0?int"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["title", "string", "string"], + ["short_name", "string", "string"], + ["thumbs", ["PhotoSize"], "flags.4?Vector"], + ["thumb_dc_id", "number", "flags.4?int"], + ["thumb_version", "number", "flags.4?int"], + ["thumb_document_id", "bigint", "flags.8?long"], + ["count", "number", "int"], + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.stickerSet", + [ + 0x6E153F16, + [ + ["set", "StickerSet", "StickerSet"], + ["packs", ["StickerPack"], "Vector"], + ["keywords", ["StickerKeyword"], "Vector"], + ["documents", ["Document"], "Vector"], + ], + ], + ], + [ + "messages.stickerSetNotModified", + [ + 0xD3F924EB, + [], + ], + ], + [ + "botCommand", + [ + 0xC27AC8C7, + [ + ["command", "string", "string"], + ["description", "string", "string"], + ], + ], + ], + [ + "botInfo", + [ + 0x8F300B57, + [ + ["flags", flags, "#"], + ["user_id", "bigint", "flags.0?long"], + ["description", "string", "flags.1?string"], + ["description_photo", "Photo", "flags.4?Photo"], + ["description_document", "Document", "flags.5?Document"], + ["commands", ["BotCommand"], "flags.2?Vector"], + ["menu_button", "BotMenuButton", "flags.3?BotMenuButton"], + ], + ], + ], + [ + "keyboardButton", + [ + 0xA2FA4880, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "keyboardButtonUrl", + [ + 0x258AFF05, + [ + ["text", "string", "string"], + ["url", "string", "string"], + ], + ], + ], + [ + "keyboardButtonCallback", + [ + 0x35BBDB6B, + [ + ["flags", flags, "#"], + ["requires_password", "true", "flags.0?true"], + ["text", "string", "string"], + ["data", Uint8Array, "bytes"], + ], + ], + ], + [ + "keyboardButtonRequestPhone", + [ + 0xB16A6C29, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "keyboardButtonRequestGeoLocation", + [ + 0xFC796B3F, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "keyboardButtonSwitchInline", + [ + 0x93B9FBB5, + [ + ["flags", flags, "#"], + ["same_peer", "true", "flags.0?true"], + ["text", "string", "string"], + ["query", "string", "string"], + ["peer_types", ["InlineQueryPeerType"], "flags.1?Vector"], + ], + ], + ], + [ + "keyboardButtonGame", + [ + 0x50F41CCF, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "keyboardButtonBuy", + [ + 0xAFD93FBB, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "keyboardButtonUrlAuth", + [ + 0x10B78D29, + [ + ["flags", flags, "#"], + ["text", "string", "string"], + ["fwd_text", "string", "flags.0?string"], + ["url", "string", "string"], + ["button_id", "number", "int"], + ], + ], + ], + [ + "inputKeyboardButtonUrlAuth", + [ + 0xD02E7FD4, + [ + ["flags", flags, "#"], + ["request_write_access", "true", "flags.0?true"], + ["text", "string", "string"], + ["fwd_text", "string", "flags.1?string"], + ["url", "string", "string"], + ["bot", "InputUser", "InputUser"], + ], + ], + ], + [ + "keyboardButtonRequestPoll", + [ + 0xBBC7515D, + [ + ["flags", flags, "#"], + ["quiz", "boolean", "flags.0?Bool"], + ["text", "string", "string"], + ], + ], + ], + [ + "inputKeyboardButtonUserProfile", + [ + 0xE988037B, + [ + ["text", "string", "string"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "keyboardButtonUserProfile", + [ + 0x308660C1, + [ + ["text", "string", "string"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "keyboardButtonWebView", + [ + 0x13767230, + [ + ["text", "string", "string"], + ["url", "string", "string"], + ], + ], + ], + [ + "keyboardButtonSimpleWebView", + [ + 0xA0C0505C, + [ + ["text", "string", "string"], + ["url", "string", "string"], + ], + ], + ], + [ + "keyboardButtonRequestPeer", + [ + 0x53D7BFD8, + [ + ["text", "string", "string"], + ["button_id", "number", "int"], + ["peer_type", "RequestPeerType", "RequestPeerType"], + ["max_quantity", "number", "int"], + ], + ], + ], + [ + "inputKeyboardButtonRequestPeer", + [ + 0xC9662D05, + [ + ["flags", flags, "#"], + ["name_requested", "true", "flags.0?true"], + ["username_requested", "true", "flags.1?true"], + ["photo_requested", "true", "flags.2?true"], + ["text", "string", "string"], + ["button_id", "number", "int"], + ["peer_type", "RequestPeerType", "RequestPeerType"], + ["max_quantity", "number", "int"], + ], + ], + ], + [ + "keyboardButtonRow", + [ + 0x77608B83, + [ + ["buttons", ["KeyboardButton"], "Vector"], + ], + ], + ], + [ + "replyKeyboardHide", + [ + 0xA03E5B85, + [ + ["flags", flags, "#"], + ["selective", "true", "flags.2?true"], + ], + ], + ], + [ + "replyKeyboardForceReply", + [ + 0x86B40B08, + [ + ["flags", flags, "#"], + ["single_use", "true", "flags.1?true"], + ["selective", "true", "flags.2?true"], + ["placeholder", "string", "flags.3?string"], + ], + ], + ], + [ + "replyKeyboardMarkup", + [ + 0x85DD99D1, + [ + ["flags", flags, "#"], + ["resize", "true", "flags.0?true"], + ["single_use", "true", "flags.1?true"], + ["selective", "true", "flags.2?true"], + ["persistent", "true", "flags.4?true"], + ["rows", ["KeyboardButtonRow"], "Vector"], + ["placeholder", "string", "flags.3?string"], + ], + ], + ], + [ + "replyInlineMarkup", + [ + 0x48A30254, + [ + ["rows", ["KeyboardButtonRow"], "Vector"], + ], + ], + ], + [ + "messageEntityUnknown", + [ + 0xBB92BA95, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityMention", + [ + 0xFA04579D, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityHashtag", + [ + 0x6F635B0D, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityBotCommand", + [ + 0x6CEF8AC7, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityUrl", + [ + 0x6ED02538, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityEmail", + [ + 0x64E475C2, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityBold", + [ + 0xBD610BC9, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityItalic", + [ + 0x826F8B60, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityCode", + [ + 0x28A20571, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityPre", + [ + 0x73924BE0, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ["language", "string", "string"], + ], + ], + ], + [ + "messageEntityTextUrl", + [ + 0x76A6D327, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ["url", "string", "string"], + ], + ], + ], + [ + "messageEntityMentionName", + [ + 0xDC7B1140, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "inputMessageEntityMentionName", + [ + 0x208E68C9, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "messageEntityPhone", + [ + 0x9B69E34B, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityCashtag", + [ + 0x4C4E743F, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityUnderline", + [ + 0x9C4E7E8B, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityStrike", + [ + 0xBF0693D4, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityBankCard", + [ + 0x761E6AF4, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntitySpoiler", + [ + 0x32CA960F, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messageEntityCustomEmoji", + [ + 0xC8CF05F8, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ["document_id", "bigint", "long"], + ], + ], + ], + [ + "messageEntityBlockquote", + [ + 0x020DF5D0, + [ + ["offset", "number", "int"], + ["length", "number", "int"], + ], + ], + ], + [ + "inputChannelEmpty", + [ + 0xEE8C1E86, + [], + ], + ], + [ + "inputChannel", + [ + 0xF35AEC28, + [ + ["channel_id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputChannelFromMessage", + [ + 0x5B934F9D, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["channel_id", "bigint", "long"], + ], + ], + ], + [ + "contacts.resolvedPeer", + [ + 0x7F077AD9, + [ + ["peer", "Peer", "Peer"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messageRange", + [ + 0x0AE30253, + [ + ["min_id", "number", "int"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "updates.channelDifferenceEmpty", + [ + 0x3E11AFFB, + [ + ["flags", flags, "#"], + ["final", "true", "flags.0?true"], + ["pts", "number", "int"], + ["timeout", "number", "flags.1?int"], + ], + ], + ], + [ + "updates.channelDifferenceTooLong", + [ + 0xA4BCC6FE, + [ + ["flags", flags, "#"], + ["final", "true", "flags.0?true"], + ["timeout", "number", "flags.1?int"], + ["dialog", "Dialog", "Dialog"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "updates.channelDifference", + [ + 0x2064674E, + [ + ["flags", flags, "#"], + ["final", "true", "flags.0?true"], + ["pts", "number", "int"], + ["timeout", "number", "flags.1?int"], + ["new_messages", ["Message"], "Vector"], + ["other_updates", ["Update"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "channelMessagesFilterEmpty", + [ + 0x94D42EE7, + [], + ], + ], + [ + "channelMessagesFilter", + [ + 0xCD77D957, + [ + ["flags", flags, "#"], + ["exclude_new_messages", "true", "flags.1?true"], + ["ranges", ["MessageRange"], "Vector"], + ], + ], + ], + [ + "channelParticipant", + [ + 0xC00C07C0, + [ + ["user_id", "bigint", "long"], + ["date", "number", "int"], + ], + ], + ], + [ + "channelParticipantSelf", + [ + 0x35A8BFA7, + [ + ["flags", flags, "#"], + ["via_request", "true", "flags.0?true"], + ["user_id", "bigint", "long"], + ["inviter_id", "bigint", "long"], + ["date", "number", "int"], + ], + ], + ], + [ + "channelParticipantCreator", + [ + 0x2FE601D3, + [ + ["flags", flags, "#"], + ["user_id", "bigint", "long"], + ["admin_rights", "ChatAdminRights", "ChatAdminRights"], + ["rank", "string", "flags.0?string"], + ], + ], + ], + [ + "channelParticipantAdmin", + [ + 0x34C3BB53, + [ + ["flags", flags, "#"], + ["can_edit", "true", "flags.0?true"], + ["self", "true", "flags.1?true"], + ["user_id", "bigint", "long"], + ["inviter_id", "bigint", "flags.1?long"], + ["promoted_by", "bigint", "long"], + ["date", "number", "int"], + ["admin_rights", "ChatAdminRights", "ChatAdminRights"], + ["rank", "string", "flags.2?string"], + ], + ], + ], + [ + "channelParticipantBanned", + [ + 0x6DF8014E, + [ + ["flags", flags, "#"], + ["left", "true", "flags.0?true"], + ["peer", "Peer", "Peer"], + ["kicked_by", "bigint", "long"], + ["date", "number", "int"], + ["banned_rights", "ChatBannedRights", "ChatBannedRights"], + ], + ], + ], + [ + "channelParticipantLeft", + [ + 0x1B03F006, + [ + ["peer", "Peer", "Peer"], + ], + ], + ], + [ + "channelParticipantsRecent", + [ + 0xDE3F3C79, + [], + ], + ], + [ + "channelParticipantsAdmins", + [ + 0xB4608969, + [], + ], + ], + [ + "channelParticipantsKicked", + [ + 0xA3B54985, + [ + ["q", "string", "string"], + ], + ], + ], + [ + "channelParticipantsBots", + [ + 0xB0D1865B, + [], + ], + ], + [ + "channelParticipantsBanned", + [ + 0x1427A5E1, + [ + ["q", "string", "string"], + ], + ], + ], + [ + "channelParticipantsSearch", + [ + 0x0656AC4B, + [ + ["q", "string", "string"], + ], + ], + ], + [ + "channelParticipantsContacts", + [ + 0xBB6AE88D, + [ + ["q", "string", "string"], + ], + ], + ], + [ + "channelParticipantsMentions", + [ + 0xE04B5CEB, + [ + ["flags", flags, "#"], + ["q", "string", "flags.0?string"], + ["top_msg_id", "number", "flags.1?int"], + ], + ], + ], + [ + "channels.channelParticipants", + [ + 0x9AB0FEAF, + [ + ["count", "number", "int"], + ["participants", ["ChannelParticipant"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "channels.channelParticipantsNotModified", + [ + 0xF0173FE9, + [], + ], + ], + [ + "channels.channelParticipant", + [ + 0xDFB80317, + [ + ["participant", "ChannelParticipant", "ChannelParticipant"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "help.termsOfService", + [ + 0x780A0310, + [ + ["flags", flags, "#"], + ["popup", "true", "flags.0?true"], + ["id", "DataJSON", "DataJSON"], + ["text", "string", "string"], + ["entities", ["MessageEntity"], "Vector"], + ["min_age_confirm", "number", "flags.1?int"], + ], + ], + ], + [ + "messages.savedGifsNotModified", + [ + 0xE8025CA2, + [], + ], + ], + [ + "messages.savedGifs", + [ + 0x84A02A0D, + [ + ["hash", "bigint", "long"], + ["gifs", ["Document"], "Vector"], + ], + ], + ], + [ + "inputBotInlineMessageMediaAuto", + [ + 0x3380C786, + [ + ["flags", flags, "#"], + ["invert_media", "true", "flags.3?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageText", + [ + 0x3DCD7A87, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.0?true"], + ["invert_media", "true", "flags.3?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageMediaGeo", + [ + 0x96929A85, + [ + ["flags", flags, "#"], + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["heading", "number", "flags.0?int"], + ["period", "number", "flags.1?int"], + ["proximity_notification_radius", "number", "flags.3?int"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageMediaVenue", + [ + 0x417BBF11, + [ + ["flags", flags, "#"], + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["title", "string", "string"], + ["address", "string", "string"], + ["provider", "string", "string"], + ["venue_id", "string", "string"], + ["venue_type", "string", "string"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageMediaContact", + [ + 0xA6EDBFFD, + [ + ["flags", flags, "#"], + ["phone_number", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["vcard", "string", "string"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageGame", + [ + 0x4B425864, + [ + ["flags", flags, "#"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageMediaInvoice", + [ + 0xD7E78225, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "InputWebDocument", "flags.0?InputWebDocument"], + ["invoice", "Invoice", "Invoice"], + ["payload", Uint8Array, "bytes"], + ["provider", "string", "string"], + ["provider_data", "DataJSON", "DataJSON"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineMessageMediaWebPage", + [ + 0xBDDCC510, + [ + ["flags", flags, "#"], + ["invert_media", "true", "flags.3?true"], + ["force_large_media", "true", "flags.4?true"], + ["force_small_media", "true", "flags.5?true"], + ["optional", "true", "flags.6?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["url", "string", "string"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "inputBotInlineResult", + [ + 0x88BF9319, + [ + ["flags", flags, "#"], + ["id", "string", "string"], + ["type", "string", "string"], + ["title", "string", "flags.1?string"], + ["description", "string", "flags.2?string"], + ["url", "string", "flags.3?string"], + ["thumb", "InputWebDocument", "flags.4?InputWebDocument"], + ["content", "InputWebDocument", "flags.5?InputWebDocument"], + ["send_message", "InputBotInlineMessage", "InputBotInlineMessage"], + ], + ], + ], + [ + "inputBotInlineResultPhoto", + [ + 0xA8D864A7, + [ + ["id", "string", "string"], + ["type", "string", "string"], + ["photo", "InputPhoto", "InputPhoto"], + ["send_message", "InputBotInlineMessage", "InputBotInlineMessage"], + ], + ], + ], + [ + "inputBotInlineResultDocument", + [ + 0xFFF8FDC4, + [ + ["flags", flags, "#"], + ["id", "string", "string"], + ["type", "string", "string"], + ["title", "string", "flags.1?string"], + ["description", "string", "flags.2?string"], + ["document", "InputDocument", "InputDocument"], + ["send_message", "InputBotInlineMessage", "InputBotInlineMessage"], + ], + ], + ], + [ + "inputBotInlineResultGame", + [ + 0x4FA417F2, + [ + ["id", "string", "string"], + ["short_name", "string", "string"], + ["send_message", "InputBotInlineMessage", "InputBotInlineMessage"], + ], + ], + ], + [ + "botInlineMessageMediaAuto", + [ + 0x764CF810, + [ + ["flags", flags, "#"], + ["invert_media", "true", "flags.3?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineMessageText", + [ + 0x8C7F65E2, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.0?true"], + ["invert_media", "true", "flags.3?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineMessageMediaGeo", + [ + 0x051846FD, + [ + ["flags", flags, "#"], + ["geo", "GeoPoint", "GeoPoint"], + ["heading", "number", "flags.0?int"], + ["period", "number", "flags.1?int"], + ["proximity_notification_radius", "number", "flags.3?int"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineMessageMediaVenue", + [ + 0x8A86659C, + [ + ["flags", flags, "#"], + ["geo", "GeoPoint", "GeoPoint"], + ["title", "string", "string"], + ["address", "string", "string"], + ["provider", "string", "string"], + ["venue_id", "string", "string"], + ["venue_type", "string", "string"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineMessageMediaContact", + [ + 0x18D1CDC2, + [ + ["flags", flags, "#"], + ["phone_number", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["vcard", "string", "string"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineMessageMediaInvoice", + [ + 0x354A9B09, + [ + ["flags", flags, "#"], + ["shipping_address_requested", "true", "flags.1?true"], + ["test", "true", "flags.3?true"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "WebDocument", "flags.0?WebDocument"], + ["currency", "string", "string"], + ["total_amount", "bigint", "long"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineMessageMediaWebPage", + [ + 0x809AD9A6, + [ + ["flags", flags, "#"], + ["invert_media", "true", "flags.3?true"], + ["force_large_media", "true", "flags.4?true"], + ["force_small_media", "true", "flags.5?true"], + ["manual", "true", "flags.7?true"], + ["safe", "true", "flags.8?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["url", "string", "string"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ], + ], + ], + [ + "botInlineResult", + [ + 0x11965F3A, + [ + ["flags", flags, "#"], + ["id", "string", "string"], + ["type", "string", "string"], + ["title", "string", "flags.1?string"], + ["description", "string", "flags.2?string"], + ["url", "string", "flags.3?string"], + ["thumb", "WebDocument", "flags.4?WebDocument"], + ["content", "WebDocument", "flags.5?WebDocument"], + ["send_message", "BotInlineMessage", "BotInlineMessage"], + ], + ], + ], + [ + "botInlineMediaResult", + [ + 0x17DB940B, + [ + ["flags", flags, "#"], + ["id", "string", "string"], + ["type", "string", "string"], + ["photo", "Photo", "flags.0?Photo"], + ["document", "Document", "flags.1?Document"], + ["title", "string", "flags.2?string"], + ["description", "string", "flags.3?string"], + ["send_message", "BotInlineMessage", "BotInlineMessage"], + ], + ], + ], + [ + "messages.botResults", + [ + 0xE021F2F6, + [ + ["flags", flags, "#"], + ["gallery", "true", "flags.0?true"], + ["query_id", "bigint", "long"], + ["next_offset", "string", "flags.1?string"], + ["switch_pm", "InlineBotSwitchPM", "flags.2?InlineBotSwitchPM"], + ["switch_webview", "InlineBotWebView", "flags.3?InlineBotWebView"], + ["results", ["BotInlineResult"], "Vector"], + ["cache_time", "number", "int"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "exportedMessageLink", + [ + 0x5DAB1AF4, + [ + ["link", "string", "string"], + ["html", "string", "string"], + ], + ], + ], + [ + "messageFwdHeader", + [ + 0x4E4DF4BB, + [ + ["flags", flags, "#"], + ["imported", "true", "flags.7?true"], + ["saved_out", "true", "flags.11?true"], + ["from_id", "Peer", "flags.0?Peer"], + ["from_name", "string", "flags.5?string"], + ["date", "number", "int"], + ["channel_post", "number", "flags.2?int"], + ["post_author", "string", "flags.3?string"], + ["saved_from_peer", "Peer", "flags.4?Peer"], + ["saved_from_msg_id", "number", "flags.4?int"], + ["saved_from_id", "Peer", "flags.8?Peer"], + ["saved_from_name", "string", "flags.9?string"], + ["saved_date", "number", "flags.10?int"], + ["psa_type", "string", "flags.6?string"], + ], + ], + ], + [ + "auth.codeTypeSms", + [ + 0x72A3158C, + [], + ], + ], + [ + "auth.codeTypeCall", + [ + 0x741CD3E3, + [], + ], + ], + [ + "auth.codeTypeFlashCall", + [ + 0x226CCEFB, + [], + ], + ], + [ + "auth.codeTypeMissedCall", + [ + 0xD61AD6EE, + [], + ], + ], + [ + "auth.codeTypeFragmentSms", + [ + 0x06ED998C, + [], + ], + ], + [ + "auth.sentCodeTypeApp", + [ + 0x3DBB5986, + [ + ["length", "number", "int"], + ], + ], + ], + [ + "auth.sentCodeTypeSms", + [ + 0xC000BBA2, + [ + ["length", "number", "int"], + ], + ], + ], + [ + "auth.sentCodeTypeCall", + [ + 0x5353E5A7, + [ + ["length", "number", "int"], + ], + ], + ], + [ + "auth.sentCodeTypeFlashCall", + [ + 0xAB03C6D9, + [ + ["pattern", "string", "string"], + ], + ], + ], + [ + "auth.sentCodeTypeMissedCall", + [ + 0x82006484, + [ + ["prefix", "string", "string"], + ["length", "number", "int"], + ], + ], + ], + [ + "auth.sentCodeTypeEmailCode", + [ + 0xF450F59B, + [ + ["flags", flags, "#"], + ["apple_signin_allowed", "true", "flags.0?true"], + ["google_signin_allowed", "true", "flags.1?true"], + ["email_pattern", "string", "string"], + ["length", "number", "int"], + ["reset_available_period", "number", "flags.3?int"], + ["reset_pending_date", "number", "flags.4?int"], + ], + ], + ], + [ + "auth.sentCodeTypeSetUpEmailRequired", + [ + 0xA5491DEA, + [ + ["flags", flags, "#"], + ["apple_signin_allowed", "true", "flags.0?true"], + ["google_signin_allowed", "true", "flags.1?true"], + ], + ], + ], + [ + "auth.sentCodeTypeFragmentSms", + [ + 0xD9565C39, + [ + ["url", "string", "string"], + ["length", "number", "int"], + ], + ], + ], + [ + "auth.sentCodeTypeFirebaseSms", + [ + 0xE57B1432, + [ + ["flags", flags, "#"], + ["nonce", Uint8Array, "flags.0?bytes"], + ["receipt", "string", "flags.1?string"], + ["push_timeout", "number", "flags.1?int"], + ["length", "number", "int"], + ], + ], + ], + [ + "messages.botCallbackAnswer", + [ + 0x36585EA4, + [ + ["flags", flags, "#"], + ["alert", "true", "flags.1?true"], + ["has_url", "true", "flags.3?true"], + ["native_ui", "true", "flags.4?true"], + ["message", "string", "flags.0?string"], + ["url", "string", "flags.2?string"], + ["cache_time", "number", "int"], + ], + ], + ], + [ + "messages.messageEditData", + [ + 0x26B5DDE6, + [ + ["flags", flags, "#"], + ["caption", "true", "flags.0?true"], + ], + ], + ], + [ + "inputBotInlineMessageID", + [ + 0x890C3D89, + [ + ["dc_id", "number", "int"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputBotInlineMessageID64", + [ + 0xB6D915D7, + [ + ["dc_id", "number", "int"], + ["owner_id", "bigint", "long"], + ["id", "number", "int"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inlineBotSwitchPM", + [ + 0x3C20629F, + [ + ["text", "string", "string"], + ["start_param", "string", "string"], + ], + ], + ], + [ + "messages.peerDialogs", + [ + 0x3371C354, + [ + ["dialogs", ["Dialog"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["state", "updates_State", "updates.State"], + ], + ], + ], + [ + "topPeer", + [ + 0xEDCDC05B, + [ + ["peer", "Peer", "Peer"], + ["rating", "number", "double"], + ], + ], + ], + [ + "topPeerCategoryBotsPM", + [ + 0xAB661B5B, + [], + ], + ], + [ + "topPeerCategoryBotsInline", + [ + 0x148677E2, + [], + ], + ], + [ + "topPeerCategoryCorrespondents", + [ + 0x0637B7ED, + [], + ], + ], + [ + "topPeerCategoryGroups", + [ + 0xBD17A14A, + [], + ], + ], + [ + "topPeerCategoryChannels", + [ + 0x161D9628, + [], + ], + ], + [ + "topPeerCategoryPhoneCalls", + [ + 0x1E76A78C, + [], + ], + ], + [ + "topPeerCategoryForwardUsers", + [ + 0xA8406CA9, + [], + ], + ], + [ + "topPeerCategoryForwardChats", + [ + 0xFBEEC0F0, + [], + ], + ], + [ + "topPeerCategoryPeers", + [ + 0xFB834291, + [ + ["category", "TopPeerCategory", "TopPeerCategory"], + ["count", "number", "int"], + ["peers", ["TopPeer"], "Vector"], + ], + ], + ], + [ + "contacts.topPeersNotModified", + [ + 0xDE266EF5, + [], + ], + ], + [ + "contacts.topPeers", + [ + 0x70B772A8, + [ + ["categories", ["TopPeerCategoryPeers"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "contacts.topPeersDisabled", + [ + 0xB52C939D, + [], + ], + ], + [ + "draftMessageEmpty", + [ + 0x1B0C841A, + [ + ["flags", flags, "#"], + ["date", "number", "flags.0?int"], + ], + ], + ], + [ + "draftMessage", + [ + 0x3FCCF7EF, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.1?true"], + ["invert_media", "true", "flags.6?true"], + ["reply_to", "InputReplyTo", "flags.4?InputReplyTo"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ["media", "InputMedia", "flags.5?InputMedia"], + ["date", "number", "int"], + ], + ], + ], + [ + "messages.featuredStickersNotModified", + [ + 0xC6DC0C66, + [ + ["count", "number", "int"], + ], + ], + ], + [ + "messages.featuredStickers", + [ + 0xBE382906, + [ + ["flags", flags, "#"], + ["premium", "true", "flags.0?true"], + ["hash", "bigint", "long"], + ["count", "number", "int"], + ["sets", ["StickerSetCovered"], "Vector"], + ["unread", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.recentStickersNotModified", + [ + 0x0B17F890, + [], + ], + ], + [ + "messages.recentStickers", + [ + 0x88D37C56, + [ + ["hash", "bigint", "long"], + ["packs", ["StickerPack"], "Vector"], + ["stickers", ["Document"], "Vector"], + ["dates", ["number"], "Vector"], + ], + ], + ], + [ + "messages.archivedStickers", + [ + 0x4FCBA9C8, + [ + ["count", "number", "int"], + ["sets", ["StickerSetCovered"], "Vector"], + ], + ], + ], + [ + "messages.stickerSetInstallResultSuccess", + [ + 0x38641628, + [], + ], + ], + [ + "messages.stickerSetInstallResultArchive", + [ + 0x35E410A8, + [ + ["sets", ["StickerSetCovered"], "Vector"], + ], + ], + ], + [ + "stickerSetCovered", + [ + 0x6410A5D2, + [ + ["set", "StickerSet", "StickerSet"], + ["cover", "Document", "Document"], + ], + ], + ], + [ + "stickerSetMultiCovered", + [ + 0x3407E51B, + [ + ["set", "StickerSet", "StickerSet"], + ["covers", ["Document"], "Vector"], + ], + ], + ], + [ + "stickerSetFullCovered", + [ + 0x40D13C0E, + [ + ["set", "StickerSet", "StickerSet"], + ["packs", ["StickerPack"], "Vector"], + ["keywords", ["StickerKeyword"], "Vector"], + ["documents", ["Document"], "Vector"], + ], + ], + ], + [ + "stickerSetNoCovered", + [ + 0x77B15D1C, + [ + ["set", "StickerSet", "StickerSet"], + ], + ], + ], + [ + "maskCoords", + [ + 0xAED6DBB2, + [ + ["n", "number", "int"], + ["x", "number", "double"], + ["y", "number", "double"], + ["zoom", "number", "double"], + ], + ], + ], + [ + "inputStickeredMediaPhoto", + [ + 0x4A992157, + [ + ["id", "InputPhoto", "InputPhoto"], + ], + ], + ], + [ + "inputStickeredMediaDocument", + [ + 0x0438865B, + [ + ["id", "InputDocument", "InputDocument"], + ], + ], + ], + [ + "game", + [ + 0xBDF9653B, + [ + ["flags", flags, "#"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["short_name", "string", "string"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "Photo", "Photo"], + ["document", "Document", "flags.0?Document"], + ], + ], + ], + [ + "inputGameID", + [ + 0x032C3E77, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputGameShortName", + [ + 0xC331E80A, + [ + ["bot_id", "InputUser", "InputUser"], + ["short_name", "string", "string"], + ], + ], + ], + [ + "highScore", + [ + 0x73A379EB, + [ + ["pos", "number", "int"], + ["user_id", "bigint", "long"], + ["score", "number", "int"], + ], + ], + ], + [ + "messages.highScores", + [ + 0x9A3BFD99, + [ + ["scores", ["HighScore"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "textEmpty", + [ + 0xDC3D824F, + [], + ], + ], + [ + "textPlain", + [ + 0x744694E0, + [ + ["text", "string", "string"], + ], + ], + ], + [ + "textBold", + [ + 0x6724ABC4, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textItalic", + [ + 0xD912A59C, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textUnderline", + [ + 0xC12622C4, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textStrike", + [ + 0x9BF8BB95, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textFixed", + [ + 0x6C3F19B9, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textUrl", + [ + 0x3C2884C1, + [ + ["text", "RichText", "RichText"], + ["url", "string", "string"], + ["webpage_id", "bigint", "long"], + ], + ], + ], + [ + "textEmail", + [ + 0xDE5A0DD6, + [ + ["text", "RichText", "RichText"], + ["email", "string", "string"], + ], + ], + ], + [ + "textConcat", + [ + 0x7E6260D7, + [ + ["texts", ["RichText"], "Vector"], + ], + ], + ], + [ + "textSubscript", + [ + 0xED6A8504, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textSuperscript", + [ + 0xC7FB5E01, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textMarked", + [ + 0x034B8621, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "textPhone", + [ + 0x1CCB966A, + [ + ["text", "RichText", "RichText"], + ["phone", "string", "string"], + ], + ], + ], + [ + "textImage", + [ + 0x081CCF4F, + [ + ["document_id", "bigint", "long"], + ["w", "number", "int"], + ["h", "number", "int"], + ], + ], + ], + [ + "textAnchor", + [ + 0x35553762, + [ + ["text", "RichText", "RichText"], + ["name", "string", "string"], + ], + ], + ], + [ + "pageBlockUnsupported", + [ + 0x13567E8A, + [], + ], + ], + [ + "pageBlockTitle", + [ + 0x70ABC3FD, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockSubtitle", + [ + 0x8FFA9A1F, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockAuthorDate", + [ + 0xBAAFE5E0, + [ + ["author", "RichText", "RichText"], + ["published_date", "number", "int"], + ], + ], + ], + [ + "pageBlockHeader", + [ + 0xBFD064EC, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockSubheader", + [ + 0xF12BB6E1, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockParagraph", + [ + 0x467A0766, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockPreformatted", + [ + 0xC070D93E, + [ + ["text", "RichText", "RichText"], + ["language", "string", "string"], + ], + ], + ], + [ + "pageBlockFooter", + [ + 0x48870999, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockDivider", + [ + 0xDB20B188, + [], + ], + ], + [ + "pageBlockAnchor", + [ + 0xCE0D37B0, + [ + ["name", "string", "string"], + ], + ], + ], + [ + "pageBlockList", + [ + 0xE4E88011, + [ + ["items", ["PageListItem"], "Vector"], + ], + ], + ], + [ + "pageBlockBlockquote", + [ + 0x263D7C26, + [ + ["text", "RichText", "RichText"], + ["caption", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockPullquote", + [ + 0x4F4456D3, + [ + ["text", "RichText", "RichText"], + ["caption", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockPhoto", + [ + 0x1759C560, + [ + ["flags", flags, "#"], + ["photo_id", "bigint", "long"], + ["caption", "PageCaption", "PageCaption"], + ["url", "string", "flags.0?string"], + ["webpage_id", "bigint", "flags.0?long"], + ], + ], + ], + [ + "pageBlockVideo", + [ + 0x7C8FE7B6, + [ + ["flags", flags, "#"], + ["autoplay", "true", "flags.0?true"], + ["loop", "true", "flags.1?true"], + ["video_id", "bigint", "long"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "pageBlockCover", + [ + 0x39F23300, + [ + ["cover", "PageBlock", "PageBlock"], + ], + ], + ], + [ + "pageBlockEmbed", + [ + 0xA8718DC5, + [ + ["flags", flags, "#"], + ["full_width", "true", "flags.0?true"], + ["allow_scrolling", "true", "flags.3?true"], + ["url", "string", "flags.1?string"], + ["html", "string", "flags.2?string"], + ["poster_photo_id", "bigint", "flags.4?long"], + ["w", "number", "flags.5?int"], + ["h", "number", "flags.5?int"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "pageBlockEmbedPost", + [ + 0xF259A80B, + [ + ["url", "string", "string"], + ["webpage_id", "bigint", "long"], + ["author_photo_id", "bigint", "long"], + ["author", "string", "string"], + ["date", "number", "int"], + ["blocks", ["PageBlock"], "Vector"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "pageBlockCollage", + [ + 0x65A0FA4D, + [ + ["items", ["PageBlock"], "Vector"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "pageBlockSlideshow", + [ + 0x031F9590, + [ + ["items", ["PageBlock"], "Vector"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "pageBlockChannel", + [ + 0xEF1751B5, + [ + ["channel", "Chat", "Chat"], + ], + ], + ], + [ + "pageBlockAudio", + [ + 0x804361EA, + [ + ["audio_id", "bigint", "long"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "pageBlockKicker", + [ + 0x1E148390, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockTable", + [ + 0xBF4DEA82, + [ + ["flags", flags, "#"], + ["bordered", "true", "flags.0?true"], + ["striped", "true", "flags.1?true"], + ["title", "RichText", "RichText"], + ["rows", ["PageTableRow"], "Vector"], + ], + ], + ], + [ + "pageBlockOrderedList", + [ + 0x9A8AE1E1, + [ + ["items", ["PageListOrderedItem"], "Vector"], + ], + ], + ], + [ + "pageBlockDetails", + [ + 0x76768BED, + [ + ["flags", flags, "#"], + ["open", "true", "flags.0?true"], + ["blocks", ["PageBlock"], "Vector"], + ["title", "RichText", "RichText"], + ], + ], + ], + [ + "pageBlockRelatedArticles", + [ + 0x16115A96, + [ + ["title", "RichText", "RichText"], + ["articles", ["PageRelatedArticle"], "Vector"], + ], + ], + ], + [ + "pageBlockMap", + [ + 0xA44F3EF6, + [ + ["geo", "GeoPoint", "GeoPoint"], + ["zoom", "number", "int"], + ["w", "number", "int"], + ["h", "number", "int"], + ["caption", "PageCaption", "PageCaption"], + ], + ], + ], + [ + "phoneCallDiscardReasonMissed", + [ + 0x85E42301, + [], + ], + ], + [ + "phoneCallDiscardReasonDisconnect", + [ + 0xE095C1A0, + [], + ], + ], + [ + "phoneCallDiscardReasonHangup", + [ + 0x57ADC690, + [], + ], + ], + [ + "phoneCallDiscardReasonBusy", + [ + 0xFAF7E8C9, + [], + ], + ], + [ + "dataJSON", + [ + 0x7D748D04, + [ + ["data", "string", "string"], + ], + ], + ], + [ + "labeledPrice", + [ + 0xCB296BF8, + [ + ["label", "string", "string"], + ["amount", "bigint", "long"], + ], + ], + ], + [ + "invoice", + [ + 0x5DB95A15, + [ + ["flags", flags, "#"], + ["test", "true", "flags.0?true"], + ["name_requested", "true", "flags.1?true"], + ["phone_requested", "true", "flags.2?true"], + ["email_requested", "true", "flags.3?true"], + ["shipping_address_requested", "true", "flags.4?true"], + ["flexible", "true", "flags.5?true"], + ["phone_to_provider", "true", "flags.6?true"], + ["email_to_provider", "true", "flags.7?true"], + ["recurring", "true", "flags.9?true"], + ["currency", "string", "string"], + ["prices", ["LabeledPrice"], "Vector"], + ["max_tip_amount", "bigint", "flags.8?long"], + ["suggested_tip_amounts", ["bigint"], "flags.8?Vector"], + ["terms_url", "string", "flags.10?string"], + ], + ], + ], + [ + "paymentCharge", + [ + 0xEA02C27E, + [ + ["id", "string", "string"], + ["provider_charge_id", "string", "string"], + ], + ], + ], + [ + "postAddress", + [ + 0x1E8CAAEB, + [ + ["street_line1", "string", "string"], + ["street_line2", "string", "string"], + ["city", "string", "string"], + ["state", "string", "string"], + ["country_iso2", "string", "string"], + ["post_code", "string", "string"], + ], + ], + ], + [ + "paymentRequestedInfo", + [ + 0x909C3F94, + [ + ["flags", flags, "#"], + ["name", "string", "flags.0?string"], + ["phone", "string", "flags.1?string"], + ["email", "string", "flags.2?string"], + ["shipping_address", "PostAddress", "flags.3?PostAddress"], + ], + ], + ], + [ + "paymentSavedCredentialsCard", + [ + 0xCDC27A1F, + [ + ["id", "string", "string"], + ["title", "string", "string"], + ], + ], + ], + [ + "webDocument", + [ + 0x1C570ED1, + [ + ["url", "string", "string"], + ["access_hash", "bigint", "long"], + ["size", "number", "int"], + ["mime_type", "string", "string"], + ["attributes", ["DocumentAttribute"], "Vector"], + ], + ], + ], + [ + "webDocumentNoProxy", + [ + 0xF9C8BCC6, + [ + ["url", "string", "string"], + ["size", "number", "int"], + ["mime_type", "string", "string"], + ["attributes", ["DocumentAttribute"], "Vector"], + ], + ], + ], + [ + "inputWebDocument", + [ + 0x9BED434D, + [ + ["url", "string", "string"], + ["size", "number", "int"], + ["mime_type", "string", "string"], + ["attributes", ["DocumentAttribute"], "Vector"], + ], + ], + ], + [ + "inputWebFileLocation", + [ + 0xC239D686, + [ + ["url", "string", "string"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputWebFileGeoPointLocation", + [ + 0x9F2221C9, + [ + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["access_hash", "bigint", "long"], + ["w", "number", "int"], + ["h", "number", "int"], + ["zoom", "number", "int"], + ["scale", "number", "int"], + ], + ], + ], + [ + "inputWebFileAudioAlbumThumbLocation", + [ + 0xF46FE924, + [ + ["flags", flags, "#"], + ["small", "true", "flags.2?true"], + ["document", "InputDocument", "flags.0?InputDocument"], + ["title", "string", "flags.1?string"], + ["performer", "string", "flags.1?string"], + ], + ], + ], + [ + "upload.webFile", + [ + 0x21E753BC, + [ + ["size", "number", "int"], + ["mime_type", "string", "string"], + ["file_type", "storage_FileType", "storage.FileType"], + ["mtime", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "payments.paymentForm", + [ + 0xA0058751, + [ + ["flags", flags, "#"], + ["can_save_credentials", "true", "flags.2?true"], + ["password_missing", "true", "flags.3?true"], + ["form_id", "bigint", "long"], + ["bot_id", "bigint", "long"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "WebDocument", "flags.5?WebDocument"], + ["invoice", "Invoice", "Invoice"], + ["provider_id", "bigint", "long"], + ["url", "string", "string"], + ["native_provider", "string", "flags.4?string"], + ["native_params", "DataJSON", "flags.4?DataJSON"], + ["additional_methods", ["PaymentFormMethod"], "flags.6?Vector"], + ["saved_info", "PaymentRequestedInfo", "flags.0?PaymentRequestedInfo"], + ["saved_credentials", ["PaymentSavedCredentials"], "flags.1?Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "payments.validatedRequestedInfo", + [ + 0xD1451883, + [ + ["flags", flags, "#"], + ["id", "string", "flags.0?string"], + ["shipping_options", ["ShippingOption"], "flags.1?Vector"], + ], + ], + ], + [ + "payments.paymentResult", + [ + 0x4E5F810D, + [ + ["updates", "Updates", "Updates"], + ], + ], + ], + [ + "payments.paymentVerificationNeeded", + [ + 0xD8411139, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "payments.paymentReceipt", + [ + 0x70C4FE03, + [ + ["flags", flags, "#"], + ["date", "number", "int"], + ["bot_id", "bigint", "long"], + ["provider_id", "bigint", "long"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "WebDocument", "flags.2?WebDocument"], + ["invoice", "Invoice", "Invoice"], + ["info", "PaymentRequestedInfo", "flags.0?PaymentRequestedInfo"], + ["shipping", "ShippingOption", "flags.1?ShippingOption"], + ["tip_amount", "bigint", "flags.3?long"], + ["currency", "string", "string"], + ["total_amount", "bigint", "long"], + ["credentials_title", "string", "string"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "payments.savedInfo", + [ + 0xFB8FE43C, + [ + ["flags", flags, "#"], + ["has_saved_credentials", "true", "flags.1?true"], + ["saved_info", "PaymentRequestedInfo", "flags.0?PaymentRequestedInfo"], + ], + ], + ], + [ + "inputPaymentCredentialsSaved", + [ + 0xC10EB2CF, + [ + ["id", "string", "string"], + ["tmp_password", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputPaymentCredentials", + [ + 0x3417D728, + [ + ["flags", flags, "#"], + ["save", "true", "flags.0?true"], + ["data", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "inputPaymentCredentialsApplePay", + [ + 0x0AA1C39F, + [ + ["payment_data", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "inputPaymentCredentialsGooglePay", + [ + 0x8AC32801, + [ + ["payment_token", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "account.tmpPassword", + [ + 0xDB64FD34, + [ + ["tmp_password", Uint8Array, "bytes"], + ["valid_until", "number", "int"], + ], + ], + ], + [ + "shippingOption", + [ + 0xB6213CDF, + [ + ["id", "string", "string"], + ["title", "string", "string"], + ["prices", ["LabeledPrice"], "Vector"], + ], + ], + ], + [ + "inputStickerSetItem", + [ + 0x32DA9E9C, + [ + ["flags", flags, "#"], + ["document", "InputDocument", "InputDocument"], + ["emoji", "string", "string"], + ["mask_coords", "MaskCoords", "flags.0?MaskCoords"], + ["keywords", "string", "flags.1?string"], + ], + ], + ], + [ + "inputPhoneCall", + [ + 0x1E36FDED, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "phoneCallEmpty", + [ + 0x5366C915, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "phoneCallWaiting", + [ + 0xC5226F17, + [ + ["flags", flags, "#"], + ["video", "true", "flags.6?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ["receive_date", "number", "flags.0?int"], + ], + ], + ], + [ + "phoneCallRequested", + [ + 0x14B0ED0C, + [ + ["flags", flags, "#"], + ["video", "true", "flags.6?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ["g_a_hash", Uint8Array, "bytes"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ], + ], + ], + [ + "phoneCallAccepted", + [ + 0x3660C311, + [ + ["flags", flags, "#"], + ["video", "true", "flags.6?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ["g_b", Uint8Array, "bytes"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ], + ], + ], + [ + "phoneCall", + [ + 0x30535AF5, + [ + ["flags", flags, "#"], + ["p2p_allowed", "true", "flags.5?true"], + ["video", "true", "flags.6?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["date", "number", "int"], + ["admin_id", "bigint", "long"], + ["participant_id", "bigint", "long"], + ["g_a_or_b", Uint8Array, "bytes"], + ["key_fingerprint", "bigint", "long"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ["connections", ["PhoneConnection"], "Vector"], + ["start_date", "number", "int"], + ["custom_parameters", "DataJSON", "flags.7?DataJSON"], + ], + ], + ], + [ + "phoneCallDiscarded", + [ + 0x50CA4DE1, + [ + ["flags", flags, "#"], + ["need_rating", "true", "flags.2?true"], + ["need_debug", "true", "flags.3?true"], + ["video", "true", "flags.6?true"], + ["id", "bigint", "long"], + ["reason", "PhoneCallDiscardReason", "flags.0?PhoneCallDiscardReason"], + ["duration", "number", "flags.1?int"], + ], + ], + ], + [ + "phoneConnection", + [ + 0x9CC123C7, + [ + ["flags", flags, "#"], + ["tcp", "true", "flags.0?true"], + ["id", "bigint", "long"], + ["ip", "string", "string"], + ["ipv6", "string", "string"], + ["port", "number", "int"], + ["peer_tag", Uint8Array, "bytes"], + ], + ], + ], + [ + "phoneConnectionWebrtc", + [ + 0x635FE375, + [ + ["flags", flags, "#"], + ["turn", "true", "flags.0?true"], + ["stun", "true", "flags.1?true"], + ["id", "bigint", "long"], + ["ip", "string", "string"], + ["ipv6", "string", "string"], + ["port", "number", "int"], + ["username", "string", "string"], + ["password", "string", "string"], + ], + ], + ], + [ + "phoneCallProtocol", + [ + 0xFC878FC8, + [ + ["flags", flags, "#"], + ["udp_p2p", "true", "flags.0?true"], + ["udp_reflector", "true", "flags.1?true"], + ["min_layer", "number", "int"], + ["max_layer", "number", "int"], + ["library_versions", ["string"], "Vector"], + ], + ], + ], + [ + "phone.phoneCall", + [ + 0xEC82E140, + [ + ["phone_call", "PhoneCall", "PhoneCall"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "upload.cdnFileReuploadNeeded", + [ + 0xEEA8E46E, + [ + ["request_token", Uint8Array, "bytes"], + ], + ], + ], + [ + "upload.cdnFile", + [ + 0xA99FCA4F, + [ + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "cdnPublicKey", + [ + 0xC982EABA, + [ + ["dc_id", "number", "int"], + ["public_key", "string", "string"], + ], + ], + ], + [ + "cdnConfig", + [ + 0x5725E40A, + [ + ["public_keys", ["CdnPublicKey"], "Vector"], + ], + ], + ], + [ + "langPackString", + [ + 0xCAD181F6, + [ + ["key", "string", "string"], + ["value", "string", "string"], + ], + ], + ], + [ + "langPackStringPluralized", + [ + 0x6C47AC9F, + [ + ["flags", flags, "#"], + ["key", "string", "string"], + ["zero_value", "string", "flags.0?string"], + ["one_value", "string", "flags.1?string"], + ["two_value", "string", "flags.2?string"], + ["few_value", "string", "flags.3?string"], + ["many_value", "string", "flags.4?string"], + ["other_value", "string", "string"], + ], + ], + ], + [ + "langPackStringDeleted", + [ + 0x2979EEB2, + [ + ["key", "string", "string"], + ], + ], + ], + [ + "langPackDifference", + [ + 0xF385C1F6, + [ + ["lang_code", "string", "string"], + ["from_version", "number", "int"], + ["version", "number", "int"], + ["strings", ["LangPackString"], "Vector"], + ], + ], + ], + [ + "langPackLanguage", + [ + 0xEECA5CE3, + [ + ["flags", flags, "#"], + ["official", "true", "flags.0?true"], + ["rtl", "true", "flags.2?true"], + ["beta", "true", "flags.3?true"], + ["name", "string", "string"], + ["native_name", "string", "string"], + ["lang_code", "string", "string"], + ["base_lang_code", "string", "flags.1?string"], + ["plural_code", "string", "string"], + ["strings_count", "number", "int"], + ["translated_count", "number", "int"], + ["translations_url", "string", "string"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeTitle", + [ + 0xE6DFB825, + [ + ["prev_value", "string", "string"], + ["new_value", "string", "string"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeAbout", + [ + 0x55188A2E, + [ + ["prev_value", "string", "string"], + ["new_value", "string", "string"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeUsername", + [ + 0x6A4AFC38, + [ + ["prev_value", "string", "string"], + ["new_value", "string", "string"], + ], + ], + ], + [ + "channelAdminLogEventActionChangePhoto", + [ + 0x434BD2AF, + [ + ["prev_photo", "Photo", "Photo"], + ["new_photo", "Photo", "Photo"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleInvites", + [ + 0x1B7907AE, + [ + ["new_value", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleSignatures", + [ + 0x26AE0971, + [ + ["new_value", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionUpdatePinned", + [ + 0xE9E82C18, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "channelAdminLogEventActionEditMessage", + [ + 0x709B2405, + [ + ["prev_message", "Message", "Message"], + ["new_message", "Message", "Message"], + ], + ], + ], + [ + "channelAdminLogEventActionDeleteMessage", + [ + 0x42E047BB, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantJoin", + [ + 0x183040D3, + [], + ], + ], + [ + "channelAdminLogEventActionParticipantLeave", + [ + 0xF89777F2, + [], + ], + ], + [ + "channelAdminLogEventActionParticipantInvite", + [ + 0xE31C34D8, + [ + ["participant", "ChannelParticipant", "ChannelParticipant"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantToggleBan", + [ + 0xE6D83D7E, + [ + ["prev_participant", "ChannelParticipant", "ChannelParticipant"], + ["new_participant", "ChannelParticipant", "ChannelParticipant"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantToggleAdmin", + [ + 0xD5676710, + [ + ["prev_participant", "ChannelParticipant", "ChannelParticipant"], + ["new_participant", "ChannelParticipant", "ChannelParticipant"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeStickerSet", + [ + 0xB1C3CAA7, + [ + ["prev_stickerset", "InputStickerSet", "InputStickerSet"], + ["new_stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "channelAdminLogEventActionTogglePreHistoryHidden", + [ + 0x5F5C95F1, + [ + ["new_value", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionDefaultBannedRights", + [ + 0x2DF5FC0A, + [ + ["prev_banned_rights", "ChatBannedRights", "ChatBannedRights"], + ["new_banned_rights", "ChatBannedRights", "ChatBannedRights"], + ], + ], + ], + [ + "channelAdminLogEventActionStopPoll", + [ + 0x8F079643, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeLinkedChat", + [ + 0x050C7AC8, + [ + ["prev_value", "bigint", "long"], + ["new_value", "bigint", "long"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeLocation", + [ + 0x0E6B76AE, + [ + ["prev_value", "ChannelLocation", "ChannelLocation"], + ["new_value", "ChannelLocation", "ChannelLocation"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleSlowMode", + [ + 0x53909779, + [ + ["prev_value", "number", "int"], + ["new_value", "number", "int"], + ], + ], + ], + [ + "channelAdminLogEventActionStartGroupCall", + [ + 0x23209745, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "channelAdminLogEventActionDiscardGroupCall", + [ + 0xDB9F9140, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantMute", + [ + 0xF92424D2, + [ + ["participant", "GroupCallParticipant", "GroupCallParticipant"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantUnmute", + [ + 0xE64429C0, + [ + ["participant", "GroupCallParticipant", "GroupCallParticipant"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleGroupCallSetting", + [ + 0x56D6A247, + [ + ["join_muted", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantJoinByInvite", + [ + 0xFE9FC158, + [ + ["flags", flags, "#"], + ["via_chatlist", "true", "flags.0?true"], + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ], + ], + ], + [ + "channelAdminLogEventActionExportedInviteDelete", + [ + 0x5A50FCA4, + [ + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ], + ], + ], + [ + "channelAdminLogEventActionExportedInviteRevoke", + [ + 0x410A134E, + [ + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ], + ], + ], + [ + "channelAdminLogEventActionExportedInviteEdit", + [ + 0xE90EBB59, + [ + ["prev_invite", "ExportedChatInvite", "ExportedChatInvite"], + ["new_invite", "ExportedChatInvite", "ExportedChatInvite"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantVolume", + [ + 0x3E7F6847, + [ + ["participant", "GroupCallParticipant", "GroupCallParticipant"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeHistoryTTL", + [ + 0x6E941A38, + [ + ["prev_value", "number", "int"], + ["new_value", "number", "int"], + ], + ], + ], + [ + "channelAdminLogEventActionParticipantJoinByRequest", + [ + 0xAFB6144A, + [ + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ["approved_by", "bigint", "long"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleNoForwards", + [ + 0xCB2AC766, + [ + ["new_value", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionSendMessage", + [ + 0x278F2868, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeAvailableReactions", + [ + 0xBE4E0EF8, + [ + ["prev_value", "ChatReactions", "ChatReactions"], + ["new_value", "ChatReactions", "ChatReactions"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeUsernames", + [ + 0xF04FB3A9, + [ + ["prev_value", ["string"], "Vector"], + ["new_value", ["string"], "Vector"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleForum", + [ + 0x02CC6383, + [ + ["new_value", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionCreateTopic", + [ + 0x58707D28, + [ + ["topic", "ForumTopic", "ForumTopic"], + ], + ], + ], + [ + "channelAdminLogEventActionEditTopic", + [ + 0xF06FE208, + [ + ["prev_topic", "ForumTopic", "ForumTopic"], + ["new_topic", "ForumTopic", "ForumTopic"], + ], + ], + ], + [ + "channelAdminLogEventActionDeleteTopic", + [ + 0xAE168909, + [ + ["topic", "ForumTopic", "ForumTopic"], + ], + ], + ], + [ + "channelAdminLogEventActionPinTopic", + [ + 0x5D8D353B, + [ + ["flags", flags, "#"], + ["prev_topic", "ForumTopic", "flags.0?ForumTopic"], + ["new_topic", "ForumTopic", "flags.1?ForumTopic"], + ], + ], + ], + [ + "channelAdminLogEventActionToggleAntiSpam", + [ + 0x64F36DFC, + [ + ["new_value", "boolean", "Bool"], + ], + ], + ], + [ + "channelAdminLogEventActionChangePeerColor", + [ + 0x5796E780, + [ + ["prev_value", "PeerColor", "PeerColor"], + ["new_value", "PeerColor", "PeerColor"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeProfilePeerColor", + [ + 0x5E477B25, + [ + ["prev_value", "PeerColor", "PeerColor"], + ["new_value", "PeerColor", "PeerColor"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeWallpaper", + [ + 0x31BB5D52, + [ + ["prev_value", "WallPaper", "WallPaper"], + ["new_value", "WallPaper", "WallPaper"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeEmojiStatus", + [ + 0x3EA9FEB1, + [ + ["prev_value", "EmojiStatus", "EmojiStatus"], + ["new_value", "EmojiStatus", "EmojiStatus"], + ], + ], + ], + [ + "channelAdminLogEventActionChangeEmojiStickerSet", + [ + 0x46D840AB, + [ + ["prev_stickerset", "InputStickerSet", "InputStickerSet"], + ["new_stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "channelAdminLogEvent", + [ + 0x1FAD68CD, + [ + ["id", "bigint", "long"], + ["date", "number", "int"], + ["user_id", "bigint", "long"], + ["action", "ChannelAdminLogEventAction", "ChannelAdminLogEventAction"], + ], + ], + ], + [ + "channels.adminLogResults", + [ + 0xED8AF74D, + [ + ["events", ["ChannelAdminLogEvent"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "channelAdminLogEventsFilter", + [ + 0xEA107AE4, + [ + ["flags", flags, "#"], + ["join", "true", "flags.0?true"], + ["leave", "true", "flags.1?true"], + ["invite", "true", "flags.2?true"], + ["ban", "true", "flags.3?true"], + ["unban", "true", "flags.4?true"], + ["kick", "true", "flags.5?true"], + ["unkick", "true", "flags.6?true"], + ["promote", "true", "flags.7?true"], + ["demote", "true", "flags.8?true"], + ["info", "true", "flags.9?true"], + ["settings", "true", "flags.10?true"], + ["pinned", "true", "flags.11?true"], + ["edit", "true", "flags.12?true"], + ["delete", "true", "flags.13?true"], + ["group_call", "true", "flags.14?true"], + ["invites", "true", "flags.15?true"], + ["send", "true", "flags.16?true"], + ["forums", "true", "flags.17?true"], + ], + ], + ], + [ + "popularContact", + [ + 0x5CE14175, + [ + ["client_id", "bigint", "long"], + ["importers", "number", "int"], + ], + ], + ], + [ + "messages.favedStickersNotModified", + [ + 0x9E8FA6D3, + [], + ], + ], + [ + "messages.favedStickers", + [ + 0x2CB51097, + [ + ["hash", "bigint", "long"], + ["packs", ["StickerPack"], "Vector"], + ["stickers", ["Document"], "Vector"], + ], + ], + ], + [ + "recentMeUrlUnknown", + [ + 0x46E1D13D, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "recentMeUrlUser", + [ + 0xB92C09E2, + [ + ["url", "string", "string"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "recentMeUrlChat", + [ + 0xB2DA71D2, + [ + ["url", "string", "string"], + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "recentMeUrlChatInvite", + [ + 0xEB49081D, + [ + ["url", "string", "string"], + ["chat_invite", "ChatInvite", "ChatInvite"], + ], + ], + ], + [ + "recentMeUrlStickerSet", + [ + 0xBC0A57DC, + [ + ["url", "string", "string"], + ["set", "StickerSetCovered", "StickerSetCovered"], + ], + ], + ], + [ + "help.recentMeUrls", + [ + 0x0E0310D7, + [ + ["urls", ["RecentMeUrl"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "inputSingleMedia", + [ + 0x1CC6E91F, + [ + ["flags", flags, "#"], + ["media", "InputMedia", "InputMedia"], + ["random_id", "bigint", "long"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.0?Vector"], + ], + ], + ], + [ + "webAuthorization", + [ + 0xA6F8F452, + [ + ["hash", "bigint", "long"], + ["bot_id", "bigint", "long"], + ["domain", "string", "string"], + ["browser", "string", "string"], + ["platform", "string", "string"], + ["date_created", "number", "int"], + ["date_active", "number", "int"], + ["ip", "string", "string"], + ["region", "string", "string"], + ], + ], + ], + [ + "account.webAuthorizations", + [ + 0xED56C9FC, + [ + ["authorizations", ["WebAuthorization"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "inputMessageID", + [ + 0xA676A322, + [ + ["id", "number", "int"], + ], + ], + ], + [ + "inputMessageReplyTo", + [ + 0xBAD88395, + [ + ["id", "number", "int"], + ], + ], + ], + [ + "inputMessagePinned", + [ + 0x86872538, + [], + ], + ], + [ + "inputMessageCallbackQuery", + [ + 0xACFA1A7E, + [ + ["id", "number", "int"], + ["query_id", "bigint", "long"], + ], + ], + ], + [ + "inputDialogPeer", + [ + 0xFCAAFEB7, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "inputDialogPeerFolder", + [ + 0x64600527, + [ + ["folder_id", "number", "int"], + ], + ], + ], + [ + "dialogPeer", + [ + 0xE56DBF05, + [ + ["peer", "Peer", "Peer"], + ], + ], + ], + [ + "dialogPeerFolder", + [ + 0x514519E2, + [ + ["folder_id", "number", "int"], + ], + ], + ], + [ + "messages.foundStickerSetsNotModified", + [ + 0x0D54B65D, + [], + ], + ], + [ + "messages.foundStickerSets", + [ + 0x8AF09DD2, + [ + ["hash", "bigint", "long"], + ["sets", ["StickerSetCovered"], "Vector"], + ], + ], + ], + [ + "fileHash", + [ + 0xF39B035C, + [ + ["offset", "bigint", "long"], + ["limit", "number", "int"], + ["hash", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputClientProxy", + [ + 0x75588B3F, + [ + ["address", "string", "string"], + ["port", "number", "int"], + ], + ], + ], + [ + "help.termsOfServiceUpdateEmpty", + [ + 0xE3309F7F, + [ + ["expires", "number", "int"], + ], + ], + ], + [ + "help.termsOfServiceUpdate", + [ + 0x28ECF961, + [ + ["expires", "number", "int"], + ["terms_of_service", "help_TermsOfService", "help.TermsOfService"], + ], + ], + ], + [ + "inputSecureFileUploaded", + [ + 0x3334B0F0, + [ + ["id", "bigint", "long"], + ["parts", "number", "int"], + ["md5_checksum", "string", "string"], + ["file_hash", Uint8Array, "bytes"], + ["secret", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputSecureFile", + [ + 0x5367E5BE, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "secureFileEmpty", + [ + 0x64199744, + [], + ], + ], + [ + "secureFile", + [ + 0x7D09C27E, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["size", "bigint", "long"], + ["dc_id", "number", "int"], + ["date", "number", "int"], + ["file_hash", Uint8Array, "bytes"], + ["secret", Uint8Array, "bytes"], + ], + ], + ], + [ + "secureData", + [ + 0x8AEABEC3, + [ + ["data", Uint8Array, "bytes"], + ["data_hash", Uint8Array, "bytes"], + ["secret", Uint8Array, "bytes"], + ], + ], + ], + [ + "securePlainPhone", + [ + 0x7D6099DD, + [ + ["phone", "string", "string"], + ], + ], + ], + [ + "securePlainEmail", + [ + 0x21EC5A5F, + [ + ["email", "string", "string"], + ], + ], + ], + [ + "secureValueTypePersonalDetails", + [ + 0x9D2A81E3, + [], + ], + ], + [ + "secureValueTypePassport", + [ + 0x3DAC6A00, + [], + ], + ], + [ + "secureValueTypeDriverLicense", + [ + 0x06E425C4, + [], + ], + ], + [ + "secureValueTypeIdentityCard", + [ + 0xA0D0744B, + [], + ], + ], + [ + "secureValueTypeInternalPassport", + [ + 0x99A48F23, + [], + ], + ], + [ + "secureValueTypeAddress", + [ + 0xCBE31E26, + [], + ], + ], + [ + "secureValueTypeUtilityBill", + [ + 0xFC36954E, + [], + ], + ], + [ + "secureValueTypeBankStatement", + [ + 0x89137C0D, + [], + ], + ], + [ + "secureValueTypeRentalAgreement", + [ + 0x8B883488, + [], + ], + ], + [ + "secureValueTypePassportRegistration", + [ + 0x99E3806A, + [], + ], + ], + [ + "secureValueTypeTemporaryRegistration", + [ + 0xEA02EC33, + [], + ], + ], + [ + "secureValueTypePhone", + [ + 0xB320AADB, + [], + ], + ], + [ + "secureValueTypeEmail", + [ + 0x8E3CA7EE, + [], + ], + ], + [ + "secureValue", + [ + 0x187FA0CA, + [ + ["flags", flags, "#"], + ["type", "SecureValueType", "SecureValueType"], + ["data", "SecureData", "flags.0?SecureData"], + ["front_side", "SecureFile", "flags.1?SecureFile"], + ["reverse_side", "SecureFile", "flags.2?SecureFile"], + ["selfie", "SecureFile", "flags.3?SecureFile"], + ["translation", ["SecureFile"], "flags.6?Vector"], + ["files", ["SecureFile"], "flags.4?Vector"], + ["plain_data", "SecurePlainData", "flags.5?SecurePlainData"], + ["hash", Uint8Array, "bytes"], + ], + ], + ], + [ + "inputSecureValue", + [ + 0xDB21D0A7, + [ + ["flags", flags, "#"], + ["type", "SecureValueType", "SecureValueType"], + ["data", "SecureData", "flags.0?SecureData"], + ["front_side", "InputSecureFile", "flags.1?InputSecureFile"], + ["reverse_side", "InputSecureFile", "flags.2?InputSecureFile"], + ["selfie", "InputSecureFile", "flags.3?InputSecureFile"], + ["translation", ["InputSecureFile"], "flags.6?Vector"], + ["files", ["InputSecureFile"], "flags.4?Vector"], + ["plain_data", "SecurePlainData", "flags.5?SecurePlainData"], + ], + ], + ], + [ + "secureValueHash", + [ + 0xED1ECDB0, + [ + ["type", "SecureValueType", "SecureValueType"], + ["hash", Uint8Array, "bytes"], + ], + ], + ], + [ + "secureValueErrorData", + [ + 0xE8A40BD9, + [ + ["type", "SecureValueType", "SecureValueType"], + ["data_hash", Uint8Array, "bytes"], + ["field", "string", "string"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorFrontSide", + [ + 0x00BE3DFA, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", Uint8Array, "bytes"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorReverseSide", + [ + 0x868A2AA5, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", Uint8Array, "bytes"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorSelfie", + [ + 0xE537CED6, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", Uint8Array, "bytes"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorFile", + [ + 0x7A700873, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", Uint8Array, "bytes"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorFiles", + [ + 0x666220E9, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", [Uint8Array], "Vector"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueError", + [ + 0x869D758F, + [ + ["type", "SecureValueType", "SecureValueType"], + ["hash", Uint8Array, "bytes"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorTranslationFile", + [ + 0xA1144770, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", Uint8Array, "bytes"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureValueErrorTranslationFiles", + [ + 0x34636DD8, + [ + ["type", "SecureValueType", "SecureValueType"], + ["file_hash", [Uint8Array], "Vector"], + ["text", "string", "string"], + ], + ], + ], + [ + "secureCredentialsEncrypted", + [ + 0x33F0EA47, + [ + ["data", Uint8Array, "bytes"], + ["hash", Uint8Array, "bytes"], + ["secret", Uint8Array, "bytes"], + ], + ], + ], + [ + "account.authorizationForm", + [ + 0xAD2E1CD8, + [ + ["flags", flags, "#"], + ["required_types", ["SecureRequiredType"], "Vector"], + ["values", ["SecureValue"], "Vector"], + ["errors", ["SecureValueError"], "Vector"], + ["users", ["User"], "Vector"], + ["privacy_policy_url", "string", "flags.0?string"], + ], + ], + ], + [ + "account.sentEmailCode", + [ + 0x811F854F, + [ + ["email_pattern", "string", "string"], + ["length", "number", "int"], + ], + ], + ], + [ + "help.deepLinkInfoEmpty", + [ + 0x66AFA166, + [], + ], + ], + [ + "help.deepLinkInfo", + [ + 0x6A4EE832, + [ + ["flags", flags, "#"], + ["update_app", "true", "flags.0?true"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ], + ], + ], + [ + "savedPhoneContact", + [ + 0x1142BD56, + [ + ["phone", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["date", "number", "int"], + ], + ], + ], + [ + "account.takeout", + [ + 0x4DBA4501, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "passwordKdfAlgoUnknown", + [ + 0xD45AB096, + [], + ], + ], + [ + "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", + [ + 0x3A912D4A, + [ + ["salt1", Uint8Array, "bytes"], + ["salt2", Uint8Array, "bytes"], + ["g", "number", "int"], + ["p", Uint8Array, "bytes"], + ], + ], + ], + [ + "securePasswordKdfAlgoUnknown", + [ + 0x004A8537, + [], + ], + ], + [ + "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", + [ + 0xBBF2DDA0, + [ + ["salt", Uint8Array, "bytes"], + ], + ], + ], + [ + "securePasswordKdfAlgoSHA512", + [ + 0x86471D92, + [ + ["salt", Uint8Array, "bytes"], + ], + ], + ], + [ + "secureSecretSettings", + [ + 0x1527BCAC, + [ + ["secure_algo", "SecurePasswordKdfAlgo", "SecurePasswordKdfAlgo"], + ["secure_secret", Uint8Array, "bytes"], + ["secure_secret_id", "bigint", "long"], + ], + ], + ], + [ + "inputCheckPasswordEmpty", + [ + 0x9880F658, + [], + ], + ], + [ + "inputCheckPasswordSRP", + [ + 0xD27FF082, + [ + ["srp_id", "bigint", "long"], + ["A", Uint8Array, "bytes"], + ["M1", Uint8Array, "bytes"], + ], + ], + ], + [ + "secureRequiredType", + [ + 0x829D99DA, + [ + ["flags", flags, "#"], + ["native_names", "true", "flags.0?true"], + ["selfie_required", "true", "flags.1?true"], + ["translation_required", "true", "flags.2?true"], + ["type", "SecureValueType", "SecureValueType"], + ], + ], + ], + [ + "secureRequiredTypeOneOf", + [ + 0x027477B4, + [ + ["types", ["SecureRequiredType"], "Vector"], + ], + ], + ], + [ + "help.passportConfigNotModified", + [ + 0xBFB9F457, + [], + ], + ], + [ + "help.passportConfig", + [ + 0xA098D6AF, + [ + ["hash", "number", "int"], + ["countries_langs", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "inputAppEvent", + [ + 0x1D1B1245, + [ + ["time", "number", "double"], + ["type", "string", "string"], + ["peer", "bigint", "long"], + ["data", "JSONValue", "JSONValue"], + ], + ], + ], + [ + "jsonObjectValue", + [ + 0xC0DE1BD9, + [ + ["key", "string", "string"], + ["value", "JSONValue", "JSONValue"], + ], + ], + ], + [ + "jsonNull", + [ + 0x3F6D7B68, + [], + ], + ], + [ + "jsonBool", + [ + 0xC7345E6A, + [ + ["value", "boolean", "Bool"], + ], + ], + ], + [ + "jsonNumber", + [ + 0x2BE0DFA4, + [ + ["value", "number", "double"], + ], + ], + ], + [ + "jsonString", + [ + 0xB71E767A, + [ + ["value", "string", "string"], + ], + ], + ], + [ + "jsonArray", + [ + 0xF7444763, + [ + ["value", ["JSONValue"], "Vector"], + ], + ], + ], + [ + "jsonObject", + [ + 0x99C1D49D, + [ + ["value", ["JSONObjectValue"], "Vector"], + ], + ], + ], + [ + "pageTableCell", + [ + 0x34566B6A, + [ + ["flags", flags, "#"], + ["header", "true", "flags.0?true"], + ["align_center", "true", "flags.3?true"], + ["align_right", "true", "flags.4?true"], + ["valign_middle", "true", "flags.5?true"], + ["valign_bottom", "true", "flags.6?true"], + ["text", "RichText", "flags.7?RichText"], + ["colspan", "number", "flags.1?int"], + ["rowspan", "number", "flags.2?int"], + ], + ], + ], + [ + "pageTableRow", + [ + 0xE0C0C5E5, + [ + ["cells", ["PageTableCell"], "Vector"], + ], + ], + ], + [ + "pageCaption", + [ + 0x6F747657, + [ + ["text", "RichText", "RichText"], + ["credit", "RichText", "RichText"], + ], + ], + ], + [ + "pageListItemText", + [ + 0xB92FB6CD, + [ + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageListItemBlocks", + [ + 0x25E073FC, + [ + ["blocks", ["PageBlock"], "Vector"], + ], + ], + ], + [ + "pageListOrderedItemText", + [ + 0x5E068047, + [ + ["num", "string", "string"], + ["text", "RichText", "RichText"], + ], + ], + ], + [ + "pageListOrderedItemBlocks", + [ + 0x98DD8936, + [ + ["num", "string", "string"], + ["blocks", ["PageBlock"], "Vector"], + ], + ], + ], + [ + "pageRelatedArticle", + [ + 0xB390DC08, + [ + ["flags", flags, "#"], + ["url", "string", "string"], + ["webpage_id", "bigint", "long"], + ["title", "string", "flags.0?string"], + ["description", "string", "flags.1?string"], + ["photo_id", "bigint", "flags.2?long"], + ["author", "string", "flags.3?string"], + ["published_date", "number", "flags.4?int"], + ], + ], + ], + [ + "page", + [ + 0x98657F0D, + [ + ["flags", flags, "#"], + ["part", "true", "flags.0?true"], + ["rtl", "true", "flags.1?true"], + ["v2", "true", "flags.2?true"], + ["url", "string", "string"], + ["blocks", ["PageBlock"], "Vector"], + ["photos", ["Photo"], "Vector"], + ["documents", ["Document"], "Vector"], + ["views", "number", "flags.3?int"], + ], + ], + ], + [ + "help.supportName", + [ + 0x8C05F1C9, + [ + ["name", "string", "string"], + ], + ], + ], + [ + "help.userInfoEmpty", + [ + 0xF3AE2EED, + [], + ], + ], + [ + "help.userInfo", + [ + 0x01EB3758, + [ + ["message", "string", "string"], + ["entities", ["MessageEntity"], "Vector"], + ["author", "string", "string"], + ["date", "number", "int"], + ], + ], + ], + [ + "pollAnswer", + [ + 0x6CA9C2E9, + [ + ["text", "string", "string"], + ["option", Uint8Array, "bytes"], + ], + ], + ], + [ + "poll", + [ + 0x86E18161, + [ + ["id", "bigint", "long"], + ["flags", flags, "#"], + ["closed", "true", "flags.0?true"], + ["public_voters", "true", "flags.1?true"], + ["multiple_choice", "true", "flags.2?true"], + ["quiz", "true", "flags.3?true"], + ["question", "string", "string"], + ["answers", ["PollAnswer"], "Vector"], + ["close_period", "number", "flags.4?int"], + ["close_date", "number", "flags.5?int"], + ], + ], + ], + [ + "pollAnswerVoters", + [ + 0x3B6DDAD2, + [ + ["flags", flags, "#"], + ["chosen", "true", "flags.0?true"], + ["correct", "true", "flags.1?true"], + ["option", Uint8Array, "bytes"], + ["voters", "number", "int"], + ], + ], + ], + [ + "pollResults", + [ + 0x7ADF2420, + [ + ["flags", flags, "#"], + ["min", "true", "flags.0?true"], + ["results", ["PollAnswerVoters"], "flags.1?Vector"], + ["total_voters", "number", "flags.2?int"], + ["recent_voters", ["Peer"], "flags.3?Vector"], + ["solution", "string", "flags.4?string"], + ["solution_entities", ["MessageEntity"], "flags.4?Vector"], + ], + ], + ], + [ + "chatOnlines", + [ + 0xF041E250, + [ + ["onlines", "number", "int"], + ], + ], + ], + [ + "statsURL", + [ + 0x47A971E0, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "chatAdminRights", + [ + 0x5FB224D5, + [ + ["flags", flags, "#"], + ["change_info", "true", "flags.0?true"], + ["post_messages", "true", "flags.1?true"], + ["edit_messages", "true", "flags.2?true"], + ["delete_messages", "true", "flags.3?true"], + ["ban_users", "true", "flags.4?true"], + ["invite_users", "true", "flags.5?true"], + ["pin_messages", "true", "flags.7?true"], + ["add_admins", "true", "flags.9?true"], + ["anonymous", "true", "flags.10?true"], + ["manage_call", "true", "flags.11?true"], + ["other", "true", "flags.12?true"], + ["manage_topics", "true", "flags.13?true"], + ["post_stories", "true", "flags.14?true"], + ["edit_stories", "true", "flags.15?true"], + ["delete_stories", "true", "flags.16?true"], + ], + ], + ], + [ + "chatBannedRights", + [ + 0x9F120418, + [ + ["flags", flags, "#"], + ["view_messages", "true", "flags.0?true"], + ["send_messages", "true", "flags.1?true"], + ["send_media", "true", "flags.2?true"], + ["send_stickers", "true", "flags.3?true"], + ["send_gifs", "true", "flags.4?true"], + ["send_games", "true", "flags.5?true"], + ["send_inline", "true", "flags.6?true"], + ["embed_links", "true", "flags.7?true"], + ["send_polls", "true", "flags.8?true"], + ["change_info", "true", "flags.10?true"], + ["invite_users", "true", "flags.15?true"], + ["pin_messages", "true", "flags.17?true"], + ["manage_topics", "true", "flags.18?true"], + ["send_photos", "true", "flags.19?true"], + ["send_videos", "true", "flags.20?true"], + ["send_roundvideos", "true", "flags.21?true"], + ["send_audios", "true", "flags.22?true"], + ["send_voices", "true", "flags.23?true"], + ["send_docs", "true", "flags.24?true"], + ["send_plain", "true", "flags.25?true"], + ["until_date", "number", "int"], + ], + ], + ], + [ + "inputWallPaper", + [ + 0xE630B979, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputWallPaperSlug", + [ + 0x72091C80, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "inputWallPaperNoFile", + [ + 0x967A462E, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "account.wallPapersNotModified", + [ + 0x1C199183, + [], + ], + ], + [ + "account.wallPapers", + [ + 0xCDC3858C, + [ + ["hash", "bigint", "long"], + ["wallpapers", ["WallPaper"], "Vector"], + ], + ], + ], + [ + "codeSettings", + [ + 0xAD253D78, + [ + ["flags", flags, "#"], + ["allow_flashcall", "true", "flags.0?true"], + ["current_number", "true", "flags.1?true"], + ["allow_app_hash", "true", "flags.4?true"], + ["allow_missed_call", "true", "flags.5?true"], + ["allow_firebase", "true", "flags.7?true"], + ["logout_tokens", [Uint8Array], "flags.6?Vector"], + ["token", "string", "flags.8?string"], + ["app_sandbox", "boolean", "flags.8?Bool"], + ], + ], + ], + [ + "wallPaperSettings", + [ + 0x372EFCD0, + [ + ["flags", flags, "#"], + ["blur", "true", "flags.1?true"], + ["motion", "true", "flags.2?true"], + ["background_color", "number", "flags.0?int"], + ["second_background_color", "number", "flags.4?int"], + ["third_background_color", "number", "flags.5?int"], + ["fourth_background_color", "number", "flags.6?int"], + ["intensity", "number", "flags.3?int"], + ["rotation", "number", "flags.4?int"], + ["emoticon", "string", "flags.7?string"], + ], + ], + ], + [ + "autoDownloadSettings", + [ + 0xBAA57628, + [ + ["flags", flags, "#"], + ["disabled", "true", "flags.0?true"], + ["video_preload_large", "true", "flags.1?true"], + ["audio_preload_next", "true", "flags.2?true"], + ["phonecalls_less_data", "true", "flags.3?true"], + ["stories_preload", "true", "flags.4?true"], + ["photo_size_max", "number", "int"], + ["video_size_max", "bigint", "long"], + ["file_size_max", "bigint", "long"], + ["video_upload_maxbitrate", "number", "int"], + ["small_queue_active_operations_max", "number", "int"], + ["large_queue_active_operations_max", "number", "int"], + ], + ], + ], + [ + "account.autoDownloadSettings", + [ + 0x63CACF26, + [ + ["low", "AutoDownloadSettings", "AutoDownloadSettings"], + ["medium", "AutoDownloadSettings", "AutoDownloadSettings"], + ["high", "AutoDownloadSettings", "AutoDownloadSettings"], + ], + ], + ], + [ + "emojiKeyword", + [ + 0xD5B3B9F9, + [ + ["keyword", "string", "string"], + ["emoticons", ["string"], "Vector"], + ], + ], + ], + [ + "emojiKeywordDeleted", + [ + 0x236DF622, + [ + ["keyword", "string", "string"], + ["emoticons", ["string"], "Vector"], + ], + ], + ], + [ + "emojiKeywordsDifference", + [ + 0x5CC761BD, + [ + ["lang_code", "string", "string"], + ["from_version", "number", "int"], + ["version", "number", "int"], + ["keywords", ["EmojiKeyword"], "Vector"], + ], + ], + ], + [ + "emojiURL", + [ + 0xA575739D, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "emojiLanguage", + [ + 0xB3FB5361, + [ + ["lang_code", "string", "string"], + ], + ], + ], + [ + "folder", + [ + 0xFF544E65, + [ + ["flags", flags, "#"], + ["autofill_new_broadcasts", "true", "flags.0?true"], + ["autofill_public_groups", "true", "flags.1?true"], + ["autofill_new_correspondents", "true", "flags.2?true"], + ["id", "number", "int"], + ["title", "string", "string"], + ["photo", "ChatPhoto", "flags.3?ChatPhoto"], + ], + ], + ], + [ + "inputFolderPeer", + [ + 0xFBD2C296, + [ + ["peer", "InputPeer", "InputPeer"], + ["folder_id", "number", "int"], + ], + ], + ], + [ + "folderPeer", + [ + 0xE9BAA668, + [ + ["peer", "Peer", "Peer"], + ["folder_id", "number", "int"], + ], + ], + ], + [ + "messages.searchCounter", + [ + 0xE844EBFF, + [ + ["flags", flags, "#"], + ["inexact", "true", "flags.1?true"], + ["filter", "MessagesFilter", "MessagesFilter"], + ["count", "number", "int"], + ], + ], + ], + [ + "urlAuthResultRequest", + [ + 0x92D33A0E, + [ + ["flags", flags, "#"], + ["request_write_access", "true", "flags.0?true"], + ["bot", "User", "User"], + ["domain", "string", "string"], + ], + ], + ], + [ + "urlAuthResultAccepted", + [ + 0x8F8C0E4E, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "urlAuthResultDefault", + [ + 0xA9D6DB1F, + [], + ], + ], + [ + "channelLocationEmpty", + [ + 0xBFB5AD8B, + [], + ], + ], + [ + "channelLocation", + [ + 0x209B82DB, + [ + ["geo_point", "GeoPoint", "GeoPoint"], + ["address", "string", "string"], + ], + ], + ], + [ + "peerLocated", + [ + 0xCA461B5D, + [ + ["peer", "Peer", "Peer"], + ["expires", "number", "int"], + ["distance", "number", "int"], + ], + ], + ], + [ + "peerSelfLocated", + [ + 0xF8EC284B, + [ + ["expires", "number", "int"], + ], + ], + ], + [ + "restrictionReason", + [ + 0xD072ACB4, + [ + ["platform", "string", "string"], + ["reason", "string", "string"], + ["text", "string", "string"], + ], + ], + ], + [ + "inputTheme", + [ + 0x3C5693E9, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputThemeSlug", + [ + 0xF5890DF1, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "theme", + [ + 0xA00E67D6, + [ + ["flags", flags, "#"], + ["creator", "true", "flags.0?true"], + ["default", "true", "flags.1?true"], + ["for_chat", "true", "flags.5?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["slug", "string", "string"], + ["title", "string", "string"], + ["document", "Document", "flags.2?Document"], + ["settings", ["ThemeSettings"], "flags.3?Vector"], + ["emoticon", "string", "flags.6?string"], + ["installs_count", "number", "flags.4?int"], + ], + ], + ], + [ + "account.themesNotModified", + [ + 0xF41EB622, + [], + ], + ], + [ + "account.themes", + [ + 0x9A3D8C6D, + [ + ["hash", "bigint", "long"], + ["themes", ["Theme"], "Vector"], + ], + ], + ], + [ + "auth.loginToken", + [ + 0x629F1980, + [ + ["expires", "number", "int"], + ["token", Uint8Array, "bytes"], + ], + ], + ], + [ + "auth.loginTokenMigrateTo", + [ + 0x068E9916, + [ + ["dc_id", "number", "int"], + ["token", Uint8Array, "bytes"], + ], + ], + ], + [ + "auth.loginTokenSuccess", + [ + 0x390D5C5E, + [ + ["authorization", "auth_Authorization", "auth.Authorization"], + ], + ], + ], + [ + "account.contentSettings", + [ + 0x57E28221, + [ + ["flags", flags, "#"], + ["sensitive_enabled", "true", "flags.0?true"], + ["sensitive_can_change", "true", "flags.1?true"], + ], + ], + ], + [ + "messages.inactiveChats", + [ + 0xA927FEC5, + [ + ["dates", ["number"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "baseThemeClassic", + [ + 0xC3A12462, + [], + ], + ], + [ + "baseThemeDay", + [ + 0xFBD81688, + [], + ], + ], + [ + "baseThemeNight", + [ + 0xB7B31EA8, + [], + ], + ], + [ + "baseThemeTinted", + [ + 0x6D5F77EE, + [], + ], + ], + [ + "baseThemeArctic", + [ + 0x5B11125A, + [], + ], + ], + [ + "inputThemeSettings", + [ + 0x8FDE504F, + [ + ["flags", flags, "#"], + ["message_colors_animated", "true", "flags.2?true"], + ["base_theme", "BaseTheme", "BaseTheme"], + ["accent_color", "number", "int"], + ["outbox_accent_color", "number", "flags.3?int"], + ["message_colors", ["number"], "flags.0?Vector"], + ["wallpaper", "InputWallPaper", "flags.1?InputWallPaper"], + ["wallpaper_settings", "WallPaperSettings", "flags.1?WallPaperSettings"], + ], + ], + ], + [ + "themeSettings", + [ + 0xFA58B6D4, + [ + ["flags", flags, "#"], + ["message_colors_animated", "true", "flags.2?true"], + ["base_theme", "BaseTheme", "BaseTheme"], + ["accent_color", "number", "int"], + ["outbox_accent_color", "number", "flags.3?int"], + ["message_colors", ["number"], "flags.0?Vector"], + ["wallpaper", "WallPaper", "flags.1?WallPaper"], + ], + ], + ], + [ + "webPageAttributeTheme", + [ + 0x54B56617, + [ + ["flags", flags, "#"], + ["documents", ["Document"], "flags.0?Vector"], + ["settings", "ThemeSettings", "flags.1?ThemeSettings"], + ], + ], + ], + [ + "webPageAttributeStory", + [ + 0x2E94C3E7, + [ + ["flags", flags, "#"], + ["peer", "Peer", "Peer"], + ["id", "number", "int"], + ["story", "StoryItem", "flags.0?StoryItem"], + ], + ], + ], + [ + "messages.votesList", + [ + 0x4899484E, + [ + ["flags", flags, "#"], + ["count", "number", "int"], + ["votes", ["MessagePeerVote"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["next_offset", "string", "flags.0?string"], + ], + ], + ], + [ + "bankCardOpenUrl", + [ + 0xF568028A, + [ + ["url", "string", "string"], + ["name", "string", "string"], + ], + ], + ], + [ + "payments.bankCardData", + [ + 0x3E24E573, + [ + ["title", "string", "string"], + ["open_urls", ["BankCardOpenUrl"], "Vector"], + ], + ], + ], + [ + "dialogFilter", + [ + 0x5FB5523B, + [ + ["flags", flags, "#"], + ["contacts", "true", "flags.0?true"], + ["non_contacts", "true", "flags.1?true"], + ["groups", "true", "flags.2?true"], + ["broadcasts", "true", "flags.3?true"], + ["bots", "true", "flags.4?true"], + ["exclude_muted", "true", "flags.11?true"], + ["exclude_read", "true", "flags.12?true"], + ["exclude_archived", "true", "flags.13?true"], + ["id", "number", "int"], + ["title", "string", "string"], + ["emoticon", "string", "flags.25?string"], + ["color", "number", "flags.27?int"], + ["pinned_peers", ["InputPeer"], "Vector"], + ["include_peers", ["InputPeer"], "Vector"], + ["exclude_peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "dialogFilterDefault", + [ + 0x363293AE, + [], + ], + ], + [ + "dialogFilterChatlist", + [ + 0x9FE28EA4, + [ + ["flags", flags, "#"], + ["has_my_invites", "true", "flags.26?true"], + ["id", "number", "int"], + ["title", "string", "string"], + ["emoticon", "string", "flags.25?string"], + ["color", "number", "flags.27?int"], + ["pinned_peers", ["InputPeer"], "Vector"], + ["include_peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "dialogFilterSuggested", + [ + 0x77744D4A, + [ + ["filter", "DialogFilter", "DialogFilter"], + ["description", "string", "string"], + ], + ], + ], + [ + "statsDateRangeDays", + [ + 0xB637EDAF, + [ + ["min_date", "number", "int"], + ["max_date", "number", "int"], + ], + ], + ], + [ + "statsAbsValueAndPrev", + [ + 0xCB43ACDE, + [ + ["current", "number", "double"], + ["previous", "number", "double"], + ], + ], + ], + [ + "statsPercentValue", + [ + 0xCBCE2FE0, + [ + ["part", "number", "double"], + ["total", "number", "double"], + ], + ], + ], + [ + "statsGraphAsync", + [ + 0x4A27EB2D, + [ + ["token", "string", "string"], + ], + ], + ], + [ + "statsGraphError", + [ + 0xBEDC9822, + [ + ["error", "string", "string"], + ], + ], + ], + [ + "statsGraph", + [ + 0x8EA464B6, + [ + ["flags", flags, "#"], + ["json", "DataJSON", "DataJSON"], + ["zoom_token", "string", "flags.0?string"], + ], + ], + ], + [ + "stats.broadcastStats", + [ + 0x396CA5FC, + [ + ["period", "StatsDateRangeDays", "StatsDateRangeDays"], + ["followers", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["views_per_post", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["shares_per_post", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["reactions_per_post", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["views_per_story", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["shares_per_story", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["reactions_per_story", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["enabled_notifications", "StatsPercentValue", "StatsPercentValue"], + ["growth_graph", "StatsGraph", "StatsGraph"], + ["followers_graph", "StatsGraph", "StatsGraph"], + ["mute_graph", "StatsGraph", "StatsGraph"], + ["top_hours_graph", "StatsGraph", "StatsGraph"], + ["interactions_graph", "StatsGraph", "StatsGraph"], + ["iv_interactions_graph", "StatsGraph", "StatsGraph"], + ["views_by_source_graph", "StatsGraph", "StatsGraph"], + ["new_followers_by_source_graph", "StatsGraph", "StatsGraph"], + ["languages_graph", "StatsGraph", "StatsGraph"], + ["reactions_by_emotion_graph", "StatsGraph", "StatsGraph"], + ["story_interactions_graph", "StatsGraph", "StatsGraph"], + ["story_reactions_by_emotion_graph", "StatsGraph", "StatsGraph"], + ["recent_posts_interactions", ["PostInteractionCounters"], "Vector"], + ], + ], + ], + [ + "help.promoDataEmpty", + [ + 0x98F6AC75, + [ + ["expires", "number", "int"], + ], + ], + ], + [ + "help.promoData", + [ + 0x8C39793F, + [ + ["flags", flags, "#"], + ["proxy", "true", "flags.0?true"], + ["expires", "number", "int"], + ["peer", "Peer", "Peer"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["psa_type", "string", "flags.1?string"], + ["psa_message", "string", "flags.2?string"], + ], + ], + ], + [ + "videoSize", + [ + 0xDE33B094, + [ + ["flags", flags, "#"], + ["type", "string", "string"], + ["w", "number", "int"], + ["h", "number", "int"], + ["size", "number", "int"], + ["video_start_ts", "number", "flags.0?double"], + ], + ], + ], + [ + "videoSizeEmojiMarkup", + [ + 0xF85C413C, + [ + ["emoji_id", "bigint", "long"], + ["background_colors", ["number"], "Vector"], + ], + ], + ], + [ + "videoSizeStickerMarkup", + [ + 0x0DA082FE, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["sticker_id", "bigint", "long"], + ["background_colors", ["number"], "Vector"], + ], + ], + ], + [ + "statsGroupTopPoster", + [ + 0x9D04AF9B, + [ + ["user_id", "bigint", "long"], + ["messages", "number", "int"], + ["avg_chars", "number", "int"], + ], + ], + ], + [ + "statsGroupTopAdmin", + [ + 0xD7584C87, + [ + ["user_id", "bigint", "long"], + ["deleted", "number", "int"], + ["kicked", "number", "int"], + ["banned", "number", "int"], + ], + ], + ], + [ + "statsGroupTopInviter", + [ + 0x535F779D, + [ + ["user_id", "bigint", "long"], + ["invitations", "number", "int"], + ], + ], + ], + [ + "stats.megagroupStats", + [ + 0xEF7FF916, + [ + ["period", "StatsDateRangeDays", "StatsDateRangeDays"], + ["members", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["messages", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["viewers", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["posters", "StatsAbsValueAndPrev", "StatsAbsValueAndPrev"], + ["growth_graph", "StatsGraph", "StatsGraph"], + ["members_graph", "StatsGraph", "StatsGraph"], + ["new_members_by_source_graph", "StatsGraph", "StatsGraph"], + ["languages_graph", "StatsGraph", "StatsGraph"], + ["messages_graph", "StatsGraph", "StatsGraph"], + ["actions_graph", "StatsGraph", "StatsGraph"], + ["top_hours_graph", "StatsGraph", "StatsGraph"], + ["weekdays_graph", "StatsGraph", "StatsGraph"], + ["top_posters", ["StatsGroupTopPoster"], "Vector"], + ["top_admins", ["StatsGroupTopAdmin"], "Vector"], + ["top_inviters", ["StatsGroupTopInviter"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "globalPrivacySettings", + [ + 0x734C4CCB, + [ + ["flags", flags, "#"], + ["archive_and_mute_new_noncontact_peers", "true", "flags.0?true"], + ["keep_archived_unmuted", "true", "flags.1?true"], + ["keep_archived_folders", "true", "flags.2?true"], + ["hide_read_marks", "true", "flags.3?true"], + ["new_noncontact_peers_require_premium", "true", "flags.4?true"], + ], + ], + ], + [ + "help.countryCode", + [ + 0x4203C5EF, + [ + ["flags", flags, "#"], + ["country_code", "string", "string"], + ["prefixes", ["string"], "flags.0?Vector"], + ["patterns", ["string"], "flags.1?Vector"], + ], + ], + ], + [ + "help.country", + [ + 0xC3878E23, + [ + ["flags", flags, "#"], + ["hidden", "true", "flags.0?true"], + ["iso2", "string", "string"], + ["default_name", "string", "string"], + ["name", "string", "flags.1?string"], + ["country_codes", ["help_CountryCode"], "Vector"], + ], + ], + ], + [ + "help.countriesListNotModified", + [ + 0x93CC1F32, + [], + ], + ], + [ + "help.countriesList", + [ + 0x87D0759E, + [ + ["countries", ["help_Country"], "Vector"], + ["hash", "number", "int"], + ], + ], + ], + [ + "messageViews", + [ + 0x455B853D, + [ + ["flags", flags, "#"], + ["views", "number", "flags.0?int"], + ["forwards", "number", "flags.1?int"], + ["replies", "MessageReplies", "flags.2?MessageReplies"], + ], + ], + ], + [ + "messages.messageViews", + [ + 0xB6C4F543, + [ + ["views", ["MessageViews"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.discussionMessage", + [ + 0xA6341782, + [ + ["flags", flags, "#"], + ["messages", ["Message"], "Vector"], + ["max_id", "number", "flags.0?int"], + ["read_inbox_max_id", "number", "flags.1?int"], + ["read_outbox_max_id", "number", "flags.2?int"], + ["unread_count", "number", "int"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messageReplyHeader", + [ + 0xAFBC09DB, + [ + ["flags", flags, "#"], + ["reply_to_scheduled", "true", "flags.2?true"], + ["forum_topic", "true", "flags.3?true"], + ["quote", "true", "flags.9?true"], + ["reply_to_msg_id", "number", "flags.4?int"], + ["reply_to_peer_id", "Peer", "flags.0?Peer"], + ["reply_from", "MessageFwdHeader", "flags.5?MessageFwdHeader"], + ["reply_media", "MessageMedia", "flags.8?MessageMedia"], + ["reply_to_top_id", "number", "flags.1?int"], + ["quote_text", "string", "flags.6?string"], + ["quote_entities", ["MessageEntity"], "flags.7?Vector"], + ["quote_offset", "number", "flags.10?int"], + ], + ], + ], + [ + "messageReplyStoryHeader", + [ + 0x0E5AF939, + [ + ["peer", "Peer", "Peer"], + ["story_id", "number", "int"], + ], + ], + ], + [ + "messageReplies", + [ + 0x83D60FC2, + [ + ["flags", flags, "#"], + ["comments", "true", "flags.0?true"], + ["replies", "number", "int"], + ["replies_pts", "number", "int"], + ["recent_repliers", ["Peer"], "flags.1?Vector"], + ["channel_id", "bigint", "flags.0?long"], + ["max_id", "number", "flags.2?int"], + ["read_max_id", "number", "flags.3?int"], + ], + ], + ], + [ + "peerBlocked", + [ + 0xE8FD8014, + [ + ["peer_id", "Peer", "Peer"], + ["date", "number", "int"], + ], + ], + ], + [ + "stats.messageStats", + [ + 0x7FE91C14, + [ + ["views_graph", "StatsGraph", "StatsGraph"], + ["reactions_by_emotion_graph", "StatsGraph", "StatsGraph"], + ], + ], + ], + [ + "groupCallDiscarded", + [ + 0x7780BCB4, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["duration", "number", "int"], + ], + ], + ], + [ + "groupCall", + [ + 0xD597650C, + [ + ["flags", flags, "#"], + ["join_muted", "true", "flags.1?true"], + ["can_change_join_muted", "true", "flags.2?true"], + ["join_date_asc", "true", "flags.6?true"], + ["schedule_start_subscribed", "true", "flags.8?true"], + ["can_start_video", "true", "flags.9?true"], + ["record_video_active", "true", "flags.11?true"], + ["rtmp_stream", "true", "flags.12?true"], + ["listeners_hidden", "true", "flags.13?true"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["participants_count", "number", "int"], + ["title", "string", "flags.3?string"], + ["stream_dc_id", "number", "flags.4?int"], + ["record_start_date", "number", "flags.5?int"], + ["schedule_date", "number", "flags.7?int"], + ["unmuted_video_count", "number", "flags.10?int"], + ["unmuted_video_limit", "number", "int"], + ["version", "number", "int"], + ], + ], + ], + [ + "inputGroupCall", + [ + 0xD8AA840F, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "groupCallParticipant", + [ + 0xEBA636FE, + [ + ["flags", flags, "#"], + ["muted", "true", "flags.0?true"], + ["left", "true", "flags.1?true"], + ["can_self_unmute", "true", "flags.2?true"], + ["just_joined", "true", "flags.4?true"], + ["versioned", "true", "flags.5?true"], + ["min", "true", "flags.8?true"], + ["muted_by_you", "true", "flags.9?true"], + ["volume_by_admin", "true", "flags.10?true"], + ["self", "true", "flags.12?true"], + ["video_joined", "true", "flags.15?true"], + ["peer", "Peer", "Peer"], + ["date", "number", "int"], + ["active_date", "number", "flags.3?int"], + ["source", "number", "int"], + ["volume", "number", "flags.7?int"], + ["about", "string", "flags.11?string"], + ["raise_hand_rating", "bigint", "flags.13?long"], + ["video", "GroupCallParticipantVideo", "flags.6?GroupCallParticipantVideo"], + ["presentation", "GroupCallParticipantVideo", "flags.14?GroupCallParticipantVideo"], + ], + ], + ], + [ + "phone.groupCall", + [ + 0x9E727AAD, + [ + ["call", "GroupCall", "GroupCall"], + ["participants", ["GroupCallParticipant"], "Vector"], + ["participants_next_offset", "string", "string"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "phone.groupParticipants", + [ + 0xF47751B6, + [ + ["count", "number", "int"], + ["participants", ["GroupCallParticipant"], "Vector"], + ["next_offset", "string", "string"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["version", "number", "int"], + ], + ], + ], + [ + "inlineQueryPeerTypeSameBotPM", + [ + 0x3081ED9D, + [], + ], + ], + [ + "inlineQueryPeerTypePM", + [ + 0x833C0FAC, + [], + ], + ], + [ + "inlineQueryPeerTypeChat", + [ + 0xD766C50A, + [], + ], + ], + [ + "inlineQueryPeerTypeMegagroup", + [ + 0x5EC4BE43, + [], + ], + ], + [ + "inlineQueryPeerTypeBroadcast", + [ + 0x6334EE9A, + [], + ], + ], + [ + "inlineQueryPeerTypeBotPM", + [ + 0x0E3B2D0C, + [], + ], + ], + [ + "messages.historyImport", + [ + 0x1662AF0B, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "messages.historyImportParsed", + [ + 0x5E0FB7B9, + [ + ["flags", flags, "#"], + ["pm", "true", "flags.0?true"], + ["group", "true", "flags.1?true"], + ["title", "string", "flags.2?string"], + ], + ], + ], + [ + "messages.affectedFoundMessages", + [ + 0xEF8D3E6C, + [ + ["pts", "number", "int"], + ["pts_count", "number", "int"], + ["offset", "number", "int"], + ["messages", ["number"], "Vector"], + ], + ], + ], + [ + "chatInviteImporter", + [ + 0x8C5ADFD9, + [ + ["flags", flags, "#"], + ["requested", "true", "flags.0?true"], + ["via_chatlist", "true", "flags.3?true"], + ["user_id", "bigint", "long"], + ["date", "number", "int"], + ["about", "string", "flags.2?string"], + ["approved_by", "bigint", "flags.1?long"], + ], + ], + ], + [ + "messages.exportedChatInvites", + [ + 0xBDC62DCC, + [ + ["count", "number", "int"], + ["invites", ["ExportedChatInvite"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.exportedChatInvite", + [ + 0x1871BE50, + [ + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.exportedChatInviteReplaced", + [ + 0x222600EF, + [ + ["invite", "ExportedChatInvite", "ExportedChatInvite"], + ["new_invite", "ExportedChatInvite", "ExportedChatInvite"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.chatInviteImporters", + [ + 0x81B6B00A, + [ + ["count", "number", "int"], + ["importers", ["ChatInviteImporter"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "chatAdminWithInvites", + [ + 0xF2ECEF23, + [ + ["admin_id", "bigint", "long"], + ["invites_count", "number", "int"], + ["revoked_invites_count", "number", "int"], + ], + ], + ], + [ + "messages.chatAdminsWithInvites", + [ + 0xB69B72D7, + [ + ["admins", ["ChatAdminWithInvites"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.checkedHistoryImportPeer", + [ + 0xA24DE717, + [ + ["confirm_text", "string", "string"], + ], + ], + ], + [ + "phone.joinAsPeers", + [ + 0xAFE5623F, + [ + ["peers", ["Peer"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "phone.exportedGroupCallInvite", + [ + 0x204BD158, + [ + ["link", "string", "string"], + ], + ], + ], + [ + "groupCallParticipantVideoSourceGroup", + [ + 0xDCB118B7, + [ + ["semantics", "string", "string"], + ["sources", ["number"], "Vector"], + ], + ], + ], + [ + "groupCallParticipantVideo", + [ + 0x67753AC8, + [ + ["flags", flags, "#"], + ["paused", "true", "flags.0?true"], + ["endpoint", "string", "string"], + ["source_groups", ["GroupCallParticipantVideoSourceGroup"], "Vector"], + ["audio_source", "number", "flags.1?int"], + ], + ], + ], + [ + "stickers.suggestedShortName", + [ + 0x85FEA03F, + [ + ["short_name", "string", "string"], + ], + ], + ], + [ + "botCommandScopeDefault", + [ + 0x2F6CB2AB, + [], + ], + ], + [ + "botCommandScopeUsers", + [ + 0x3C4F04D8, + [], + ], + ], + [ + "botCommandScopeChats", + [ + 0x6FE1A881, + [], + ], + ], + [ + "botCommandScopeChatAdmins", + [ + 0xB9AA606A, + [], + ], + ], + [ + "botCommandScopePeer", + [ + 0xDB9D897D, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "botCommandScopePeerAdmins", + [ + 0x3FD863D1, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "botCommandScopePeerUser", + [ + 0x0A1321F3, + [ + ["peer", "InputPeer", "InputPeer"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "account.resetPasswordFailedWait", + [ + 0xE3779861, + [ + ["retry_date", "number", "int"], + ], + ], + ], + [ + "account.resetPasswordRequestedWait", + [ + 0xE9EFFC7D, + [ + ["until_date", "number", "int"], + ], + ], + ], + [ + "account.resetPasswordOk", + [ + 0xE926D63E, + [], + ], + ], + [ + "sponsoredMessage", + [ + 0xED5383F7, + [ + ["flags", flags, "#"], + ["recommended", "true", "flags.5?true"], + ["show_peer_photo", "true", "flags.6?true"], + ["can_report", "true", "flags.12?true"], + ["random_id", Uint8Array, "bytes"], + ["from_id", "Peer", "flags.3?Peer"], + ["chat_invite", "ChatInvite", "flags.4?ChatInvite"], + ["chat_invite_hash", "string", "flags.4?string"], + ["channel_post", "number", "flags.2?int"], + ["start_param", "string", "flags.0?string"], + ["webpage", "SponsoredWebPage", "flags.9?SponsoredWebPage"], + ["app", "BotApp", "flags.10?BotApp"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["button_text", "string", "flags.11?string"], + ["sponsor_info", "string", "flags.7?string"], + ["additional_info", "string", "flags.8?string"], + ], + ], + ], + [ + "messages.sponsoredMessages", + [ + 0xC9EE1D87, + [ + ["flags", flags, "#"], + ["posts_between", "number", "flags.0?int"], + ["messages", ["SponsoredMessage"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.sponsoredMessagesEmpty", + [ + 0x1839490F, + [], + ], + ], + [ + "searchResultsCalendarPeriod", + [ + 0xC9B0539F, + [ + ["date", "number", "int"], + ["min_msg_id", "number", "int"], + ["max_msg_id", "number", "int"], + ["count", "number", "int"], + ], + ], + ], + [ + "messages.searchResultsCalendar", + [ + 0x147EE23C, + [ + ["flags", flags, "#"], + ["inexact", "true", "flags.0?true"], + ["count", "number", "int"], + ["min_date", "number", "int"], + ["min_msg_id", "number", "int"], + ["offset_id_offset", "number", "flags.1?int"], + ["periods", ["SearchResultsCalendarPeriod"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "searchResultPosition", + [ + 0x7F648B67, + [ + ["msg_id", "number", "int"], + ["date", "number", "int"], + ["offset", "number", "int"], + ], + ], + ], + [ + "messages.searchResultsPositions", + [ + 0x53B22BAF, + [ + ["count", "number", "int"], + ["positions", ["SearchResultsPosition"], "Vector"], + ], + ], + ], + [ + "channels.sendAsPeers", + [ + 0xF496B0C6, + [ + ["peers", ["SendAsPeer"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "users.userFull", + [ + 0x3B6D152E, + [ + ["full_user", "UserFull", "UserFull"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.peerSettings", + [ + 0x6880B94D, + [ + ["settings", "PeerSettings", "PeerSettings"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "auth.loggedOut", + [ + 0xC3A2835F, + [ + ["flags", flags, "#"], + ["future_auth_token", Uint8Array, "flags.0?bytes"], + ], + ], + ], + [ + "reactionCount", + [ + 0xA3D1CB80, + [ + ["flags", flags, "#"], + ["chosen_order", "number", "flags.0?int"], + ["reaction", "Reaction", "Reaction"], + ["count", "number", "int"], + ], + ], + ], + [ + "messageReactions", + [ + 0x4F2B9479, + [ + ["flags", flags, "#"], + ["min", "true", "flags.0?true"], + ["can_see_list", "true", "flags.2?true"], + ["reactions_as_tags", "true", "flags.3?true"], + ["results", ["ReactionCount"], "Vector"], + ["recent_reactions", ["MessagePeerReaction"], "flags.1?Vector"], + ], + ], + ], + [ + "messages.messageReactionsList", + [ + 0x31BD492D, + [ + ["flags", flags, "#"], + ["count", "number", "int"], + ["reactions", ["MessagePeerReaction"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["next_offset", "string", "flags.0?string"], + ], + ], + ], + [ + "availableReaction", + [ + 0xC077EC01, + [ + ["flags", flags, "#"], + ["inactive", "true", "flags.0?true"], + ["premium", "true", "flags.2?true"], + ["reaction", "string", "string"], + ["title", "string", "string"], + ["static_icon", "Document", "Document"], + ["appear_animation", "Document", "Document"], + ["select_animation", "Document", "Document"], + ["activate_animation", "Document", "Document"], + ["effect_animation", "Document", "Document"], + ["around_animation", "Document", "flags.1?Document"], + ["center_icon", "Document", "flags.1?Document"], + ], + ], + ], + [ + "messages.availableReactionsNotModified", + [ + 0x9F071957, + [], + ], + ], + [ + "messages.availableReactions", + [ + 0x768E3AAD, + [ + ["hash", "number", "int"], + ["reactions", ["AvailableReaction"], "Vector"], + ], + ], + ], + [ + "messagePeerReaction", + [ + 0x8C79B63C, + [ + ["flags", flags, "#"], + ["big", "true", "flags.0?true"], + ["unread", "true", "flags.1?true"], + ["my", "true", "flags.2?true"], + ["peer_id", "Peer", "Peer"], + ["date", "number", "int"], + ["reaction", "Reaction", "Reaction"], + ], + ], + ], + [ + "groupCallStreamChannel", + [ + 0x80EB48AF, + [ + ["channel", "number", "int"], + ["scale", "number", "int"], + ["last_timestamp_ms", "bigint", "long"], + ], + ], + ], + [ + "phone.groupCallStreamChannels", + [ + 0xD0E482B2, + [ + ["channels", ["GroupCallStreamChannel"], "Vector"], + ], + ], + ], + [ + "phone.groupCallStreamRtmpUrl", + [ + 0x2DBF3432, + [ + ["url", "string", "string"], + ["key", "string", "string"], + ], + ], + ], + [ + "attachMenuBotIconColor", + [ + 0x4576F3F0, + [ + ["name", "string", "string"], + ["color", "number", "int"], + ], + ], + ], + [ + "attachMenuBotIcon", + [ + 0xB2A7386B, + [ + ["flags", flags, "#"], + ["name", "string", "string"], + ["icon", "Document", "Document"], + ["colors", ["AttachMenuBotIconColor"], "flags.0?Vector"], + ], + ], + ], + [ + "attachMenuBot", + [ + 0xD90D8DFE, + [ + ["flags", flags, "#"], + ["inactive", "true", "flags.0?true"], + ["has_settings", "true", "flags.1?true"], + ["request_write_access", "true", "flags.2?true"], + ["show_in_attach_menu", "true", "flags.3?true"], + ["show_in_side_menu", "true", "flags.4?true"], + ["side_menu_disclaimer_needed", "true", "flags.5?true"], + ["bot_id", "bigint", "long"], + ["short_name", "string", "string"], + ["peer_types", ["AttachMenuPeerType"], "flags.3?Vector"], + ["icons", ["AttachMenuBotIcon"], "Vector"], + ], + ], + ], + [ + "attachMenuBotsNotModified", + [ + 0xF1D88A5C, + [], + ], + ], + [ + "attachMenuBots", + [ + 0x3C4301C0, + [ + ["hash", "bigint", "long"], + ["bots", ["AttachMenuBot"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "attachMenuBotsBot", + [ + 0x93BF667F, + [ + ["bot", "AttachMenuBot", "AttachMenuBot"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "webViewResultUrl", + [ + 0x0C14557C, + [ + ["query_id", "bigint", "long"], + ["url", "string", "string"], + ], + ], + ], + [ + "simpleWebViewResultUrl", + [ + 0x882F76BB, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "webViewMessageSent", + [ + 0x0C94511C, + [ + ["flags", flags, "#"], + ["msg_id", "InputBotInlineMessageID", "flags.0?InputBotInlineMessageID"], + ], + ], + ], + [ + "botMenuButtonDefault", + [ + 0x7533A588, + [], + ], + ], + [ + "botMenuButtonCommands", + [ + 0x4258C205, + [], + ], + ], + [ + "botMenuButton", + [ + 0xC7B57CE6, + [ + ["text", "string", "string"], + ["url", "string", "string"], + ], + ], + ], + [ + "account.savedRingtonesNotModified", + [ + 0xFBF6E8B1, + [], + ], + ], + [ + "account.savedRingtones", + [ + 0xC1E92CC5, + [ + ["hash", "bigint", "long"], + ["ringtones", ["Document"], "Vector"], + ], + ], + ], + [ + "notificationSoundDefault", + [ + 0x97E8BEBE, + [], + ], + ], + [ + "notificationSoundNone", + [ + 0x6F0C34DF, + [], + ], + ], + [ + "notificationSoundLocal", + [ + 0x830B9AE4, + [ + ["title", "string", "string"], + ["data", "string", "string"], + ], + ], + ], + [ + "notificationSoundRingtone", + [ + 0xFF6C8049, + [ + ["id", "bigint", "long"], + ], + ], + ], + [ + "account.savedRingtone", + [ + 0xB7263F6D, + [], + ], + ], + [ + "account.savedRingtoneConverted", + [ + 0x1F307EB7, + [ + ["document", "Document", "Document"], + ], + ], + ], + [ + "attachMenuPeerTypeSameBotPM", + [ + 0x7D6BE90E, + [], + ], + ], + [ + "attachMenuPeerTypeBotPM", + [ + 0xC32BFA1A, + [], + ], + ], + [ + "attachMenuPeerTypePM", + [ + 0xF146D31F, + [], + ], + ], + [ + "attachMenuPeerTypeChat", + [ + 0x0509113F, + [], + ], + ], + [ + "attachMenuPeerTypeBroadcast", + [ + 0x7BFBDEFC, + [], + ], + ], + [ + "inputInvoiceMessage", + [ + 0xC5B56859, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "inputInvoiceSlug", + [ + 0xC326CAEF, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "inputInvoicePremiumGiftCode", + [ + 0x98986C0D, + [ + ["purpose", "InputStorePaymentPurpose", "InputStorePaymentPurpose"], + ["option", "PremiumGiftCodeOption", "PremiumGiftCodeOption"], + ], + ], + ], + [ + "payments.exportedInvoice", + [ + 0xAED0CBD9, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "messages.transcribedAudio", + [ + 0xCFB9D957, + [ + ["flags", flags, "#"], + ["pending", "true", "flags.0?true"], + ["transcription_id", "bigint", "long"], + ["text", "string", "string"], + ["trial_remains_num", "number", "flags.1?int"], + ["trial_remains_until_date", "number", "flags.1?int"], + ], + ], + ], + [ + "help.premiumPromo", + [ + 0x5334759C, + [ + ["status_text", "string", "string"], + ["status_entities", ["MessageEntity"], "Vector"], + ["video_sections", ["string"], "Vector"], + ["videos", ["Document"], "Vector"], + ["period_options", ["PremiumSubscriptionOption"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "inputStorePaymentPremiumSubscription", + [ + 0xA6751E66, + [ + ["flags", flags, "#"], + ["restore", "true", "flags.0?true"], + ["upgrade", "true", "flags.1?true"], + ], + ], + ], + [ + "inputStorePaymentGiftPremium", + [ + 0x616F7FE8, + [ + ["user_id", "InputUser", "InputUser"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ], + ], + ], + [ + "inputStorePaymentPremiumGiftCode", + [ + 0xA3805F3F, + [ + ["flags", flags, "#"], + ["users", ["InputUser"], "Vector"], + ["boost_peer", "InputPeer", "flags.0?InputPeer"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ], + ], + ], + [ + "inputStorePaymentPremiumGiveaway", + [ + 0x160544CA, + [ + ["flags", flags, "#"], + ["only_new_subscribers", "true", "flags.0?true"], + ["winners_are_visible", "true", "flags.3?true"], + ["boost_peer", "InputPeer", "InputPeer"], + ["additional_peers", ["InputPeer"], "flags.1?Vector"], + ["countries_iso2", ["string"], "flags.2?Vector"], + ["prize_description", "string", "flags.4?string"], + ["random_id", "bigint", "long"], + ["until_date", "number", "int"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ], + ], + ], + [ + "premiumGiftOption", + [ + 0x74C34319, + [ + ["flags", flags, "#"], + ["months", "number", "int"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ["bot_url", "string", "string"], + ["store_product", "string", "flags.0?string"], + ], + ], + ], + [ + "paymentFormMethod", + [ + 0x88F8F21B, + [ + ["url", "string", "string"], + ["title", "string", "string"], + ], + ], + ], + [ + "emojiStatusEmpty", + [ + 0x2DE11AAE, + [], + ], + ], + [ + "emojiStatus", + [ + 0x929B619D, + [ + ["document_id", "bigint", "long"], + ], + ], + ], + [ + "emojiStatusUntil", + [ + 0xFA30A8C7, + [ + ["document_id", "bigint", "long"], + ["until", "number", "int"], + ], + ], + ], + [ + "account.emojiStatusesNotModified", + [ + 0xD08CE645, + [], + ], + ], + [ + "account.emojiStatuses", + [ + 0x90C467D1, + [ + ["hash", "bigint", "long"], + ["statuses", ["EmojiStatus"], "Vector"], + ], + ], + ], + [ + "reactionEmpty", + [ + 0x79F5D419, + [], + ], + ], + [ + "reactionEmoji", + [ + 0x1B2286B8, + [ + ["emoticon", "string", "string"], + ], + ], + ], + [ + "reactionCustomEmoji", + [ + 0x8935FC73, + [ + ["document_id", "bigint", "long"], + ], + ], + ], + [ + "chatReactionsNone", + [ + 0xEAFC32BC, + [], + ], + ], + [ + "chatReactionsAll", + [ + 0x52928BCA, + [ + ["flags", flags, "#"], + ["allow_custom", "true", "flags.0?true"], + ], + ], + ], + [ + "chatReactionsSome", + [ + 0x661D4037, + [ + ["reactions", ["Reaction"], "Vector"], + ], + ], + ], + [ + "messages.reactionsNotModified", + [ + 0xB06FDBDF, + [], + ], + ], + [ + "messages.reactions", + [ + 0xEAFDF716, + [ + ["hash", "bigint", "long"], + ["reactions", ["Reaction"], "Vector"], + ], + ], + ], + [ + "emailVerifyPurposeLoginSetup", + [ + 0x4345BE73, + [ + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ], + ], + ], + [ + "emailVerifyPurposeLoginChange", + [ + 0x527D22EB, + [], + ], + ], + [ + "emailVerifyPurposePassport", + [ + 0xBBF51685, + [], + ], + ], + [ + "emailVerificationCode", + [ + 0x922E55A9, + [ + ["code", "string", "string"], + ], + ], + ], + [ + "emailVerificationGoogle", + [ + 0xDB909EC2, + [ + ["token", "string", "string"], + ], + ], + ], + [ + "emailVerificationApple", + [ + 0x96D074FD, + [ + ["token", "string", "string"], + ], + ], + ], + [ + "account.emailVerified", + [ + 0x2B96CD1B, + [ + ["email", "string", "string"], + ], + ], + ], + [ + "account.emailVerifiedLogin", + [ + 0xE1BB0D61, + [ + ["email", "string", "string"], + ["sent_code", "auth_SentCode", "auth.SentCode"], + ], + ], + ], + [ + "premiumSubscriptionOption", + [ + 0x5F2D1DF2, + [ + ["flags", flags, "#"], + ["current", "true", "flags.1?true"], + ["can_purchase_upgrade", "true", "flags.2?true"], + ["transaction", "string", "flags.3?string"], + ["months", "number", "int"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ["bot_url", "string", "string"], + ["store_product", "string", "flags.0?string"], + ], + ], + ], + [ + "sendAsPeer", + [ + 0xB81C7034, + [ + ["flags", flags, "#"], + ["premium_required", "true", "flags.0?true"], + ["peer", "Peer", "Peer"], + ], + ], + ], + [ + "messageExtendedMediaPreview", + [ + 0xAD628CC8, + [ + ["flags", flags, "#"], + ["w", "number", "flags.0?int"], + ["h", "number", "flags.0?int"], + ["thumb", "PhotoSize", "flags.1?PhotoSize"], + ["video_duration", "number", "flags.2?int"], + ], + ], + ], + [ + "messageExtendedMedia", + [ + 0xEE479C64, + [ + ["media", "MessageMedia", "MessageMedia"], + ], + ], + ], + [ + "stickerKeyword", + [ + 0xFCFEB29C, + [ + ["document_id", "bigint", "long"], + ["keyword", ["string"], "Vector"], + ], + ], + ], + [ + "username", + [ + 0xB4073647, + [ + ["flags", flags, "#"], + ["editable", "true", "flags.0?true"], + ["active", "true", "flags.1?true"], + ["username", "string", "string"], + ], + ], + ], + [ + "forumTopicDeleted", + [ + 0x023F109B, + [ + ["id", "number", "int"], + ], + ], + ], + [ + "forumTopic", + [ + 0x71701DA9, + [ + ["flags", flags, "#"], + ["my", "true", "flags.1?true"], + ["closed", "true", "flags.2?true"], + ["pinned", "true", "flags.3?true"], + ["short", "true", "flags.5?true"], + ["hidden", "true", "flags.6?true"], + ["id", "number", "int"], + ["date", "number", "int"], + ["title", "string", "string"], + ["icon_color", "number", "int"], + ["icon_emoji_id", "bigint", "flags.0?long"], + ["top_message", "number", "int"], + ["read_inbox_max_id", "number", "int"], + ["read_outbox_max_id", "number", "int"], + ["unread_count", "number", "int"], + ["unread_mentions_count", "number", "int"], + ["unread_reactions_count", "number", "int"], + ["from_id", "Peer", "Peer"], + ["notify_settings", "PeerNotifySettings", "PeerNotifySettings"], + ["draft", "DraftMessage", "flags.4?DraftMessage"], + ], + ], + ], + [ + "messages.forumTopics", + [ + 0x367617D3, + [ + ["flags", flags, "#"], + ["order_by_create_date", "true", "flags.0?true"], + ["count", "number", "int"], + ["topics", ["ForumTopic"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["pts", "number", "int"], + ], + ], + ], + [ + "defaultHistoryTTL", + [ + 0x43B46B20, + [ + ["period", "number", "int"], + ], + ], + ], + [ + "exportedContactToken", + [ + 0x41BF109B, + [ + ["url", "string", "string"], + ["expires", "number", "int"], + ], + ], + ], + [ + "requestPeerTypeUser", + [ + 0x5F3B8A00, + [ + ["flags", flags, "#"], + ["bot", "boolean", "flags.0?Bool"], + ["premium", "boolean", "flags.1?Bool"], + ], + ], + ], + [ + "requestPeerTypeChat", + [ + 0xC9F06E1B, + [ + ["flags", flags, "#"], + ["creator", "true", "flags.0?true"], + ["bot_participant", "true", "flags.5?true"], + ["has_username", "boolean", "flags.3?Bool"], + ["forum", "boolean", "flags.4?Bool"], + ["user_admin_rights", "ChatAdminRights", "flags.1?ChatAdminRights"], + ["bot_admin_rights", "ChatAdminRights", "flags.2?ChatAdminRights"], + ], + ], + ], + [ + "requestPeerTypeBroadcast", + [ + 0x339BEF6C, + [ + ["flags", flags, "#"], + ["creator", "true", "flags.0?true"], + ["has_username", "boolean", "flags.3?Bool"], + ["user_admin_rights", "ChatAdminRights", "flags.1?ChatAdminRights"], + ["bot_admin_rights", "ChatAdminRights", "flags.2?ChatAdminRights"], + ], + ], + ], + [ + "emojiListNotModified", + [ + 0x481EADFA, + [], + ], + ], + [ + "emojiList", + [ + 0x7A1E11D1, + [ + ["hash", "bigint", "long"], + ["document_id", ["bigint"], "Vector"], + ], + ], + ], + [ + "emojiGroup", + [ + 0x7A9ABDA9, + [ + ["title", "string", "string"], + ["icon_emoji_id", "bigint", "long"], + ["emoticons", ["string"], "Vector"], + ], + ], + ], + [ + "messages.emojiGroupsNotModified", + [ + 0x6FB4AD87, + [], + ], + ], + [ + "messages.emojiGroups", + [ + 0x881FB94B, + [ + ["hash", "number", "int"], + ["groups", ["EmojiGroup"], "Vector"], + ], + ], + ], + [ + "textWithEntities", + [ + 0x751F3146, + [ + ["text", "string", "string"], + ["entities", ["MessageEntity"], "Vector"], + ], + ], + ], + [ + "messages.translateResult", + [ + 0x33DB32F8, + [ + ["result", ["TextWithEntities"], "Vector"], + ], + ], + ], + [ + "autoSaveSettings", + [ + 0xC84834CE, + [ + ["flags", flags, "#"], + ["photos", "true", "flags.0?true"], + ["videos", "true", "flags.1?true"], + ["video_max_size", "bigint", "flags.2?long"], + ], + ], + ], + [ + "autoSaveException", + [ + 0x81602D47, + [ + ["peer", "Peer", "Peer"], + ["settings", "AutoSaveSettings", "AutoSaveSettings"], + ], + ], + ], + [ + "account.autoSaveSettings", + [ + 0x4C3E069D, + [ + ["users_settings", "AutoSaveSettings", "AutoSaveSettings"], + ["chats_settings", "AutoSaveSettings", "AutoSaveSettings"], + ["broadcasts_settings", "AutoSaveSettings", "AutoSaveSettings"], + ["exceptions", ["AutoSaveException"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "help.appConfigNotModified", + [ + 0x7CDE641D, + [], + ], + ], + [ + "help.appConfig", + [ + 0xDD18782E, + [ + ["hash", "number", "int"], + ["config", "JSONValue", "JSONValue"], + ], + ], + ], + [ + "inputBotAppID", + [ + 0xA920BD7A, + [ + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ], + ], + ], + [ + "inputBotAppShortName", + [ + 0x908C0407, + [ + ["bot_id", "InputUser", "InputUser"], + ["short_name", "string", "string"], + ], + ], + ], + [ + "botAppNotModified", + [ + 0x5DA674B7, + [], + ], + ], + [ + "botApp", + [ + 0x95FCD1D6, + [ + ["flags", flags, "#"], + ["id", "bigint", "long"], + ["access_hash", "bigint", "long"], + ["short_name", "string", "string"], + ["title", "string", "string"], + ["description", "string", "string"], + ["photo", "Photo", "Photo"], + ["document", "Document", "flags.0?Document"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.botApp", + [ + 0xEB50ADF5, + [ + ["flags", flags, "#"], + ["inactive", "true", "flags.0?true"], + ["request_write_access", "true", "flags.1?true"], + ["has_settings", "true", "flags.2?true"], + ["app", "BotApp", "BotApp"], + ], + ], + ], + [ + "appWebViewResultUrl", + [ + 0x3C1B4F0D, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "inlineBotWebView", + [ + 0xB57295D5, + [ + ["text", "string", "string"], + ["url", "string", "string"], + ], + ], + ], + [ + "readParticipantDate", + [ + 0x4A4FF172, + [ + ["user_id", "bigint", "long"], + ["date", "number", "int"], + ], + ], + ], + [ + "inputChatlistDialogFilter", + [ + 0xF3E0DA33, + [ + ["filter_id", "number", "int"], + ], + ], + ], + [ + "exportedChatlistInvite", + [ + 0x0C5181AC, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["url", "string", "string"], + ["peers", ["Peer"], "Vector"], + ], + ], + ], + [ + "chatlists.exportedChatlistInvite", + [ + 0x10E6E3A6, + [ + ["filter", "DialogFilter", "DialogFilter"], + ["invite", "ExportedChatlistInvite", "ExportedChatlistInvite"], + ], + ], + ], + [ + "chatlists.exportedInvites", + [ + 0x10AB6DC7, + [ + ["invites", ["ExportedChatlistInvite"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "chatlists.chatlistInviteAlready", + [ + 0xFA87F659, + [ + ["filter_id", "number", "int"], + ["missing_peers", ["Peer"], "Vector"], + ["already_peers", ["Peer"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "chatlists.chatlistInvite", + [ + 0x1DCD839D, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["emoticon", "string", "flags.0?string"], + ["peers", ["Peer"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "chatlists.chatlistUpdates", + [ + 0x93BD878D, + [ + ["missing_peers", ["Peer"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "bots.botInfo", + [ + 0xE8A775B0, + [ + ["name", "string", "string"], + ["about", "string", "string"], + ["description", "string", "string"], + ], + ], + ], + [ + "messagePeerVote", + [ + 0xB6CC2D5C, + [ + ["peer", "Peer", "Peer"], + ["option", Uint8Array, "bytes"], + ["date", "number", "int"], + ], + ], + ], + [ + "messagePeerVoteInputOption", + [ + 0x74CDA504, + [ + ["peer", "Peer", "Peer"], + ["date", "number", "int"], + ], + ], + ], + [ + "messagePeerVoteMultiple", + [ + 0x4628F6E6, + [ + ["peer", "Peer", "Peer"], + ["options", [Uint8Array], "Vector"], + ["date", "number", "int"], + ], + ], + ], + [ + "sponsoredWebPage", + [ + 0x3DB8EC63, + [ + ["flags", flags, "#"], + ["url", "string", "string"], + ["site_name", "string", "string"], + ["photo", "Photo", "flags.0?Photo"], + ], + ], + ], + [ + "storyViews", + [ + 0x8D595CD6, + [ + ["flags", flags, "#"], + ["has_viewers", "true", "flags.1?true"], + ["views_count", "number", "int"], + ["forwards_count", "number", "flags.2?int"], + ["reactions", ["ReactionCount"], "flags.3?Vector"], + ["reactions_count", "number", "flags.4?int"], + ["recent_viewers", ["bigint"], "flags.0?Vector"], + ], + ], + ], + [ + "storyItemDeleted", + [ + 0x51E6EE4F, + [ + ["id", "number", "int"], + ], + ], + ], + [ + "storyItemSkipped", + [ + 0xFFADC913, + [ + ["flags", flags, "#"], + ["close_friends", "true", "flags.8?true"], + ["id", "number", "int"], + ["date", "number", "int"], + ["expire_date", "number", "int"], + ], + ], + ], + [ + "storyItem", + [ + 0x79B26A24, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.5?true"], + ["public", "true", "flags.7?true"], + ["close_friends", "true", "flags.8?true"], + ["min", "true", "flags.9?true"], + ["noforwards", "true", "flags.10?true"], + ["edited", "true", "flags.11?true"], + ["contacts", "true", "flags.12?true"], + ["selected_contacts", "true", "flags.13?true"], + ["out", "true", "flags.16?true"], + ["id", "number", "int"], + ["date", "number", "int"], + ["from_id", "Peer", "flags.18?Peer"], + ["fwd_from", "StoryFwdHeader", "flags.17?StoryFwdHeader"], + ["expire_date", "number", "int"], + ["caption", "string", "flags.0?string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["media", "MessageMedia", "MessageMedia"], + ["media_areas", ["MediaArea"], "flags.14?Vector"], + ["privacy", ["PrivacyRule"], "flags.2?Vector"], + ["views", "StoryViews", "flags.3?StoryViews"], + ["sent_reaction", "Reaction", "flags.15?Reaction"], + ], + ], + ], + [ + "stories.allStoriesNotModified", + [ + 0x1158FE3E, + [ + ["flags", flags, "#"], + ["state", "string", "string"], + ["stealth_mode", "StoriesStealthMode", "StoriesStealthMode"], + ], + ], + ], + [ + "stories.allStories", + [ + 0x6EFC5E81, + [ + ["flags", flags, "#"], + ["has_more", "true", "flags.0?true"], + ["count", "number", "int"], + ["state", "string", "string"], + ["peer_stories", ["PeerStories"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["stealth_mode", "StoriesStealthMode", "StoriesStealthMode"], + ], + ], + ], + [ + "stories.stories", + [ + 0x5DD8C3C8, + [ + ["count", "number", "int"], + ["stories", ["StoryItem"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "storyView", + [ + 0xB0BDEAC5, + [ + ["flags", flags, "#"], + ["blocked", "true", "flags.0?true"], + ["blocked_my_stories_from", "true", "flags.1?true"], + ["user_id", "bigint", "long"], + ["date", "number", "int"], + ["reaction", "Reaction", "flags.2?Reaction"], + ], + ], + ], + [ + "storyViewPublicForward", + [ + 0x9083670B, + [ + ["flags", flags, "#"], + ["blocked", "true", "flags.0?true"], + ["blocked_my_stories_from", "true", "flags.1?true"], + ["message", "Message", "Message"], + ], + ], + ], + [ + "storyViewPublicRepost", + [ + 0xBD74CF49, + [ + ["flags", flags, "#"], + ["blocked", "true", "flags.0?true"], + ["blocked_my_stories_from", "true", "flags.1?true"], + ["peer_id", "Peer", "Peer"], + ["story", "StoryItem", "StoryItem"], + ], + ], + ], + [ + "stories.storyViewsList", + [ + 0x59D78FC5, + [ + ["flags", flags, "#"], + ["count", "number", "int"], + ["views_count", "number", "int"], + ["forwards_count", "number", "int"], + ["reactions_count", "number", "int"], + ["views", ["StoryView"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["next_offset", "string", "flags.0?string"], + ], + ], + ], + [ + "stories.storyViews", + [ + 0xDE9EED1D, + [ + ["views", ["StoryViews"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "inputReplyToMessage", + [ + 0x22C0F6D5, + [ + ["flags", flags, "#"], + ["reply_to_msg_id", "number", "int"], + ["top_msg_id", "number", "flags.0?int"], + ["reply_to_peer_id", "InputPeer", "flags.1?InputPeer"], + ["quote_text", "string", "flags.2?string"], + ["quote_entities", ["MessageEntity"], "flags.3?Vector"], + ["quote_offset", "number", "flags.4?int"], + ], + ], + ], + [ + "inputReplyToStory", + [ + 0x5881323A, + [ + ["peer", "InputPeer", "InputPeer"], + ["story_id", "number", "int"], + ], + ], + ], + [ + "exportedStoryLink", + [ + 0x3FC9053B, + [ + ["link", "string", "string"], + ], + ], + ], + [ + "storiesStealthMode", + [ + 0x712E27FD, + [ + ["flags", flags, "#"], + ["active_until_date", "number", "flags.0?int"], + ["cooldown_until_date", "number", "flags.1?int"], + ], + ], + ], + [ + "mediaAreaCoordinates", + [ + 0x03D1EA4E, + [ + ["x", "number", "double"], + ["y", "number", "double"], + ["w", "number", "double"], + ["h", "number", "double"], + ["rotation", "number", "double"], + ], + ], + ], + [ + "mediaAreaVenue", + [ + 0xBE82DB9C, + [ + ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"], + ["geo", "GeoPoint", "GeoPoint"], + ["title", "string", "string"], + ["address", "string", "string"], + ["provider", "string", "string"], + ["venue_id", "string", "string"], + ["venue_type", "string", "string"], + ], + ], + ], + [ + "inputMediaAreaVenue", + [ + 0xB282217F, + [ + ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"], + ["query_id", "bigint", "long"], + ["result_id", "string", "string"], + ], + ], + ], + [ + "mediaAreaGeoPoint", + [ + 0xDF8B3B22, + [ + ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"], + ["geo", "GeoPoint", "GeoPoint"], + ], + ], + ], + [ + "mediaAreaSuggestedReaction", + [ + 0x14455871, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["flipped", "true", "flags.1?true"], + ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"], + ["reaction", "Reaction", "Reaction"], + ], + ], + ], + [ + "mediaAreaChannelPost", + [ + 0x770416AF, + [ + ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"], + ["channel_id", "bigint", "long"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "inputMediaAreaChannelPost", + [ + 0x2271F2BF, + [ + ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"], + ["channel", "InputChannel", "InputChannel"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "peerStories", + [ + 0x9A35E999, + [ + ["flags", flags, "#"], + ["peer", "Peer", "Peer"], + ["max_read_id", "number", "flags.0?int"], + ["stories", ["StoryItem"], "Vector"], + ], + ], + ], + [ + "stories.peerStories", + [ + 0xCAE68768, + [ + ["stories", "PeerStories", "PeerStories"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.webPage", + [ + 0xFD5E12BD, + [ + ["webpage", "WebPage", "WebPage"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "premiumGiftCodeOption", + [ + 0x257E962B, + [ + ["flags", flags, "#"], + ["users", "number", "int"], + ["months", "number", "int"], + ["store_product", "string", "flags.0?string"], + ["store_quantity", "number", "flags.1?int"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ], + ], + ], + [ + "payments.checkedGiftCode", + [ + 0x284A1096, + [ + ["flags", flags, "#"], + ["via_giveaway", "true", "flags.2?true"], + ["from_id", "Peer", "flags.4?Peer"], + ["giveaway_msg_id", "number", "flags.3?int"], + ["to_id", "bigint", "flags.0?long"], + ["date", "number", "int"], + ["months", "number", "int"], + ["used_date", "number", "flags.1?int"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "payments.giveawayInfo", + [ + 0x4367DAA0, + [ + ["flags", flags, "#"], + ["participating", "true", "flags.0?true"], + ["preparing_results", "true", "flags.3?true"], + ["start_date", "number", "int"], + ["joined_too_early_date", "number", "flags.1?int"], + ["admin_disallowed_chat_id", "bigint", "flags.2?long"], + ["disallowed_country", "string", "flags.4?string"], + ], + ], + ], + [ + "payments.giveawayInfoResults", + [ + 0x00CD5570, + [ + ["flags", flags, "#"], + ["winner", "true", "flags.0?true"], + ["refunded", "true", "flags.1?true"], + ["start_date", "number", "int"], + ["gift_code_slug", "string", "flags.0?string"], + ["finish_date", "number", "int"], + ["winners_count", "number", "int"], + ["activated_count", "number", "int"], + ], + ], + ], + [ + "prepaidGiveaway", + [ + 0xB2539D54, + [ + ["id", "bigint", "long"], + ["months", "number", "int"], + ["quantity", "number", "int"], + ["date", "number", "int"], + ], + ], + ], + [ + "boost", + [ + 0x2A1C8C71, + [ + ["flags", flags, "#"], + ["gift", "true", "flags.1?true"], + ["giveaway", "true", "flags.2?true"], + ["unclaimed", "true", "flags.3?true"], + ["id", "string", "string"], + ["user_id", "bigint", "flags.0?long"], + ["giveaway_msg_id", "number", "flags.2?int"], + ["date", "number", "int"], + ["expires", "number", "int"], + ["used_gift_slug", "string", "flags.4?string"], + ["multiplier", "number", "flags.5?int"], + ], + ], + ], + [ + "premium.boostsList", + [ + 0x86F8613C, + [ + ["flags", flags, "#"], + ["count", "number", "int"], + ["boosts", ["Boost"], "Vector"], + ["next_offset", "string", "flags.0?string"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "myBoost", + [ + 0xC448415C, + [ + ["flags", flags, "#"], + ["slot", "number", "int"], + ["peer", "Peer", "flags.0?Peer"], + ["date", "number", "int"], + ["expires", "number", "int"], + ["cooldown_until_date", "number", "flags.1?int"], + ], + ], + ], + [ + "premium.myBoosts", + [ + 0x9AE228E2, + [ + ["my_boosts", ["MyBoost"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "premium.boostsStatus", + [ + 0x4959427A, + [ + ["flags", flags, "#"], + ["my_boost", "true", "flags.2?true"], + ["level", "number", "int"], + ["current_level_boosts", "number", "int"], + ["boosts", "number", "int"], + ["gift_boosts", "number", "flags.4?int"], + ["next_level_boosts", "number", "flags.0?int"], + ["premium_audience", "StatsPercentValue", "flags.1?StatsPercentValue"], + ["boost_url", "string", "string"], + ["prepaid_giveaways", ["PrepaidGiveaway"], "flags.3?Vector"], + ["my_boost_slots", ["number"], "flags.2?Vector"], + ], + ], + ], + [ + "storyFwdHeader", + [ + 0xB826E150, + [ + ["flags", flags, "#"], + ["modified", "true", "flags.3?true"], + ["from", "Peer", "flags.0?Peer"], + ["from_name", "string", "flags.1?string"], + ["story_id", "number", "flags.2?int"], + ], + ], + ], + [ + "postInteractionCountersMessage", + [ + 0xE7058E7F, + [ + ["msg_id", "number", "int"], + ["views", "number", "int"], + ["forwards", "number", "int"], + ["reactions", "number", "int"], + ], + ], + ], + [ + "postInteractionCountersStory", + [ + 0x8A480E27, + [ + ["story_id", "number", "int"], + ["views", "number", "int"], + ["forwards", "number", "int"], + ["reactions", "number", "int"], + ], + ], + ], + [ + "stats.storyStats", + [ + 0x50CD067C, + [ + ["views_graph", "StatsGraph", "StatsGraph"], + ["reactions_by_emotion_graph", "StatsGraph", "StatsGraph"], + ], + ], + ], + [ + "publicForwardMessage", + [ + 0x01F2BF4A, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "publicForwardStory", + [ + 0xEDF3ADD0, + [ + ["peer", "Peer", "Peer"], + ["story", "StoryItem", "StoryItem"], + ], + ], + ], + [ + "stats.publicForwards", + [ + 0x93037E20, + [ + ["flags", flags, "#"], + ["count", "number", "int"], + ["forwards", ["PublicForward"], "Vector"], + ["next_offset", "string", "flags.0?string"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "peerColor", + [ + 0xB54B5ACF, + [ + ["flags", flags, "#"], + ["color", "number", "flags.0?int"], + ["background_emoji_id", "bigint", "flags.1?long"], + ], + ], + ], + [ + "help.peerColorSet", + [ + 0x26219A58, + [ + ["colors", ["number"], "Vector"], + ], + ], + ], + [ + "help.peerColorProfileSet", + [ + 0x767D61EB, + [ + ["palette_colors", ["number"], "Vector"], + ["bg_colors", ["number"], "Vector"], + ["story_colors", ["number"], "Vector"], + ], + ], + ], + [ + "help.peerColorOption", + [ + 0xADEC6EBE, + [ + ["flags", flags, "#"], + ["hidden", "true", "flags.0?true"], + ["color_id", "number", "int"], + ["colors", "help_PeerColorSet", "flags.1?help.PeerColorSet"], + ["dark_colors", "help_PeerColorSet", "flags.2?help.PeerColorSet"], + ["channel_min_level", "number", "flags.3?int"], + ["group_min_level", "number", "flags.4?int"], + ], + ], + ], + [ + "help.peerColorsNotModified", + [ + 0x2BA1F5CE, + [], + ], + ], + [ + "help.peerColors", + [ + 0x00F8ED08, + [ + ["hash", "number", "int"], + ["colors", ["help_PeerColorOption"], "Vector"], + ], + ], + ], + [ + "storyReaction", + [ + 0x6090D6D5, + [ + ["peer_id", "Peer", "Peer"], + ["date", "number", "int"], + ["reaction", "Reaction", "Reaction"], + ], + ], + ], + [ + "storyReactionPublicForward", + [ + 0xBBAB2643, + [ + ["message", "Message", "Message"], + ], + ], + ], + [ + "storyReactionPublicRepost", + [ + 0xCFCD0F13, + [ + ["peer_id", "Peer", "Peer"], + ["story", "StoryItem", "StoryItem"], + ], + ], + ], + [ + "stories.storyReactionsList", + [ + 0xAA5F789C, + [ + ["flags", flags, "#"], + ["count", "number", "int"], + ["reactions", ["StoryReaction"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ["next_offset", "string", "flags.0?string"], + ], + ], + ], + [ + "savedDialog", + [ + 0xBD87CB6C, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.2?true"], + ["peer", "Peer", "Peer"], + ["top_message", "number", "int"], + ], + ], + ], + [ + "messages.savedDialogs", + [ + 0xF83AE221, + [ + ["dialogs", ["SavedDialog"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.savedDialogsSlice", + [ + 0x44BA9DD9, + [ + ["count", "number", "int"], + ["dialogs", ["SavedDialog"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.savedDialogsNotModified", + [ + 0xC01F6FE8, + [ + ["count", "number", "int"], + ], + ], + ], + [ + "savedReactionTag", + [ + 0xCB6FF828, + [ + ["flags", flags, "#"], + ["reaction", "Reaction", "Reaction"], + ["title", "string", "flags.0?string"], + ["count", "number", "int"], + ], + ], + ], + [ + "messages.savedReactionTagsNotModified", + [ + 0x889B59EF, + [], + ], + ], + [ + "messages.savedReactionTags", + [ + 0x3259950A, + [ + ["tags", ["SavedReactionTag"], "Vector"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "outboxReadDate", + [ + 0x3BB842AC, + [ + ["date", "number", "int"], + ], + ], + ], + [ + "smsjobs.eligibleToJoin", + [ + 0xDC8B44CF, + [ + ["terms_url", "string", "string"], + ["monthly_sent_sms", "number", "int"], + ], + ], + ], + [ + "smsjobs.status", + [ + 0x2AEE9191, + [ + ["flags", flags, "#"], + ["allow_international", "true", "flags.0?true"], + ["recent_sent", "number", "int"], + ["recent_since", "number", "int"], + ["recent_remains", "number", "int"], + ["total_sent", "number", "int"], + ["total_since", "number", "int"], + ["last_gift_slug", "string", "flags.1?string"], + ["terms_url", "string", "string"], + ], + ], + ], + [ + "smsJob", + [ + 0xE6A1EEB8, + [ + ["job_id", "string", "string"], + ["phone_number", "string", "string"], + ["text", "string", "string"], + ], + ], + ], + [ + "businessWeeklyOpen", + [ + 0x120B1AB9, + [ + ["start_minute", "number", "int"], + ["end_minute", "number", "int"], + ], + ], + ], + [ + "businessWorkHours", + [ + 0x8C92B098, + [ + ["flags", flags, "#"], + ["open_now", "true", "flags.0?true"], + ["timezone_id", "string", "string"], + ["weekly_open", ["BusinessWeeklyOpen"], "Vector"], + ], + ], + ], + [ + "businessLocation", + [ + 0xAC5C1AF7, + [ + ["flags", flags, "#"], + ["geo_point", "GeoPoint", "flags.0?GeoPoint"], + ["address", "string", "string"], + ], + ], + ], + [ + "inputBusinessRecipients", + [ + 0x6F8B32AA, + [ + ["flags", flags, "#"], + ["existing_chats", "true", "flags.0?true"], + ["new_chats", "true", "flags.1?true"], + ["contacts", "true", "flags.2?true"], + ["non_contacts", "true", "flags.3?true"], + ["exclude_selected", "true", "flags.5?true"], + ["users", ["InputUser"], "flags.4?Vector"], + ], + ], + ], + [ + "businessRecipients", + [ + 0x21108FF7, + [ + ["flags", flags, "#"], + ["existing_chats", "true", "flags.0?true"], + ["new_chats", "true", "flags.1?true"], + ["contacts", "true", "flags.2?true"], + ["non_contacts", "true", "flags.3?true"], + ["exclude_selected", "true", "flags.5?true"], + ["users", ["bigint"], "flags.4?Vector"], + ], + ], + ], + [ + "businessAwayMessageScheduleAlways", + [ + 0xC9B9E2B9, + [], + ], + ], + [ + "businessAwayMessageScheduleOutsideWorkHours", + [ + 0xC3F2F501, + [], + ], + ], + [ + "businessAwayMessageScheduleCustom", + [ + 0xCC4D9ECC, + [ + ["start_date", "number", "int"], + ["end_date", "number", "int"], + ], + ], + ], + [ + "inputBusinessGreetingMessage", + [ + 0x0194CB3B, + [ + ["shortcut_id", "number", "int"], + ["recipients", "InputBusinessRecipients", "InputBusinessRecipients"], + ["no_activity_days", "number", "int"], + ], + ], + ], + [ + "businessGreetingMessage", + [ + 0xE519ABAB, + [ + ["shortcut_id", "number", "int"], + ["recipients", "BusinessRecipients", "BusinessRecipients"], + ["no_activity_days", "number", "int"], + ], + ], + ], + [ + "inputBusinessAwayMessage", + [ + 0x832175E0, + [ + ["flags", flags, "#"], + ["offline_only", "true", "flags.0?true"], + ["shortcut_id", "number", "int"], + ["schedule", "BusinessAwayMessageSchedule", "BusinessAwayMessageSchedule"], + ["recipients", "InputBusinessRecipients", "InputBusinessRecipients"], + ], + ], + ], + [ + "businessAwayMessage", + [ + 0xEF156A5C, + [ + ["flags", flags, "#"], + ["offline_only", "true", "flags.0?true"], + ["shortcut_id", "number", "int"], + ["schedule", "BusinessAwayMessageSchedule", "BusinessAwayMessageSchedule"], + ["recipients", "BusinessRecipients", "BusinessRecipients"], + ], + ], + ], + [ + "timezone", + [ + 0xFF9289F5, + [ + ["id", "string", "string"], + ["name", "string", "string"], + ["utc_offset", "number", "int"], + ], + ], + ], + [ + "help.timezonesListNotModified", + [ + 0x970708CC, + [], + ], + ], + [ + "help.timezonesList", + [ + 0x7B74ED71, + [ + ["timezones", ["Timezone"], "Vector"], + ["hash", "number", "int"], + ], + ], + ], + [ + "quickReply", + [ + 0x0697102B, + [ + ["shortcut_id", "number", "int"], + ["shortcut", "string", "string"], + ["top_message", "number", "int"], + ["count", "number", "int"], + ], + ], + ], + [ + "inputQuickReplyShortcut", + [ + 0x24596D41, + [ + ["shortcut", "string", "string"], + ], + ], + ], + [ + "inputQuickReplyShortcutId", + [ + 0x01190CF1, + [ + ["shortcut_id", "number", "int"], + ], + ], + ], + [ + "messages.quickReplies", + [ + 0xC68D6695, + [ + ["quick_replies", ["QuickReply"], "Vector"], + ["messages", ["Message"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.quickRepliesNotModified", + [ + 0x5F91EB5B, + [], + ], + ], + [ + "connectedBot", + [ + 0xBD068601, + [ + ["flags", flags, "#"], + ["can_reply", "true", "flags.0?true"], + ["bot_id", "bigint", "long"], + ["recipients", "BusinessBotRecipients", "BusinessBotRecipients"], + ], + ], + ], + [ + "account.connectedBots", + [ + 0x17D7F87B, + [ + ["connected_bots", ["ConnectedBot"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "messages.dialogFilters", + [ + 0x2AD93719, + [ + ["flags", flags, "#"], + ["tags_enabled", "true", "flags.0?true"], + ["filters", ["DialogFilter"], "Vector"], + ], + ], + ], + [ + "birthday", + [ + 0x6C8E1E06, + [ + ["flags", flags, "#"], + ["day", "number", "int"], + ["month", "number", "int"], + ["year", "number", "flags.0?int"], + ], + ], + ], + [ + "botBusinessConnection", + [ + 0x896433B4, + [ + ["flags", flags, "#"], + ["can_reply", "true", "flags.0?true"], + ["disabled", "true", "flags.1?true"], + ["connection_id", "string", "string"], + ["user_id", "bigint", "long"], + ["dc_id", "number", "int"], + ["date", "number", "int"], + ], + ], + ], + [ + "inputBusinessIntro", + [ + 0x09C469CD, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["description", "string", "string"], + ["sticker", "InputDocument", "flags.0?InputDocument"], + ], + ], + ], + [ + "businessIntro", + [ + 0x5A0A066D, + [ + ["flags", flags, "#"], + ["title", "string", "string"], + ["description", "string", "string"], + ["sticker", "Document", "flags.0?Document"], + ], + ], + ], + [ + "messages.myStickers", + [ + 0xFAFF629D, + [ + ["count", "number", "int"], + ["sets", ["StickerSetCovered"], "Vector"], + ], + ], + ], + [ + "inputCollectibleUsername", + [ + 0xE39460A9, + [ + ["username", "string", "string"], + ], + ], + ], + [ + "inputCollectiblePhone", + [ + 0xA2E214A4, + [ + ["phone", "string", "string"], + ], + ], + ], + [ + "fragment.collectibleInfo", + [ + 0x6EBDFF91, + [ + ["purchase_date", "number", "int"], + ["currency", "string", "string"], + ["amount", "bigint", "long"], + ["crypto_currency", "string", "string"], + ["crypto_amount", "bigint", "long"], + ["url", "string", "string"], + ], + ], + ], + [ + "inputBusinessBotRecipients", + [ + 0xC4E5921E, + [ + ["flags", flags, "#"], + ["existing_chats", "true", "flags.0?true"], + ["new_chats", "true", "flags.1?true"], + ["contacts", "true", "flags.2?true"], + ["non_contacts", "true", "flags.3?true"], + ["exclude_selected", "true", "flags.5?true"], + ["users", ["InputUser"], "flags.4?Vector"], + ["exclude_users", ["InputUser"], "flags.6?Vector"], + ], + ], + ], + [ + "businessBotRecipients", + [ + 0xB88CF373, + [ + ["flags", flags, "#"], + ["existing_chats", "true", "flags.0?true"], + ["new_chats", "true", "flags.1?true"], + ["contacts", "true", "flags.2?true"], + ["non_contacts", "true", "flags.3?true"], + ["exclude_selected", "true", "flags.5?true"], + ["users", ["bigint"], "flags.4?Vector"], + ["exclude_users", ["bigint"], "flags.6?Vector"], + ], + ], + ], + [ + "contactBirthday", + [ + 0x1D998733, + [ + ["contact_id", "bigint", "long"], + ["birthday", "Birthday", "Birthday"], + ], + ], + ], + [ + "contacts.contactBirthdays", + [ + 0x114FF30D, + [ + ["contacts", ["ContactBirthday"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "missingInvitee", + [ + 0x628C9224, + [ + ["flags", flags, "#"], + ["premium_would_allow_invite", "true", "flags.0?true"], + ["premium_required_for_pm", "true", "flags.1?true"], + ["user_id", "bigint", "long"], + ], + ], + ], + [ + "messages.invitedUsers", + [ + 0x7F5DEFA6, + [ + ["updates", "Updates", "Updates"], + ["missing_invitees", ["MissingInvitee"], "Vector"], + ], + ], + ], + [ + "inputBusinessChatLink", + [ + 0x11679FA7, + [ + ["flags", flags, "#"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.0?Vector"], + ["title", "string", "flags.1?string"], + ], + ], + ], + [ + "businessChatLink", + [ + 0xB4AE666F, + [ + ["flags", flags, "#"], + ["link", "string", "string"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.0?Vector"], + ["title", "string", "flags.1?string"], + ["views", "number", "int"], + ], + ], + ], + [ + "account.businessChatLinks", + [ + 0xEC43A2D1, + [ + ["links", ["BusinessChatLink"], "Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "account.resolvedBusinessChatLinks", + [ + 0x9A23AF21, + [ + ["flags", flags, "#"], + ["peer", "Peer", "Peer"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.0?Vector"], + ["chats", ["Chat"], "Vector"], + ["users", ["User"], "Vector"], + ], + ], + ], + [ + "requestedPeerUser", + [ + 0xD62FF46A, + [ + ["flags", flags, "#"], + ["user_id", "bigint", "long"], + ["first_name", "string", "flags.0?string"], + ["last_name", "string", "flags.0?string"], + ["username", "string", "flags.1?string"], + ["photo", "Photo", "flags.2?Photo"], + ], + ], + ], + [ + "requestedPeerChat", + [ + 0x7307544F, + [ + ["flags", flags, "#"], + ["chat_id", "bigint", "long"], + ["title", "string", "flags.0?string"], + ["photo", "Photo", "flags.2?Photo"], + ], + ], + ], + [ + "requestedPeerChannel", + [ + 0x8BA403E4, + [ + ["flags", flags, "#"], + ["channel_id", "bigint", "long"], + ["title", "string", "flags.0?string"], + ["username", "string", "flags.1?string"], + ["photo", "Photo", "flags.2?Photo"], + ], + ], + ], + [ + "sponsoredMessageReportOption", + [ + 0x430D3150, + [ + ["text", "string", "string"], + ["option", Uint8Array, "bytes"], + ], + ], + ], + [ + "channels.sponsoredMessageReportResultChooseOption", + [ + 0x846F9E42, + [ + ["title", "string", "string"], + ["options", ["SponsoredMessageReportOption"], "Vector"], + ], + ], + ], + [ + "channels.sponsoredMessageReportResultAdsHidden", + [ + 0x3E3BCF2F, + [], + ], + ], + [ + "channels.sponsoredMessageReportResultReported", + [ + 0xAD798849, + [], + ], + ], + [ + "stats.broadcastRevenueStats", + [ + 0xD07B4BAD, + [ + ["top_hours_graph", "StatsGraph", "StatsGraph"], + ["revenue_graph", "StatsGraph", "StatsGraph"], + ["current_balance", "bigint", "long"], + ["available_balance", "bigint", "long"], + ["overall_revenue", "bigint", "long"], + ["usd_rate", "number", "double"], + ], + ], + ], + [ + "stats.broadcastRevenueWithdrawalUrl", + [ + 0xEC659737, + [ + ["url", "string", "string"], + ], + ], + ], + [ + "broadcastRevenueTransactionProceeds", + [ + 0x557E2CC4, + [ + ["amount", "bigint", "long"], + ["from_date", "number", "int"], + ["to_date", "number", "int"], + ], + ], + ], + [ + "broadcastRevenueTransactionWithdrawal", + [ + 0x5A590978, + [ + ["flags", flags, "#"], + ["pending", "true", "flags.0?true"], + ["failed", "true", "flags.2?true"], + ["amount", "bigint", "long"], + ["date", "number", "int"], + ["provider", "string", "string"], + ["transaction_date", "number", "flags.1?int"], + ["transaction_url", "string", "flags.1?string"], + ], + ], + ], + [ + "broadcastRevenueTransactionRefund", + [ + 0x42D30D2E, + [ + ["amount", "bigint", "long"], + ["date", "number", "int"], + ["provider", "string", "string"], + ], + ], + ], + [ + "stats.broadcastRevenueTransactions", + [ + 0x87158466, + [ + ["count", "number", "int"], + ["transactions", ["BroadcastRevenueTransaction"], "Vector"], + ], + ], + ], + [ + "req_pq_multi", + [ + 0xBE7E8EF1, + [ + ["nonce", "bigint", "int128"], + ], + ], + ], + [ + "req_DH_params", + [ + 0xD712E4BE, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["p", Uint8Array, "bytes"], + ["q", Uint8Array, "bytes"], + ["public_key_fingerprint", "bigint", "long"], + ["encrypted_data", Uint8Array, "bytes"], + ], + ], + ], + [ + "set_client_DH_params", + [ + 0xF5045F1F, + [ + ["nonce", "bigint", "int128"], + ["server_nonce", "bigint", "int128"], + ["encrypted_data", Uint8Array, "bytes"], + ], + ], + ], + [ + "rpc_drop_answer", + [ + 0x58E4A740, + [ + ["req_msg_id", "bigint", "long"], + ], + ], + ], + [ + "get_future_salts", + [ + 0xB921BD04, + [ + ["num", "number", "int"], + ], + ], + ], + [ + "ping", + [ + 0x7ABE77EC, + [ + ["ping_id", "bigint", "long"], + ], + ], + ], + [ + "ping_delay_disconnect", + [ + 0xF3427B8C, + [ + ["ping_id", "bigint", "long"], + ["disconnect_delay", "number", "int"], + ], + ], + ], + [ + "destroy_session", + [ + 0xE7512126, + [ + ["session_id", "bigint", "long"], + ], + ], + ], + [ + "destroy_auth_key", + [ + 0xD1435160, + [], + ], + ], + [ + "invokeWithBusinessConnectionPrefix", + [ + 0xDD289F8E, + [ + ["connection_id", "string", "string"], + ], + ], + ], + [ + "invokeAfterMsg", + [ + 0xCB9F372D, + [ + ["msg_id", "bigint", "long"], + ["query", null, "!X"], + ], + ], + ], + [ + "invokeAfterMsgs", + [ + 0x3DC4B4F0, + [ + ["msg_ids", ["bigint"], "Vector"], + ["query", null, "!X"], + ], + ], + ], + [ + "initConnection", + [ + 0xC1CD5EA9, + [ + ["flags", flags, "#"], + ["api_id", "number", "int"], + ["device_model", "string", "string"], + ["system_version", "string", "string"], + ["app_version", "string", "string"], + ["system_lang_code", "string", "string"], + ["lang_pack", "string", "string"], + ["lang_code", "string", "string"], + ["proxy", "InputClientProxy", "flags.0?InputClientProxy"], + ["params", "JSONValue", "flags.1?JSONValue"], + ["query", null, "!X"], + ], + ], + ], + [ + "invokeWithLayer", + [ + 0xDA9B0D0D, + [ + ["layer", "number", "int"], + ["query", null, "!X"], + ], + ], + ], + [ + "invokeWithoutUpdates", + [ + 0xBF9459B7, + [ + ["query", null, "!X"], + ], + ], + ], + [ + "invokeWithMessagesRange", + [ + 0x365275F2, + [ + ["range", "MessageRange", "MessageRange"], + ["query", null, "!X"], + ], + ], + ], + [ + "invokeWithTakeout", + [ + 0xACA9FD2E, + [ + ["takeout_id", "bigint", "long"], + ["query", null, "!X"], + ], + ], + ], + [ + "invokeWithBusinessConnection", + [ + 0xDD289F8E, + [ + ["connection_id", "string", "string"], + ["query", null, "!X"], + ], + ], + ], + [ + "auth.sendCode", + [ + 0xA677244F, + [ + ["phone_number", "string", "string"], + ["api_id", "number", "int"], + ["api_hash", "string", "string"], + ["settings", "CodeSettings", "CodeSettings"], + ], + ], + ], + [ + "auth.signUp", + [ + 0xAAC7B717, + [ + ["flags", flags, "#"], + ["no_joined_notifications", "true", "flags.0?true"], + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ], + ], + ], + [ + "auth.signIn", + [ + 0x8D52A951, + [ + ["flags", flags, "#"], + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ["phone_code", "string", "flags.0?string"], + ["email_verification", "EmailVerification", "flags.1?EmailVerification"], + ], + ], + ], + [ + "auth.logOut", + [ + 0x3E72BA19, + [], + ], + ], + [ + "auth.resetAuthorizations", + [ + 0x9FAB0D1A, + [], + ], + ], + [ + "auth.exportAuthorization", + [ + 0xE5BFFFCD, + [ + ["dc_id", "number", "int"], + ], + ], + ], + [ + "auth.importAuthorization", + [ + 0xA57A7DAD, + [ + ["id", "bigint", "long"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "auth.bindTempAuthKey", + [ + 0xCDD42A05, + [ + ["perm_auth_key_id", "bigint", "long"], + ["nonce", "bigint", "long"], + ["expires_at", "number", "int"], + ["encrypted_message", Uint8Array, "bytes"], + ], + ], + ], + [ + "auth.importBotAuthorization", + [ + 0x67A3FF2C, + [ + ["flags", "number", "int"], + ["api_id", "number", "int"], + ["api_hash", "string", "string"], + ["bot_auth_token", "string", "string"], + ], + ], + ], + [ + "auth.checkPassword", + [ + 0xD18B4D16, + [ + ["password", "InputCheckPasswordSRP", "InputCheckPasswordSRP"], + ], + ], + ], + [ + "auth.requestPasswordRecovery", + [ + 0xD897BC66, + [], + ], + ], + [ + "auth.recoverPassword", + [ + 0x37096C70, + [ + ["flags", flags, "#"], + ["code", "string", "string"], + ["new_settings", "account_PasswordInputSettings", "flags.0?account.PasswordInputSettings"], + ], + ], + ], + [ + "auth.resendCode", + [ + 0x3EF1A9BF, + [ + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ], + ], + ], + [ + "auth.cancelCode", + [ + 0x1F040578, + [ + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ], + ], + ], + [ + "auth.dropTempAuthKeys", + [ + 0x8E48A188, + [ + ["except_auth_keys", ["bigint"], "Vector"], + ], + ], + ], + [ + "auth.exportLoginToken", + [ + 0xB7E085FE, + [ + ["api_id", "number", "int"], + ["api_hash", "string", "string"], + ["except_ids", ["bigint"], "Vector"], + ], + ], + ], + [ + "auth.importLoginToken", + [ + 0x95AC5CE4, + [ + ["token", Uint8Array, "bytes"], + ], + ], + ], + [ + "auth.acceptLoginToken", + [ + 0xE894AD4D, + [ + ["token", Uint8Array, "bytes"], + ], + ], + ], + [ + "auth.checkRecoveryPassword", + [ + 0x0D36BF79, + [ + ["code", "string", "string"], + ], + ], + ], + [ + "auth.importWebTokenAuthorization", + [ + 0x2DB873A9, + [ + ["api_id", "number", "int"], + ["api_hash", "string", "string"], + ["web_auth_token", "string", "string"], + ], + ], + ], + [ + "auth.requestFirebaseSms", + [ + 0x89464B50, + [ + ["flags", flags, "#"], + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ["safety_net_token", "string", "flags.0?string"], + ["ios_push_secret", "string", "flags.1?string"], + ], + ], + ], + [ + "auth.resetLoginEmail", + [ + 0x7E960193, + [ + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ], + ], + ], + [ + "account.registerDevice", + [ + 0xEC86017A, + [ + ["flags", flags, "#"], + ["no_muted", "true", "flags.0?true"], + ["token_type", "number", "int"], + ["token", "string", "string"], + ["app_sandbox", "boolean", "Bool"], + ["secret", Uint8Array, "bytes"], + ["other_uids", ["bigint"], "Vector"], + ], + ], + ], + [ + "account.unregisterDevice", + [ + 0x6A0D3206, + [ + ["token_type", "number", "int"], + ["token", "string", "string"], + ["other_uids", ["bigint"], "Vector"], + ], + ], + ], + [ + "account.updateNotifySettings", + [ + 0x84BE5B93, + [ + ["peer", "InputNotifyPeer", "InputNotifyPeer"], + ["settings", "InputPeerNotifySettings", "InputPeerNotifySettings"], + ], + ], + ], + [ + "account.getNotifySettings", + [ + 0x12B3AD31, + [ + ["peer", "InputNotifyPeer", "InputNotifyPeer"], + ], + ], + ], + [ + "account.resetNotifySettings", + [ + 0xDB7E1747, + [], + ], + ], + [ + "account.updateProfile", + [ + 0x78515775, + [ + ["flags", flags, "#"], + ["first_name", "string", "flags.0?string"], + ["last_name", "string", "flags.1?string"], + ["about", "string", "flags.2?string"], + ], + ], + ], + [ + "account.updateStatus", + [ + 0x6628562C, + [ + ["offline", "boolean", "Bool"], + ], + ], + ], + [ + "account.getWallPapers", + [ + 0x07967D36, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.reportPeer", + [ + 0xC5BA3D86, + [ + ["peer", "InputPeer", "InputPeer"], + ["reason", "ReportReason", "ReportReason"], + ["message", "string", "string"], + ], + ], + ], + [ + "account.checkUsername", + [ + 0x2714D86C, + [ + ["username", "string", "string"], + ], + ], + ], + [ + "account.updateUsername", + [ + 0x3E0BDD7C, + [ + ["username", "string", "string"], + ], + ], + ], + [ + "account.getPrivacy", + [ + 0xDADBC950, + [ + ["key", "InputPrivacyKey", "InputPrivacyKey"], + ], + ], + ], + [ + "account.setPrivacy", + [ + 0xC9F81CE8, + [ + ["key", "InputPrivacyKey", "InputPrivacyKey"], + ["rules", ["InputPrivacyRule"], "Vector"], + ], + ], + ], + [ + "account.deleteAccount", + [ + 0xA2C0CF74, + [ + ["flags", flags, "#"], + ["reason", "string", "string"], + ["password", "InputCheckPasswordSRP", "flags.0?InputCheckPasswordSRP"], + ], + ], + ], + [ + "account.getAccountTTL", + [ + 0x08FC711D, + [], + ], + ], + [ + "account.setAccountTTL", + [ + 0x2442485E, + [ + ["ttl", "AccountDaysTTL", "AccountDaysTTL"], + ], + ], + ], + [ + "account.sendChangePhoneCode", + [ + 0x82574AE5, + [ + ["phone_number", "string", "string"], + ["settings", "CodeSettings", "CodeSettings"], + ], + ], + ], + [ + "account.changePhone", + [ + 0x70C32EDB, + [ + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ["phone_code", "string", "string"], + ], + ], + ], + [ + "account.updateDeviceLocked", + [ + 0x38DF3532, + [ + ["period", "number", "int"], + ], + ], + ], + [ + "account.getAuthorizations", + [ + 0xE320C158, + [], + ], + ], + [ + "account.resetAuthorization", + [ + 0xDF77F3BC, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.getPassword", + [ + 0x548A30F5, + [], + ], + ], + [ + "account.getPasswordSettings", + [ + 0x9CD4EAF9, + [ + ["password", "InputCheckPasswordSRP", "InputCheckPasswordSRP"], + ], + ], + ], + [ + "account.updatePasswordSettings", + [ + 0xA59B102F, + [ + ["password", "InputCheckPasswordSRP", "InputCheckPasswordSRP"], + ["new_settings", "account_PasswordInputSettings", "account.PasswordInputSettings"], + ], + ], + ], + [ + "account.sendConfirmPhoneCode", + [ + 0x1B3FAA88, + [ + ["hash", "string", "string"], + ["settings", "CodeSettings", "CodeSettings"], + ], + ], + ], + [ + "account.confirmPhone", + [ + 0x5F2178C3, + [ + ["phone_code_hash", "string", "string"], + ["phone_code", "string", "string"], + ], + ], + ], + [ + "account.getTmpPassword", + [ + 0x449E0B51, + [ + ["password", "InputCheckPasswordSRP", "InputCheckPasswordSRP"], + ["period", "number", "int"], + ], + ], + ], + [ + "account.getWebAuthorizations", + [ + 0x182E6D6F, + [], + ], + ], + [ + "account.resetWebAuthorization", + [ + 0x2D01B9EF, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.resetWebAuthorizations", + [ + 0x682D2594, + [], + ], + ], + [ + "account.getAllSecureValues", + [ + 0xB288BC7D, + [], + ], + ], + [ + "account.getSecureValue", + [ + 0x73665BC2, + [ + ["types", ["SecureValueType"], "Vector"], + ], + ], + ], + [ + "account.saveSecureValue", + [ + 0x899FE31D, + [ + ["value", "InputSecureValue", "InputSecureValue"], + ["secure_secret_id", "bigint", "long"], + ], + ], + ], + [ + "account.deleteSecureValue", + [ + 0xB880BC4B, + [ + ["types", ["SecureValueType"], "Vector"], + ], + ], + ], + [ + "account.getAuthorizationForm", + [ + 0xA929597A, + [ + ["bot_id", "bigint", "long"], + ["scope", "string", "string"], + ["public_key", "string", "string"], + ], + ], + ], + [ + "account.acceptAuthorization", + [ + 0xF3ED4C73, + [ + ["bot_id", "bigint", "long"], + ["scope", "string", "string"], + ["public_key", "string", "string"], + ["value_hashes", ["SecureValueHash"], "Vector"], + ["credentials", "SecureCredentialsEncrypted", "SecureCredentialsEncrypted"], + ], + ], + ], + [ + "account.sendVerifyPhoneCode", + [ + 0xA5A356F9, + [ + ["phone_number", "string", "string"], + ["settings", "CodeSettings", "CodeSettings"], + ], + ], + ], + [ + "account.verifyPhone", + [ + 0x4DD3A7F6, + [ + ["phone_number", "string", "string"], + ["phone_code_hash", "string", "string"], + ["phone_code", "string", "string"], + ], + ], + ], + [ + "account.sendVerifyEmailCode", + [ + 0x98E037BB, + [ + ["purpose", "EmailVerifyPurpose", "EmailVerifyPurpose"], + ["email", "string", "string"], + ], + ], + ], + [ + "account.verifyEmail", + [ + 0x032DA4CF, + [ + ["purpose", "EmailVerifyPurpose", "EmailVerifyPurpose"], + ["verification", "EmailVerification", "EmailVerification"], + ], + ], + ], + [ + "account.initTakeoutSession", + [ + 0x8EF3EAB0, + [ + ["flags", flags, "#"], + ["contacts", "true", "flags.0?true"], + ["message_users", "true", "flags.1?true"], + ["message_chats", "true", "flags.2?true"], + ["message_megagroups", "true", "flags.3?true"], + ["message_channels", "true", "flags.4?true"], + ["files", "true", "flags.5?true"], + ["file_max_size", "bigint", "flags.5?long"], + ], + ], + ], + [ + "account.finishTakeoutSession", + [ + 0x1D2652EE, + [ + ["flags", flags, "#"], + ["success", "true", "flags.0?true"], + ], + ], + ], + [ + "account.confirmPasswordEmail", + [ + 0x8FDF1920, + [ + ["code", "string", "string"], + ], + ], + ], + [ + "account.resendPasswordEmail", + [ + 0x7A7F2A15, + [], + ], + ], + [ + "account.cancelPasswordEmail", + [ + 0xC1CBD5B6, + [], + ], + ], + [ + "account.getContactSignUpNotification", + [ + 0x9F07C728, + [], + ], + ], + [ + "account.setContactSignUpNotification", + [ + 0xCFF43F61, + [ + ["silent", "boolean", "Bool"], + ], + ], + ], + [ + "account.getNotifyExceptions", + [ + 0x53577479, + [ + ["flags", flags, "#"], + ["compare_sound", "true", "flags.1?true"], + ["compare_stories", "true", "flags.2?true"], + ["peer", "InputNotifyPeer", "flags.0?InputNotifyPeer"], + ], + ], + ], + [ + "account.getWallPaper", + [ + 0xFC8DDBEA, + [ + ["wallpaper", "InputWallPaper", "InputWallPaper"], + ], + ], + ], + [ + "account.uploadWallPaper", + [ + 0xE39A8F03, + [ + ["flags", flags, "#"], + ["for_chat", "true", "flags.0?true"], + ["file", "InputFile", "InputFile"], + ["mime_type", "string", "string"], + ["settings", "WallPaperSettings", "WallPaperSettings"], + ], + ], + ], + [ + "account.saveWallPaper", + [ + 0x6C5A5B37, + [ + ["wallpaper", "InputWallPaper", "InputWallPaper"], + ["unsave", "boolean", "Bool"], + ["settings", "WallPaperSettings", "WallPaperSettings"], + ], + ], + ], + [ + "account.installWallPaper", + [ + 0xFEED5769, + [ + ["wallpaper", "InputWallPaper", "InputWallPaper"], + ["settings", "WallPaperSettings", "WallPaperSettings"], + ], + ], + ], + [ + "account.resetWallPapers", + [ + 0xBB3B9804, + [], + ], + ], + [ + "account.getAutoDownloadSettings", + [ + 0x56DA0B3F, + [], + ], + ], + [ + "account.saveAutoDownloadSettings", + [ + 0x76F36233, + [ + ["flags", flags, "#"], + ["low", "true", "flags.0?true"], + ["high", "true", "flags.1?true"], + ["settings", "AutoDownloadSettings", "AutoDownloadSettings"], + ], + ], + ], + [ + "account.uploadTheme", + [ + 0x1C3DB333, + [ + ["flags", flags, "#"], + ["file", "InputFile", "InputFile"], + ["thumb", "InputFile", "flags.0?InputFile"], + ["file_name", "string", "string"], + ["mime_type", "string", "string"], + ], + ], + ], + [ + "account.createTheme", + [ + 0x652E4400, + [ + ["flags", flags, "#"], + ["slug", "string", "string"], + ["title", "string", "string"], + ["document", "InputDocument", "flags.2?InputDocument"], + ["settings", ["InputThemeSettings"], "flags.3?Vector"], + ], + ], + ], + [ + "account.updateTheme", + [ + 0x2BF40CCC, + [ + ["flags", flags, "#"], + ["format", "string", "string"], + ["theme", "InputTheme", "InputTheme"], + ["slug", "string", "flags.0?string"], + ["title", "string", "flags.1?string"], + ["document", "InputDocument", "flags.2?InputDocument"], + ["settings", ["InputThemeSettings"], "flags.3?Vector"], + ], + ], + ], + [ + "account.saveTheme", + [ + 0xF257106C, + [ + ["theme", "InputTheme", "InputTheme"], + ["unsave", "boolean", "Bool"], + ], + ], + ], + [ + "account.installTheme", + [ + 0xC727BB3B, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["theme", "InputTheme", "flags.1?InputTheme"], + ["format", "string", "flags.2?string"], + ["base_theme", "BaseTheme", "flags.3?BaseTheme"], + ], + ], + ], + [ + "account.getTheme", + [ + 0x3A5869EC, + [ + ["format", "string", "string"], + ["theme", "InputTheme", "InputTheme"], + ], + ], + ], + [ + "account.getThemes", + [ + 0x7206E458, + [ + ["format", "string", "string"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.setContentSettings", + [ + 0xB574B16B, + [ + ["flags", flags, "#"], + ["sensitive_enabled", "true", "flags.0?true"], + ], + ], + ], + [ + "account.getContentSettings", + [ + 0x8B9B4DAE, + [], + ], + ], + [ + "account.getMultiWallPapers", + [ + 0x65AD71DC, + [ + ["wallpapers", ["InputWallPaper"], "Vector"], + ], + ], + ], + [ + "account.getGlobalPrivacySettings", + [ + 0xEB2B4CF6, + [], + ], + ], + [ + "account.setGlobalPrivacySettings", + [ + 0x1EDAAAC2, + [ + ["settings", "GlobalPrivacySettings", "GlobalPrivacySettings"], + ], + ], + ], + [ + "account.reportProfilePhoto", + [ + 0xFA8CC6F5, + [ + ["peer", "InputPeer", "InputPeer"], + ["photo_id", "InputPhoto", "InputPhoto"], + ["reason", "ReportReason", "ReportReason"], + ["message", "string", "string"], + ], + ], + ], + [ + "account.resetPassword", + [ + 0x9308CE1B, + [], + ], + ], + [ + "account.declinePasswordReset", + [ + 0x4C9409F6, + [], + ], + ], + [ + "account.getChatThemes", + [ + 0xD638DE89, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.setAuthorizationTTL", + [ + 0xBF899AA0, + [ + ["authorization_ttl_days", "number", "int"], + ], + ], + ], + [ + "account.changeAuthorizationSettings", + [ + 0x40F48462, + [ + ["flags", flags, "#"], + ["confirmed", "true", "flags.3?true"], + ["hash", "bigint", "long"], + ["encrypted_requests_disabled", "boolean", "flags.0?Bool"], + ["call_requests_disabled", "boolean", "flags.1?Bool"], + ], + ], + ], + [ + "account.getSavedRingtones", + [ + 0xE1902288, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.saveRingtone", + [ + 0x3DEA5B03, + [ + ["id", "InputDocument", "InputDocument"], + ["unsave", "boolean", "Bool"], + ], + ], + ], + [ + "account.uploadRingtone", + [ + 0x831A83A2, + [ + ["file", "InputFile", "InputFile"], + ["file_name", "string", "string"], + ["mime_type", "string", "string"], + ], + ], + ], + [ + "account.updateEmojiStatus", + [ + 0xFBD3DE6B, + [ + ["emoji_status", "EmojiStatus", "EmojiStatus"], + ], + ], + ], + [ + "account.getDefaultEmojiStatuses", + [ + 0xD6753386, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.getRecentEmojiStatuses", + [ + 0x0F578105, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.clearRecentEmojiStatuses", + [ + 0x18201AAE, + [], + ], + ], + [ + "account.reorderUsernames", + [ + 0xEF500EAB, + [ + ["order", ["string"], "Vector"], + ], + ], + ], + [ + "account.toggleUsername", + [ + 0x58D6B376, + [ + ["username", "string", "string"], + ["active", "boolean", "Bool"], + ], + ], + ], + [ + "account.getDefaultProfilePhotoEmojis", + [ + 0xE2750328, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.getDefaultGroupPhotoEmojis", + [ + 0x915860AE, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.getAutoSaveSettings", + [ + 0xADCBBCDA, + [], + ], + ], + [ + "account.saveAutoSaveSettings", + [ + 0xD69B8361, + [ + ["flags", flags, "#"], + ["users", "true", "flags.0?true"], + ["chats", "true", "flags.1?true"], + ["broadcasts", "true", "flags.2?true"], + ["peer", "InputPeer", "flags.3?InputPeer"], + ["settings", "AutoSaveSettings", "AutoSaveSettings"], + ], + ], + ], + [ + "account.deleteAutoSaveExceptions", + [ + 0x53BC0020, + [], + ], + ], + [ + "account.invalidateSignInCodes", + [ + 0xCA8AE8BA, + [ + ["codes", ["string"], "Vector"], + ], + ], + ], + [ + "account.updateColor", + [ + 0x7CEFA15D, + [ + ["flags", flags, "#"], + ["for_profile", "true", "flags.1?true"], + ["color", "number", "flags.2?int"], + ["background_emoji_id", "bigint", "flags.0?long"], + ], + ], + ], + [ + "account.getDefaultBackgroundEmojis", + [ + 0xA60AB9CE, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.getChannelDefaultEmojiStatuses", + [ + 0x7727A7D5, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.getChannelRestrictedStatusEmojis", + [ + 0x35A9E0D5, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "account.updateBusinessWorkHours", + [ + 0x4B00E066, + [ + ["flags", flags, "#"], + ["business_work_hours", "BusinessWorkHours", "flags.0?BusinessWorkHours"], + ], + ], + ], + [ + "account.updateBusinessLocation", + [ + 0x9E6B131A, + [ + ["flags", flags, "#"], + ["geo_point", "InputGeoPoint", "flags.1?InputGeoPoint"], + ["address", "string", "flags.0?string"], + ], + ], + ], + [ + "account.updateBusinessGreetingMessage", + [ + 0x66CDAFC4, + [ + ["flags", flags, "#"], + ["message", "InputBusinessGreetingMessage", "flags.0?InputBusinessGreetingMessage"], + ], + ], + ], + [ + "account.updateBusinessAwayMessage", + [ + 0xA26A7FA5, + [ + ["flags", flags, "#"], + ["message", "InputBusinessAwayMessage", "flags.0?InputBusinessAwayMessage"], + ], + ], + ], + [ + "account.updateConnectedBot", + [ + 0x43D8521D, + [ + ["flags", flags, "#"], + ["can_reply", "true", "flags.0?true"], + ["deleted", "true", "flags.1?true"], + ["bot", "InputUser", "InputUser"], + ["recipients", "InputBusinessBotRecipients", "InputBusinessBotRecipients"], + ], + ], + ], + [ + "account.getConnectedBots", + [ + 0x4EA4C80F, + [], + ], + ], + [ + "account.getBotBusinessConnection", + [ + 0x76A86270, + [ + ["connection_id", "string", "string"], + ], + ], + ], + [ + "account.updateBusinessIntro", + [ + 0xA614D034, + [ + ["flags", flags, "#"], + ["intro", "InputBusinessIntro", "flags.0?InputBusinessIntro"], + ], + ], + ], + [ + "account.toggleConnectedBotPaused", + [ + 0x646E1097, + [ + ["peer", "InputPeer", "InputPeer"], + ["paused", "boolean", "Bool"], + ], + ], + ], + [ + "account.disablePeerConnectedBot", + [ + 0x5E437ED9, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "account.updateBirthday", + [ + 0xCC6E0C11, + [ + ["flags", flags, "#"], + ["birthday", "Birthday", "flags.0?Birthday"], + ], + ], + ], + [ + "account.createBusinessChatLink", + [ + 0x8851E68E, + [ + ["link", "InputBusinessChatLink", "InputBusinessChatLink"], + ], + ], + ], + [ + "account.editBusinessChatLink", + [ + 0x8C3410AF, + [ + ["slug", "string", "string"], + ["link", "InputBusinessChatLink", "InputBusinessChatLink"], + ], + ], + ], + [ + "account.deleteBusinessChatLink", + [ + 0x60073674, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "account.getBusinessChatLinks", + [ + 0x6F70DDE1, + [], + ], + ], + [ + "account.resolveBusinessChatLink", + [ + 0x5492E5EE, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "account.updatePersonalChannel", + [ + 0xD94305E0, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "users.getUsers", + [ + 0x0D91A548, + [ + ["id", ["InputUser"], "Vector"], + ], + ], + ], + [ + "users.getFullUser", + [ + 0xB60F5918, + [ + ["id", "InputUser", "InputUser"], + ], + ], + ], + [ + "users.setSecureValueErrors", + [ + 0x90C894B5, + [ + ["id", "InputUser", "InputUser"], + ["errors", ["SecureValueError"], "Vector"], + ], + ], + ], + [ + "users.getIsPremiumRequiredToContact", + [ + 0xA622AA10, + [ + ["id", ["InputUser"], "Vector"], + ], + ], + ], + [ + "contacts.getContactIDs", + [ + 0x7ADC669D, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "contacts.getStatuses", + [ + 0xC4A353EE, + [], + ], + ], + [ + "contacts.getContacts", + [ + 0x5DD69E12, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "contacts.importContacts", + [ + 0x2C800BE5, + [ + ["contacts", ["InputContact"], "Vector"], + ], + ], + ], + [ + "contacts.deleteContacts", + [ + 0x096A0E00, + [ + ["id", ["InputUser"], "Vector"], + ], + ], + ], + [ + "contacts.deleteByPhones", + [ + 0x1013FD9E, + [ + ["phones", ["string"], "Vector"], + ], + ], + ], + [ + "contacts.block", + [ + 0x2E2E8734, + [ + ["flags", flags, "#"], + ["my_stories_from", "true", "flags.0?true"], + ["id", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "contacts.unblock", + [ + 0xB550D328, + [ + ["flags", flags, "#"], + ["my_stories_from", "true", "flags.0?true"], + ["id", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "contacts.getBlocked", + [ + 0x9A868F80, + [ + ["flags", flags, "#"], + ["my_stories_from", "true", "flags.0?true"], + ["offset", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "contacts.search", + [ + 0x11F812D8, + [ + ["q", "string", "string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "contacts.resolveUsername", + [ + 0xF93CCBA3, + [ + ["username", "string", "string"], + ], + ], + ], + [ + "contacts.getTopPeers", + [ + 0x973478B6, + [ + ["flags", flags, "#"], + ["correspondents", "true", "flags.0?true"], + ["bots_pm", "true", "flags.1?true"], + ["bots_inline", "true", "flags.2?true"], + ["phone_calls", "true", "flags.3?true"], + ["forward_users", "true", "flags.4?true"], + ["forward_chats", "true", "flags.5?true"], + ["groups", "true", "flags.10?true"], + ["channels", "true", "flags.15?true"], + ["offset", "number", "int"], + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "contacts.resetTopPeerRating", + [ + 0x1AE373AC, + [ + ["category", "TopPeerCategory", "TopPeerCategory"], + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "contacts.resetSaved", + [ + 0x879537F1, + [], + ], + ], + [ + "contacts.getSaved", + [ + 0x82F1E39F, + [], + ], + ], + [ + "contacts.toggleTopPeers", + [ + 0x8514BDDA, + [ + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "contacts.addContact", + [ + 0xE8F463D0, + [ + ["flags", flags, "#"], + ["add_phone_privacy_exception", "true", "flags.0?true"], + ["id", "InputUser", "InputUser"], + ["first_name", "string", "string"], + ["last_name", "string", "string"], + ["phone", "string", "string"], + ], + ], + ], + [ + "contacts.acceptContact", + [ + 0xF831A20F, + [ + ["id", "InputUser", "InputUser"], + ], + ], + ], + [ + "contacts.getLocated", + [ + 0xD348BC44, + [ + ["flags", flags, "#"], + ["background", "true", "flags.1?true"], + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["self_expires", "number", "flags.0?int"], + ], + ], + ], + [ + "contacts.blockFromReplies", + [ + 0x29A8962C, + [ + ["flags", flags, "#"], + ["delete_message", "true", "flags.0?true"], + ["delete_history", "true", "flags.1?true"], + ["report_spam", "true", "flags.2?true"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "contacts.resolvePhone", + [ + 0x8AF94344, + [ + ["phone", "string", "string"], + ], + ], + ], + [ + "contacts.exportContactToken", + [ + 0xF8654027, + [], + ], + ], + [ + "contacts.importContactToken", + [ + 0x13005788, + [ + ["token", "string", "string"], + ], + ], + ], + [ + "contacts.editCloseFriends", + [ + 0xBA6705F0, + [ + ["id", ["bigint"], "Vector"], + ], + ], + ], + [ + "contacts.setBlocked", + [ + 0x94C65C76, + [ + ["flags", flags, "#"], + ["my_stories_from", "true", "flags.0?true"], + ["id", ["InputPeer"], "Vector"], + ["limit", "number", "int"], + ], + ], + ], + [ + "contacts.getBirthdays", + [ + 0xDAEDA864, + [], + ], + ], + [ + "messages.getMessages", + [ + 0x63C66506, + [ + ["id", ["InputMessage"], "Vector"], + ], + ], + ], + [ + "messages.getDialogs", + [ + 0xA0F4CB4F, + [ + ["flags", flags, "#"], + ["exclude_pinned", "true", "flags.0?true"], + ["folder_id", "number", "flags.1?int"], + ["offset_date", "number", "int"], + ["offset_id", "number", "int"], + ["offset_peer", "InputPeer", "InputPeer"], + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getHistory", + [ + 0x4423E6C5, + [ + ["peer", "InputPeer", "InputPeer"], + ["offset_id", "number", "int"], + ["offset_date", "number", "int"], + ["add_offset", "number", "int"], + ["limit", "number", "int"], + ["max_id", "number", "int"], + ["min_id", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.search", + [ + 0x29EE847A, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["q", "string", "string"], + ["from_id", "InputPeer", "flags.0?InputPeer"], + ["saved_peer_id", "InputPeer", "flags.2?InputPeer"], + ["saved_reaction", ["Reaction"], "flags.3?Vector"], + ["top_msg_id", "number", "flags.1?int"], + ["filter", "MessagesFilter", "MessagesFilter"], + ["min_date", "number", "int"], + ["max_date", "number", "int"], + ["offset_id", "number", "int"], + ["add_offset", "number", "int"], + ["limit", "number", "int"], + ["max_id", "number", "int"], + ["min_id", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.readHistory", + [ + 0x0E306D3A, + [ + ["peer", "InputPeer", "InputPeer"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "messages.deleteHistory", + [ + 0xB08F922A, + [ + ["flags", flags, "#"], + ["just_clear", "true", "flags.0?true"], + ["revoke", "true", "flags.1?true"], + ["peer", "InputPeer", "InputPeer"], + ["max_id", "number", "int"], + ["min_date", "number", "flags.2?int"], + ["max_date", "number", "flags.3?int"], + ], + ], + ], + [ + "messages.deleteMessages", + [ + 0xE58E95D2, + [ + ["flags", flags, "#"], + ["revoke", "true", "flags.0?true"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.receivedMessages", + [ + 0x05A954C0, + [ + ["max_id", "number", "int"], + ], + ], + ], + [ + "messages.setTyping", + [ + 0x58943EE2, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ["action", "SendMessageAction", "SendMessageAction"], + ], + ], + ], + [ + "messages.sendMessage", + [ + 0xDFF8042C, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.1?true"], + ["silent", "true", "flags.5?true"], + ["background", "true", "flags.6?true"], + ["clear_draft", "true", "flags.7?true"], + ["noforwards", "true", "flags.14?true"], + ["update_stickersets_order", "true", "flags.15?true"], + ["invert_media", "true", "flags.16?true"], + ["peer", "InputPeer", "InputPeer"], + ["reply_to", "InputReplyTo", "flags.0?InputReplyTo"], + ["message", "string", "string"], + ["random_id", "bigint", "long"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ["schedule_date", "number", "flags.10?int"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"], + ], + ], + ], + [ + "messages.sendMedia", + [ + 0x7BD66041, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.5?true"], + ["background", "true", "flags.6?true"], + ["clear_draft", "true", "flags.7?true"], + ["noforwards", "true", "flags.14?true"], + ["update_stickersets_order", "true", "flags.15?true"], + ["invert_media", "true", "flags.16?true"], + ["peer", "InputPeer", "InputPeer"], + ["reply_to", "InputReplyTo", "flags.0?InputReplyTo"], + ["media", "InputMedia", "InputMedia"], + ["message", "string", "string"], + ["random_id", "bigint", "long"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ["schedule_date", "number", "flags.10?int"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"], + ], + ], + ], + [ + "messages.forwardMessages", + [ + 0xD5039208, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.5?true"], + ["background", "true", "flags.6?true"], + ["with_my_score", "true", "flags.8?true"], + ["drop_author", "true", "flags.11?true"], + ["drop_media_captions", "true", "flags.12?true"], + ["noforwards", "true", "flags.14?true"], + ["from_peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ["random_id", ["bigint"], "Vector"], + ["to_peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.9?int"], + ["schedule_date", "number", "flags.10?int"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"], + ], + ], + ], + [ + "messages.reportSpam", + [ + 0xCF1592DB, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.getPeerSettings", + [ + 0xEFD9A6A2, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.report", + [ + 0x8953AB4E, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ["reason", "ReportReason", "ReportReason"], + ["message", "string", "string"], + ], + ], + ], + [ + "messages.getChats", + [ + 0x49E9528F, + [ + ["id", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.getFullChat", + [ + 0xAEB00B34, + [ + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "messages.editChatTitle", + [ + 0x73783FFD, + [ + ["chat_id", "bigint", "long"], + ["title", "string", "string"], + ], + ], + ], + [ + "messages.editChatPhoto", + [ + 0x35DDD674, + [ + ["chat_id", "bigint", "long"], + ["photo", "InputChatPhoto", "InputChatPhoto"], + ], + ], + ], + [ + "messages.addChatUser", + [ + 0xCBC6D107, + [ + ["chat_id", "bigint", "long"], + ["user_id", "InputUser", "InputUser"], + ["fwd_limit", "number", "int"], + ], + ], + ], + [ + "messages.deleteChatUser", + [ + 0xA2185CAB, + [ + ["flags", flags, "#"], + ["revoke_history", "true", "flags.0?true"], + ["chat_id", "bigint", "long"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "messages.createChat", + [ + 0x92CEDDD4, + [ + ["flags", flags, "#"], + ["users", ["InputUser"], "Vector"], + ["title", "string", "string"], + ["ttl_period", "number", "flags.0?int"], + ], + ], + ], + [ + "messages.getDhConfig", + [ + 0x26CF8950, + [ + ["version", "number", "int"], + ["random_length", "number", "int"], + ], + ], + ], + [ + "messages.requestEncryption", + [ + 0xF64DAF43, + [ + ["user_id", "InputUser", "InputUser"], + ["random_id", "number", "int"], + ["g_a", Uint8Array, "bytes"], + ], + ], + ], + [ + "messages.acceptEncryption", + [ + 0x3DBC0415, + [ + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["g_b", Uint8Array, "bytes"], + ["key_fingerprint", "bigint", "long"], + ], + ], + ], + [ + "messages.discardEncryption", + [ + 0xF393AEA0, + [ + ["flags", flags, "#"], + ["delete_history", "true", "flags.0?true"], + ["chat_id", "number", "int"], + ], + ], + ], + [ + "messages.setEncryptedTyping", + [ + 0x791451ED, + [ + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["typing", "boolean", "Bool"], + ], + ], + ], + [ + "messages.readEncryptedHistory", + [ + 0x7F4B690A, + [ + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["max_date", "number", "int"], + ], + ], + ], + [ + "messages.sendEncrypted", + [ + 0x44FA7A15, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.0?true"], + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["random_id", "bigint", "long"], + ["data", Uint8Array, "bytes"], + ], + ], + ], + [ + "messages.sendEncryptedFile", + [ + 0x5559481D, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.0?true"], + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["random_id", "bigint", "long"], + ["data", Uint8Array, "bytes"], + ["file", "InputEncryptedFile", "InputEncryptedFile"], + ], + ], + ], + [ + "messages.sendEncryptedService", + [ + 0x32D439A4, + [ + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["random_id", "bigint", "long"], + ["data", Uint8Array, "bytes"], + ], + ], + ], + [ + "messages.receivedQueue", + [ + 0x55A5BB66, + [ + ["max_qts", "number", "int"], + ], + ], + ], + [ + "messages.reportEncryptedSpam", + [ + 0x4B0C8C0F, + [ + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ], + ], + ], + [ + "messages.readMessageContents", + [ + 0x36A73F77, + [ + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.getStickers", + [ + 0xD5A5D3A1, + [ + ["emoticon", "string", "string"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getAllStickers", + [ + 0xB8A0A1A8, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getWebPagePreview", + [ + 0x8B68B0CC, + [ + ["flags", flags, "#"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ], + ], + ], + [ + "messages.exportChatInvite", + [ + 0xA02CE5D5, + [ + ["flags", flags, "#"], + ["legacy_revoke_permanent", "true", "flags.2?true"], + ["request_needed", "true", "flags.3?true"], + ["peer", "InputPeer", "InputPeer"], + ["expire_date", "number", "flags.0?int"], + ["usage_limit", "number", "flags.1?int"], + ["title", "string", "flags.4?string"], + ], + ], + ], + [ + "messages.checkChatInvite", + [ + 0x3EADB1BB, + [ + ["hash", "string", "string"], + ], + ], + ], + [ + "messages.importChatInvite", + [ + 0x6C50051C, + [ + ["hash", "string", "string"], + ], + ], + ], + [ + "messages.getStickerSet", + [ + 0xC8A0EC74, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.installStickerSet", + [ + 0xC78FE460, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["archived", "boolean", "Bool"], + ], + ], + ], + [ + "messages.uninstallStickerSet", + [ + 0xF96E55DE, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "messages.startBot", + [ + 0xE6DF7378, + [ + ["bot", "InputUser", "InputUser"], + ["peer", "InputPeer", "InputPeer"], + ["random_id", "bigint", "long"], + ["start_param", "string", "string"], + ], + ], + ], + [ + "messages.getMessagesViews", + [ + 0x5784D3E1, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ["increment", "boolean", "Bool"], + ], + ], + ], + [ + "messages.editChatAdmin", + [ + 0xA85BD1C2, + [ + ["chat_id", "bigint", "long"], + ["user_id", "InputUser", "InputUser"], + ["is_admin", "boolean", "Bool"], + ], + ], + ], + [ + "messages.migrateChat", + [ + 0xA2875319, + [ + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "messages.searchGlobal", + [ + 0x4BC6589A, + [ + ["flags", flags, "#"], + ["folder_id", "number", "flags.0?int"], + ["q", "string", "string"], + ["filter", "MessagesFilter", "MessagesFilter"], + ["min_date", "number", "int"], + ["max_date", "number", "int"], + ["offset_rate", "number", "int"], + ["offset_peer", "InputPeer", "InputPeer"], + ["offset_id", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.reorderStickerSets", + [ + 0x78337739, + [ + ["flags", flags, "#"], + ["masks", "true", "flags.0?true"], + ["emojis", "true", "flags.1?true"], + ["order", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.getDocumentByHash", + [ + 0xB1F2061F, + [ + ["sha256", Uint8Array, "bytes"], + ["size", "bigint", "long"], + ["mime_type", "string", "string"], + ], + ], + ], + [ + "messages.getSavedGifs", + [ + 0x5CF09635, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.saveGif", + [ + 0x327A30CB, + [ + ["id", "InputDocument", "InputDocument"], + ["unsave", "boolean", "Bool"], + ], + ], + ], + [ + "messages.getInlineBotResults", + [ + 0x514E999D, + [ + ["flags", flags, "#"], + ["bot", "InputUser", "InputUser"], + ["peer", "InputPeer", "InputPeer"], + ["geo_point", "InputGeoPoint", "flags.0?InputGeoPoint"], + ["query", "string", "string"], + ["offset", "string", "string"], + ], + ], + ], + [ + "messages.setInlineBotResults", + [ + 0xBB12A419, + [ + ["flags", flags, "#"], + ["gallery", "true", "flags.0?true"], + ["private", "true", "flags.1?true"], + ["query_id", "bigint", "long"], + ["results", ["InputBotInlineResult"], "Vector"], + ["cache_time", "number", "int"], + ["next_offset", "string", "flags.2?string"], + ["switch_pm", "InlineBotSwitchPM", "flags.3?InlineBotSwitchPM"], + ["switch_webview", "InlineBotWebView", "flags.4?InlineBotWebView"], + ], + ], + ], + [ + "messages.sendInlineBotResult", + [ + 0x3EBEE86A, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.5?true"], + ["background", "true", "flags.6?true"], + ["clear_draft", "true", "flags.7?true"], + ["hide_via", "true", "flags.11?true"], + ["peer", "InputPeer", "InputPeer"], + ["reply_to", "InputReplyTo", "flags.0?InputReplyTo"], + ["random_id", "bigint", "long"], + ["query_id", "bigint", "long"], + ["id", "string", "string"], + ["schedule_date", "number", "flags.10?int"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"], + ], + ], + ], + [ + "messages.getMessageEditData", + [ + 0xFDA68D36, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ], + ], + ], + [ + "messages.editMessage", + [ + 0xDFD14005, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.1?true"], + ["invert_media", "true", "flags.16?true"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["message", "string", "flags.11?string"], + ["media", "InputMedia", "flags.14?InputMedia"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ["schedule_date", "number", "flags.15?int"], + ["quick_reply_shortcut_id", "number", "flags.17?int"], + ], + ], + ], + [ + "messages.editInlineBotMessage", + [ + 0x83557DBA, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.1?true"], + ["invert_media", "true", "flags.16?true"], + ["id", "InputBotInlineMessageID", "InputBotInlineMessageID"], + ["message", "string", "flags.11?string"], + ["media", "InputMedia", "flags.14?InputMedia"], + ["reply_markup", "ReplyMarkup", "flags.2?ReplyMarkup"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ], + ], + ], + [ + "messages.getBotCallbackAnswer", + [ + 0x9342CA07, + [ + ["flags", flags, "#"], + ["game", "true", "flags.1?true"], + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["data", Uint8Array, "flags.0?bytes"], + ["password", "InputCheckPasswordSRP", "flags.2?InputCheckPasswordSRP"], + ], + ], + ], + [ + "messages.setBotCallbackAnswer", + [ + 0xD58F130A, + [ + ["flags", flags, "#"], + ["alert", "true", "flags.1?true"], + ["query_id", "bigint", "long"], + ["message", "string", "flags.0?string"], + ["url", "string", "flags.2?string"], + ["cache_time", "number", "int"], + ], + ], + ], + [ + "messages.getPeerDialogs", + [ + 0xE470BCFD, + [ + ["peers", ["InputDialogPeer"], "Vector"], + ], + ], + ], + [ + "messages.saveDraft", + [ + 0x7FF3B806, + [ + ["flags", flags, "#"], + ["no_webpage", "true", "flags.1?true"], + ["invert_media", "true", "flags.6?true"], + ["reply_to", "InputReplyTo", "flags.4?InputReplyTo"], + ["peer", "InputPeer", "InputPeer"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "flags.3?Vector"], + ["media", "InputMedia", "flags.5?InputMedia"], + ], + ], + ], + [ + "messages.getAllDrafts", + [ + 0x6A3F8D65, + [], + ], + ], + [ + "messages.getFeaturedStickers", + [ + 0x64780B14, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.readFeaturedStickers", + [ + 0x5B118126, + [ + ["id", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.getRecentStickers", + [ + 0x9DA9403B, + [ + ["flags", flags, "#"], + ["attached", "true", "flags.0?true"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.saveRecentSticker", + [ + 0x392718F8, + [ + ["flags", flags, "#"], + ["attached", "true", "flags.0?true"], + ["id", "InputDocument", "InputDocument"], + ["unsave", "boolean", "Bool"], + ], + ], + ], + [ + "messages.clearRecentStickers", + [ + 0x8999602D, + [ + ["flags", flags, "#"], + ["attached", "true", "flags.0?true"], + ], + ], + ], + [ + "messages.getArchivedStickers", + [ + 0x57F17692, + [ + ["flags", flags, "#"], + ["masks", "true", "flags.0?true"], + ["emojis", "true", "flags.1?true"], + ["offset_id", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.getMaskStickers", + [ + 0x640F82B8, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getAttachedStickers", + [ + 0xCC5B67CC, + [ + ["media", "InputStickeredMedia", "InputStickeredMedia"], + ], + ], + ], + [ + "messages.setGameScore", + [ + 0x8EF8ECC0, + [ + ["flags", flags, "#"], + ["edit_message", "true", "flags.0?true"], + ["force", "true", "flags.1?true"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["user_id", "InputUser", "InputUser"], + ["score", "number", "int"], + ], + ], + ], + [ + "messages.setInlineGameScore", + [ + 0x15AD9F64, + [ + ["flags", flags, "#"], + ["edit_message", "true", "flags.0?true"], + ["force", "true", "flags.1?true"], + ["id", "InputBotInlineMessageID", "InputBotInlineMessageID"], + ["user_id", "InputUser", "InputUser"], + ["score", "number", "int"], + ], + ], + ], + [ + "messages.getGameHighScores", + [ + 0xE822649D, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "messages.getInlineGameHighScores", + [ + 0x0F635E1B, + [ + ["id", "InputBotInlineMessageID", "InputBotInlineMessageID"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "messages.getCommonChats", + [ + 0xE40CA104, + [ + ["user_id", "InputUser", "InputUser"], + ["max_id", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.getWebPage", + [ + 0x8D9692A3, + [ + ["url", "string", "string"], + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.toggleDialogPin", + [ + 0xA731E257, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["peer", "InputDialogPeer", "InputDialogPeer"], + ], + ], + ], + [ + "messages.reorderPinnedDialogs", + [ + 0x3B1ADF37, + [ + ["flags", flags, "#"], + ["force", "true", "flags.0?true"], + ["folder_id", "number", "int"], + ["order", ["InputDialogPeer"], "Vector"], + ], + ], + ], + [ + "messages.getPinnedDialogs", + [ + 0xD6B94DF2, + [ + ["folder_id", "number", "int"], + ], + ], + ], + [ + "messages.setBotShippingResults", + [ + 0xE5F672FA, + [ + ["flags", flags, "#"], + ["query_id", "bigint", "long"], + ["error", "string", "flags.0?string"], + ["shipping_options", ["ShippingOption"], "flags.1?Vector"], + ], + ], + ], + [ + "messages.setBotPrecheckoutResults", + [ + 0x09C2DD95, + [ + ["flags", flags, "#"], + ["success", "true", "flags.1?true"], + ["query_id", "bigint", "long"], + ["error", "string", "flags.0?string"], + ], + ], + ], + [ + "messages.uploadMedia", + [ + 0x14967978, + [ + ["flags", flags, "#"], + ["business_connection_id", "string", "flags.0?string"], + ["peer", "InputPeer", "InputPeer"], + ["media", "InputMedia", "InputMedia"], + ], + ], + ], + [ + "messages.sendScreenshotNotification", + [ + 0xA1405817, + [ + ["peer", "InputPeer", "InputPeer"], + ["reply_to", "InputReplyTo", "InputReplyTo"], + ["random_id", "bigint", "long"], + ], + ], + ], + [ + "messages.getFavedStickers", + [ + 0x04F1AAA9, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.faveSticker", + [ + 0xB9FFC55B, + [ + ["id", "InputDocument", "InputDocument"], + ["unfave", "boolean", "Bool"], + ], + ], + ], + [ + "messages.getUnreadMentions", + [ + 0xF107E790, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ["offset_id", "number", "int"], + ["add_offset", "number", "int"], + ["limit", "number", "int"], + ["max_id", "number", "int"], + ["min_id", "number", "int"], + ], + ], + ], + [ + "messages.readMentions", + [ + 0x36E5BF4D, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ], + ], + ], + [ + "messages.getRecentLocations", + [ + 0x702A40E0, + [ + ["peer", "InputPeer", "InputPeer"], + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.sendMultiMedia", + [ + 0x0C964709, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.5?true"], + ["background", "true", "flags.6?true"], + ["clear_draft", "true", "flags.7?true"], + ["noforwards", "true", "flags.14?true"], + ["update_stickersets_order", "true", "flags.15?true"], + ["invert_media", "true", "flags.16?true"], + ["peer", "InputPeer", "InputPeer"], + ["reply_to", "InputReplyTo", "flags.0?InputReplyTo"], + ["multi_media", ["InputSingleMedia"], "Vector"], + ["schedule_date", "number", "flags.10?int"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"], + ], + ], + ], + [ + "messages.uploadEncryptedFile", + [ + 0x5057C497, + [ + ["peer", "InputEncryptedChat", "InputEncryptedChat"], + ["file", "InputEncryptedFile", "InputEncryptedFile"], + ], + ], + ], + [ + "messages.searchStickerSets", + [ + 0x35705B8A, + [ + ["flags", flags, "#"], + ["exclude_featured", "true", "flags.0?true"], + ["q", "string", "string"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getSplitRanges", + [ + 0x1CFF7E08, + [], + ], + ], + [ + "messages.markDialogUnread", + [ + 0xC286D98F, + [ + ["flags", flags, "#"], + ["unread", "true", "flags.0?true"], + ["peer", "InputDialogPeer", "InputDialogPeer"], + ], + ], + ], + [ + "messages.getDialogUnreadMarks", + [ + 0x22E24E22, + [], + ], + ], + [ + "messages.clearAllDrafts", + [ + 0x7E58EE9C, + [], + ], + ], + [ + "messages.updatePinnedMessage", + [ + 0xD2AAF7EC, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.0?true"], + ["unpin", "true", "flags.1?true"], + ["pm_oneside", "true", "flags.2?true"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ], + ], + ], + [ + "messages.sendVote", + [ + 0x10EA6184, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["options", [Uint8Array], "Vector"], + ], + ], + ], + [ + "messages.getPollResults", + [ + 0x73BB643B, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "messages.getOnlines", + [ + 0x6E2BE050, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.editChatAbout", + [ + 0xDEF60797, + [ + ["peer", "InputPeer", "InputPeer"], + ["about", "string", "string"], + ], + ], + ], + [ + "messages.editChatDefaultBannedRights", + [ + 0xA5866B41, + [ + ["peer", "InputPeer", "InputPeer"], + ["banned_rights", "ChatBannedRights", "ChatBannedRights"], + ], + ], + ], + [ + "messages.getEmojiKeywords", + [ + 0x35A0E062, + [ + ["lang_code", "string", "string"], + ], + ], + ], + [ + "messages.getEmojiKeywordsDifference", + [ + 0x1508B6AF, + [ + ["lang_code", "string", "string"], + ["from_version", "number", "int"], + ], + ], + ], + [ + "messages.getEmojiKeywordsLanguages", + [ + 0x4E9963B2, + [ + ["lang_codes", ["string"], "Vector"], + ], + ], + ], + [ + "messages.getEmojiURL", + [ + 0xD5B10C26, + [ + ["lang_code", "string", "string"], + ], + ], + ], + [ + "messages.getSearchCounters", + [ + 0x1BBCF300, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["saved_peer_id", "InputPeer", "flags.2?InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ["filters", ["MessagesFilter"], "Vector"], + ], + ], + ], + [ + "messages.requestUrlAuth", + [ + 0x198FB446, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "flags.1?InputPeer"], + ["msg_id", "number", "flags.1?int"], + ["button_id", "number", "flags.1?int"], + ["url", "string", "flags.2?string"], + ], + ], + ], + [ + "messages.acceptUrlAuth", + [ + 0xB12C7125, + [ + ["flags", flags, "#"], + ["write_allowed", "true", "flags.0?true"], + ["peer", "InputPeer", "flags.1?InputPeer"], + ["msg_id", "number", "flags.1?int"], + ["button_id", "number", "flags.1?int"], + ["url", "string", "flags.2?string"], + ], + ], + ], + [ + "messages.hidePeerSettingsBar", + [ + 0x4FACB138, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.getScheduledHistory", + [ + 0xF516760B, + [ + ["peer", "InputPeer", "InputPeer"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getScheduledMessages", + [ + 0xBDBB0464, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.sendScheduledMessages", + [ + 0xBD38850A, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.deleteScheduledMessages", + [ + 0x59AE2B16, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.getPollVotes", + [ + 0xB86E380E, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["option", Uint8Array, "flags.0?bytes"], + ["offset", "string", "flags.1?string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.toggleStickerSets", + [ + 0xB5052FEA, + [ + ["flags", flags, "#"], + ["uninstall", "true", "flags.0?true"], + ["archive", "true", "flags.1?true"], + ["unarchive", "true", "flags.2?true"], + ["stickersets", ["InputStickerSet"], "Vector"], + ], + ], + ], + [ + "messages.getDialogFilters", + [ + 0xEFD48C89, + [], + ], + ], + [ + "messages.getSuggestedDialogFilters", + [ + 0xA29CD42C, + [], + ], + ], + [ + "messages.updateDialogFilter", + [ + 0x1AD4A04A, + [ + ["flags", flags, "#"], + ["id", "number", "int"], + ["filter", "DialogFilter", "flags.0?DialogFilter"], + ], + ], + ], + [ + "messages.updateDialogFiltersOrder", + [ + 0xC563C1E4, + [ + ["order", ["number"], "Vector"], + ], + ], + ], + [ + "messages.getOldFeaturedStickers", + [ + 0x7ED094A1, + [ + ["offset", "number", "int"], + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getReplies", + [ + 0x22DDD30C, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["offset_id", "number", "int"], + ["offset_date", "number", "int"], + ["add_offset", "number", "int"], + ["limit", "number", "int"], + ["max_id", "number", "int"], + ["min_id", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getDiscussionMessage", + [ + 0x446972FD, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "messages.readDiscussion", + [ + 0xF731A9F4, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["read_max_id", "number", "int"], + ], + ], + ], + [ + "messages.unpinAllMessages", + [ + 0xEE22B9A8, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ], + ], + ], + [ + "messages.deleteChat", + [ + 0x5BD0EE50, + [ + ["chat_id", "bigint", "long"], + ], + ], + ], + [ + "messages.deletePhoneCallHistory", + [ + 0xF9CBE409, + [ + ["flags", flags, "#"], + ["revoke", "true", "flags.0?true"], + ], + ], + ], + [ + "messages.checkHistoryImport", + [ + 0x43FE19F3, + [ + ["import_head", "string", "string"], + ], + ], + ], + [ + "messages.initHistoryImport", + [ + 0x34090C3B, + [ + ["peer", "InputPeer", "InputPeer"], + ["file", "InputFile", "InputFile"], + ["media_count", "number", "int"], + ], + ], + ], + [ + "messages.uploadImportedMedia", + [ + 0x2A862092, + [ + ["peer", "InputPeer", "InputPeer"], + ["import_id", "bigint", "long"], + ["file_name", "string", "string"], + ["media", "InputMedia", "InputMedia"], + ], + ], + ], + [ + "messages.startHistoryImport", + [ + 0xB43DF344, + [ + ["peer", "InputPeer", "InputPeer"], + ["import_id", "bigint", "long"], + ], + ], + ], + [ + "messages.getExportedChatInvites", + [ + 0xA2B5A3F6, + [ + ["flags", flags, "#"], + ["revoked", "true", "flags.3?true"], + ["peer", "InputPeer", "InputPeer"], + ["admin_id", "InputUser", "InputUser"], + ["offset_date", "number", "flags.2?int"], + ["offset_link", "string", "flags.2?string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.getExportedChatInvite", + [ + 0x73746F5C, + [ + ["peer", "InputPeer", "InputPeer"], + ["link", "string", "string"], + ], + ], + ], + [ + "messages.editExportedChatInvite", + [ + 0xBDCA2F75, + [ + ["flags", flags, "#"], + ["revoked", "true", "flags.2?true"], + ["peer", "InputPeer", "InputPeer"], + ["link", "string", "string"], + ["expire_date", "number", "flags.0?int"], + ["usage_limit", "number", "flags.1?int"], + ["request_needed", "boolean", "flags.3?Bool"], + ["title", "string", "flags.4?string"], + ], + ], + ], + [ + "messages.deleteRevokedExportedChatInvites", + [ + 0x56987BD5, + [ + ["peer", "InputPeer", "InputPeer"], + ["admin_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "messages.deleteExportedChatInvite", + [ + 0xD464A42B, + [ + ["peer", "InputPeer", "InputPeer"], + ["link", "string", "string"], + ], + ], + ], + [ + "messages.getAdminsWithInvites", + [ + 0x3920E6EF, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.getChatInviteImporters", + [ + 0xDF04DD4E, + [ + ["flags", flags, "#"], + ["requested", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["link", "string", "flags.1?string"], + ["q", "string", "flags.2?string"], + ["offset_date", "number", "int"], + ["offset_user", "InputUser", "InputUser"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.setHistoryTTL", + [ + 0xB80E5FE4, + [ + ["peer", "InputPeer", "InputPeer"], + ["period", "number", "int"], + ], + ], + ], + [ + "messages.checkHistoryImportPeer", + [ + 0x5DC60F03, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.setChatTheme", + [ + 0xE63BE13F, + [ + ["peer", "InputPeer", "InputPeer"], + ["emoticon", "string", "string"], + ], + ], + ], + [ + "messages.getMessageReadParticipants", + [ + 0x31C1C44F, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "messages.getSearchResultsCalendar", + [ + 0x6AA3F6BD, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["saved_peer_id", "InputPeer", "flags.2?InputPeer"], + ["filter", "MessagesFilter", "MessagesFilter"], + ["offset_id", "number", "int"], + ["offset_date", "number", "int"], + ], + ], + ], + [ + "messages.getSearchResultsPositions", + [ + 0x9C7F2F10, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["saved_peer_id", "InputPeer", "flags.2?InputPeer"], + ["filter", "MessagesFilter", "MessagesFilter"], + ["offset_id", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.hideChatJoinRequest", + [ + 0x7FE7E815, + [ + ["flags", flags, "#"], + ["approved", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "messages.hideAllChatJoinRequests", + [ + 0xE085F4EA, + [ + ["flags", flags, "#"], + ["approved", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["link", "string", "flags.1?string"], + ], + ], + ], + [ + "messages.toggleNoForwards", + [ + 0xB11EAFA2, + [ + ["peer", "InputPeer", "InputPeer"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "messages.saveDefaultSendAs", + [ + 0xCCFDDF96, + [ + ["peer", "InputPeer", "InputPeer"], + ["send_as", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.sendReaction", + [ + 0xD30D78D4, + [ + ["flags", flags, "#"], + ["big", "true", "flags.1?true"], + ["add_to_recent", "true", "flags.2?true"], + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["reaction", ["Reaction"], "flags.0?Vector"], + ], + ], + ], + [ + "messages.getMessagesReactions", + [ + 0x8BBA90E6, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.getMessageReactionsList", + [ + 0x461B3F48, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["reaction", "Reaction", "flags.0?Reaction"], + ["offset", "string", "flags.1?string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.setChatAvailableReactions", + [ + 0xFEB16771, + [ + ["peer", "InputPeer", "InputPeer"], + ["available_reactions", "ChatReactions", "ChatReactions"], + ], + ], + ], + [ + "messages.getAvailableReactions", + [ + 0x18DEA0AC, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.setDefaultReaction", + [ + 0x4F47A016, + [ + ["reaction", "Reaction", "Reaction"], + ], + ], + ], + [ + "messages.translateText", + [ + 0x63183030, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "flags.0?InputPeer"], + ["id", ["number"], "flags.0?Vector"], + ["text", ["TextWithEntities"], "flags.1?Vector"], + ["to_lang", "string", "string"], + ], + ], + ], + [ + "messages.getUnreadReactions", + [ + 0x3223495B, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ["offset_id", "number", "int"], + ["add_offset", "number", "int"], + ["limit", "number", "int"], + ["max_id", "number", "int"], + ["min_id", "number", "int"], + ], + ], + ], + [ + "messages.readReactions", + [ + 0x54AA7F8E, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["top_msg_id", "number", "flags.0?int"], + ], + ], + ], + [ + "messages.searchSentMedia", + [ + 0x107E31A0, + [ + ["q", "string", "string"], + ["filter", "MessagesFilter", "MessagesFilter"], + ["limit", "number", "int"], + ], + ], + ], + [ + "messages.getAttachMenuBots", + [ + 0x16FCC2CB, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getAttachMenuBot", + [ + 0x77216192, + [ + ["bot", "InputUser", "InputUser"], + ], + ], + ], + [ + "messages.toggleBotInAttachMenu", + [ + 0x69F59D69, + [ + ["flags", flags, "#"], + ["write_allowed", "true", "flags.0?true"], + ["bot", "InputUser", "InputUser"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "messages.requestWebView", + [ + 0x269DC2C1, + [ + ["flags", flags, "#"], + ["from_bot_menu", "true", "flags.4?true"], + ["silent", "true", "flags.5?true"], + ["peer", "InputPeer", "InputPeer"], + ["bot", "InputUser", "InputUser"], + ["url", "string", "flags.1?string"], + ["start_param", "string", "flags.3?string"], + ["theme_params", "DataJSON", "flags.2?DataJSON"], + ["platform", "string", "string"], + ["reply_to", "InputReplyTo", "flags.0?InputReplyTo"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ], + ], + ], + [ + "messages.prolongWebView", + [ + 0xB0D81A83, + [ + ["flags", flags, "#"], + ["silent", "true", "flags.5?true"], + ["peer", "InputPeer", "InputPeer"], + ["bot", "InputUser", "InputUser"], + ["query_id", "bigint", "long"], + ["reply_to", "InputReplyTo", "flags.0?InputReplyTo"], + ["send_as", "InputPeer", "flags.13?InputPeer"], + ], + ], + ], + [ + "messages.requestSimpleWebView", + [ + 0x1A46500A, + [ + ["flags", flags, "#"], + ["from_switch_webview", "true", "flags.1?true"], + ["from_side_menu", "true", "flags.2?true"], + ["bot", "InputUser", "InputUser"], + ["url", "string", "flags.3?string"], + ["start_param", "string", "flags.4?string"], + ["theme_params", "DataJSON", "flags.0?DataJSON"], + ["platform", "string", "string"], + ], + ], + ], + [ + "messages.sendWebViewResultMessage", + [ + 0x0A4314F5, + [ + ["bot_query_id", "string", "string"], + ["result", "InputBotInlineResult", "InputBotInlineResult"], + ], + ], + ], + [ + "messages.sendWebViewData", + [ + 0xDC0242C8, + [ + ["bot", "InputUser", "InputUser"], + ["random_id", "bigint", "long"], + ["button_text", "string", "string"], + ["data", "string", "string"], + ], + ], + ], + [ + "messages.transcribeAudio", + [ + 0x269E9A49, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "messages.rateTranscribedAudio", + [ + 0x7F1D072F, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["transcription_id", "bigint", "long"], + ["good", "boolean", "Bool"], + ], + ], + ], + [ + "messages.getCustomEmojiDocuments", + [ + 0xD9AB0F54, + [ + ["document_id", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.getEmojiStickers", + [ + 0xFBFCA18F, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getFeaturedEmojiStickers", + [ + 0x0ECF6736, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.reportReaction", + [ + 0x3F64C076, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["reaction_peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.getTopReactions", + [ + 0xBB8125BA, + [ + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getRecentReactions", + [ + 0x39461DB2, + [ + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.clearRecentReactions", + [ + 0x9DFEEFB4, + [], + ], + ], + [ + "messages.getExtendedMedia", + [ + 0x84F80814, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.setDefaultHistoryTTL", + [ + 0x9EB51445, + [ + ["period", "number", "int"], + ], + ], + ], + [ + "messages.getDefaultHistoryTTL", + [ + 0x658B7188, + [], + ], + ], + [ + "messages.sendBotRequestedPeer", + [ + 0x91B2D060, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ["button_id", "number", "int"], + ["requested_peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "messages.getEmojiGroups", + [ + 0x7488CE5B, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.getEmojiStatusGroups", + [ + 0x2ECD56CD, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.getEmojiProfilePhotoGroups", + [ + 0x21A548F3, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "messages.searchCustomEmoji", + [ + 0x2C11C0D7, + [ + ["emoticon", "string", "string"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.togglePeerTranslations", + [ + 0xE47CB579, + [ + ["flags", flags, "#"], + ["disabled", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "messages.getBotApp", + [ + 0x34FDC5C3, + [ + ["app", "InputBotApp", "InputBotApp"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.requestAppWebView", + [ + 0x8C5A3B3C, + [ + ["flags", flags, "#"], + ["write_allowed", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["app", "InputBotApp", "InputBotApp"], + ["start_param", "string", "flags.1?string"], + ["theme_params", "DataJSON", "flags.2?DataJSON"], + ["platform", "string", "string"], + ], + ], + ], + [ + "messages.setChatWallPaper", + [ + 0x8FFACAE1, + [ + ["flags", flags, "#"], + ["for_both", "true", "flags.3?true"], + ["revert", "true", "flags.4?true"], + ["peer", "InputPeer", "InputPeer"], + ["wallpaper", "InputWallPaper", "flags.0?InputWallPaper"], + ["settings", "WallPaperSettings", "flags.2?WallPaperSettings"], + ["id", "number", "flags.1?int"], + ], + ], + ], + [ + "messages.searchEmojiStickerSets", + [ + 0x92B4494C, + [ + ["flags", flags, "#"], + ["exclude_featured", "true", "flags.0?true"], + ["q", "string", "string"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getSavedDialogs", + [ + 0x5381D21A, + [ + ["flags", flags, "#"], + ["exclude_pinned", "true", "flags.0?true"], + ["offset_date", "number", "int"], + ["offset_id", "number", "int"], + ["offset_peer", "InputPeer", "InputPeer"], + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getSavedHistory", + [ + 0x3D9A414D, + [ + ["peer", "InputPeer", "InputPeer"], + ["offset_id", "number", "int"], + ["offset_date", "number", "int"], + ["add_offset", "number", "int"], + ["limit", "number", "int"], + ["max_id", "number", "int"], + ["min_id", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.deleteSavedHistory", + [ + 0x6E98102B, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["max_id", "number", "int"], + ["min_date", "number", "flags.2?int"], + ["max_date", "number", "flags.3?int"], + ], + ], + ], + [ + "messages.getPinnedSavedDialogs", + [ + 0xD63D94E0, + [], + ], + ], + [ + "messages.toggleSavedDialogPin", + [ + 0xAC81BBDE, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.0?true"], + ["peer", "InputDialogPeer", "InputDialogPeer"], + ], + ], + ], + [ + "messages.reorderPinnedSavedDialogs", + [ + 0x8B716587, + [ + ["flags", flags, "#"], + ["force", "true", "flags.0?true"], + ["order", ["InputDialogPeer"], "Vector"], + ], + ], + ], + [ + "messages.getSavedReactionTags", + [ + 0x3637E05B, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "flags.0?InputPeer"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.updateSavedReactionTag", + [ + 0x60297DEC, + [ + ["flags", flags, "#"], + ["reaction", "Reaction", "Reaction"], + ["title", "string", "flags.0?string"], + ], + ], + ], + [ + "messages.getDefaultTagReactions", + [ + 0xBDF93428, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.getOutboxReadDate", + [ + 0x8C4BFE5D, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "messages.getQuickReplies", + [ + 0xD483F2A8, + [ + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.reorderQuickReplies", + [ + 0x60331907, + [ + ["order", ["number"], "Vector"], + ], + ], + ], + [ + "messages.checkQuickReplyShortcut", + [ + 0xF1D0FBD3, + [ + ["shortcut", "string", "string"], + ], + ], + ], + [ + "messages.editQuickReplyShortcut", + [ + 0x5C003CEF, + [ + ["shortcut_id", "number", "int"], + ["shortcut", "string", "string"], + ], + ], + ], + [ + "messages.deleteQuickReplyShortcut", + [ + 0x3CC04740, + [ + ["shortcut_id", "number", "int"], + ], + ], + ], + [ + "messages.getQuickReplyMessages", + [ + 0x94A495C3, + [ + ["flags", flags, "#"], + ["shortcut_id", "number", "int"], + ["id", ["number"], "flags.0?Vector"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "messages.sendQuickReplyMessages", + [ + 0x6C750DE1, + [ + ["peer", "InputPeer", "InputPeer"], + ["shortcut_id", "number", "int"], + ["id", ["number"], "Vector"], + ["random_id", ["bigint"], "Vector"], + ], + ], + ], + [ + "messages.deleteQuickReplyMessages", + [ + 0xE105E910, + [ + ["shortcut_id", "number", "int"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "messages.toggleDialogFilterTags", + [ + 0xFD2DDA49, + [ + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "messages.getMyStickers", + [ + 0xD0B5E1FC, + [ + ["offset_id", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "updates.getState", + [ + 0xEDD4882A, + [], + ], + ], + [ + "updates.getDifference", + [ + 0x19C2F763, + [ + ["flags", flags, "#"], + ["pts", "number", "int"], + ["pts_limit", "number", "flags.1?int"], + ["pts_total_limit", "number", "flags.0?int"], + ["date", "number", "int"], + ["qts", "number", "int"], + ["qts_limit", "number", "flags.2?int"], + ], + ], + ], + [ + "updates.getChannelDifference", + [ + 0x03173D78, + [ + ["flags", flags, "#"], + ["force", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ["filter", "ChannelMessagesFilter", "ChannelMessagesFilter"], + ["pts", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "photos.updateProfilePhoto", + [ + 0x09E82039, + [ + ["flags", flags, "#"], + ["fallback", "true", "flags.0?true"], + ["bot", "InputUser", "flags.1?InputUser"], + ["id", "InputPhoto", "InputPhoto"], + ], + ], + ], + [ + "photos.uploadProfilePhoto", + [ + 0x0388A3B5, + [ + ["flags", flags, "#"], + ["fallback", "true", "flags.3?true"], + ["bot", "InputUser", "flags.5?InputUser"], + ["file", "InputFile", "flags.0?InputFile"], + ["video", "InputFile", "flags.1?InputFile"], + ["video_start_ts", "number", "flags.2?double"], + ["video_emoji_markup", "VideoSize", "flags.4?VideoSize"], + ], + ], + ], + [ + "photos.deletePhotos", + [ + 0x87CF7F2F, + [ + ["id", ["InputPhoto"], "Vector"], + ], + ], + ], + [ + "photos.getUserPhotos", + [ + 0x91CD32A8, + [ + ["user_id", "InputUser", "InputUser"], + ["offset", "number", "int"], + ["max_id", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "photos.uploadContactProfilePhoto", + [ + 0xE14C4A71, + [ + ["flags", flags, "#"], + ["suggest", "true", "flags.3?true"], + ["save", "true", "flags.4?true"], + ["user_id", "InputUser", "InputUser"], + ["file", "InputFile", "flags.0?InputFile"], + ["video", "InputFile", "flags.1?InputFile"], + ["video_start_ts", "number", "flags.2?double"], + ["video_emoji_markup", "VideoSize", "flags.5?VideoSize"], + ], + ], + ], + [ + "upload.saveFilePart", + [ + 0xB304A621, + [ + ["file_id", "bigint", "long"], + ["file_part", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "upload.getFile", + [ + 0xBE5335BE, + [ + ["flags", flags, "#"], + ["precise", "true", "flags.0?true"], + ["cdn_supported", "true", "flags.1?true"], + ["location", "InputFileLocation", "InputFileLocation"], + ["offset", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "upload.saveBigFilePart", + [ + 0xDE7B673D, + [ + ["file_id", "bigint", "long"], + ["file_part", "number", "int"], + ["file_total_parts", "number", "int"], + ["bytes", Uint8Array, "bytes"], + ], + ], + ], + [ + "upload.getWebFile", + [ + 0x24E6818D, + [ + ["location", "InputWebFileLocation", "InputWebFileLocation"], + ["offset", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "upload.getCdnFile", + [ + 0x395F69DA, + [ + ["file_token", Uint8Array, "bytes"], + ["offset", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "upload.reuploadCdnFile", + [ + 0x9B2754A8, + [ + ["file_token", Uint8Array, "bytes"], + ["request_token", Uint8Array, "bytes"], + ], + ], + ], + [ + "upload.getCdnFileHashes", + [ + 0x91DC3F31, + [ + ["file_token", Uint8Array, "bytes"], + ["offset", "bigint", "long"], + ], + ], + ], + [ + "upload.getFileHashes", + [ + 0x9156982A, + [ + ["location", "InputFileLocation", "InputFileLocation"], + ["offset", "bigint", "long"], + ], + ], + ], + [ + "help.getConfig", + [ + 0xC4F9186B, + [], + ], + ], + [ + "help.getNearestDc", + [ + 0x1FB33026, + [], + ], + ], + [ + "help.getAppUpdate", + [ + 0x522D5A7D, + [ + ["source", "string", "string"], + ], + ], + ], + [ + "help.getInviteText", + [ + 0x4D392343, + [], + ], + ], + [ + "help.getSupport", + [ + 0x9CDF08CD, + [], + ], + ], + [ + "help.setBotUpdatesStatus", + [ + 0xEC22CFCD, + [ + ["pending_updates_count", "number", "int"], + ["message", "string", "string"], + ], + ], + ], + [ + "help.getCdnConfig", + [ + 0x52029342, + [], + ], + ], + [ + "help.getRecentMeUrls", + [ + 0x3DC0F114, + [ + ["referer", "string", "string"], + ], + ], + ], + [ + "help.getTermsOfServiceUpdate", + [ + 0x2CA51FD1, + [], + ], + ], + [ + "help.acceptTermsOfService", + [ + 0xEE72F79A, + [ + ["id", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "help.getDeepLinkInfo", + [ + 0x3FEDC75F, + [ + ["path", "string", "string"], + ], + ], + ], + [ + "help.getAppConfig", + [ + 0x61E3F854, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "help.saveAppLog", + [ + 0x6F02F748, + [ + ["events", ["InputAppEvent"], "Vector"], + ], + ], + ], + [ + "help.getPassportConfig", + [ + 0xC661AD08, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "help.getSupportName", + [ + 0xD360E72C, + [], + ], + ], + [ + "help.getUserInfo", + [ + 0x038A08D3, + [ + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "help.editUserInfo", + [ + 0x66B91B70, + [ + ["user_id", "InputUser", "InputUser"], + ["message", "string", "string"], + ["entities", ["MessageEntity"], "Vector"], + ], + ], + ], + [ + "help.getPromoData", + [ + 0xC0977421, + [], + ], + ], + [ + "help.hidePromoData", + [ + 0x1E251C95, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "help.dismissSuggestion", + [ + 0xF50DBAA1, + [ + ["peer", "InputPeer", "InputPeer"], + ["suggestion", "string", "string"], + ], + ], + ], + [ + "help.getCountriesList", + [ + 0x735787A8, + [ + ["lang_code", "string", "string"], + ["hash", "number", "int"], + ], + ], + ], + [ + "help.getPremiumPromo", + [ + 0xB81B93D4, + [], + ], + ], + [ + "help.getPeerColors", + [ + 0xDA80F42F, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "help.getPeerProfileColors", + [ + 0xABCFA9FD, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "help.getTimezonesList", + [ + 0x49B30240, + [ + ["hash", "number", "int"], + ], + ], + ], + [ + "channels.readHistory", + [ + 0xCC104937, + [ + ["channel", "InputChannel", "InputChannel"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "channels.deleteMessages", + [ + 0x84C1FD4E, + [ + ["channel", "InputChannel", "InputChannel"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "channels.reportSpam", + [ + 0xF44A8315, + [ + ["channel", "InputChannel", "InputChannel"], + ["participant", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "channels.getMessages", + [ + 0xAD8C9A23, + [ + ["channel", "InputChannel", "InputChannel"], + ["id", ["InputMessage"], "Vector"], + ], + ], + ], + [ + "channels.getParticipants", + [ + 0x77CED9D0, + [ + ["channel", "InputChannel", "InputChannel"], + ["filter", "ChannelParticipantsFilter", "ChannelParticipantsFilter"], + ["offset", "number", "int"], + ["limit", "number", "int"], + ["hash", "bigint", "long"], + ], + ], + ], + [ + "channels.getParticipant", + [ + 0xA0AB6CC6, + [ + ["channel", "InputChannel", "InputChannel"], + ["participant", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "channels.getChannels", + [ + 0x0A7F6BBB, + [ + ["id", ["InputChannel"], "Vector"], + ], + ], + ], + [ + "channels.getFullChannel", + [ + 0x08736A09, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.createChannel", + [ + 0x91006707, + [ + ["flags", flags, "#"], + ["broadcast", "true", "flags.0?true"], + ["megagroup", "true", "flags.1?true"], + ["for_import", "true", "flags.3?true"], + ["forum", "true", "flags.5?true"], + ["title", "string", "string"], + ["about", "string", "string"], + ["geo_point", "InputGeoPoint", "flags.2?InputGeoPoint"], + ["address", "string", "flags.2?string"], + ["ttl_period", "number", "flags.4?int"], + ], + ], + ], + [ + "channels.editAdmin", + [ + 0xD33C8902, + [ + ["channel", "InputChannel", "InputChannel"], + ["user_id", "InputUser", "InputUser"], + ["admin_rights", "ChatAdminRights", "ChatAdminRights"], + ["rank", "string", "string"], + ], + ], + ], + [ + "channels.editTitle", + [ + 0x566DECD0, + [ + ["channel", "InputChannel", "InputChannel"], + ["title", "string", "string"], + ], + ], + ], + [ + "channels.editPhoto", + [ + 0xF12E57C9, + [ + ["channel", "InputChannel", "InputChannel"], + ["photo", "InputChatPhoto", "InputChatPhoto"], + ], + ], + ], + [ + "channels.checkUsername", + [ + 0x10E6BD2C, + [ + ["channel", "InputChannel", "InputChannel"], + ["username", "string", "string"], + ], + ], + ], + [ + "channels.updateUsername", + [ + 0x3514B3DE, + [ + ["channel", "InputChannel", "InputChannel"], + ["username", "string", "string"], + ], + ], + ], + [ + "channels.joinChannel", + [ + 0x24B524C5, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.leaveChannel", + [ + 0xF836AA95, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.inviteToChannel", + [ + 0xC9E33D54, + [ + ["channel", "InputChannel", "InputChannel"], + ["users", ["InputUser"], "Vector"], + ], + ], + ], + [ + "channels.deleteChannel", + [ + 0xC0111FE3, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.exportMessageLink", + [ + 0xE63FADEB, + [ + ["flags", flags, "#"], + ["grouped", "true", "flags.0?true"], + ["thread", "true", "flags.1?true"], + ["channel", "InputChannel", "InputChannel"], + ["id", "number", "int"], + ], + ], + ], + [ + "channels.toggleSignatures", + [ + 0x1F69B606, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.getAdminedPublicChannels", + [ + 0xF8B036AF, + [ + ["flags", flags, "#"], + ["by_location", "true", "flags.0?true"], + ["check_limit", "true", "flags.1?true"], + ["for_personal", "true", "flags.2?true"], + ], + ], + ], + [ + "channels.editBanned", + [ + 0x96E6CD81, + [ + ["channel", "InputChannel", "InputChannel"], + ["participant", "InputPeer", "InputPeer"], + ["banned_rights", "ChatBannedRights", "ChatBannedRights"], + ], + ], + ], + [ + "channels.getAdminLog", + [ + 0x33DDF480, + [ + ["flags", flags, "#"], + ["channel", "InputChannel", "InputChannel"], + ["q", "string", "string"], + ["events_filter", "ChannelAdminLogEventsFilter", "flags.0?ChannelAdminLogEventsFilter"], + ["admins", ["InputUser"], "flags.1?Vector"], + ["max_id", "bigint", "long"], + ["min_id", "bigint", "long"], + ["limit", "number", "int"], + ], + ], + ], + [ + "channels.setStickers", + [ + 0xEA8CA4F9, + [ + ["channel", "InputChannel", "InputChannel"], + ["stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "channels.readMessageContents", + [ + 0xEAB5DC38, + [ + ["channel", "InputChannel", "InputChannel"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "channels.deleteHistory", + [ + 0x9BAA9647, + [ + ["flags", flags, "#"], + ["for_everyone", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "channels.togglePreHistoryHidden", + [ + 0xEABBB94C, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.getLeftChannels", + [ + 0x8341ECC0, + [ + ["offset", "number", "int"], + ], + ], + ], + [ + "channels.getGroupsForDiscussion", + [ + 0xF5DAD378, + [], + ], + ], + [ + "channels.setDiscussionGroup", + [ + 0x40582BB2, + [ + ["broadcast", "InputChannel", "InputChannel"], + ["group", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.editCreator", + [ + 0x8F38CD1F, + [ + ["channel", "InputChannel", "InputChannel"], + ["user_id", "InputUser", "InputUser"], + ["password", "InputCheckPasswordSRP", "InputCheckPasswordSRP"], + ], + ], + ], + [ + "channels.editLocation", + [ + 0x58E63F6D, + [ + ["channel", "InputChannel", "InputChannel"], + ["geo_point", "InputGeoPoint", "InputGeoPoint"], + ["address", "string", "string"], + ], + ], + ], + [ + "channels.toggleSlowMode", + [ + 0xEDD49EF0, + [ + ["channel", "InputChannel", "InputChannel"], + ["seconds", "number", "int"], + ], + ], + ], + [ + "channels.getInactiveChannels", + [ + 0x11E831EE, + [], + ], + ], + [ + "channels.convertToGigagroup", + [ + 0x0B290C69, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.viewSponsoredMessage", + [ + 0xBEAEDB94, + [ + ["channel", "InputChannel", "InputChannel"], + ["random_id", Uint8Array, "bytes"], + ], + ], + ], + [ + "channels.getSponsoredMessages", + [ + 0xEC210FBF, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.getSendAs", + [ + 0x0DC770EE, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "channels.deleteParticipantHistory", + [ + 0x367544DB, + [ + ["channel", "InputChannel", "InputChannel"], + ["participant", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "channels.toggleJoinToSend", + [ + 0xE4CB9580, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.toggleJoinRequest", + [ + 0x4C2985B6, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.reorderUsernames", + [ + 0xB45CED1D, + [ + ["channel", "InputChannel", "InputChannel"], + ["order", ["string"], "Vector"], + ], + ], + ], + [ + "channels.toggleUsername", + [ + 0x50F24105, + [ + ["channel", "InputChannel", "InputChannel"], + ["username", "string", "string"], + ["active", "boolean", "Bool"], + ], + ], + ], + [ + "channels.deactivateAllUsernames", + [ + 0x0A245DD3, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.toggleForum", + [ + 0xA4298B29, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.createForumTopic", + [ + 0xF40C0224, + [ + ["flags", flags, "#"], + ["channel", "InputChannel", "InputChannel"], + ["title", "string", "string"], + ["icon_color", "number", "flags.0?int"], + ["icon_emoji_id", "bigint", "flags.3?long"], + ["random_id", "bigint", "long"], + ["send_as", "InputPeer", "flags.2?InputPeer"], + ], + ], + ], + [ + "channels.getForumTopics", + [ + 0x0DE560D1, + [ + ["flags", flags, "#"], + ["channel", "InputChannel", "InputChannel"], + ["q", "string", "flags.0?string"], + ["offset_date", "number", "int"], + ["offset_id", "number", "int"], + ["offset_topic", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "channels.getForumTopicsByID", + [ + 0xB0831EB9, + [ + ["channel", "InputChannel", "InputChannel"], + ["topics", ["number"], "Vector"], + ], + ], + ], + [ + "channels.editForumTopic", + [ + 0xF4DFA185, + [ + ["flags", flags, "#"], + ["channel", "InputChannel", "InputChannel"], + ["topic_id", "number", "int"], + ["title", "string", "flags.0?string"], + ["icon_emoji_id", "bigint", "flags.1?long"], + ["closed", "boolean", "flags.2?Bool"], + ["hidden", "boolean", "flags.3?Bool"], + ], + ], + ], + [ + "channels.updatePinnedForumTopic", + [ + 0x6C2D9026, + [ + ["channel", "InputChannel", "InputChannel"], + ["topic_id", "number", "int"], + ["pinned", "boolean", "Bool"], + ], + ], + ], + [ + "channels.deleteTopicHistory", + [ + 0x34435F2D, + [ + ["channel", "InputChannel", "InputChannel"], + ["top_msg_id", "number", "int"], + ], + ], + ], + [ + "channels.reorderPinnedForumTopics", + [ + 0x2950A18F, + [ + ["flags", flags, "#"], + ["force", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ["order", ["number"], "Vector"], + ], + ], + ], + [ + "channels.toggleAntiSpam", + [ + 0x68F3E4EB, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.reportAntiSpamFalsePositive", + [ + 0xA850A693, + [ + ["channel", "InputChannel", "InputChannel"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "channels.toggleParticipantsHidden", + [ + 0x6A6E7854, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.clickSponsoredMessage", + [ + 0x18AFBC93, + [ + ["channel", "InputChannel", "InputChannel"], + ["random_id", Uint8Array, "bytes"], + ], + ], + ], + [ + "channels.updateColor", + [ + 0xD8AA3671, + [ + ["flags", flags, "#"], + ["for_profile", "true", "flags.1?true"], + ["channel", "InputChannel", "InputChannel"], + ["color", "number", "flags.2?int"], + ["background_emoji_id", "bigint", "flags.0?long"], + ], + ], + ], + [ + "channels.toggleViewForumAsMessages", + [ + 0x9738BB15, + [ + ["channel", "InputChannel", "InputChannel"], + ["enabled", "boolean", "Bool"], + ], + ], + ], + [ + "channels.getChannelRecommendations", + [ + 0x83B70D97, + [ + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "channels.updateEmojiStatus", + [ + 0xF0D3E6A8, + [ + ["channel", "InputChannel", "InputChannel"], + ["emoji_status", "EmojiStatus", "EmojiStatus"], + ], + ], + ], + [ + "channels.setBoostsToUnblockRestrictions", + [ + 0xAD399CEE, + [ + ["channel", "InputChannel", "InputChannel"], + ["boosts", "number", "int"], + ], + ], + ], + [ + "channels.setEmojiStickers", + [ + 0x3CD930B7, + [ + ["channel", "InputChannel", "InputChannel"], + ["stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "channels.reportSponsoredMessage", + [ + 0xAF8FF6B9, + [ + ["channel", "InputChannel", "InputChannel"], + ["random_id", Uint8Array, "bytes"], + ["option", Uint8Array, "bytes"], + ], + ], + ], + [ + "channels.restrictSponsoredMessages", + [ + 0x9AE91519, + [ + ["channel", "InputChannel", "InputChannel"], + ["restricted", "boolean", "Bool"], + ], + ], + ], + [ + "bots.sendCustomRequest", + [ + 0xAA2769ED, + [ + ["custom_method", "string", "string"], + ["params", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "bots.answerWebhookJSONQuery", + [ + 0xE6213F4D, + [ + ["query_id", "bigint", "long"], + ["data", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "bots.setBotCommands", + [ + 0x0517165A, + [ + ["scope", "BotCommandScope", "BotCommandScope"], + ["lang_code", "string", "string"], + ["commands", ["BotCommand"], "Vector"], + ], + ], + ], + [ + "bots.resetBotCommands", + [ + 0x3D8DE0F9, + [ + ["scope", "BotCommandScope", "BotCommandScope"], + ["lang_code", "string", "string"], + ], + ], + ], + [ + "bots.getBotCommands", + [ + 0xE34C0DD6, + [ + ["scope", "BotCommandScope", "BotCommandScope"], + ["lang_code", "string", "string"], + ], + ], + ], + [ + "bots.setBotMenuButton", + [ + 0x4504D54F, + [ + ["user_id", "InputUser", "InputUser"], + ["button", "BotMenuButton", "BotMenuButton"], + ], + ], + ], + [ + "bots.getBotMenuButton", + [ + 0x9C60EB28, + [ + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "bots.setBotBroadcastDefaultAdminRights", + [ + 0x788464E1, + [ + ["admin_rights", "ChatAdminRights", "ChatAdminRights"], + ], + ], + ], + [ + "bots.setBotGroupDefaultAdminRights", + [ + 0x925EC9EA, + [ + ["admin_rights", "ChatAdminRights", "ChatAdminRights"], + ], + ], + ], + [ + "bots.setBotInfo", + [ + 0x10CF3123, + [ + ["flags", flags, "#"], + ["bot", "InputUser", "flags.2?InputUser"], + ["lang_code", "string", "string"], + ["name", "string", "flags.3?string"], + ["about", "string", "flags.0?string"], + ["description", "string", "flags.1?string"], + ], + ], + ], + [ + "bots.getBotInfo", + [ + 0xDCD914FD, + [ + ["flags", flags, "#"], + ["bot", "InputUser", "flags.0?InputUser"], + ["lang_code", "string", "string"], + ], + ], + ], + [ + "bots.reorderUsernames", + [ + 0x9709B1C2, + [ + ["bot", "InputUser", "InputUser"], + ["order", ["string"], "Vector"], + ], + ], + ], + [ + "bots.toggleUsername", + [ + 0x053CA973, + [ + ["bot", "InputUser", "InputUser"], + ["username", "string", "string"], + ["active", "boolean", "Bool"], + ], + ], + ], + [ + "bots.canSendMessage", + [ + 0x1359F4E6, + [ + ["bot", "InputUser", "InputUser"], + ], + ], + ], + [ + "bots.allowSendMessage", + [ + 0xF132E3EF, + [ + ["bot", "InputUser", "InputUser"], + ], + ], + ], + [ + "bots.invokeWebViewCustomMethod", + [ + 0x087FC5E7, + [ + ["bot", "InputUser", "InputUser"], + ["custom_method", "string", "string"], + ["params", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "payments.getPaymentForm", + [ + 0x37148DBB, + [ + ["flags", flags, "#"], + ["invoice", "InputInvoice", "InputInvoice"], + ["theme_params", "DataJSON", "flags.0?DataJSON"], + ], + ], + ], + [ + "payments.getPaymentReceipt", + [ + 0x2478D1CC, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "payments.validateRequestedInfo", + [ + 0xB6C8F12B, + [ + ["flags", flags, "#"], + ["save", "true", "flags.0?true"], + ["invoice", "InputInvoice", "InputInvoice"], + ["info", "PaymentRequestedInfo", "PaymentRequestedInfo"], + ], + ], + ], + [ + "payments.sendPaymentForm", + [ + 0x2D03522F, + [ + ["flags", flags, "#"], + ["form_id", "bigint", "long"], + ["invoice", "InputInvoice", "InputInvoice"], + ["requested_info_id", "string", "flags.0?string"], + ["shipping_option_id", "string", "flags.1?string"], + ["credentials", "InputPaymentCredentials", "InputPaymentCredentials"], + ["tip_amount", "bigint", "flags.2?long"], + ], + ], + ], + [ + "payments.getSavedInfo", + [ + 0x227D824B, + [], + ], + ], + [ + "payments.clearSavedInfo", + [ + 0xD83D70C1, + [ + ["flags", flags, "#"], + ["credentials", "true", "flags.0?true"], + ["info", "true", "flags.1?true"], + ], + ], + ], + [ + "payments.getBankCardData", + [ + 0x2E79D779, + [ + ["number", "string", "string"], + ], + ], + ], + [ + "payments.exportInvoice", + [ + 0x0F91B065, + [ + ["invoice_media", "InputMedia", "InputMedia"], + ], + ], + ], + [ + "payments.assignAppStoreTransaction", + [ + 0x80ED747D, + [ + ["receipt", Uint8Array, "bytes"], + ["purpose", "InputStorePaymentPurpose", "InputStorePaymentPurpose"], + ], + ], + ], + [ + "payments.assignPlayMarketTransaction", + [ + 0xDFFD50D3, + [ + ["receipt", "DataJSON", "DataJSON"], + ["purpose", "InputStorePaymentPurpose", "InputStorePaymentPurpose"], + ], + ], + ], + [ + "payments.canPurchasePremium", + [ + 0x9FC19EB6, + [ + ["purpose", "InputStorePaymentPurpose", "InputStorePaymentPurpose"], + ], + ], + ], + [ + "payments.getPremiumGiftCodeOptions", + [ + 0x2757BA54, + [ + ["flags", flags, "#"], + ["boost_peer", "InputPeer", "flags.0?InputPeer"], + ], + ], + ], + [ + "payments.checkGiftCode", + [ + 0x8E51B4C1, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "payments.applyGiftCode", + [ + 0xF6E26854, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "payments.getGiveawayInfo", + [ + 0xF4239425, + [ + ["peer", "InputPeer", "InputPeer"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "payments.launchPrepaidGiveaway", + [ + 0x5FF58F20, + [ + ["peer", "InputPeer", "InputPeer"], + ["giveaway_id", "bigint", "long"], + ["purpose", "InputStorePaymentPurpose", "InputStorePaymentPurpose"], + ], + ], + ], + [ + "stickers.createStickerSet", + [ + 0x9021AB67, + [ + ["flags", flags, "#"], + ["masks", "true", "flags.0?true"], + ["emojis", "true", "flags.5?true"], + ["text_color", "true", "flags.6?true"], + ["user_id", "InputUser", "InputUser"], + ["title", "string", "string"], + ["short_name", "string", "string"], + ["thumb", "InputDocument", "flags.2?InputDocument"], + ["stickers", ["InputStickerSetItem"], "Vector"], + ["software", "string", "flags.3?string"], + ], + ], + ], + [ + "stickers.removeStickerFromSet", + [ + 0xF7760F51, + [ + ["sticker", "InputDocument", "InputDocument"], + ], + ], + ], + [ + "stickers.changeStickerPosition", + [ + 0xFFB6D4CA, + [ + ["sticker", "InputDocument", "InputDocument"], + ["position", "number", "int"], + ], + ], + ], + [ + "stickers.addStickerToSet", + [ + 0x8653FEBE, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["sticker", "InputStickerSetItem", "InputStickerSetItem"], + ], + ], + ], + [ + "stickers.setStickerSetThumb", + [ + 0xA76A5392, + [ + ["flags", flags, "#"], + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["thumb", "InputDocument", "flags.0?InputDocument"], + ["thumb_document_id", "bigint", "flags.1?long"], + ], + ], + ], + [ + "stickers.checkShortName", + [ + 0x284B3639, + [ + ["short_name", "string", "string"], + ], + ], + ], + [ + "stickers.suggestShortName", + [ + 0x4DAFC503, + [ + ["title", "string", "string"], + ], + ], + ], + [ + "stickers.changeSticker", + [ + 0xF5537EBC, + [ + ["flags", flags, "#"], + ["sticker", "InputDocument", "InputDocument"], + ["emoji", "string", "flags.0?string"], + ["mask_coords", "MaskCoords", "flags.1?MaskCoords"], + ["keywords", "string", "flags.2?string"], + ], + ], + ], + [ + "stickers.renameStickerSet", + [ + 0x124B1C00, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ["title", "string", "string"], + ], + ], + ], + [ + "stickers.deleteStickerSet", + [ + 0x87704394, + [ + ["stickerset", "InputStickerSet", "InputStickerSet"], + ], + ], + ], + [ + "stickers.replaceSticker", + [ + 0x4696459A, + [ + ["sticker", "InputDocument", "InputDocument"], + ["new_sticker", "InputStickerSetItem", "InputStickerSetItem"], + ], + ], + ], + [ + "phone.getCallConfig", + [ + 0x55451FA9, + [], + ], + ], + [ + "phone.requestCall", + [ + 0x42FF96ED, + [ + ["flags", flags, "#"], + ["video", "true", "flags.0?true"], + ["user_id", "InputUser", "InputUser"], + ["random_id", "number", "int"], + ["g_a_hash", Uint8Array, "bytes"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ], + ], + ], + [ + "phone.acceptCall", + [ + 0x3BD2B4A0, + [ + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["g_b", Uint8Array, "bytes"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ], + ], + ], + [ + "phone.confirmCall", + [ + 0x2EFE1722, + [ + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["g_a", Uint8Array, "bytes"], + ["key_fingerprint", "bigint", "long"], + ["protocol", "PhoneCallProtocol", "PhoneCallProtocol"], + ], + ], + ], + [ + "phone.receivedCall", + [ + 0x17D54F61, + [ + ["peer", "InputPhoneCall", "InputPhoneCall"], + ], + ], + ], + [ + "phone.discardCall", + [ + 0xB2CBC1C0, + [ + ["flags", flags, "#"], + ["video", "true", "flags.0?true"], + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["duration", "number", "int"], + ["reason", "PhoneCallDiscardReason", "PhoneCallDiscardReason"], + ["connection_id", "bigint", "long"], + ], + ], + ], + [ + "phone.setCallRating", + [ + 0x59EAD627, + [ + ["flags", flags, "#"], + ["user_initiative", "true", "flags.0?true"], + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["rating", "number", "int"], + ["comment", "string", "string"], + ], + ], + ], + [ + "phone.saveCallDebug", + [ + 0x277ADD7E, + [ + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["debug", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "phone.sendSignalingData", + [ + 0xFF7A9383, + [ + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["data", Uint8Array, "bytes"], + ], + ], + ], + [ + "phone.createGroupCall", + [ + 0x48CDC6D8, + [ + ["flags", flags, "#"], + ["rtmp_stream", "true", "flags.2?true"], + ["peer", "InputPeer", "InputPeer"], + ["random_id", "number", "int"], + ["title", "string", "flags.0?string"], + ["schedule_date", "number", "flags.1?int"], + ], + ], + ], + [ + "phone.joinGroupCall", + [ + 0xB132FF7B, + [ + ["flags", flags, "#"], + ["muted", "true", "flags.0?true"], + ["video_stopped", "true", "flags.2?true"], + ["call", "InputGroupCall", "InputGroupCall"], + ["join_as", "InputPeer", "InputPeer"], + ["invite_hash", "string", "flags.1?string"], + ["params", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "phone.leaveGroupCall", + [ + 0x500377F9, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["source", "number", "int"], + ], + ], + ], + [ + "phone.inviteToGroupCall", + [ + 0x7B393160, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["users", ["InputUser"], "Vector"], + ], + ], + ], + [ + "phone.discardGroupCall", + [ + 0x7A777135, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "phone.toggleGroupCallSettings", + [ + 0x74BBB43D, + [ + ["flags", flags, "#"], + ["reset_invite_hash", "true", "flags.1?true"], + ["call", "InputGroupCall", "InputGroupCall"], + ["join_muted", "boolean", "flags.0?Bool"], + ], + ], + ], + [ + "phone.getGroupCall", + [ + 0x041845DB, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["limit", "number", "int"], + ], + ], + ], + [ + "phone.getGroupParticipants", + [ + 0xC558D8AB, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["ids", ["InputPeer"], "Vector"], + ["sources", ["number"], "Vector"], + ["offset", "string", "string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "phone.checkGroupCall", + [ + 0xB59CF977, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["sources", ["number"], "Vector"], + ], + ], + ], + [ + "phone.toggleGroupCallRecord", + [ + 0xF128C708, + [ + ["flags", flags, "#"], + ["start", "true", "flags.0?true"], + ["video", "true", "flags.2?true"], + ["call", "InputGroupCall", "InputGroupCall"], + ["title", "string", "flags.1?string"], + ["video_portrait", "boolean", "flags.2?Bool"], + ], + ], + ], + [ + "phone.editGroupCallParticipant", + [ + 0xA5273ABF, + [ + ["flags", flags, "#"], + ["call", "InputGroupCall", "InputGroupCall"], + ["participant", "InputPeer", "InputPeer"], + ["muted", "boolean", "flags.0?Bool"], + ["volume", "number", "flags.1?int"], + ["raise_hand", "boolean", "flags.2?Bool"], + ["video_stopped", "boolean", "flags.3?Bool"], + ["video_paused", "boolean", "flags.4?Bool"], + ["presentation_paused", "boolean", "flags.5?Bool"], + ], + ], + ], + [ + "phone.editGroupCallTitle", + [ + 0x1CA6AC0A, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["title", "string", "string"], + ], + ], + ], + [ + "phone.getGroupCallJoinAs", + [ + 0xEF7C213A, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "phone.exportGroupCallInvite", + [ + 0xE6AA647F, + [ + ["flags", flags, "#"], + ["can_self_unmute", "true", "flags.0?true"], + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "phone.toggleGroupCallStartSubscription", + [ + 0x219C34E6, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["subscribed", "boolean", "Bool"], + ], + ], + ], + [ + "phone.startScheduledGroupCall", + [ + 0x5680E342, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "phone.saveDefaultGroupCallJoinAs", + [ + 0x575E1F8C, + [ + ["peer", "InputPeer", "InputPeer"], + ["join_as", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "phone.joinGroupCallPresentation", + [ + 0xCBEA6BC4, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ["params", "DataJSON", "DataJSON"], + ], + ], + ], + [ + "phone.leaveGroupCallPresentation", + [ + 0x1C50D144, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "phone.getGroupCallStreamChannels", + [ + 0x1AB21940, + [ + ["call", "InputGroupCall", "InputGroupCall"], + ], + ], + ], + [ + "phone.getGroupCallStreamRtmpUrl", + [ + 0xDEB3ABBF, + [ + ["peer", "InputPeer", "InputPeer"], + ["revoke", "boolean", "Bool"], + ], + ], + ], + [ + "phone.saveCallLog", + [ + 0x41248786, + [ + ["peer", "InputPhoneCall", "InputPhoneCall"], + ["file", "InputFile", "InputFile"], + ], + ], + ], + [ + "langpack.getLangPack", + [ + 0xF2F2330A, + [ + ["lang_pack", "string", "string"], + ["lang_code", "string", "string"], + ], + ], + ], + [ + "langpack.getStrings", + [ + 0xEFEA3803, + [ + ["lang_pack", "string", "string"], + ["lang_code", "string", "string"], + ["keys", ["string"], "Vector"], + ], + ], + ], + [ + "langpack.getDifference", + [ + 0xCD984AA5, + [ + ["lang_pack", "string", "string"], + ["lang_code", "string", "string"], + ["from_version", "number", "int"], + ], + ], + ], + [ + "langpack.getLanguages", + [ + 0x42C6978F, + [ + ["lang_pack", "string", "string"], + ], + ], + ], + [ + "langpack.getLanguage", + [ + 0x6A596502, + [ + ["lang_pack", "string", "string"], + ["lang_code", "string", "string"], + ], + ], + ], + [ + "folders.editPeerFolders", + [ + 0x6847D0AB, + [ + ["folder_peers", ["InputFolderPeer"], "Vector"], + ], + ], + ], + [ + "stats.getBroadcastStats", + [ + 0xAB42441A, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "stats.loadAsyncGraph", + [ + 0x621D5FA0, + [ + ["flags", flags, "#"], + ["token", "string", "string"], + ["x", "bigint", "flags.0?long"], + ], + ], + ], + [ + "stats.getMegagroupStats", + [ + 0xDCDF8607, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "stats.getMessagePublicForwards", + [ + 0x5F150144, + [ + ["channel", "InputChannel", "InputChannel"], + ["msg_id", "number", "int"], + ["offset", "string", "string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "stats.getMessageStats", + [ + 0xB6E0A3F5, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ["msg_id", "number", "int"], + ], + ], + ], + [ + "stats.getStoryStats", + [ + 0x374FEF40, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ], + ], + ], + [ + "stats.getStoryPublicForwards", + [ + 0xA6437EF6, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["offset", "string", "string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "stats.getBroadcastRevenueStats", + [ + 0x75DFB671, + [ + ["flags", flags, "#"], + ["dark", "true", "flags.0?true"], + ["channel", "InputChannel", "InputChannel"], + ], + ], + ], + [ + "stats.getBroadcastRevenueWithdrawalUrl", + [ + 0x2A65EF73, + [ + ["channel", "InputChannel", "InputChannel"], + ["password", "InputCheckPasswordSRP", "InputCheckPasswordSRP"], + ], + ], + ], + [ + "stats.getBroadcastRevenueTransactions", + [ + 0x0069280F, + [ + ["channel", "InputChannel", "InputChannel"], + ["offset", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "chatlists.exportChatlistInvite", + [ + 0x8472478E, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ["title", "string", "string"], + ["peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "chatlists.deleteExportedInvite", + [ + 0x719C5C5E, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ["slug", "string", "string"], + ], + ], + ], + [ + "chatlists.editExportedInvite", + [ + 0x653DB63D, + [ + ["flags", flags, "#"], + ["chatlist", "InputChatlist", "InputChatlist"], + ["slug", "string", "string"], + ["title", "string", "flags.1?string"], + ["peers", ["InputPeer"], "flags.2?Vector"], + ], + ], + ], + [ + "chatlists.getExportedInvites", + [ + 0xCE03DA83, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ], + ], + ], + [ + "chatlists.checkChatlistInvite", + [ + 0x41C10FFF, + [ + ["slug", "string", "string"], + ], + ], + ], + [ + "chatlists.joinChatlistInvite", + [ + 0xA6B1E39A, + [ + ["slug", "string", "string"], + ["peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "chatlists.getChatlistUpdates", + [ + 0x89419521, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ], + ], + ], + [ + "chatlists.joinChatlistUpdates", + [ + 0xE089F8F5, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ["peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "chatlists.hideChatlistUpdates", + [ + 0x66E486FB, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ], + ], + ], + [ + "chatlists.getLeaveChatlistSuggestions", + [ + 0xFDBCD714, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ], + ], + ], + [ + "chatlists.leaveChatlist", + [ + 0x74FAE13A, + [ + ["chatlist", "InputChatlist", "InputChatlist"], + ["peers", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "stories.canSendStory", + [ + 0xC7DFDFDD, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "stories.sendStory", + [ + 0xE4E6694B, + [ + ["flags", flags, "#"], + ["pinned", "true", "flags.2?true"], + ["noforwards", "true", "flags.4?true"], + ["fwd_modified", "true", "flags.7?true"], + ["peer", "InputPeer", "InputPeer"], + ["media", "InputMedia", "InputMedia"], + ["media_areas", ["MediaArea"], "flags.5?Vector"], + ["caption", "string", "flags.0?string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["privacy_rules", ["InputPrivacyRule"], "Vector"], + ["random_id", "bigint", "long"], + ["period", "number", "flags.3?int"], + ["fwd_from_id", "InputPeer", "flags.6?InputPeer"], + ["fwd_from_story", "number", "flags.6?int"], + ], + ], + ], + [ + "stories.editStory", + [ + 0xB583BA46, + [ + ["flags", flags, "#"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["media", "InputMedia", "flags.0?InputMedia"], + ["media_areas", ["MediaArea"], "flags.3?Vector"], + ["caption", "string", "flags.1?string"], + ["entities", ["MessageEntity"], "flags.1?Vector"], + ["privacy_rules", ["InputPrivacyRule"], "flags.2?Vector"], + ], + ], + ], + [ + "stories.deleteStories", + [ + 0xAE59DB5F, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "stories.togglePinned", + [ + 0x9A75A1EF, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ["pinned", "boolean", "Bool"], + ], + ], + ], + [ + "stories.getAllStories", + [ + 0xEEB0D625, + [ + ["flags", flags, "#"], + ["next", "true", "flags.1?true"], + ["hidden", "true", "flags.2?true"], + ["state", "string", "flags.0?string"], + ], + ], + ], + [ + "stories.getPinnedStories", + [ + 0x5821A5DC, + [ + ["peer", "InputPeer", "InputPeer"], + ["offset_id", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "stories.getStoriesArchive", + [ + 0xB4352016, + [ + ["peer", "InputPeer", "InputPeer"], + ["offset_id", "number", "int"], + ["limit", "number", "int"], + ], + ], + ], + [ + "stories.getStoriesByID", + [ + 0x5774CA74, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "stories.toggleAllStoriesHidden", + [ + 0x7C2557C4, + [ + ["hidden", "boolean", "Bool"], + ], + ], + ], + [ + "stories.readStories", + [ + 0xA556DAC8, + [ + ["peer", "InputPeer", "InputPeer"], + ["max_id", "number", "int"], + ], + ], + ], + [ + "stories.incrementStoryViews", + [ + 0xB2028AFB, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "stories.getStoryViewsList", + [ + 0x7ED23C57, + [ + ["flags", flags, "#"], + ["just_contacts", "true", "flags.0?true"], + ["reactions_first", "true", "flags.2?true"], + ["forwards_first", "true", "flags.3?true"], + ["peer", "InputPeer", "InputPeer"], + ["q", "string", "flags.1?string"], + ["id", "number", "int"], + ["offset", "string", "string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "stories.getStoriesViews", + [ + 0x28E16CC8, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ], + ], + ], + [ + "stories.exportStoryLink", + [ + 0x7B8DEF20, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ], + ], + ], + [ + "stories.report", + [ + 0x1923FA8C, + [ + ["peer", "InputPeer", "InputPeer"], + ["id", ["number"], "Vector"], + ["reason", "ReportReason", "ReportReason"], + ["message", "string", "string"], + ], + ], + ], + [ + "stories.activateStealthMode", + [ + 0x57BBD166, + [ + ["flags", flags, "#"], + ["past", "true", "flags.0?true"], + ["future", "true", "flags.1?true"], + ], + ], + ], + [ + "stories.sendReaction", + [ + 0x7FD736B2, + [ + ["flags", flags, "#"], + ["add_to_recent", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["story_id", "number", "int"], + ["reaction", "Reaction", "Reaction"], + ], + ], + ], + [ + "stories.getPeerStories", + [ + 0x2C4ADA50, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "stories.getAllReadPeerStories", + [ + 0x9B5AE7F9, + [], + ], + ], + [ + "stories.getPeerMaxIDs", + [ + 0x535983C3, + [ + ["id", ["InputPeer"], "Vector"], + ], + ], + ], + [ + "stories.getChatsToSend", + [ + 0xA56A8B60, + [], + ], + ], + [ + "stories.togglePeerStoriesHidden", + [ + 0xBD0415C4, + [ + ["peer", "InputPeer", "InputPeer"], + ["hidden", "boolean", "Bool"], + ], + ], + ], + [ + "stories.getStoryReactionsList", + [ + 0xB9B2881F, + [ + ["flags", flags, "#"], + ["forwards_first", "true", "flags.2?true"], + ["peer", "InputPeer", "InputPeer"], + ["id", "number", "int"], + ["reaction", "Reaction", "flags.0?Reaction"], + ["offset", "string", "flags.1?string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "premium.getBoostsList", + [ + 0x60F67660, + [ + ["flags", flags, "#"], + ["gifts", "true", "flags.0?true"], + ["peer", "InputPeer", "InputPeer"], + ["offset", "string", "string"], + ["limit", "number", "int"], + ], + ], + ], + [ + "premium.getMyBoosts", + [ + 0x0BE77B4A, + [], + ], + ], + [ + "premium.applyBoost", + [ + 0x6B7DA746, + [ + ["flags", flags, "#"], + ["slots", ["number"], "flags.0?Vector"], + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "premium.getBoostsStatus", + [ + 0x042F1F61, + [ + ["peer", "InputPeer", "InputPeer"], + ], + ], + ], + [ + "premium.getUserBoosts", + [ + 0x39854D1F, + [ + ["peer", "InputPeer", "InputPeer"], + ["user_id", "InputUser", "InputUser"], + ], + ], + ], + [ + "smsjobs.isEligibleToJoin", + [ + 0x0EDC39D0, + [], + ], + ], + [ + "smsjobs.join", + [ + 0xA74ECE2D, + [], + ], + ], + [ + "smsjobs.leave", + [ + 0x9898AD73, + [], + ], + ], + [ + "smsjobs.updateSettings", + [ + 0x093FA0BF, + [ + ["flags", flags, "#"], + ["allow_international", "true", "flags.0?true"], + ], + ], + ], + [ + "smsjobs.getStatus", + [ + 0x10A698E8, + [], + ], + ], + [ + "smsjobs.getSmsJob", + [ + 0x778D902F, + [ + ["job_id", "string", "string"], + ], + ], + ], + [ + "smsjobs.finishJob", + [ + 0x4F1EBF24, + [ + ["flags", flags, "#"], + ["job_id", "string", "string"], + ["error", "string", "flags.0?string"], + ], + ], + ], + [ + "fragment.getCollectibleInfo", + [ + 0xBE1E85BA, + [ + ["collectible", "InputCollectible", "InputCollectible"], + ], + ], + ], +] as unknown as [string, Parameters][]); + +export const getType: (name: string) => Parameters | undefined = types.get.bind(types); + +export const getEnum: (name: string) => (keyof Types)[] | undefined = enums.get.bind(enums); + +// @ts-ignore: lib +export const _types: Map | undefined = typeof Deno === "undefined" ? typeof process === "undefined" ? undefined : process.env.__TYPE_MAP ? types : undefined : Deno.env.get("__TYPE_MAP") ? types : undefined; diff --git a/tl/1_tl_object.ts b/tl/1_tl_object.ts deleted file mode 100644 index 04b21280..00000000 --- a/tl/1_tl_object.ts +++ /dev/null @@ -1,304 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import { assertEquals, assertFalse } from "../0_deps.ts"; -import { TLRawWriter } from "./0_tl_raw_writer.ts"; - -type MaybeArrayOf = T | T[]; -type MaybeInArray = T | [T]; - -export type ParamDesc = ([ - string, - MaybeInArray< - | typeof TLObject - | typeof Uint8Array - | "string" - | "number" - | "bigint" - | "boolean" - | "true" - >, - string, -] | [string, typeof flags, "#"])[]; - -export type Param = - | null - | MaybeArrayOf< - | string - | number - | bigint - | boolean - | Uint8Array - | TLObject - >; - -export const flags = Symbol("flags"); - -export type Params = ([ - Param, - MaybeInArray< - | typeof TLObject - | typeof Uint8Array - | "string" - | "number" - | "bigint" - | "boolean" - | "true" - >, - string, -] | [string, typeof flags, "#"])[]; - -export const id = Symbol("id"); - -export const params = Symbol("params"); - -export const paramDesc = Symbol("paramDesc"); - -export const length = Symbol("length"); - -export const serialize = Symbol("serialize"); - -export const as = Symbol("as"); - -export const name = Symbol("name"); - -export function isOptionalParam(ntype: string): boolean { - return ntype.includes("?"); -} -export function analyzeOptionalParam(ntype: string): { flagField: string; bitIndex: number } { - if (!isOptionalParam(ntype)) { - throw new Error("Parameter not optional"); - } - - const flagField = ntype.split(".")[0]; - assertEquals(typeof flagField, "string"); - - const bitIndex = Number(ntype.split("?")[0].split(".")[1]); - assertFalse(isNaN(bitIndex)); - - return { flagField, bitIndex }; -} - -function serializeSingleParam( - writer: TLRawWriter, - value: Param, - type: - | typeof TLObject - | typeof Uint8Array - | "string" - | "number" - | "bigint" - | "boolean" - | "true", - ntype: string, - debugInfo: string, -) { - const valueRepr = value == null ? null : (typeof value === "object" && name in value) ? value[name] : value.constructor.name; - if (isTLObjectConstructor(type)) { - if ( - (type[name] == "TypeX" && value instanceof TLObject) || - value instanceof type - ) { - writer.write(value[serialize]()); - return; - } else { - throw new TypeError(`Expected ${type[name]} but received ${valueRepr} ${debugInfo}`); - } - } - - if (type == Uint8Array) { - if ((value instanceof Uint8Array)) { - writer.writeBytes(value); - } else { - throw new TypeError(`Expected Uint8Array but received ${valueRepr} ${debugInfo}`); - } - } - - switch (type) { - case "bigint": - if (typeof value === "bigint") { - if (ntype == "int128") { - writer.writeInt128(value); - } else if (ntype === "int256") { - writer.writeInt256(value); - } else { - writer.writeInt64(value); - } - } else { - throw new TypeError(`Expected bigint but received ${valueRepr} ${debugInfo}`); - } - break; - case "boolean": - if (typeof value === "boolean") { - if (value) { - writer.writeInt32(0x997275B5); - } else { - writer.writeInt32(0xBC799737); - } - } else { - throw new TypeError(`Expected boolean but received ${valueRepr} ${debugInfo}`); - } - break; - case "number": - // - if (value == null) { - value = 0; - } - // - if (typeof value === "number") { - if (ntype == "double") { - writer.writeDouble(value); - } else { - writer.writeInt32(value); - } - } else { - throw new TypeError(`Expected number but received ${valueRepr} ${debugInfo}`); - } - break; - case "string": - if (typeof value === "string") { - writer.writeString(value); - } else if (value instanceof Uint8Array) { - writer.writeBytes(value); - } else { - writer.writeString(""); - } - // else { - // throw new TypeError(`Expected string or Uint8Array but received ${valueRepr}`); - // } - break; - case "true": - if (value !== true) { - throw new TypeError(`Expected true but received ${valueRepr} ${debugInfo}`); - } - } -} -export abstract class TLObject { - protected abstract get [id](): number; - protected abstract get [params](): Params; - - static get [name](): string { - return `ctor_${this.constructor.name}`; - } - - get [name](): string { - return (this.constructor as typeof TLObject)[name]; - } - - protected static get [paramDesc](): ParamDesc { - // unimpl - return []; - } - - get [length](): number { - return this[serialize]().byteLength; - } - - [serialize](): Uint8Array { - const writer = new TLRawWriter(); - writer.writeInt32(this[id], false); - - for (const [i, [value, type, ntype]] of this[params].entries()) { - if (isOptionalParam(ntype) && value == null) { - continue; - } - - const debugInfo = `[${this[id].toString(16).toUpperCase()} ${i}]`; - - if (type == flags) { - let flags = 0; - const flagField_ = value; - - for (const [value, _, ntype] of this[params]) { - if (isOptionalParam(ntype)) { - const { flagField, bitIndex } = analyzeOptionalParam(ntype); - - if (flagField == flagField_) { - if (value != null) { - flags |= 1 << bitIndex; - } - } - } - } - writer.writeInt32(flags); - continue; - } - - if (type instanceof Array) { - const itemsType = type[0]; - if (!Array.isArray(value)) { - throw new TypeError("Expected array"); - } - writer.writeInt32(0x1CB5C415); // vector constructor - writer.writeInt32(value.length); - for (const item of value) { - serializeSingleParam(writer, item, itemsType, ntype, debugInfo); - } - continue; - } - - serializeSingleParam(writer, value, type, ntype, debugInfo); - } - - return writer.buffer; - } - - [as]>>(constructor: T): InstanceType { - if (this instanceof constructor) { - return this as InstanceType; - } else { - throw new TypeError(`Expected ${constructor[name]} but received ${this[name]}`); - } - } - - toJSON(): object { - // deno-lint-ignore no-explicit-any - const r: Record = { _: this[name] + `#${this[id].toString(16).toUpperCase()}` }; - const desc = (this.constructor as typeof TLObject)[paramDesc]; - for (const [name] of desc) { - const n = name as keyof this; - if (n in this && this[n] !== undefined) { - if (typeof this[n] === "bigint") { - r[name] = String(this[n]); - } else if (this[n] instanceof Uint8Array) { - const buffer = this[n] as Uint8Array; - r[name] = ""; - for (const b of buffer) { - r[name] += b.toString(16).padStart(2, "0").toUpperCase(); - } - } else { - r[name] = this[n]; - } - } - } - return r; - } -} - -export interface TLObjectConstructor { - // deno-lint-ignore no-explicit-any - new (params: any): T; - [name]: string; - [paramDesc]: ParamDesc; -} -export function isTLObjectConstructor(t: unknown): t is typeof TLObject { - // deno-lint-ignore no-explicit-any - return (t as any)[paramDesc] instanceof Array; -} diff --git a/tl/1_tl_object_test.ts b/tl/1_tl_object_test.ts deleted file mode 100644 index 07a8040d..00000000 --- a/tl/1_tl_object_test.ts +++ /dev/null @@ -1,177 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import { assert, assertEquals, assertFalse, assertThrows } from "../0_deps.ts"; -import { analyzeOptionalParam, flags, id, isOptionalParam, name, ParamDesc, paramDesc, Params, params, serialize, TLObject } from "./1_tl_object.ts"; - -Deno.test("isOptionalParam", () => { - assert(isOptionalParam("flags.8?string")); - assertFalse(isOptionalParam("long")); -}); - -Deno.test("analyzeOptionalParam", () => { - assertThrows(() => analyzeOptionalParam("long")); - - const { flagField, bitIndex } = analyzeOptionalParam("flags.0?long"); - - assertEquals(flagField, "flags"); - assertEquals(bitIndex, 0); -}); - -Deno.test("serialize", () => { - abstract class TypeTestObject1 extends TLObject { - // - } - - class TestObject1 extends TypeTestObject1 { - string: string; - - protected get [id]() { - return 0x01010101; - } - - static get [name]() { - return "testObject1"; - } - - static get [paramDesc](): ParamDesc { - return [ - ["string", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.string, "string", "string"], - ]; - } - - constructor(params: { string: string }) { - super(); - this.string = params.string; - } - } - - class TestObject2 extends TLObject { - boolean1: boolean; - boolean2: boolean; - int: number; - long: bigint; - int128: bigint; - int256: bigint; - string: string; - bytes: Uint8Array; - flag1?: true; - flag2?: TypeTestObject1[]; - flag3?: bigint; - - protected get [id]() { - return 0x10101010; - } - - static get [name]() { - return "testObject2"; - } - - static get [paramDesc](): ParamDesc { - return [ - ["boolean1", "boolean", "Bool"], - ["boolean2", "boolean", "Bool"], - ["int", "number", "int"], - ["long", "bigint", "long"], - ["int128", "bigint", "int128"], - ["int256", "bigint", "int256"], - ["string", "string", "string"], - ["bytes", Uint8Array, "bytes"], - ["flags", flags, "#"], - ["flag1", "true", "flags.0?true"], - ["flag2", ["string"], "flags.1?Vector"], - ["flag3", "bigint", "flags.3?long"], - ]; - } - - protected get [params](): Params { - return [ - [this.boolean1, "boolean", "Bool"], - [this.boolean2, "boolean", "Bool"], - [this.int, "number", "int"], - [this.long, "bigint", "long"], - [this.int128, "bigint", "int128"], - [this.int256, "bigint", "int256"], - [this.string, "string", "string"], - [this.bytes, Uint8Array, "bytes"], - ["flags", flags, "#"], - [this.flag1 ?? null, "true", "flags.0?true"], - [this.flag2 ?? null, [TypeTestObject1], "flags.1?Vector"], - [this.flag3 ?? null, "bigint", "flags.3?long"], - ]; - } - - constructor(params: { boolean1: boolean; boolean2: boolean; int: number; long: bigint; int128: bigint; int256: bigint; string: string; bytes: Uint8Array; flag1?: true; flag2?: TypeTestObject1[]; flag3?: bigint }) { - super(); - this.boolean1 = params.boolean1; - this.boolean2 = params.boolean2; - this.int = params.int; - this.long = params.long; - this.int128 = params.int128; - this.int256 = params.int256; - this.string = params.string; - this.bytes = params.bytes; - this.flag1 = params.flag1; - this.flag2 = params.flag2; - this.flag3 = params.flag3; - } - } - - // deno-fmt-ignore - const expected = new Uint8Array([ - 0x10, 0x10, 0x10, 0x10, 0xB5, 0x75, 0x72, 0x99, - 0x37, 0x97, 0x79, 0xBC, 0xD2, 0x04, 0x00, 0x00, - 0x34, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xF3, - 0x01, 0xF0, 0x77, 0xC8, 0xC9, 0xF7, 0x24, 0x97, - 0x5A, 0x82, 0xD4, 0x07, 0x12, 0x94, 0x67, 0x02, - 0xAB, 0x4A, 0xA5, 0xE0, 0x76, 0xF9, 0xE9, 0xFA, - 0x99, 0x8E, 0xDB, 0xF1, 0x1E, 0x82, 0x14, 0xD6, - 0xAE, 0xEC, 0xEB, 0x46, 0x95, 0xF3, 0x84, 0xB4, - 0x4F, 0x52, 0x06, 0xAB, 0x7B, 0xB8, 0x49, 0x4B, - 0x07, 0x4D, 0x54, 0x4B, 0x72, 0x75, 0x74, 0x6F, - 0x04, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x15, 0xC4, 0xB5, 0x1C, - 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, - 0x07, 0x4D, 0x54, 0x4B, 0x72, 0x75, 0x74, 0x6F, - 0x01, 0x01, 0x01, 0x01, 0x07, 0x4D, 0x54, 0x4B, - 0x72, 0x75, 0x74, 0x6F - ]); - - const actual = new TestObject2({ - boolean1: true, - boolean2: false, - int: 1234, - long: -922337203685477580n, - int128: 3196265793150487616775634918212890625n, - int256: 34053716734886053108720723919265766388580600074269200372509658336639404296875n, - string: "MTKruto", - bytes: new Uint8Array([256, 256, 1, 1]), - flag1: true, - flag2: [new TestObject1({ string: "MTKruto" }), new TestObject1({ string: "MTKruto" })], - })[serialize](); - - assertEquals(actual, expected); -}); diff --git a/tl/1_utilities.ts b/tl/1_utilities.ts new file mode 100644 index 00000000..42a45a15 --- /dev/null +++ b/tl/1_utilities.ts @@ -0,0 +1,70 @@ +/** + * MTKruto - Cross-runtime JavaScript library for building Telegram clients + * Copyright (C) 2023-2024 Roj + * + * This file is part of MTKruto. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ +// deno-lint-ignore-file no-explicit-any + +import { assertEquals, assertFalse, unreachable } from "../0_deps.ts"; +import { AnyType, Enums, Functions, getEnum, getType, Types } from "./0_api.ts"; + +export function isOptionalParam(ntype: string): boolean { + return ntype.includes("?"); +} +export function analyzeOptionalParam(ntype: string): { flagField: string; bitIndex: number } { + if (!isOptionalParam(ntype)) { + throw new Error("Parameter not optional"); + } + + const flagField = ntype.split(".")[0]; + assertEquals(typeof flagField, "string"); + + const bitIndex = Number(ntype.split("?")[0].split(".")[1]); + assertFalse(isNaN(bitIndex)); + + return { flagField, bitIndex }; +} + +export function isValidType(object: any): object is AnyType { + return object != null && typeof object === "object" && typeof object._ === "string" && getType(object._) !== undefined; +} +export function assertIsValidType(object: any) { + if (!isValidType(object)) { + throw new Error("Invalid object"); + } +} + +export function is(typeName: S, value: unknown): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never { + if (!isValidType(value)) { + return false; + } else { + return value._ === typeName; + } +} +export function isOneOf(typeNames: S[], value: unknown): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never { + return typeNames.some((v) => is(v, value)); +} +export function isOfEnum(enumName: S, value: unknown): value is Enums[S] { + return isOneOf(getEnum(enumName) ?? [], value); +} +export function as(typeName: S, value: unknown): Types[S] { + if (is(typeName, value)) { + return value; + } else { + unreachable(); + } +} diff --git a/tl/1_utilities_test.ts b/tl/1_utilities_test.ts new file mode 100644 index 00000000..673e2814 --- /dev/null +++ b/tl/1_utilities_test.ts @@ -0,0 +1,16 @@ +import { assert, assertEquals, assertFalse, assertThrows } from "../0_deps.ts"; +import { analyzeOptionalParam, isOptionalParam } from "./1_utilities.ts"; + +Deno.test("isOptionalParam", () => { + assert(isOptionalParam("flags.8?string")); + assertFalse(isOptionalParam("long")); +}); + +Deno.test("analyzeOptionalParam", () => { + assertThrows(() => analyzeOptionalParam("long")); + + const { flagField, bitIndex } = analyzeOptionalParam("flags.0?long"); + + assertEquals(flagField, "flags"); + assertEquals(bitIndex, 0); +}); diff --git a/tl/3_deserialize.ts b/tl/2_deserialize.ts similarity index 72% rename from tl/3_deserialize.ts rename to tl/2_deserialize.ts index 0ade082a..1ffbb6b6 100644 --- a/tl/3_deserialize.ts +++ b/tl/2_deserialize.ts @@ -13,41 +13,22 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. - * + * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ +// deno-lint-ignore-file no-explicit-any import { assertEquals } from "../0_deps.ts"; import { TLRawReader } from "./0_tl_raw_reader.ts"; -import { analyzeOptionalParam, flags, isOptionalParam, isTLObjectConstructor, Param, ParamDesc, paramDesc, TLObject, TLObjectConstructor } from "./1_tl_object.ts"; -import { map } from "./2_types.ts"; +import { analyzeOptionalParam, isOptionalParam } from "./1_utilities.ts"; +import { AnyType, flags, getType, getTypeName } from "./0_api.ts"; function deserializeSingleParam( reader: TLRawReader, - type: - | typeof TLObject - | typeof Uint8Array - | "string" - | "number" - | "bigint" - | "boolean" - | "true", + type: unknown, ntype: string, -) { - if (isTLObjectConstructor(type)) { - const cid = reader.readInt32(false); - const constructor = map.get(cid); - if (!constructor) { - throw new Error(`Constructor with ID ${cid.toString(16)} not found`); - } - return deserialize( - reader, - constructor[paramDesc], - constructor, - ); - } - +): any { if (type == Uint8Array) { return reader.readBytes(); } else { @@ -72,17 +53,28 @@ function deserializeSingleParam( return reader.readString(); case "true": return true; - default: - throw new Error(`Unexpected type ${type}`); + default: { + const cid = reader.readInt32(false); + const name = getTypeName(cid); + if (!name) { + throw new Error(`Constructor with ID 0x${cid.toString(16).toUpperCase()} not found`); + } + + return deserialize( + reader, + getType(name)![1], + name, + ); + } } } } -export function deserialize>>( +export function deserialize( reader: TLRawReader, - paramDesc: ParamDesc, - constructor: T, -): InstanceType { - const params: Record = {}; + paramDesc: [string, unknown, string][], + name: string, +): AnyType { + const type_: Record = { _: name }; const flagFields: Record = {}; for (const [name, type, ntype] of paramDesc) { if (isOptionalParam(ntype)) { @@ -107,15 +99,15 @@ export function deserialize>>( for (let i = 0; i < count; i++) { items.push(deserializeSingleParam(reader, type[0], ntype)!); } - params[name] = items; + type_[name] = items; continue; } const value = deserializeSingleParam(reader, type, ntype); if (typeof value !== "boolean" || value) { - params[name] = value; + type_[name] = value; } } - return new constructor(params); + return type_ as AnyType; } diff --git a/tl/2_serialize.ts b/tl/2_serialize.ts new file mode 100644 index 00000000..e11d6dfd --- /dev/null +++ b/tl/2_serialize.ts @@ -0,0 +1,170 @@ +/** + * MTKruto - Cross-runtime JavaScript library for building Telegram clients + * Copyright (C) 2023-2024 Roj + * + * This file is part of MTKruto. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ +// deno-lint-ignore-file no-explicit-any +import { AnyObject, flags, getType } from "./0_api.ts"; +import { TLRawWriter } from "./0_tl_raw_writer.ts"; +import { analyzeOptionalParam, assertIsValidType, isOptionalParam } from "./1_utilities.ts"; + +function serializeSingleParam( + writer: TLRawWriter, + value: any, + type: unknown, + ntype: string, + debugInfo: string, +) { + const valueRepr = value == null ? null : (typeof value === "object" && "_" in value) ? value._ : value.constructor.name; + + if (type == Uint8Array) { + if ((value instanceof Uint8Array)) { + writer.writeBytes(value); + return writer.buffer; + } else { + throw new TypeError(`Expected Uint8Array but received ${valueRepr} ${debugInfo}`); + } + } + + switch (type) { + case "bigint": + if (typeof value === "bigint") { + if (ntype == "int128") { + writer.writeInt128(value); + } else if (ntype === "int256") { + writer.writeInt256(value); + } else { + writer.writeInt64(value); + } + } else { + throw new TypeError(`Expected bigint but received ${valueRepr} ${debugInfo}`); + } + break; + case "boolean": + if (typeof value === "boolean") { + if (value) { + writer.writeInt32(0x997275B5); + } else { + writer.writeInt32(0xBC799737); + } + } else { + throw new TypeError(`Expected boolean but received ${valueRepr} ${debugInfo}`); + } + break; + case "number": + // + if (value == null) { + value = 0; + } + // + if (typeof value === "number") { + if (ntype == "double") { + writer.writeDouble(value); + } else { + writer.writeInt32(value); + } + } else { + throw new TypeError(`Expected number but received ${valueRepr} ${debugInfo}`); + } + break; + case "string": + if (typeof value === "string") { + writer.writeString(value); + } else if (value instanceof Uint8Array) { + writer.writeBytes(value); + } else { + writer.writeString(""); + } + // else { + // throw new TypeError(`Expected string or Uint8Array but received ${valueRepr}`); + // } + break; + case "true": + if (value !== true) { + throw new TypeError(`Expected true but received ${valueRepr} ${debugInfo}`); + } + break; + default: + // null = !X (generic) + if (type != null && typeof type !== "string") { + throw new TypeError(`Unexpected type: ${type} ${debugInfo}`); + } + writer.write(serialize(value)); + } + + return writer.buffer; +} + +export function serialize(type_: AnyObject): Uint8Array { + assertIsValidType(type_); + const maybeParameters = getType(type_._); + if (!maybeParameters) { + throw new Error(`Unknown type: ${type_._}`); + } + const type__ = type_ as any; + const writer = new TLRawWriter(); + const [id, parameters_] = maybeParameters; + writer.writeInt32(id, false); + + for (const [i, [name, type, ntype]] of parameters_.entries()) { + if (isOptionalParam(ntype) && type__[name] === undefined) { + continue; + } + + const debugInfo = `[0x${id.toString(16).toUpperCase()}::${i}]`; + + if (type == flags) { + let flags = 0; + const flagField_ = name; + + for (const [name, _, ntype] of parameters_) { + if (isOptionalParam(ntype)) { + const { flagField, bitIndex } = analyzeOptionalParam(ntype); + + if (flagField == flagField_) { + if (type__[name] !== undefined) { + flags |= 1 << bitIndex; + } + } + } + } + writer.writeInt32(flags); + continue; + } + + if (type__[name] === undefined && !isOptionalParam(ntype)) { + throw new Error(`Missing required parameter: ${name}`); + } + + if (type instanceof Array) { + const itemsType = type[0]; + if (!Array.isArray(type__[name])) { + throw new TypeError("Expected array"); + } + writer.writeInt32(0x1CB5C415); // vector constructor + writer.writeInt32(type__[name].length); + for (const item of type__[name]) { + serializeSingleParam(writer, item, itemsType, ntype, debugInfo); + } + continue; + } + + serializeSingleParam(writer, type__[name], type, ntype, debugInfo); + } + + return writer.buffer; +} diff --git a/tl/2_serialize_test.ts b/tl/2_serialize_test.ts new file mode 100644 index 00000000..74cf80b9 --- /dev/null +++ b/tl/2_serialize_test.ts @@ -0,0 +1,87 @@ +/** + * MTKruto - Cross-runtime JavaScript library for building Telegram clients + * Copyright (C) 2023-2024 Roj + * + * This file is part of MTKruto. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import { assertEquals } from "../0_deps.ts"; +import { _types, flags, Parameters } from "./0_api.ts"; +import { serialize } from "./2_serialize.ts"; + +const testObject1: Parameters = [ + 0x01010101, + [["string", "string", "string"]], +]; +_types!.set("testObject1", testObject1); + +const testObject2: Parameters = [ + 0x10101010, + [ + ["boolean1", "boolean", "Bool"], + ["boolean2", "boolean", "Bool"], + ["int", "number", "int"], + ["long", "bigint", "long"], + ["int128", "bigint", "int128"], + ["int256", "bigint", "int256"], + ["string", "string", "string"], + ["bytes", Uint8Array, "bytes"], + ["flags", flags, "#"], + ["flag1", "true", "flags.0?true"], + ["flag2", ["testObject1"], "flags.1?Vector"], + ["flag3", "bigint", "flags.3?long"], + ], +]; +_types!.set("testObject2", testObject2); + +Deno.test("serialize", () => { + // deno-fmt-ignore + const expected = new Uint8Array([ + 0x10, 0x10, 0x10, 0x10, 0xB5, 0x75, 0x72, 0x99, + 0x37, 0x97, 0x79, 0xBC, 0xD2, 0x04, 0x00, 0x00, + 0x34, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xF3, + 0x01, 0xF0, 0x77, 0xC8, 0xC9, 0xF7, 0x24, 0x97, + 0x5A, 0x82, 0xD4, 0x07, 0x12, 0x94, 0x67, 0x02, + 0xAB, 0x4A, 0xA5, 0xE0, 0x76, 0xF9, 0xE9, 0xFA, + 0x99, 0x8E, 0xDB, 0xF1, 0x1E, 0x82, 0x14, 0xD6, + 0xAE, 0xEC, 0xEB, 0x46, 0x95, 0xF3, 0x84, 0xB4, + 0x4F, 0x52, 0x06, 0xAB, 0x7B, 0xB8, 0x49, 0x4B, + 0x07, 0x4D, 0x54, 0x4B, 0x72, 0x75, 0x74, 0x6F, + 0x04, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x15, 0xC4, 0xB5, 0x1C, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, + 0x07, 0x4D, 0x54, 0x4B, 0x72, 0x75, 0x74, 0x6F, + 0x01, 0x01, 0x01, 0x01, 0x07, 0x4D, 0x54, 0x4B, + 0x72, 0x75, 0x74, 0x6F + ]); + + const actual = serialize({ + _: "testObject2", + boolean1: true, + boolean2: false, + int: 1234, + long: -922337203685477580n, + int128: 3196265793150487616775634918212890625n, + int256: 34053716734886053108720723919265766388580600074269200372509658336639404296875n, + string: "MTKruto", + bytes: new Uint8Array([256, 256, 1, 1]), + flag1: true, + flag2: [{ _: "testObject1", string: "MTKruto" }, { _: "testObject1", string: "MTKruto" }], + // deno-lint-ignore no-explicit-any + } as any); + + assertEquals(actual, expected); +}); diff --git a/tl/2_types.ts b/tl/2_types.ts deleted file mode 100644 index 2f087c95..00000000 --- a/tl/2_types.ts +++ /dev/null @@ -1,60175 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -// deno-fmt-ignore-file -import { id, params, TLObject, Params, TLObjectConstructor, ParamDesc, paramDesc, flags, name } from "./1_tl_object.ts"; - -export abstract class Type_ extends TLObject { -} - -// Unknown type (generic) -export abstract class TypeX_ extends Type_ { - static get [name](): string { - return "TypeX"; - } -} - -export abstract class _ResPQ_ extends Type_ { -} - -export abstract class _P_Q_inner_data_ extends Type_ { -} - -export abstract class _Server_DH_Params_ extends Type_ { -} - -export abstract class _Server_DH_inner_data_ extends Type_ { -} - -export abstract class _Client_DH_Inner_Data_ extends Type_ { -} - -export abstract class _Set_client_DH_params_answer_ extends Type_ { -} - -export abstract class _BindAuthKeyInner_ extends Type_ { -} - -export abstract class _RpcError_ extends Type_ { -} - -export abstract class _RpcDropAnswer_ extends Type_ { -} - -export abstract class _FutureSalt_ extends Type_ { -} - -export abstract class _FutureSalts_ extends Type_ { -} - -export abstract class _Pong_ extends Type_ { -} - -export abstract class _DestroySessionRes_ extends Type_ { -} - -export abstract class _NewSession_ extends Type_ { -} - -export abstract class _Object_ extends Type_ { -} - -export abstract class _MsgsAck_ extends Type_ { -} - -export abstract class _BadMsgNotification_ extends Type_ { -} - -export abstract class _MsgResendReq_ extends Type_ { -} - -export abstract class _MsgsStateReq_ extends Type_ { -} - -export abstract class _MsgsStateInfo_ extends Type_ { -} - -export abstract class _MsgsAllInfo_ extends Type_ { -} - -export abstract class _MsgDetailedInfo_ extends Type_ { -} - -export abstract class _DestroyAuthKeyRes_ extends Type_ { -} - -export abstract class _HttpWait_ extends Type_ { -} - -export abstract class _True_ extends Type_ { -} - -export abstract class _Error_ extends Type_ { -} - -export abstract class _IpPort_ extends Type_ { -} - -export abstract class _AccessPointRule_ extends Type_ { -} - -export abstract class _help_ConfigSimple_ extends Type_ { -} - -export abstract class _InputFileLocation_ extends Type_ { -} - -export abstract class _InputPeer_ extends Type_ { -} - -export abstract class _InputUser_ extends Type_ { -} - -export abstract class _InputContact_ extends Type_ { -} - -export abstract class _InputFile_ extends Type_ { -} - -export abstract class _InputMedia_ extends Type_ { -} - -export abstract class _InputChatPhoto_ extends Type_ { -} - -export abstract class _InputGeoPoint_ extends Type_ { -} - -export abstract class _InputPhoto_ extends Type_ { -} - -export abstract class _Peer_ extends Type_ { -} - -export abstract class _storage_FileType_ extends Type_ { -} - -export abstract class _User_ extends Type_ { -} - -export abstract class _UserProfilePhoto_ extends Type_ { -} - -export abstract class _UserStatus_ extends Type_ { -} - -export abstract class _Chat_ extends Type_ { -} - -export abstract class _ChatFull_ extends Type_ { -} - -export abstract class _ChatParticipant_ extends Type_ { -} - -export abstract class _ChatParticipants_ extends Type_ { -} - -export abstract class _ChatPhoto_ extends Type_ { -} - -export abstract class _Message_ extends Type_ { -} - -export abstract class _MessageMedia_ extends Type_ { -} - -export abstract class _MessageAction_ extends Type_ { -} - -export abstract class _Dialog_ extends Type_ { -} - -export abstract class _Photo_ extends Type_ { -} - -export abstract class _PhotoSize_ extends Type_ { -} - -export abstract class _GeoPoint_ extends Type_ { -} - -export abstract class _auth_SentCode_ extends Type_ { -} - -export abstract class _auth_Authorization_ extends Type_ { -} - -export abstract class _auth_ExportedAuthorization_ extends Type_ { -} - -export abstract class _InputNotifyPeer_ extends Type_ { -} - -export abstract class _InputPeerNotifySettings_ extends Type_ { -} - -export abstract class _PeerNotifySettings_ extends Type_ { -} - -export abstract class _PeerSettings_ extends Type_ { -} - -export abstract class _WallPaper_ extends Type_ { -} - -export abstract class _ReportReason_ extends Type_ { -} - -export abstract class _UserFull_ extends Type_ { -} - -export abstract class _Contact_ extends Type_ { -} - -export abstract class _ImportedContact_ extends Type_ { -} - -export abstract class _ContactStatus_ extends Type_ { -} - -export abstract class _contacts_Contacts_ extends Type_ { -} - -export abstract class _contacts_ImportedContacts_ extends Type_ { -} - -export abstract class _contacts_Blocked_ extends Type_ { -} - -export abstract class _messages_Dialogs_ extends Type_ { -} - -export abstract class _messages_Messages_ extends Type_ { -} - -export abstract class _messages_Chats_ extends Type_ { -} - -export abstract class _messages_ChatFull_ extends Type_ { -} - -export abstract class _messages_AffectedHistory_ extends Type_ { -} - -export abstract class _MessagesFilter_ extends Type_ { -} - -export abstract class _Update_ extends Type_ { -} - -export abstract class _updates_State_ extends Type_ { -} - -export abstract class _updates_Difference_ extends Type_ { -} - -export abstract class _Updates_ extends Type_ { -} - -export abstract class _photos_Photos_ extends Type_ { -} - -export abstract class _photos_Photo_ extends Type_ { -} - -export abstract class _upload_File_ extends Type_ { -} - -export abstract class _DcOption_ extends Type_ { -} - -export abstract class _Config_ extends Type_ { -} - -export abstract class _NearestDc_ extends Type_ { -} - -export abstract class _help_AppUpdate_ extends Type_ { -} - -export abstract class _help_InviteText_ extends Type_ { -} - -export abstract class _EncryptedChat_ extends Type_ { -} - -export abstract class _InputEncryptedChat_ extends Type_ { -} - -export abstract class _EncryptedFile_ extends Type_ { -} - -export abstract class _InputEncryptedFile_ extends Type_ { -} - -export abstract class _EncryptedMessage_ extends Type_ { -} - -export abstract class _messages_DhConfig_ extends Type_ { -} - -export abstract class _messages_SentEncryptedMessage_ extends Type_ { -} - -export abstract class _InputDocument_ extends Type_ { -} - -export abstract class _Document_ extends Type_ { -} - -export abstract class _help_Support_ extends Type_ { -} - -export abstract class _NotifyPeer_ extends Type_ { -} - -export abstract class _SendMessageAction_ extends Type_ { -} - -export abstract class _contacts_Found_ extends Type_ { -} - -export abstract class _InputPrivacyKey_ extends Type_ { -} - -export abstract class _PrivacyKey_ extends Type_ { -} - -export abstract class _InputPrivacyRule_ extends Type_ { -} - -export abstract class _PrivacyRule_ extends Type_ { -} - -export abstract class _account_PrivacyRules_ extends Type_ { -} - -export abstract class _AccountDaysTTL_ extends Type_ { -} - -export abstract class _DocumentAttribute_ extends Type_ { -} - -export abstract class _messages_Stickers_ extends Type_ { -} - -export abstract class _StickerPack_ extends Type_ { -} - -export abstract class _messages_AllStickers_ extends Type_ { -} - -export abstract class _messages_AffectedMessages_ extends Type_ { -} - -export abstract class _WebPage_ extends Type_ { -} - -export abstract class _Authorization_ extends Type_ { -} - -export abstract class _account_Authorizations_ extends Type_ { -} - -export abstract class _account_Password_ extends Type_ { -} - -export abstract class _account_PasswordSettings_ extends Type_ { -} - -export abstract class _account_PasswordInputSettings_ extends Type_ { -} - -export abstract class _auth_PasswordRecovery_ extends Type_ { -} - -export abstract class _ReceivedNotifyMessage_ extends Type_ { -} - -export abstract class _ExportedChatInvite_ extends Type_ { -} - -export abstract class _ChatInvite_ extends Type_ { -} - -export abstract class _InputStickerSet_ extends Type_ { -} - -export abstract class _StickerSet_ extends Type_ { -} - -export abstract class _messages_StickerSet_ extends Type_ { -} - -export abstract class _BotCommand_ extends Type_ { -} - -export abstract class _BotInfo_ extends Type_ { -} - -export abstract class _KeyboardButton_ extends Type_ { -} - -export abstract class _KeyboardButtonRow_ extends Type_ { -} - -export abstract class _ReplyMarkup_ extends Type_ { -} - -export abstract class _MessageEntity_ extends Type_ { -} - -export abstract class _InputChannel_ extends Type_ { -} - -export abstract class _contacts_ResolvedPeer_ extends Type_ { -} - -export abstract class _MessageRange_ extends Type_ { -} - -export abstract class _updates_ChannelDifference_ extends Type_ { -} - -export abstract class _ChannelMessagesFilter_ extends Type_ { -} - -export abstract class _ChannelParticipant_ extends Type_ { -} - -export abstract class _ChannelParticipantsFilter_ extends Type_ { -} - -export abstract class _channels_ChannelParticipants_ extends Type_ { -} - -export abstract class _channels_ChannelParticipant_ extends Type_ { -} - -export abstract class _help_TermsOfService_ extends Type_ { -} - -export abstract class _messages_SavedGifs_ extends Type_ { -} - -export abstract class _InputBotInlineMessage_ extends Type_ { -} - -export abstract class _InputBotInlineResult_ extends Type_ { -} - -export abstract class _BotInlineMessage_ extends Type_ { -} - -export abstract class _BotInlineResult_ extends Type_ { -} - -export abstract class _messages_BotResults_ extends Type_ { -} - -export abstract class _ExportedMessageLink_ extends Type_ { -} - -export abstract class _MessageFwdHeader_ extends Type_ { -} - -export abstract class _auth_CodeType_ extends Type_ { -} - -export abstract class _auth_SentCodeType_ extends Type_ { -} - -export abstract class _messages_BotCallbackAnswer_ extends Type_ { -} - -export abstract class _messages_MessageEditData_ extends Type_ { -} - -export abstract class _InputBotInlineMessageID_ extends Type_ { -} - -export abstract class _InlineBotSwitchPM_ extends Type_ { -} - -export abstract class _messages_PeerDialogs_ extends Type_ { -} - -export abstract class _TopPeer_ extends Type_ { -} - -export abstract class _TopPeerCategory_ extends Type_ { -} - -export abstract class _TopPeerCategoryPeers_ extends Type_ { -} - -export abstract class _contacts_TopPeers_ extends Type_ { -} - -export abstract class _DraftMessage_ extends Type_ { -} - -export abstract class _messages_FeaturedStickers_ extends Type_ { -} - -export abstract class _messages_RecentStickers_ extends Type_ { -} - -export abstract class _messages_ArchivedStickers_ extends Type_ { -} - -export abstract class _messages_StickerSetInstallResult_ extends Type_ { -} - -export abstract class _StickerSetCovered_ extends Type_ { -} - -export abstract class _MaskCoords_ extends Type_ { -} - -export abstract class _InputStickeredMedia_ extends Type_ { -} - -export abstract class _Game_ extends Type_ { -} - -export abstract class _InputGame_ extends Type_ { -} - -export abstract class _HighScore_ extends Type_ { -} - -export abstract class _messages_HighScores_ extends Type_ { -} - -export abstract class _RichText_ extends Type_ { -} - -export abstract class _PageBlock_ extends Type_ { -} - -export abstract class _PhoneCallDiscardReason_ extends Type_ { -} - -export abstract class _DataJSON_ extends Type_ { -} - -export abstract class _LabeledPrice_ extends Type_ { -} - -export abstract class _Invoice_ extends Type_ { -} - -export abstract class _PaymentCharge_ extends Type_ { -} - -export abstract class _PostAddress_ extends Type_ { -} - -export abstract class _PaymentRequestedInfo_ extends Type_ { -} - -export abstract class _PaymentSavedCredentials_ extends Type_ { -} - -export abstract class _WebDocument_ extends Type_ { -} - -export abstract class _InputWebDocument_ extends Type_ { -} - -export abstract class _InputWebFileLocation_ extends Type_ { -} - -export abstract class _upload_WebFile_ extends Type_ { -} - -export abstract class _payments_PaymentForm_ extends Type_ { -} - -export abstract class _payments_ValidatedRequestedInfo_ extends Type_ { -} - -export abstract class _payments_PaymentResult_ extends Type_ { -} - -export abstract class _payments_PaymentReceipt_ extends Type_ { -} - -export abstract class _payments_SavedInfo_ extends Type_ { -} - -export abstract class _InputPaymentCredentials_ extends Type_ { -} - -export abstract class _account_TmpPassword_ extends Type_ { -} - -export abstract class _ShippingOption_ extends Type_ { -} - -export abstract class _InputStickerSetItem_ extends Type_ { -} - -export abstract class _InputPhoneCall_ extends Type_ { -} - -export abstract class _PhoneCall_ extends Type_ { -} - -export abstract class _PhoneConnection_ extends Type_ { -} - -export abstract class _PhoneCallProtocol_ extends Type_ { -} - -export abstract class _phone_PhoneCall_ extends Type_ { -} - -export abstract class _upload_CdnFile_ extends Type_ { -} - -export abstract class _CdnPublicKey_ extends Type_ { -} - -export abstract class _CdnConfig_ extends Type_ { -} - -export abstract class _LangPackString_ extends Type_ { -} - -export abstract class _LangPackDifference_ extends Type_ { -} - -export abstract class _LangPackLanguage_ extends Type_ { -} - -export abstract class _ChannelAdminLogEventAction_ extends Type_ { -} - -export abstract class _ChannelAdminLogEvent_ extends Type_ { -} - -export abstract class _channels_AdminLogResults_ extends Type_ { -} - -export abstract class _ChannelAdminLogEventsFilter_ extends Type_ { -} - -export abstract class _PopularContact_ extends Type_ { -} - -export abstract class _messages_FavedStickers_ extends Type_ { -} - -export abstract class _RecentMeUrl_ extends Type_ { -} - -export abstract class _help_RecentMeUrls_ extends Type_ { -} - -export abstract class _InputSingleMedia_ extends Type_ { -} - -export abstract class _WebAuthorization_ extends Type_ { -} - -export abstract class _account_WebAuthorizations_ extends Type_ { -} - -export abstract class _InputMessage_ extends Type_ { -} - -export abstract class _InputDialogPeer_ extends Type_ { -} - -export abstract class _DialogPeer_ extends Type_ { -} - -export abstract class _messages_FoundStickerSets_ extends Type_ { -} - -export abstract class _FileHash_ extends Type_ { -} - -export abstract class _InputClientProxy_ extends Type_ { -} - -export abstract class _help_TermsOfServiceUpdate_ extends Type_ { -} - -export abstract class _InputSecureFile_ extends Type_ { -} - -export abstract class _SecureFile_ extends Type_ { -} - -export abstract class _SecureData_ extends Type_ { -} - -export abstract class _SecurePlainData_ extends Type_ { -} - -export abstract class _SecureValueType_ extends Type_ { -} - -export abstract class _SecureValue_ extends Type_ { -} - -export abstract class _InputSecureValue_ extends Type_ { -} - -export abstract class _SecureValueHash_ extends Type_ { -} - -export abstract class _SecureValueError_ extends Type_ { -} - -export abstract class _SecureCredentialsEncrypted_ extends Type_ { -} - -export abstract class _account_AuthorizationForm_ extends Type_ { -} - -export abstract class _account_SentEmailCode_ extends Type_ { -} - -export abstract class _help_DeepLinkInfo_ extends Type_ { -} - -export abstract class _SavedContact_ extends Type_ { -} - -export abstract class _account_Takeout_ extends Type_ { -} - -export abstract class _PasswordKdfAlgo_ extends Type_ { -} - -export abstract class _SecurePasswordKdfAlgo_ extends Type_ { -} - -export abstract class _SecureSecretSettings_ extends Type_ { -} - -export abstract class _InputCheckPasswordSRP_ extends Type_ { -} - -export abstract class _SecureRequiredType_ extends Type_ { -} - -export abstract class _help_PassportConfig_ extends Type_ { -} - -export abstract class _InputAppEvent_ extends Type_ { -} - -export abstract class _JSONObjectValue_ extends Type_ { -} - -export abstract class _JSONValue_ extends Type_ { -} - -export abstract class _PageTableCell_ extends Type_ { -} - -export abstract class _PageTableRow_ extends Type_ { -} - -export abstract class _PageCaption_ extends Type_ { -} - -export abstract class _PageListItem_ extends Type_ { -} - -export abstract class _PageListOrderedItem_ extends Type_ { -} - -export abstract class _PageRelatedArticle_ extends Type_ { -} - -export abstract class _Page_ extends Type_ { -} - -export abstract class _help_SupportName_ extends Type_ { -} - -export abstract class _help_UserInfo_ extends Type_ { -} - -export abstract class _PollAnswer_ extends Type_ { -} - -export abstract class _Poll_ extends Type_ { -} - -export abstract class _PollAnswerVoters_ extends Type_ { -} - -export abstract class _PollResults_ extends Type_ { -} - -export abstract class _ChatOnlines_ extends Type_ { -} - -export abstract class _StatsURL_ extends Type_ { -} - -export abstract class _ChatAdminRights_ extends Type_ { -} - -export abstract class _ChatBannedRights_ extends Type_ { -} - -export abstract class _InputWallPaper_ extends Type_ { -} - -export abstract class _account_WallPapers_ extends Type_ { -} - -export abstract class _CodeSettings_ extends Type_ { -} - -export abstract class _WallPaperSettings_ extends Type_ { -} - -export abstract class _AutoDownloadSettings_ extends Type_ { -} - -export abstract class _account_AutoDownloadSettings_ extends Type_ { -} - -export abstract class _EmojiKeyword_ extends Type_ { -} - -export abstract class _EmojiKeywordsDifference_ extends Type_ { -} - -export abstract class _EmojiURL_ extends Type_ { -} - -export abstract class _EmojiLanguage_ extends Type_ { -} - -export abstract class _Folder_ extends Type_ { -} - -export abstract class _InputFolderPeer_ extends Type_ { -} - -export abstract class _FolderPeer_ extends Type_ { -} - -export abstract class _messages_SearchCounter_ extends Type_ { -} - -export abstract class _UrlAuthResult_ extends Type_ { -} - -export abstract class _ChannelLocation_ extends Type_ { -} - -export abstract class _PeerLocated_ extends Type_ { -} - -export abstract class _RestrictionReason_ extends Type_ { -} - -export abstract class _InputTheme_ extends Type_ { -} - -export abstract class _Theme_ extends Type_ { -} - -export abstract class _account_Themes_ extends Type_ { -} - -export abstract class _auth_LoginToken_ extends Type_ { -} - -export abstract class _account_ContentSettings_ extends Type_ { -} - -export abstract class _messages_InactiveChats_ extends Type_ { -} - -export abstract class _BaseTheme_ extends Type_ { -} - -export abstract class _InputThemeSettings_ extends Type_ { -} - -export abstract class _ThemeSettings_ extends Type_ { -} - -export abstract class _WebPageAttribute_ extends Type_ { -} - -export abstract class _messages_VotesList_ extends Type_ { -} - -export abstract class _BankCardOpenUrl_ extends Type_ { -} - -export abstract class _payments_BankCardData_ extends Type_ { -} - -export abstract class _DialogFilter_ extends Type_ { -} - -export abstract class _DialogFilterSuggested_ extends Type_ { -} - -export abstract class _StatsDateRangeDays_ extends Type_ { -} - -export abstract class _StatsAbsValueAndPrev_ extends Type_ { -} - -export abstract class _StatsPercentValue_ extends Type_ { -} - -export abstract class _StatsGraph_ extends Type_ { -} - -export abstract class _stats_BroadcastStats_ extends Type_ { -} - -export abstract class _help_PromoData_ extends Type_ { -} - -export abstract class _VideoSize_ extends Type_ { -} - -export abstract class _StatsGroupTopPoster_ extends Type_ { -} - -export abstract class _StatsGroupTopAdmin_ extends Type_ { -} - -export abstract class _StatsGroupTopInviter_ extends Type_ { -} - -export abstract class _stats_MegagroupStats_ extends Type_ { -} - -export abstract class _GlobalPrivacySettings_ extends Type_ { -} - -export abstract class _help_CountryCode_ extends Type_ { -} - -export abstract class _help_Country_ extends Type_ { -} - -export abstract class _help_CountriesList_ extends Type_ { -} - -export abstract class _MessageViews_ extends Type_ { -} - -export abstract class _messages_MessageViews_ extends Type_ { -} - -export abstract class _messages_DiscussionMessage_ extends Type_ { -} - -export abstract class _MessageReplyHeader_ extends Type_ { -} - -export abstract class _MessageReplies_ extends Type_ { -} - -export abstract class _PeerBlocked_ extends Type_ { -} - -export abstract class _stats_MessageStats_ extends Type_ { -} - -export abstract class _GroupCall_ extends Type_ { -} - -export abstract class _InputGroupCall_ extends Type_ { -} - -export abstract class _GroupCallParticipant_ extends Type_ { -} - -export abstract class _phone_GroupCall_ extends Type_ { -} - -export abstract class _phone_GroupParticipants_ extends Type_ { -} - -export abstract class _InlineQueryPeerType_ extends Type_ { -} - -export abstract class _messages_HistoryImport_ extends Type_ { -} - -export abstract class _messages_HistoryImportParsed_ extends Type_ { -} - -export abstract class _messages_AffectedFoundMessages_ extends Type_ { -} - -export abstract class _ChatInviteImporter_ extends Type_ { -} - -export abstract class _messages_ExportedChatInvites_ extends Type_ { -} - -export abstract class _messages_ExportedChatInvite_ extends Type_ { -} - -export abstract class _messages_ChatInviteImporters_ extends Type_ { -} - -export abstract class _ChatAdminWithInvites_ extends Type_ { -} - -export abstract class _messages_ChatAdminsWithInvites_ extends Type_ { -} - -export abstract class _messages_CheckedHistoryImportPeer_ extends Type_ { -} - -export abstract class _phone_JoinAsPeers_ extends Type_ { -} - -export abstract class _phone_ExportedGroupCallInvite_ extends Type_ { -} - -export abstract class _GroupCallParticipantVideoSourceGroup_ extends Type_ { -} - -export abstract class _GroupCallParticipantVideo_ extends Type_ { -} - -export abstract class _stickers_SuggestedShortName_ extends Type_ { -} - -export abstract class _BotCommandScope_ extends Type_ { -} - -export abstract class _account_ResetPasswordResult_ extends Type_ { -} - -export abstract class _SponsoredMessage_ extends Type_ { -} - -export abstract class _messages_SponsoredMessages_ extends Type_ { -} - -export abstract class _SearchResultsCalendarPeriod_ extends Type_ { -} - -export abstract class _messages_SearchResultsCalendar_ extends Type_ { -} - -export abstract class _SearchResultsPosition_ extends Type_ { -} - -export abstract class _messages_SearchResultsPositions_ extends Type_ { -} - -export abstract class _channels_SendAsPeers_ extends Type_ { -} - -export abstract class _users_UserFull_ extends Type_ { -} - -export abstract class _messages_PeerSettings_ extends Type_ { -} - -export abstract class _auth_LoggedOut_ extends Type_ { -} - -export abstract class _ReactionCount_ extends Type_ { -} - -export abstract class _MessageReactions_ extends Type_ { -} - -export abstract class _messages_MessageReactionsList_ extends Type_ { -} - -export abstract class _AvailableReaction_ extends Type_ { -} - -export abstract class _messages_AvailableReactions_ extends Type_ { -} - -export abstract class _MessagePeerReaction_ extends Type_ { -} - -export abstract class _GroupCallStreamChannel_ extends Type_ { -} - -export abstract class _phone_GroupCallStreamChannels_ extends Type_ { -} - -export abstract class _phone_GroupCallStreamRtmpUrl_ extends Type_ { -} - -export abstract class _AttachMenuBotIconColor_ extends Type_ { -} - -export abstract class _AttachMenuBotIcon_ extends Type_ { -} - -export abstract class _AttachMenuBot_ extends Type_ { -} - -export abstract class _AttachMenuBots_ extends Type_ { -} - -export abstract class _AttachMenuBotsBot_ extends Type_ { -} - -export abstract class _WebViewResult_ extends Type_ { -} - -export abstract class _SimpleWebViewResult_ extends Type_ { -} - -export abstract class _WebViewMessageSent_ extends Type_ { -} - -export abstract class _BotMenuButton_ extends Type_ { -} - -export abstract class _account_SavedRingtones_ extends Type_ { -} - -export abstract class _NotificationSound_ extends Type_ { -} - -export abstract class _account_SavedRingtone_ extends Type_ { -} - -export abstract class _AttachMenuPeerType_ extends Type_ { -} - -export abstract class _InputInvoice_ extends Type_ { -} - -export abstract class _payments_ExportedInvoice_ extends Type_ { -} - -export abstract class _messages_TranscribedAudio_ extends Type_ { -} - -export abstract class _help_PremiumPromo_ extends Type_ { -} - -export abstract class _InputStorePaymentPurpose_ extends Type_ { -} - -export abstract class _PremiumGiftOption_ extends Type_ { -} - -export abstract class _PaymentFormMethod_ extends Type_ { -} - -export abstract class _EmojiStatus_ extends Type_ { -} - -export abstract class _account_EmojiStatuses_ extends Type_ { -} - -export abstract class _Reaction_ extends Type_ { -} - -export abstract class _ChatReactions_ extends Type_ { -} - -export abstract class _messages_Reactions_ extends Type_ { -} - -export abstract class _EmailVerifyPurpose_ extends Type_ { -} - -export abstract class _EmailVerification_ extends Type_ { -} - -export abstract class _account_EmailVerified_ extends Type_ { -} - -export abstract class _PremiumSubscriptionOption_ extends Type_ { -} - -export abstract class _SendAsPeer_ extends Type_ { -} - -export abstract class _MessageExtendedMedia_ extends Type_ { -} - -export abstract class _StickerKeyword_ extends Type_ { -} - -export abstract class _Username_ extends Type_ { -} - -export abstract class _ForumTopic_ extends Type_ { -} - -export abstract class _messages_ForumTopics_ extends Type_ { -} - -export abstract class _DefaultHistoryTTL_ extends Type_ { -} - -export abstract class _ExportedContactToken_ extends Type_ { -} - -export abstract class _RequestPeerType_ extends Type_ { -} - -export abstract class _EmojiList_ extends Type_ { -} - -export abstract class _EmojiGroup_ extends Type_ { -} - -export abstract class _messages_EmojiGroups_ extends Type_ { -} - -export abstract class _TextWithEntities_ extends Type_ { -} - -export abstract class _messages_TranslatedText_ extends Type_ { -} - -export abstract class _AutoSaveSettings_ extends Type_ { -} - -export abstract class _AutoSaveException_ extends Type_ { -} - -export abstract class _account_AutoSaveSettings_ extends Type_ { -} - -export abstract class _help_AppConfig_ extends Type_ { -} - -export abstract class _InputBotApp_ extends Type_ { -} - -export abstract class _BotApp_ extends Type_ { -} - -export abstract class _messages_BotApp_ extends Type_ { -} - -export abstract class _AppWebViewResult_ extends Type_ { -} - -export abstract class _InlineBotWebView_ extends Type_ { -} - -export abstract class _ReadParticipantDate_ extends Type_ { -} - -export abstract class _InputChatlist_ extends Type_ { -} - -export abstract class _ExportedChatlistInvite_ extends Type_ { -} - -export abstract class _chatlists_ExportedChatlistInvite_ extends Type_ { -} - -export abstract class _chatlists_ExportedInvites_ extends Type_ { -} - -export abstract class _chatlists_ChatlistInvite_ extends Type_ { -} - -export abstract class _chatlists_ChatlistUpdates_ extends Type_ { -} - -export abstract class _bots_BotInfo_ extends Type_ { -} - -export abstract class _MessagePeerVote_ extends Type_ { -} - -export abstract class _SponsoredWebPage_ extends Type_ { -} - -export abstract class _StoryViews_ extends Type_ { -} - -export abstract class _StoryItem_ extends Type_ { -} - -export abstract class _stories_AllStories_ extends Type_ { -} - -export abstract class _stories_Stories_ extends Type_ { -} - -export abstract class _StoryView_ extends Type_ { -} - -export abstract class _stories_StoryViewsList_ extends Type_ { -} - -export abstract class _stories_StoryViews_ extends Type_ { -} - -export abstract class _InputReplyTo_ extends Type_ { -} - -export abstract class _ExportedStoryLink_ extends Type_ { -} - -export abstract class _StoriesStealthMode_ extends Type_ { -} - -export abstract class _MediaAreaCoordinates_ extends Type_ { -} - -export abstract class _MediaArea_ extends Type_ { -} - -export abstract class _PeerStories_ extends Type_ { -} - -export abstract class _stories_PeerStories_ extends Type_ { -} - -export abstract class _messages_WebPage_ extends Type_ { -} - -export abstract class _PremiumGiftCodeOption_ extends Type_ { -} - -export abstract class _payments_CheckedGiftCode_ extends Type_ { -} - -export abstract class _payments_GiveawayInfo_ extends Type_ { -} - -export abstract class _PrepaidGiveaway_ extends Type_ { -} - -export abstract class _Boost_ extends Type_ { -} - -export abstract class _premium_BoostsList_ extends Type_ { -} - -export abstract class _MyBoost_ extends Type_ { -} - -export abstract class _premium_MyBoosts_ extends Type_ { -} - -export abstract class _premium_BoostsStatus_ extends Type_ { -} - -export abstract class _StoryFwdHeader_ extends Type_ { -} - -export abstract class _PostInteractionCounters_ extends Type_ { -} - -export abstract class _stats_StoryStats_ extends Type_ { -} - -export abstract class _PublicForward_ extends Type_ { -} - -export abstract class _stats_PublicForwards_ extends Type_ { -} - -export abstract class _PeerColor_ extends Type_ { -} - -export abstract class _help_PeerColorSet_ extends Type_ { -} - -export abstract class _help_PeerColorOption_ extends Type_ { -} - -export abstract class _help_PeerColors_ extends Type_ { -} - -export abstract class _StoryReaction_ extends Type_ { -} - -export abstract class _stories_StoryReactionsList_ extends Type_ { -} - -export abstract class _SavedDialog_ extends Type_ { -} - -export abstract class _messages_SavedDialogs_ extends Type_ { -} - -export abstract class _SavedReactionTag_ extends Type_ { -} - -export abstract class _messages_SavedReactionTags_ extends Type_ { -} - -export abstract class _OutboxReadDate_ extends Type_ { -} - -export abstract class _smsjobs_EligibilityToJoin_ extends Type_ { -} - -export abstract class _smsjobs_Status_ extends Type_ { -} - -export abstract class _SmsJob_ extends Type_ { -} - -export abstract class _BusinessWeeklyOpen_ extends Type_ { -} - -export abstract class _BusinessWorkHours_ extends Type_ { -} - -export abstract class _BusinessLocation_ extends Type_ { -} - -export abstract class _InputBusinessRecipients_ extends Type_ { -} - -export abstract class _BusinessRecipients_ extends Type_ { -} - -export abstract class _BusinessAwayMessageSchedule_ extends Type_ { -} - -export abstract class _InputBusinessGreetingMessage_ extends Type_ { -} - -export abstract class _BusinessGreetingMessage_ extends Type_ { -} - -export abstract class _InputBusinessAwayMessage_ extends Type_ { -} - -export abstract class _BusinessAwayMessage_ extends Type_ { -} - -export abstract class _Timezone_ extends Type_ { -} - -export abstract class _help_TimezonesList_ extends Type_ { -} - -export abstract class _QuickReply_ extends Type_ { -} - -export abstract class _InputQuickReplyShortcut_ extends Type_ { -} - -export abstract class _messages_QuickReplies_ extends Type_ { -} - -export abstract class _ConnectedBot_ extends Type_ { -} - -export abstract class _account_ConnectedBots_ extends Type_ { -} - -export abstract class _messages_DialogFilters_ extends Type_ { -} - -export abstract class _Birthday_ extends Type_ { -} - -export abstract class _BotBusinessConnection_ extends Type_ { -} - -export abstract class _InputBusinessIntro_ extends Type_ { -} - -export abstract class _BusinessIntro_ extends Type_ { -} - -export abstract class _messages_MyStickers_ extends Type_ { -} - -export abstract class _InputCollectible_ extends Type_ { -} - -export abstract class _fragment_CollectibleInfo_ extends Type_ { -} - -export abstract class _InputBusinessBotRecipients_ extends Type_ { -} - -export abstract class _BusinessBotRecipients_ extends Type_ { -} - -export abstract class _ContactBirthday_ extends Type_ { -} - -export abstract class _contacts_ContactBirthdays_ extends Type_ { -} - -export abstract class _MissingInvitee_ extends Type_ { -} - -export abstract class _messages_InvitedUsers_ extends Type_ { -} - -export abstract class _InputBusinessChatLink_ extends Type_ { -} - -export abstract class _BusinessChatLink_ extends Type_ { -} - -export abstract class _account_BusinessChatLinks_ extends Type_ { -} - -export abstract class _account_ResolvedBusinessChatLinks_ extends Type_ { -} - -export abstract class _RequestedPeer_ extends Type_ { -} - -export abstract class _SponsoredMessageReportOption_ extends Type_ { -} - -export abstract class _channels_SponsoredMessageReportResult_ extends Type_ { -} - -export abstract class _stats_BroadcastRevenueStats_ extends Type_ { -} - -export abstract class _stats_BroadcastRevenueWithdrawalUrl_ extends Type_ { -} - -export abstract class _BroadcastRevenueTransaction_ extends Type_ { -} - -export abstract class _stats_BroadcastRevenueTransactions_ extends Type_ { -} - -export class ResPQ_ extends _ResPQ_ { - nonce: bigint; - server_nonce: bigint; - pq: Uint8Array; - server_public_key_fingerprints: Array; - - protected get [id](): number { - return 0x05162463; - } - - static get [name](): string { - return "resPQ" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["pq", Uint8Array, "bytes"], - ["server_public_key_fingerprints", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.pq, Uint8Array, "bytes"], - [this.server_public_key_fingerprints, ["bigint"], "Vector"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; pq: Uint8Array; server_public_key_fingerprints: Array }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.pq = params.pq; - this.server_public_key_fingerprints = params.server_public_key_fingerprints; - } -} - -export class P_q_inner_data_dc_ extends _P_Q_inner_data_ { - pq: Uint8Array; - p: Uint8Array; - q: Uint8Array; - nonce: bigint; - server_nonce: bigint; - new_nonce: bigint; - dc: number; - - protected get [id](): number { - return 0xA9F55F95; - } - - static get [name](): string { - return "p_q_inner_data_dc" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pq", Uint8Array, "bytes"], - ["p", Uint8Array, "bytes"], - ["q", Uint8Array, "bytes"], - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["new_nonce", "bigint", "int256"], - ["dc", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pq, Uint8Array, "bytes"], - [this.p, Uint8Array, "bytes"], - [this.q, Uint8Array, "bytes"], - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.new_nonce, "bigint", "int256"], - [this.dc, "number", "int"], - ]; - } - - constructor(params: { pq: Uint8Array; p: Uint8Array; q: Uint8Array; nonce: bigint; server_nonce: bigint; new_nonce: bigint; dc: number }) { - super(); - this.pq = params.pq; - this.p = params.p; - this.q = params.q; - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.new_nonce = params.new_nonce; - this.dc = params.dc; - } -} - -export class P_q_inner_data_temp_dc_ extends _P_Q_inner_data_ { - pq: Uint8Array; - p: Uint8Array; - q: Uint8Array; - nonce: bigint; - server_nonce: bigint; - new_nonce: bigint; - dc: number; - expires_in: number; - - protected get [id](): number { - return 0x56FDDF88; - } - - static get [name](): string { - return "p_q_inner_data_temp_dc" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pq", Uint8Array, "bytes"], - ["p", Uint8Array, "bytes"], - ["q", Uint8Array, "bytes"], - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["new_nonce", "bigint", "int256"], - ["dc", "number", "int"], - ["expires_in", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pq, Uint8Array, "bytes"], - [this.p, Uint8Array, "bytes"], - [this.q, Uint8Array, "bytes"], - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.new_nonce, "bigint", "int256"], - [this.dc, "number", "int"], - [this.expires_in, "number", "int"], - ]; - } - - constructor(params: { pq: Uint8Array; p: Uint8Array; q: Uint8Array; nonce: bigint; server_nonce: bigint; new_nonce: bigint; dc: number; expires_in: number }) { - super(); - this.pq = params.pq; - this.p = params.p; - this.q = params.q; - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.new_nonce = params.new_nonce; - this.dc = params.dc; - this.expires_in = params.expires_in; - } -} - -export class Server_DH_params_ok_ extends _Server_DH_Params_ { - nonce: bigint; - server_nonce: bigint; - encrypted_answer: Uint8Array; - - protected get [id](): number { - return 0xD0E8075C; - } - - static get [name](): string { - return "server_DH_params_ok" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["encrypted_answer", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.encrypted_answer, Uint8Array, "bytes"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; encrypted_answer: Uint8Array }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.encrypted_answer = params.encrypted_answer; - } -} - -export class Server_DH_inner_data_ extends _Server_DH_inner_data_ { - nonce: bigint; - server_nonce: bigint; - g: number; - dh_prime: Uint8Array; - g_a: Uint8Array; - server_time: number; - - protected get [id](): number { - return 0xB5890DBA; - } - - static get [name](): string { - return "server_DH_inner_data" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["g", "number", "int"], - ["dh_prime", Uint8Array, "bytes"], - ["g_a", Uint8Array, "bytes"], - ["server_time", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.g, "number", "int"], - [this.dh_prime, Uint8Array, "bytes"], - [this.g_a, Uint8Array, "bytes"], - [this.server_time, "number", "int"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; g: number; dh_prime: Uint8Array; g_a: Uint8Array; server_time: number }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.g = params.g; - this.dh_prime = params.dh_prime; - this.g_a = params.g_a; - this.server_time = params.server_time; - } -} - -export class Client_DH_inner_data_ extends _Client_DH_Inner_Data_ { - nonce: bigint; - server_nonce: bigint; - retry_id: bigint; - g_b: Uint8Array; - - protected get [id](): number { - return 0x6643B654; - } - - static get [name](): string { - return "client_DH_inner_data" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["retry_id", "bigint", "long"], - ["g_b", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.retry_id, "bigint", "long"], - [this.g_b, Uint8Array, "bytes"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; retry_id: bigint; g_b: Uint8Array }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.retry_id = params.retry_id; - this.g_b = params.g_b; - } -} - -export class Dh_gen_ok_ extends _Set_client_DH_params_answer_ { - nonce: bigint; - server_nonce: bigint; - new_nonce_hash1: bigint; - - protected get [id](): number { - return 0x3BCBF734; - } - - static get [name](): string { - return "dh_gen_ok" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["new_nonce_hash1", "bigint", "int128"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.new_nonce_hash1, "bigint", "int128"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; new_nonce_hash1: bigint }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.new_nonce_hash1 = params.new_nonce_hash1; - } -} - -export class Dh_gen_retry_ extends _Set_client_DH_params_answer_ { - nonce: bigint; - server_nonce: bigint; - new_nonce_hash2: bigint; - - protected get [id](): number { - return 0x46DC1FB9; - } - - static get [name](): string { - return "dh_gen_retry" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["new_nonce_hash2", "bigint", "int128"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.new_nonce_hash2, "bigint", "int128"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; new_nonce_hash2: bigint }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.new_nonce_hash2 = params.new_nonce_hash2; - } -} - -export class Dh_gen_fail_ extends _Set_client_DH_params_answer_ { - nonce: bigint; - server_nonce: bigint; - new_nonce_hash3: bigint; - - protected get [id](): number { - return 0xA69DAE02; - } - - static get [name](): string { - return "dh_gen_fail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["new_nonce_hash3", "bigint", "int128"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.new_nonce_hash3, "bigint", "int128"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; new_nonce_hash3: bigint }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.new_nonce_hash3 = params.new_nonce_hash3; - } -} - -export class Bind_auth_key_inner_ extends _BindAuthKeyInner_ { - nonce: bigint; - temp_auth_key_id: bigint; - perm_auth_key_id: bigint; - temp_session_id: bigint; - expires_at: number; - - protected get [id](): number { - return 0x75A3F765; - } - - static get [name](): string { - return "bind_auth_key_inner" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "long"], - ["temp_auth_key_id", "bigint", "long"], - ["perm_auth_key_id", "bigint", "long"], - ["temp_session_id", "bigint", "long"], - ["expires_at", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "long"], - [this.temp_auth_key_id, "bigint", "long"], - [this.perm_auth_key_id, "bigint", "long"], - [this.temp_session_id, "bigint", "long"], - [this.expires_at, "number", "int"], - ]; - } - - constructor(params: { nonce: bigint; temp_auth_key_id: bigint; perm_auth_key_id: bigint; temp_session_id: bigint; expires_at: number }) { - super(); - this.nonce = params.nonce; - this.temp_auth_key_id = params.temp_auth_key_id; - this.perm_auth_key_id = params.perm_auth_key_id; - this.temp_session_id = params.temp_session_id; - this.expires_at = params.expires_at; - } -} - -export class Rpc_error_ extends _RpcError_ { - error_code: number; - error_message: string; - - protected get [id](): number { - return 0x2144CA19; - } - - static get [name](): string { - return "rpc_error" - } - - static get [paramDesc](): ParamDesc { - return [ - ["error_code", "number", "int"], - ["error_message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.error_code, "number", "int"], - [this.error_message, "string", "string"], - ]; - } - - constructor(params: { error_code: number; error_message: string }) { - super(); - this.error_code = params.error_code; - this.error_message = params.error_message; - } -} - -export class Rpc_answer_unknown_ extends _RpcDropAnswer_ { - protected get [id](): number { - return 0x5E2AD36E; - } - - static get [name](): string { - return "rpc_answer_unknown" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class Rpc_answer_dropped_running_ extends _RpcDropAnswer_ { - protected get [id](): number { - return 0xCD78E586; - } - - static get [name](): string { - return "rpc_answer_dropped_running" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class Rpc_answer_dropped_ extends _RpcDropAnswer_ { - msg_id: bigint; - seq_no: number; - bytes: number; - - protected get [id](): number { - return 0xA43AD8B7; - } - - static get [name](): string { - return "rpc_answer_dropped" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_id", "bigint", "long"], - ["seq_no", "number", "int"], - ["bytes", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_id, "bigint", "long"], - [this.seq_no, "number", "int"], - [this.bytes, "number", "int"], - ]; - } - - constructor(params: { msg_id: bigint; seq_no: number; bytes: number }) { - super(); - this.msg_id = params.msg_id; - this.seq_no = params.seq_no; - this.bytes = params.bytes; - } -} - -export class Future_salt_ extends _FutureSalt_ { - valid_since: number; - valid_until: number; - salt: bigint; - - protected get [id](): number { - return 0x0949D9DC; - } - - static get [name](): string { - return "future_salt" - } - - static get [paramDesc](): ParamDesc { - return [ - ["valid_since", "number", "int"], - ["valid_until", "number", "int"], - ["salt", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.valid_since, "number", "int"], - [this.valid_until, "number", "int"], - [this.salt, "bigint", "long"], - ]; - } - - constructor(params: { valid_since: number; valid_until: number; salt: bigint }) { - super(); - this.valid_since = params.valid_since; - this.valid_until = params.valid_until; - this.salt = params.salt; - } -} - -export class Future_salts_ extends _FutureSalts_ { - req_msg_id: bigint; - now: number; - salts: Array; - - protected get [id](): number { - return 0xAE500895; - } - - static get [name](): string { - return "future_salts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["req_msg_id", "bigint", "long"], - ["now", "number", "int"], - ["salts", [_FutureSalt_], "vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.req_msg_id, "bigint", "long"], - [this.now, "number", "int"], - [this.salts, [_FutureSalt_], "vector"], - ]; - } - - constructor(params: { req_msg_id: bigint; now: number; salts: Array }) { - super(); - this.req_msg_id = params.req_msg_id; - this.now = params.now; - this.salts = params.salts; - } -} - -export class Pong_ extends _Pong_ { - msg_id: bigint; - ping_id: bigint; - - protected get [id](): number { - return 0x347773C5; - } - - static get [name](): string { - return "pong" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_id", "bigint", "long"], - ["ping_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_id, "bigint", "long"], - [this.ping_id, "bigint", "long"], - ]; - } - - constructor(params: { msg_id: bigint; ping_id: bigint }) { - super(); - this.msg_id = params.msg_id; - this.ping_id = params.ping_id; - } -} - -export class Destroy_session_ok_ extends _DestroySessionRes_ { - session_id: bigint; - - protected get [id](): number { - return 0xE22045FC; - } - - static get [name](): string { - return "destroy_session_ok" - } - - static get [paramDesc](): ParamDesc { - return [ - ["session_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.session_id, "bigint", "long"], - ]; - } - - constructor(params: { session_id: bigint }) { - super(); - this.session_id = params.session_id; - } -} - -export class Destroy_session_none_ extends _DestroySessionRes_ { - session_id: bigint; - - protected get [id](): number { - return 0x62D350C9; - } - - static get [name](): string { - return "destroy_session_none" - } - - static get [paramDesc](): ParamDesc { - return [ - ["session_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.session_id, "bigint", "long"], - ]; - } - - constructor(params: { session_id: bigint }) { - super(); - this.session_id = params.session_id; - } -} - -export class New_session_created_ extends _NewSession_ { - first_msg_id: bigint; - unique_id: bigint; - server_salt: bigint; - - protected get [id](): number { - return 0x9EC20908; - } - - static get [name](): string { - return "new_session_created" - } - - static get [paramDesc](): ParamDesc { - return [ - ["first_msg_id", "bigint", "long"], - ["unique_id", "bigint", "long"], - ["server_salt", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.first_msg_id, "bigint", "long"], - [this.unique_id, "bigint", "long"], - [this.server_salt, "bigint", "long"], - ]; - } - - constructor(params: { first_msg_id: bigint; unique_id: bigint; server_salt: bigint }) { - super(); - this.first_msg_id = params.first_msg_id; - this.unique_id = params.unique_id; - this.server_salt = params.server_salt; - } -} - -export class Gzip_packed_ extends _Object_ { - packed_data: Uint8Array; - - protected get [id](): number { - return 0x3072CFA1; - } - - static get [name](): string { - return "gzip_packed" - } - - static get [paramDesc](): ParamDesc { - return [ - ["packed_data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.packed_data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { packed_data: Uint8Array }) { - super(); - this.packed_data = params.packed_data; - } -} - -export class Msgs_ack_ extends _MsgsAck_ { - msg_ids: Array; - - protected get [id](): number { - return 0x62D6B459; - } - - static get [name](): string { - return "msgs_ack" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_ids", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_ids, ["bigint"], "Vector"], - ]; - } - - constructor(params: { msg_ids: Array }) { - super(); - this.msg_ids = params.msg_ids; - } -} - -export class Bad_msg_notification_ extends _BadMsgNotification_ { - bad_msg_id: bigint; - bad_msg_seqno: number; - error_code: number; - - protected get [id](): number { - return 0xA7EFF811; - } - - static get [name](): string { - return "bad_msg_notification" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bad_msg_id", "bigint", "long"], - ["bad_msg_seqno", "number", "int"], - ["error_code", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.bad_msg_id, "bigint", "long"], - [this.bad_msg_seqno, "number", "int"], - [this.error_code, "number", "int"], - ]; - } - - constructor(params: { bad_msg_id: bigint; bad_msg_seqno: number; error_code: number }) { - super(); - this.bad_msg_id = params.bad_msg_id; - this.bad_msg_seqno = params.bad_msg_seqno; - this.error_code = params.error_code; - } -} - -export class Bad_server_salt_ extends _BadMsgNotification_ { - bad_msg_id: bigint; - bad_msg_seqno: number; - error_code: number; - new_server_salt: bigint; - - protected get [id](): number { - return 0xEDAB447B; - } - - static get [name](): string { - return "bad_server_salt" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bad_msg_id", "bigint", "long"], - ["bad_msg_seqno", "number", "int"], - ["error_code", "number", "int"], - ["new_server_salt", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.bad_msg_id, "bigint", "long"], - [this.bad_msg_seqno, "number", "int"], - [this.error_code, "number", "int"], - [this.new_server_salt, "bigint", "long"], - ]; - } - - constructor(params: { bad_msg_id: bigint; bad_msg_seqno: number; error_code: number; new_server_salt: bigint }) { - super(); - this.bad_msg_id = params.bad_msg_id; - this.bad_msg_seqno = params.bad_msg_seqno; - this.error_code = params.error_code; - this.new_server_salt = params.new_server_salt; - } -} - -export class Msg_resend_req_ extends _MsgResendReq_ { - msg_ids: Array; - - protected get [id](): number { - return 0x7D861A08; - } - - static get [name](): string { - return "msg_resend_req" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_ids", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_ids, ["bigint"], "Vector"], - ]; - } - - constructor(params: { msg_ids: Array }) { - super(); - this.msg_ids = params.msg_ids; - } -} - -export class Msgs_state_req_ extends _MsgsStateReq_ { - msg_ids: Array; - - protected get [id](): number { - return 0xDA69FB52; - } - - static get [name](): string { - return "msgs_state_req" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_ids", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_ids, ["bigint"], "Vector"], - ]; - } - - constructor(params: { msg_ids: Array }) { - super(); - this.msg_ids = params.msg_ids; - } -} - -export class Msgs_state_info_ extends _MsgsStateInfo_ { - req_msg_id: bigint; - info: Uint8Array; - - protected get [id](): number { - return 0x04DEB57D; - } - - static get [name](): string { - return "msgs_state_info" - } - - static get [paramDesc](): ParamDesc { - return [ - ["req_msg_id", "bigint", "long"], - ["info", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.req_msg_id, "bigint", "long"], - [this.info, Uint8Array, "bytes"], - ]; - } - - constructor(params: { req_msg_id: bigint; info: Uint8Array }) { - super(); - this.req_msg_id = params.req_msg_id; - this.info = params.info; - } -} - -export class Msgs_all_info_ extends _MsgsAllInfo_ { - msg_ids: Array; - info: Uint8Array; - - protected get [id](): number { - return 0x8CC0D131; - } - - static get [name](): string { - return "msgs_all_info" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_ids", ["bigint"], "Vector"], - ["info", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_ids, ["bigint"], "Vector"], - [this.info, Uint8Array, "bytes"], - ]; - } - - constructor(params: { msg_ids: Array; info: Uint8Array }) { - super(); - this.msg_ids = params.msg_ids; - this.info = params.info; - } -} - -export class Msg_detailed_info_ extends _MsgDetailedInfo_ { - msg_id: bigint; - answer_msg_id: bigint; - bytes: number; - status: number; - - protected get [id](): number { - return 0x276D3EC6; - } - - static get [name](): string { - return "msg_detailed_info" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_id", "bigint", "long"], - ["answer_msg_id", "bigint", "long"], - ["bytes", "number", "int"], - ["status", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_id, "bigint", "long"], - [this.answer_msg_id, "bigint", "long"], - [this.bytes, "number", "int"], - [this.status, "number", "int"], - ]; - } - - constructor(params: { msg_id: bigint; answer_msg_id: bigint; bytes: number; status: number }) { - super(); - this.msg_id = params.msg_id; - this.answer_msg_id = params.answer_msg_id; - this.bytes = params.bytes; - this.status = params.status; - } -} - -export class Msg_new_detailed_info_ extends _MsgDetailedInfo_ { - answer_msg_id: bigint; - bytes: number; - status: number; - - protected get [id](): number { - return 0x809DB6DF; - } - - static get [name](): string { - return "msg_new_detailed_info" - } - - static get [paramDesc](): ParamDesc { - return [ - ["answer_msg_id", "bigint", "long"], - ["bytes", "number", "int"], - ["status", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.answer_msg_id, "bigint", "long"], - [this.bytes, "number", "int"], - [this.status, "number", "int"], - ]; - } - - constructor(params: { answer_msg_id: bigint; bytes: number; status: number }) { - super(); - this.answer_msg_id = params.answer_msg_id; - this.bytes = params.bytes; - this.status = params.status; - } -} - -export class Destroy_auth_key_ok_ extends _DestroyAuthKeyRes_ { - protected get [id](): number { - return 0xF660E1D4; - } - - static get [name](): string { - return "destroy_auth_key_ok" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class Destroy_auth_key_none_ extends _DestroyAuthKeyRes_ { - protected get [id](): number { - return 0x0A9F2259; - } - - static get [name](): string { - return "destroy_auth_key_none" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class Destroy_auth_key_fail_ extends _DestroyAuthKeyRes_ { - protected get [id](): number { - return 0xEA109B13; - } - - static get [name](): string { - return "destroy_auth_key_fail" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class Http_wait_ extends _HttpWait_ { - max_delay: number; - wait_after: number; - max_wait: number; - - protected get [id](): number { - return 0x9299359F; - } - - static get [name](): string { - return "http_wait" - } - - static get [paramDesc](): ParamDesc { - return [ - ["max_delay", "number", "int"], - ["wait_after", "number", "int"], - ["max_wait", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.max_delay, "number", "int"], - [this.wait_after, "number", "int"], - [this.max_wait, "number", "int"], - ]; - } - - constructor(params: { max_delay: number; wait_after: number; max_wait: number }) { - super(); - this.max_delay = params.max_delay; - this.wait_after = params.wait_after; - this.max_wait = params.max_wait; - } -} - -/** See [predefined identifiers](https://core.telegram.org/mtproto/TL-formal#predefined-identifiers). */ -export class True_ extends _True_ { - protected get [id](): number { - return 0x3FEDD339; - } - - static get [name](): string { - return "true" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Error. */ -export class Error_ extends _Error_ { - /** Error code */ - code: number; - /** Message */ - text: string; - - protected get [id](): number { - return 0xC4B9F9BB; - } - - static get [name](): string { - return "error" - } - - static get [paramDesc](): ParamDesc { - return [ - ["code", "number", "int"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.code, "number", "int"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { code: number; text: string }) { - super(); - this.code = params.code; - this.text = params.text; - } -} - -export class IpPort_ extends _IpPort_ { - ipv4: number; - port: number; - - protected get [id](): number { - return 0xD433AD73; - } - - static get [name](): string { - return "ipPort" - } - - static get [paramDesc](): ParamDesc { - return [ - ["ipv4", "number", "int"], - ["port", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.ipv4, "number", "int"], - [this.port, "number", "int"], - ]; - } - - constructor(params: { ipv4: number; port: number }) { - super(); - this.ipv4 = params.ipv4; - this.port = params.port; - } -} - -export class IpPortSecret_ extends _IpPort_ { - ipv4: number; - port: number; - secret: Uint8Array; - - protected get [id](): number { - return 0x37982646; - } - - static get [name](): string { - return "ipPortSecret" - } - - static get [paramDesc](): ParamDesc { - return [ - ["ipv4", "number", "int"], - ["port", "number", "int"], - ["secret", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.ipv4, "number", "int"], - [this.port, "number", "int"], - [this.secret, Uint8Array, "bytes"], - ]; - } - - constructor(params: { ipv4: number; port: number; secret: Uint8Array }) { - super(); - this.ipv4 = params.ipv4; - this.port = params.port; - this.secret = params.secret; - } -} - -export class AccessPointRule_ extends _AccessPointRule_ { - phone_prefix_rules: string; - dc_id: number; - ips: Array; - - protected get [id](): number { - return 0x4679B65F; - } - - static get [name](): string { - return "accessPointRule" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_prefix_rules", "string", "string"], - ["dc_id", "number", "int"], - ["ips", [_IpPort_], "vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_prefix_rules, "string", "string"], - [this.dc_id, "number", "int"], - [this.ips, [_IpPort_], "vector"], - ]; - } - - constructor(params: { phone_prefix_rules: string; dc_id: number; ips: Array }) { - super(); - this.phone_prefix_rules = params.phone_prefix_rules; - this.dc_id = params.dc_id; - this.ips = params.ips; - } -} - -export class help_ConfigSimple_ extends _help_ConfigSimple_ { - date: number; - expires: number; - rules: Array; - - protected get [id](): number { - return 0x5A592A6C; - } - - static get [name](): string { - return "help.configSimple" - } - - static get [paramDesc](): ParamDesc { - return [ - ["date", "number", "int"], - ["expires", "number", "int"], - ["rules", [_AccessPointRule_], "vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.date, "number", "int"], - [this.expires, "number", "int"], - [this.rules, [_AccessPointRule_], "vector"], - ]; - } - - constructor(params: { date: number; expires: number; rules: Array }) { - super(); - this.date = params.date; - this.expires = params.expires; - this.rules = params.rules; - } -} - -export class InputPeerPhotoFileLocationLegacy_ extends _InputFileLocation_ { - big?: true; - peer: enums.InputPeer; - volume_id: bigint; - local_id: number; - - protected get [id](): number { - return 0x27D69997; - } - - static get [name](): string { - return "inputPeerPhotoFileLocationLegacy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["big", "true", "flags.0?true"], - ["peer", _InputPeer_, "InputPeer"], - ["volume_id", "bigint", "long"], - ["local_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.big ?? null, "true", "flags.0?true"], - [this.peer, _InputPeer_, "InputPeer"], - [this.volume_id, "bigint", "long"], - [this.local_id, "number", "int"], - ]; - } - - constructor(params: { big?: true; peer: enums.InputPeer; volume_id: bigint; local_id: number }) { - super(); - this.big = params.big; - this.peer = params.peer; - this.volume_id = params.volume_id; - this.local_id = params.local_id; - } -} - -export class InputStickerSetThumbLegacy_ extends _InputFileLocation_ { - stickerset: enums.InputStickerSet; - volume_id: bigint; - local_id: number; - - protected get [id](): number { - return 0x0DBAEAE9; - } - - static get [name](): string { - return "inputStickerSetThumbLegacy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", _InputStickerSet_, "InputStickerSet"], - ["volume_id", "bigint", "long"], - ["local_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, _InputStickerSet_, "InputStickerSet"], - [this.volume_id, "bigint", "long"], - [this.local_id, "number", "int"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; volume_id: bigint; local_id: number }) { - super(); - this.stickerset = params.stickerset; - this.volume_id = params.volume_id; - this.local_id = params.local_id; - } -} - -/** An empty constructor, no user or chat is defined. */ -export class InputPeerEmpty_ extends _InputPeer_ { - protected get [id](): number { - return 0x7F3B18EA; - } - - static get [name](): string { - return "inputPeerEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines the current user. */ -export class InputPeerSelf_ extends _InputPeer_ { - protected get [id](): number { - return 0x7DA07EC9; - } - - static get [name](): string { - return "inputPeerSelf" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines a chat for further interaction. */ -export class InputPeerChat_ extends _InputPeer_ { - /** Chat identifier */ - chat_id: bigint; - - protected get [id](): number { - return 0x35A95CB9; - } - - static get [name](): string { - return "inputPeerChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: bigint }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** Defines a user for further interaction. */ -export class InputPeerUser_ extends _InputPeer_ { - /** User identifier */ - user_id: bigint; - /** **access\_hash** value from the [user](https://core.telegram.org/constructor/user) constructor */ - access_hash: bigint; - - protected get [id](): number { - return 0xDDE8A54C; - } - - static get [name](): string { - return "inputPeerUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint; access_hash: bigint }) { - super(); - this.user_id = params.user_id; - this.access_hash = params.access_hash; - } -} - -/** Defines a channel for further interaction. */ -export class InputPeerChannel_ extends _InputPeer_ { - /** Channel identifier */ - channel_id: bigint; - /** **access\_hash** value from the [channel](https://core.telegram.org/constructor/channel) constructor */ - access_hash: bigint; - - protected get [id](): number { - return 0x27BCBBFC; - } - - static get [name](): string { - return "inputPeerChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { channel_id: bigint; access_hash: bigint }) { - super(); - this.channel_id = params.channel_id; - this.access_hash = params.access_hash; - } -} - -/** Defines a [min](https://core.telegram.org/api/min) user that was seen in a certain message of a certain chat. */ -export class InputPeerUserFromMessage_ extends _InputPeer_ { - /** The chat where the user was seen */ - peer: enums.InputPeer; - /** The message ID */ - msg_id: number; - /** The identifier of the user that was seen */ - user_id: bigint; - - protected get [id](): number { - return 0xA87B0A1C; - } - - static get [name](): string { - return "inputPeerUserFromMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["msg_id", "number", "int"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.msg_id, "number", "int"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; user_id: bigint }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.user_id = params.user_id; - } -} - -/** Defines a [min](https://core.telegram.org/api/min) channel that was seen in a certain message of a certain chat. */ -export class InputPeerChannelFromMessage_ extends _InputPeer_ { - /** The chat where the channel's message was seen */ - peer: enums.InputPeer; - /** The message ID */ - msg_id: number; - /** The identifier of the channel that was seen */ - channel_id: bigint; - - protected get [id](): number { - return 0xBD2A0840; - } - - static get [name](): string { - return "inputPeerChannelFromMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["msg_id", "number", "int"], - ["channel_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.msg_id, "number", "int"], - [this.channel_id, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; channel_id: bigint }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.channel_id = params.channel_id; - } -} - -/** Empty constructor, does not define a user. */ -export class InputUserEmpty_ extends _InputUser_ { - protected get [id](): number { - return 0xB98886CF; - } - - static get [name](): string { - return "inputUserEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines the current user. */ -export class InputUserSelf_ extends _InputUser_ { - protected get [id](): number { - return 0xF7C1B13F; - } - - static get [name](): string { - return "inputUserSelf" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines a user for further interaction. */ -export class InputUser_ extends _InputUser_ { - /** User identifier */ - user_id: bigint; - /** **access\_hash** value from the [user](https://core.telegram.org/constructor/user) constructor */ - access_hash: bigint; - - protected get [id](): number { - return 0xF21158C6; - } - - static get [name](): string { - return "inputUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint; access_hash: bigint }) { - super(); - this.user_id = params.user_id; - this.access_hash = params.access_hash; - } -} - -/** Defines a [min](https://core.telegram.org/api/min) user that was seen in a certain message of a certain chat. */ -export class InputUserFromMessage_ extends _InputUser_ { - /** The chat where the user was seen */ - peer: enums.InputPeer; - /** The message ID */ - msg_id: number; - /** The identifier of the user that was seen */ - user_id: bigint; - - protected get [id](): number { - return 0x1DA448E2; - } - - static get [name](): string { - return "inputUserFromMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["msg_id", "number", "int"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.msg_id, "number", "int"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; user_id: bigint }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.user_id = params.user_id; - } -} - -/** Phone contact. */ -export class InputPhoneContact_ extends _InputContact_ { - /** An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using [contacts.importContacts](https://core.telegram.org/method/contacts.importContacts), in order to retry importing only the contacts that weren't imported successfully, according to the client\_ids returned in [contacts.importedContacts](https://core.telegram.org/constructor/contacts.importedContacts).`retry_contacts`. */ - client_id: bigint; - /** Phone number */ - phone: string; - /** Contact's first name */ - first_name: string; - /** Contact's last name */ - last_name: string; - - protected get [id](): number { - return 0xF392B7F4; - } - - static get [name](): string { - return "inputPhoneContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["client_id", "bigint", "long"], - ["phone", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.client_id, "bigint", "long"], - [this.phone, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - ]; - } - - constructor(params: { client_id: bigint; phone: string; first_name: string; last_name: string }) { - super(); - this.client_id = params.client_id; - this.phone = params.phone; - this.first_name = params.first_name; - this.last_name = params.last_name; - } -} - -/** Defines a file saved in parts using the method [upload.saveFilePart](https://core.telegram.org/method/upload.saveFilePart). */ -export class InputFile_ extends _InputFile_ { - /** Random file identifier created by the client */ - id: bigint; - /** Number of parts saved */ - parts: number; - /** Full name of the file */ - name: string; - /** In case the file's [md5-hash](https://en.wikipedia.org/wiki/MD5#MD5_hashes) was passed, contents of the file will be checked prior to use */ - md5_checksum: string; - - protected get [id](): number { - return 0xF52FF27F; - } - - static get [name](): string { - return "inputFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["parts", "number", "int"], - ["name", "string", "string"], - ["md5_checksum", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.parts, "number", "int"], - [this.name, "string", "string"], - [this.md5_checksum, "string", "string"], - ]; - } - - constructor(params: { id: bigint; parts: number; name: string; md5_checksum: string }) { - super(); - this.id = params.id; - this.parts = params.parts; - this.name = params.name; - this.md5_checksum = params.md5_checksum; - } -} - -/** Assigns a big file (over 10 MB in size), saved in part using the method [upload.saveBigFilePart](https://core.telegram.org/method/upload.saveBigFilePart). */ -export class InputFileBig_ extends _InputFile_ { - /** Random file id, created by the client */ - id: bigint; - /** Number of parts saved */ - parts: number; - /** Full file name */ - name: string; - - protected get [id](): number { - return 0xFA4F0BB5; - } - - static get [name](): string { - return "inputFileBig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["parts", "number", "int"], - ["name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.parts, "number", "int"], - [this.name, "string", "string"], - ]; - } - - constructor(params: { id: bigint; parts: number; name: string }) { - super(); - this.id = params.id; - this.parts = params.parts; - this.name = params.name; - } -} - -/** Empty media content of a message. */ -export class InputMediaEmpty_ extends _InputMedia_ { - protected get [id](): number { - return 0x9664F57F; - } - - static get [name](): string { - return "inputMediaEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Photo */ -export class InputMediaUploadedPhoto_ extends _InputMedia_ { - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** The [uploaded file](https://core.telegram.org/api/files) */ - file: enums.InputFile; - /** Attached mask stickers */ - stickers?: Array; - /** Time to live in seconds of self-destructing photo */ - ttl_seconds?: number; - - protected get [id](): number { - return 0x1E287D04; - } - - static get [name](): string { - return "inputMediaUploadedPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["spoiler", "true", "flags.2?true"], - ["file", _InputFile_, "InputFile"], - ["stickers", [_InputDocument_], "flags.0?Vector"], - ["ttl_seconds", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.spoiler ?? null, "true", "flags.2?true"], - [this.file, _InputFile_, "InputFile"], - [this.stickers ?? null, [_InputDocument_], "flags.0?Vector"], - [this.ttl_seconds ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { spoiler?: true; file: enums.InputFile; stickers?: Array; ttl_seconds?: number }) { - super(); - this.spoiler = params.spoiler; - this.file = params.file; - this.stickers = params.stickers; - this.ttl_seconds = params.ttl_seconds; - } -} - -/** Forwarded photo */ -export class InputMediaPhoto_ extends _InputMedia_ { - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** Photo to be forwarded */ - id: enums.InputPhoto; - /** Time to live in seconds of self-destructing photo */ - ttl_seconds?: number; - - protected get [id](): number { - return 0xB3BA0635; - } - - static get [name](): string { - return "inputMediaPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["spoiler", "true", "flags.1?true"], - ["id", _InputPhoto_, "InputPhoto"], - ["ttl_seconds", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.spoiler ?? null, "true", "flags.1?true"], - [this.id, _InputPhoto_, "InputPhoto"], - [this.ttl_seconds ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { spoiler?: true; id: enums.InputPhoto; ttl_seconds?: number }) { - super(); - this.spoiler = params.spoiler; - this.id = params.id; - this.ttl_seconds = params.ttl_seconds; - } -} - -/** Map. */ -export class InputMediaGeoPoint_ extends _InputMedia_ { - /** GeoPoint */ - geo_point: enums.InputGeoPoint; - - protected get [id](): number { - return 0xF9C44144; - } - - static get [name](): string { - return "inputMediaGeoPoint" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo_point", _InputGeoPoint_, "InputGeoPoint"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo_point, _InputGeoPoint_, "InputGeoPoint"], - ]; - } - - constructor(params: { geo_point: enums.InputGeoPoint }) { - super(); - this.geo_point = params.geo_point; - } -} - -/** Phone book contact */ -export class InputMediaContact_ extends _InputMedia_ { - /** Phone number */ - phone_number: string; - /** Contact's first name */ - first_name: string; - /** Contact's last name */ - last_name: string; - /** Contact vcard */ - vcard: string; - - protected get [id](): number { - return 0xF8AB7DFB; - } - - static get [name](): string { - return "inputMediaContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["vcard", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.vcard, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; first_name: string; last_name: string; vcard: string }) { - super(); - this.phone_number = params.phone_number; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.vcard = params.vcard; - } -} - -/** New document */ -export class InputMediaUploadedDocument_ extends _InputMedia_ { - /** Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) */ - nosound_video?: true; - /** Force the media file to be uploaded as document */ - force_file?: true; - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** The [uploaded file](https://core.telegram.org/api/files) */ - file: enums.InputFile; - /** Thumbnail of the document, uploaded as for the file */ - thumb?: enums.InputFile; - /** MIME type of document */ - mime_type: string; - /** Attributes that specify the type of the document (video, audio, voice, sticker, etc.) */ - attributes: Array; - /** Attached stickers */ - stickers?: Array; - /** Time to live in seconds of self-destructing document */ - ttl_seconds?: number; - - protected get [id](): number { - return 0x5B38C6C1; - } - - static get [name](): string { - return "inputMediaUploadedDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["nosound_video", "true", "flags.3?true"], - ["force_file", "true", "flags.4?true"], - ["spoiler", "true", "flags.5?true"], - ["file", _InputFile_, "InputFile"], - ["thumb", _InputFile_, "flags.2?InputFile"], - ["mime_type", "string", "string"], - ["attributes", [_DocumentAttribute_], "Vector"], - ["stickers", [_InputDocument_], "flags.0?Vector"], - ["ttl_seconds", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.nosound_video ?? null, "true", "flags.3?true"], - [this.force_file ?? null, "true", "flags.4?true"], - [this.spoiler ?? null, "true", "flags.5?true"], - [this.file, _InputFile_, "InputFile"], - [this.thumb ?? null, _InputFile_, "flags.2?InputFile"], - [this.mime_type, "string", "string"], - [this.attributes, [_DocumentAttribute_], "Vector"], - [this.stickers ?? null, [_InputDocument_], "flags.0?Vector"], - [this.ttl_seconds ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { nosound_video?: true; force_file?: true; spoiler?: true; file: enums.InputFile; thumb?: enums.InputFile; mime_type: string; attributes: Array; stickers?: Array; ttl_seconds?: number }) { - super(); - this.nosound_video = params.nosound_video; - this.force_file = params.force_file; - this.spoiler = params.spoiler; - this.file = params.file; - this.thumb = params.thumb; - this.mime_type = params.mime_type; - this.attributes = params.attributes; - this.stickers = params.stickers; - this.ttl_seconds = params.ttl_seconds; - } -} - -/** Forwarded document */ -export class InputMediaDocument_ extends _InputMedia_ { - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** The document to be forwarded. */ - id: enums.InputDocument; - /** Time to live of self-destructing document */ - ttl_seconds?: number; - /** Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance. */ - query?: string; - - protected get [id](): number { - return 0x33473058; - } - - static get [name](): string { - return "inputMediaDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["spoiler", "true", "flags.2?true"], - ["id", _InputDocument_, "InputDocument"], - ["ttl_seconds", "number", "flags.0?int"], - ["query", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.spoiler ?? null, "true", "flags.2?true"], - [this.id, _InputDocument_, "InputDocument"], - [this.ttl_seconds ?? null, "number", "flags.0?int"], - [this.query ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { spoiler?: true; id: enums.InputDocument; ttl_seconds?: number; query?: string }) { - super(); - this.spoiler = params.spoiler; - this.id = params.id; - this.ttl_seconds = params.ttl_seconds; - this.query = params.query; - } -} - -/** Can be used to send a venue geolocation. */ -export class InputMediaVenue_ extends _InputMedia_ { - /** Geolocation */ - geo_point: enums.InputGeoPoint; - /** Venue name */ - title: string; - /** Physical address of the venue */ - address: string; - /** Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported */ - provider: string; - /** Venue ID in the provider's database */ - venue_id: string; - /** Venue type in the provider's database */ - venue_type: string; - - protected get [id](): number { - return 0xC13D1C11; - } - - static get [name](): string { - return "inputMediaVenue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo_point", _InputGeoPoint_, "InputGeoPoint"], - ["title", "string", "string"], - ["address", "string", "string"], - ["provider", "string", "string"], - ["venue_id", "string", "string"], - ["venue_type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo_point, _InputGeoPoint_, "InputGeoPoint"], - [this.title, "string", "string"], - [this.address, "string", "string"], - [this.provider, "string", "string"], - [this.venue_id, "string", "string"], - [this.venue_type, "string", "string"], - ]; - } - - constructor(params: { geo_point: enums.InputGeoPoint; title: string; address: string; provider: string; venue_id: string; venue_type: string }) { - super(); - this.geo_point = params.geo_point; - this.title = params.title; - this.address = params.address; - this.provider = params.provider; - this.venue_id = params.venue_id; - this.venue_type = params.venue_type; - } -} - -/** New photo that will be uploaded by the server using the specified URL */ -export class InputMediaPhotoExternal_ extends _InputMedia_ { - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** URL of the photo */ - url: string; - /** Self-destruct time to live of photo */ - ttl_seconds?: number; - - protected get [id](): number { - return 0xE5BBFE1A; - } - - static get [name](): string { - return "inputMediaPhotoExternal" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["spoiler", "true", "flags.1?true"], - ["url", "string", "string"], - ["ttl_seconds", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.spoiler ?? null, "true", "flags.1?true"], - [this.url, "string", "string"], - [this.ttl_seconds ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { spoiler?: true; url: string; ttl_seconds?: number }) { - super(); - this.spoiler = params.spoiler; - this.url = params.url; - this.ttl_seconds = params.ttl_seconds; - } -} - -/** Document that will be downloaded by the telegram servers */ -export class InputMediaDocumentExternal_ extends _InputMedia_ { - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** URL of the document */ - url: string; - /** Self-destruct time to live of document */ - ttl_seconds?: number; - - protected get [id](): number { - return 0xFB52DC99; - } - - static get [name](): string { - return "inputMediaDocumentExternal" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["spoiler", "true", "flags.1?true"], - ["url", "string", "string"], - ["ttl_seconds", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.spoiler ?? null, "true", "flags.1?true"], - [this.url, "string", "string"], - [this.ttl_seconds ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { spoiler?: true; url: string; ttl_seconds?: number }) { - super(); - this.spoiler = params.spoiler; - this.url = params.url; - this.ttl_seconds = params.ttl_seconds; - } -} - -/** A game */ -export class InputMediaGame_ extends _InputMedia_ { - /** The game to forward */ - id: enums.InputGame; - - protected get [id](): number { - return 0xD33F43F3; - } - - static get [name](): string { - return "inputMediaGame" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", _InputGame_, "InputGame"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, _InputGame_, "InputGame"], - ]; - } - - constructor(params: { id: enums.InputGame }) { - super(); - this.id = params.id; - } -} - -/** Generated invoice of a [bot payment](https://core.telegram.org/bots/payments) */ -export class InputMediaInvoice_ extends _InputMedia_ { - /** Product name, 1-32 characters */ - title: string; - /** Product description, 1-255 characters */ - description: string; - /** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. */ - photo?: enums.InputWebDocument; - /** The actual invoice */ - invoice: enums.Invoice; - /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */ - payload: Uint8Array; - /** Payments provider token, obtained via [Botfather](https://t.me/botfather) */ - provider: string; - /** JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. */ - provider_data: enums.DataJSON; - /** Unique [bot deep links start parameter](https://core.telegram.org/api/links#bot-links). If present, forwarded copies of the sent message will have a URL button with a [deep link](https://core.telegram.org/api/links#bot-links) to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. */ - start_param?: string; - /** Extended media */ - extended_media?: enums.InputMedia; - - protected get [id](): number { - return 0x8EB5A6D5; - } - - static get [name](): string { - return "inputMediaInvoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _InputWebDocument_, "flags.0?InputWebDocument"], - ["invoice", _Invoice_, "Invoice"], - ["payload", Uint8Array, "bytes"], - ["provider", "string", "string"], - ["provider_data", _DataJSON_, "DataJSON"], - ["start_param", "string", "flags.1?string"], - ["extended_media", _InputMedia_, "flags.2?InputMedia"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo ?? null, _InputWebDocument_, "flags.0?InputWebDocument"], - [this.invoice, _Invoice_, "Invoice"], - [this.payload, Uint8Array, "bytes"], - [this.provider, "string", "string"], - [this.provider_data, _DataJSON_, "DataJSON"], - [this.start_param ?? null, "string", "flags.1?string"], - [this.extended_media ?? null, _InputMedia_, "flags.2?InputMedia"], - ]; - } - - constructor(params: { title: string; description: string; photo?: enums.InputWebDocument; invoice: enums.Invoice; payload: Uint8Array; provider: string; provider_data: enums.DataJSON; start_param?: string; extended_media?: enums.InputMedia }) { - super(); - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.invoice = params.invoice; - this.payload = params.payload; - this.provider = params.provider; - this.provider_data = params.provider_data; - this.start_param = params.start_param; - this.extended_media = params.extended_media; - } -} - -/** [Live geolocation](https://core.telegram.org/api/live-location) */ -export class InputMediaGeoLive_ extends _InputMedia_ { - /** Whether sending of the geolocation was stopped */ - stopped?: true; - /** Current geolocation */ - geo_point: enums.InputGeoPoint; - /** For [live locations](https://core.telegram.org/api/live-location), a direction in which the location moves, in degrees; 1-360. */ - heading?: number; - /** Validity period of the current location */ - period?: number; - /** For [live locations](https://core.telegram.org/api/live-location), a maximum distance to another chat member for proximity alerts, in meters (0-100000) */ - proximity_notification_radius?: number; - - protected get [id](): number { - return 0x971FA843; - } - - static get [name](): string { - return "inputMediaGeoLive" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["stopped", "true", "flags.0?true"], - ["geo_point", _InputGeoPoint_, "InputGeoPoint"], - ["heading", "number", "flags.2?int"], - ["period", "number", "flags.1?int"], - ["proximity_notification_radius", "number", "flags.3?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.stopped ?? null, "true", "flags.0?true"], - [this.geo_point, _InputGeoPoint_, "InputGeoPoint"], - [this.heading ?? null, "number", "flags.2?int"], - [this.period ?? null, "number", "flags.1?int"], - [this.proximity_notification_radius ?? null, "number", "flags.3?int"], - ]; - } - - constructor(params: { stopped?: true; geo_point: enums.InputGeoPoint; heading?: number; period?: number; proximity_notification_radius?: number }) { - super(); - this.stopped = params.stopped; - this.geo_point = params.geo_point; - this.heading = params.heading; - this.period = params.period; - this.proximity_notification_radius = params.proximity_notification_radius; - } -} - -/** A poll */ -export class InputMediaPoll_ extends _InputMedia_ { - /** The poll to send */ - poll: enums.Poll; - /** Correct answer IDs (for quiz polls) */ - correct_answers?: Array; - /** Explanation of quiz solution */ - solution?: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - solution_entities?: Array; - - protected get [id](): number { - return 0x0F94E5F1; - } - - static get [name](): string { - return "inputMediaPoll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["poll", _Poll_, "Poll"], - ["correct_answers", [Uint8Array], "flags.0?Vector"], - ["solution", "string", "flags.1?string"], - ["solution_entities", [_MessageEntity_], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.poll, _Poll_, "Poll"], - [this.correct_answers ?? null, [Uint8Array], "flags.0?Vector"], - [this.solution ?? null, "string", "flags.1?string"], - [this.solution_entities ?? null, [_MessageEntity_], "flags.1?Vector"], - ]; - } - - constructor(params: { poll: enums.Poll; correct_answers?: Array; solution?: string; solution_entities?: Array }) { - super(); - this.poll = params.poll; - this.correct_answers = params.correct_answers; - this.solution = params.solution; - this.solution_entities = params.solution_entities; - } -} - -/** Send a [dice-based animated sticker](https://core.telegram.org/api/dice) */ -export class InputMediaDice_ extends _InputMedia_ { - /** The emoji, for now ![🏀](//telegram.org/img/emoji/40/F09F8F80.png), ![🎲](//telegram.org/img/emoji/40/F09F8EB2.png) and ![🎯](//telegram.org/img/emoji/40/F09F8EAF.png) are supported */ - emoticon: string; - - protected get [id](): number { - return 0xE66FBF7B; - } - - static get [name](): string { - return "inputMediaDice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { emoticon: string }) { - super(); - this.emoticon = params.emoticon; - } -} - -/** Forwarded story */ -export class InputMediaStory_ extends _InputMedia_ { - /** Peer where the story was posted */ - peer: enums.InputPeer; - /** Story ID */ - id: number; - - protected get [id](): number { - return 0x89FDD778; - } - - static get [name](): string { - return "inputMediaStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message. */ -export class InputMediaWebPage_ extends _InputMedia_ { - /** If set, specifies that a large media preview should be used. */ - force_large_media?: true; - /** If set, specifies that a small media preview should be used. */ - force_small_media?: true; - /** If **not** set, a `WEBPAGE_NOT_FOUND` RPC error will be emitted if a webpage preview cannot be generated for the specified `url`; otherwise, no error will be emitted (unless the provided message is also empty, in which case a `MESSAGE_EMPTY` will be emitted, instead). */ - optional?: true; - /** The URL to use for the link preview. */ - url: string; - - protected get [id](): number { - return 0xC21B8849; - } - - static get [name](): string { - return "inputMediaWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["force_large_media", "true", "flags.0?true"], - ["force_small_media", "true", "flags.1?true"], - ["optional", "true", "flags.2?true"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.force_large_media ?? null, "true", "flags.0?true"], - [this.force_small_media ?? null, "true", "flags.1?true"], - [this.optional ?? null, "true", "flags.2?true"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { force_large_media?: true; force_small_media?: true; optional?: true; url: string }) { - super(); - this.force_large_media = params.force_large_media; - this.force_small_media = params.force_small_media; - this.optional = params.optional; - this.url = params.url; - } -} - -/** Empty constructor, remove group photo. */ -export class InputChatPhotoEmpty_ extends _InputChatPhoto_ { - protected get [id](): number { - return 0x1CA48F57; - } - - static get [name](): string { - return "inputChatPhotoEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** New photo to be set as group profile photo. */ -export class InputChatUploadedPhoto_ extends _InputChatPhoto_ { - /** File saved in parts using the method [upload.saveFilePart](https://core.telegram.org/method/upload.saveFilePart) */ - file?: enums.InputFile; - /** Square video for animated profile picture */ - video?: enums.InputFile; - /** Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if `video` or `video_emoji_markup` is set. */ - video_start_ts?: number; - /** Animated sticker profile picture, must contain either a [videoSizeEmojiMarkup](https://core.telegram.org/constructor/videoSizeEmojiMarkup) or a [videoSizeStickerMarkup](https://core.telegram.org/constructor/videoSizeStickerMarkup) constructor. */ - video_emoji_markup?: enums.VideoSize; - - protected get [id](): number { - return 0xBDCDAEC0; - } - - static get [name](): string { - return "inputChatUploadedPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["file", _InputFile_, "flags.0?InputFile"], - ["video", _InputFile_, "flags.1?InputFile"], - ["video_start_ts", "number", "flags.2?double"], - ["video_emoji_markup", _VideoSize_, "flags.3?VideoSize"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.file ?? null, _InputFile_, "flags.0?InputFile"], - [this.video ?? null, _InputFile_, "flags.1?InputFile"], - [this.video_start_ts ?? null, "number", "flags.2?double"], - [this.video_emoji_markup ?? null, _VideoSize_, "flags.3?VideoSize"], - ]; - } - - constructor(params?: { file?: enums.InputFile; video?: enums.InputFile; video_start_ts?: number; video_emoji_markup?: enums.VideoSize }) { - super(); - this.file = params?.file; - this.video = params?.video; - this.video_start_ts = params?.video_start_ts; - this.video_emoji_markup = params?.video_emoji_markup; - } -} - -/** Existing photo to be set as a chat profile photo. */ -export class InputChatPhoto_ extends _InputChatPhoto_ { - /** Existing photo */ - id: enums.InputPhoto; - - protected get [id](): number { - return 0x8953AD37; - } - - static get [name](): string { - return "inputChatPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", _InputPhoto_, "InputPhoto"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, _InputPhoto_, "InputPhoto"], - ]; - } - - constructor(params: { id: enums.InputPhoto }) { - super(); - this.id = params.id; - } -} - -/** Empty GeoPoint constructor. */ -export class InputGeoPointEmpty_ extends _InputGeoPoint_ { - protected get [id](): number { - return 0xE4C123D6; - } - - static get [name](): string { - return "inputGeoPointEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines a GeoPoint by its coordinates. */ -export class InputGeoPoint_ extends _InputGeoPoint_ { - /** Latitude */ - lat: number; - /** Longitude */ - long: number; - /** The estimated horizontal accuracy of the location, in meters; as defined by the sender. */ - accuracy_radius?: number; - - protected get [id](): number { - return 0x48222FAF; - } - - static get [name](): string { - return "inputGeoPoint" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["lat", "number", "double"], - ["long", "number", "double"], - ["accuracy_radius", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.lat, "number", "double"], - [this.long, "number", "double"], - [this.accuracy_radius ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { lat: number; long: number; accuracy_radius?: number }) { - super(); - this.lat = params.lat; - this.long = params.long; - this.accuracy_radius = params.accuracy_radius; - } -} - -/** Empty constructor. */ -export class InputPhotoEmpty_ extends _InputPhoto_ { - protected get [id](): number { - return 0x1CD7BF0D; - } - - static get [name](): string { - return "inputPhotoEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines a photo for further interaction. */ -export class InputPhoto_ extends _InputPhoto_ { - /** Photo identifier */ - id: bigint; - /** **access\_hash** value from the [photo](https://core.telegram.org/constructor/photo) constructor */ - access_hash: bigint; - /** [File reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - - protected get [id](): number { - return 0x3BB3B94A; - } - - static get [name](): string { - return "inputPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; file_reference: Uint8Array }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - } -} - -/** DEPRECATED location of a photo */ -export class InputFileLocation_ extends _InputFileLocation_ { - /** Server volume */ - volume_id: bigint; - /** File identifier */ - local_id: number; - /** Check sum to access the file */ - secret: bigint; - /** [File reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - - protected get [id](): number { - return 0xDFDAABE1; - } - - static get [name](): string { - return "inputFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["volume_id", "bigint", "long"], - ["local_id", "number", "int"], - ["secret", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.volume_id, "bigint", "long"], - [this.local_id, "number", "int"], - [this.secret, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - ]; - } - - constructor(params: { volume_id: bigint; local_id: number; secret: bigint; file_reference: Uint8Array }) { - super(); - this.volume_id = params.volume_id; - this.local_id = params.local_id; - this.secret = params.secret; - this.file_reference = params.file_reference; - } -} - -/** Location of encrypted secret chat file. */ -export class InputEncryptedFileLocation_ extends _InputFileLocation_ { - /** File ID, **id** parameter value from [encryptedFile](https://core.telegram.org/constructor/encryptedFile) */ - id: bigint; - /** Checksum, **access\_hash** parameter value from [encryptedFile](https://core.telegram.org/constructor/encryptedFile) */ - access_hash: bigint; - - protected get [id](): number { - return 0xF5235D55; - } - - static get [name](): string { - return "inputEncryptedFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Document location (video, voice, audio, basically every type except photo) */ -export class InputDocumentFileLocation_ extends _InputFileLocation_ { - /** Document ID */ - id: bigint; - /** **access\_hash** parameter from the [document](https://core.telegram.org/constructor/document) constructor */ - access_hash: bigint; - /** [File reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - /** Thumbnail size to download the thumbnail */ - thumb_size: string; - - protected get [id](): number { - return 0xBAD07584; - } - - static get [name](): string { - return "inputDocumentFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ["thumb_size", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - [this.thumb_size, "string", "string"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; file_reference: Uint8Array; thumb_size: string }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - this.thumb_size = params.thumb_size; - } -} - -/** Location of encrypted telegram [passport](https://core.telegram.org/passport) file. */ -export class InputSecureFileLocation_ extends _InputFileLocation_ { - /** File ID, **id** parameter value from [secureFile](https://core.telegram.org/constructor/secureFile) */ - id: bigint; - /** Checksum, **access\_hash** parameter value from [secureFile](https://core.telegram.org/constructor/secureFile) */ - access_hash: bigint; - - protected get [id](): number { - return 0xCBC7EE28; - } - - static get [name](): string { - return "inputSecureFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Used to download a JSON file that will contain all personal data related to features that do not have a specialized [takeout method](https://core.telegram.org/api/takeout) yet, see [here »](https://core.telegram.org/api/takeout) for more info on the takeout API. */ -export class InputTakeoutFileLocation_ extends _InputFileLocation_ { - protected get [id](): number { - return 0x29BE5899; - } - - static get [name](): string { - return "inputTakeoutFileLocation" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Use this object to download a photo with [upload.getFile](https://core.telegram.org/method/upload.getFile) method */ -export class InputPhotoFileLocation_ extends _InputFileLocation_ { - /** Photo ID, obtained from the [photo](https://core.telegram.org/constructor/photo) object */ - id: bigint; - /** Photo's access hash, obtained from the [photo](https://core.telegram.org/constructor/photo) object */ - access_hash: bigint; - /** [File reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - /** The [PhotoSize](https://core.telegram.org/type/PhotoSize) to download: must be set to the `type` field of the desired PhotoSize object of the [photo](https://core.telegram.org/constructor/photo) */ - thumb_size: string; - - protected get [id](): number { - return 0x40181FFE; - } - - static get [name](): string { - return "inputPhotoFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ["thumb_size", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - [this.thumb_size, "string", "string"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; file_reference: Uint8Array; thumb_size: string }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - this.thumb_size = params.thumb_size; - } -} - -/** DEPRECATED legacy photo file location */ -export class InputPhotoLegacyFileLocation_ extends _InputFileLocation_ { - /** Photo ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** File reference */ - file_reference: Uint8Array; - /** Volume ID */ - volume_id: bigint; - /** Local ID */ - local_id: number; - /** Secret */ - secret: bigint; - - protected get [id](): number { - return 0xD83466F3; - } - - static get [name](): string { - return "inputPhotoLegacyFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ["volume_id", "bigint", "long"], - ["local_id", "number", "int"], - ["secret", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - [this.volume_id, "bigint", "long"], - [this.local_id, "number", "int"], - [this.secret, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; file_reference: Uint8Array; volume_id: bigint; local_id: number; secret: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - this.volume_id = params.volume_id; - this.local_id = params.local_id; - this.secret = params.secret; - } -} - -/** Location of profile photo of channel/group/supergroup/user */ -export class InputPeerPhotoFileLocation_ extends _InputFileLocation_ { - /** Whether to download the high-quality version of the picture */ - big?: true; - /** The peer whose profile picture should be downloaded */ - peer: enums.InputPeer; - /** Photo ID */ - photo_id: bigint; - - protected get [id](): number { - return 0x37257E99; - } - - static get [name](): string { - return "inputPeerPhotoFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["big", "true", "flags.0?true"], - ["peer", _InputPeer_, "InputPeer"], - ["photo_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.big ?? null, "true", "flags.0?true"], - [this.peer, _InputPeer_, "InputPeer"], - [this.photo_id, "bigint", "long"], - ]; - } - - constructor(params: { big?: true; peer: enums.InputPeer; photo_id: bigint }) { - super(); - this.big = params.big; - this.peer = params.peer; - this.photo_id = params.photo_id; - } -} - -/** Location of stickerset thumbnail (see [files](https://core.telegram.org/api/files)) */ -export class InputStickerSetThumb_ extends _InputFileLocation_ { - /** Sticker set */ - stickerset: enums.InputStickerSet; - /** Thumbnail version */ - thumb_version: number; - - protected get [id](): number { - return 0x9D84F3DB; - } - - static get [name](): string { - return "inputStickerSetThumb" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", _InputStickerSet_, "InputStickerSet"], - ["thumb_version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, _InputStickerSet_, "InputStickerSet"], - [this.thumb_version, "number", "int"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; thumb_version: number }) { - super(); - this.stickerset = params.stickerset; - this.thumb_version = params.thumb_version; - } -} - -/** Chunk of a livestream */ -export class InputGroupCallStream_ extends _InputFileLocation_ { - /** Livestream info */ - call: enums.InputGroupCall; - /** Timestamp in milliseconds */ - time_ms: bigint; - /** Specifies the duration of the video segment to fetch in milliseconds, by bitshifting `1000` to the right `scale` times: `duration_ms := 1000 >> scale` */ - scale: number; - /** Selected video channel */ - video_channel?: number; - /** Selected video quality (0 = lowest, 1 = medium, 2 = best) */ - video_quality?: number; - - protected get [id](): number { - return 0x0598A92A; - } - - static get [name](): string { - return "inputGroupCallStream" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["call", _InputGroupCall_, "InputGroupCall"], - ["time_ms", "bigint", "long"], - ["scale", "number", "int"], - ["video_channel", "number", "flags.0?int"], - ["video_quality", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.call, _InputGroupCall_, "InputGroupCall"], - [this.time_ms, "bigint", "long"], - [this.scale, "number", "int"], - [this.video_channel ?? null, "number", "flags.0?int"], - [this.video_quality ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; time_ms: bigint; scale: number; video_channel?: number; video_quality?: number }) { - super(); - this.call = params.call; - this.time_ms = params.time_ms; - this.scale = params.scale; - this.video_channel = params.video_channel; - this.video_quality = params.video_quality; - } -} - -/** Chat partner */ -export class PeerUser_ extends _Peer_ { - /** User identifier */ - user_id: bigint; - - protected get [id](): number { - return 0x59511722; - } - - static get [name](): string { - return "peerUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint }) { - super(); - this.user_id = params.user_id; - } -} - -/** Group. */ -export class PeerChat_ extends _Peer_ { - /** Group identifier */ - chat_id: bigint; - - protected get [id](): number { - return 0x36C6019A; - } - - static get [name](): string { - return "peerChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: bigint }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** Channel/supergroup */ -export class PeerChannel_ extends _Peer_ { - /** Channel ID */ - channel_id: bigint; - - protected get [id](): number { - return 0xA2A5371E; - } - - static get [name](): string { - return "peerChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - ]; - } - - constructor(params: { channel_id: bigint }) { - super(); - this.channel_id = params.channel_id; - } -} - -/** Unknown type. */ -export class storage_FileUnknown_ extends _storage_FileType_ { - protected get [id](): number { - return 0xAA963B05; - } - - static get [name](): string { - return "storage.fileUnknown" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Part of a bigger file. */ -export class storage_FilePartial_ extends _storage_FileType_ { - protected get [id](): number { - return 0x40BC6F52; - } - - static get [name](): string { - return "storage.filePartial" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** JPEG image. MIME type: `image/jpeg`. */ -export class storage_FileJpeg_ extends _storage_FileType_ { - protected get [id](): number { - return 0x007EFE0E; - } - - static get [name](): string { - return "storage.fileJpeg" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** GIF image. MIME type: `image/gif`. */ -export class storage_FileGif_ extends _storage_FileType_ { - protected get [id](): number { - return 0xCAE1AADF; - } - - static get [name](): string { - return "storage.fileGif" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** PNG image. MIME type: `image/png`. */ -export class storage_FilePng_ extends _storage_FileType_ { - protected get [id](): number { - return 0x0A4F63C0; - } - - static get [name](): string { - return "storage.filePng" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** PDF document image. MIME type: `application/pdf`. */ -export class storage_FilePdf_ extends _storage_FileType_ { - protected get [id](): number { - return 0xAE1E508D; - } - - static get [name](): string { - return "storage.filePdf" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Mp3 audio. MIME type: `audio/mpeg`. */ -export class storage_FileMp3_ extends _storage_FileType_ { - protected get [id](): number { - return 0x528A0677; - } - - static get [name](): string { - return "storage.fileMp3" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Quicktime video. MIME type: `video/quicktime`. */ -export class storage_FileMov_ extends _storage_FileType_ { - protected get [id](): number { - return 0x4B09EBBC; - } - - static get [name](): string { - return "storage.fileMov" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** MPEG-4 video. MIME type: `video/mp4`. */ -export class storage_FileMp4_ extends _storage_FileType_ { - protected get [id](): number { - return 0xB3CEA0E4; - } - - static get [name](): string { - return "storage.fileMp4" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** WEBP image. MIME type: `image/webp`. */ -export class storage_FileWebp_ extends _storage_FileType_ { - protected get [id](): number { - return 0x1081464C; - } - - static get [name](): string { - return "storage.fileWebp" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Empty constructor, non-existent user. */ -export class UserEmpty_ extends _User_ { - /** User identifier or `0` */ - id: bigint; - - protected get [id](): number { - return 0xD3BC4B7A; - } - - static get [name](): string { - return "userEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Indicates info about a certain user */ -export class User_ extends _User_ { - /** Whether this user indicates the currently logged in user */ - self?: true; - /** Whether this user is a contact */ - contact?: true; - /** Whether this user is a mutual contact */ - mutual_contact?: true; - /** Whether the account of this user was deleted */ - deleted?: true; - /** Is this user a bot? */ - bot?: true; - /** Can the bot see all messages in groups? */ - bot_chat_history?: true; - /** Can the bot be added to groups? */ - bot_nochats?: true; - /** Whether this user is verified */ - verified?: true; - /** Access to this user must be restricted for the reason specified in `restriction_reason` */ - restricted?: true; - /** See [min](https://core.telegram.org/api/min) */ - min?: true; - /** Whether the bot can request our geolocation in inline mode */ - bot_inline_geo?: true; - /** Whether this is an official support user */ - support?: true; - /** This may be a scam user */ - scam?: true; - /** If set, the profile picture for this user should be refetched */ - apply_min_photo?: true; - /** If set, this user was reported by many users as a fake or scam user: be careful when interacting with them. */ - fake?: true; - /** Whether this bot offers an [attachment menu web app](https://core.telegram.org/api/bots/attach) */ - bot_attach_menu?: true; - /** Whether this user is a Telegram Premium user */ - premium?: true; - /** Whether we installed the [attachment menu web app](https://core.telegram.org/api/bots/attach) offered by this bot */ - attach_menu_enabled?: true; - /** Whether we can edit the profile picture, name, about text and description of this bot because we own it. */ - bot_can_edit?: true; - /** Whether we marked this user as a [close friend, see here » for more info](https://core.telegram.org/api/privacy) */ - close_friend?: true; - /** Whether we have [hidden »](https://core.telegram.org/api/stories#hiding-stories-of-other-users) all active stories of this user. */ - stories_hidden?: true; - /** No stories from this user are visible. */ - stories_unavailable?: true; - contact_require_premium?: true; - bot_business?: true; - /** ID of the user */ - id: bigint; - /** Access hash of the user */ - access_hash?: bigint; - /** First name */ - first_name?: string; - /** Last name */ - last_name?: string; - /** Username */ - username?: string; - /** Phone number */ - phone?: string; - /** Profile picture of user */ - photo?: enums.UserProfilePhoto; - /** Online status of user */ - status?: enums.UserStatus; - /** Version of the [bot\_info field in userFull](https://core.telegram.org/constructor/userFull), incremented every time it changes */ - bot_info_version?: number; - /** Contains the reason why access to this user must be restricted. */ - restriction_reason?: Array; - /** Inline placeholder for this inline bot */ - bot_inline_placeholder?: string; - /** Language code of the user */ - lang_code?: string; - /** [Emoji status](https://core.telegram.org/api/emoji-status) */ - emoji_status?: enums.EmojiStatus; - /** Additional usernames */ - usernames?: Array; - /** ID of the maximum read [story](https://core.telegram.org/api/stories). */ - stories_max_id?: number; - /** The user's [accent color](https://core.telegram.org/api/colors). */ - color?: enums.PeerColor; - /** The user's [profile color](https://core.telegram.org/api/colors). */ - profile_color?: enums.PeerColor; - - protected get [id](): number { - return 0x215C4438; - } - - static get [name](): string { - return "user" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["self", "true", "flags.10?true"], - ["contact", "true", "flags.11?true"], - ["mutual_contact", "true", "flags.12?true"], - ["deleted", "true", "flags.13?true"], - ["bot", "true", "flags.14?true"], - ["bot_chat_history", "true", "flags.15?true"], - ["bot_nochats", "true", "flags.16?true"], - ["verified", "true", "flags.17?true"], - ["restricted", "true", "flags.18?true"], - ["min", "true", "flags.20?true"], - ["bot_inline_geo", "true", "flags.21?true"], - ["support", "true", "flags.23?true"], - ["scam", "true", "flags.24?true"], - ["apply_min_photo", "true", "flags.25?true"], - ["fake", "true", "flags.26?true"], - ["bot_attach_menu", "true", "flags.27?true"], - ["premium", "true", "flags.28?true"], - ["attach_menu_enabled", "true", "flags.29?true"], - ["flags2", flags, "#"], - ["bot_can_edit", "true", "flags2.1?true"], - ["close_friend", "true", "flags2.2?true"], - ["stories_hidden", "true", "flags2.3?true"], - ["stories_unavailable", "true", "flags2.4?true"], - ["contact_require_premium", "true", "flags2.10?true"], - ["bot_business", "true", "flags2.11?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "flags.0?long"], - ["first_name", "string", "flags.1?string"], - ["last_name", "string", "flags.2?string"], - ["username", "string", "flags.3?string"], - ["phone", "string", "flags.4?string"], - ["photo", _UserProfilePhoto_, "flags.5?UserProfilePhoto"], - ["status", _UserStatus_, "flags.6?UserStatus"], - ["bot_info_version", "number", "flags.14?int"], - ["restriction_reason", [_RestrictionReason_], "flags.18?Vector"], - ["bot_inline_placeholder", "string", "flags.19?string"], - ["lang_code", "string", "flags.22?string"], - ["emoji_status", _EmojiStatus_, "flags.30?EmojiStatus"], - ["usernames", [_Username_], "flags2.0?Vector"], - ["stories_max_id", "number", "flags2.5?int"], - ["color", _PeerColor_, "flags2.8?PeerColor"], - ["profile_color", _PeerColor_, "flags2.9?PeerColor"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.self ?? null, "true", "flags.10?true"], - [this.contact ?? null, "true", "flags.11?true"], - [this.mutual_contact ?? null, "true", "flags.12?true"], - [this.deleted ?? null, "true", "flags.13?true"], - [this.bot ?? null, "true", "flags.14?true"], - [this.bot_chat_history ?? null, "true", "flags.15?true"], - [this.bot_nochats ?? null, "true", "flags.16?true"], - [this.verified ?? null, "true", "flags.17?true"], - [this.restricted ?? null, "true", "flags.18?true"], - [this.min ?? null, "true", "flags.20?true"], - [this.bot_inline_geo ?? null, "true", "flags.21?true"], - [this.support ?? null, "true", "flags.23?true"], - [this.scam ?? null, "true", "flags.24?true"], - [this.apply_min_photo ?? null, "true", "flags.25?true"], - [this.fake ?? null, "true", "flags.26?true"], - [this.bot_attach_menu ?? null, "true", "flags.27?true"], - [this.premium ?? null, "true", "flags.28?true"], - [this.attach_menu_enabled ?? null, "true", "flags.29?true"], - ["flags2", flags, "#"], - [this.bot_can_edit ?? null, "true", "flags2.1?true"], - [this.close_friend ?? null, "true", "flags2.2?true"], - [this.stories_hidden ?? null, "true", "flags2.3?true"], - [this.stories_unavailable ?? null, "true", "flags2.4?true"], - [this.contact_require_premium ?? null, "true", "flags2.10?true"], - [this.bot_business ?? null, "true", "flags2.11?true"], - [this.id, "bigint", "long"], - [this.access_hash ?? null, "bigint", "flags.0?long"], - [this.first_name ?? null, "string", "flags.1?string"], - [this.last_name ?? null, "string", "flags.2?string"], - [this.username ?? null, "string", "flags.3?string"], - [this.phone ?? null, "string", "flags.4?string"], - [this.photo ?? null, _UserProfilePhoto_, "flags.5?UserProfilePhoto"], - [this.status ?? null, _UserStatus_, "flags.6?UserStatus"], - [this.bot_info_version ?? null, "number", "flags.14?int"], - [this.restriction_reason ?? null, [_RestrictionReason_], "flags.18?Vector"], - [this.bot_inline_placeholder ?? null, "string", "flags.19?string"], - [this.lang_code ?? null, "string", "flags.22?string"], - [this.emoji_status ?? null, _EmojiStatus_, "flags.30?EmojiStatus"], - [this.usernames ?? null, [_Username_], "flags2.0?Vector"], - [this.stories_max_id ?? null, "number", "flags2.5?int"], - [this.color ?? null, _PeerColor_, "flags2.8?PeerColor"], - [this.profile_color ?? null, _PeerColor_, "flags2.9?PeerColor"], - ]; - } - - constructor(params: { self?: true; contact?: true; mutual_contact?: true; deleted?: true; bot?: true; bot_chat_history?: true; bot_nochats?: true; verified?: true; restricted?: true; min?: true; bot_inline_geo?: true; support?: true; scam?: true; apply_min_photo?: true; fake?: true; bot_attach_menu?: true; premium?: true; attach_menu_enabled?: true; bot_can_edit?: true; close_friend?: true; stories_hidden?: true; stories_unavailable?: true; contact_require_premium?: true; bot_business?: true; id: bigint; access_hash?: bigint; first_name?: string; last_name?: string; username?: string; phone?: string; photo?: enums.UserProfilePhoto; status?: enums.UserStatus; bot_info_version?: number; restriction_reason?: Array; bot_inline_placeholder?: string; lang_code?: string; emoji_status?: enums.EmojiStatus; usernames?: Array; stories_max_id?: number; color?: enums.PeerColor; profile_color?: enums.PeerColor }) { - super(); - this.self = params.self; - this.contact = params.contact; - this.mutual_contact = params.mutual_contact; - this.deleted = params.deleted; - this.bot = params.bot; - this.bot_chat_history = params.bot_chat_history; - this.bot_nochats = params.bot_nochats; - this.verified = params.verified; - this.restricted = params.restricted; - this.min = params.min; - this.bot_inline_geo = params.bot_inline_geo; - this.support = params.support; - this.scam = params.scam; - this.apply_min_photo = params.apply_min_photo; - this.fake = params.fake; - this.bot_attach_menu = params.bot_attach_menu; - this.premium = params.premium; - this.attach_menu_enabled = params.attach_menu_enabled; - this.bot_can_edit = params.bot_can_edit; - this.close_friend = params.close_friend; - this.stories_hidden = params.stories_hidden; - this.stories_unavailable = params.stories_unavailable; - this.contact_require_premium = params.contact_require_premium; - this.bot_business = params.bot_business; - this.id = params.id; - this.access_hash = params.access_hash; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.username = params.username; - this.phone = params.phone; - this.photo = params.photo; - this.status = params.status; - this.bot_info_version = params.bot_info_version; - this.restriction_reason = params.restriction_reason; - this.bot_inline_placeholder = params.bot_inline_placeholder; - this.lang_code = params.lang_code; - this.emoji_status = params.emoji_status; - this.usernames = params.usernames; - this.stories_max_id = params.stories_max_id; - this.color = params.color; - this.profile_color = params.profile_color; - } -} - -/** Profile photo has not been set, or was hidden. */ -export class UserProfilePhotoEmpty_ extends _UserProfilePhoto_ { - protected get [id](): number { - return 0x4F11BAE1; - } - - static get [name](): string { - return "userProfilePhotoEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User profile photo. */ -export class UserProfilePhoto_ extends _UserProfilePhoto_ { - /** Whether an [animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) is available for this user */ - has_video?: true; - /** Whether this profile photo is only visible to us (i.e. it was set using [photos.uploadContactProfilePhoto](https://core.telegram.org/method/photos.uploadContactProfilePhoto)). */ - personal?: true; - /** Identifier of the respective photo */ - photo_id: bigint; - /** [Stripped thumbnail](https://core.telegram.org/api/files#stripped-thumbnails) */ - stripped_thumb?: Uint8Array; - /** DC ID where the photo is stored */ - dc_id: number; - - protected get [id](): number { - return 0x82D1F706; - } - - static get [name](): string { - return "userProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_video", "true", "flags.0?true"], - ["personal", "true", "flags.2?true"], - ["photo_id", "bigint", "long"], - ["stripped_thumb", Uint8Array, "flags.1?bytes"], - ["dc_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_video ?? null, "true", "flags.0?true"], - [this.personal ?? null, "true", "flags.2?true"], - [this.photo_id, "bigint", "long"], - [this.stripped_thumb ?? null, Uint8Array, "flags.1?bytes"], - [this.dc_id, "number", "int"], - ]; - } - - constructor(params: { has_video?: true; personal?: true; photo_id: bigint; stripped_thumb?: Uint8Array; dc_id: number }) { - super(); - this.has_video = params.has_video; - this.personal = params.personal; - this.photo_id = params.photo_id; - this.stripped_thumb = params.stripped_thumb; - this.dc_id = params.dc_id; - } -} - -/** User status has not been set yet. */ -export class UserStatusEmpty_ extends _UserStatus_ { - protected get [id](): number { - return 0x09D05049; - } - - static get [name](): string { - return "userStatusEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Online status of the user. */ -export class UserStatusOnline_ extends _UserStatus_ { - /** Time to expiration of the current online status */ - expires: number; - - protected get [id](): number { - return 0xEDB93949; - } - - static get [name](): string { - return "userStatusOnline" - } - - static get [paramDesc](): ParamDesc { - return [ - ["expires", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.expires, "number", "int"], - ]; - } - - constructor(params: { expires: number }) { - super(); - this.expires = params.expires; - } -} - -/** The user's offline status. */ -export class UserStatusOffline_ extends _UserStatus_ { - /** Time the user was last seen online */ - was_online: number; - - protected get [id](): number { - return 0x008C703F; - } - - static get [name](): string { - return "userStatusOffline" - } - - static get [paramDesc](): ParamDesc { - return [ - ["was_online", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.was_online, "number", "int"], - ]; - } - - constructor(params: { was_online: number }) { - super(); - this.was_online = params.was_online; - } -} - -/** Online status: last seen recently */ -export class UserStatusRecently_ extends _UserStatus_ { - by_me?: true; - - protected get [id](): number { - return 0x7B197DC8; - } - - static get [name](): string { - return "userStatusRecently" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["by_me", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.by_me ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { by_me?: true }) { - super(); - this.by_me = params?.by_me; - } -} - -/** Online status: last seen last week */ -export class UserStatusLastWeek_ extends _UserStatus_ { - by_me?: true; - - protected get [id](): number { - return 0x541A1D1A; - } - - static get [name](): string { - return "userStatusLastWeek" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["by_me", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.by_me ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { by_me?: true }) { - super(); - this.by_me = params?.by_me; - } -} - -/** Online status: last seen last month */ -export class UserStatusLastMonth_ extends _UserStatus_ { - by_me?: true; - - protected get [id](): number { - return 0x65899777; - } - - static get [name](): string { - return "userStatusLastMonth" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["by_me", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.by_me ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { by_me?: true }) { - super(); - this.by_me = params?.by_me; - } -} - -/** Empty constructor, group doesn't exist */ -export class ChatEmpty_ extends _Chat_ { - /** Group identifier */ - id: bigint; - - protected get [id](): number { - return 0x29562865; - } - - static get [name](): string { - return "chatEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Info about a group */ -export class Chat_ extends _Chat_ { - /** Whether the current user is the creator of the group */ - creator?: true; - /** Whether the current user has left the group */ - left?: true; - /** Whether the group was [migrated](https://core.telegram.org/api/channel) */ - deactivated?: true; - /** Whether a group call is currently active */ - call_active?: true; - /** Whether there's anyone in the group call */ - call_not_empty?: true; - /** Whether this group is [protected](https://telegram.org/blog/protected-content-delete-by-date-and-more), thus does not allow forwarding messages from it */ - noforwards?: true; - /** ID of the group */ - id: bigint; - /** Title */ - title: string; - /** Chat photo */ - photo: enums.ChatPhoto; - /** Participant count */ - participants_count: number; - /** Date of creation of the group */ - date: number; - /** Used in basic groups to reorder updates and make sure that all of them were received. */ - version: number; - /** Means this chat was [upgraded](https://core.telegram.org/api/channel) to a supergroup */ - migrated_to?: enums.InputChannel; - /** [Admin rights](https://core.telegram.org/api/rights) of the user in the group */ - admin_rights?: enums.ChatAdminRights; - /** [Default banned rights](https://core.telegram.org/api/rights) of all users in the group */ - default_banned_rights?: enums.ChatBannedRights; - - protected get [id](): number { - return 0x41CBF256; - } - - static get [name](): string { - return "chat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["creator", "true", "flags.0?true"], - ["left", "true", "flags.2?true"], - ["deactivated", "true", "flags.5?true"], - ["call_active", "true", "flags.23?true"], - ["call_not_empty", "true", "flags.24?true"], - ["noforwards", "true", "flags.25?true"], - ["id", "bigint", "long"], - ["title", "string", "string"], - ["photo", _ChatPhoto_, "ChatPhoto"], - ["participants_count", "number", "int"], - ["date", "number", "int"], - ["version", "number", "int"], - ["migrated_to", _InputChannel_, "flags.6?InputChannel"], - ["admin_rights", _ChatAdminRights_, "flags.14?ChatAdminRights"], - ["default_banned_rights", _ChatBannedRights_, "flags.18?ChatBannedRights"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.creator ?? null, "true", "flags.0?true"], - [this.left ?? null, "true", "flags.2?true"], - [this.deactivated ?? null, "true", "flags.5?true"], - [this.call_active ?? null, "true", "flags.23?true"], - [this.call_not_empty ?? null, "true", "flags.24?true"], - [this.noforwards ?? null, "true", "flags.25?true"], - [this.id, "bigint", "long"], - [this.title, "string", "string"], - [this.photo, _ChatPhoto_, "ChatPhoto"], - [this.participants_count, "number", "int"], - [this.date, "number", "int"], - [this.version, "number", "int"], - [this.migrated_to ?? null, _InputChannel_, "flags.6?InputChannel"], - [this.admin_rights ?? null, _ChatAdminRights_, "flags.14?ChatAdminRights"], - [this.default_banned_rights ?? null, _ChatBannedRights_, "flags.18?ChatBannedRights"], - ]; - } - - constructor(params: { creator?: true; left?: true; deactivated?: true; call_active?: true; call_not_empty?: true; noforwards?: true; id: bigint; title: string; photo: enums.ChatPhoto; participants_count: number; date: number; version: number; migrated_to?: enums.InputChannel; admin_rights?: enums.ChatAdminRights; default_banned_rights?: enums.ChatBannedRights }) { - super(); - this.creator = params.creator; - this.left = params.left; - this.deactivated = params.deactivated; - this.call_active = params.call_active; - this.call_not_empty = params.call_not_empty; - this.noforwards = params.noforwards; - this.id = params.id; - this.title = params.title; - this.photo = params.photo; - this.participants_count = params.participants_count; - this.date = params.date; - this.version = params.version; - this.migrated_to = params.migrated_to; - this.admin_rights = params.admin_rights; - this.default_banned_rights = params.default_banned_rights; - } -} - -/** A group to which the user has no access. E.g., because the user was kicked from the group. */ -export class ChatForbidden_ extends _Chat_ { - /** User identifier */ - id: bigint; - /** Group name */ - title: string; - - protected get [id](): number { - return 0x6592A1A7; - } - - static get [name](): string { - return "chatForbidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { id: bigint; title: string }) { - super(); - this.id = params.id; - this.title = params.title; - } -} - -/** Channel/supergroup info */ -export class Channel_ extends _Chat_ { - /** Whether the current user is the creator of this channel */ - creator?: true; - /** Whether the current user has left or is not a member of this channel */ - left?: true; - /** Is this a channel? */ - broadcast?: true; - /** Is this channel verified by telegram? */ - verified?: true; - /** Is this a supergroup? */ - megagroup?: true; - /** Whether viewing/writing in this channel for a reason (see `restriction_reason` */ - restricted?: true; - /** Whether signatures are enabled (channels) */ - signatures?: true; - /** See [min](https://core.telegram.org/api/min) */ - min?: true; - /** This channel/supergroup is probably a scam */ - scam?: true; - /** Whether this channel has a private join link */ - has_link?: true; - /** Whether this chanel has a geoposition */ - has_geo?: true; - /** Whether slow mode is enabled for groups to prevent flood in chat */ - slowmode_enabled?: true; - /** Whether a group call or livestream is currently active */ - call_active?: true; - /** Whether there's anyone in the group call or livestream */ - call_not_empty?: true; - /** If set, this [supergroup/channel](https://core.telegram.org/api/channel) was reported by many users as a fake or scam: be careful when interacting with it. */ - fake?: true; - /** Whether this [supergroup](https://core.telegram.org/api/channel) is a gigagroup */ - gigagroup?: true; - /** Whether this channel or group is [protected](https://telegram.org/blog/protected-content-delete-by-date-and-more), thus does not allow forwarding messages from it */ - noforwards?: true; - /** Whether a user needs to join the supergroup before they can send messages: can be false only for [discussion groups »](https://core.telegram.org/api/discussion), toggle using [channels.toggleJoinToSend](https://core.telegram.org/method/channels.toggleJoinToSend) */ - join_to_send?: true; - /** Whether a user's join request will have to be [approved by administrators](https://core.telegram.org/api/invites#join-requests), toggle using [channels.toggleJoinToSend](https://core.telegram.org/method/channels.toggleJoinRequest) */ - join_request?: true; - /** Whether this supergroup is a [forum](https://core.telegram.org/api/forum) */ - forum?: true; - /** Whether we have [hidden all stories posted by this channel »](https://core.telegram.org/api/stories#hiding-stories-of-other-users). */ - stories_hidden?: true; - /** If set, indicates that the `stories_hidden` flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using [channels.getChannels](https://core.telegram.org/method/channels.getChannels) to obtain the latest value of the `stories_hidden` flag. */ - stories_hidden_min?: true; - /** No stories from the channel are visible. */ - stories_unavailable?: true; - /** ID of the channel */ - id: bigint; - /** Access hash */ - access_hash?: bigint; - /** Title */ - title: string; - /** Username */ - username?: string; - /** Profile photo */ - photo: enums.ChatPhoto; - /** Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date */ - date: number; - /** Contains the reason why access to this channel must be restricted. */ - restriction_reason?: Array; - /** Admin rights of the user in this channel (see [rights](https://core.telegram.org/api/rights)) */ - admin_rights?: enums.ChatAdminRights; - /** Banned rights of the user in this channel (see [rights](https://core.telegram.org/api/rights)) */ - banned_rights?: enums.ChatBannedRights; - /** Default chat rights (see [rights](https://core.telegram.org/api/rights)) */ - default_banned_rights?: enums.ChatBannedRights; - /** Participant count */ - participants_count?: number; - /** Additional usernames */ - usernames?: Array; - /** ID of the maximum read [story](https://core.telegram.org/api/stories). */ - stories_max_id?: number; - /** The channel's [accent color](https://core.telegram.org/api/colors). */ - color?: enums.PeerColor; - /** The channel's [profile color](https://core.telegram.org/api/colors). */ - profile_color?: enums.PeerColor; - /** [Emoji status](https://core.telegram.org/api/emoji-status) */ - emoji_status?: enums.EmojiStatus; - /** [Boost level](https://core.telegram.org/api/boost) */ - level?: number; - - protected get [id](): number { - return 0x0AADFC8F; - } - - static get [name](): string { - return "channel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["creator", "true", "flags.0?true"], - ["left", "true", "flags.2?true"], - ["broadcast", "true", "flags.5?true"], - ["verified", "true", "flags.7?true"], - ["megagroup", "true", "flags.8?true"], - ["restricted", "true", "flags.9?true"], - ["signatures", "true", "flags.11?true"], - ["min", "true", "flags.12?true"], - ["scam", "true", "flags.19?true"], - ["has_link", "true", "flags.20?true"], - ["has_geo", "true", "flags.21?true"], - ["slowmode_enabled", "true", "flags.22?true"], - ["call_active", "true", "flags.23?true"], - ["call_not_empty", "true", "flags.24?true"], - ["fake", "true", "flags.25?true"], - ["gigagroup", "true", "flags.26?true"], - ["noforwards", "true", "flags.27?true"], - ["join_to_send", "true", "flags.28?true"], - ["join_request", "true", "flags.29?true"], - ["forum", "true", "flags.30?true"], - ["flags2", flags, "#"], - ["stories_hidden", "true", "flags2.1?true"], - ["stories_hidden_min", "true", "flags2.2?true"], - ["stories_unavailable", "true", "flags2.3?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "flags.13?long"], - ["title", "string", "string"], - ["username", "string", "flags.6?string"], - ["photo", _ChatPhoto_, "ChatPhoto"], - ["date", "number", "int"], - ["restriction_reason", [_RestrictionReason_], "flags.9?Vector"], - ["admin_rights", _ChatAdminRights_, "flags.14?ChatAdminRights"], - ["banned_rights", _ChatBannedRights_, "flags.15?ChatBannedRights"], - ["default_banned_rights", _ChatBannedRights_, "flags.18?ChatBannedRights"], - ["participants_count", "number", "flags.17?int"], - ["usernames", [_Username_], "flags2.0?Vector"], - ["stories_max_id", "number", "flags2.4?int"], - ["color", _PeerColor_, "flags2.7?PeerColor"], - ["profile_color", _PeerColor_, "flags2.8?PeerColor"], - ["emoji_status", _EmojiStatus_, "flags2.9?EmojiStatus"], - ["level", "number", "flags2.10?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.creator ?? null, "true", "flags.0?true"], - [this.left ?? null, "true", "flags.2?true"], - [this.broadcast ?? null, "true", "flags.5?true"], - [this.verified ?? null, "true", "flags.7?true"], - [this.megagroup ?? null, "true", "flags.8?true"], - [this.restricted ?? null, "true", "flags.9?true"], - [this.signatures ?? null, "true", "flags.11?true"], - [this.min ?? null, "true", "flags.12?true"], - [this.scam ?? null, "true", "flags.19?true"], - [this.has_link ?? null, "true", "flags.20?true"], - [this.has_geo ?? null, "true", "flags.21?true"], - [this.slowmode_enabled ?? null, "true", "flags.22?true"], - [this.call_active ?? null, "true", "flags.23?true"], - [this.call_not_empty ?? null, "true", "flags.24?true"], - [this.fake ?? null, "true", "flags.25?true"], - [this.gigagroup ?? null, "true", "flags.26?true"], - [this.noforwards ?? null, "true", "flags.27?true"], - [this.join_to_send ?? null, "true", "flags.28?true"], - [this.join_request ?? null, "true", "flags.29?true"], - [this.forum ?? null, "true", "flags.30?true"], - ["flags2", flags, "#"], - [this.stories_hidden ?? null, "true", "flags2.1?true"], - [this.stories_hidden_min ?? null, "true", "flags2.2?true"], - [this.stories_unavailable ?? null, "true", "flags2.3?true"], - [this.id, "bigint", "long"], - [this.access_hash ?? null, "bigint", "flags.13?long"], - [this.title, "string", "string"], - [this.username ?? null, "string", "flags.6?string"], - [this.photo, _ChatPhoto_, "ChatPhoto"], - [this.date, "number", "int"], - [this.restriction_reason ?? null, [_RestrictionReason_], "flags.9?Vector"], - [this.admin_rights ?? null, _ChatAdminRights_, "flags.14?ChatAdminRights"], - [this.banned_rights ?? null, _ChatBannedRights_, "flags.15?ChatBannedRights"], - [this.default_banned_rights ?? null, _ChatBannedRights_, "flags.18?ChatBannedRights"], - [this.participants_count ?? null, "number", "flags.17?int"], - [this.usernames ?? null, [_Username_], "flags2.0?Vector"], - [this.stories_max_id ?? null, "number", "flags2.4?int"], - [this.color ?? null, _PeerColor_, "flags2.7?PeerColor"], - [this.profile_color ?? null, _PeerColor_, "flags2.8?PeerColor"], - [this.emoji_status ?? null, _EmojiStatus_, "flags2.9?EmojiStatus"], - [this.level ?? null, "number", "flags2.10?int"], - ]; - } - - constructor(params: { creator?: true; left?: true; broadcast?: true; verified?: true; megagroup?: true; restricted?: true; signatures?: true; min?: true; scam?: true; has_link?: true; has_geo?: true; slowmode_enabled?: true; call_active?: true; call_not_empty?: true; fake?: true; gigagroup?: true; noforwards?: true; join_to_send?: true; join_request?: true; forum?: true; stories_hidden?: true; stories_hidden_min?: true; stories_unavailable?: true; id: bigint; access_hash?: bigint; title: string; username?: string; photo: enums.ChatPhoto; date: number; restriction_reason?: Array; admin_rights?: enums.ChatAdminRights; banned_rights?: enums.ChatBannedRights; default_banned_rights?: enums.ChatBannedRights; participants_count?: number; usernames?: Array; stories_max_id?: number; color?: enums.PeerColor; profile_color?: enums.PeerColor; emoji_status?: enums.EmojiStatus; level?: number }) { - super(); - this.creator = params.creator; - this.left = params.left; - this.broadcast = params.broadcast; - this.verified = params.verified; - this.megagroup = params.megagroup; - this.restricted = params.restricted; - this.signatures = params.signatures; - this.min = params.min; - this.scam = params.scam; - this.has_link = params.has_link; - this.has_geo = params.has_geo; - this.slowmode_enabled = params.slowmode_enabled; - this.call_active = params.call_active; - this.call_not_empty = params.call_not_empty; - this.fake = params.fake; - this.gigagroup = params.gigagroup; - this.noforwards = params.noforwards; - this.join_to_send = params.join_to_send; - this.join_request = params.join_request; - this.forum = params.forum; - this.stories_hidden = params.stories_hidden; - this.stories_hidden_min = params.stories_hidden_min; - this.stories_unavailable = params.stories_unavailable; - this.id = params.id; - this.access_hash = params.access_hash; - this.title = params.title; - this.username = params.username; - this.photo = params.photo; - this.date = params.date; - this.restriction_reason = params.restriction_reason; - this.admin_rights = params.admin_rights; - this.banned_rights = params.banned_rights; - this.default_banned_rights = params.default_banned_rights; - this.participants_count = params.participants_count; - this.usernames = params.usernames; - this.stories_max_id = params.stories_max_id; - this.color = params.color; - this.profile_color = params.profile_color; - this.emoji_status = params.emoji_status; - this.level = params.level; - } -} - -/** Indicates a channel/supergroup we can't access because we were banned, or for some other reason. */ -export class ChannelForbidden_ extends _Chat_ { - /** Is this a channel */ - broadcast?: true; - /** Is this a supergroup */ - megagroup?: true; - /** Channel ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** Title */ - title: string; - /** The ban is valid until the specified date */ - until_date?: number; - - protected get [id](): number { - return 0x17D493D5; - } - - static get [name](): string { - return "channelForbidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["broadcast", "true", "flags.5?true"], - ["megagroup", "true", "flags.8?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["title", "string", "string"], - ["until_date", "number", "flags.16?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.broadcast ?? null, "true", "flags.5?true"], - [this.megagroup ?? null, "true", "flags.8?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.title, "string", "string"], - [this.until_date ?? null, "number", "flags.16?int"], - ]; - } - - constructor(params: { broadcast?: true; megagroup?: true; id: bigint; access_hash: bigint; title: string; until_date?: number }) { - super(); - this.broadcast = params.broadcast; - this.megagroup = params.megagroup; - this.id = params.id; - this.access_hash = params.access_hash; - this.title = params.title; - this.until_date = params.until_date; - } -} - -/** Full info about a [basic group](https://core.telegram.org/api/channel#basic-groups). */ -export class ChatFull_ extends _ChatFull_ { - /** Can we change the username of this chat */ - can_set_username?: true; - /** Whether [scheduled messages](https://core.telegram.org/api/scheduled-messages) are available */ - has_scheduled?: true; - /** Whether the [real-time chat translation popup](https://core.telegram.org/api/translation) should be hidden. */ - translations_disabled?: true; - /** ID of the chat */ - id: bigint; - /** About string for this chat */ - about: string; - /** Participant list */ - participants: enums.ChatParticipants; - /** Chat photo */ - chat_photo?: enums.Photo; - /** Notification settings */ - notify_settings: enums.PeerNotifySettings; - /** Chat invite */ - exported_invite?: enums.ExportedChatInvite; - /** Info about bots that are in this chat */ - bot_info?: Array; - /** Message ID of the last [pinned message](https://core.telegram.org/api/pin) */ - pinned_msg_id?: number; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Group call information */ - call?: enums.InputGroupCall; - /** Time-To-Live of messages sent by the current user to this chat */ - ttl_period?: number; - /** When using [phone.getGroupCallJoinAs](https://core.telegram.org/method/phone.getGroupCallJoinAs) to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. */ - groupcall_default_join_as?: enums.Peer; - /** Emoji representing a specific chat theme */ - theme_emoticon?: string; - /** Pending [join requests »](https://core.telegram.org/api/invites#join-requests) */ - requests_pending?: number; - /** IDs of users who requested to join recently */ - recent_requesters?: Array; - /** Allowed [message reactions »](https://core.telegram.org/api/reactions) */ - available_reactions?: enums.ChatReactions; - - protected get [id](): number { - return 0xC9D31138; - } - - static get [name](): string { - return "chatFull" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_set_username", "true", "flags.7?true"], - ["has_scheduled", "true", "flags.8?true"], - ["translations_disabled", "true", "flags.19?true"], - ["id", "bigint", "long"], - ["about", "string", "string"], - ["participants", _ChatParticipants_, "ChatParticipants"], - ["chat_photo", _Photo_, "flags.2?Photo"], - ["notify_settings", _PeerNotifySettings_, "PeerNotifySettings"], - ["exported_invite", _ExportedChatInvite_, "flags.13?ExportedChatInvite"], - ["bot_info", [_BotInfo_], "flags.3?Vector"], - ["pinned_msg_id", "number", "flags.6?int"], - ["folder_id", "number", "flags.11?int"], - ["call", _InputGroupCall_, "flags.12?InputGroupCall"], - ["ttl_period", "number", "flags.14?int"], - ["groupcall_default_join_as", _Peer_, "flags.15?Peer"], - ["theme_emoticon", "string", "flags.16?string"], - ["requests_pending", "number", "flags.17?int"], - ["recent_requesters", ["bigint"], "flags.17?Vector"], - ["available_reactions", _ChatReactions_, "flags.18?ChatReactions"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_set_username ?? null, "true", "flags.7?true"], - [this.has_scheduled ?? null, "true", "flags.8?true"], - [this.translations_disabled ?? null, "true", "flags.19?true"], - [this.id, "bigint", "long"], - [this.about, "string", "string"], - [this.participants, _ChatParticipants_, "ChatParticipants"], - [this.chat_photo ?? null, _Photo_, "flags.2?Photo"], - [this.notify_settings, _PeerNotifySettings_, "PeerNotifySettings"], - [this.exported_invite ?? null, _ExportedChatInvite_, "flags.13?ExportedChatInvite"], - [this.bot_info ?? null, [_BotInfo_], "flags.3?Vector"], - [this.pinned_msg_id ?? null, "number", "flags.6?int"], - [this.folder_id ?? null, "number", "flags.11?int"], - [this.call ?? null, _InputGroupCall_, "flags.12?InputGroupCall"], - [this.ttl_period ?? null, "number", "flags.14?int"], - [this.groupcall_default_join_as ?? null, _Peer_, "flags.15?Peer"], - [this.theme_emoticon ?? null, "string", "flags.16?string"], - [this.requests_pending ?? null, "number", "flags.17?int"], - [this.recent_requesters ?? null, ["bigint"], "flags.17?Vector"], - [this.available_reactions ?? null, _ChatReactions_, "flags.18?ChatReactions"], - ]; - } - - constructor(params: { can_set_username?: true; has_scheduled?: true; translations_disabled?: true; id: bigint; about: string; participants: enums.ChatParticipants; chat_photo?: enums.Photo; notify_settings: enums.PeerNotifySettings; exported_invite?: enums.ExportedChatInvite; bot_info?: Array; pinned_msg_id?: number; folder_id?: number; call?: enums.InputGroupCall; ttl_period?: number; groupcall_default_join_as?: enums.Peer; theme_emoticon?: string; requests_pending?: number; recent_requesters?: Array; available_reactions?: enums.ChatReactions }) { - super(); - this.can_set_username = params.can_set_username; - this.has_scheduled = params.has_scheduled; - this.translations_disabled = params.translations_disabled; - this.id = params.id; - this.about = params.about; - this.participants = params.participants; - this.chat_photo = params.chat_photo; - this.notify_settings = params.notify_settings; - this.exported_invite = params.exported_invite; - this.bot_info = params.bot_info; - this.pinned_msg_id = params.pinned_msg_id; - this.folder_id = params.folder_id; - this.call = params.call; - this.ttl_period = params.ttl_period; - this.groupcall_default_join_as = params.groupcall_default_join_as; - this.theme_emoticon = params.theme_emoticon; - this.requests_pending = params.requests_pending; - this.recent_requesters = params.recent_requesters; - this.available_reactions = params.available_reactions; - } -} - -/** Full info about a [channel](https://core.telegram.org/api/channel#channels), [supergroup](https://core.telegram.org/api/channel#supergroups) or [gigagroup](https://core.telegram.org/api/channel#gigagroups). */ -export class ChannelFull_ extends _ChatFull_ { - /** Can we view the participant list? */ - can_view_participants?: true; - /** Can we set the channel's username? */ - can_set_username?: true; - /** Can we [associate](https://core.telegram.org/method/channels.setStickers) a stickerpack to the supergroup? */ - can_set_stickers?: true; - /** Is the history before we joined hidden to us? */ - hidden_prehistory?: true; - /** Can we set the geolocation of this group (for geogroups) */ - can_set_location?: true; - /** Whether scheduled messages are available */ - has_scheduled?: true; - /** Can the user view [channel/supergroup statistics](https://core.telegram.org/api/stats) */ - can_view_stats?: true; - /** Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in [discussion replies via @replies](https://core.telegram.org/api/discussion) */ - blocked?: true; - /** Can we delete this channel? */ - can_delete_channel?: true; - /** Whether [native antispam](https://core.telegram.org/api/antispam) functionality is enabled in this supergroup. */ - antispam?: true; - /** Whether the participant list is hidden. */ - participants_hidden?: true; - /** Whether the [real-time chat translation popup](https://core.telegram.org/api/translation) should be hidden. */ - translations_disabled?: true; - /** Whether this user has some [pinned stories](https://core.telegram.org/api/stories#pinned-or-archived-stories). */ - stories_pinned_available?: true; - /** Users may also choose to display messages from all topics of a [forum](https://core.telegram.org/api/forum) as if they were sent to a normal group, using a "View as messages" setting in the local client. - This setting only affects the current account, and is synced to other logged in sessions using the [channels.toggleViewForumAsMessages](https://core.telegram.org/method/channels.toggleViewForumAsMessages) method; invoking this method will update the value of this flag. */ - view_forum_as_messages?: true; - restricted_sponsored?: true; - can_view_revenue?: true; - /** ID of the channel */ - id: bigint; - /** Info about the channel */ - about: string; - /** Number of participants of the channel */ - participants_count?: number; - /** Number of channel admins */ - admins_count?: number; - /** Number of users [kicked](https://core.telegram.org/api/rights) from the channel */ - kicked_count?: number; - /** Number of users [banned](https://core.telegram.org/api/rights) from the channel */ - banned_count?: number; - /** Number of users currently online */ - online_count?: number; - /** Position up to which all incoming messages are read. */ - read_inbox_max_id: number; - /** Position up to which all outgoing messages are read. */ - read_outbox_max_id: number; - /** Count of unread messages */ - unread_count: number; - /** Channel picture */ - chat_photo: enums.Photo; - /** Notification settings */ - notify_settings: enums.PeerNotifySettings; - /** Invite link */ - exported_invite?: enums.ExportedChatInvite; - /** Info about bots in the channel/supergroup */ - bot_info: Array; - /** The chat ID from which this group was [migrated](https://core.telegram.org/api/channel) */ - migrated_from_chat_id?: bigint; - /** The message ID in the original chat at which this group was [migrated](https://core.telegram.org/api/channel) */ - migrated_from_max_id?: number; - /** Message ID of the last [pinned message](https://core.telegram.org/api/pin) */ - pinned_msg_id?: number; - /** Associated stickerset */ - stickerset?: enums.StickerSet; - /** Identifier of a maximum unavailable message in a channel due to hidden history. */ - available_min_id?: number; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** ID of the linked [discussion chat](https://core.telegram.org/api/discussion) for channels */ - linked_chat_id?: bigint; - /** Location of the geogroup */ - location?: enums.ChannelLocation; - /** If specified, users in supergroups will only be able to send one message every `slowmode_seconds` seconds */ - slowmode_seconds?: number; - /** Indicates when the user will be allowed to send another message in the supergroup (unixtime) */ - slowmode_next_send_date?: number; - /** If set, specifies the DC to use for fetching channel statistics */ - stats_dc?: number; - /** Latest [PTS](https://core.telegram.org/api/updates) for this channel */ - pts: number; - /** Livestream or group call information */ - call?: enums.InputGroupCall; - /** Time-To-Live of messages in this channel or supergroup */ - ttl_period?: number; - /** A list of [suggested actions](https://core.telegram.org/api/config#suggestions) for the supergroup admin, [see here for more info »](https://core.telegram.org/api/config#suggestions). */ - pending_suggestions?: Array; - /** When using [phone.getGroupCallJoinAs](https://core.telegram.org/method/phone.getGroupCallJoinAs) to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. */ - groupcall_default_join_as?: enums.Peer; - /** Emoji representing a specific chat theme */ - theme_emoticon?: string; - /** Pending [join requests »](https://core.telegram.org/api/invites#join-requests) */ - requests_pending?: number; - /** IDs of users who requested to join recently */ - recent_requesters?: Array; - /** Default peer used for sending messages to this channel */ - default_send_as?: enums.Peer; - /** Allowed [message reactions »](https://core.telegram.org/api/reactions) */ - available_reactions?: enums.ChatReactions; - /** Channel [stories](https://core.telegram.org/api/stories) */ - stories?: enums.PeerStories; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) */ - wallpaper?: enums.WallPaper; - boosts_applied?: number; - boosts_unrestrict?: number; - emojiset?: enums.StickerSet; - - protected get [id](): number { - return 0x44C054A7; - } - - static get [name](): string { - return "channelFull" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_view_participants", "true", "flags.3?true"], - ["can_set_username", "true", "flags.6?true"], - ["can_set_stickers", "true", "flags.7?true"], - ["hidden_prehistory", "true", "flags.10?true"], - ["can_set_location", "true", "flags.16?true"], - ["has_scheduled", "true", "flags.19?true"], - ["can_view_stats", "true", "flags.20?true"], - ["blocked", "true", "flags.22?true"], - ["flags2", flags, "#"], - ["can_delete_channel", "true", "flags2.0?true"], - ["antispam", "true", "flags2.1?true"], - ["participants_hidden", "true", "flags2.2?true"], - ["translations_disabled", "true", "flags2.3?true"], - ["stories_pinned_available", "true", "flags2.5?true"], - ["view_forum_as_messages", "true", "flags2.6?true"], - ["restricted_sponsored", "true", "flags2.11?true"], - ["can_view_revenue", "true", "flags2.12?true"], - ["id", "bigint", "long"], - ["about", "string", "string"], - ["participants_count", "number", "flags.0?int"], - ["admins_count", "number", "flags.1?int"], - ["kicked_count", "number", "flags.2?int"], - ["banned_count", "number", "flags.2?int"], - ["online_count", "number", "flags.13?int"], - ["read_inbox_max_id", "number", "int"], - ["read_outbox_max_id", "number", "int"], - ["unread_count", "number", "int"], - ["chat_photo", _Photo_, "Photo"], - ["notify_settings", _PeerNotifySettings_, "PeerNotifySettings"], - ["exported_invite", _ExportedChatInvite_, "flags.23?ExportedChatInvite"], - ["bot_info", [_BotInfo_], "Vector"], - ["migrated_from_chat_id", "bigint", "flags.4?long"], - ["migrated_from_max_id", "number", "flags.4?int"], - ["pinned_msg_id", "number", "flags.5?int"], - ["stickerset", _StickerSet_, "flags.8?StickerSet"], - ["available_min_id", "number", "flags.9?int"], - ["folder_id", "number", "flags.11?int"], - ["linked_chat_id", "bigint", "flags.14?long"], - ["location", _ChannelLocation_, "flags.15?ChannelLocation"], - ["slowmode_seconds", "number", "flags.17?int"], - ["slowmode_next_send_date", "number", "flags.18?int"], - ["stats_dc", "number", "flags.12?int"], - ["pts", "number", "int"], - ["call", _InputGroupCall_, "flags.21?InputGroupCall"], - ["ttl_period", "number", "flags.24?int"], - ["pending_suggestions", ["string"], "flags.25?Vector"], - ["groupcall_default_join_as", _Peer_, "flags.26?Peer"], - ["theme_emoticon", "string", "flags.27?string"], - ["requests_pending", "number", "flags.28?int"], - ["recent_requesters", ["bigint"], "flags.28?Vector"], - ["default_send_as", _Peer_, "flags.29?Peer"], - ["available_reactions", _ChatReactions_, "flags.30?ChatReactions"], - ["stories", _PeerStories_, "flags2.4?PeerStories"], - ["wallpaper", _WallPaper_, "flags2.7?WallPaper"], - ["boosts_applied", "number", "flags2.8?int"], - ["boosts_unrestrict", "number", "flags2.9?int"], - ["emojiset", _StickerSet_, "flags2.10?StickerSet"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_view_participants ?? null, "true", "flags.3?true"], - [this.can_set_username ?? null, "true", "flags.6?true"], - [this.can_set_stickers ?? null, "true", "flags.7?true"], - [this.hidden_prehistory ?? null, "true", "flags.10?true"], - [this.can_set_location ?? null, "true", "flags.16?true"], - [this.has_scheduled ?? null, "true", "flags.19?true"], - [this.can_view_stats ?? null, "true", "flags.20?true"], - [this.blocked ?? null, "true", "flags.22?true"], - ["flags2", flags, "#"], - [this.can_delete_channel ?? null, "true", "flags2.0?true"], - [this.antispam ?? null, "true", "flags2.1?true"], - [this.participants_hidden ?? null, "true", "flags2.2?true"], - [this.translations_disabled ?? null, "true", "flags2.3?true"], - [this.stories_pinned_available ?? null, "true", "flags2.5?true"], - [this.view_forum_as_messages ?? null, "true", "flags2.6?true"], - [this.restricted_sponsored ?? null, "true", "flags2.11?true"], - [this.can_view_revenue ?? null, "true", "flags2.12?true"], - [this.id, "bigint", "long"], - [this.about, "string", "string"], - [this.participants_count ?? null, "number", "flags.0?int"], - [this.admins_count ?? null, "number", "flags.1?int"], - [this.kicked_count ?? null, "number", "flags.2?int"], - [this.banned_count ?? null, "number", "flags.2?int"], - [this.online_count ?? null, "number", "flags.13?int"], - [this.read_inbox_max_id, "number", "int"], - [this.read_outbox_max_id, "number", "int"], - [this.unread_count, "number", "int"], - [this.chat_photo, _Photo_, "Photo"], - [this.notify_settings, _PeerNotifySettings_, "PeerNotifySettings"], - [this.exported_invite ?? null, _ExportedChatInvite_, "flags.23?ExportedChatInvite"], - [this.bot_info, [_BotInfo_], "Vector"], - [this.migrated_from_chat_id ?? null, "bigint", "flags.4?long"], - [this.migrated_from_max_id ?? null, "number", "flags.4?int"], - [this.pinned_msg_id ?? null, "number", "flags.5?int"], - [this.stickerset ?? null, _StickerSet_, "flags.8?StickerSet"], - [this.available_min_id ?? null, "number", "flags.9?int"], - [this.folder_id ?? null, "number", "flags.11?int"], - [this.linked_chat_id ?? null, "bigint", "flags.14?long"], - [this.location ?? null, _ChannelLocation_, "flags.15?ChannelLocation"], - [this.slowmode_seconds ?? null, "number", "flags.17?int"], - [this.slowmode_next_send_date ?? null, "number", "flags.18?int"], - [this.stats_dc ?? null, "number", "flags.12?int"], - [this.pts, "number", "int"], - [this.call ?? null, _InputGroupCall_, "flags.21?InputGroupCall"], - [this.ttl_period ?? null, "number", "flags.24?int"], - [this.pending_suggestions ?? null, ["string"], "flags.25?Vector"], - [this.groupcall_default_join_as ?? null, _Peer_, "flags.26?Peer"], - [this.theme_emoticon ?? null, "string", "flags.27?string"], - [this.requests_pending ?? null, "number", "flags.28?int"], - [this.recent_requesters ?? null, ["bigint"], "flags.28?Vector"], - [this.default_send_as ?? null, _Peer_, "flags.29?Peer"], - [this.available_reactions ?? null, _ChatReactions_, "flags.30?ChatReactions"], - [this.stories ?? null, _PeerStories_, "flags2.4?PeerStories"], - [this.wallpaper ?? null, _WallPaper_, "flags2.7?WallPaper"], - [this.boosts_applied ?? null, "number", "flags2.8?int"], - [this.boosts_unrestrict ?? null, "number", "flags2.9?int"], - [this.emojiset ?? null, _StickerSet_, "flags2.10?StickerSet"], - ]; - } - - constructor(params: { can_view_participants?: true; can_set_username?: true; can_set_stickers?: true; hidden_prehistory?: true; can_set_location?: true; has_scheduled?: true; can_view_stats?: true; blocked?: true; can_delete_channel?: true; antispam?: true; participants_hidden?: true; translations_disabled?: true; stories_pinned_available?: true; view_forum_as_messages?: true; restricted_sponsored?: true; can_view_revenue?: true; id: bigint; about: string; participants_count?: number; admins_count?: number; kicked_count?: number; banned_count?: number; online_count?: number; read_inbox_max_id: number; read_outbox_max_id: number; unread_count: number; chat_photo: enums.Photo; notify_settings: enums.PeerNotifySettings; exported_invite?: enums.ExportedChatInvite; bot_info: Array; migrated_from_chat_id?: bigint; migrated_from_max_id?: number; pinned_msg_id?: number; stickerset?: enums.StickerSet; available_min_id?: number; folder_id?: number; linked_chat_id?: bigint; location?: enums.ChannelLocation; slowmode_seconds?: number; slowmode_next_send_date?: number; stats_dc?: number; pts: number; call?: enums.InputGroupCall; ttl_period?: number; pending_suggestions?: Array; groupcall_default_join_as?: enums.Peer; theme_emoticon?: string; requests_pending?: number; recent_requesters?: Array; default_send_as?: enums.Peer; available_reactions?: enums.ChatReactions; stories?: enums.PeerStories; wallpaper?: enums.WallPaper; boosts_applied?: number; boosts_unrestrict?: number; emojiset?: enums.StickerSet }) { - super(); - this.can_view_participants = params.can_view_participants; - this.can_set_username = params.can_set_username; - this.can_set_stickers = params.can_set_stickers; - this.hidden_prehistory = params.hidden_prehistory; - this.can_set_location = params.can_set_location; - this.has_scheduled = params.has_scheduled; - this.can_view_stats = params.can_view_stats; - this.blocked = params.blocked; - this.can_delete_channel = params.can_delete_channel; - this.antispam = params.antispam; - this.participants_hidden = params.participants_hidden; - this.translations_disabled = params.translations_disabled; - this.stories_pinned_available = params.stories_pinned_available; - this.view_forum_as_messages = params.view_forum_as_messages; - this.restricted_sponsored = params.restricted_sponsored; - this.can_view_revenue = params.can_view_revenue; - this.id = params.id; - this.about = params.about; - this.participants_count = params.participants_count; - this.admins_count = params.admins_count; - this.kicked_count = params.kicked_count; - this.banned_count = params.banned_count; - this.online_count = params.online_count; - this.read_inbox_max_id = params.read_inbox_max_id; - this.read_outbox_max_id = params.read_outbox_max_id; - this.unread_count = params.unread_count; - this.chat_photo = params.chat_photo; - this.notify_settings = params.notify_settings; - this.exported_invite = params.exported_invite; - this.bot_info = params.bot_info; - this.migrated_from_chat_id = params.migrated_from_chat_id; - this.migrated_from_max_id = params.migrated_from_max_id; - this.pinned_msg_id = params.pinned_msg_id; - this.stickerset = params.stickerset; - this.available_min_id = params.available_min_id; - this.folder_id = params.folder_id; - this.linked_chat_id = params.linked_chat_id; - this.location = params.location; - this.slowmode_seconds = params.slowmode_seconds; - this.slowmode_next_send_date = params.slowmode_next_send_date; - this.stats_dc = params.stats_dc; - this.pts = params.pts; - this.call = params.call; - this.ttl_period = params.ttl_period; - this.pending_suggestions = params.pending_suggestions; - this.groupcall_default_join_as = params.groupcall_default_join_as; - this.theme_emoticon = params.theme_emoticon; - this.requests_pending = params.requests_pending; - this.recent_requesters = params.recent_requesters; - this.default_send_as = params.default_send_as; - this.available_reactions = params.available_reactions; - this.stories = params.stories; - this.wallpaper = params.wallpaper; - this.boosts_applied = params.boosts_applied; - this.boosts_unrestrict = params.boosts_unrestrict; - this.emojiset = params.emojiset; - } -} - -/** Group member. */ -export class ChatParticipant_ extends _ChatParticipant_ { - /** Member user ID */ - user_id: bigint; - /** ID of the user that added the member to the group */ - inviter_id: bigint; - /** Date added to the group */ - date: number; - - protected get [id](): number { - return 0xC02D4007; - } - - static get [name](): string { - return "chatParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["inviter_id", "bigint", "long"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.inviter_id, "bigint", "long"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; inviter_id: bigint; date: number }) { - super(); - this.user_id = params.user_id; - this.inviter_id = params.inviter_id; - this.date = params.date; - } -} - -/** Represents the creator of the group */ -export class ChatParticipantCreator_ extends _ChatParticipant_ { - /** ID of the user that created the group */ - user_id: bigint; - - protected get [id](): number { - return 0xE46BCEE4; - } - - static get [name](): string { - return "chatParticipantCreator" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint }) { - super(); - this.user_id = params.user_id; - } -} - -/** Chat admin */ -export class ChatParticipantAdmin_ extends _ChatParticipant_ { - /** ID of a group member that is admin */ - user_id: bigint; - /** ID of the user that added the member to the group */ - inviter_id: bigint; - /** Date when the user was added */ - date: number; - - protected get [id](): number { - return 0xA0933F5B; - } - - static get [name](): string { - return "chatParticipantAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["inviter_id", "bigint", "long"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.inviter_id, "bigint", "long"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; inviter_id: bigint; date: number }) { - super(); - this.user_id = params.user_id; - this.inviter_id = params.inviter_id; - this.date = params.date; - } -} - -/** Info on members is unavailable */ -export class ChatParticipantsForbidden_ extends _ChatParticipants_ { - /** Group ID */ - chat_id: bigint; - /** Info about the group membership of the current user */ - self_participant?: enums.ChatParticipant; - - protected get [id](): number { - return 0x8763D3E1; - } - - static get [name](): string { - return "chatParticipantsForbidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["chat_id", "bigint", "long"], - ["self_participant", _ChatParticipant_, "flags.0?ChatParticipant"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.chat_id, "bigint", "long"], - [this.self_participant ?? null, _ChatParticipant_, "flags.0?ChatParticipant"], - ]; - } - - constructor(params: { chat_id: bigint; self_participant?: enums.ChatParticipant }) { - super(); - this.chat_id = params.chat_id; - this.self_participant = params.self_participant; - } -} - -/** Group members. */ -export class ChatParticipants_ extends _ChatParticipants_ { - /** Group identifier */ - chat_id: bigint; - /** List of group members */ - participants: Array; - /** Group version number */ - version: number; - - protected get [id](): number { - return 0x3CBC93F8; - } - - static get [name](): string { - return "chatParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["participants", [_ChatParticipant_], "Vector"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.participants, [_ChatParticipant_], "Vector"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { chat_id: bigint; participants: Array; version: number }) { - super(); - this.chat_id = params.chat_id; - this.participants = params.participants; - this.version = params.version; - } -} - -/** Group photo is not set. */ -export class ChatPhotoEmpty_ extends _ChatPhoto_ { - protected get [id](): number { - return 0x37C1011C; - } - - static get [name](): string { - return "chatPhotoEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Group profile photo. */ -export class ChatPhoto_ extends _ChatPhoto_ { - /** Whether the user has an animated profile picture */ - has_video?: true; - /** Photo ID */ - photo_id: bigint; - /** [Stripped thumbnail](https://core.telegram.org/api/files#stripped-thumbnails) */ - stripped_thumb?: Uint8Array; - /** DC where this photo is stored */ - dc_id: number; - - protected get [id](): number { - return 0x1C6E1C11; - } - - static get [name](): string { - return "chatPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_video", "true", "flags.0?true"], - ["photo_id", "bigint", "long"], - ["stripped_thumb", Uint8Array, "flags.1?bytes"], - ["dc_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_video ?? null, "true", "flags.0?true"], - [this.photo_id, "bigint", "long"], - [this.stripped_thumb ?? null, Uint8Array, "flags.1?bytes"], - [this.dc_id, "number", "int"], - ]; - } - - constructor(params: { has_video?: true; photo_id: bigint; stripped_thumb?: Uint8Array; dc_id: number }) { - super(); - this.has_video = params.has_video; - this.photo_id = params.photo_id; - this.stripped_thumb = params.stripped_thumb; - this.dc_id = params.dc_id; - } -} - -/** Empty constructor, non-existent message. */ -export class MessageEmpty_ extends _Message_ { - /** Message identifier */ - id: number; - /** Peer ID, the chat where this message was sent */ - peer_id?: enums.Peer; - - protected get [id](): number { - return 0x90A6CA84; - } - - static get [name](): string { - return "messageEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "number", "int"], - ["peer_id", _Peer_, "flags.0?Peer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "number", "int"], - [this.peer_id ?? null, _Peer_, "flags.0?Peer"], - ]; - } - - constructor(params: { id: number; peer_id?: enums.Peer }) { - super(); - this.id = params.id; - this.peer_id = params.peer_id; - } -} - -/** A message */ -export class Message_ extends _Message_ { - /** Is this an outgoing message */ - out?: true; - /** Whether we were [mentioned](https://core.telegram.org/api/mentions) in this message */ - mentioned?: true; - /** Whether there are unread media attachments in this message */ - media_unread?: true; - /** Whether this is a silent message (no notification triggered) */ - silent?: true; - /** Whether this is a channel post */ - post?: true; - /** Whether this is a [scheduled message](https://core.telegram.org/api/scheduled-messages) */ - from_scheduled?: true; - /** This is a legacy message: it has to be refetched with the new layer */ - legacy?: true; - /** Whether the message should be shown as not modified to the user, even if an edit date is present */ - edit_hide?: true; - /** Whether this message is [pinned](https://core.telegram.org/api/pin) */ - pinned?: true; - /** Whether this message is [protected](https://telegram.org/blog/protected-content-delete-by-date-and-more) and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera). */ - noforwards?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - offline?: true; - /** ID of the message */ - id: number; - /** ID of the sender of the message */ - from_id?: enums.Peer; - from_boosts_applied?: number; - /** Peer ID, the chat where this message was sent */ - peer_id: enums.Peer; - /** Messages fetched from a [saved messages dialog »](https://core.telegram.org/api/saved-messages) will have `peer`\=[inputPeerSelf](https://core.telegram.org/constructor/inputPeerSelf) and the `saved_peer_id` flag set to the ID of the saved dialog. */ - saved_peer_id?: enums.Peer; - /** Info about forwarded messages */ - fwd_from?: enums.MessageFwdHeader; - /** ID of the inline bot that generated the message */ - via_bot_id?: bigint; - via_business_bot_id?: bigint; - /** Reply information */ - reply_to?: enums.MessageReplyHeader; - /** Date of the message */ - date: number; - /** The message */ - message: string; - /** Media attachment */ - media?: enums.MessageMedia; - /** Reply markup (bot/inline keyboards) */ - reply_markup?: enums.ReplyMarkup; - /** Message [entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - /** View count for channel posts */ - views?: number; - /** Forward counter */ - forwards?: number; - /** Info about [post comments (for channels) or message replies (for groups)](https://core.telegram.org/api/threads) */ - replies?: enums.MessageReplies; - /** Last edit date of this message */ - edit_date?: number; - /** Name of the author of this message for channel posts (with signatures enabled) */ - post_author?: string; - /** Multiple media messages sent using [messages.sendMultiMedia](https://core.telegram.org/method/messages.sendMultiMedia) with the same grouped ID indicate an [album or media group](https://core.telegram.org/api/files#albums-grouped-media) */ - grouped_id?: bigint; - /** Reactions to this message */ - reactions?: enums.MessageReactions; - /** Contains the reason why access to this message must be restricted. */ - restriction_reason?: Array; - /** Time To Live of the message, once message.date+message.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. */ - ttl_period?: number; - quick_reply_shortcut_id?: number; - - protected get [id](): number { - return 0x2357BF25; - } - - static get [name](): string { - return "message" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["out", "true", "flags.1?true"], - ["mentioned", "true", "flags.4?true"], - ["media_unread", "true", "flags.5?true"], - ["silent", "true", "flags.13?true"], - ["post", "true", "flags.14?true"], - ["from_scheduled", "true", "flags.18?true"], - ["legacy", "true", "flags.19?true"], - ["edit_hide", "true", "flags.21?true"], - ["pinned", "true", "flags.24?true"], - ["noforwards", "true", "flags.26?true"], - ["invert_media", "true", "flags.27?true"], - ["flags2", flags, "#"], - ["offline", "true", "flags2.1?true"], - ["id", "number", "int"], - ["from_id", _Peer_, "flags.8?Peer"], - ["from_boosts_applied", "number", "flags.29?int"], - ["peer_id", _Peer_, "Peer"], - ["saved_peer_id", _Peer_, "flags.28?Peer"], - ["fwd_from", _MessageFwdHeader_, "flags.2?MessageFwdHeader"], - ["via_bot_id", "bigint", "flags.11?long"], - ["via_business_bot_id", "bigint", "flags2.0?long"], - ["reply_to", _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - ["date", "number", "int"], - ["message", "string", "string"], - ["media", _MessageMedia_, "flags.9?MessageMedia"], - ["reply_markup", _ReplyMarkup_, "flags.6?ReplyMarkup"], - ["entities", [_MessageEntity_], "flags.7?Vector"], - ["views", "number", "flags.10?int"], - ["forwards", "number", "flags.10?int"], - ["replies", _MessageReplies_, "flags.23?MessageReplies"], - ["edit_date", "number", "flags.15?int"], - ["post_author", "string", "flags.16?string"], - ["grouped_id", "bigint", "flags.17?long"], - ["reactions", _MessageReactions_, "flags.20?MessageReactions"], - ["restriction_reason", [_RestrictionReason_], "flags.22?Vector"], - ["ttl_period", "number", "flags.25?int"], - ["quick_reply_shortcut_id", "number", "flags.30?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.out ?? null, "true", "flags.1?true"], - [this.mentioned ?? null, "true", "flags.4?true"], - [this.media_unread ?? null, "true", "flags.5?true"], - [this.silent ?? null, "true", "flags.13?true"], - [this.post ?? null, "true", "flags.14?true"], - [this.from_scheduled ?? null, "true", "flags.18?true"], - [this.legacy ?? null, "true", "flags.19?true"], - [this.edit_hide ?? null, "true", "flags.21?true"], - [this.pinned ?? null, "true", "flags.24?true"], - [this.noforwards ?? null, "true", "flags.26?true"], - [this.invert_media ?? null, "true", "flags.27?true"], - ["flags2", flags, "#"], - [this.offline ?? null, "true", "flags2.1?true"], - [this.id, "number", "int"], - [this.from_id ?? null, _Peer_, "flags.8?Peer"], - [this.from_boosts_applied ?? null, "number", "flags.29?int"], - [this.peer_id, _Peer_, "Peer"], - [this.saved_peer_id ?? null, _Peer_, "flags.28?Peer"], - [this.fwd_from ?? null, _MessageFwdHeader_, "flags.2?MessageFwdHeader"], - [this.via_bot_id ?? null, "bigint", "flags.11?long"], - [this.via_business_bot_id ?? null, "bigint", "flags2.0?long"], - [this.reply_to ?? null, _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - [this.date, "number", "int"], - [this.message, "string", "string"], - [this.media ?? null, _MessageMedia_, "flags.9?MessageMedia"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.6?ReplyMarkup"], - [this.entities ?? null, [_MessageEntity_], "flags.7?Vector"], - [this.views ?? null, "number", "flags.10?int"], - [this.forwards ?? null, "number", "flags.10?int"], - [this.replies ?? null, _MessageReplies_, "flags.23?MessageReplies"], - [this.edit_date ?? null, "number", "flags.15?int"], - [this.post_author ?? null, "string", "flags.16?string"], - [this.grouped_id ?? null, "bigint", "flags.17?long"], - [this.reactions ?? null, _MessageReactions_, "flags.20?MessageReactions"], - [this.restriction_reason ?? null, [_RestrictionReason_], "flags.22?Vector"], - [this.ttl_period ?? null, "number", "flags.25?int"], - [this.quick_reply_shortcut_id ?? null, "number", "flags.30?int"], - ]; - } - - constructor(params: { out?: true; mentioned?: true; media_unread?: true; silent?: true; post?: true; from_scheduled?: true; legacy?: true; edit_hide?: true; pinned?: true; noforwards?: true; invert_media?: true; offline?: true; id: number; from_id?: enums.Peer; from_boosts_applied?: number; peer_id: enums.Peer; saved_peer_id?: enums.Peer; fwd_from?: enums.MessageFwdHeader; via_bot_id?: bigint; via_business_bot_id?: bigint; reply_to?: enums.MessageReplyHeader; date: number; message: string; media?: enums.MessageMedia; reply_markup?: enums.ReplyMarkup; entities?: Array; views?: number; forwards?: number; replies?: enums.MessageReplies; edit_date?: number; post_author?: string; grouped_id?: bigint; reactions?: enums.MessageReactions; restriction_reason?: Array; ttl_period?: number; quick_reply_shortcut_id?: number }) { - super(); - this.out = params.out; - this.mentioned = params.mentioned; - this.media_unread = params.media_unread; - this.silent = params.silent; - this.post = params.post; - this.from_scheduled = params.from_scheduled; - this.legacy = params.legacy; - this.edit_hide = params.edit_hide; - this.pinned = params.pinned; - this.noforwards = params.noforwards; - this.invert_media = params.invert_media; - this.offline = params.offline; - this.id = params.id; - this.from_id = params.from_id; - this.from_boosts_applied = params.from_boosts_applied; - this.peer_id = params.peer_id; - this.saved_peer_id = params.saved_peer_id; - this.fwd_from = params.fwd_from; - this.via_bot_id = params.via_bot_id; - this.via_business_bot_id = params.via_business_bot_id; - this.reply_to = params.reply_to; - this.date = params.date; - this.message = params.message; - this.media = params.media; - this.reply_markup = params.reply_markup; - this.entities = params.entities; - this.views = params.views; - this.forwards = params.forwards; - this.replies = params.replies; - this.edit_date = params.edit_date; - this.post_author = params.post_author; - this.grouped_id = params.grouped_id; - this.reactions = params.reactions; - this.restriction_reason = params.restriction_reason; - this.ttl_period = params.ttl_period; - this.quick_reply_shortcut_id = params.quick_reply_shortcut_id; - } -} - -/** Indicates a service message */ -export class MessageService_ extends _Message_ { - /** Whether the message is outgoing */ - out?: true; - /** Whether we were mentioned in the message */ - mentioned?: true; - /** Whether the message contains unread media */ - media_unread?: true; - /** Whether the message is silent */ - silent?: true; - /** Whether it's a channel post */ - post?: true; - /** This is a legacy message: it has to be refetched with the new layer */ - legacy?: true; - /** Message ID */ - id: number; - /** ID of the sender of this message */ - from_id?: enums.Peer; - /** Sender of service message */ - peer_id: enums.Peer; - /** Reply (thread) information */ - reply_to?: enums.MessageReplyHeader; - /** Message date */ - date: number; - /** Event connected with the service message */ - action: enums.MessageAction; - /** Time To Live of the message, once message.date+message.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. */ - ttl_period?: number; - - protected get [id](): number { - return 0x2B085862; - } - - static get [name](): string { - return "messageService" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["out", "true", "flags.1?true"], - ["mentioned", "true", "flags.4?true"], - ["media_unread", "true", "flags.5?true"], - ["silent", "true", "flags.13?true"], - ["post", "true", "flags.14?true"], - ["legacy", "true", "flags.19?true"], - ["id", "number", "int"], - ["from_id", _Peer_, "flags.8?Peer"], - ["peer_id", _Peer_, "Peer"], - ["reply_to", _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - ["date", "number", "int"], - ["action", _MessageAction_, "MessageAction"], - ["ttl_period", "number", "flags.25?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.out ?? null, "true", "flags.1?true"], - [this.mentioned ?? null, "true", "flags.4?true"], - [this.media_unread ?? null, "true", "flags.5?true"], - [this.silent ?? null, "true", "flags.13?true"], - [this.post ?? null, "true", "flags.14?true"], - [this.legacy ?? null, "true", "flags.19?true"], - [this.id, "number", "int"], - [this.from_id ?? null, _Peer_, "flags.8?Peer"], - [this.peer_id, _Peer_, "Peer"], - [this.reply_to ?? null, _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - [this.date, "number", "int"], - [this.action, _MessageAction_, "MessageAction"], - [this.ttl_period ?? null, "number", "flags.25?int"], - ]; - } - - constructor(params: { out?: true; mentioned?: true; media_unread?: true; silent?: true; post?: true; legacy?: true; id: number; from_id?: enums.Peer; peer_id: enums.Peer; reply_to?: enums.MessageReplyHeader; date: number; action: enums.MessageAction; ttl_period?: number }) { - super(); - this.out = params.out; - this.mentioned = params.mentioned; - this.media_unread = params.media_unread; - this.silent = params.silent; - this.post = params.post; - this.legacy = params.legacy; - this.id = params.id; - this.from_id = params.from_id; - this.peer_id = params.peer_id; - this.reply_to = params.reply_to; - this.date = params.date; - this.action = params.action; - this.ttl_period = params.ttl_period; - } -} - -/** Empty constructor. */ -export class MessageMediaEmpty_ extends _MessageMedia_ { - protected get [id](): number { - return 0x3DED6320; - } - - static get [name](): string { - return "messageMediaEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Attached photo. */ -export class MessageMediaPhoto_ extends _MessageMedia_ { - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** Photo */ - photo?: enums.Photo; - /** Time to live in seconds of self-destructing photo */ - ttl_seconds?: number; - - protected get [id](): number { - return 0x695150D7; - } - - static get [name](): string { - return "messageMediaPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["spoiler", "true", "flags.3?true"], - ["photo", _Photo_, "flags.0?Photo"], - ["ttl_seconds", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.spoiler ?? null, "true", "flags.3?true"], - [this.photo ?? null, _Photo_, "flags.0?Photo"], - [this.ttl_seconds ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params?: { spoiler?: true; photo?: enums.Photo; ttl_seconds?: number }) { - super(); - this.spoiler = params?.spoiler; - this.photo = params?.photo; - this.ttl_seconds = params?.ttl_seconds; - } -} - -/** Attached map. */ -export class MessageMediaGeo_ extends _MessageMedia_ { - /** GeoPoint */ - geo: enums.GeoPoint; - - protected get [id](): number { - return 0x56E0D474; - } - - static get [name](): string { - return "messageMediaGeo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo", _GeoPoint_, "GeoPoint"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo, _GeoPoint_, "GeoPoint"], - ]; - } - - constructor(params: { geo: enums.GeoPoint }) { - super(); - this.geo = params.geo; - } -} - -/** Attached contact. */ -export class MessageMediaContact_ extends _MessageMedia_ { - /** Phone number */ - phone_number: string; - /** Contact's first name */ - first_name: string; - /** Contact's last name */ - last_name: string; - /** VCARD of contact */ - vcard: string; - /** User identifier or `0`, if the user with the given phone number is not registered */ - user_id: bigint; - - protected get [id](): number { - return 0x70322949; - } - - static get [name](): string { - return "messageMediaContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["vcard", "string", "string"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.vcard, "string", "string"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { phone_number: string; first_name: string; last_name: string; vcard: string; user_id: bigint }) { - super(); - this.phone_number = params.phone_number; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.vcard = params.vcard; - this.user_id = params.user_id; - } -} - -/** Current version of the client does not support this media type. */ -export class MessageMediaUnsupported_ extends _MessageMedia_ { - protected get [id](): number { - return 0x9F84F49E; - } - - static get [name](): string { - return "messageMediaUnsupported" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Document (video, audio, voice, sticker, any media type except photo) */ -export class MessageMediaDocument_ extends _MessageMedia_ { - /** Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played. */ - nopremium?: true; - /** Whether this media should be hidden behind a spoiler warning */ - spoiler?: true; - /** Whether this is a video. */ - video?: true; - /** Whether this is a round video. */ - round?: true; - /** Whether this is a voice message. */ - voice?: true; - /** Attached document */ - document?: enums.Document; - /** Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than `document`. */ - alt_document?: enums.Document; - /** Time to live of self-destructing document */ - ttl_seconds?: number; - - protected get [id](): number { - return 0x4CF4D72D; - } - - static get [name](): string { - return "messageMediaDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["nopremium", "true", "flags.3?true"], - ["spoiler", "true", "flags.4?true"], - ["video", "true", "flags.6?true"], - ["round", "true", "flags.7?true"], - ["voice", "true", "flags.8?true"], - ["document", _Document_, "flags.0?Document"], - ["alt_document", _Document_, "flags.5?Document"], - ["ttl_seconds", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.nopremium ?? null, "true", "flags.3?true"], - [this.spoiler ?? null, "true", "flags.4?true"], - [this.video ?? null, "true", "flags.6?true"], - [this.round ?? null, "true", "flags.7?true"], - [this.voice ?? null, "true", "flags.8?true"], - [this.document ?? null, _Document_, "flags.0?Document"], - [this.alt_document ?? null, _Document_, "flags.5?Document"], - [this.ttl_seconds ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params?: { nopremium?: true; spoiler?: true; video?: true; round?: true; voice?: true; document?: enums.Document; alt_document?: enums.Document; ttl_seconds?: number }) { - super(); - this.nopremium = params?.nopremium; - this.spoiler = params?.spoiler; - this.video = params?.video; - this.round = params?.round; - this.voice = params?.voice; - this.document = params?.document; - this.alt_document = params?.alt_document; - this.ttl_seconds = params?.ttl_seconds; - } -} - -/** Preview of webpage */ -export class MessageMediaWebPage_ extends _MessageMedia_ { - /** If set, specifies that a large media preview should be used. */ - force_large_media?: true; - /** If set, specifies that a small media preview should be used. */ - force_small_media?: true; - /** If set, indicates that the URL used for the webpage preview was specified manually using [inputMediaWebPage](https://core.telegram.org/constructor/inputMediaWebPage), and may not be related to any of the URLs specified in the message. */ - manual?: true; - /** If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened. */ - safe?: true; - /** Webpage preview */ - webpage: enums.WebPage; - - protected get [id](): number { - return 0xDDF10C3B; - } - - static get [name](): string { - return "messageMediaWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["force_large_media", "true", "flags.0?true"], - ["force_small_media", "true", "flags.1?true"], - ["manual", "true", "flags.3?true"], - ["safe", "true", "flags.4?true"], - ["webpage", _WebPage_, "WebPage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.force_large_media ?? null, "true", "flags.0?true"], - [this.force_small_media ?? null, "true", "flags.1?true"], - [this.manual ?? null, "true", "flags.3?true"], - [this.safe ?? null, "true", "flags.4?true"], - [this.webpage, _WebPage_, "WebPage"], - ]; - } - - constructor(params: { force_large_media?: true; force_small_media?: true; manual?: true; safe?: true; webpage: enums.WebPage }) { - super(); - this.force_large_media = params.force_large_media; - this.force_small_media = params.force_small_media; - this.manual = params.manual; - this.safe = params.safe; - this.webpage = params.webpage; - } -} - -/** Venue */ -export class MessageMediaVenue_ extends _MessageMedia_ { - /** Geolocation of venue */ - geo: enums.GeoPoint; - /** Venue name */ - title: string; - /** Address */ - address: string; - /** Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported */ - provider: string; - /** Venue ID in the provider's database */ - venue_id: string; - /** Venue type in the provider's database */ - venue_type: string; - - protected get [id](): number { - return 0x2EC0533F; - } - - static get [name](): string { - return "messageMediaVenue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo", _GeoPoint_, "GeoPoint"], - ["title", "string", "string"], - ["address", "string", "string"], - ["provider", "string", "string"], - ["venue_id", "string", "string"], - ["venue_type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo, _GeoPoint_, "GeoPoint"], - [this.title, "string", "string"], - [this.address, "string", "string"], - [this.provider, "string", "string"], - [this.venue_id, "string", "string"], - [this.venue_type, "string", "string"], - ]; - } - - constructor(params: { geo: enums.GeoPoint; title: string; address: string; provider: string; venue_id: string; venue_type: string }) { - super(); - this.geo = params.geo; - this.title = params.title; - this.address = params.address; - this.provider = params.provider; - this.venue_id = params.venue_id; - this.venue_type = params.venue_type; - } -} - -/** Telegram game */ -export class MessageMediaGame_ extends _MessageMedia_ { - /** Game */ - game: enums.Game; - - protected get [id](): number { - return 0xFDB19008; - } - - static get [name](): string { - return "messageMediaGame" - } - - static get [paramDesc](): ParamDesc { - return [ - ["game", _Game_, "Game"], - ]; - } - - protected get [params](): Params { - return [ - [this.game, _Game_, "Game"], - ]; - } - - constructor(params: { game: enums.Game }) { - super(); - this.game = params.game; - } -} - -/** Invoice */ -export class MessageMediaInvoice_ extends _MessageMedia_ { - /** Whether the shipping address was requested */ - shipping_address_requested?: true; - /** Whether this is an example invoice */ - test?: true; - /** Product name, 1-32 characters */ - title: string; - /** Product description, 1-255 characters */ - description: string; - /** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. */ - photo?: enums.WebDocument; - /** Message ID of receipt: if set, clients should change the text of the first [keyboardButtonBuy](https://core.telegram.org/constructor/keyboardButtonBuy) button always attached to the [message](https://core.telegram.org/constructor/message) to a localized version of the word `Receipt` */ - receipt_msg_id?: number; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - total_amount: bigint; - /** Unique bot deep-linking parameter that can be used to generate this invoice */ - start_param: string; - /** Extended media */ - extended_media?: enums.MessageExtendedMedia; - - protected get [id](): number { - return 0xF6A548D3; - } - - static get [name](): string { - return "messageMediaInvoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["shipping_address_requested", "true", "flags.1?true"], - ["test", "true", "flags.3?true"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _WebDocument_, "flags.0?WebDocument"], - ["receipt_msg_id", "number", "flags.2?int"], - ["currency", "string", "string"], - ["total_amount", "bigint", "long"], - ["start_param", "string", "string"], - ["extended_media", _MessageExtendedMedia_, "flags.4?MessageExtendedMedia"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.shipping_address_requested ?? null, "true", "flags.1?true"], - [this.test ?? null, "true", "flags.3?true"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo ?? null, _WebDocument_, "flags.0?WebDocument"], - [this.receipt_msg_id ?? null, "number", "flags.2?int"], - [this.currency, "string", "string"], - [this.total_amount, "bigint", "long"], - [this.start_param, "string", "string"], - [this.extended_media ?? null, _MessageExtendedMedia_, "flags.4?MessageExtendedMedia"], - ]; - } - - constructor(params: { shipping_address_requested?: true; test?: true; title: string; description: string; photo?: enums.WebDocument; receipt_msg_id?: number; currency: string; total_amount: bigint; start_param: string; extended_media?: enums.MessageExtendedMedia }) { - super(); - this.shipping_address_requested = params.shipping_address_requested; - this.test = params.test; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.receipt_msg_id = params.receipt_msg_id; - this.currency = params.currency; - this.total_amount = params.total_amount; - this.start_param = params.start_param; - this.extended_media = params.extended_media; - } -} - -/** Indicates a [live geolocation](https://core.telegram.org/api/live-location) */ -export class MessageMediaGeoLive_ extends _MessageMedia_ { - /** Geolocation */ - geo: enums.GeoPoint; - /** For [live locations](https://core.telegram.org/api/live-location), a direction in which the location moves, in degrees; 1-360 */ - heading?: number; - /** Validity period of provided geolocation */ - period: number; - /** For [live locations](https://core.telegram.org/api/live-location), a maximum distance to another chat member for proximity alerts, in meters (0-100000). */ - proximity_notification_radius?: number; - - protected get [id](): number { - return 0xB940C666; - } - - static get [name](): string { - return "messageMediaGeoLive" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo", _GeoPoint_, "GeoPoint"], - ["heading", "number", "flags.0?int"], - ["period", "number", "int"], - ["proximity_notification_radius", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo, _GeoPoint_, "GeoPoint"], - [this.heading ?? null, "number", "flags.0?int"], - [this.period, "number", "int"], - [this.proximity_notification_radius ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { geo: enums.GeoPoint; heading?: number; period: number; proximity_notification_radius?: number }) { - super(); - this.geo = params.geo; - this.heading = params.heading; - this.period = params.period; - this.proximity_notification_radius = params.proximity_notification_radius; - } -} - -/** Poll */ -export class MessageMediaPoll_ extends _MessageMedia_ { - /** The poll */ - poll: enums.Poll; - /** The results of the poll */ - results: enums.PollResults; - - protected get [id](): number { - return 0x4BD6E798; - } - - static get [name](): string { - return "messageMediaPoll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["poll", _Poll_, "Poll"], - ["results", _PollResults_, "PollResults"], - ]; - } - - protected get [params](): Params { - return [ - [this.poll, _Poll_, "Poll"], - [this.results, _PollResults_, "PollResults"], - ]; - } - - constructor(params: { poll: enums.Poll; results: enums.PollResults }) { - super(); - this.poll = params.poll; - this.results = params.results; - } -} - -/** [Dice-based animated sticker](https://core.telegram.org/api/dice) */ -export class MessageMediaDice_ extends _MessageMedia_ { - /** [Dice value](https://core.telegram.org/api/dice) */ - value: number; - /** The emoji, for now ![🏀](//telegram.org/img/emoji/40/F09F8F80.png), ![🎲](//telegram.org/img/emoji/40/F09F8EB2.png) and ![🎯](//telegram.org/img/emoji/40/F09F8EAF.png) are supported */ - emoticon: string; - - protected get [id](): number { - return 0x3F7EE58B; - } - - static get [name](): string { - return "messageMediaDice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", "number", "int"], - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, "number", "int"], - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { value: number; emoticon: string }) { - super(); - this.value = params.value; - this.emoticon = params.emoticon; - } -} - -/** Represents a forwarded [story](https://core.telegram.org/api/stories) or a story mention. */ -export class MessageMediaStory_ extends _MessageMedia_ { - /** If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing). */ - via_mention?: true; - /** Peer that posted the story. */ - peer: enums.Peer; - /** Story ID */ - id: number; - /** The story itself, if absent fetch it using [stories.getStoriesByID](https://core.telegram.org/method/stories.getStoriesByID) and the `peer`/`id` parameters specified above. */ - story?: enums.StoryItem; - - protected get [id](): number { - return 0x68CB6283; - } - - static get [name](): string { - return "messageMediaStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["via_mention", "true", "flags.1?true"], - ["peer", _Peer_, "Peer"], - ["id", "number", "int"], - ["story", _StoryItem_, "flags.0?StoryItem"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.via_mention ?? null, "true", "flags.1?true"], - [this.peer, _Peer_, "Peer"], - [this.id, "number", "int"], - [this.story ?? null, _StoryItem_, "flags.0?StoryItem"], - ]; - } - - constructor(params: { via_mention?: true; peer: enums.Peer; id: number; story?: enums.StoryItem }) { - super(); - this.via_mention = params.via_mention; - this.peer = params.peer; - this.id = params.id; - this.story = params.story; - } -} - -/** Contains info about a [giveaway, see here »](https://core.telegram.org/api/giveaways) for more info. */ -export class MessageMediaGiveaway_ extends _MessageMedia_ { - /** If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. */ - only_new_subscribers?: true; - /** If set, giveaway winners are public and will be listed in a [messageMediaGiveawayResults](https://core.telegram.org/constructor/messageMediaGiveawayResults) message that will be automatically sent to the channel once the giveaway ends. */ - winners_are_visible?: true; - /** The channels that the user must join to participate in the giveaway. */ - channels: Array; - /** If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations. */ - countries_iso2?: Array; - /** Can contain a textual description of additional giveaway prizes. */ - prize_description?: string; - /** Number of [Telegram Premium](https://core.telegram.org/api/premium) subscriptions given away. */ - quantity: number; - /** Duration in months of each [Telegram Premium](https://core.telegram.org/api/premium) subscription in the giveaway. */ - months: number; - /** The end date of the giveaway. */ - until_date: number; - - protected get [id](): number { - return 0xDAAD85B0; - } - - static get [name](): string { - return "messageMediaGiveaway" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["only_new_subscribers", "true", "flags.0?true"], - ["winners_are_visible", "true", "flags.2?true"], - ["channels", ["bigint"], "Vector"], - ["countries_iso2", ["string"], "flags.1?Vector"], - ["prize_description", "string", "flags.3?string"], - ["quantity", "number", "int"], - ["months", "number", "int"], - ["until_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.only_new_subscribers ?? null, "true", "flags.0?true"], - [this.winners_are_visible ?? null, "true", "flags.2?true"], - [this.channels, ["bigint"], "Vector"], - [this.countries_iso2 ?? null, ["string"], "flags.1?Vector"], - [this.prize_description ?? null, "string", "flags.3?string"], - [this.quantity, "number", "int"], - [this.months, "number", "int"], - [this.until_date, "number", "int"], - ]; - } - - constructor(params: { only_new_subscribers?: true; winners_are_visible?: true; channels: Array; countries_iso2?: Array; prize_description?: string; quantity: number; months: number; until_date: number }) { - super(); - this.only_new_subscribers = params.only_new_subscribers; - this.winners_are_visible = params.winners_are_visible; - this.channels = params.channels; - this.countries_iso2 = params.countries_iso2; - this.prize_description = params.prize_description; - this.quantity = params.quantity; - this.months = params.months; - this.until_date = params.until_date; - } -} - -/** A [giveaway](https://core.telegram.org/api/giveaways) with public winners has finished, this constructor contains info about the winners. */ -export class MessageMediaGiveawayResults_ extends _MessageMedia_ { - /** If set, only new subscribers starting from the giveaway creation date participated in the giveaway. */ - only_new_subscribers?: true; - /** If set, the giveaway was canceled and was fully refunded. */ - refunded?: true; - /** ID of the channel that was automatically [boosted](https://core.telegram.org/api/boost) by the winners of the giveaway for duration of the Premium subscription. */ - channel_id: bigint; - /** Number of other channels that participated in the giveaway. */ - additional_peers_count?: number; - /** Identifier of the message with the giveaway in `channel_id`. */ - launch_msg_id: number; - /** Total number of winners in the giveaway. */ - winners_count: number; - /** Number of not-yet-claimed prizes. */ - unclaimed_count: number; - /** Up to 100 user identifiers of the winners of the giveaway. */ - winners: Array; - /** Duration in months of each [Telegram Premium](https://core.telegram.org/api/premium) subscription in the giveaway. */ - months: number; - /** Can contain a textual description of additional giveaway prizes. */ - prize_description?: string; - /** Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway. */ - until_date: number; - - protected get [id](): number { - return 0xC6991068; - } - - static get [name](): string { - return "messageMediaGiveawayResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["only_new_subscribers", "true", "flags.0?true"], - ["refunded", "true", "flags.2?true"], - ["channel_id", "bigint", "long"], - ["additional_peers_count", "number", "flags.3?int"], - ["launch_msg_id", "number", "int"], - ["winners_count", "number", "int"], - ["unclaimed_count", "number", "int"], - ["winners", ["bigint"], "Vector"], - ["months", "number", "int"], - ["prize_description", "string", "flags.1?string"], - ["until_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.only_new_subscribers ?? null, "true", "flags.0?true"], - [this.refunded ?? null, "true", "flags.2?true"], - [this.channel_id, "bigint", "long"], - [this.additional_peers_count ?? null, "number", "flags.3?int"], - [this.launch_msg_id, "number", "int"], - [this.winners_count, "number", "int"], - [this.unclaimed_count, "number", "int"], - [this.winners, ["bigint"], "Vector"], - [this.months, "number", "int"], - [this.prize_description ?? null, "string", "flags.1?string"], - [this.until_date, "number", "int"], - ]; - } - - constructor(params: { only_new_subscribers?: true; refunded?: true; channel_id: bigint; additional_peers_count?: number; launch_msg_id: number; winners_count: number; unclaimed_count: number; winners: Array; months: number; prize_description?: string; until_date: number }) { - super(); - this.only_new_subscribers = params.only_new_subscribers; - this.refunded = params.refunded; - this.channel_id = params.channel_id; - this.additional_peers_count = params.additional_peers_count; - this.launch_msg_id = params.launch_msg_id; - this.winners_count = params.winners_count; - this.unclaimed_count = params.unclaimed_count; - this.winners = params.winners; - this.months = params.months; - this.prize_description = params.prize_description; - this.until_date = params.until_date; - } -} - -/** Empty constructor. */ -export class MessageActionEmpty_ extends _MessageAction_ { - protected get [id](): number { - return 0xB6AEF7B0; - } - - static get [name](): string { - return "messageActionEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Group created */ -export class MessageActionChatCreate_ extends _MessageAction_ { - /** Group name */ - title: string; - /** List of group members */ - users: Array; - - protected get [id](): number { - return 0xBD47CBAD; - } - - static get [name](): string { - return "messageActionChatCreate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ["users", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - [this.users, ["bigint"], "Vector"], - ]; - } - - constructor(params: { title: string; users: Array }) { - super(); - this.title = params.title; - this.users = params.users; - } -} - -/** Group name changed. */ -export class MessageActionChatEditTitle_ extends _MessageAction_ { - /** New group name */ - title: string; - - protected get [id](): number { - return 0xB5A1CE5A; - } - - static get [name](): string { - return "messageActionChatEditTitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - ]; - } - - constructor(params: { title: string }) { - super(); - this.title = params.title; - } -} - -/** Group profile changed */ -export class MessageActionChatEditPhoto_ extends _MessageAction_ { - /** New group profile photo */ - photo: enums.Photo; - - protected get [id](): number { - return 0x7FCB13A8; - } - - static get [name](): string { - return "messageActionChatEditPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["photo", _Photo_, "Photo"], - ]; - } - - protected get [params](): Params { - return [ - [this.photo, _Photo_, "Photo"], - ]; - } - - constructor(params: { photo: enums.Photo }) { - super(); - this.photo = params.photo; - } -} - -/** Group profile photo removed. */ -export class MessageActionChatDeletePhoto_ extends _MessageAction_ { - protected get [id](): number { - return 0x95E3FBEF; - } - - static get [name](): string { - return "messageActionChatDeletePhoto" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** New member in the group */ -export class MessageActionChatAddUser_ extends _MessageAction_ { - /** Users that were invited to the chat */ - users: Array; - - protected get [id](): number { - return 0x15CEFD00; - } - - static get [name](): string { - return "messageActionChatAddUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["users", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.users, ["bigint"], "Vector"], - ]; - } - - constructor(params: { users: Array }) { - super(); - this.users = params.users; - } -} - -/** User left the group. */ -export class MessageActionChatDeleteUser_ extends _MessageAction_ { - /** Leaving user ID */ - user_id: bigint; - - protected get [id](): number { - return 0xA43F30CC; - } - - static get [name](): string { - return "messageActionChatDeleteUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint }) { - super(); - this.user_id = params.user_id; - } -} - -/** A user joined the chat via an invite link */ -export class MessageActionChatJoinedByLink_ extends _MessageAction_ { - /** ID of the user that created the invite link */ - inviter_id: bigint; - - protected get [id](): number { - return 0x031224C3; - } - - static get [name](): string { - return "messageActionChatJoinedByLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["inviter_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.inviter_id, "bigint", "long"], - ]; - } - - constructor(params: { inviter_id: bigint }) { - super(); - this.inviter_id = params.inviter_id; - } -} - -/** The channel was created */ -export class MessageActionChannelCreate_ extends _MessageAction_ { - /** Original channel/supergroup title */ - title: string; - - protected get [id](): number { - return 0x95D2AC92; - } - - static get [name](): string { - return "messageActionChannelCreate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - ]; - } - - constructor(params: { title: string }) { - super(); - this.title = params.title; - } -} - -/** Indicates the chat was [migrated](https://core.telegram.org/api/channel) to the specified supergroup */ -export class MessageActionChatMigrateTo_ extends _MessageAction_ { - /** The supergroup it was migrated to */ - channel_id: bigint; - - protected get [id](): number { - return 0xE1037F92; - } - - static get [name](): string { - return "messageActionChatMigrateTo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - ]; - } - - constructor(params: { channel_id: bigint }) { - super(); - this.channel_id = params.channel_id; - } -} - -/** Indicates the channel was [migrated](https://core.telegram.org/api/channel) from the specified chat */ -export class MessageActionChannelMigrateFrom_ extends _MessageAction_ { - /** The old chat title */ - title: string; - /** The old chat ID */ - chat_id: bigint; - - protected get [id](): number { - return 0xEA3948E9; - } - - static get [name](): string { - return "messageActionChannelMigrateFrom" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { title: string; chat_id: bigint }) { - super(); - this.title = params.title; - this.chat_id = params.chat_id; - } -} - -/** A message was pinned */ -export class MessageActionPinMessage_ extends _MessageAction_ { - protected get [id](): number { - return 0x94BD38ED; - } - - static get [name](): string { - return "messageActionPinMessage" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Chat history was cleared */ -export class MessageActionHistoryClear_ extends _MessageAction_ { - protected get [id](): number { - return 0x9FBAB604; - } - - static get [name](): string { - return "messageActionHistoryClear" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Someone scored in a game */ -export class MessageActionGameScore_ extends _MessageAction_ { - /** Game ID */ - game_id: bigint; - /** Score */ - score: number; - - protected get [id](): number { - return 0x92A72876; - } - - static get [name](): string { - return "messageActionGameScore" - } - - static get [paramDesc](): ParamDesc { - return [ - ["game_id", "bigint", "long"], - ["score", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.game_id, "bigint", "long"], - [this.score, "number", "int"], - ]; - } - - constructor(params: { game_id: bigint; score: number }) { - super(); - this.game_id = params.game_id; - this.score = params.score; - } -} - -/** A user just sent a payment to me (a bot) */ -export class MessageActionPaymentSentMe_ extends _MessageAction_ { - /** Whether this is the first payment of a recurring payment we just subscribed to */ - recurring_init?: true; - /** Whether this payment is part of a recurring payment */ - recurring_used?: true; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - total_amount: bigint; - /** Bot specified invoice payload */ - payload: Uint8Array; - /** Order info provided by the user */ - info?: enums.PaymentRequestedInfo; - /** Identifier of the shipping option chosen by the user */ - shipping_option_id?: string; - /** Provider payment identifier */ - charge: enums.PaymentCharge; - - protected get [id](): number { - return 0x8F31B327; - } - - static get [name](): string { - return "messageActionPaymentSentMe" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["recurring_init", "true", "flags.2?true"], - ["recurring_used", "true", "flags.3?true"], - ["currency", "string", "string"], - ["total_amount", "bigint", "long"], - ["payload", Uint8Array, "bytes"], - ["info", _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - ["shipping_option_id", "string", "flags.1?string"], - ["charge", _PaymentCharge_, "PaymentCharge"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.recurring_init ?? null, "true", "flags.2?true"], - [this.recurring_used ?? null, "true", "flags.3?true"], - [this.currency, "string", "string"], - [this.total_amount, "bigint", "long"], - [this.payload, Uint8Array, "bytes"], - [this.info ?? null, _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - [this.shipping_option_id ?? null, "string", "flags.1?string"], - [this.charge, _PaymentCharge_, "PaymentCharge"], - ]; - } - - constructor(params: { recurring_init?: true; recurring_used?: true; currency: string; total_amount: bigint; payload: Uint8Array; info?: enums.PaymentRequestedInfo; shipping_option_id?: string; charge: enums.PaymentCharge }) { - super(); - this.recurring_init = params.recurring_init; - this.recurring_used = params.recurring_used; - this.currency = params.currency; - this.total_amount = params.total_amount; - this.payload = params.payload; - this.info = params.info; - this.shipping_option_id = params.shipping_option_id; - this.charge = params.charge; - } -} - -/** A payment was sent */ -export class MessageActionPaymentSent_ extends _MessageAction_ { - /** Whether this is the first payment of a recurring payment we just subscribed to */ - recurring_init?: true; - /** Whether this payment is part of a recurring payment */ - recurring_used?: true; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - total_amount: bigint; - /** An invoice slug taken from an [invoice deep link](https://core.telegram.org/api/links#invoice-links) or from the [`premium_invoice_slug` app config parameter »](https://core.telegram.org/api/config#premium-invoice-slug) */ - invoice_slug?: string; - - protected get [id](): number { - return 0x96163F56; - } - - static get [name](): string { - return "messageActionPaymentSent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["recurring_init", "true", "flags.2?true"], - ["recurring_used", "true", "flags.3?true"], - ["currency", "string", "string"], - ["total_amount", "bigint", "long"], - ["invoice_slug", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.recurring_init ?? null, "true", "flags.2?true"], - [this.recurring_used ?? null, "true", "flags.3?true"], - [this.currency, "string", "string"], - [this.total_amount, "bigint", "long"], - [this.invoice_slug ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { recurring_init?: true; recurring_used?: true; currency: string; total_amount: bigint; invoice_slug?: string }) { - super(); - this.recurring_init = params.recurring_init; - this.recurring_used = params.recurring_used; - this.currency = params.currency; - this.total_amount = params.total_amount; - this.invoice_slug = params.invoice_slug; - } -} - -/** A phone call */ -export class MessageActionPhoneCall_ extends _MessageAction_ { - /** Is this a video call? */ - video?: true; - /** Call ID */ - call_id: bigint; - /** If the call has ended, the reason why it ended */ - reason?: enums.PhoneCallDiscardReason; - /** Duration of the call in seconds */ - duration?: number; - - protected get [id](): number { - return 0x80E11A7F; - } - - static get [name](): string { - return "messageActionPhoneCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["video", "true", "flags.2?true"], - ["call_id", "bigint", "long"], - ["reason", _PhoneCallDiscardReason_, "flags.0?PhoneCallDiscardReason"], - ["duration", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.video ?? null, "true", "flags.2?true"], - [this.call_id, "bigint", "long"], - [this.reason ?? null, _PhoneCallDiscardReason_, "flags.0?PhoneCallDiscardReason"], - [this.duration ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { video?: true; call_id: bigint; reason?: enums.PhoneCallDiscardReason; duration?: number }) { - super(); - this.video = params.video; - this.call_id = params.call_id; - this.reason = params.reason; - this.duration = params.duration; - } -} - -/** A screenshot of the chat was taken */ -export class MessageActionScreenshotTaken_ extends _MessageAction_ { - protected get [id](): number { - return 0x4792929B; - } - - static get [name](): string { - return "messageActionScreenshotTaken" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Custom action (most likely not supported by the current layer, an upgrade might be needed) */ -export class MessageActionCustomAction_ extends _MessageAction_ { - /** Action message */ - message: string; - - protected get [id](): number { - return 0xFAE69F56; - } - - static get [name](): string { - return "messageActionCustomAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, "string", "string"], - ]; - } - - constructor(params: { message: string }) { - super(); - this.message = params.message; - } -} - -/** We have given the bot permission to send us direct messages. */ -export class MessageActionBotAllowed_ extends _MessageAction_ { - /** We have authorized the bot to send us messages by installing the bot's [attachment menu](https://core.telegram.org/api/bots/attach). */ - attach_menu?: true; - /** We have allowed the bot to send us messages using [bots.allowSendMessage »](https://core.telegram.org/method/bots.allowSendMessage). */ - from_request?: true; - /** We have authorized the bot to send us messages by logging into a website via [Telegram Login »](https://core.telegram.org/widgets/login); this field contains the domain name of the website on which the user has logged in. */ - domain?: string; - /** We have authorized the bot to send us messages by opening the specified [bot mini app](https://core.telegram.org/api/bots/webapps). */ - app?: enums.BotApp; - - protected get [id](): number { - return 0xC516D679; - } - - static get [name](): string { - return "messageActionBotAllowed" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["attach_menu", "true", "flags.1?true"], - ["from_request", "true", "flags.3?true"], - ["domain", "string", "flags.0?string"], - ["app", _BotApp_, "flags.2?BotApp"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.attach_menu ?? null, "true", "flags.1?true"], - [this.from_request ?? null, "true", "flags.3?true"], - [this.domain ?? null, "string", "flags.0?string"], - [this.app ?? null, _BotApp_, "flags.2?BotApp"], - ]; - } - - constructor(params?: { attach_menu?: true; from_request?: true; domain?: string; app?: enums.BotApp }) { - super(); - this.attach_menu = params?.attach_menu; - this.from_request = params?.from_request; - this.domain = params?.domain; - this.app = params?.app; - } -} - -/** Secure [telegram passport](https://core.telegram.org/passport) values were received */ -export class MessageActionSecureValuesSentMe_ extends _MessageAction_ { - /** Vector with information about documents and other Telegram Passport elements that were shared with the bot */ - values: Array; - /** Encrypted credentials required to decrypt the data */ - credentials: enums.SecureCredentialsEncrypted; - - protected get [id](): number { - return 0x1B287353; - } - - static get [name](): string { - return "messageActionSecureValuesSentMe" - } - - static get [paramDesc](): ParamDesc { - return [ - ["values", [_SecureValue_], "Vector"], - ["credentials", _SecureCredentialsEncrypted_, "SecureCredentialsEncrypted"], - ]; - } - - protected get [params](): Params { - return [ - [this.values, [_SecureValue_], "Vector"], - [this.credentials, _SecureCredentialsEncrypted_, "SecureCredentialsEncrypted"], - ]; - } - - constructor(params: { values: Array; credentials: enums.SecureCredentialsEncrypted }) { - super(); - this.values = params.values; - this.credentials = params.credentials; - } -} - -/** Request for secure [telegram passport](https://core.telegram.org/passport) values was sent */ -export class MessageActionSecureValuesSent_ extends _MessageAction_ { - /** Secure value types */ - types: Array; - - protected get [id](): number { - return 0xD95C6154; - } - - static get [name](): string { - return "messageActionSecureValuesSent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["types", [_SecureValueType_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.types, [_SecureValueType_], "Vector"], - ]; - } - - constructor(params: { types: Array }) { - super(); - this.types = params.types; - } -} - -/** A contact just signed up to telegram */ -export class MessageActionContactSignUp_ extends _MessageAction_ { - protected get [id](): number { - return 0xF3F25F76; - } - - static get [name](): string { - return "messageActionContactSignUp" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A user of the chat is now in proximity of another user */ -export class MessageActionGeoProximityReached_ extends _MessageAction_ { - /** The user or chat that is now in proximity of `to_id` */ - from_id: enums.Peer; - /** The user or chat that subscribed to [live geolocation proximity alerts](https://core.telegram.org/api/live-location#proximity-alert) */ - to_id: enums.Peer; - /** Distance, in meters (0-100000) */ - distance: number; - - protected get [id](): number { - return 0x98E0D697; - } - - static get [name](): string { - return "messageActionGeoProximityReached" - } - - static get [paramDesc](): ParamDesc { - return [ - ["from_id", _Peer_, "Peer"], - ["to_id", _Peer_, "Peer"], - ["distance", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.from_id, _Peer_, "Peer"], - [this.to_id, _Peer_, "Peer"], - [this.distance, "number", "int"], - ]; - } - - constructor(params: { from_id: enums.Peer; to_id: enums.Peer; distance: number }) { - super(); - this.from_id = params.from_id; - this.to_id = params.to_id; - this.distance = params.distance; - } -} - -/** The group call has ended */ -export class MessageActionGroupCall_ extends _MessageAction_ { - /** Group call */ - call: enums.InputGroupCall; - /** Group call duration */ - duration?: number; - - protected get [id](): number { - return 0x7A0D7F42; - } - - static get [name](): string { - return "messageActionGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["call", _InputGroupCall_, "InputGroupCall"], - ["duration", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.call, _InputGroupCall_, "InputGroupCall"], - [this.duration ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; duration?: number }) { - super(); - this.call = params.call; - this.duration = params.duration; - } -} - -/** A set of users was invited to the group call */ -export class MessageActionInviteToGroupCall_ extends _MessageAction_ { - /** The group call */ - call: enums.InputGroupCall; - /** The invited users */ - users: Array; - - protected get [id](): number { - return 0x502F92F7; - } - - static get [name](): string { - return "messageActionInviteToGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", _InputGroupCall_, "InputGroupCall"], - ["users", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, _InputGroupCall_, "InputGroupCall"], - [this.users, ["bigint"], "Vector"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; users: Array }) { - super(); - this.call = params.call; - this.users = params.users; - } -} - -/** The Time-To-Live of messages in this chat was changed. */ -export class MessageActionSetMessagesTTL_ extends _MessageAction_ { - /** New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled. */ - period: number; - /** If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the [default TTL settings enabled »](https://core.telegram.org/method/messages.setDefaultHistoryTTL). For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with `auto_setting_from=our_userid`) will be emitted before our first message. */ - auto_setting_from?: bigint; - - protected get [id](): number { - return 0x3C134D7B; - } - - static get [name](): string { - return "messageActionSetMessagesTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["period", "number", "int"], - ["auto_setting_from", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.period, "number", "int"], - [this.auto_setting_from ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params: { period: number; auto_setting_from?: bigint }) { - super(); - this.period = params.period; - this.auto_setting_from = params.auto_setting_from; - } -} - -/** A group call was scheduled */ -export class MessageActionGroupCallScheduled_ extends _MessageAction_ { - /** The group call */ - call: enums.InputGroupCall; - /** When is this group call scheduled to start */ - schedule_date: number; - - protected get [id](): number { - return 0xB3A07661; - } - - static get [name](): string { - return "messageActionGroupCallScheduled" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", _InputGroupCall_, "InputGroupCall"], - ["schedule_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, _InputGroupCall_, "InputGroupCall"], - [this.schedule_date, "number", "int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; schedule_date: number }) { - super(); - this.call = params.call; - this.schedule_date = params.schedule_date; - } -} - -/** The chat theme was changed */ -export class MessageActionSetChatTheme_ extends _MessageAction_ { - /** The emoji that identifies a chat theme */ - emoticon: string; - - protected get [id](): number { - return 0xAA786345; - } - - static get [name](): string { - return "messageActionSetChatTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { emoticon: string }) { - super(); - this.emoticon = params.emoticon; - } -} - -/** A user was accepted into the group by an admin */ -export class MessageActionChatJoinedByRequest_ extends _MessageAction_ { - protected get [id](): number { - return 0xEBBCA3CB; - } - - static get [name](): string { - return "messageActionChatJoinedByRequest" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Data from an opened [reply keyboard bot mini app](https://core.telegram.org/api/bots/webapps) was relayed to the bot that owns it (bot side service message). */ -export class MessageActionWebViewDataSentMe_ extends _MessageAction_ { - /** Text of the [keyboardButtonSimpleWebView](https://core.telegram.org/constructor/keyboardButtonSimpleWebView) that was pressed to open the web app. */ - text: string; - /** Relayed data. */ - data: string; - - protected get [id](): number { - return 0x47DD8079; - } - - static get [name](): string { - return "messageActionWebViewDataSentMe" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["data", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.data, "string", "string"], - ]; - } - - constructor(params: { text: string; data: string }) { - super(); - this.text = params.text; - this.data = params.data; - } -} - -/** Data from an opened [reply keyboard bot mini app](https://core.telegram.org/api/bots/webapps) was relayed to the bot that owns it (user side service message). */ -export class MessageActionWebViewDataSent_ extends _MessageAction_ { - /** Text of the [keyboardButtonSimpleWebView](https://core.telegram.org/constructor/keyboardButtonSimpleWebView) that was pressed to open the web app. */ - text: string; - - protected get [id](): number { - return 0xB4C38CB5; - } - - static get [name](): string { - return "messageActionWebViewDataSent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** Info about a gifted Telegram Premium subscription */ -export class MessageActionGiftPremium_ extends _MessageAction_ { - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - /** Duration of the gifted Telegram Premium subscription */ - months: number; - /** If the gift was bought using a cryptocurrency, the cryptocurrency name. */ - crypto_currency?: string; - /** If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency. */ - crypto_amount?: bigint; - - protected get [id](): number { - return 0xC83D6AEC; - } - - static get [name](): string { - return "messageActionGiftPremium" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ["months", "number", "int"], - ["crypto_currency", "string", "flags.0?string"], - ["crypto_amount", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - [this.months, "number", "int"], - [this.crypto_currency ?? null, "string", "flags.0?string"], - [this.crypto_amount ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params: { currency: string; amount: bigint; months: number; crypto_currency?: string; crypto_amount?: bigint }) { - super(); - this.currency = params.currency; - this.amount = params.amount; - this.months = params.months; - this.crypto_currency = params.crypto_currency; - this.crypto_amount = params.crypto_amount; - } -} - -/** A [forum topic](https://core.telegram.org/api/forum#forum-topics) was created. */ -export class MessageActionTopicCreate_ extends _MessageAction_ { - /** Topic name. */ - title: string; - /** If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of `0x6FB9F0`, `0xFFD67E`, `0xCB86DB`, `0x8EEE98`, `0xFF93B2`, or `0xFB6F5F`. */ - icon_color: number; - /** ID of the [custom emoji](https://core.telegram.org/api/custom-emoji) used as topic icon. */ - icon_emoji_id?: bigint; - - protected get [id](): number { - return 0x0D999256; - } - - static get [name](): string { - return "messageActionTopicCreate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["icon_color", "number", "int"], - ["icon_emoji_id", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.icon_color, "number", "int"], - [this.icon_emoji_id ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params: { title: string; icon_color: number; icon_emoji_id?: bigint }) { - super(); - this.title = params.title; - this.icon_color = params.icon_color; - this.icon_emoji_id = params.icon_emoji_id; - } -} - -/** [Forum topic](https://core.telegram.org/api/forum#forum-topics) information was edited. */ -export class MessageActionTopicEdit_ extends _MessageAction_ { - /** New topic title. */ - title?: string; - /** ID of the new [custom emoji](https://core.telegram.org/api/custom-emoji) used as topic icon, or if it was removed. */ - icon_emoji_id?: bigint; - /** Whether the topic was opened or closed. */ - closed?: boolean; - /** Whether the topic was hidden or unhidden (only valid for the "General" topic, `id=1`). */ - hidden?: boolean; - - protected get [id](): number { - return 0xC0944820; - } - - static get [name](): string { - return "messageActionTopicEdit" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "flags.0?string"], - ["icon_emoji_id", "bigint", "flags.1?long"], - ["closed", "boolean", "flags.2?Bool"], - ["hidden", "boolean", "flags.3?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title ?? null, "string", "flags.0?string"], - [this.icon_emoji_id ?? null, "bigint", "flags.1?long"], - [this.closed ?? null, "boolean", "flags.2?Bool"], - [this.hidden ?? null, "boolean", "flags.3?Bool"], - ]; - } - - constructor(params?: { title?: string; icon_emoji_id?: bigint; closed?: boolean; hidden?: boolean }) { - super(); - this.title = params?.title; - this.icon_emoji_id = params?.icon_emoji_id; - this.closed = params?.closed; - this.hidden = params?.hidden; - } -} - -/** A new profile picture was suggested using [photos.uploadContactProfilePhoto](https://core.telegram.org/method/photos.uploadContactProfilePhoto). */ -export class MessageActionSuggestProfilePhoto_ extends _MessageAction_ { - /** The photo that the user suggested we set as profile picture. */ - photo: enums.Photo; - - protected get [id](): number { - return 0x57DE635E; - } - - static get [name](): string { - return "messageActionSuggestProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["photo", _Photo_, "Photo"], - ]; - } - - protected get [params](): Params { - return [ - [this.photo, _Photo_, "Photo"], - ]; - } - - constructor(params: { photo: enums.Photo }) { - super(); - this.photo = params.photo; - } -} - -/** Contains info about one or more peers that the user shared with the bot after clicking on a [keyboardButtonRequestPeer](https://core.telegram.org/constructor/keyboardButtonRequestPeer) button. */ -export class MessageActionRequestedPeer_ extends _MessageAction_ { - /** `button_id` contained in the [keyboardButtonRequestPeer](https://core.telegram.org/constructor/keyboardButtonRequestPeer) */ - button_id: number; - /** The shared peers */ - peers: Array; - - protected get [id](): number { - return 0x31518E9B; - } - - static get [name](): string { - return "messageActionRequestedPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["button_id", "number", "int"], - ["peers", [_Peer_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.button_id, "number", "int"], - [this.peers, [_Peer_], "Vector"], - ]; - } - - constructor(params: { button_id: number; peers: Array }) { - super(); - this.button_id = params.button_id; - this.peers = params.peers; - } -} - -/** The [wallpaper »](https://core.telegram.org/api/wallpapers) of the current chat was changed. */ -export class MessageActionSetChatWallPaper_ extends _MessageAction_ { - /** If set, indicates the user applied a [wallpaper »](https://core.telegram.org/api/wallpapers) previously sent by the other user in a [messageActionSetChatWallPaper](https://core.telegram.org/constructor/messageActionSetChatWallPaper) message. */ - same?: true; - /** If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side. - If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking [messages.setChatWallPaper](https://core.telegram.org/method/messages.setChatWallPaper), providing only the `revert` flag (and obviously the `peer` parameter). */ - for_both?: true; - /** New [wallpaper](https://core.telegram.org/api/wallpapers) */ - wallpaper: enums.WallPaper; - - protected get [id](): number { - return 0x5060A3F4; - } - - static get [name](): string { - return "messageActionSetChatWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["same", "true", "flags.0?true"], - ["for_both", "true", "flags.1?true"], - ["wallpaper", _WallPaper_, "WallPaper"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.same ?? null, "true", "flags.0?true"], - [this.for_both ?? null, "true", "flags.1?true"], - [this.wallpaper, _WallPaper_, "WallPaper"], - ]; - } - - constructor(params: { same?: true; for_both?: true; wallpaper: enums.WallPaper }) { - super(); - this.same = params.same; - this.for_both = params.for_both; - this.wallpaper = params.wallpaper; - } -} - -/** Contains a [Telegram Premium giftcode link](https://core.telegram.org/api/links#premium-giftcode-links). */ -export class MessageActionGiftCode_ extends _MessageAction_ { - /** If set, this gift code was received from a [giveaway »](https://core.telegram.org/api/giveaways) started by a channel we're subscribed to. */ - via_giveaway?: true; - /** If set, the link was not [redeemed](https://core.telegram.org/api/links#premium-giftcode-links) yet. */ - unclaimed?: true; - /** Identifier of the channel that created the gift code [either directly or through a giveaway](https://core.telegram.org/api/giveaways): if we import this giftcode link, we will also automatically [boost](https://core.telegram.org/api/boost) this channel. */ - boost_peer?: enums.Peer; - /** Duration in months of the gifted [Telegram Premium subscription](https://core.telegram.org/api/premium). */ - months: number; - /** Slug of the [Telegram Premium giftcode link](https://core.telegram.org/api/links#premium-giftcode-links) */ - slug: string; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency?: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount?: bigint; - /** If set, the gift was made using the specified cryptocurrency. */ - crypto_currency?: string; - /** If `crypto_currency` is set, contains the paid amount, in the smallest units of the cryptocurrency. */ - crypto_amount?: bigint; - - protected get [id](): number { - return 0x678C2E09; - } - - static get [name](): string { - return "messageActionGiftCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["via_giveaway", "true", "flags.0?true"], - ["unclaimed", "true", "flags.2?true"], - ["boost_peer", _Peer_, "flags.1?Peer"], - ["months", "number", "int"], - ["slug", "string", "string"], - ["currency", "string", "flags.2?string"], - ["amount", "bigint", "flags.2?long"], - ["crypto_currency", "string", "flags.3?string"], - ["crypto_amount", "bigint", "flags.3?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.via_giveaway ?? null, "true", "flags.0?true"], - [this.unclaimed ?? null, "true", "flags.2?true"], - [this.boost_peer ?? null, _Peer_, "flags.1?Peer"], - [this.months, "number", "int"], - [this.slug, "string", "string"], - [this.currency ?? null, "string", "flags.2?string"], - [this.amount ?? null, "bigint", "flags.2?long"], - [this.crypto_currency ?? null, "string", "flags.3?string"], - [this.crypto_amount ?? null, "bigint", "flags.3?long"], - ]; - } - - constructor(params: { via_giveaway?: true; unclaimed?: true; boost_peer?: enums.Peer; months: number; slug: string; currency?: string; amount?: bigint; crypto_currency?: string; crypto_amount?: bigint }) { - super(); - this.via_giveaway = params.via_giveaway; - this.unclaimed = params.unclaimed; - this.boost_peer = params.boost_peer; - this.months = params.months; - this.slug = params.slug; - this.currency = params.currency; - this.amount = params.amount; - this.crypto_currency = params.crypto_currency; - this.crypto_amount = params.crypto_amount; - } -} - -/** A [giveaway](https://core.telegram.org/api/giveaways) was started. */ -export class MessageActionGiveawayLaunch_ extends _MessageAction_ { - protected get [id](): number { - return 0x332BA9ED; - } - - static get [name](): string { - return "messageActionGiveawayLaunch" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A [giveaway](https://core.telegram.org/api/giveaways) has ended. */ -export class MessageActionGiveawayResults_ extends _MessageAction_ { - /** Number of winners in the giveaway */ - winners_count: number; - /** Number of undistributed prizes */ - unclaimed_count: number; - - protected get [id](): number { - return 0x2A9FADC5; - } - - static get [name](): string { - return "messageActionGiveawayResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["winners_count", "number", "int"], - ["unclaimed_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.winners_count, "number", "int"], - [this.unclaimed_count, "number", "int"], - ]; - } - - constructor(params: { winners_count: number; unclaimed_count: number }) { - super(); - this.winners_count = params.winners_count; - this.unclaimed_count = params.unclaimed_count; - } -} - -export class MessageActionBoostApply_ extends _MessageAction_ { - boosts: number; - - protected get [id](): number { - return 0xCC02AA6D; - } - - static get [name](): string { - return "messageActionBoostApply" - } - - static get [paramDesc](): ParamDesc { - return [ - ["boosts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.boosts, "number", "int"], - ]; - } - - constructor(params: { boosts: number }) { - super(); - this.boosts = params.boosts; - } -} - -export class MessageActionRequestedPeerSentMe_ extends _MessageAction_ { - button_id: number; - peers: Array; - - protected get [id](): number { - return 0x93B31848; - } - - static get [name](): string { - return "messageActionRequestedPeerSentMe" - } - - static get [paramDesc](): ParamDesc { - return [ - ["button_id", "number", "int"], - ["peers", [_RequestedPeer_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.button_id, "number", "int"], - [this.peers, [_RequestedPeer_], "Vector"], - ]; - } - - constructor(params: { button_id: number; peers: Array }) { - super(); - this.button_id = params.button_id; - this.peers = params.peers; - } -} - -/** Chat */ -export class Dialog_ extends _Dialog_ { - /** Is the dialog pinned */ - pinned?: true; - /** Whether the chat was manually marked as unread */ - unread_mark?: true; - /** Users may also choose to display messages from all topics of a [forum](https://core.telegram.org/api/forum) as if they were sent to a normal group, using a "View as messages" setting in the local client. - This setting only affects the current account, and is synced to other logged in sessions using the [channels.toggleViewForumAsMessages](https://core.telegram.org/method/channels.toggleViewForumAsMessages) method; invoking this method will update the value of this flag. */ - view_forum_as_messages?: true; - /** The chat */ - peer: enums.Peer; - /** The latest message ID */ - top_message: number; - /** Position up to which all incoming messages are read. */ - read_inbox_max_id: number; - /** Position up to which all outgoing messages are read. */ - read_outbox_max_id: number; - /** Number of unread messages */ - unread_count: number; - /** Number of [unread mentions](https://core.telegram.org/api/mentions) */ - unread_mentions_count: number; - /** Number of unread reactions to messages you sent */ - unread_reactions_count: number; - /** Notification settings */ - notify_settings: enums.PeerNotifySettings; - /** [PTS](https://core.telegram.org/api/updates) */ - pts?: number; - /** Message [draft](https://core.telegram.org/api/drafts) */ - draft?: enums.DraftMessage; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Time-to-live of all messages sent in this dialog */ - ttl_period?: number; - - protected get [id](): number { - return 0xD58A08C6; - } - - static get [name](): string { - return "dialog" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.2?true"], - ["unread_mark", "true", "flags.3?true"], - ["view_forum_as_messages", "true", "flags.6?true"], - ["peer", _Peer_, "Peer"], - ["top_message", "number", "int"], - ["read_inbox_max_id", "number", "int"], - ["read_outbox_max_id", "number", "int"], - ["unread_count", "number", "int"], - ["unread_mentions_count", "number", "int"], - ["unread_reactions_count", "number", "int"], - ["notify_settings", _PeerNotifySettings_, "PeerNotifySettings"], - ["pts", "number", "flags.0?int"], - ["draft", _DraftMessage_, "flags.1?DraftMessage"], - ["folder_id", "number", "flags.4?int"], - ["ttl_period", "number", "flags.5?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.2?true"], - [this.unread_mark ?? null, "true", "flags.3?true"], - [this.view_forum_as_messages ?? null, "true", "flags.6?true"], - [this.peer, _Peer_, "Peer"], - [this.top_message, "number", "int"], - [this.read_inbox_max_id, "number", "int"], - [this.read_outbox_max_id, "number", "int"], - [this.unread_count, "number", "int"], - [this.unread_mentions_count, "number", "int"], - [this.unread_reactions_count, "number", "int"], - [this.notify_settings, _PeerNotifySettings_, "PeerNotifySettings"], - [this.pts ?? null, "number", "flags.0?int"], - [this.draft ?? null, _DraftMessage_, "flags.1?DraftMessage"], - [this.folder_id ?? null, "number", "flags.4?int"], - [this.ttl_period ?? null, "number", "flags.5?int"], - ]; - } - - constructor(params: { pinned?: true; unread_mark?: true; view_forum_as_messages?: true; peer: enums.Peer; top_message: number; read_inbox_max_id: number; read_outbox_max_id: number; unread_count: number; unread_mentions_count: number; unread_reactions_count: number; notify_settings: enums.PeerNotifySettings; pts?: number; draft?: enums.DraftMessage; folder_id?: number; ttl_period?: number }) { - super(); - this.pinned = params.pinned; - this.unread_mark = params.unread_mark; - this.view_forum_as_messages = params.view_forum_as_messages; - this.peer = params.peer; - this.top_message = params.top_message; - this.read_inbox_max_id = params.read_inbox_max_id; - this.read_outbox_max_id = params.read_outbox_max_id; - this.unread_count = params.unread_count; - this.unread_mentions_count = params.unread_mentions_count; - this.unread_reactions_count = params.unread_reactions_count; - this.notify_settings = params.notify_settings; - this.pts = params.pts; - this.draft = params.draft; - this.folder_id = params.folder_id; - this.ttl_period = params.ttl_period; - } -} - -/** Dialog in folder */ -export class DialogFolder_ extends _Dialog_ { - /** Is this folder pinned */ - pinned?: true; - /** The folder */ - folder: enums.Folder; - /** Peer in folder */ - peer: enums.Peer; - /** Latest message ID of dialog */ - top_message: number; - /** Number of unread muted peers in folder */ - unread_muted_peers_count: number; - /** Number of unread unmuted peers in folder */ - unread_unmuted_peers_count: number; - /** Number of unread messages from muted peers in folder */ - unread_muted_messages_count: number; - /** Number of unread messages from unmuted peers in folder */ - unread_unmuted_messages_count: number; - - protected get [id](): number { - return 0x71BD134C; - } - - static get [name](): string { - return "dialogFolder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.2?true"], - ["folder", _Folder_, "Folder"], - ["peer", _Peer_, "Peer"], - ["top_message", "number", "int"], - ["unread_muted_peers_count", "number", "int"], - ["unread_unmuted_peers_count", "number", "int"], - ["unread_muted_messages_count", "number", "int"], - ["unread_unmuted_messages_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.2?true"], - [this.folder, _Folder_, "Folder"], - [this.peer, _Peer_, "Peer"], - [this.top_message, "number", "int"], - [this.unread_muted_peers_count, "number", "int"], - [this.unread_unmuted_peers_count, "number", "int"], - [this.unread_muted_messages_count, "number", "int"], - [this.unread_unmuted_messages_count, "number", "int"], - ]; - } - - constructor(params: { pinned?: true; folder: enums.Folder; peer: enums.Peer; top_message: number; unread_muted_peers_count: number; unread_unmuted_peers_count: number; unread_muted_messages_count: number; unread_unmuted_messages_count: number }) { - super(); - this.pinned = params.pinned; - this.folder = params.folder; - this.peer = params.peer; - this.top_message = params.top_message; - this.unread_muted_peers_count = params.unread_muted_peers_count; - this.unread_unmuted_peers_count = params.unread_unmuted_peers_count; - this.unread_muted_messages_count = params.unread_muted_messages_count; - this.unread_unmuted_messages_count = params.unread_unmuted_messages_count; - } -} - -/** Empty constructor, non-existent photo */ -export class PhotoEmpty_ extends _Photo_ { - /** Photo identifier */ - id: bigint; - - protected get [id](): number { - return 0x2331B22D; - } - - static get [name](): string { - return "photoEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Photo */ -export class Photo_ extends _Photo_ { - /** Whether the photo has mask stickers attached to it */ - has_stickers?: true; - /** ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** [file reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - /** Date of upload */ - date: number; - /** Available sizes for download */ - sizes: Array; - /** [For animated profiles](https://core.telegram.org/api/files#animated-profile-pictures), the MPEG4 videos */ - video_sizes?: Array; - /** DC ID to use for download */ - dc_id: number; - - protected get [id](): number { - return 0xFB197A65; - } - - static get [name](): string { - return "photo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_stickers", "true", "flags.0?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ["date", "number", "int"], - ["sizes", [_PhotoSize_], "Vector"], - ["video_sizes", [_VideoSize_], "flags.1?Vector"], - ["dc_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_stickers ?? null, "true", "flags.0?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - [this.date, "number", "int"], - [this.sizes, [_PhotoSize_], "Vector"], - [this.video_sizes ?? null, [_VideoSize_], "flags.1?Vector"], - [this.dc_id, "number", "int"], - ]; - } - - constructor(params: { has_stickers?: true; id: bigint; access_hash: bigint; file_reference: Uint8Array; date: number; sizes: Array; video_sizes?: Array; dc_id: number }) { - super(); - this.has_stickers = params.has_stickers; - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - this.date = params.date; - this.sizes = params.sizes; - this.video_sizes = params.video_sizes; - this.dc_id = params.dc_id; - } -} - -/** Empty constructor. Image with this thumbnail is unavailable. */ -export class PhotoSizeEmpty_ extends _PhotoSize_ { - /** [Thumbnail type »](https://core.telegram.org/api/files#image-thumbnail-types) */ - type: string; - - protected get [id](): number { - return 0x0E17E23C; - } - - static get [name](): string { - return "photoSizeEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, "string", "string"], - ]; - } - - constructor(params: { type: string }) { - super(); - this.type = params.type; - } -} - -/** Image description. */ -export class PhotoSize_ extends _PhotoSize_ { - /** [Thumbnail type »](https://core.telegram.org/api/files#image-thumbnail-types) */ - type: string; - /** Image width */ - w: number; - /** Image height */ - h: number; - /** File size */ - size: number; - - protected get [id](): number { - return 0x75C78E60; - } - - static get [name](): string { - return "photoSize" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", "string", "string"], - ["w", "number", "int"], - ["h", "number", "int"], - ["size", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, "string", "string"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.size, "number", "int"], - ]; - } - - constructor(params: { type: string; w: number; h: number; size: number }) { - super(); - this.type = params.type; - this.w = params.w; - this.h = params.h; - this.size = params.size; - } -} - -/** Description of an image and its content. */ -export class PhotoCachedSize_ extends _PhotoSize_ { - /** Thumbnail type */ - type: string; - /** Image width */ - w: number; - /** Image height */ - h: number; - /** Binary data, file content */ - bytes: Uint8Array; - - protected get [id](): number { - return 0x021E1AD6; - } - - static get [name](): string { - return "photoCachedSize" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", "string", "string"], - ["w", "number", "int"], - ["h", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, "string", "string"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { type: string; w: number; h: number; bytes: Uint8Array }) { - super(); - this.type = params.type; - this.w = params.w; - this.h = params.h; - this.bytes = params.bytes; - } -} - -/** A low-resolution compressed JPG payload */ -export class PhotoStrippedSize_ extends _PhotoSize_ { - /** Thumbnail type */ - type: string; - /** Thumbnail data, see [here for more info on decompression »](https://core.telegram.org/api/files#stripped-thumbnails) */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xE0B0BC2E; - } - - static get [name](): string { - return "photoStrippedSize" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", "string", "string"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, "string", "string"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { type: string; bytes: Uint8Array }) { - super(); - this.type = params.type; - this.bytes = params.bytes; - } -} - -/** Progressively encoded photosize */ -export class PhotoSizeProgressive_ extends _PhotoSize_ { - /** [Photosize type »](https://core.telegram.org/api/files#image-thumbnail-types) */ - type: string; - /** Photo width */ - w: number; - /** Photo height */ - h: number; - /** Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image. */ - sizes: Array; - - protected get [id](): number { - return 0xFA3EFB95; - } - - static get [name](): string { - return "photoSizeProgressive" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", "string", "string"], - ["w", "number", "int"], - ["h", "number", "int"], - ["sizes", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, "string", "string"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.sizes, ["number"], "Vector"], - ]; - } - - constructor(params: { type: string; w: number; h: number; sizes: Array }) { - super(); - this.type = params.type; - this.w = params.w; - this.h = params.h; - this.sizes = params.sizes; - } -} - -/** Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation. */ -export class PhotoPathSize_ extends _PhotoSize_ { - /** Always `j` */ - type: string; - /** Compressed SVG path payload, [see here for decompression instructions](https://core.telegram.org/api/files#vector-thumbnails) */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xD8214D41; - } - - static get [name](): string { - return "photoPathSize" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", "string", "string"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, "string", "string"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { type: string; bytes: Uint8Array }) { - super(); - this.type = params.type; - this.bytes = params.bytes; - } -} - -/** Empty constructor. */ -export class GeoPointEmpty_ extends _GeoPoint_ { - protected get [id](): number { - return 0x1117DD5F; - } - - static get [name](): string { - return "geoPointEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** GeoPoint. */ -export class GeoPoint_ extends _GeoPoint_ { - /** Longitude */ - long: number; - /** Latitude */ - lat: number; - /** Access hash */ - access_hash: bigint; - /** The estimated horizontal accuracy of the location, in meters; as defined by the sender. */ - accuracy_radius?: number; - - protected get [id](): number { - return 0xB2A2F663; - } - - static get [name](): string { - return "geoPoint" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["long", "number", "double"], - ["lat", "number", "double"], - ["access_hash", "bigint", "long"], - ["accuracy_radius", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.long, "number", "double"], - [this.lat, "number", "double"], - [this.access_hash, "bigint", "long"], - [this.accuracy_radius ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { long: number; lat: number; access_hash: bigint; accuracy_radius?: number }) { - super(); - this.long = params.long; - this.lat = params.lat; - this.access_hash = params.access_hash; - this.accuracy_radius = params.accuracy_radius; - } -} - -/** Contains info about a sent verification code. */ -export class auth_SentCode_ extends _auth_SentCode_ { - /** Phone code type */ - type: enums.auth.SentCodeType; - /** Phone code hash, to be stored and later re-used with [auth.signIn](https://core.telegram.org/method/auth.signIn) */ - phone_code_hash: string; - /** Phone code type that will be sent next, if the phone code is not received within `timeout` seconds: to send it use [auth.resendCode](https://core.telegram.org/method/auth.resendCode) */ - next_type?: enums.auth.CodeType; - /** Timeout for reception of the phone code */ - timeout?: number; - - protected get [id](): number { - return 0x5E002502; - } - - static get [name](): string { - return "auth.sentCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["type", _auth_SentCodeType_, "auth.SentCodeType"], - ["phone_code_hash", "string", "string"], - ["next_type", _auth_CodeType_, "flags.1?auth.CodeType"], - ["timeout", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.type, _auth_SentCodeType_, "auth.SentCodeType"], - [this.phone_code_hash, "string", "string"], - [this.next_type ?? null, _auth_CodeType_, "flags.1?auth.CodeType"], - [this.timeout ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params: { type: enums.auth.SentCodeType; phone_code_hash: string; next_type?: enums.auth.CodeType; timeout?: number }) { - super(); - this.type = params.type; - this.phone_code_hash = params.phone_code_hash; - this.next_type = params.next_type; - this.timeout = params.timeout; - } -} - -/** The user successfully authorized using [future auth tokens](https://core.telegram.org/api/auth#future-auth-tokens) */ -export class auth_SentCodeSuccess_ extends _auth_SentCode_ { - /** Authorization info */ - authorization: enums.auth.Authorization; - - protected get [id](): number { - return 0x2390FE44; - } - - static get [name](): string { - return "auth.sentCodeSuccess" - } - - static get [paramDesc](): ParamDesc { - return [ - ["authorization", _auth_Authorization_, "auth.Authorization"], - ]; - } - - protected get [params](): Params { - return [ - [this.authorization, _auth_Authorization_, "auth.Authorization"], - ]; - } - - constructor(params: { authorization: enums.auth.Authorization }) { - super(); - this.authorization = params.authorization; - } -} - -/** Contains user authorization info. */ -export class auth_Authorization_ extends _auth_Authorization_ { - /** Suggests the user to set up a 2-step verification password to be able to log in again */ - setup_password_required?: true; - /** Iff setup\_password\_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass. */ - otherwise_relogin_days?: number; - /** Temporary [passport](https://core.telegram.org/passport) sessions */ - tmp_sessions?: number; - /** A [future auth token](https://core.telegram.org/api/auth#future-auth-tokens) */ - future_auth_token?: Uint8Array; - /** Info on authorized user */ - user: enums.User; - - protected get [id](): number { - return 0x2EA2C0D4; - } - - static get [name](): string { - return "auth.authorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["setup_password_required", "true", "flags.1?true"], - ["otherwise_relogin_days", "number", "flags.1?int"], - ["tmp_sessions", "number", "flags.0?int"], - ["future_auth_token", Uint8Array, "flags.2?bytes"], - ["user", _User_, "User"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.setup_password_required ?? null, "true", "flags.1?true"], - [this.otherwise_relogin_days ?? null, "number", "flags.1?int"], - [this.tmp_sessions ?? null, "number", "flags.0?int"], - [this.future_auth_token ?? null, Uint8Array, "flags.2?bytes"], - [this.user, _User_, "User"], - ]; - } - - constructor(params: { setup_password_required?: true; otherwise_relogin_days?: number; tmp_sessions?: number; future_auth_token?: Uint8Array; user: enums.User }) { - super(); - this.setup_password_required = params.setup_password_required; - this.otherwise_relogin_days = params.otherwise_relogin_days; - this.tmp_sessions = params.tmp_sessions; - this.future_auth_token = params.future_auth_token; - this.user = params.user; - } -} - -/** An account with this phone number doesn't exist on telegram: the user has to [enter basic information and sign up](https://core.telegram.org/api/auth) */ -export class auth_AuthorizationSignUpRequired_ extends _auth_Authorization_ { - /** Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram */ - terms_of_service?: enums.help.TermsOfService; - - protected get [id](): number { - return 0x44747E9A; - } - - static get [name](): string { - return "auth.authorizationSignUpRequired" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["terms_of_service", _help_TermsOfService_, "flags.0?help.TermsOfService"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.terms_of_service ?? null, _help_TermsOfService_, "flags.0?help.TermsOfService"], - ]; - } - - constructor(params?: { terms_of_service?: enums.help.TermsOfService }) { - super(); - this.terms_of_service = params?.terms_of_service; - } -} - -/** Data for copying of authorization between data centers. */ -export class auth_ExportedAuthorization_ extends _auth_ExportedAuthorization_ { - /** current user identifier */ - id: bigint; - /** authorizes key */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xB434E2B8; - } - - static get [name](): string { - return "auth.exportedAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: bigint; bytes: Uint8Array }) { - super(); - this.id = params.id; - this.bytes = params.bytes; - } -} - -/** Notifications generated by a certain user or group. */ -export class InputNotifyPeer_ extends _InputNotifyPeer_ { - /** User or group */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xB8BC5B0C; - } - - static get [name](): string { - return "inputNotifyPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Notifications generated by all users. */ -export class InputNotifyUsers_ extends _InputNotifyPeer_ { - protected get [id](): number { - return 0x193B4417; - } - - static get [name](): string { - return "inputNotifyUsers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Notifications generated by all groups. */ -export class InputNotifyChats_ extends _InputNotifyPeer_ { - protected get [id](): number { - return 0x4A95E84E; - } - - static get [name](): string { - return "inputNotifyChats" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** All [channels](https://core.telegram.org/api/channel) */ -export class InputNotifyBroadcasts_ extends _InputNotifyPeer_ { - protected get [id](): number { - return 0xB1DB7C7E; - } - - static get [name](): string { - return "inputNotifyBroadcasts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Notifications generated by a [topic](https://core.telegram.org/api/forum#forum-topics) in a [forum](https://core.telegram.org/api/forum). */ -export class InputNotifyForumTopic_ extends _InputNotifyPeer_ { - /** Forum ID */ - peer: enums.InputPeer; - /** [Topic ID](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id: number; - - protected get [id](): number { - return 0x5C467992; - } - - static get [name](): string { - return "inputNotifyForumTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["top_msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.top_msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - } -} - -/** Notification settings. */ -export class InputPeerNotifySettings_ extends _InputPeerNotifySettings_ { - /** If the text of the message shall be displayed in notification */ - show_previews?: boolean; - /** Peer was muted? */ - silent?: boolean; - /** Date until which all notifications shall be switched off */ - mute_until?: number; - /** Identifier of an audio file to play for notifications. */ - sound?: enums.NotificationSound; - /** Whether story notifications should be disabled. */ - stories_muted?: boolean; - /** Whether the sender name should be displayed in story notifications. */ - stories_hide_sender?: boolean; - /** Identifier of an audio file to play for story notifications. */ - stories_sound?: enums.NotificationSound; - - protected get [id](): number { - return 0xCACB6AE2; - } - - static get [name](): string { - return "inputPeerNotifySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["show_previews", "boolean", "flags.0?Bool"], - ["silent", "boolean", "flags.1?Bool"], - ["mute_until", "number", "flags.2?int"], - ["sound", _NotificationSound_, "flags.3?NotificationSound"], - ["stories_muted", "boolean", "flags.6?Bool"], - ["stories_hide_sender", "boolean", "flags.7?Bool"], - ["stories_sound", _NotificationSound_, "flags.8?NotificationSound"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.show_previews ?? null, "boolean", "flags.0?Bool"], - [this.silent ?? null, "boolean", "flags.1?Bool"], - [this.mute_until ?? null, "number", "flags.2?int"], - [this.sound ?? null, _NotificationSound_, "flags.3?NotificationSound"], - [this.stories_muted ?? null, "boolean", "flags.6?Bool"], - [this.stories_hide_sender ?? null, "boolean", "flags.7?Bool"], - [this.stories_sound ?? null, _NotificationSound_, "flags.8?NotificationSound"], - ]; - } - - constructor(params?: { show_previews?: boolean; silent?: boolean; mute_until?: number; sound?: enums.NotificationSound; stories_muted?: boolean; stories_hide_sender?: boolean; stories_sound?: enums.NotificationSound }) { - super(); - this.show_previews = params?.show_previews; - this.silent = params?.silent; - this.mute_until = params?.mute_until; - this.sound = params?.sound; - this.stories_muted = params?.stories_muted; - this.stories_hide_sender = params?.stories_hide_sender; - this.stories_sound = params?.stories_sound; - } -} - -/** Notification settings. */ -export class PeerNotifySettings_ extends _PeerNotifySettings_ { - /** (Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used. */ - show_previews?: boolean; - /** (Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used. */ - silent?: boolean; - /** Mute all notifications until this date */ - mute_until?: number; - /** Notification sound for the official iOS application */ - ios_sound?: enums.NotificationSound; - /** Notification sound for the official android application */ - android_sound?: enums.NotificationSound; - /** Notification sound for other applications */ - other_sound?: enums.NotificationSound; - /** Whether story notifications should be disabled. */ - stories_muted?: boolean; - /** Whether the sender name should be displayed in story notifications. */ - stories_hide_sender?: boolean; - /** Sound for story notifications on the official iOS application */ - stories_ios_sound?: enums.NotificationSound; - /** Sound for story notifications on the official Android application */ - stories_android_sound?: enums.NotificationSound; - /** Sound for story notifications on other applications */ - stories_other_sound?: enums.NotificationSound; - - protected get [id](): number { - return 0x99622C0C; - } - - static get [name](): string { - return "peerNotifySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["show_previews", "boolean", "flags.0?Bool"], - ["silent", "boolean", "flags.1?Bool"], - ["mute_until", "number", "flags.2?int"], - ["ios_sound", _NotificationSound_, "flags.3?NotificationSound"], - ["android_sound", _NotificationSound_, "flags.4?NotificationSound"], - ["other_sound", _NotificationSound_, "flags.5?NotificationSound"], - ["stories_muted", "boolean", "flags.6?Bool"], - ["stories_hide_sender", "boolean", "flags.7?Bool"], - ["stories_ios_sound", _NotificationSound_, "flags.8?NotificationSound"], - ["stories_android_sound", _NotificationSound_, "flags.9?NotificationSound"], - ["stories_other_sound", _NotificationSound_, "flags.10?NotificationSound"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.show_previews ?? null, "boolean", "flags.0?Bool"], - [this.silent ?? null, "boolean", "flags.1?Bool"], - [this.mute_until ?? null, "number", "flags.2?int"], - [this.ios_sound ?? null, _NotificationSound_, "flags.3?NotificationSound"], - [this.android_sound ?? null, _NotificationSound_, "flags.4?NotificationSound"], - [this.other_sound ?? null, _NotificationSound_, "flags.5?NotificationSound"], - [this.stories_muted ?? null, "boolean", "flags.6?Bool"], - [this.stories_hide_sender ?? null, "boolean", "flags.7?Bool"], - [this.stories_ios_sound ?? null, _NotificationSound_, "flags.8?NotificationSound"], - [this.stories_android_sound ?? null, _NotificationSound_, "flags.9?NotificationSound"], - [this.stories_other_sound ?? null, _NotificationSound_, "flags.10?NotificationSound"], - ]; - } - - constructor(params?: { show_previews?: boolean; silent?: boolean; mute_until?: number; ios_sound?: enums.NotificationSound; android_sound?: enums.NotificationSound; other_sound?: enums.NotificationSound; stories_muted?: boolean; stories_hide_sender?: boolean; stories_ios_sound?: enums.NotificationSound; stories_android_sound?: enums.NotificationSound; stories_other_sound?: enums.NotificationSound }) { - super(); - this.show_previews = params?.show_previews; - this.silent = params?.silent; - this.mute_until = params?.mute_until; - this.ios_sound = params?.ios_sound; - this.android_sound = params?.android_sound; - this.other_sound = params?.other_sound; - this.stories_muted = params?.stories_muted; - this.stories_hide_sender = params?.stories_hide_sender; - this.stories_ios_sound = params?.stories_ios_sound; - this.stories_android_sound = params?.stories_android_sound; - this.stories_other_sound = params?.stories_other_sound; - } -} - -/** List of actions that are possible when interacting with this user, to be shown as suggested actions in the [chat action bar »](https://core.telegram.org/api/action-bar), see [here »](https://core.telegram.org/api/action-bar) for more info. */ -export class PeerSettings_ extends _PeerSettings_ { - /** Whether we can still report the user for spam */ - report_spam?: true; - /** Whether we can add the user as contact */ - add_contact?: true; - /** Whether we can block the user */ - block_contact?: true; - /** Whether we can share the user's contact */ - share_contact?: true; - /** Whether a special exception for contacts is needed */ - need_contacts_exception?: true; - /** Whether we can report a geogroup as irrelevant for this location */ - report_geo?: true; - /** Whether this peer was automatically archived according to [privacy settings](https://core.telegram.org/constructor/globalPrivacySettings) and can be unarchived */ - autoarchived?: true; - /** If set, this is a recently created group chat to which new members can be invited */ - invite_members?: true; - /** This flag is set if `request_chat_title` and `request_chat_date` fields are set and the [join request »](https://core.telegram.org/api/invites#join-requests) is related to a channel (otherwise if only the request fields are set, the [join request »](https://core.telegram.org/api/invites#join-requests) is related to a chat). */ - request_chat_broadcast?: true; - business_bot_paused?: true; - business_bot_can_reply?: true; - /** Distance in meters between us and this peer */ - geo_distance?: number; - /** If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel's title. */ - request_chat_title?: string; - /** If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the [join request »](https://core.telegram.org/api/invites#join-requests) was sent. */ - request_chat_date?: number; - business_bot_id?: bigint; - business_bot_manage_url?: string; - - protected get [id](): number { - return 0xACD66C5E; - } - - static get [name](): string { - return "peerSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["report_spam", "true", "flags.0?true"], - ["add_contact", "true", "flags.1?true"], - ["block_contact", "true", "flags.2?true"], - ["share_contact", "true", "flags.3?true"], - ["need_contacts_exception", "true", "flags.4?true"], - ["report_geo", "true", "flags.5?true"], - ["autoarchived", "true", "flags.7?true"], - ["invite_members", "true", "flags.8?true"], - ["request_chat_broadcast", "true", "flags.10?true"], - ["business_bot_paused", "true", "flags.11?true"], - ["business_bot_can_reply", "true", "flags.12?true"], - ["geo_distance", "number", "flags.6?int"], - ["request_chat_title", "string", "flags.9?string"], - ["request_chat_date", "number", "flags.9?int"], - ["business_bot_id", "bigint", "flags.13?long"], - ["business_bot_manage_url", "string", "flags.13?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.report_spam ?? null, "true", "flags.0?true"], - [this.add_contact ?? null, "true", "flags.1?true"], - [this.block_contact ?? null, "true", "flags.2?true"], - [this.share_contact ?? null, "true", "flags.3?true"], - [this.need_contacts_exception ?? null, "true", "flags.4?true"], - [this.report_geo ?? null, "true", "flags.5?true"], - [this.autoarchived ?? null, "true", "flags.7?true"], - [this.invite_members ?? null, "true", "flags.8?true"], - [this.request_chat_broadcast ?? null, "true", "flags.10?true"], - [this.business_bot_paused ?? null, "true", "flags.11?true"], - [this.business_bot_can_reply ?? null, "true", "flags.12?true"], - [this.geo_distance ?? null, "number", "flags.6?int"], - [this.request_chat_title ?? null, "string", "flags.9?string"], - [this.request_chat_date ?? null, "number", "flags.9?int"], - [this.business_bot_id ?? null, "bigint", "flags.13?long"], - [this.business_bot_manage_url ?? null, "string", "flags.13?string"], - ]; - } - - constructor(params?: { report_spam?: true; add_contact?: true; block_contact?: true; share_contact?: true; need_contacts_exception?: true; report_geo?: true; autoarchived?: true; invite_members?: true; request_chat_broadcast?: true; business_bot_paused?: true; business_bot_can_reply?: true; geo_distance?: number; request_chat_title?: string; request_chat_date?: number; business_bot_id?: bigint; business_bot_manage_url?: string }) { - super(); - this.report_spam = params?.report_spam; - this.add_contact = params?.add_contact; - this.block_contact = params?.block_contact; - this.share_contact = params?.share_contact; - this.need_contacts_exception = params?.need_contacts_exception; - this.report_geo = params?.report_geo; - this.autoarchived = params?.autoarchived; - this.invite_members = params?.invite_members; - this.request_chat_broadcast = params?.request_chat_broadcast; - this.business_bot_paused = params?.business_bot_paused; - this.business_bot_can_reply = params?.business_bot_can_reply; - this.geo_distance = params?.geo_distance; - this.request_chat_title = params?.request_chat_title; - this.request_chat_date = params?.request_chat_date; - this.business_bot_id = params?.business_bot_id; - this.business_bot_manage_url = params?.business_bot_manage_url; - } -} - -/** Represents a [wallpaper](https://core.telegram.org/api/wallpapers) based on an image. */ -export class WallPaper_ extends _WallPaper_ { - /** Identifier */ - id: bigint; - /** Whether we created this wallpaper */ - creator?: true; - /** Whether this is the default wallpaper */ - default?: true; - /** Whether this is a [pattern wallpaper »](https://core.telegram.org/api/wallpapers#pattern-wallpapers) */ - pattern?: true; - /** Whether this wallpaper should be used in dark mode. */ - dark?: true; - /** Access hash */ - access_hash: bigint; - /** Unique wallpaper ID, used when generating [wallpaper links](https://core.telegram.org/api/links#wallpaper-links) or [importing wallpaper links](https://core.telegram.org/api/wallpapers). */ - slug: string; - /** The actual wallpaper */ - document: enums.Document; - /** Info on how to generate the wallpaper, according to [these instructions »](https://core.telegram.org/api/wallpapers). */ - settings?: enums.WallPaperSettings; - - protected get [id](): number { - return 0xA437C3ED; - } - - static get [name](): string { - return "wallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["flags", flags, "#"], - ["creator", "true", "flags.0?true"], - ["default", "true", "flags.1?true"], - ["pattern", "true", "flags.3?true"], - ["dark", "true", "flags.4?true"], - ["access_hash", "bigint", "long"], - ["slug", "string", "string"], - ["document", _Document_, "Document"], - ["settings", _WallPaperSettings_, "flags.2?WallPaperSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ["flags", flags, "#"], - [this.creator ?? null, "true", "flags.0?true"], - [this.default ?? null, "true", "flags.1?true"], - [this.pattern ?? null, "true", "flags.3?true"], - [this.dark ?? null, "true", "flags.4?true"], - [this.access_hash, "bigint", "long"], - [this.slug, "string", "string"], - [this.document, _Document_, "Document"], - [this.settings ?? null, _WallPaperSettings_, "flags.2?WallPaperSettings"], - ]; - } - - constructor(params: { id: bigint; creator?: true; default?: true; pattern?: true; dark?: true; access_hash: bigint; slug: string; document: enums.Document; settings?: enums.WallPaperSettings }) { - super(); - this.id = params.id; - this.creator = params.creator; - this.default = params.default; - this.pattern = params.pattern; - this.dark = params.dark; - this.access_hash = params.access_hash; - this.slug = params.slug; - this.document = params.document; - this.settings = params.settings; - } -} - -/** Represents a [wallpaper](https://core.telegram.org/api/wallpapers) only based on colors/gradients. */ -export class WallPaperNoFile_ extends _WallPaper_ { - /** Wallpaper ID */ - id: bigint; - /** Whether this is the default wallpaper */ - default?: true; - /** Whether this wallpaper should be used in dark mode. */ - dark?: true; - /** Info on how to generate the wallpaper. */ - settings?: enums.WallPaperSettings; - - protected get [id](): number { - return 0xE0804116; - } - - static get [name](): string { - return "wallPaperNoFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["flags", flags, "#"], - ["default", "true", "flags.1?true"], - ["dark", "true", "flags.4?true"], - ["settings", _WallPaperSettings_, "flags.2?WallPaperSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ["flags", flags, "#"], - [this.default ?? null, "true", "flags.1?true"], - [this.dark ?? null, "true", "flags.4?true"], - [this.settings ?? null, _WallPaperSettings_, "flags.2?WallPaperSettings"], - ]; - } - - constructor(params: { id: bigint; default?: true; dark?: true; settings?: enums.WallPaperSettings }) { - super(); - this.id = params.id; - this.default = params.default; - this.dark = params.dark; - this.settings = params.settings; - } -} - -/** Report for spam */ -export class InputReportReasonSpam_ extends _ReportReason_ { - protected get [id](): number { - return 0x58DBCAB8; - } - - static get [name](): string { - return "inputReportReasonSpam" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for violence */ -export class InputReportReasonViolence_ extends _ReportReason_ { - protected get [id](): number { - return 0x1E22C78D; - } - - static get [name](): string { - return "inputReportReasonViolence" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for pornography */ -export class InputReportReasonPornography_ extends _ReportReason_ { - protected get [id](): number { - return 0x2E59D922; - } - - static get [name](): string { - return "inputReportReasonPornography" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for child abuse */ -export class InputReportReasonChildAbuse_ extends _ReportReason_ { - protected get [id](): number { - return 0xADF44EE3; - } - - static get [name](): string { - return "inputReportReasonChildAbuse" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Other */ -export class InputReportReasonOther_ extends _ReportReason_ { - protected get [id](): number { - return 0xC1E4A2B1; - } - - static get [name](): string { - return "inputReportReasonOther" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for copyrighted content */ -export class InputReportReasonCopyright_ extends _ReportReason_ { - protected get [id](): number { - return 0x9B89F93A; - } - - static get [name](): string { - return "inputReportReasonCopyright" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report an irrelevant geogroup */ -export class InputReportReasonGeoIrrelevant_ extends _ReportReason_ { - protected get [id](): number { - return 0xDBD4FEED; - } - - static get [name](): string { - return "inputReportReasonGeoIrrelevant" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for impersonation */ -export class InputReportReasonFake_ extends _ReportReason_ { - protected get [id](): number { - return 0xF5DDD6E7; - } - - static get [name](): string { - return "inputReportReasonFake" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for illegal drugs */ -export class InputReportReasonIllegalDrugs_ extends _ReportReason_ { - protected get [id](): number { - return 0x0A8EB2BE; - } - - static get [name](): string { - return "inputReportReasonIllegalDrugs" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Report for divulgation of personal details */ -export class InputReportReasonPersonalDetails_ extends _ReportReason_ { - protected get [id](): number { - return 0x9EC7863D; - } - - static get [name](): string { - return "inputReportReasonPersonalDetails" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Extended user info */ -export class UserFull_ extends _UserFull_ { - /** Whether you have blocked this user */ - blocked?: true; - /** Whether this user can make VoIP calls */ - phone_calls_available?: true; - /** Whether this user's privacy settings allow you to call them */ - phone_calls_private?: true; - /** Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself */ - can_pin_message?: true; - /** Whether [scheduled messages](https://core.telegram.org/api/scheduled-messages) are available */ - has_scheduled?: true; - /** Whether the user can receive video calls */ - video_calls_available?: true; - /** Whether this user doesn't allow sending voice messages in a private chat with them */ - voice_messages_forbidden?: true; - /** Whether the [real-time chat translation popup](https://core.telegram.org/api/translation) should be hidden. */ - translations_disabled?: true; - /** Whether this user has some [pinned stories](https://core.telegram.org/api/stories#pinned-or-archived-stories). */ - stories_pinned_available?: true; - /** Whether we've [blocked this user, preventing them from seeing our stories »](https://core.telegram.org/api/block). */ - blocked_my_stories_from?: true; - /** Whether the other user has chosen a custom wallpaper for us using [messages.setChatWallPaper](https://core.telegram.org/method/messages.setChatWallPaper) and the `for_both` flag, see [here »](https://core.telegram.org/api/wallpapers#installing-wallpapers-in-a-specific-chat-or-channel) for more info. */ - wallpaper_overridden?: true; - contact_require_premium?: true; - read_dates_private?: true; - /** User ID */ - id: bigint; - /** Bio of the user */ - about?: string; - /** Peer settings */ - settings: enums.PeerSettings; - /** Personal profile photo, to be shown instead of `profile_photo`. */ - personal_photo?: enums.Photo; - /** Profile photo */ - profile_photo?: enums.Photo; - /** Fallback profile photo, displayed if no photo is present in `profile_photo` or `personal_photo`, due to privacy settings. */ - fallback_photo?: enums.Photo; - /** Notification settings */ - notify_settings: enums.PeerNotifySettings; - /** For bots, info about the bot (bot commands, etc) */ - bot_info?: enums.BotInfo; - /** Message ID of the last [pinned message](https://core.telegram.org/api/pin) */ - pinned_msg_id?: number; - /** Chats in common with this user */ - common_chats_count: number; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted. */ - ttl_period?: number; - /** Emoji associated with chat theme */ - theme_emoticon?: string; - /** Anonymized text to be shown instead of the user's name on forwarded messages */ - private_forward_name?: string; - /** A [suggested set of administrator rights](https://core.telegram.org/api/rights#suggested-bot-rights) for the bot, to be shown when adding the bot as admin to a group, see [here for more info on how to handle them »](https://core.telegram.org/api/rights#suggested-bot-rights). */ - bot_group_admin_rights?: enums.ChatAdminRights; - /** A [suggested set of administrator rights](https://core.telegram.org/api/rights#suggested-bot-rights) for the bot, to be shown when adding the bot as admin to a channel, see [here for more info on how to handle them »](https://core.telegram.org/api/rights#suggested-bot-rights). */ - bot_broadcast_admin_rights?: enums.ChatAdminRights; - /** Telegram Premium subscriptions gift options */ - premium_gifts?: Array; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) to use in the private chat with the user. */ - wallpaper?: enums.WallPaper; - /** Active [stories »](https://core.telegram.org/api/stories) */ - stories?: enums.PeerStories; - business_work_hours?: enums.BusinessWorkHours; - business_location?: enums.BusinessLocation; - business_greeting_message?: enums.BusinessGreetingMessage; - business_away_message?: enums.BusinessAwayMessage; - business_intro?: enums.BusinessIntro; - birthday?: enums.Birthday; - personal_channel_id?: bigint; - personal_channel_message?: number; - - protected get [id](): number { - return 0xCC997720; - } - - static get [name](): string { - return "userFull" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["blocked", "true", "flags.0?true"], - ["phone_calls_available", "true", "flags.4?true"], - ["phone_calls_private", "true", "flags.5?true"], - ["can_pin_message", "true", "flags.7?true"], - ["has_scheduled", "true", "flags.12?true"], - ["video_calls_available", "true", "flags.13?true"], - ["voice_messages_forbidden", "true", "flags.20?true"], - ["translations_disabled", "true", "flags.23?true"], - ["stories_pinned_available", "true", "flags.26?true"], - ["blocked_my_stories_from", "true", "flags.27?true"], - ["wallpaper_overridden", "true", "flags.28?true"], - ["contact_require_premium", "true", "flags.29?true"], - ["read_dates_private", "true", "flags.30?true"], - ["flags2", flags, "#"], - ["id", "bigint", "long"], - ["about", "string", "flags.1?string"], - ["settings", _PeerSettings_, "PeerSettings"], - ["personal_photo", _Photo_, "flags.21?Photo"], - ["profile_photo", _Photo_, "flags.2?Photo"], - ["fallback_photo", _Photo_, "flags.22?Photo"], - ["notify_settings", _PeerNotifySettings_, "PeerNotifySettings"], - ["bot_info", _BotInfo_, "flags.3?BotInfo"], - ["pinned_msg_id", "number", "flags.6?int"], - ["common_chats_count", "number", "int"], - ["folder_id", "number", "flags.11?int"], - ["ttl_period", "number", "flags.14?int"], - ["theme_emoticon", "string", "flags.15?string"], - ["private_forward_name", "string", "flags.16?string"], - ["bot_group_admin_rights", _ChatAdminRights_, "flags.17?ChatAdminRights"], - ["bot_broadcast_admin_rights", _ChatAdminRights_, "flags.18?ChatAdminRights"], - ["premium_gifts", [_PremiumGiftOption_], "flags.19?Vector"], - ["wallpaper", _WallPaper_, "flags.24?WallPaper"], - ["stories", _PeerStories_, "flags.25?PeerStories"], - ["business_work_hours", _BusinessWorkHours_, "flags2.0?BusinessWorkHours"], - ["business_location", _BusinessLocation_, "flags2.1?BusinessLocation"], - ["business_greeting_message", _BusinessGreetingMessage_, "flags2.2?BusinessGreetingMessage"], - ["business_away_message", _BusinessAwayMessage_, "flags2.3?BusinessAwayMessage"], - ["business_intro", _BusinessIntro_, "flags2.4?BusinessIntro"], - ["birthday", _Birthday_, "flags2.5?Birthday"], - ["personal_channel_id", "bigint", "flags2.6?long"], - ["personal_channel_message", "number", "flags2.6?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.blocked ?? null, "true", "flags.0?true"], - [this.phone_calls_available ?? null, "true", "flags.4?true"], - [this.phone_calls_private ?? null, "true", "flags.5?true"], - [this.can_pin_message ?? null, "true", "flags.7?true"], - [this.has_scheduled ?? null, "true", "flags.12?true"], - [this.video_calls_available ?? null, "true", "flags.13?true"], - [this.voice_messages_forbidden ?? null, "true", "flags.20?true"], - [this.translations_disabled ?? null, "true", "flags.23?true"], - [this.stories_pinned_available ?? null, "true", "flags.26?true"], - [this.blocked_my_stories_from ?? null, "true", "flags.27?true"], - [this.wallpaper_overridden ?? null, "true", "flags.28?true"], - [this.contact_require_premium ?? null, "true", "flags.29?true"], - [this.read_dates_private ?? null, "true", "flags.30?true"], - ["flags2", flags, "#"], - [this.id, "bigint", "long"], - [this.about ?? null, "string", "flags.1?string"], - [this.settings, _PeerSettings_, "PeerSettings"], - [this.personal_photo ?? null, _Photo_, "flags.21?Photo"], - [this.profile_photo ?? null, _Photo_, "flags.2?Photo"], - [this.fallback_photo ?? null, _Photo_, "flags.22?Photo"], - [this.notify_settings, _PeerNotifySettings_, "PeerNotifySettings"], - [this.bot_info ?? null, _BotInfo_, "flags.3?BotInfo"], - [this.pinned_msg_id ?? null, "number", "flags.6?int"], - [this.common_chats_count, "number", "int"], - [this.folder_id ?? null, "number", "flags.11?int"], - [this.ttl_period ?? null, "number", "flags.14?int"], - [this.theme_emoticon ?? null, "string", "flags.15?string"], - [this.private_forward_name ?? null, "string", "flags.16?string"], - [this.bot_group_admin_rights ?? null, _ChatAdminRights_, "flags.17?ChatAdminRights"], - [this.bot_broadcast_admin_rights ?? null, _ChatAdminRights_, "flags.18?ChatAdminRights"], - [this.premium_gifts ?? null, [_PremiumGiftOption_], "flags.19?Vector"], - [this.wallpaper ?? null, _WallPaper_, "flags.24?WallPaper"], - [this.stories ?? null, _PeerStories_, "flags.25?PeerStories"], - [this.business_work_hours ?? null, _BusinessWorkHours_, "flags2.0?BusinessWorkHours"], - [this.business_location ?? null, _BusinessLocation_, "flags2.1?BusinessLocation"], - [this.business_greeting_message ?? null, _BusinessGreetingMessage_, "flags2.2?BusinessGreetingMessage"], - [this.business_away_message ?? null, _BusinessAwayMessage_, "flags2.3?BusinessAwayMessage"], - [this.business_intro ?? null, _BusinessIntro_, "flags2.4?BusinessIntro"], - [this.birthday ?? null, _Birthday_, "flags2.5?Birthday"], - [this.personal_channel_id ?? null, "bigint", "flags2.6?long"], - [this.personal_channel_message ?? null, "number", "flags2.6?int"], - ]; - } - - constructor(params: { blocked?: true; phone_calls_available?: true; phone_calls_private?: true; can_pin_message?: true; has_scheduled?: true; video_calls_available?: true; voice_messages_forbidden?: true; translations_disabled?: true; stories_pinned_available?: true; blocked_my_stories_from?: true; wallpaper_overridden?: true; contact_require_premium?: true; read_dates_private?: true; id: bigint; about?: string; settings: enums.PeerSettings; personal_photo?: enums.Photo; profile_photo?: enums.Photo; fallback_photo?: enums.Photo; notify_settings: enums.PeerNotifySettings; bot_info?: enums.BotInfo; pinned_msg_id?: number; common_chats_count: number; folder_id?: number; ttl_period?: number; theme_emoticon?: string; private_forward_name?: string; bot_group_admin_rights?: enums.ChatAdminRights; bot_broadcast_admin_rights?: enums.ChatAdminRights; premium_gifts?: Array; wallpaper?: enums.WallPaper; stories?: enums.PeerStories; business_work_hours?: enums.BusinessWorkHours; business_location?: enums.BusinessLocation; business_greeting_message?: enums.BusinessGreetingMessage; business_away_message?: enums.BusinessAwayMessage; business_intro?: enums.BusinessIntro; birthday?: enums.Birthday; personal_channel_id?: bigint; personal_channel_message?: number }) { - super(); - this.blocked = params.blocked; - this.phone_calls_available = params.phone_calls_available; - this.phone_calls_private = params.phone_calls_private; - this.can_pin_message = params.can_pin_message; - this.has_scheduled = params.has_scheduled; - this.video_calls_available = params.video_calls_available; - this.voice_messages_forbidden = params.voice_messages_forbidden; - this.translations_disabled = params.translations_disabled; - this.stories_pinned_available = params.stories_pinned_available; - this.blocked_my_stories_from = params.blocked_my_stories_from; - this.wallpaper_overridden = params.wallpaper_overridden; - this.contact_require_premium = params.contact_require_premium; - this.read_dates_private = params.read_dates_private; - this.id = params.id; - this.about = params.about; - this.settings = params.settings; - this.personal_photo = params.personal_photo; - this.profile_photo = params.profile_photo; - this.fallback_photo = params.fallback_photo; - this.notify_settings = params.notify_settings; - this.bot_info = params.bot_info; - this.pinned_msg_id = params.pinned_msg_id; - this.common_chats_count = params.common_chats_count; - this.folder_id = params.folder_id; - this.ttl_period = params.ttl_period; - this.theme_emoticon = params.theme_emoticon; - this.private_forward_name = params.private_forward_name; - this.bot_group_admin_rights = params.bot_group_admin_rights; - this.bot_broadcast_admin_rights = params.bot_broadcast_admin_rights; - this.premium_gifts = params.premium_gifts; - this.wallpaper = params.wallpaper; - this.stories = params.stories; - this.business_work_hours = params.business_work_hours; - this.business_location = params.business_location; - this.business_greeting_message = params.business_greeting_message; - this.business_away_message = params.business_away_message; - this.business_intro = params.business_intro; - this.birthday = params.birthday; - this.personal_channel_id = params.personal_channel_id; - this.personal_channel_message = params.personal_channel_message; - } -} - -/** A contact of the current user that is registered in the system. */ -export class Contact_ extends _Contact_ { - /** User identifier */ - user_id: bigint; - /** Current user is in the user's contact list */ - mutual: boolean; - - protected get [id](): number { - return 0x145ADE0B; - } - - static get [name](): string { - return "contact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["mutual", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.mutual, "boolean", "Bool"], - ]; - } - - constructor(params: { user_id: bigint; mutual: boolean }) { - super(); - this.user_id = params.user_id; - this.mutual = params.mutual; - } -} - -/** Successfully imported contact. */ -export class ImportedContact_ extends _ImportedContact_ { - /** User identifier */ - user_id: bigint; - /** The contact's client identifier (passed to one of the [InputContact](https://core.telegram.org/type/InputContact) constructors) */ - client_id: bigint; - - protected get [id](): number { - return 0xC13E3C50; - } - - static get [name](): string { - return "importedContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["client_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.client_id, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint; client_id: bigint }) { - super(); - this.user_id = params.user_id; - this.client_id = params.client_id; - } -} - -/** Contact status: online / offline. */ -export class ContactStatus_ extends _ContactStatus_ { - /** User identifier */ - user_id: bigint; - /** Online status */ - status: enums.UserStatus; - - protected get [id](): number { - return 0x16D9703B; - } - - static get [name](): string { - return "contactStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["status", _UserStatus_, "UserStatus"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.status, _UserStatus_, "UserStatus"], - ]; - } - - constructor(params: { user_id: bigint; status: enums.UserStatus }) { - super(); - this.user_id = params.user_id; - this.status = params.status; - } -} - -/** Contact list on the server is the same as the list on the client. */ -export class contacts_ContactsNotModified_ extends _contacts_Contacts_ { - protected get [id](): number { - return 0xB74BA9D2; - } - - static get [name](): string { - return "contacts.contactsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The current user's contact list and info on users. */ -export class contacts_Contacts_ extends _contacts_Contacts_ { - /** Contact list */ - contacts: Array; - /** Number of contacts that were saved successfully */ - saved_count: number; - /** User list */ - users: Array; - - protected get [id](): number { - return 0xEAE87E42; - } - - static get [name](): string { - return "contacts.contacts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["contacts", [_Contact_], "Vector"], - ["saved_count", "number", "int"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.contacts, [_Contact_], "Vector"], - [this.saved_count, "number", "int"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { contacts: Array; saved_count: number; users: Array }) { - super(); - this.contacts = params.contacts; - this.saved_count = params.saved_count; - this.users = params.users; - } -} - -/** Info on successfully imported contacts. */ -export class contacts_ImportedContacts_ extends _contacts_ImportedContacts_ { - /** List of successfully imported contacts */ - imported: Array; - /** Popular contacts */ - popular_invites: Array; - /** List of contact ids that could not be imported due to system limitation and will need to be imported at a later date. */ - retry_contacts: Array; - /** List of users */ - users: Array; - - protected get [id](): number { - return 0x77D01C3B; - } - - static get [name](): string { - return "contacts.importedContacts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["imported", [_ImportedContact_], "Vector"], - ["popular_invites", [_PopularContact_], "Vector"], - ["retry_contacts", ["bigint"], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.imported, [_ImportedContact_], "Vector"], - [this.popular_invites, [_PopularContact_], "Vector"], - [this.retry_contacts, ["bigint"], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { imported: Array; popular_invites: Array; retry_contacts: Array; users: Array }) { - super(); - this.imported = params.imported; - this.popular_invites = params.popular_invites; - this.retry_contacts = params.retry_contacts; - this.users = params.users; - } -} - -/** Full list of blocked users. */ -export class contacts_Blocked_ extends _contacts_Blocked_ { - /** List of blocked users */ - blocked: Array; - /** Blocked chats */ - chats: Array; - /** List of users */ - users: Array; - - protected get [id](): number { - return 0x0ADE1591; - } - - static get [name](): string { - return "contacts.blocked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["blocked", [_PeerBlocked_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.blocked, [_PeerBlocked_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { blocked: Array; chats: Array; users: Array }) { - super(); - this.blocked = params.blocked; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Incomplete list of blocked users. */ -export class contacts_BlockedSlice_ extends _contacts_Blocked_ { - /** Total number of elements in the list */ - count: number; - /** List of blocked users */ - blocked: Array; - /** Blocked chats */ - chats: Array; - /** List of users */ - users: Array; - - protected get [id](): number { - return 0xE1664194; - } - - static get [name](): string { - return "contacts.blockedSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["blocked", [_PeerBlocked_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.blocked, [_PeerBlocked_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; blocked: Array; chats: Array; users: Array }) { - super(); - this.count = params.count; - this.blocked = params.blocked; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Full list of chats with messages and auxiliary data. */ -export class messages_Dialogs_ extends _messages_Dialogs_ { - /** List of chats */ - dialogs: Array; - /** List of last messages from each chat */ - messages: Array; - /** List of groups mentioned in the chats */ - chats: Array; - /** List of users mentioned in messages and groups */ - users: Array; - - protected get [id](): number { - return 0x15BA6C40; - } - - static get [name](): string { - return "messages.dialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dialogs", [_Dialog_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.dialogs, [_Dialog_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { dialogs: Array; messages: Array; chats: Array; users: Array }) { - super(); - this.dialogs = params.dialogs; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Incomplete list of dialogs with messages and auxiliary data. */ -export class messages_DialogsSlice_ extends _messages_Dialogs_ { - /** Total number of dialogs */ - count: number; - /** List of dialogs */ - dialogs: Array; - /** List of last messages from dialogs */ - messages: Array; - /** List of chats mentioned in dialogs */ - chats: Array; - /** List of users mentioned in messages and chats */ - users: Array; - - protected get [id](): number { - return 0x71E094F3; - } - - static get [name](): string { - return "messages.dialogsSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["dialogs", [_Dialog_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.dialogs, [_Dialog_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; dialogs: Array; messages: Array; chats: Array; users: Array }) { - super(); - this.count = params.count; - this.dialogs = params.dialogs; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Dialogs haven't changed */ -export class messages_DialogsNotModified_ extends _messages_Dialogs_ { - /** Number of dialogs found server-side by the query */ - count: number; - - protected get [id](): number { - return 0xF0E3E596; - } - - static get [name](): string { - return "messages.dialogsNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - ]; - } - - constructor(params: { count: number }) { - super(); - this.count = params.count; - } -} - -/** Full list of messages with auxiliary data. */ -export class messages_Messages_ extends _messages_Messages_ { - /** List of messages */ - messages: Array; - /** List of chats mentioned in dialogs */ - chats: Array; - /** List of users mentioned in messages and chats */ - users: Array; - - protected get [id](): number { - return 0x8C718E87; - } - - static get [name](): string { - return "messages.messages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { messages: Array; chats: Array; users: Array }) { - super(); - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Incomplete list of messages and auxiliary data. */ -export class messages_MessagesSlice_ extends _messages_Messages_ { - /** If set, indicates that the results may be inexact */ - inexact?: true; - /** Total number of messages in the list */ - count: number; - /** Rate to use in the `offset_rate` parameter in the next call to [messages.searchGlobal](https://core.telegram.org/method/messages.searchGlobal) */ - next_rate?: number; - /** Indicates the absolute position of `messages[0]` within the total result set with count `count`. - This is useful, for example, if the result was fetched using `offset_id`, and we need to display a `progress/total` counter (like `photo 134 of 200`, for all media in a chat, we could simply use `photo ${offset_id_offset} of ${count}`. */ - offset_id_offset?: number; - /** List of messages */ - messages: Array; - /** List of chats mentioned in messages */ - chats: Array; - /** List of users mentioned in messages and chats */ - users: Array; - - protected get [id](): number { - return 0x3A54685E; - } - - static get [name](): string { - return "messages.messagesSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inexact", "true", "flags.1?true"], - ["count", "number", "int"], - ["next_rate", "number", "flags.0?int"], - ["offset_id_offset", "number", "flags.2?int"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inexact ?? null, "true", "flags.1?true"], - [this.count, "number", "int"], - [this.next_rate ?? null, "number", "flags.0?int"], - [this.offset_id_offset ?? null, "number", "flags.2?int"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { inexact?: true; count: number; next_rate?: number; offset_id_offset?: number; messages: Array; chats: Array; users: Array }) { - super(); - this.inexact = params.inexact; - this.count = params.count; - this.next_rate = params.next_rate; - this.offset_id_offset = params.offset_id_offset; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Channel messages */ -export class messages_ChannelMessages_ extends _messages_Messages_ { - /** If set, returned results may be inexact */ - inexact?: true; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** Total number of results were found server-side (may not be all included here) */ - count: number; - /** Indicates the absolute position of `messages[0]` within the total result set with count `count`. - This is useful, for example, if the result was fetched using `offset_id`, and we need to display a `progress/total` counter (like `photo 134 of 200`, for all media in a chat, we could simply use `photo ${offset_id_offset} of ${count}`. */ - offset_id_offset?: number; - /** Found messages */ - messages: Array; - /** [Forum topic](https://core.telegram.org/api/forum#forum-topics) information */ - topics: Array; - /** Chats */ - chats: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0xC776BA4E; - } - - static get [name](): string { - return "messages.channelMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inexact", "true", "flags.1?true"], - ["pts", "number", "int"], - ["count", "number", "int"], - ["offset_id_offset", "number", "flags.2?int"], - ["messages", [_Message_], "Vector"], - ["topics", [_ForumTopic_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inexact ?? null, "true", "flags.1?true"], - [this.pts, "number", "int"], - [this.count, "number", "int"], - [this.offset_id_offset ?? null, "number", "flags.2?int"], - [this.messages, [_Message_], "Vector"], - [this.topics, [_ForumTopic_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { inexact?: true; pts: number; count: number; offset_id_offset?: number; messages: Array; topics: Array; chats: Array; users: Array }) { - super(); - this.inexact = params.inexact; - this.pts = params.pts; - this.count = params.count; - this.offset_id_offset = params.offset_id_offset; - this.messages = params.messages; - this.topics = params.topics; - this.chats = params.chats; - this.users = params.users; - } -} - -/** No new messages matching the query were found */ -export class messages_MessagesNotModified_ extends _messages_Messages_ { - /** Number of results found server-side by the given query */ - count: number; - - protected get [id](): number { - return 0x74535F21; - } - - static get [name](): string { - return "messages.messagesNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - ]; - } - - constructor(params: { count: number }) { - super(); - this.count = params.count; - } -} - -/** List of chats with auxiliary data. */ -export class messages_Chats_ extends _messages_Chats_ { - /** List of chats */ - chats: Array; - - protected get [id](): number { - return 0x64FF9FD5; - } - - static get [name](): string { - return "messages.chats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chats", [_Chat_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chats, [_Chat_], "Vector"], - ]; - } - - constructor(params: { chats: Array }) { - super(); - this.chats = params.chats; - } -} - -/** Partial list of chats, more would have to be fetched with [pagination](https://core.telegram.org/api/offsets) */ -export class messages_ChatsSlice_ extends _messages_Chats_ { - /** Total number of results that were found server-side (not all are included in `chats`) */ - count: number; - /** Chats */ - chats: Array; - - protected get [id](): number { - return 0x9CD81144; - } - - static get [name](): string { - return "messages.chatsSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["chats", [_Chat_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.chats, [_Chat_], "Vector"], - ]; - } - - constructor(params: { count: number; chats: Array }) { - super(); - this.count = params.count; - this.chats = params.chats; - } -} - -/** Full info about a [channel](https://core.telegram.org/api/channel#channels), [supergroup](https://core.telegram.org/api/channel#supergroups), [gigagroup](https://core.telegram.org/api/channel#gigagroups) or [basic group](https://core.telegram.org/api/channel#basic-groups). */ -export class messages_ChatFull_ extends _messages_ChatFull_ { - /** Full info */ - full_chat: enums.ChatFull; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0xE5D7D19C; - } - - static get [name](): string { - return "messages.chatFull" - } - - static get [paramDesc](): ParamDesc { - return [ - ["full_chat", _ChatFull_, "ChatFull"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.full_chat, _ChatFull_, "ChatFull"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { full_chat: enums.ChatFull; chats: Array; users: Array }) { - super(); - this.full_chat = params.full_chat; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Affected part of communication history with the user or in a chat. */ -export class messages_AffectedHistory_ extends _messages_AffectedHistory_ { - /** Number of events occurred in a text box */ - pts: number; - /** Number of affected events */ - pts_count: number; - /** If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease */ - offset: number; - - protected get [id](): number { - return 0xB45C69D1; - } - - static get [name](): string { - return "messages.affectedHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ["offset", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - [this.offset, "number", "int"], - ]; - } - - constructor(params: { pts: number; pts_count: number; offset: number }) { - super(); - this.pts = params.pts; - this.pts_count = params.pts_count; - this.offset = params.offset; - } -} - -/** Filter is absent. */ -export class InputMessagesFilterEmpty_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x57E2F66C; - } - - static get [name](): string { - return "inputMessagesFilterEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Filter for messages containing photos. */ -export class InputMessagesFilterPhotos_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x9609A51C; - } - - static get [name](): string { - return "inputMessagesFilterPhotos" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Filter for messages containing videos. */ -export class InputMessagesFilterVideo_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x9FC00E65; - } - - static get [name](): string { - return "inputMessagesFilterVideo" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Filter for messages containing photos or videos. */ -export class InputMessagesFilterPhotoVideo_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x56E9F0E4; - } - - static get [name](): string { - return "inputMessagesFilterPhotoVideo" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Filter for messages containing documents. */ -export class InputMessagesFilterDocument_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x9EDDF188; - } - - static get [name](): string { - return "inputMessagesFilterDocument" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages containing URLs */ -export class InputMessagesFilterUrl_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x7EF0DD87; - } - - static get [name](): string { - return "inputMessagesFilterUrl" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages containing gifs */ -export class InputMessagesFilterGif_ extends _MessagesFilter_ { - protected get [id](): number { - return 0xFFC86587; - } - - static get [name](): string { - return "inputMessagesFilterGif" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages containing voice notes */ -export class InputMessagesFilterVoice_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x50F5C392; - } - - static get [name](): string { - return "inputMessagesFilterVoice" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages containing audio files */ -export class InputMessagesFilterMusic_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x3751B49E; - } - - static get [name](): string { - return "inputMessagesFilterMusic" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only chat photo changes */ -export class InputMessagesFilterChatPhotos_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x3A20ECB8; - } - - static get [name](): string { - return "inputMessagesFilterChatPhotos" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only phone calls */ -export class InputMessagesFilterPhoneCalls_ extends _MessagesFilter_ { - /** Return only missed phone calls */ - missed?: true; - - protected get [id](): number { - return 0x80C99768; - } - - static get [name](): string { - return "inputMessagesFilterPhoneCalls" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["missed", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.missed ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { missed?: true }) { - super(); - this.missed = params?.missed; - } -} - -/** Return only round videos and voice notes */ -export class InputMessagesFilterRoundVoice_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x7A7C17A4; - } - - static get [name](): string { - return "inputMessagesFilterRoundVoice" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only round videos */ -export class InputMessagesFilterRoundVideo_ extends _MessagesFilter_ { - protected get [id](): number { - return 0xB549DA53; - } - - static get [name](): string { - return "inputMessagesFilterRoundVideo" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages where the current user was [mentioned](https://core.telegram.org/api/mentions). */ -export class InputMessagesFilterMyMentions_ extends _MessagesFilter_ { - protected get [id](): number { - return 0xC1F8E69A; - } - - static get [name](): string { - return "inputMessagesFilterMyMentions" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages containing geolocations */ -export class InputMessagesFilterGeo_ extends _MessagesFilter_ { - protected get [id](): number { - return 0xE7026D0D; - } - - static get [name](): string { - return "inputMessagesFilterGeo" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Return only messages containing contacts */ -export class InputMessagesFilterContacts_ extends _MessagesFilter_ { - protected get [id](): number { - return 0xE062DB83; - } - - static get [name](): string { - return "inputMessagesFilterContacts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Fetch only pinned messages */ -export class InputMessagesFilterPinned_ extends _MessagesFilter_ { - protected get [id](): number { - return 0x1BB00451; - } - - static get [name](): string { - return "inputMessagesFilterPinned" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** New message in a private chat or in a [basic group](https://core.telegram.org/api/channel#basic-groups). */ -export class UpdateNewMessage_ extends _Update_ { - /** Message */ - message: enums.Message; - /** New quantity of actions in a message box */ - pts: number; - /** Number of generated events */ - pts_count: number; - - protected get [id](): number { - return 0x1F2B0AFD; - } - - static get [name](): string { - return "updateNewMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { message: enums.Message; pts: number; pts_count: number }) { - super(); - this.message = params.message; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** Sent message with **random\_id** client identifier was assigned an identifier. */ -export class UpdateMessageID_ extends _Update_ { - /** **id** identifier of a respective [Message](https://core.telegram.org/type/Message) */ - id: number; - /** Previously transferred client **random\_id** identifier */ - random_id: bigint; - - protected get [id](): number { - return 0x4E90BFD6; - } - - static get [name](): string { - return "updateMessageID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ["random_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - [this.random_id, "bigint", "long"], - ]; - } - - constructor(params: { id: number; random_id: bigint }) { - super(); - this.id = params.id; - this.random_id = params.random_id; - } -} - -/** Messages were deleted. */ -export class UpdateDeleteMessages_ extends _Update_ { - /** List of identifiers of deleted messages */ - messages: Array; - /** New quality of actions in a message box */ - pts: number; - /** Number of generated [events](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0xA20DB0E5; - } - - static get [name](): string { - return "updateDeleteMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["messages", ["number"], "Vector"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.messages, ["number"], "Vector"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { messages: Array; pts: number; pts_count: number }) { - super(); - this.messages = params.messages; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing */ -export class UpdateUserTyping_ extends _Update_ { - /** User id */ - user_id: bigint; - /** Action type */ - action: enums.SendMessageAction; - - protected get [id](): number { - return 0xC01E857F; - } - - static get [name](): string { - return "updateUserTyping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["action", _SendMessageAction_, "SendMessageAction"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.action, _SendMessageAction_, "SendMessageAction"], - ]; - } - - constructor(params: { user_id: bigint; action: enums.SendMessageAction }) { - super(); - this.user_id = params.user_id; - this.action = params.action; - } -} - -/** The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing */ -export class UpdateChatUserTyping_ extends _Update_ { - /** Group id */ - chat_id: bigint; - /** Peer that started typing (can be the chat itself, in case of anonymous admins). */ - from_id: enums.Peer; - /** Type of action */ - action: enums.SendMessageAction; - - protected get [id](): number { - return 0x83487AF0; - } - - static get [name](): string { - return "updateChatUserTyping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["from_id", _Peer_, "Peer"], - ["action", _SendMessageAction_, "SendMessageAction"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.from_id, _Peer_, "Peer"], - [this.action, _SendMessageAction_, "SendMessageAction"], - ]; - } - - constructor(params: { chat_id: bigint; from_id: enums.Peer; action: enums.SendMessageAction }) { - super(); - this.chat_id = params.chat_id; - this.from_id = params.from_id; - this.action = params.action; - } -} - -/** Composition of chat participants changed. */ -export class UpdateChatParticipants_ extends _Update_ { - /** Updated chat participants */ - participants: enums.ChatParticipants; - - protected get [id](): number { - return 0x07761198; - } - - static get [name](): string { - return "updateChatParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["participants", _ChatParticipants_, "ChatParticipants"], - ]; - } - - protected get [params](): Params { - return [ - [this.participants, _ChatParticipants_, "ChatParticipants"], - ]; - } - - constructor(params: { participants: enums.ChatParticipants }) { - super(); - this.participants = params.participants; - } -} - -/** Contact status update. */ -export class UpdateUserStatus_ extends _Update_ { - /** User identifier */ - user_id: bigint; - /** New status */ - status: enums.UserStatus; - - protected get [id](): number { - return 0xE5BDF8DE; - } - - static get [name](): string { - return "updateUserStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["status", _UserStatus_, "UserStatus"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.status, _UserStatus_, "UserStatus"], - ]; - } - - constructor(params: { user_id: bigint; status: enums.UserStatus }) { - super(); - this.user_id = params.user_id; - this.status = params.status; - } -} - -/** Changes the user's first name, last name and username. */ -export class UpdateUserName_ extends _Update_ { - /** User identifier */ - user_id: bigint; - /** New first name. Corresponds to the new value of **real\_first\_name** field of the [userFull](https://core.telegram.org/constructor/userFull) constructor. */ - first_name: string; - /** New last name. Corresponds to the new value of **real\_last\_name** field of the [userFull](https://core.telegram.org/constructor/userFull) constructor. */ - last_name: string; - /** Usernames. */ - usernames: Array; - - protected get [id](): number { - return 0xA7848924; - } - - static get [name](): string { - return "updateUserName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["usernames", [_Username_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.usernames, [_Username_], "Vector"], - ]; - } - - constructor(params: { user_id: bigint; first_name: string; last_name: string; usernames: Array }) { - super(); - this.user_id = params.user_id; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.usernames = params.usernames; - } -} - -/** A new session logged into the current user's account through an unknown device. */ -export class UpdateNewAuthorization_ extends _Update_ { - /** Whether the session is [unconfirmed, see here »](https://core.telegram.org/api/auth#confirming-login) for more info. */ - unconfirmed?: true; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Authorization date */ - date?: number; - /** Name of device, for example _Android_ */ - device?: string; - /** Location, for example _USA, NY (IP=1.2.3.4)_ */ - location?: string; - - protected get [id](): number { - return 0x8951ABEF; - } - - static get [name](): string { - return "updateNewAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["unconfirmed", "true", "flags.0?true"], - ["hash", "bigint", "long"], - ["date", "number", "flags.0?int"], - ["device", "string", "flags.0?string"], - ["location", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.unconfirmed ?? null, "true", "flags.0?true"], - [this.hash, "bigint", "long"], - [this.date ?? null, "number", "flags.0?int"], - [this.device ?? null, "string", "flags.0?string"], - [this.location ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { unconfirmed?: true; hash: bigint; date?: number; device?: string; location?: string }) { - super(); - this.unconfirmed = params.unconfirmed; - this.hash = params.hash; - this.date = params.date; - this.device = params.device; - this.location = params.location; - } -} - -/** New encrypted message. */ -export class UpdateNewEncryptedMessage_ extends _Update_ { - /** Message */ - message: enums.EncryptedMessage; - /** New **qts** value, see [updates »](https://core.telegram.org/api/updates) for more info. */ - qts: number; - - protected get [id](): number { - return 0x12BCBD9A; - } - - static get [name](): string { - return "updateNewEncryptedMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _EncryptedMessage_, "EncryptedMessage"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _EncryptedMessage_, "EncryptedMessage"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { message: enums.EncryptedMessage; qts: number }) { - super(); - this.message = params.message; - this.qts = params.qts; - } -} - -/** Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing. */ -export class UpdateEncryptedChatTyping_ extends _Update_ { - /** Chat ID */ - chat_id: number; - - protected get [id](): number { - return 0x1710F156; - } - - static get [name](): string { - return "updateEncryptedChatTyping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "number", "int"], - ]; - } - - constructor(params: { chat_id: number }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** Change of state in an encrypted chat. */ -export class UpdateEncryption_ extends _Update_ { - /** Encrypted chat */ - chat: enums.EncryptedChat; - /** Date of change */ - date: number; - - protected get [id](): number { - return 0xB4A2E88D; - } - - static get [name](): string { - return "updateEncryption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat", _EncryptedChat_, "EncryptedChat"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat, _EncryptedChat_, "EncryptedChat"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { chat: enums.EncryptedChat; date: number }) { - super(); - this.chat = params.chat; - this.date = params.date; - } -} - -/** Communication history in an encrypted chat was marked as read. */ -export class UpdateEncryptedMessagesRead_ extends _Update_ { - /** Chat ID */ - chat_id: number; - /** Maximum value of data for read messages */ - max_date: number; - /** Time when messages were read */ - date: number; - - protected get [id](): number { - return 0x38FE25B7; - } - - static get [name](): string { - return "updateEncryptedMessagesRead" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "number", "int"], - ["max_date", "number", "int"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "number", "int"], - [this.max_date, "number", "int"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { chat_id: number; max_date: number; date: number }) { - super(); - this.chat_id = params.chat_id; - this.max_date = params.max_date; - this.date = params.date; - } -} - -/** New group member. */ -export class UpdateChatParticipantAdd_ extends _Update_ { - /** Group ID */ - chat_id: bigint; - /** ID of the new member */ - user_id: bigint; - /** ID of the user, who added member to the group */ - inviter_id: bigint; - /** When was the participant added */ - date: number; - /** Chat version number */ - version: number; - - protected get [id](): number { - return 0x3DDA5451; - } - - static get [name](): string { - return "updateChatParticipantAdd" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["inviter_id", "bigint", "long"], - ["date", "number", "int"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.inviter_id, "bigint", "long"], - [this.date, "number", "int"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { chat_id: bigint; user_id: bigint; inviter_id: bigint; date: number; version: number }) { - super(); - this.chat_id = params.chat_id; - this.user_id = params.user_id; - this.inviter_id = params.inviter_id; - this.date = params.date; - this.version = params.version; - } -} - -/** A member has left the group. */ -export class UpdateChatParticipantDelete_ extends _Update_ { - /** Group ID */ - chat_id: bigint; - /** ID of the user */ - user_id: bigint; - /** Used in basic groups to reorder updates and make sure that all of them was received. */ - version: number; - - protected get [id](): number { - return 0xE32F3D77; - } - - static get [name](): string { - return "updateChatParticipantDelete" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { chat_id: bigint; user_id: bigint; version: number }) { - super(); - this.chat_id = params.chat_id; - this.user_id = params.user_id; - this.version = params.version; - } -} - -/** Changes in the data center configuration options. */ -export class UpdateDcOptions_ extends _Update_ { - /** New connection options */ - dc_options: Array; - - protected get [id](): number { - return 0x8E5E9873; - } - - static get [name](): string { - return "updateDcOptions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_options", [_DcOption_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_options, [_DcOption_], "Vector"], - ]; - } - - constructor(params: { dc_options: Array }) { - super(); - this.dc_options = params.dc_options; - } -} - -/** Changes in notification settings. */ -export class UpdateNotifySettings_ extends _Update_ { - /** Notification source */ - peer: enums.NotifyPeer; - /** New notification settings */ - notify_settings: enums.PeerNotifySettings; - - protected get [id](): number { - return 0xBEC268EF; - } - - static get [name](): string { - return "updateNotifySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _NotifyPeer_, "NotifyPeer"], - ["notify_settings", _PeerNotifySettings_, "PeerNotifySettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _NotifyPeer_, "NotifyPeer"], - [this.notify_settings, _PeerNotifySettings_, "PeerNotifySettings"], - ]; - } - - constructor(params: { peer: enums.NotifyPeer; notify_settings: enums.PeerNotifySettings }) { - super(); - this.peer = params.peer; - this.notify_settings = params.notify_settings; - } -} - -/** A service message for the user. */ -export class UpdateServiceNotification_ extends _Update_ { - /** If set, the message must be displayed in a popup. */ - popup?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** When was the notification received - The message must also be stored locally as part of the message history with the user id `777000` (Telegram Notifications). */ - inbox_date?: number; - /** String, identical in format and contents to the [**type**](https://core.telegram.org/api/errors#error-type) field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same **type** within a short period of time (15 minutes). */ - type: string; - /** Message text */ - message: string; - /** Media content (optional) */ - media: enums.MessageMedia; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities: Array; - - protected get [id](): number { - return 0xEBE46819; - } - - static get [name](): string { - return "updateServiceNotification" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["popup", "true", "flags.0?true"], - ["invert_media", "true", "flags.2?true"], - ["inbox_date", "number", "flags.1?int"], - ["type", "string", "string"], - ["message", "string", "string"], - ["media", _MessageMedia_, "MessageMedia"], - ["entities", [_MessageEntity_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.popup ?? null, "true", "flags.0?true"], - [this.invert_media ?? null, "true", "flags.2?true"], - [this.inbox_date ?? null, "number", "flags.1?int"], - [this.type, "string", "string"], - [this.message, "string", "string"], - [this.media, _MessageMedia_, "MessageMedia"], - [this.entities, [_MessageEntity_], "Vector"], - ]; - } - - constructor(params: { popup?: true; invert_media?: true; inbox_date?: number; type: string; message: string; media: enums.MessageMedia; entities: Array }) { - super(); - this.popup = params.popup; - this.invert_media = params.invert_media; - this.inbox_date = params.inbox_date; - this.type = params.type; - this.message = params.message; - this.media = params.media; - this.entities = params.entities; - } -} - -/** Privacy rules were changed */ -export class UpdatePrivacy_ extends _Update_ { - /** Peers to which the privacy rules apply */ - key: enums.PrivacyKey; - /** New privacy rules */ - rules: Array; - - protected get [id](): number { - return 0xEE3B272A; - } - - static get [name](): string { - return "updatePrivacy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["key", _PrivacyKey_, "PrivacyKey"], - ["rules", [_PrivacyRule_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.key, _PrivacyKey_, "PrivacyKey"], - [this.rules, [_PrivacyRule_], "Vector"], - ]; - } - - constructor(params: { key: enums.PrivacyKey; rules: Array }) { - super(); - this.key = params.key; - this.rules = params.rules; - } -} - -/** A user's phone number was changed */ -export class UpdateUserPhone_ extends _Update_ { - /** User ID */ - user_id: bigint; - /** New phone number */ - phone: string; - - protected get [id](): number { - return 0x05492A13; - } - - static get [name](): string { - return "updateUserPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["phone", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.phone, "string", "string"], - ]; - } - - constructor(params: { user_id: bigint; phone: string }) { - super(); - this.user_id = params.user_id; - this.phone = params.phone; - } -} - -/** Incoming messages were read */ -export class UpdateReadHistoryInbox_ extends _Update_ { - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Peer */ - peer: enums.Peer; - /** Maximum ID of messages read */ - max_id: number; - /** Number of messages that are still unread */ - still_unread_count: number; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x9C974FDF; - } - - static get [name](): string { - return "updateReadHistoryInbox" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["folder_id", "number", "flags.0?int"], - ["peer", _Peer_, "Peer"], - ["max_id", "number", "int"], - ["still_unread_count", "number", "int"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.folder_id ?? null, "number", "flags.0?int"], - [this.peer, _Peer_, "Peer"], - [this.max_id, "number", "int"], - [this.still_unread_count, "number", "int"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { folder_id?: number; peer: enums.Peer; max_id: number; still_unread_count: number; pts: number; pts_count: number }) { - super(); - this.folder_id = params.folder_id; - this.peer = params.peer; - this.max_id = params.max_id; - this.still_unread_count = params.still_unread_count; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** Outgoing messages were read */ -export class UpdateReadHistoryOutbox_ extends _Update_ { - /** Peer */ - peer: enums.Peer; - /** Maximum ID of read outgoing messages */ - max_id: number; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x2F2F21BF; - } - - static get [name](): string { - return "updateReadHistoryOutbox" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["max_id", "number", "int"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.max_id, "number", "int"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; max_id: number; pts: number; pts_count: number }) { - super(); - this.peer = params.peer; - this.max_id = params.max_id; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** An [instant view](https://instantview.telegram.org) webpage preview was generated */ -export class UpdateWebPage_ extends _Update_ { - /** Webpage preview */ - webpage: enums.WebPage; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x7F891213; - } - - static get [name](): string { - return "updateWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["webpage", _WebPage_, "WebPage"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.webpage, _WebPage_, "WebPage"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { webpage: enums.WebPage; pts: number; pts_count: number }) { - super(); - this.webpage = params.webpage; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** Contents of messages in the common [message box](https://core.telegram.org/api/updates) were read */ -export class UpdateReadMessagesContents_ extends _Update_ { - /** IDs of read messages */ - messages: Array; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - /** When was the last message in `messages` marked as read. */ - date?: number; - - protected get [id](): number { - return 0xF8227181; - } - - static get [name](): string { - return "updateReadMessagesContents" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["messages", ["number"], "Vector"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ["date", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.messages, ["number"], "Vector"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - [this.date ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { messages: Array; pts: number; pts_count: number; date?: number }) { - super(); - this.messages = params.messages; - this.pts = params.pts; - this.pts_count = params.pts_count; - this.date = params.date; - } -} - -/** There are new updates in the specified channel, the client must fetch them. -If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts. */ -export class UpdateChannelTooLong_ extends _Update_ { - /** The channel */ - channel_id: bigint; - /** The [PTS](https://core.telegram.org/api/updates). */ - pts?: number; - - protected get [id](): number { - return 0x108D941F; - } - - static get [name](): string { - return "updateChannelTooLong" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel_id", "bigint", "long"], - ["pts", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel_id, "bigint", "long"], - [this.pts ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { channel_id: bigint; pts?: number }) { - super(); - this.channel_id = params.channel_id; - this.pts = params.pts; - } -} - -/** A new channel or supergroup is available, or info about an existing channel has changed and must be refeteched. */ -export class UpdateChannel_ extends _Update_ { - /** Channel ID */ - channel_id: bigint; - - protected get [id](): number { - return 0x635B4C09; - } - - static get [name](): string { - return "updateChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - ]; - } - - constructor(params: { channel_id: bigint }) { - super(); - this.channel_id = params.channel_id; - } -} - -/** A new message was sent in a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class UpdateNewChannelMessage_ extends _Update_ { - /** New message */ - message: enums.Message; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x62BA04D9; - } - - static get [name](): string { - return "updateNewChannelMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { message: enums.Message; pts: number; pts_count: number }) { - super(); - this.message = params.message; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** Incoming messages in a [channel/supergroup](https://core.telegram.org/api/channel) were read */ -export class UpdateReadChannelInbox_ extends _Update_ { - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Channel/supergroup ID */ - channel_id: bigint; - /** Position up to which all incoming messages are read. */ - max_id: number; - /** Count of messages weren't read yet */ - still_unread_count: number; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - - protected get [id](): number { - return 0x922E6E10; - } - - static get [name](): string { - return "updateReadChannelInbox" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["folder_id", "number", "flags.0?int"], - ["channel_id", "bigint", "long"], - ["max_id", "number", "int"], - ["still_unread_count", "number", "int"], - ["pts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.folder_id ?? null, "number", "flags.0?int"], - [this.channel_id, "bigint", "long"], - [this.max_id, "number", "int"], - [this.still_unread_count, "number", "int"], - [this.pts, "number", "int"], - ]; - } - - constructor(params: { folder_id?: number; channel_id: bigint; max_id: number; still_unread_count: number; pts: number }) { - super(); - this.folder_id = params.folder_id; - this.channel_id = params.channel_id; - this.max_id = params.max_id; - this.still_unread_count = params.still_unread_count; - this.pts = params.pts; - } -} - -/** Some messages in a [supergroup/channel](https://core.telegram.org/api/channel) were deleted */ -export class UpdateDeleteChannelMessages_ extends _Update_ { - /** Channel ID */ - channel_id: bigint; - /** IDs of messages that were deleted */ - messages: Array; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0xC32D5B12; - } - - static get [name](): string { - return "updateDeleteChannelMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["messages", ["number"], "Vector"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.messages, ["number"], "Vector"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; messages: Array; pts: number; pts_count: number }) { - super(); - this.channel_id = params.channel_id; - this.messages = params.messages; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** The view counter of a message in a channel has changed */ -export class UpdateChannelMessageViews_ extends _Update_ { - /** Channel ID */ - channel_id: bigint; - /** ID of the message */ - id: number; - /** New view counter */ - views: number; - - protected get [id](): number { - return 0xF226AC08; - } - - static get [name](): string { - return "updateChannelMessageViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["id", "number", "int"], - ["views", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.id, "number", "int"], - [this.views, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; id: number; views: number }) { - super(); - this.channel_id = params.channel_id; - this.id = params.id; - this.views = params.views; - } -} - -/** Admin permissions of a user in a [basic group](https://core.telegram.org/api/channel#basic-groups) were changed */ -export class UpdateChatParticipantAdmin_ extends _Update_ { - /** Chat ID */ - chat_id: bigint; - /** ID of the (de)admined user */ - user_id: bigint; - /** Whether the user was rendered admin */ - is_admin: boolean; - /** Used in basic groups to reorder updates and make sure that all of them was received. */ - version: number; - - protected get [id](): number { - return 0xD7CA61A2; - } - - static get [name](): string { - return "updateChatParticipantAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["is_admin", "boolean", "Bool"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.is_admin, "boolean", "Bool"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { chat_id: bigint; user_id: bigint; is_admin: boolean; version: number }) { - super(); - this.chat_id = params.chat_id; - this.user_id = params.user_id; - this.is_admin = params.is_admin; - this.version = params.version; - } -} - -/** A new stickerset was installed */ -export class UpdateNewStickerSet_ extends _Update_ { - /** The installed stickerset */ - stickerset: enums.messages.StickerSet; - - protected get [id](): number { - return 0x688A30AA; - } - - static get [name](): string { - return "updateNewStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", _messages_StickerSet_, "messages.StickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, _messages_StickerSet_, "messages.StickerSet"], - ]; - } - - constructor(params: { stickerset: enums.messages.StickerSet }) { - super(); - this.stickerset = params.stickerset; - } -} - -/** The order of stickersets was changed */ -export class UpdateStickerSetsOrder_ extends _Update_ { - /** Whether the updated stickers are mask stickers */ - masks?: true; - /** Whether the updated stickers are custom emoji stickers */ - emojis?: true; - /** New sticker order by sticker ID */ - order: Array; - - protected get [id](): number { - return 0x0BB2D201; - } - - static get [name](): string { - return "updateStickerSetsOrder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["masks", "true", "flags.0?true"], - ["emojis", "true", "flags.1?true"], - ["order", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.masks ?? null, "true", "flags.0?true"], - [this.emojis ?? null, "true", "flags.1?true"], - [this.order, ["bigint"], "Vector"], - ]; - } - - constructor(params: { masks?: true; emojis?: true; order: Array }) { - super(); - this.masks = params.masks; - this.emojis = params.emojis; - this.order = params.order; - } -} - -/** Installed stickersets have changed, the client should refetch them as [described in the docs](https://core.telegram.org/api/stickers#installing-stickersets). */ -export class UpdateStickerSets_ extends _Update_ { - /** Whether mask stickersets have changed */ - masks?: true; - /** Whether the list of installed [custom emoji stickersets](https://core.telegram.org/api/custom-emoji) has changed */ - emojis?: true; - - protected get [id](): number { - return 0x31C24808; - } - - static get [name](): string { - return "updateStickerSets" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["masks", "true", "flags.0?true"], - ["emojis", "true", "flags.1?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.masks ?? null, "true", "flags.0?true"], - [this.emojis ?? null, "true", "flags.1?true"], - ]; - } - - constructor(params?: { masks?: true; emojis?: true }) { - super(); - this.masks = params?.masks; - this.emojis = params?.emojis; - } -} - -/** The saved gif list has changed, the client should refetch it using [messages.getSavedGifs](https://core.telegram.org/method/messages.getSavedGifs) */ -export class UpdateSavedGifs_ extends _Update_ { - protected get [id](): number { - return 0x9375341E; - } - - static get [name](): string { - return "updateSavedGifs" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** An incoming inline query */ -export class UpdateBotInlineQuery_ extends _Update_ { - /** Query ID */ - query_id: bigint; - /** User that sent the query */ - user_id: bigint; - /** Text of query */ - query: string; - /** Attached geolocation */ - geo?: enums.GeoPoint; - /** Type of the chat from which the inline query was sent. */ - peer_type?: enums.InlineQueryPeerType; - /** Offset to navigate through results */ - offset: string; - - protected get [id](): number { - return 0x496F379C; - } - - static get [name](): string { - return "updateBotInlineQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["query_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["query", "string", "string"], - ["geo", _GeoPoint_, "flags.0?GeoPoint"], - ["peer_type", _InlineQueryPeerType_, "flags.1?InlineQueryPeerType"], - ["offset", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.query_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.query, "string", "string"], - [this.geo ?? null, _GeoPoint_, "flags.0?GeoPoint"], - [this.peer_type ?? null, _InlineQueryPeerType_, "flags.1?InlineQueryPeerType"], - [this.offset, "string", "string"], - ]; - } - - constructor(params: { query_id: bigint; user_id: bigint; query: string; geo?: enums.GeoPoint; peer_type?: enums.InlineQueryPeerType; offset: string }) { - super(); - this.query_id = params.query_id; - this.user_id = params.user_id; - this.query = params.query; - this.geo = params.geo; - this.peer_type = params.peer_type; - this.offset = params.offset; - } -} - -/** The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the [feedback collecting](https://core.telegram.org/bots/inline#collecting-feedback) for details on how to enable these updates for your bot. */ -export class UpdateBotInlineSend_ extends _Update_ { - /** The user that chose the result */ - user_id: bigint; - /** The query that was used to obtain the result */ - query: string; - /** Optional. Sender location, only for bots that require user location */ - geo?: enums.GeoPoint; - /** The unique identifier for the result that was chosen */ - id: string; - /** Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. */ - msg_id?: enums.InputBotInlineMessageID; - - protected get [id](): number { - return 0x12F12A07; - } - - static get [name](): string { - return "updateBotInlineSend" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["user_id", "bigint", "long"], - ["query", "string", "string"], - ["geo", _GeoPoint_, "flags.0?GeoPoint"], - ["id", "string", "string"], - ["msg_id", _InputBotInlineMessageID_, "flags.1?InputBotInlineMessageID"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.user_id, "bigint", "long"], - [this.query, "string", "string"], - [this.geo ?? null, _GeoPoint_, "flags.0?GeoPoint"], - [this.id, "string", "string"], - [this.msg_id ?? null, _InputBotInlineMessageID_, "flags.1?InputBotInlineMessageID"], - ]; - } - - constructor(params: { user_id: bigint; query: string; geo?: enums.GeoPoint; id: string; msg_id?: enums.InputBotInlineMessageID }) { - super(); - this.user_id = params.user_id; - this.query = params.query; - this.geo = params.geo; - this.id = params.id; - this.msg_id = params.msg_id; - } -} - -/** A message was edited in a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class UpdateEditChannelMessage_ extends _Update_ { - /** The new message */ - message: enums.Message; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x1B3F4DF7; - } - - static get [name](): string { - return "updateEditChannelMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { message: enums.Message; pts: number; pts_count: number }) { - super(); - this.message = params.message; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** A callback button was pressed, and the button data was sent to the bot that created the button */ -export class UpdateBotCallbackQuery_ extends _Update_ { - /** Query ID */ - query_id: bigint; - /** ID of the user that pressed the button */ - user_id: bigint; - /** Chat where the inline keyboard was sent */ - peer: enums.Peer; - /** Message ID */ - msg_id: number; - /** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */ - chat_instance: bigint; - /** Callback data */ - data?: Uint8Array; - /** Short name of a Game to be returned, serves as the unique identifier for the game */ - game_short_name?: string; - - protected get [id](): number { - return 0xB9CFC48D; - } - - static get [name](): string { - return "updateBotCallbackQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["query_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ["chat_instance", "bigint", "long"], - ["data", Uint8Array, "flags.0?bytes"], - ["game_short_name", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.query_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - [this.chat_instance, "bigint", "long"], - [this.data ?? null, Uint8Array, "flags.0?bytes"], - [this.game_short_name ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { query_id: bigint; user_id: bigint; peer: enums.Peer; msg_id: number; chat_instance: bigint; data?: Uint8Array; game_short_name?: string }) { - super(); - this.query_id = params.query_id; - this.user_id = params.user_id; - this.peer = params.peer; - this.msg_id = params.msg_id; - this.chat_instance = params.chat_instance; - this.data = params.data; - this.game_short_name = params.game_short_name; - } -} - -/** A message was edited */ -export class UpdateEditMessage_ extends _Update_ { - /** The new edited message */ - message: enums.Message; - /** [PTS](https://core.telegram.org/api/updates) */ - pts: number; - /** [PTS count](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0xE40370A3; - } - - static get [name](): string { - return "updateEditMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { message: enums.Message; pts: number; pts_count: number }) { - super(); - this.message = params.message; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** This notification is received by bots when a button is pressed */ -export class UpdateInlineBotCallbackQuery_ extends _Update_ { - /** Query ID */ - query_id: bigint; - /** ID of the user that pressed the button */ - user_id: bigint; - /** ID of the inline message with the button */ - msg_id: enums.InputBotInlineMessageID; - /** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */ - chat_instance: bigint; - /** Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. */ - data?: Uint8Array; - /** Short name of a Game to be returned, serves as the unique identifier for the game */ - game_short_name?: string; - - protected get [id](): number { - return 0x691E9052; - } - - static get [name](): string { - return "updateInlineBotCallbackQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["query_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["msg_id", _InputBotInlineMessageID_, "InputBotInlineMessageID"], - ["chat_instance", "bigint", "long"], - ["data", Uint8Array, "flags.0?bytes"], - ["game_short_name", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.query_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.msg_id, _InputBotInlineMessageID_, "InputBotInlineMessageID"], - [this.chat_instance, "bigint", "long"], - [this.data ?? null, Uint8Array, "flags.0?bytes"], - [this.game_short_name ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { query_id: bigint; user_id: bigint; msg_id: enums.InputBotInlineMessageID; chat_instance: bigint; data?: Uint8Array; game_short_name?: string }) { - super(); - this.query_id = params.query_id; - this.user_id = params.user_id; - this.msg_id = params.msg_id; - this.chat_instance = params.chat_instance; - this.data = params.data; - this.game_short_name = params.game_short_name; - } -} - -/** Outgoing messages in a [channel/supergroup](https://core.telegram.org/api/channel) were read */ -export class UpdateReadChannelOutbox_ extends _Update_ { - /** Channel/supergroup ID */ - channel_id: bigint; - /** Position up to which all outgoing messages are read. */ - max_id: number; - - protected get [id](): number { - return 0xB75F99A9; - } - - static get [name](): string { - return "updateReadChannelOutbox" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; max_id: number }) { - super(); - this.channel_id = params.channel_id; - this.max_id = params.max_id; - } -} - -/** Notifies a change of a message [draft](https://core.telegram.org/api/drafts). */ -export class UpdateDraftMessage_ extends _Update_ { - /** The peer to which the draft is associated */ - peer: enums.Peer; - /** ID of the [forum topic](https://core.telegram.org/api/forum#forum-topics) to which the draft is associated */ - top_msg_id?: number; - /** The draft */ - draft: enums.DraftMessage; - - protected get [id](): number { - return 0x1B49EC6D; - } - - static get [name](): string { - return "updateDraftMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", _Peer_, "Peer"], - ["top_msg_id", "number", "flags.0?int"], - ["draft", _DraftMessage_, "DraftMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, _Peer_, "Peer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.draft, _DraftMessage_, "DraftMessage"], - ]; - } - - constructor(params: { peer: enums.Peer; top_msg_id?: number; draft: enums.DraftMessage }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - this.draft = params.draft; - } -} - -/** Some featured stickers were marked as read */ -export class UpdateReadFeaturedStickers_ extends _Update_ { - protected get [id](): number { - return 0x571D2742; - } - - static get [name](): string { - return "updateReadFeaturedStickers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The recent sticker list was updated */ -export class UpdateRecentStickers_ extends _Update_ { - protected get [id](): number { - return 0x9A422C20; - } - - static get [name](): string { - return "updateRecentStickers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The server-side configuration has changed; the client should re-fetch the config using [help.getConfig](https://core.telegram.org/method/help.getConfig) */ -export class UpdateConfig_ extends _Update_ { - protected get [id](): number { - return 0xA229DD06; - } - - static get [name](): string { - return "updateConfig" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** [Common message box sequence PTS](https://core.telegram.org/api/updates) has changed, [state has to be refetched using updates.getState](https://core.telegram.org/api/updates#fetching-state) */ -export class UpdatePtsChanged_ extends _Update_ { - protected get [id](): number { - return 0x3354678F; - } - - static get [name](): string { - return "updatePtsChanged" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A webpage preview of a link in a [channel/supergroup](https://core.telegram.org/api/channel) message was generated */ -export class UpdateChannelWebPage_ extends _Update_ { - /** [Channel/supergroup](https://core.telegram.org/api/channel) ID */ - channel_id: bigint; - /** Generated webpage preview */ - webpage: enums.WebPage; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x2F2BA99F; - } - - static get [name](): string { - return "updateChannelWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["webpage", _WebPage_, "WebPage"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.webpage, _WebPage_, "WebPage"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; webpage: enums.WebPage; pts: number; pts_count: number }) { - super(); - this.channel_id = params.channel_id; - this.webpage = params.webpage; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** A dialog was pinned/unpinned */ -export class UpdateDialogPinned_ extends _Update_ { - /** Whether the dialog was pinned */ - pinned?: true; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** The dialog */ - peer: enums.DialogPeer; - - protected get [id](): number { - return 0x6E6FE51C; - } - - static get [name](): string { - return "updateDialogPinned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["folder_id", "number", "flags.1?int"], - ["peer", _DialogPeer_, "DialogPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.folder_id ?? null, "number", "flags.1?int"], - [this.peer, _DialogPeer_, "DialogPeer"], - ]; - } - - constructor(params: { pinned?: true; folder_id?: number; peer: enums.DialogPeer }) { - super(); - this.pinned = params.pinned; - this.folder_id = params.folder_id; - this.peer = params.peer; - } -} - -/** Pinned dialogs were updated */ -export class UpdatePinnedDialogs_ extends _Update_ { - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** New order of pinned dialogs */ - order?: Array; - - protected get [id](): number { - return 0xFA0F3CA2; - } - - static get [name](): string { - return "updatePinnedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["folder_id", "number", "flags.1?int"], - ["order", [_DialogPeer_], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.folder_id ?? null, "number", "flags.1?int"], - [this.order ?? null, [_DialogPeer_], "flags.0?Vector"], - ]; - } - - constructor(params?: { folder_id?: number; order?: Array }) { - super(); - this.folder_id = params?.folder_id; - this.order = params?.order; - } -} - -/** A new incoming event; for bots only */ -export class UpdateBotWebhookJSON_ extends _Update_ { - /** The event */ - data: enums.DataJSON; - - protected get [id](): number { - return 0x8317C0C3; - } - - static get [name](): string { - return "updateBotWebhookJSON" - } - - static get [paramDesc](): ParamDesc { - return [ - ["data", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.data, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { data: enums.DataJSON }) { - super(); - this.data = params.data; - } -} - -/** A new incoming query; for bots only */ -export class UpdateBotWebhookJSONQuery_ extends _Update_ { - /** Query identifier */ - query_id: bigint; - /** Query data */ - data: enums.DataJSON; - /** Query timeout */ - timeout: number; - - protected get [id](): number { - return 0x9B9240A6; - } - - static get [name](): string { - return "updateBotWebhookJSONQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["query_id", "bigint", "long"], - ["data", _DataJSON_, "DataJSON"], - ["timeout", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.query_id, "bigint", "long"], - [this.data, _DataJSON_, "DataJSON"], - [this.timeout, "number", "int"], - ]; - } - - constructor(params: { query_id: bigint; data: enums.DataJSON; timeout: number }) { - super(); - this.query_id = params.query_id; - this.data = params.data; - this.timeout = params.timeout; - } -} - -/** This object contains information about an incoming shipping query. */ -export class UpdateBotShippingQuery_ extends _Update_ { - /** Unique query identifier */ - query_id: bigint; - /** User who sent the query */ - user_id: bigint; - /** Bot specified invoice payload */ - payload: Uint8Array; - /** User specified shipping address */ - shipping_address: enums.PostAddress; - - protected get [id](): number { - return 0xB5AEFD7D; - } - - static get [name](): string { - return "updateBotShippingQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["query_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["payload", Uint8Array, "bytes"], - ["shipping_address", _PostAddress_, "PostAddress"], - ]; - } - - protected get [params](): Params { - return [ - [this.query_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.payload, Uint8Array, "bytes"], - [this.shipping_address, _PostAddress_, "PostAddress"], - ]; - } - - constructor(params: { query_id: bigint; user_id: bigint; payload: Uint8Array; shipping_address: enums.PostAddress }) { - super(); - this.query_id = params.query_id; - this.user_id = params.user_id; - this.payload = params.payload; - this.shipping_address = params.shipping_address; - } -} - -/** This object contains information about an incoming pre-checkout query. */ -export class UpdateBotPrecheckoutQuery_ extends _Update_ { - /** Unique query identifier */ - query_id: bigint; - /** User who sent the query */ - user_id: bigint; - /** Bot specified invoice payload */ - payload: Uint8Array; - /** Order info provided by the user */ - info?: enums.PaymentRequestedInfo; - /** Identifier of the shipping option chosen by the user */ - shipping_option_id?: string; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - total_amount: bigint; - - protected get [id](): number { - return 0x8CAA9A96; - } - - static get [name](): string { - return "updateBotPrecheckoutQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["query_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["payload", Uint8Array, "bytes"], - ["info", _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - ["shipping_option_id", "string", "flags.1?string"], - ["currency", "string", "string"], - ["total_amount", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.query_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.payload, Uint8Array, "bytes"], - [this.info ?? null, _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - [this.shipping_option_id ?? null, "string", "flags.1?string"], - [this.currency, "string", "string"], - [this.total_amount, "bigint", "long"], - ]; - } - - constructor(params: { query_id: bigint; user_id: bigint; payload: Uint8Array; info?: enums.PaymentRequestedInfo; shipping_option_id?: string; currency: string; total_amount: bigint }) { - super(); - this.query_id = params.query_id; - this.user_id = params.user_id; - this.payload = params.payload; - this.info = params.info; - this.shipping_option_id = params.shipping_option_id; - this.currency = params.currency; - this.total_amount = params.total_amount; - } -} - -/** An incoming phone call */ -export class UpdatePhoneCall_ extends _Update_ { - /** Phone call */ - phone_call: enums.PhoneCall; - - protected get [id](): number { - return 0xAB0F6B1E; - } - - static get [name](): string { - return "updatePhoneCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_call", _PhoneCall_, "PhoneCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_call, _PhoneCall_, "PhoneCall"], - ]; - } - - constructor(params: { phone_call: enums.PhoneCall }) { - super(); - this.phone_call = params.phone_call; - } -} - -/** A language pack has changed, the client should manually fetch the changed strings using [langpack.getDifference](https://core.telegram.org/method/langpack.getDifference) */ -export class UpdateLangPackTooLong_ extends _Update_ { - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0x46560264; - } - - static get [name](): string { - return "updateLangPackTooLong" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { lang_code: string }) { - super(); - this.lang_code = params.lang_code; - } -} - -/** Language pack updated */ -export class UpdateLangPack_ extends _Update_ { - /** Changed strings */ - difference: enums.LangPackDifference; - - protected get [id](): number { - return 0x56022F4D; - } - - static get [name](): string { - return "updateLangPack" - } - - static get [paramDesc](): ParamDesc { - return [ - ["difference", _LangPackDifference_, "LangPackDifference"], - ]; - } - - protected get [params](): Params { - return [ - [this.difference, _LangPackDifference_, "LangPackDifference"], - ]; - } - - constructor(params: { difference: enums.LangPackDifference }) { - super(); - this.difference = params.difference; - } -} - -/** The list of favorited stickers was changed, the client should call [messages.getFavedStickers](https://core.telegram.org/method/messages.getFavedStickers) to refetch the new list */ -export class UpdateFavedStickers_ extends _Update_ { - protected get [id](): number { - return 0xE511996D; - } - - static get [name](): string { - return "updateFavedStickers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The specified [channel/supergroup](https://core.telegram.org/api/channel) messages were read */ -export class UpdateChannelReadMessagesContents_ extends _Update_ { - /** [Channel/supergroup](https://core.telegram.org/api/channel) ID */ - channel_id: bigint; - /** [Forum topic ID](https://core.telegram.org/api/forum#forum-topics). */ - top_msg_id?: number; - /** IDs of messages that were read */ - messages: Array; - - protected get [id](): number { - return 0xEA29055D; - } - - static get [name](): string { - return "updateChannelReadMessagesContents" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel_id", "bigint", "long"], - ["top_msg_id", "number", "flags.0?int"], - ["messages", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel_id, "bigint", "long"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.messages, ["number"], "Vector"], - ]; - } - - constructor(params: { channel_id: bigint; top_msg_id?: number; messages: Array }) { - super(); - this.channel_id = params.channel_id; - this.top_msg_id = params.top_msg_id; - this.messages = params.messages; - } -} - -/** All contacts were deleted */ -export class UpdateContactsReset_ extends _Update_ { - protected get [id](): number { - return 0x7084A7BE; - } - - static get [name](): string { - return "updateContactsReset" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The history of a [channel/supergroup](https://core.telegram.org/api/channel) was hidden. */ -export class UpdateChannelAvailableMessages_ extends _Update_ { - /** Channel/supergroup ID */ - channel_id: bigint; - /** Identifier of a maximum unavailable message in a channel due to hidden history. */ - available_min_id: number; - - protected get [id](): number { - return 0xB23FC698; - } - - static get [name](): string { - return "updateChannelAvailableMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["available_min_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.available_min_id, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; available_min_id: number }) { - super(); - this.channel_id = params.channel_id; - this.available_min_id = params.available_min_id; - } -} - -/** The manual unread mark of a chat was changed */ -export class UpdateDialogUnreadMark_ extends _Update_ { - /** Was the chat marked or unmarked as read */ - unread?: true; - /** The dialog */ - peer: enums.DialogPeer; - - protected get [id](): number { - return 0xE16459C3; - } - - static get [name](): string { - return "updateDialogUnreadMark" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["unread", "true", "flags.0?true"], - ["peer", _DialogPeer_, "DialogPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.unread ?? null, "true", "flags.0?true"], - [this.peer, _DialogPeer_, "DialogPeer"], - ]; - } - - constructor(params: { unread?: true; peer: enums.DialogPeer }) { - super(); - this.unread = params.unread; - this.peer = params.peer; - } -} - -/** The results of a poll have changed */ -export class UpdateMessagePoll_ extends _Update_ { - /** Poll ID */ - poll_id: bigint; - /** If the server knows the client hasn't cached this poll yet, the poll itself */ - poll?: enums.Poll; - /** New poll results */ - results: enums.PollResults; - - protected get [id](): number { - return 0xACA1657B; - } - - static get [name](): string { - return "updateMessagePoll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["poll_id", "bigint", "long"], - ["poll", _Poll_, "flags.0?Poll"], - ["results", _PollResults_, "PollResults"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.poll_id, "bigint", "long"], - [this.poll ?? null, _Poll_, "flags.0?Poll"], - [this.results, _PollResults_, "PollResults"], - ]; - } - - constructor(params: { poll_id: bigint; poll?: enums.Poll; results: enums.PollResults }) { - super(); - this.poll_id = params.poll_id; - this.poll = params.poll; - this.results = params.results; - } -} - -/** Default banned rights in a [normal chat](https://core.telegram.org/api/channel) were updated */ -export class UpdateChatDefaultBannedRights_ extends _Update_ { - /** The chat */ - peer: enums.Peer; - /** New default banned rights */ - default_banned_rights: enums.ChatBannedRights; - /** Version */ - version: number; - - protected get [id](): number { - return 0x54C01850; - } - - static get [name](): string { - return "updateChatDefaultBannedRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["default_banned_rights", _ChatBannedRights_, "ChatBannedRights"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.default_banned_rights, _ChatBannedRights_, "ChatBannedRights"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; default_banned_rights: enums.ChatBannedRights; version: number }) { - super(); - this.peer = params.peer; - this.default_banned_rights = params.default_banned_rights; - this.version = params.version; - } -} - -/** The peer list of a [peer folder](https://core.telegram.org/api/folders#peer-folders) was updated */ -export class UpdateFolderPeers_ extends _Update_ { - /** New peer list */ - folder_peers: Array; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x19360DC0; - } - - static get [name](): string { - return "updateFolderPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["folder_peers", [_FolderPeer_], "Vector"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.folder_peers, [_FolderPeer_], "Vector"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { folder_peers: Array; pts: number; pts_count: number }) { - super(); - this.folder_peers = params.folder_peers; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** Settings of a certain peer have changed */ -export class UpdatePeerSettings_ extends _Update_ { - /** The peer */ - peer: enums.Peer; - /** Associated peer settings */ - settings: enums.PeerSettings; - - protected get [id](): number { - return 0x6A7E7366; - } - - static get [name](): string { - return "updatePeerSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["settings", _PeerSettings_, "PeerSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.settings, _PeerSettings_, "PeerSettings"], - ]; - } - - constructor(params: { peer: enums.Peer; settings: enums.PeerSettings }) { - super(); - this.peer = params.peer; - this.settings = params.settings; - } -} - -/** List of peers near you was updated */ -export class UpdatePeerLocated_ extends _Update_ { - /** Geolocated peer list update */ - peers: Array; - - protected get [id](): number { - return 0xB4AFCFB0; - } - - static get [name](): string { - return "updatePeerLocated" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peers", [_PeerLocated_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peers, [_PeerLocated_], "Vector"], - ]; - } - - constructor(params: { peers: Array }) { - super(); - this.peers = params.peers; - } -} - -/** A message was added to the [schedule queue of a chat](https://core.telegram.org/api/scheduled-messages) */ -export class UpdateNewScheduledMessage_ extends _Update_ { - /** Message */ - message: enums.Message; - - protected get [id](): number { - return 0x39A51DFB; - } - - static get [name](): string { - return "updateNewScheduledMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** Some [scheduled messages](https://core.telegram.org/api/scheduled-messages) were deleted from the schedule queue of a chat */ -export class UpdateDeleteScheduledMessages_ extends _Update_ { - /** Peer */ - peer: enums.Peer; - /** Deleted scheduled messages */ - messages: Array; - - protected get [id](): number { - return 0x90866CEE; - } - - static get [name](): string { - return "updateDeleteScheduledMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["messages", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.messages, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.Peer; messages: Array }) { - super(); - this.peer = params.peer; - this.messages = params.messages; - } -} - -/** A cloud theme was updated */ -export class UpdateTheme_ extends _Update_ { - /** Theme */ - theme: enums.Theme; - - protected get [id](): number { - return 0x8216FBA3; - } - - static get [name](): string { - return "updateTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["theme", _Theme_, "Theme"], - ]; - } - - protected get [params](): Params { - return [ - [this.theme, _Theme_, "Theme"], - ]; - } - - constructor(params: { theme: enums.Theme }) { - super(); - this.theme = params.theme; - } -} - -/** Live geoposition message was viewed */ -export class UpdateGeoLiveViewed_ extends _Update_ { - /** The user that viewed the live geoposition */ - peer: enums.Peer; - /** Message ID of geoposition message */ - msg_id: number; - - protected get [id](): number { - return 0x871FB939; - } - - static get [name](): string { - return "updateGeoLiveViewed" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** A login token (for login via QR code) was accepted. */ -export class UpdateLoginToken_ extends _Update_ { - protected get [id](): number { - return 0x564FE691; - } - - static get [name](): string { - return "updateLoginToken" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A specific peer has voted in a poll */ -export class UpdateMessagePollVote_ extends _Update_ { - /** Poll ID */ - poll_id: bigint; - /** The peer that voted in the poll */ - peer: enums.Peer; - /** Chosen option(s) */ - options: Array; - /** New **qts** value, see [updates »](https://core.telegram.org/api/updates) for more info. */ - qts: number; - - protected get [id](): number { - return 0x24F40E77; - } - - static get [name](): string { - return "updateMessagePollVote" - } - - static get [paramDesc](): ParamDesc { - return [ - ["poll_id", "bigint", "long"], - ["peer", _Peer_, "Peer"], - ["options", [Uint8Array], "Vector"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.poll_id, "bigint", "long"], - [this.peer, _Peer_, "Peer"], - [this.options, [Uint8Array], "Vector"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { poll_id: bigint; peer: enums.Peer; options: Array; qts: number }) { - super(); - this.poll_id = params.poll_id; - this.peer = params.peer; - this.options = params.options; - this.qts = params.qts; - } -} - -/** A new [folder](https://core.telegram.org/api/folders) was added */ -export class UpdateDialogFilter_ extends _Update_ { - /** [Folder](https://core.telegram.org/api/folders) ID */ - id: number; - /** [Folder](https://core.telegram.org/api/folders) info */ - filter?: enums.DialogFilter; - - protected get [id](): number { - return 0x26FFDE7D; - } - - static get [name](): string { - return "updateDialogFilter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "number", "int"], - ["filter", _DialogFilter_, "flags.0?DialogFilter"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "number", "int"], - [this.filter ?? null, _DialogFilter_, "flags.0?DialogFilter"], - ]; - } - - constructor(params: { id: number; filter?: enums.DialogFilter }) { - super(); - this.id = params.id; - this.filter = params.filter; - } -} - -/** New [folder](https://core.telegram.org/api/folders) order */ -export class UpdateDialogFilterOrder_ extends _Update_ { - /** Ordered [folder IDs](https://core.telegram.org/api/folders) */ - order: Array; - - protected get [id](): number { - return 0xA5D72105; - } - - static get [name](): string { - return "updateDialogFilterOrder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["order", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.order, ["number"], "Vector"], - ]; - } - - constructor(params: { order: Array }) { - super(); - this.order = params.order; - } -} - -/** Clients should update [folder](https://core.telegram.org/api/folders) info */ -export class UpdateDialogFilters_ extends _Update_ { - protected get [id](): number { - return 0x3504914F; - } - - static get [name](): string { - return "updateDialogFilters" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Incoming phone call signaling payload */ -export class UpdatePhoneCallSignalingData_ extends _Update_ { - /** Phone call ID */ - phone_call_id: bigint; - /** Signaling payload */ - data: Uint8Array; - - protected get [id](): number { - return 0x2661BF09; - } - - static get [name](): string { - return "updatePhoneCallSignalingData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_call_id", "bigint", "long"], - ["data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_call_id, "bigint", "long"], - [this.data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { phone_call_id: bigint; data: Uint8Array }) { - super(); - this.phone_call_id = params.phone_call_id; - this.data = params.data; - } -} - -/** The forward counter of a message in a channel has changed */ -export class UpdateChannelMessageForwards_ extends _Update_ { - /** Channel ID */ - channel_id: bigint; - /** ID of the message */ - id: number; - /** New forward counter */ - forwards: number; - - protected get [id](): number { - return 0xD29A27F4; - } - - static get [name](): string { - return "updateChannelMessageForwards" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["id", "number", "int"], - ["forwards", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.id, "number", "int"], - [this.forwards, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; id: number; forwards: number }) { - super(); - this.channel_id = params.channel_id; - this.id = params.id; - this.forwards = params.forwards; - } -} - -/** Incoming comments in a [discussion thread](https://core.telegram.org/api/threads) were marked as read */ -export class UpdateReadChannelDiscussionInbox_ extends _Update_ { - /** [Discussion group ID](https://core.telegram.org/api/channel) */ - channel_id: bigint; - /** ID of the group message that started the [thread](https://core.telegram.org/api/threads) (message in linked discussion group) */ - top_msg_id: number; - /** Message ID of latest read incoming message for this [thread](https://core.telegram.org/api/threads) */ - read_max_id: number; - /** If set, contains the ID of the [channel](https://core.telegram.org/api/channel) that contains the post that started the [comment thread](https://core.telegram.org/api/threads) in the discussion group (`channel_id`) */ - broadcast_id?: bigint; - /** If set, contains the ID of the channel post that started the [comment thread](https://core.telegram.org/api/threads) */ - broadcast_post?: number; - - protected get [id](): number { - return 0xD6B19546; - } - - static get [name](): string { - return "updateReadChannelDiscussionInbox" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel_id", "bigint", "long"], - ["top_msg_id", "number", "int"], - ["read_max_id", "number", "int"], - ["broadcast_id", "bigint", "flags.0?long"], - ["broadcast_post", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel_id, "bigint", "long"], - [this.top_msg_id, "number", "int"], - [this.read_max_id, "number", "int"], - [this.broadcast_id ?? null, "bigint", "flags.0?long"], - [this.broadcast_post ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { channel_id: bigint; top_msg_id: number; read_max_id: number; broadcast_id?: bigint; broadcast_post?: number }) { - super(); - this.channel_id = params.channel_id; - this.top_msg_id = params.top_msg_id; - this.read_max_id = params.read_max_id; - this.broadcast_id = params.broadcast_id; - this.broadcast_post = params.broadcast_post; - } -} - -/** Outgoing comments in a [discussion thread](https://core.telegram.org/api/threads) were marked as read */ -export class UpdateReadChannelDiscussionOutbox_ extends _Update_ { - /** [Supergroup ID](https://core.telegram.org/api/channel) */ - channel_id: bigint; - /** ID of the group message that started the [thread](https://core.telegram.org/api/threads) */ - top_msg_id: number; - /** Message ID of latest read outgoing message for this [thread](https://core.telegram.org/api/threads) */ - read_max_id: number; - - protected get [id](): number { - return 0x695C9E7C; - } - - static get [name](): string { - return "updateReadChannelDiscussionOutbox" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["top_msg_id", "number", "int"], - ["read_max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.top_msg_id, "number", "int"], - [this.read_max_id, "number", "int"], - ]; - } - - constructor(params: { channel_id: bigint; top_msg_id: number; read_max_id: number }) { - super(); - this.channel_id = params.channel_id; - this.top_msg_id = params.top_msg_id; - this.read_max_id = params.read_max_id; - } -} - -/** We blocked a peer, see [here »](https://core.telegram.org/api/block) for more info on blocklists. */ -export class UpdatePeerBlocked_ extends _Update_ { - /** Whether the peer was blocked or unblocked */ - blocked?: true; - /** Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see [here »](https://core.telegram.org/api/block) for more info. */ - blocked_my_stories_from?: true; - /** The (un)blocked peer */ - peer_id: enums.Peer; - - protected get [id](): number { - return 0xEBE07752; - } - - static get [name](): string { - return "updatePeerBlocked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["blocked", "true", "flags.0?true"], - ["blocked_my_stories_from", "true", "flags.1?true"], - ["peer_id", _Peer_, "Peer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.blocked ?? null, "true", "flags.0?true"], - [this.blocked_my_stories_from ?? null, "true", "flags.1?true"], - [this.peer_id, _Peer_, "Peer"], - ]; - } - - constructor(params: { blocked?: true; blocked_my_stories_from?: true; peer_id: enums.Peer }) { - super(); - this.blocked = params.blocked; - this.blocked_my_stories_from = params.blocked_my_stories_from; - this.peer_id = params.peer_id; - } -} - -/** A user is typing in a [supergroup, channel](https://core.telegram.org/api/channel) or [message thread](https://core.telegram.org/api/threads) */ -export class UpdateChannelUserTyping_ extends _Update_ { - /** Channel ID */ - channel_id: bigint; - /** [Thread ID](https://core.telegram.org/api/threads) */ - top_msg_id?: number; - /** The peer that is typing */ - from_id: enums.Peer; - /** Whether the user is typing, sending a media or doing something else */ - action: enums.SendMessageAction; - - protected get [id](): number { - return 0x8C88C923; - } - - static get [name](): string { - return "updateChannelUserTyping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel_id", "bigint", "long"], - ["top_msg_id", "number", "flags.0?int"], - ["from_id", _Peer_, "Peer"], - ["action", _SendMessageAction_, "SendMessageAction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel_id, "bigint", "long"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.from_id, _Peer_, "Peer"], - [this.action, _SendMessageAction_, "SendMessageAction"], - ]; - } - - constructor(params: { channel_id: bigint; top_msg_id?: number; from_id: enums.Peer; action: enums.SendMessageAction }) { - super(); - this.channel_id = params.channel_id; - this.top_msg_id = params.top_msg_id; - this.from_id = params.from_id; - this.action = params.action; - } -} - -/** Some messages were pinned in a chat */ -export class UpdatePinnedMessages_ extends _Update_ { - /** Whether the messages were pinned or unpinned */ - pinned?: true; - /** Peer */ - peer: enums.Peer; - /** Message IDs */ - messages: Array; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0xED85EAB5; - } - - static get [name](): string { - return "updatePinnedMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["peer", _Peer_, "Peer"], - ["messages", ["number"], "Vector"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.peer, _Peer_, "Peer"], - [this.messages, ["number"], "Vector"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { pinned?: true; peer: enums.Peer; messages: Array; pts: number; pts_count: number }) { - super(); - this.pinned = params.pinned; - this.peer = params.peer; - this.messages = params.messages; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** Messages were pinned/unpinned in a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class UpdatePinnedChannelMessages_ extends _Update_ { - /** Whether the messages were pinned or unpinned */ - pinned?: true; - /** Channel ID */ - channel_id: bigint; - /** Messages */ - messages: Array; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x5BB98608; - } - - static get [name](): string { - return "updatePinnedChannelMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["channel_id", "bigint", "long"], - ["messages", ["number"], "Vector"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.channel_id, "bigint", "long"], - [this.messages, ["number"], "Vector"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { pinned?: true; channel_id: bigint; messages: Array; pts: number; pts_count: number }) { - super(); - this.pinned = params.pinned; - this.channel_id = params.channel_id; - this.messages = params.messages; - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** A new chat is available */ -export class UpdateChat_ extends _Update_ { - /** Chat ID */ - chat_id: bigint; - - protected get [id](): number { - return 0xF89A6A4E; - } - - static get [name](): string { - return "updateChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: bigint }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** The participant list of a certain group call has changed */ -export class UpdateGroupCallParticipants_ extends _Update_ { - /** Group call */ - call: enums.InputGroupCall; - /** New participant list */ - participants: Array; - /** Version */ - version: number; - - protected get [id](): number { - return 0xF2EBDB4E; - } - - static get [name](): string { - return "updateGroupCallParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", _InputGroupCall_, "InputGroupCall"], - ["participants", [_GroupCallParticipant_], "Vector"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, _InputGroupCall_, "InputGroupCall"], - [this.participants, [_GroupCallParticipant_], "Vector"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; participants: Array; version: number }) { - super(); - this.call = params.call; - this.participants = params.participants; - this.version = params.version; - } -} - -/** A new groupcall was started */ -export class UpdateGroupCall_ extends _Update_ { - /** The [channel/supergroup](https://core.telegram.org/api/channel) where this group call or livestream takes place */ - chat_id: bigint; - /** Info about the group call or livestream */ - call: enums.GroupCall; - - protected get [id](): number { - return 0x14B24500; - } - - static get [name](): string { - return "updateGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["call", _GroupCall_, "GroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.call, _GroupCall_, "GroupCall"], - ]; - } - - constructor(params: { chat_id: bigint; call: enums.GroupCall }) { - super(); - this.chat_id = params.chat_id; - this.call = params.call; - } -} - -/** The Time-To-Live for messages sent by the current user in a specific chat has changed */ -export class UpdatePeerHistoryTTL_ extends _Update_ { - /** The chat */ - peer: enums.Peer; - /** The new Time-To-Live */ - ttl_period?: number; - - protected get [id](): number { - return 0xBB9BB9A5; - } - - static get [name](): string { - return "updatePeerHistoryTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", _Peer_, "Peer"], - ["ttl_period", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, _Peer_, "Peer"], - [this.ttl_period ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { peer: enums.Peer; ttl_period?: number }) { - super(); - this.peer = params.peer; - this.ttl_period = params.ttl_period; - } -} - -/** A user has joined or left a specific chat */ -export class UpdateChatParticipant_ extends _Update_ { - /** [Chat](https://core.telegram.org/api/channel) ID */ - chat_id: bigint; - /** When did this event occur */ - date: number; - /** User that triggered the change (inviter, admin that kicked the user, or the even the **user\_id** itself) */ - actor_id: bigint; - /** User that was affected by the change */ - user_id: bigint; - /** Previous participant info (empty if this participant just joined) */ - prev_participant?: enums.ChatParticipant; - /** New participant info (empty if this participant just left) */ - new_participant?: enums.ChatParticipant; - /** The invite that was used to join the group */ - invite?: enums.ExportedChatInvite; - /** New **qts** value, see [updates »](https://core.telegram.org/api/updates) for more info. */ - qts: number; - - protected get [id](): number { - return 0xD087663A; - } - - static get [name](): string { - return "updateChatParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["chat_id", "bigint", "long"], - ["date", "number", "int"], - ["actor_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["prev_participant", _ChatParticipant_, "flags.0?ChatParticipant"], - ["new_participant", _ChatParticipant_, "flags.1?ChatParticipant"], - ["invite", _ExportedChatInvite_, "flags.2?ExportedChatInvite"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.chat_id, "bigint", "long"], - [this.date, "number", "int"], - [this.actor_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.prev_participant ?? null, _ChatParticipant_, "flags.0?ChatParticipant"], - [this.new_participant ?? null, _ChatParticipant_, "flags.1?ChatParticipant"], - [this.invite ?? null, _ExportedChatInvite_, "flags.2?ExportedChatInvite"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { chat_id: bigint; date: number; actor_id: bigint; user_id: bigint; prev_participant?: enums.ChatParticipant; new_participant?: enums.ChatParticipant; invite?: enums.ExportedChatInvite; qts: number }) { - super(); - this.chat_id = params.chat_id; - this.date = params.date; - this.actor_id = params.actor_id; - this.user_id = params.user_id; - this.prev_participant = params.prev_participant; - this.new_participant = params.new_participant; - this.invite = params.invite; - this.qts = params.qts; - } -} - -/** A participant has left, joined, was banned or admined in a [channel or supergroup](https://core.telegram.org/api/channel). */ -export class UpdateChannelParticipant_ extends _Update_ { - /** Whether the participant joined using a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - via_chatlist?: true; - /** Channel ID */ - channel_id: bigint; - /** Date of the event */ - date: number; - /** User that triggered the change (inviter, admin that kicked the user, or the even the **user\_id** itself) */ - actor_id: bigint; - /** User that was affected by the change */ - user_id: bigint; - /** Previous participant status */ - prev_participant?: enums.ChannelParticipant; - /** New participant status */ - new_participant?: enums.ChannelParticipant; - /** Chat invite used to join the [channel/supergroup](https://core.telegram.org/api/channel) */ - invite?: enums.ExportedChatInvite; - /** New **qts** value, see [updates »](https://core.telegram.org/api/updates) for more info. */ - qts: number; - - protected get [id](): number { - return 0x985D3ABB; - } - - static get [name](): string { - return "updateChannelParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["via_chatlist", "true", "flags.3?true"], - ["channel_id", "bigint", "long"], - ["date", "number", "int"], - ["actor_id", "bigint", "long"], - ["user_id", "bigint", "long"], - ["prev_participant", _ChannelParticipant_, "flags.0?ChannelParticipant"], - ["new_participant", _ChannelParticipant_, "flags.1?ChannelParticipant"], - ["invite", _ExportedChatInvite_, "flags.2?ExportedChatInvite"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.via_chatlist ?? null, "true", "flags.3?true"], - [this.channel_id, "bigint", "long"], - [this.date, "number", "int"], - [this.actor_id, "bigint", "long"], - [this.user_id, "bigint", "long"], - [this.prev_participant ?? null, _ChannelParticipant_, "flags.0?ChannelParticipant"], - [this.new_participant ?? null, _ChannelParticipant_, "flags.1?ChannelParticipant"], - [this.invite ?? null, _ExportedChatInvite_, "flags.2?ExportedChatInvite"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { via_chatlist?: true; channel_id: bigint; date: number; actor_id: bigint; user_id: bigint; prev_participant?: enums.ChannelParticipant; new_participant?: enums.ChannelParticipant; invite?: enums.ExportedChatInvite; qts: number }) { - super(); - this.via_chatlist = params.via_chatlist; - this.channel_id = params.channel_id; - this.date = params.date; - this.actor_id = params.actor_id; - this.user_id = params.user_id; - this.prev_participant = params.prev_participant; - this.new_participant = params.new_participant; - this.invite = params.invite; - this.qts = params.qts; - } -} - -/** A bot was stopped or re-started. */ -export class UpdateBotStopped_ extends _Update_ { - /** The user ID */ - user_id: bigint; - /** When did this action occur */ - date: number; - /** Whether the bot was stopped or started */ - stopped: boolean; - /** New **qts** value, see [updates »](https://core.telegram.org/api/updates) for more info. */ - qts: number; - - protected get [id](): number { - return 0xC4870A49; - } - - static get [name](): string { - return "updateBotStopped" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["date", "number", "int"], - ["stopped", "boolean", "Bool"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.date, "number", "int"], - [this.stopped, "boolean", "Bool"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; date: number; stopped: boolean; qts: number }) { - super(); - this.user_id = params.user_id; - this.date = params.date; - this.stopped = params.stopped; - this.qts = params.qts; - } -} - -/** New WebRTC parameters */ -export class UpdateGroupCallConnection_ extends _Update_ { - /** Are these parameters related to the screen capture session currently in progress? */ - presentation?: true; - /** WebRTC parameters */ - params: enums.DataJSON; - - protected get [id](): number { - return 0x0B783982; - } - - static get [name](): string { - return "updateGroupCallConnection" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["presentation", "true", "flags.0?true"], - ["params", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.presentation ?? null, "true", "flags.0?true"], - [this.params, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { presentation?: true; params: enums.DataJSON }) { - super(); - this.presentation = params.presentation; - this.params = params.params; - } -} - -/** The [command set](https://core.telegram.org/api/bots/commands) of a certain bot in a certain chat has changed. */ -export class UpdateBotCommands_ extends _Update_ { - /** The affected chat */ - peer: enums.Peer; - /** ID of the bot that changed its command set */ - bot_id: bigint; - /** New bot commands */ - commands: Array; - - protected get [id](): number { - return 0x4D712F2E; - } - - static get [name](): string { - return "updateBotCommands" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["bot_id", "bigint", "long"], - ["commands", [_BotCommand_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.bot_id, "bigint", "long"], - [this.commands, [_BotCommand_], "Vector"], - ]; - } - - constructor(params: { peer: enums.Peer; bot_id: bigint; commands: Array }) { - super(); - this.peer = params.peer; - this.bot_id = params.bot_id; - this.commands = params.commands; - } -} - -/** Someone has requested to join a chat or channel */ -export class UpdatePendingJoinRequests_ extends _Update_ { - /** Chat or channel */ - peer: enums.Peer; - /** Number of pending [join requests »](https://core.telegram.org/api/invites#join-requests) for the chat or channel */ - requests_pending: number; - /** IDs of users that have recently requested to join */ - recent_requesters: Array; - - protected get [id](): number { - return 0x7063C3DB; - } - - static get [name](): string { - return "updatePendingJoinRequests" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["requests_pending", "number", "int"], - ["recent_requesters", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.requests_pending, "number", "int"], - [this.recent_requesters, ["bigint"], "Vector"], - ]; - } - - constructor(params: { peer: enums.Peer; requests_pending: number; recent_requesters: Array }) { - super(); - this.peer = params.peer; - this.requests_pending = params.requests_pending; - this.recent_requesters = params.recent_requesters; - } -} - -/** Someone has requested to join a chat or channel (bots only, users will receive an [updatePendingJoinRequests](https://core.telegram.org/constructor/updatePendingJoinRequests), instead) */ -export class UpdateBotChatInviteRequester_ extends _Update_ { - /** The chat or channel in question */ - peer: enums.Peer; - /** When was the [join request »](https://core.telegram.org/api/invites#join-requests) made */ - date: number; - /** The user ID that is asking to join the chat or channel */ - user_id: bigint; - /** Bio of the user */ - about: string; - /** Chat invite link that was used by the user to send the [join request »](https://core.telegram.org/api/invites#join-requests) */ - invite: enums.ExportedChatInvite; - /** [QTS](https://core.telegram.org/api/updates) event sequence identifier */ - qts: number; - - protected get [id](): number { - return 0x11DFA986; - } - - static get [name](): string { - return "updateBotChatInviteRequester" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["date", "number", "int"], - ["user_id", "bigint", "long"], - ["about", "string", "string"], - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.date, "number", "int"], - [this.user_id, "bigint", "long"], - [this.about, "string", "string"], - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; date: number; user_id: bigint; about: string; invite: enums.ExportedChatInvite; qts: number }) { - super(); - this.peer = params.peer; - this.date = params.date; - this.user_id = params.user_id; - this.about = params.about; - this.invite = params.invite; - this.qts = params.qts; - } -} - -/** New [message reactions »](https://core.telegram.org/api/reactions) are available */ -export class UpdateMessageReactions_ extends _Update_ { - /** Peer */ - peer: enums.Peer; - /** Message ID */ - msg_id: number; - /** [Forum topic ID](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - /** Reactions */ - reactions: enums.MessageReactions; - - protected get [id](): number { - return 0x5E1B3CB8; - } - - static get [name](): string { - return "updateMessageReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ["top_msg_id", "number", "flags.0?int"], - ["reactions", _MessageReactions_, "MessageReactions"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.reactions, _MessageReactions_, "MessageReactions"], - ]; - } - - constructor(params: { peer: enums.Peer; msg_id: number; top_msg_id?: number; reactions: enums.MessageReactions }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.top_msg_id = params.top_msg_id; - this.reactions = params.reactions; - } -} - -/** The list of installed [attachment menu entries »](https://core.telegram.org/api/bots/attach) has changed, use [messages.getAttachMenuBots](https://core.telegram.org/method/messages.getAttachMenuBots) to fetch the updated list. */ -export class UpdateAttachMenuBots_ extends _Update_ { - protected get [id](): number { - return 0x17B7A20B; - } - - static get [name](): string { - return "updateAttachMenuBots" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using [messages.sendWebViewResultMessage](https://core.telegram.org/method/messages.sendWebViewResultMessage) */ -export class UpdateWebViewResultSent_ extends _Update_ { - /** Web app interaction ID */ - query_id: bigint; - - protected get [id](): number { - return 0x1592B79D; - } - - static get [name](): string { - return "updateWebViewResultSent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["query_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.query_id, "bigint", "long"], - ]; - } - - constructor(params: { query_id: bigint }) { - super(); - this.query_id = params.query_id; - } -} - -/** The menu button behavior for the specified bot has changed */ -export class UpdateBotMenuButton_ extends _Update_ { - /** Bot ID */ - bot_id: bigint; - /** New menu button */ - button: enums.BotMenuButton; - - protected get [id](): number { - return 0x14B85813; - } - - static get [name](): string { - return "updateBotMenuButton" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot_id", "bigint", "long"], - ["button", _BotMenuButton_, "BotMenuButton"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot_id, "bigint", "long"], - [this.button, _BotMenuButton_, "BotMenuButton"], - ]; - } - - constructor(params: { bot_id: bigint; button: enums.BotMenuButton }) { - super(); - this.bot_id = params.bot_id; - this.button = params.button; - } -} - -/** The list of saved notification sounds has changed, use [account.getSavedRingtones](https://core.telegram.org/method/account.getSavedRingtones) to fetch the new list. */ -export class UpdateSavedRingtones_ extends _Update_ { - protected get [id](): number { - return 0x74D8BE99; - } - - static get [name](): string { - return "updateSavedRingtones" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A pending [voice message transcription »](https://core.telegram.org/api/transcribe) initiated with [messages.transcribeAudio](https://core.telegram.org/method/messages.transcribeAudio) was updated. */ -export class UpdateTranscribedAudio_ extends _Update_ { - /** Whether this transcription is still pending and further [updateTranscribedAudio](https://core.telegram.org/constructor/updateTranscribedAudio) about it will be sent in the future. */ - pending?: true; - /** Peer of the transcribed message */ - peer: enums.Peer; - /** Transcribed message ID */ - msg_id: number; - /** Transcription ID */ - transcription_id: bigint; - /** Transcribed text */ - text: string; - - protected get [id](): number { - return 0x0084CD5A; - } - - static get [name](): string { - return "updateTranscribedAudio" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pending", "true", "flags.0?true"], - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ["transcription_id", "bigint", "long"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pending ?? null, "true", "flags.0?true"], - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - [this.transcription_id, "bigint", "long"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { pending?: true; peer: enums.Peer; msg_id: number; transcription_id: bigint; text: string }) { - super(); - this.pending = params.pending; - this.peer = params.peer; - this.msg_id = params.msg_id; - this.transcription_id = params.transcription_id; - this.text = params.text; - } -} - -/** Some featured [custom emoji stickers](https://core.telegram.org/api/custom-emoji) were marked as read */ -export class UpdateReadFeaturedEmojiStickers_ extends _Update_ { - protected get [id](): number { - return 0xFB4C496C; - } - - static get [name](): string { - return "updateReadFeaturedEmojiStickers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The [emoji status](https://core.telegram.org/api/emoji-status) of a certain user has changed */ -export class UpdateUserEmojiStatus_ extends _Update_ { - /** User ID */ - user_id: bigint; - /** New [emoji status](https://core.telegram.org/api/emoji-status) */ - emoji_status: enums.EmojiStatus; - - protected get [id](): number { - return 0x28373599; - } - - static get [name](): string { - return "updateUserEmojiStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["emoji_status", _EmojiStatus_, "EmojiStatus"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.emoji_status, _EmojiStatus_, "EmojiStatus"], - ]; - } - - constructor(params: { user_id: bigint; emoji_status: enums.EmojiStatus }) { - super(); - this.user_id = params.user_id; - this.emoji_status = params.emoji_status; - } -} - -/** The list of recent [emoji statuses](https://core.telegram.org/api/emoji-status) has changed */ -export class UpdateRecentEmojiStatuses_ extends _Update_ { - protected get [id](): number { - return 0x30F443DB; - } - - static get [name](): string { - return "updateRecentEmojiStatuses" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The list of recent [message reactions](https://core.telegram.org/api/reactions) has changed */ -export class UpdateRecentReactions_ extends _Update_ { - protected get [id](): number { - return 0x6F7863F4; - } - - static get [name](): string { - return "updateRecentReactions" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A stickerset was just moved to top, [see here for more info »](https://core.telegram.org/api/stickers#recent-stickersets) */ -export class UpdateMoveStickerSetToTop_ extends _Update_ { - /** This update is referring to a [mask stickerset](https://core.telegram.org/api/stickers#mask-stickers) */ - masks?: true; - /** This update is referring to a [custom emoji stickerset](https://core.telegram.org/api/custom-emoji) */ - emojis?: true; - /** [Stickerset](https://core.telegram.org/api/stickers) ID */ - stickerset: bigint; - - protected get [id](): number { - return 0x86FCCF85; - } - - static get [name](): string { - return "updateMoveStickerSetToTop" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["masks", "true", "flags.0?true"], - ["emojis", "true", "flags.1?true"], - ["stickerset", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.masks ?? null, "true", "flags.0?true"], - [this.emojis ?? null, "true", "flags.1?true"], - [this.stickerset, "bigint", "long"], - ]; - } - - constructor(params: { masks?: true; emojis?: true; stickerset: bigint }) { - super(); - this.masks = params.masks; - this.emojis = params.emojis; - this.stickerset = params.stickerset; - } -} - -/** Extended media update */ -export class UpdateMessageExtendedMedia_ extends _Update_ { - /** Peer */ - peer: enums.Peer; - /** Message ID */ - msg_id: number; - /** Extended media */ - extended_media: enums.MessageExtendedMedia; - - protected get [id](): number { - return 0x5A73A98C; - } - - static get [name](): string { - return "updateMessageExtendedMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ["extended_media", _MessageExtendedMedia_, "MessageExtendedMedia"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - [this.extended_media, _MessageExtendedMedia_, "MessageExtendedMedia"], - ]; - } - - constructor(params: { peer: enums.Peer; msg_id: number; extended_media: enums.MessageExtendedMedia }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.extended_media = params.extended_media; - } -} - -/** A [forum topic »](https://core.telegram.org/api/forum#forum-topics) was pinned or unpinned. */ -export class UpdateChannelPinnedTopic_ extends _Update_ { - /** Whether the topic was pinned or unpinned */ - pinned?: true; - /** The forum ID */ - channel_id: bigint; - /** The topic ID */ - topic_id: number; - - protected get [id](): number { - return 0x192EFBE3; - } - - static get [name](): string { - return "updateChannelPinnedTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["channel_id", "bigint", "long"], - ["topic_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.channel_id, "bigint", "long"], - [this.topic_id, "number", "int"], - ]; - } - - constructor(params: { pinned?: true; channel_id: bigint; topic_id: number }) { - super(); - this.pinned = params.pinned; - this.channel_id = params.channel_id; - this.topic_id = params.topic_id; - } -} - -/** The [pinned topics](https://core.telegram.org/api/forum#forum-topics) of a forum have changed. */ -export class UpdateChannelPinnedTopics_ extends _Update_ { - /** Forum ID. */ - channel_id: bigint; - /** Ordered list containing the IDs of all pinned topics. */ - order?: Array; - - protected get [id](): number { - return 0xFE198602; - } - - static get [name](): string { - return "updateChannelPinnedTopics" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel_id", "bigint", "long"], - ["order", ["number"], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel_id, "bigint", "long"], - [this.order ?? null, ["number"], "flags.0?Vector"], - ]; - } - - constructor(params: { channel_id: bigint; order?: Array }) { - super(); - this.channel_id = params.channel_id; - this.order = params.order; - } -} - -/** User information was updated, it must be refetched using [users.getFullUser](https://core.telegram.org/method/users.getFullUser). */ -export class UpdateUser_ extends _Update_ { - /** User ID */ - user_id: bigint; - - protected get [id](): number { - return 0x20529438; - } - - static get [name](): string { - return "updateUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { user_id: bigint }) { - super(); - this.user_id = params.user_id; - } -} - -/** Media autosave settings have changed and must be refetched using [account.getAutoSaveSettings](https://core.telegram.org/method/account.getAutoSaveSettings). */ -export class UpdateAutoSaveSettings_ extends _Update_ { - protected get [id](): number { - return 0xEC05B097; - } - - static get [name](): string { - return "updateAutoSaveSettings" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A new story was posted. */ -export class UpdateStory_ extends _Update_ { - /** ID of the poster. */ - peer: enums.Peer; - /** The story that was posted. */ - story: enums.StoryItem; - - protected get [id](): number { - return 0x75B3B798; - } - - static get [name](): string { - return "updateStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["story", _StoryItem_, "StoryItem"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.story, _StoryItem_, "StoryItem"], - ]; - } - - constructor(params: { peer: enums.Peer; story: enums.StoryItem }) { - super(); - this.peer = params.peer; - this.story = params.story; - } -} - -/** Stories of a specific peer were marked as read. */ -export class UpdateReadStories_ extends _Update_ { - /** The peer */ - peer: enums.Peer; - /** ID of the last story that was marked as read */ - max_id: number; - - protected get [id](): number { - return 0xF74E932B; - } - - static get [name](): string { - return "updateReadStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; max_id: number }) { - super(); - this.peer = params.peer; - this.max_id = params.max_id; - } -} - -/** A story was successfully uploaded. */ -export class UpdateStoryID_ extends _Update_ { - /** The `id` that was attributed to the story. */ - id: number; - /** The `random_id` that was passed to [stories.sendStory](https://core.telegram.org/method/stories.sendStory). */ - random_id: bigint; - - protected get [id](): number { - return 0x1BF335B9; - } - - static get [name](): string { - return "updateStoryID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ["random_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - [this.random_id, "bigint", "long"], - ]; - } - - constructor(params: { id: number; random_id: bigint }) { - super(); - this.id = params.id; - this.random_id = params.random_id; - } -} - -/** Indicates that [stories stealth mode](https://core.telegram.org/api/stories#stealth-mode) was activated. */ -export class UpdateStoriesStealthMode_ extends _Update_ { - /** Information about the current [stealth mode](https://core.telegram.org/api/stories#stealth-mode) session. */ - stealth_mode: enums.StoriesStealthMode; - - protected get [id](): number { - return 0x2C084DC1; - } - - static get [name](): string { - return "updateStoriesStealthMode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stealth_mode", _StoriesStealthMode_, "StoriesStealthMode"], - ]; - } - - protected get [params](): Params { - return [ - [this.stealth_mode, _StoriesStealthMode_, "StoriesStealthMode"], - ]; - } - - constructor(params: { stealth_mode: enums.StoriesStealthMode }) { - super(); - this.stealth_mode = params.stealth_mode; - } -} - -/** Indicates we [reacted to a story »](https://core.telegram.org/api/stories#reactions). */ -export class UpdateSentStoryReaction_ extends _Update_ { - /** The peer that sent the story */ - peer: enums.Peer; - /** ID of the story we reacted to */ - story_id: number; - /** The reaction that was sent */ - reaction: enums.Reaction; - - protected get [id](): number { - return 0x7D627683; - } - - static get [name](): string { - return "updateSentStoryReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["story_id", "number", "int"], - ["reaction", _Reaction_, "Reaction"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.story_id, "number", "int"], - [this.reaction, _Reaction_, "Reaction"], - ]; - } - - constructor(params: { peer: enums.Peer; story_id: number; reaction: enums.Reaction }) { - super(); - this.peer = params.peer; - this.story_id = params.story_id; - this.reaction = params.reaction; - } -} - -/** A [channel boost](https://core.telegram.org/api/boost) has changed (bots only) */ -export class UpdateBotChatBoost_ extends _Update_ { - /** Channel */ - peer: enums.Peer; - /** New boost information */ - boost: enums.Boost; - /** [QTS](https://core.telegram.org/api/updates) event sequence identifier */ - qts: number; - - protected get [id](): number { - return 0x904DD49C; - } - - static get [name](): string { - return "updateBotChatBoost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["boost", _Boost_, "Boost"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.boost, _Boost_, "Boost"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; boost: enums.Boost; qts: number }) { - super(); - this.peer = params.peer; - this.boost = params.boost; - this.qts = params.qts; - } -} - -/** Users may also choose to display messages from all topics as if they were sent to a normal group, using a "View as messages" setting in the local client. -This setting only affects the current account, and is synced to other logged in sessions using the [channels.toggleViewForumAsMessages](https://core.telegram.org/method/channels.toggleViewForumAsMessages) method; invoking this method will update the value of the `view_forum_as_messages` flag of [channelFull](https://core.telegram.org/constructor/channelFull) or [dialog](https://core.telegram.org/constructor/dialog) and emit an [updateChannelViewForumAsMessages](https://core.telegram.org/constructor/updateChannelViewForumAsMessages). */ -export class UpdateChannelViewForumAsMessages_ extends _Update_ { - /** The forum ID */ - channel_id: bigint; - /** The new value of the toggle. */ - enabled: boolean; - - protected get [id](): number { - return 0x07B68920; - } - - static get [name](): string { - return "updateChannelViewForumAsMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel_id: bigint; enabled: boolean }) { - super(); - this.channel_id = params.channel_id; - this.enabled = params.enabled; - } -} - -/** The [wallpaper »](https://core.telegram.org/api/wallpapers) of a given peer has changed. */ -export class UpdatePeerWallpaper_ extends _Update_ { - /** Whether the other user has chosen a custom wallpaper for us using [messages.setChatWallPaper](https://core.telegram.org/method/messages.setChatWallPaper) and the `for_both` flag, see [here »](https://core.telegram.org/api/wallpapers#installing-wallpapers-in-a-specific-chat-or-channel) for more info. */ - wallpaper_overridden?: true; - /** The peer where the wallpaper has changed. */ - peer: enums.Peer; - /** The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used. */ - wallpaper?: enums.WallPaper; - - protected get [id](): number { - return 0xAE3F101D; - } - - static get [name](): string { - return "updatePeerWallpaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["wallpaper_overridden", "true", "flags.1?true"], - ["peer", _Peer_, "Peer"], - ["wallpaper", _WallPaper_, "flags.0?WallPaper"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.wallpaper_overridden ?? null, "true", "flags.1?true"], - [this.peer, _Peer_, "Peer"], - [this.wallpaper ?? null, _WallPaper_, "flags.0?WallPaper"], - ]; - } - - constructor(params: { wallpaper_overridden?: true; peer: enums.Peer; wallpaper?: enums.WallPaper }) { - super(); - this.wallpaper_overridden = params.wallpaper_overridden; - this.peer = params.peer; - this.wallpaper = params.wallpaper; - } -} - -/** Bots only: a user has changed their reactions on a message with public reactions. */ -export class UpdateBotMessageReaction_ extends _Update_ { - /** Peer of the reacted-to message. */ - peer: enums.Peer; - /** ID of the reacted-to message. */ - msg_id: number; - /** Date of the change. */ - date: number; - /** The user that (un)reacted to the message. */ - actor: enums.Peer; - /** Old reactions */ - old_reactions: Array; - /** New reactions */ - new_reactions: Array; - /** [QTS](https://core.telegram.org/api/updates) event sequence identifier */ - qts: number; - - protected get [id](): number { - return 0xAC21D3CE; - } - - static get [name](): string { - return "updateBotMessageReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ["date", "number", "int"], - ["actor", _Peer_, "Peer"], - ["old_reactions", [_Reaction_], "Vector"], - ["new_reactions", [_Reaction_], "Vector"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - [this.date, "number", "int"], - [this.actor, _Peer_, "Peer"], - [this.old_reactions, [_Reaction_], "Vector"], - [this.new_reactions, [_Reaction_], "Vector"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; msg_id: number; date: number; actor: enums.Peer; old_reactions: Array; new_reactions: Array; qts: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.date = params.date; - this.actor = params.actor; - this.old_reactions = params.old_reactions; - this.new_reactions = params.new_reactions; - this.qts = params.qts; - } -} - -/** Bots only: the number of reactions on a message with anonymous reactions has changed. */ -export class UpdateBotMessageReactions_ extends _Update_ { - /** Peer of the reacted-to message. */ - peer: enums.Peer; - /** ID of the reacted-to message. */ - msg_id: number; - /** Date of the change. */ - date: number; - /** New reaction counters. */ - reactions: Array; - /** [QTS](https://core.telegram.org/api/updates) event sequence identifier */ - qts: number; - - protected get [id](): number { - return 0x09CB7759; - } - - static get [name](): string { - return "updateBotMessageReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["msg_id", "number", "int"], - ["date", "number", "int"], - ["reactions", [_ReactionCount_], "Vector"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.msg_id, "number", "int"], - [this.date, "number", "int"], - [this.reactions, [_ReactionCount_], "Vector"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; msg_id: number; date: number; reactions: Array; qts: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.date = params.date; - this.reactions = params.reactions; - this.qts = params.qts; - } -} - -/** A [saved message dialog](https://core.telegram.org/api/saved-messages) was pinned/unpinned */ -export class UpdateSavedDialogPinned_ extends _Update_ { - /** Whether the dialog was pinned */ - pinned?: true; - /** The dialog */ - peer: enums.DialogPeer; - - protected get [id](): number { - return 0xAEAF9E74; - } - - static get [name](): string { - return "updateSavedDialogPinned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["peer", _DialogPeer_, "DialogPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.peer, _DialogPeer_, "DialogPeer"], - ]; - } - - constructor(params: { pinned?: true; peer: enums.DialogPeer }) { - super(); - this.pinned = params.pinned; - this.peer = params.peer; - } -} - -/** [Pinned saved dialogs »](https://core.telegram.org/api/saved-messages) were updated */ -export class UpdatePinnedSavedDialogs_ extends _Update_ { - /** New order of pinned saved dialogs */ - order?: Array; - - protected get [id](): number { - return 0x686C85A6; - } - - static get [name](): string { - return "updatePinnedSavedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["order", [_DialogPeer_], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.order ?? null, [_DialogPeer_], "flags.0?Vector"], - ]; - } - - constructor(params?: { order?: Array }) { - super(); - this.order = params?.order; - } -} - -export class UpdateSavedReactionTags_ extends _Update_ { - protected get [id](): number { - return 0x39C67432; - } - - static get [name](): string { - return "updateSavedReactionTags" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class UpdateSmsJob_ extends _Update_ { - job_id: string; - - protected get [id](): number { - return 0xF16269D4; - } - - static get [name](): string { - return "updateSmsJob" - } - - static get [paramDesc](): ParamDesc { - return [ - ["job_id", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.job_id, "string", "string"], - ]; - } - - constructor(params: { job_id: string }) { - super(); - this.job_id = params.job_id; - } -} - -export class UpdateQuickReplies_ extends _Update_ { - quick_replies: Array; - - protected get [id](): number { - return 0xF9470AB2; - } - - static get [name](): string { - return "updateQuickReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["quick_replies", [_QuickReply_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.quick_replies, [_QuickReply_], "Vector"], - ]; - } - - constructor(params: { quick_replies: Array }) { - super(); - this.quick_replies = params.quick_replies; - } -} - -export class UpdateNewQuickReply_ extends _Update_ { - quick_reply: enums.QuickReply; - - protected get [id](): number { - return 0xF53DA717; - } - - static get [name](): string { - return "updateNewQuickReply" - } - - static get [paramDesc](): ParamDesc { - return [ - ["quick_reply", _QuickReply_, "QuickReply"], - ]; - } - - protected get [params](): Params { - return [ - [this.quick_reply, _QuickReply_, "QuickReply"], - ]; - } - - constructor(params: { quick_reply: enums.QuickReply }) { - super(); - this.quick_reply = params.quick_reply; - } -} - -export class UpdateDeleteQuickReply_ extends _Update_ { - shortcut_id: number; - - protected get [id](): number { - return 0x53E6F1EC; - } - - static get [name](): string { - return "updateDeleteQuickReply" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - ]; - } - - constructor(params: { shortcut_id: number }) { - super(); - this.shortcut_id = params.shortcut_id; - } -} - -export class UpdateQuickReplyMessage_ extends _Update_ { - message: enums.Message; - - protected get [id](): number { - return 0x3E050D0F; - } - - static get [name](): string { - return "updateQuickReplyMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -export class UpdateDeleteQuickReplyMessages_ extends _Update_ { - shortcut_id: number; - messages: Array; - - protected get [id](): number { - return 0x566FE7CD; - } - - static get [name](): string { - return "updateDeleteQuickReplyMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ["messages", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - [this.messages, ["number"], "Vector"], - ]; - } - - constructor(params: { shortcut_id: number; messages: Array }) { - super(); - this.shortcut_id = params.shortcut_id; - this.messages = params.messages; - } -} - -export class UpdateBotBusinessConnect_ extends _Update_ { - connection: enums.BotBusinessConnection; - qts: number; - - protected get [id](): number { - return 0x8AE5C97A; - } - - static get [name](): string { - return "updateBotBusinessConnect" - } - - static get [paramDesc](): ParamDesc { - return [ - ["connection", _BotBusinessConnection_, "BotBusinessConnection"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.connection, _BotBusinessConnection_, "BotBusinessConnection"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { connection: enums.BotBusinessConnection; qts: number }) { - super(); - this.connection = params.connection; - this.qts = params.qts; - } -} - -export class UpdateBotNewBusinessMessage_ extends _Update_ { - connection_id: string; - message: enums.Message; - reply_to_message?: enums.Message; - qts: number; - - protected get [id](): number { - return 0x9DDB347C; - } - - static get [name](): string { - return "updateBotNewBusinessMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["connection_id", "string", "string"], - ["message", _Message_, "Message"], - ["reply_to_message", _Message_, "flags.0?Message"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.connection_id, "string", "string"], - [this.message, _Message_, "Message"], - [this.reply_to_message ?? null, _Message_, "flags.0?Message"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { connection_id: string; message: enums.Message; reply_to_message?: enums.Message; qts: number }) { - super(); - this.connection_id = params.connection_id; - this.message = params.message; - this.reply_to_message = params.reply_to_message; - this.qts = params.qts; - } -} - -export class UpdateBotEditBusinessMessage_ extends _Update_ { - connection_id: string; - message: enums.Message; - reply_to_message?: enums.Message; - qts: number; - - protected get [id](): number { - return 0x07DF587C; - } - - static get [name](): string { - return "updateBotEditBusinessMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["connection_id", "string", "string"], - ["message", _Message_, "Message"], - ["reply_to_message", _Message_, "flags.0?Message"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.connection_id, "string", "string"], - [this.message, _Message_, "Message"], - [this.reply_to_message ?? null, _Message_, "flags.0?Message"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { connection_id: string; message: enums.Message; reply_to_message?: enums.Message; qts: number }) { - super(); - this.connection_id = params.connection_id; - this.message = params.message; - this.reply_to_message = params.reply_to_message; - this.qts = params.qts; - } -} - -export class UpdateBotDeleteBusinessMessage_ extends _Update_ { - connection_id: string; - peer: enums.Peer; - messages: Array; - qts: number; - - protected get [id](): number { - return 0xA02A982E; - } - - static get [name](): string { - return "updateBotDeleteBusinessMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["connection_id", "string", "string"], - ["peer", _Peer_, "Peer"], - ["messages", ["number"], "Vector"], - ["qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.connection_id, "string", "string"], - [this.peer, _Peer_, "Peer"], - [this.messages, ["number"], "Vector"], - [this.qts, "number", "int"], - ]; - } - - constructor(params: { connection_id: string; peer: enums.Peer; messages: Array; qts: number }) { - super(); - this.connection_id = params.connection_id; - this.peer = params.peer; - this.messages = params.messages; - this.qts = params.qts; - } -} - -/** Updates state. */ -export class updates_State_ extends _updates_State_ { - /** Number of events occurred in a text box */ - pts: number; - /** Position in a sequence of updates in secret chats. For further details refer to article [secret chats](https://core.telegram.org/api/end-to-end) */ - qts: number; - /** Date of condition */ - date: number; - /** Number of sent updates */ - seq: number; - /** Number of unread messages */ - unread_count: number; - - protected get [id](): number { - return 0xA56C2A3E; - } - - static get [name](): string { - return "updates.state" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pts", "number", "int"], - ["qts", "number", "int"], - ["date", "number", "int"], - ["seq", "number", "int"], - ["unread_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pts, "number", "int"], - [this.qts, "number", "int"], - [this.date, "number", "int"], - [this.seq, "number", "int"], - [this.unread_count, "number", "int"], - ]; - } - - constructor(params: { pts: number; qts: number; date: number; seq: number; unread_count: number }) { - super(); - this.pts = params.pts; - this.qts = params.qts; - this.date = params.date; - this.seq = params.seq; - this.unread_count = params.unread_count; - } -} - -/** No events. */ -export class updates_DifferenceEmpty_ extends _updates_Difference_ { - /** Current date */ - date: number; - /** Number of sent updates */ - seq: number; - - protected get [id](): number { - return 0x5D75A138; - } - - static get [name](): string { - return "updates.differenceEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["date", "number", "int"], - ["seq", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.date, "number", "int"], - [this.seq, "number", "int"], - ]; - } - - constructor(params: { date: number; seq: number }) { - super(); - this.date = params.date; - this.seq = params.seq; - } -} - -/** Full list of occurred events. */ -export class updates_Difference_ extends _updates_Difference_ { - /** List of new messages */ - new_messages: Array; - /** List of new encrypted secret chat messages */ - new_encrypted_messages: Array; - /** List of updates */ - other_updates: Array; - /** List of chats mentioned in events */ - chats: Array; - /** List of users mentioned in events */ - users: Array; - /** Current state */ - state: enums.updates.State; - - protected get [id](): number { - return 0x00F49CA0; - } - - static get [name](): string { - return "updates.difference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_messages", [_Message_], "Vector"], - ["new_encrypted_messages", [_EncryptedMessage_], "Vector"], - ["other_updates", [_Update_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["state", _updates_State_, "updates.State"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_messages, [_Message_], "Vector"], - [this.new_encrypted_messages, [_EncryptedMessage_], "Vector"], - [this.other_updates, [_Update_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.state, _updates_State_, "updates.State"], - ]; - } - - constructor(params: { new_messages: Array; new_encrypted_messages: Array; other_updates: Array; chats: Array; users: Array; state: enums.updates.State }) { - super(); - this.new_messages = params.new_messages; - this.new_encrypted_messages = params.new_encrypted_messages; - this.other_updates = params.other_updates; - this.chats = params.chats; - this.users = params.users; - this.state = params.state; - } -} - -/** Incomplete list of occurred events. */ -export class updates_DifferenceSlice_ extends _updates_Difference_ { - /** List of new messages */ - new_messages: Array; - /** New messages from the [encrypted event sequence](https://core.telegram.org/api/updates) */ - new_encrypted_messages: Array; - /** List of updates */ - other_updates: Array; - /** List of chats mentioned in events */ - chats: Array; - /** List of users mentioned in events */ - users: Array; - /** Intermediary state */ - intermediate_state: enums.updates.State; - - protected get [id](): number { - return 0xA8FB1981; - } - - static get [name](): string { - return "updates.differenceSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_messages", [_Message_], "Vector"], - ["new_encrypted_messages", [_EncryptedMessage_], "Vector"], - ["other_updates", [_Update_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["intermediate_state", _updates_State_, "updates.State"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_messages, [_Message_], "Vector"], - [this.new_encrypted_messages, [_EncryptedMessage_], "Vector"], - [this.other_updates, [_Update_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.intermediate_state, _updates_State_, "updates.State"], - ]; - } - - constructor(params: { new_messages: Array; new_encrypted_messages: Array; other_updates: Array; chats: Array; users: Array; intermediate_state: enums.updates.State }) { - super(); - this.new_messages = params.new_messages; - this.new_encrypted_messages = params.new_encrypted_messages; - this.other_updates = params.other_updates; - this.chats = params.chats; - this.users = params.users; - this.intermediate_state = params.intermediate_state; - } -} - -/** The difference is [too long](https://core.telegram.org/api/updates#recovering-gaps), and the specified state must be used to refetch updates. */ -export class updates_DifferenceTooLong_ extends _updates_Difference_ { - /** The new state to use. */ - pts: number; - - protected get [id](): number { - return 0x4AFE8F6D; - } - - static get [name](): string { - return "updates.differenceTooLong" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pts, "number", "int"], - ]; - } - - constructor(params: { pts: number }) { - super(); - this.pts = params.pts; - } -} - -/** Too many updates, it is necessary to execute [updates.getDifference](https://core.telegram.org/method/updates.getDifference). */ -export class UpdatesTooLong_ extends _Updates_ { - protected get [id](): number { - return 0xE317AF7E; - } - - static get [name](): string { - return "updatesTooLong" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Info about a message sent to (received from) another user */ -export class UpdateShortMessage_ extends _Updates_ { - /** Whether the message is outgoing */ - out?: true; - /** Whether we were mentioned in the message */ - mentioned?: true; - /** Whether there are some **unread** mentions in this message */ - media_unread?: true; - /** If true, the message is a silent message, no notifications should be triggered */ - silent?: true; - /** The message ID */ - id: number; - /** The ID of the sender (if `outgoing` will be the ID of the destination) of the message */ - user_id: bigint; - /** The message */ - message: string; - /** [PTS](https://core.telegram.org/api/updates) */ - pts: number; - /** [PTS count](https://core.telegram.org/api/updates) */ - pts_count: number; - /** [date](https://core.telegram.org/api/updates) */ - date: number; - /** Info about a forwarded message */ - fwd_from?: enums.MessageFwdHeader; - /** Info about the inline bot used to generate this message */ - via_bot_id?: bigint; - /** Reply and [thread](https://core.telegram.org/api/threads) information */ - reply_to?: enums.MessageReplyHeader; - /** [Entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - /** Time To Live of the message, once message.date+message.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. */ - ttl_period?: number; - - protected get [id](): number { - return 0x313BC7F8; - } - - static get [name](): string { - return "updateShortMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["out", "true", "flags.1?true"], - ["mentioned", "true", "flags.4?true"], - ["media_unread", "true", "flags.5?true"], - ["silent", "true", "flags.13?true"], - ["id", "number", "int"], - ["user_id", "bigint", "long"], - ["message", "string", "string"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ["date", "number", "int"], - ["fwd_from", _MessageFwdHeader_, "flags.2?MessageFwdHeader"], - ["via_bot_id", "bigint", "flags.11?long"], - ["reply_to", _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - ["entities", [_MessageEntity_], "flags.7?Vector"], - ["ttl_period", "number", "flags.25?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.out ?? null, "true", "flags.1?true"], - [this.mentioned ?? null, "true", "flags.4?true"], - [this.media_unread ?? null, "true", "flags.5?true"], - [this.silent ?? null, "true", "flags.13?true"], - [this.id, "number", "int"], - [this.user_id, "bigint", "long"], - [this.message, "string", "string"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - [this.date, "number", "int"], - [this.fwd_from ?? null, _MessageFwdHeader_, "flags.2?MessageFwdHeader"], - [this.via_bot_id ?? null, "bigint", "flags.11?long"], - [this.reply_to ?? null, _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - [this.entities ?? null, [_MessageEntity_], "flags.7?Vector"], - [this.ttl_period ?? null, "number", "flags.25?int"], - ]; - } - - constructor(params: { out?: true; mentioned?: true; media_unread?: true; silent?: true; id: number; user_id: bigint; message: string; pts: number; pts_count: number; date: number; fwd_from?: enums.MessageFwdHeader; via_bot_id?: bigint; reply_to?: enums.MessageReplyHeader; entities?: Array; ttl_period?: number }) { - super(); - this.out = params.out; - this.mentioned = params.mentioned; - this.media_unread = params.media_unread; - this.silent = params.silent; - this.id = params.id; - this.user_id = params.user_id; - this.message = params.message; - this.pts = params.pts; - this.pts_count = params.pts_count; - this.date = params.date; - this.fwd_from = params.fwd_from; - this.via_bot_id = params.via_bot_id; - this.reply_to = params.reply_to; - this.entities = params.entities; - this.ttl_period = params.ttl_period; - } -} - -/** Shortened constructor containing info on one new incoming text message from a chat */ -export class UpdateShortChatMessage_ extends _Updates_ { - /** Whether the message is outgoing */ - out?: true; - /** Whether we were mentioned in this message */ - mentioned?: true; - /** Whether the message contains some **unread** mentions */ - media_unread?: true; - /** If true, the message is a silent message, no notifications should be triggered */ - silent?: true; - /** ID of the message */ - id: number; - /** ID of the sender of the message */ - from_id: bigint; - /** ID of the chat where the message was sent */ - chat_id: bigint; - /** Message */ - message: string; - /** [PTS](https://core.telegram.org/api/updates) */ - pts: number; - /** [PTS count](https://core.telegram.org/api/updates) */ - pts_count: number; - /** [date](https://core.telegram.org/api/updates) */ - date: number; - /** Info about a forwarded message */ - fwd_from?: enums.MessageFwdHeader; - /** Info about the inline bot used to generate this message */ - via_bot_id?: bigint; - /** Reply (thread) information */ - reply_to?: enums.MessageReplyHeader; - /** [Entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - /** Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. */ - ttl_period?: number; - - protected get [id](): number { - return 0x4D6DEEA5; - } - - static get [name](): string { - return "updateShortChatMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["out", "true", "flags.1?true"], - ["mentioned", "true", "flags.4?true"], - ["media_unread", "true", "flags.5?true"], - ["silent", "true", "flags.13?true"], - ["id", "number", "int"], - ["from_id", "bigint", "long"], - ["chat_id", "bigint", "long"], - ["message", "string", "string"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ["date", "number", "int"], - ["fwd_from", _MessageFwdHeader_, "flags.2?MessageFwdHeader"], - ["via_bot_id", "bigint", "flags.11?long"], - ["reply_to", _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - ["entities", [_MessageEntity_], "flags.7?Vector"], - ["ttl_period", "number", "flags.25?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.out ?? null, "true", "flags.1?true"], - [this.mentioned ?? null, "true", "flags.4?true"], - [this.media_unread ?? null, "true", "flags.5?true"], - [this.silent ?? null, "true", "flags.13?true"], - [this.id, "number", "int"], - [this.from_id, "bigint", "long"], - [this.chat_id, "bigint", "long"], - [this.message, "string", "string"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - [this.date, "number", "int"], - [this.fwd_from ?? null, _MessageFwdHeader_, "flags.2?MessageFwdHeader"], - [this.via_bot_id ?? null, "bigint", "flags.11?long"], - [this.reply_to ?? null, _MessageReplyHeader_, "flags.3?MessageReplyHeader"], - [this.entities ?? null, [_MessageEntity_], "flags.7?Vector"], - [this.ttl_period ?? null, "number", "flags.25?int"], - ]; - } - - constructor(params: { out?: true; mentioned?: true; media_unread?: true; silent?: true; id: number; from_id: bigint; chat_id: bigint; message: string; pts: number; pts_count: number; date: number; fwd_from?: enums.MessageFwdHeader; via_bot_id?: bigint; reply_to?: enums.MessageReplyHeader; entities?: Array; ttl_period?: number }) { - super(); - this.out = params.out; - this.mentioned = params.mentioned; - this.media_unread = params.media_unread; - this.silent = params.silent; - this.id = params.id; - this.from_id = params.from_id; - this.chat_id = params.chat_id; - this.message = params.message; - this.pts = params.pts; - this.pts_count = params.pts_count; - this.date = params.date; - this.fwd_from = params.fwd_from; - this.via_bot_id = params.via_bot_id; - this.reply_to = params.reply_to; - this.entities = params.entities; - this.ttl_period = params.ttl_period; - } -} - -/** Shortened constructor containing info on one update not requiring auxiliary data */ -export class UpdateShort_ extends _Updates_ { - /** Update */ - update: enums.Update; - /** Date of event */ - date: number; - - protected get [id](): number { - return 0x78D4DEC1; - } - - static get [name](): string { - return "updateShort" - } - - static get [paramDesc](): ParamDesc { - return [ - ["update", _Update_, "Update"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.update, _Update_, "Update"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { update: enums.Update; date: number }) { - super(); - this.update = params.update; - this.date = params.date; - } -} - -/** Constructor for a group of updates. */ -export class UpdatesCombined_ extends _Updates_ { - /** List of updates */ - updates: Array; - /** List of users mentioned in updates */ - users: Array; - /** List of chats mentioned in updates */ - chats: Array; - /** Current date */ - date: number; - /** Value **seq** for the earliest update in a group */ - seq_start: number; - /** Value **seq** for the latest update in a group */ - seq: number; - - protected get [id](): number { - return 0x725B04C3; - } - - static get [name](): string { - return "updatesCombined" - } - - static get [paramDesc](): ParamDesc { - return [ - ["updates", [_Update_], "Vector"], - ["users", [_User_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["date", "number", "int"], - ["seq_start", "number", "int"], - ["seq", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.updates, [_Update_], "Vector"], - [this.users, [_User_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.date, "number", "int"], - [this.seq_start, "number", "int"], - [this.seq, "number", "int"], - ]; - } - - constructor(params: { updates: Array; users: Array; chats: Array; date: number; seq_start: number; seq: number }) { - super(); - this.updates = params.updates; - this.users = params.users; - this.chats = params.chats; - this.date = params.date; - this.seq_start = params.seq_start; - this.seq = params.seq; - } -} - -/** Full constructor of updates */ -export class Updates_ extends _Updates_ { - /** List of updates */ - updates: Array; - /** List of users mentioned in updates */ - users: Array; - /** List of chats mentioned in updates */ - chats: Array; - /** Current date */ - date: number; - /** Total number of sent updates */ - seq: number; - - protected get [id](): number { - return 0x74AE4240; - } - - static get [name](): string { - return "updates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["updates", [_Update_], "Vector"], - ["users", [_User_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["date", "number", "int"], - ["seq", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.updates, [_Update_], "Vector"], - [this.users, [_User_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.date, "number", "int"], - [this.seq, "number", "int"], - ]; - } - - constructor(params: { updates: Array; users: Array; chats: Array; date: number; seq: number }) { - super(); - this.updates = params.updates; - this.users = params.users; - this.chats = params.chats; - this.date = params.date; - this.seq = params.seq; - } -} - -/** Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object). */ -export class UpdateShortSentMessage_ extends _Updates_ { - /** Whether the message is outgoing */ - out?: true; - /** ID of the sent message */ - id: number; - /** [PTS](https://core.telegram.org/api/updates) */ - pts: number; - /** [PTS count](https://core.telegram.org/api/updates) */ - pts_count: number; - /** [date](https://core.telegram.org/api/updates) */ - date: number; - /** Attached media */ - media?: enums.MessageMedia; - /** [Entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - /** Time To Live of the message, once message.date+message.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. */ - ttl_period?: number; - - protected get [id](): number { - return 0x9015E101; - } - - static get [name](): string { - return "updateShortSentMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["out", "true", "flags.1?true"], - ["id", "number", "int"], - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ["date", "number", "int"], - ["media", _MessageMedia_, "flags.9?MessageMedia"], - ["entities", [_MessageEntity_], "flags.7?Vector"], - ["ttl_period", "number", "flags.25?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.out ?? null, "true", "flags.1?true"], - [this.id, "number", "int"], - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - [this.date, "number", "int"], - [this.media ?? null, _MessageMedia_, "flags.9?MessageMedia"], - [this.entities ?? null, [_MessageEntity_], "flags.7?Vector"], - [this.ttl_period ?? null, "number", "flags.25?int"], - ]; - } - - constructor(params: { out?: true; id: number; pts: number; pts_count: number; date: number; media?: enums.MessageMedia; entities?: Array; ttl_period?: number }) { - super(); - this.out = params.out; - this.id = params.id; - this.pts = params.pts; - this.pts_count = params.pts_count; - this.date = params.date; - this.media = params.media; - this.entities = params.entities; - this.ttl_period = params.ttl_period; - } -} - -/** Full list of photos with auxiliary data. */ -export class photos_Photos_ extends _photos_Photos_ { - /** List of photos */ - photos: Array; - /** List of mentioned users */ - users: Array; - - protected get [id](): number { - return 0x8DCA6AA5; - } - - static get [name](): string { - return "photos.photos" - } - - static get [paramDesc](): ParamDesc { - return [ - ["photos", [_Photo_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.photos, [_Photo_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { photos: Array; users: Array }) { - super(); - this.photos = params.photos; - this.users = params.users; - } -} - -/** Incomplete list of photos with auxiliary data. */ -export class photos_PhotosSlice_ extends _photos_Photos_ { - /** Total number of photos */ - count: number; - /** List of photos */ - photos: Array; - /** List of mentioned users */ - users: Array; - - protected get [id](): number { - return 0x15051F54; - } - - static get [name](): string { - return "photos.photosSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["photos", [_Photo_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.photos, [_Photo_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; photos: Array; users: Array }) { - super(); - this.count = params.count; - this.photos = params.photos; - this.users = params.users; - } -} - -/** Photo with auxiliary data. */ -export class photos_Photo_ extends _photos_Photo_ { - /** Photo */ - photo: enums.Photo; - /** Users */ - users: Array; - - protected get [id](): number { - return 0x20212CA8; - } - - static get [name](): string { - return "photos.photo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["photo", _Photo_, "Photo"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.photo, _Photo_, "Photo"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { photo: enums.Photo; users: Array }) { - super(); - this.photo = params.photo; - this.users = params.users; - } -} - -/** File content. */ -export class upload_File_ extends _upload_File_ { - /** File type */ - type: enums.storage.FileType; - /** Modification time */ - mtime: number; - /** Binary data, file content */ - bytes: Uint8Array; - - protected get [id](): number { - return 0x096A18D5; - } - - static get [name](): string { - return "upload.file" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _storage_FileType_, "storage.FileType"], - ["mtime", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _storage_FileType_, "storage.FileType"], - [this.mtime, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { type: enums.storage.FileType; mtime: number; bytes: Uint8Array }) { - super(); - this.type = params.type; - this.mtime = params.mtime; - this.bytes = params.bytes; - } -} - -/** The file must be downloaded from a [CDN DC](https://core.telegram.org/cdn). */ -export class upload_FileCdnRedirect_ extends _upload_File_ { - /** [CDN DC](https://core.telegram.org/cdn) ID */ - dc_id: number; - /** File token (see [CDN files](https://core.telegram.org/cdn)) */ - file_token: Uint8Array; - /** Encryption key (see [CDN files](https://core.telegram.org/cdn)) */ - encryption_key: Uint8Array; - /** Encryption IV (see [CDN files](https://core.telegram.org/cdn)) */ - encryption_iv: Uint8Array; - /** File hashes (see [CDN files](https://core.telegram.org/cdn)) */ - file_hashes: Array; - - protected get [id](): number { - return 0xF18CDA44; - } - - static get [name](): string { - return "upload.fileCdnRedirect" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_id", "number", "int"], - ["file_token", Uint8Array, "bytes"], - ["encryption_key", Uint8Array, "bytes"], - ["encryption_iv", Uint8Array, "bytes"], - ["file_hashes", [_FileHash_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_id, "number", "int"], - [this.file_token, Uint8Array, "bytes"], - [this.encryption_key, Uint8Array, "bytes"], - [this.encryption_iv, Uint8Array, "bytes"], - [this.file_hashes, [_FileHash_], "Vector"], - ]; - } - - constructor(params: { dc_id: number; file_token: Uint8Array; encryption_key: Uint8Array; encryption_iv: Uint8Array; file_hashes: Array }) { - super(); - this.dc_id = params.dc_id; - this.file_token = params.file_token; - this.encryption_key = params.encryption_key; - this.encryption_iv = params.encryption_iv; - this.file_hashes = params.file_hashes; - } -} - -/** Data center */ -export class DcOption_ extends _DcOption_ { - /** Whether the specified IP is an IPv6 address */ - ipv6?: true; - /** Whether this DC should only be used to [download or upload files](https://core.telegram.org/api/files) */ - media_only?: true; - /** Whether this DC only supports connection with [transport obfuscation](https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation) */ - tcpo_only?: true; - /** Whether this is a [CDN DC](https://core.telegram.org/cdn). */ - cdn?: true; - /** If set, this IP should be used when connecting through a proxy */ - static?: true; - /** If set, clients must connect using only the specified port, without trying any other port. */ - this_port_only?: true; - /** DC ID */ - id: number; - /** IP address of DC */ - ip_address: string; - /** Port */ - port: number; - /** If the `tcpo_only` flag is set, specifies the secret to use when connecting using [transport obfuscation](https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation) */ - secret?: Uint8Array; - - protected get [id](): number { - return 0x18B7A10D; - } - - static get [name](): string { - return "dcOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["ipv6", "true", "flags.0?true"], - ["media_only", "true", "flags.1?true"], - ["tcpo_only", "true", "flags.2?true"], - ["cdn", "true", "flags.3?true"], - ["static", "true", "flags.4?true"], - ["this_port_only", "true", "flags.5?true"], - ["id", "number", "int"], - ["ip_address", "string", "string"], - ["port", "number", "int"], - ["secret", Uint8Array, "flags.10?bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.ipv6 ?? null, "true", "flags.0?true"], - [this.media_only ?? null, "true", "flags.1?true"], - [this.tcpo_only ?? null, "true", "flags.2?true"], - [this.cdn ?? null, "true", "flags.3?true"], - [this.static ?? null, "true", "flags.4?true"], - [this.this_port_only ?? null, "true", "flags.5?true"], - [this.id, "number", "int"], - [this.ip_address, "string", "string"], - [this.port, "number", "int"], - [this.secret ?? null, Uint8Array, "flags.10?bytes"], - ]; - } - - constructor(params: { ipv6?: true; media_only?: true; tcpo_only?: true; cdn?: true; static?: true; this_port_only?: true; id: number; ip_address: string; port: number; secret?: Uint8Array }) { - super(); - this.ipv6 = params.ipv6; - this.media_only = params.media_only; - this.tcpo_only = params.tcpo_only; - this.cdn = params.cdn; - this.static = params.static; - this.this_port_only = params.this_port_only; - this.id = params.id; - this.ip_address = params.ip_address; - this.port = params.port; - this.secret = params.secret; - } -} - -/** Current configuration */ -export class Config_ extends _Config_ { - /** Whether the client should use P2P by default for phone calls with contacts */ - default_p2p_contacts?: true; - /** Whether the client should preload featured stickers */ - preload_featured_stickers?: true; - /** Whether incoming private messages can be deleted for both participants */ - revoke_pm_inbox?: true; - /** Indicates that telegram is _probably_ censored by governments/ISPs in the current region */ - blocked_mode?: true; - /** Whether to forcefully connect using IPv6 [dcOptions](https://core.telegram.org/type/DcOption), even if the client knows that IPv4 is available. */ - force_try_ipv6?: true; - /** Current date at the server */ - date: number; - /** Expiration date of this config: when it expires it'll have to be refetched using [help.getConfig](https://core.telegram.org/method/help.getConfig) */ - expires: number; - /** Whether we're connected to the test DCs */ - test_mode: boolean; - /** ID of the DC that returned the reply */ - this_dc: number; - /** DC IP list */ - dc_options: Array; - /** Domain name for fetching encrypted DC list from DNS TXT record */ - dc_txt_domain_name: string; - /** Maximum member count for normal [groups](https://core.telegram.org/api/channel) */ - chat_size_max: number; - /** Maximum member count for [supergroups](https://core.telegram.org/api/channel) */ - megagroup_size_max: number; - /** Maximum number of messages that can be forwarded at once using [messages.forwardMessages](https://core.telegram.org/method/messages.forwardMessages). */ - forwarded_count_max: number; - /** The client should [update its online status](https://core.telegram.org/method/account.updateStatus) every N milliseconds */ - online_update_period_ms: number; - /** Delay before offline status needs to be sent to the server */ - offline_blur_timeout_ms: number; - /** Time without any user activity after which it should be treated offline */ - offline_idle_timeout_ms: number; - /** If we are offline, but were online from some other client in last `online_cloud_timeout_ms` milliseconds after we had gone offline, then delay offline notification for `notify_cloud_delay_ms` milliseconds. */ - online_cloud_timeout_ms: number; - /** If we are offline, but online from some other client then delay sending the offline notification for `notify_cloud_delay_ms` milliseconds. */ - notify_cloud_delay_ms: number; - /** If some other client is online, then delay notification for `notification_default_delay_ms` milliseconds */ - notify_default_delay_ms: number; - /** Not for client use */ - push_chat_period_ms: number; - /** Not for client use */ - push_chat_limit: number; - /** Only messages with age smaller than the one specified can be edited */ - edit_time_limit: number; - /** Only channel/supergroup messages with age smaller than the specified can be deleted */ - revoke_time_limit: number; - /** Only private messages with age smaller than the specified can be deleted */ - revoke_pm_time_limit: number; - /** Exponential decay rate for computing [top peer rating](https://core.telegram.org/api/top-rating) */ - rating_e_decay: number; - /** Maximum number of recent stickers */ - stickers_recent_limit: number; - /** Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read */ - channels_read_media_period: number; - /** Temporary [passport](https://core.telegram.org/passport) sessions */ - tmp_sessions?: number; - /** Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call */ - call_receive_timeout_ms: number; - /** Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused */ - call_ring_timeout_ms: number; - /** VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted */ - call_connect_timeout_ms: number; - /** If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted */ - call_packet_timeout_ms: number; - /** The domain to use to parse [deep links »](https://core.telegram.org/api/links). */ - me_url_prefix: string; - /** URL to use to auto-update the current app */ - autoupdate_url_prefix?: string; - /** Username of the bot to use to search for GIFs */ - gif_search_username?: string; - /** Username of the bot to use to search for venues */ - venue_search_username?: string; - /** Username of the bot to use for image search */ - img_search_username?: string; - /** ID of the map provider to use for venues */ - static_maps_provider?: string; - /** Maximum length of caption (length in utf8 codepoints) */ - caption_length_max: number; - /** Maximum length of messages (length in utf8 codepoints) */ - message_length_max: number; - /** DC ID to use to download [webfiles](https://core.telegram.org/api/files#downloading-webfiles) */ - webfile_dc_id: number; - /** Suggested language code */ - suggested_lang_code?: string; - /** Language pack version */ - lang_pack_version?: number; - /** Basic language pack version */ - base_lang_pack_version?: number; - /** Default [message reaction](https://core.telegram.org/api/reactions) */ - reactions_default?: enums.Reaction; - /** Autologin token, [click here for more info on URL authorization »](https://core.telegram.org/api/url-authorization#link-url-authorization). */ - autologin_token?: string; - - protected get [id](): number { - return 0xCC1A241E; - } - - static get [name](): string { - return "config" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["default_p2p_contacts", "true", "flags.3?true"], - ["preload_featured_stickers", "true", "flags.4?true"], - ["revoke_pm_inbox", "true", "flags.6?true"], - ["blocked_mode", "true", "flags.8?true"], - ["force_try_ipv6", "true", "flags.14?true"], - ["date", "number", "int"], - ["expires", "number", "int"], - ["test_mode", "boolean", "Bool"], - ["this_dc", "number", "int"], - ["dc_options", [_DcOption_], "Vector"], - ["dc_txt_domain_name", "string", "string"], - ["chat_size_max", "number", "int"], - ["megagroup_size_max", "number", "int"], - ["forwarded_count_max", "number", "int"], - ["online_update_period_ms", "number", "int"], - ["offline_blur_timeout_ms", "number", "int"], - ["offline_idle_timeout_ms", "number", "int"], - ["online_cloud_timeout_ms", "number", "int"], - ["notify_cloud_delay_ms", "number", "int"], - ["notify_default_delay_ms", "number", "int"], - ["push_chat_period_ms", "number", "int"], - ["push_chat_limit", "number", "int"], - ["edit_time_limit", "number", "int"], - ["revoke_time_limit", "number", "int"], - ["revoke_pm_time_limit", "number", "int"], - ["rating_e_decay", "number", "int"], - ["stickers_recent_limit", "number", "int"], - ["channels_read_media_period", "number", "int"], - ["tmp_sessions", "number", "flags.0?int"], - ["call_receive_timeout_ms", "number", "int"], - ["call_ring_timeout_ms", "number", "int"], - ["call_connect_timeout_ms", "number", "int"], - ["call_packet_timeout_ms", "number", "int"], - ["me_url_prefix", "string", "string"], - ["autoupdate_url_prefix", "string", "flags.7?string"], - ["gif_search_username", "string", "flags.9?string"], - ["venue_search_username", "string", "flags.10?string"], - ["img_search_username", "string", "flags.11?string"], - ["static_maps_provider", "string", "flags.12?string"], - ["caption_length_max", "number", "int"], - ["message_length_max", "number", "int"], - ["webfile_dc_id", "number", "int"], - ["suggested_lang_code", "string", "flags.2?string"], - ["lang_pack_version", "number", "flags.2?int"], - ["base_lang_pack_version", "number", "flags.2?int"], - ["reactions_default", _Reaction_, "flags.15?Reaction"], - ["autologin_token", "string", "flags.16?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.default_p2p_contacts ?? null, "true", "flags.3?true"], - [this.preload_featured_stickers ?? null, "true", "flags.4?true"], - [this.revoke_pm_inbox ?? null, "true", "flags.6?true"], - [this.blocked_mode ?? null, "true", "flags.8?true"], - [this.force_try_ipv6 ?? null, "true", "flags.14?true"], - [this.date, "number", "int"], - [this.expires, "number", "int"], - [this.test_mode, "boolean", "Bool"], - [this.this_dc, "number", "int"], - [this.dc_options, [_DcOption_], "Vector"], - [this.dc_txt_domain_name, "string", "string"], - [this.chat_size_max, "number", "int"], - [this.megagroup_size_max, "number", "int"], - [this.forwarded_count_max, "number", "int"], - [this.online_update_period_ms, "number", "int"], - [this.offline_blur_timeout_ms, "number", "int"], - [this.offline_idle_timeout_ms, "number", "int"], - [this.online_cloud_timeout_ms, "number", "int"], - [this.notify_cloud_delay_ms, "number", "int"], - [this.notify_default_delay_ms, "number", "int"], - [this.push_chat_period_ms, "number", "int"], - [this.push_chat_limit, "number", "int"], - [this.edit_time_limit, "number", "int"], - [this.revoke_time_limit, "number", "int"], - [this.revoke_pm_time_limit, "number", "int"], - [this.rating_e_decay, "number", "int"], - [this.stickers_recent_limit, "number", "int"], - [this.channels_read_media_period, "number", "int"], - [this.tmp_sessions ?? null, "number", "flags.0?int"], - [this.call_receive_timeout_ms, "number", "int"], - [this.call_ring_timeout_ms, "number", "int"], - [this.call_connect_timeout_ms, "number", "int"], - [this.call_packet_timeout_ms, "number", "int"], - [this.me_url_prefix, "string", "string"], - [this.autoupdate_url_prefix ?? null, "string", "flags.7?string"], - [this.gif_search_username ?? null, "string", "flags.9?string"], - [this.venue_search_username ?? null, "string", "flags.10?string"], - [this.img_search_username ?? null, "string", "flags.11?string"], - [this.static_maps_provider ?? null, "string", "flags.12?string"], - [this.caption_length_max, "number", "int"], - [this.message_length_max, "number", "int"], - [this.webfile_dc_id, "number", "int"], - [this.suggested_lang_code ?? null, "string", "flags.2?string"], - [this.lang_pack_version ?? null, "number", "flags.2?int"], - [this.base_lang_pack_version ?? null, "number", "flags.2?int"], - [this.reactions_default ?? null, _Reaction_, "flags.15?Reaction"], - [this.autologin_token ?? null, "string", "flags.16?string"], - ]; - } - - constructor(params: { default_p2p_contacts?: true; preload_featured_stickers?: true; revoke_pm_inbox?: true; blocked_mode?: true; force_try_ipv6?: true; date: number; expires: number; test_mode: boolean; this_dc: number; dc_options: Array; dc_txt_domain_name: string; chat_size_max: number; megagroup_size_max: number; forwarded_count_max: number; online_update_period_ms: number; offline_blur_timeout_ms: number; offline_idle_timeout_ms: number; online_cloud_timeout_ms: number; notify_cloud_delay_ms: number; notify_default_delay_ms: number; push_chat_period_ms: number; push_chat_limit: number; edit_time_limit: number; revoke_time_limit: number; revoke_pm_time_limit: number; rating_e_decay: number; stickers_recent_limit: number; channels_read_media_period: number; tmp_sessions?: number; call_receive_timeout_ms: number; call_ring_timeout_ms: number; call_connect_timeout_ms: number; call_packet_timeout_ms: number; me_url_prefix: string; autoupdate_url_prefix?: string; gif_search_username?: string; venue_search_username?: string; img_search_username?: string; static_maps_provider?: string; caption_length_max: number; message_length_max: number; webfile_dc_id: number; suggested_lang_code?: string; lang_pack_version?: number; base_lang_pack_version?: number; reactions_default?: enums.Reaction; autologin_token?: string }) { - super(); - this.default_p2p_contacts = params.default_p2p_contacts; - this.preload_featured_stickers = params.preload_featured_stickers; - this.revoke_pm_inbox = params.revoke_pm_inbox; - this.blocked_mode = params.blocked_mode; - this.force_try_ipv6 = params.force_try_ipv6; - this.date = params.date; - this.expires = params.expires; - this.test_mode = params.test_mode; - this.this_dc = params.this_dc; - this.dc_options = params.dc_options; - this.dc_txt_domain_name = params.dc_txt_domain_name; - this.chat_size_max = params.chat_size_max; - this.megagroup_size_max = params.megagroup_size_max; - this.forwarded_count_max = params.forwarded_count_max; - this.online_update_period_ms = params.online_update_period_ms; - this.offline_blur_timeout_ms = params.offline_blur_timeout_ms; - this.offline_idle_timeout_ms = params.offline_idle_timeout_ms; - this.online_cloud_timeout_ms = params.online_cloud_timeout_ms; - this.notify_cloud_delay_ms = params.notify_cloud_delay_ms; - this.notify_default_delay_ms = params.notify_default_delay_ms; - this.push_chat_period_ms = params.push_chat_period_ms; - this.push_chat_limit = params.push_chat_limit; - this.edit_time_limit = params.edit_time_limit; - this.revoke_time_limit = params.revoke_time_limit; - this.revoke_pm_time_limit = params.revoke_pm_time_limit; - this.rating_e_decay = params.rating_e_decay; - this.stickers_recent_limit = params.stickers_recent_limit; - this.channels_read_media_period = params.channels_read_media_period; - this.tmp_sessions = params.tmp_sessions; - this.call_receive_timeout_ms = params.call_receive_timeout_ms; - this.call_ring_timeout_ms = params.call_ring_timeout_ms; - this.call_connect_timeout_ms = params.call_connect_timeout_ms; - this.call_packet_timeout_ms = params.call_packet_timeout_ms; - this.me_url_prefix = params.me_url_prefix; - this.autoupdate_url_prefix = params.autoupdate_url_prefix; - this.gif_search_username = params.gif_search_username; - this.venue_search_username = params.venue_search_username; - this.img_search_username = params.img_search_username; - this.static_maps_provider = params.static_maps_provider; - this.caption_length_max = params.caption_length_max; - this.message_length_max = params.message_length_max; - this.webfile_dc_id = params.webfile_dc_id; - this.suggested_lang_code = params.suggested_lang_code; - this.lang_pack_version = params.lang_pack_version; - this.base_lang_pack_version = params.base_lang_pack_version; - this.reactions_default = params.reactions_default; - this.autologin_token = params.autologin_token; - } -} - -/** Nearest data center, according to geo-ip. */ -export class NearestDc_ extends _NearestDc_ { - /** Country code determined by geo-ip */ - country: string; - /** Number of current data center */ - this_dc: number; - /** Number of nearest data center */ - nearest_dc: number; - - protected get [id](): number { - return 0x8E1A1775; - } - - static get [name](): string { - return "nearestDc" - } - - static get [paramDesc](): ParamDesc { - return [ - ["country", "string", "string"], - ["this_dc", "number", "int"], - ["nearest_dc", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.country, "string", "string"], - [this.this_dc, "number", "int"], - [this.nearest_dc, "number", "int"], - ]; - } - - constructor(params: { country: string; this_dc: number; nearest_dc: number }) { - super(); - this.country = params.country; - this.this_dc = params.this_dc; - this.nearest_dc = params.nearest_dc; - } -} - -/** An update is available for the application. */ -export class help_AppUpdate_ extends _help_AppUpdate_ { - /** Unskippable, the new info must be shown to the user (with a popup or something else) */ - can_not_skip?: true; - /** Update ID */ - id: number; - /** New version name */ - version: string; - /** Text description of the update */ - text: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities: Array; - /** Application binary */ - document?: enums.Document; - /** Application download URL */ - url?: string; - /** Associated sticker */ - sticker?: enums.Document; - - protected get [id](): number { - return 0xCCBBCE30; - } - - static get [name](): string { - return "help.appUpdate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_not_skip", "true", "flags.0?true"], - ["id", "number", "int"], - ["version", "string", "string"], - ["text", "string", "string"], - ["entities", [_MessageEntity_], "Vector"], - ["document", _Document_, "flags.1?Document"], - ["url", "string", "flags.2?string"], - ["sticker", _Document_, "flags.3?Document"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_not_skip ?? null, "true", "flags.0?true"], - [this.id, "number", "int"], - [this.version, "string", "string"], - [this.text, "string", "string"], - [this.entities, [_MessageEntity_], "Vector"], - [this.document ?? null, _Document_, "flags.1?Document"], - [this.url ?? null, "string", "flags.2?string"], - [this.sticker ?? null, _Document_, "flags.3?Document"], - ]; - } - - constructor(params: { can_not_skip?: true; id: number; version: string; text: string; entities: Array; document?: enums.Document; url?: string; sticker?: enums.Document }) { - super(); - this.can_not_skip = params.can_not_skip; - this.id = params.id; - this.version = params.version; - this.text = params.text; - this.entities = params.entities; - this.document = params.document; - this.url = params.url; - this.sticker = params.sticker; - } -} - -/** No updates are available for the application. */ -export class help_NoAppUpdate_ extends _help_AppUpdate_ { - protected get [id](): number { - return 0xC45A6536; - } - - static get [name](): string { - return "help.noAppUpdate" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Text of a text message with an invitation to install Telegram. */ -export class help_InviteText_ extends _help_InviteText_ { - /** Text of the message */ - message: string; - - protected get [id](): number { - return 0x18CB9F78; - } - - static get [name](): string { - return "help.inviteText" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, "string", "string"], - ]; - } - - constructor(params: { message: string }) { - super(); - this.message = params.message; - } -} - -/** Empty constructor. */ -export class EncryptedChatEmpty_ extends _EncryptedChat_ { - /** Chat ID */ - id: number; - - protected get [id](): number { - return 0xAB7EC0A0; - } - - static get [name](): string { - return "encryptedChatEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - ]; - } - - constructor(params: { id: number }) { - super(); - this.id = params.id; - } -} - -/** Chat waiting for approval of second participant. */ -export class EncryptedChatWaiting_ extends _EncryptedChat_ { - /** Chat ID */ - id: number; - /** Checking sum depending on user ID */ - access_hash: bigint; - /** Date of chat creation */ - date: number; - /** Chat creator ID */ - admin_id: bigint; - /** ID of second chat participant */ - participant_id: bigint; - - protected get [id](): number { - return 0x66B25953; - } - - static get [name](): string { - return "encryptedChatWaiting" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - ]; - } - - constructor(params: { id: number; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - } -} - -/** Request to create an encrypted chat. */ -export class EncryptedChatRequested_ extends _EncryptedChat_ { - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Chat ID */ - id: number; - /** Check sum depending on user ID */ - access_hash: bigint; - /** Chat creation date */ - date: number; - /** Chat creator ID */ - admin_id: bigint; - /** ID of second chat participant */ - participant_id: bigint; - /** `A = g ^ a mod p`, see [Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) */ - g_a: Uint8Array; - - protected get [id](): number { - return 0x48F1D94C; - } - - static get [name](): string { - return "encryptedChatRequested" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["folder_id", "number", "flags.0?int"], - ["id", "number", "int"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ["g_a", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.folder_id ?? null, "number", "flags.0?int"], - [this.id, "number", "int"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - [this.g_a, Uint8Array, "bytes"], - ]; - } - - constructor(params: { folder_id?: number; id: number; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint; g_a: Uint8Array }) { - super(); - this.folder_id = params.folder_id; - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - this.g_a = params.g_a; - } -} - -/** Encrypted chat */ -export class EncryptedChat_ extends _EncryptedChat_ { - /** Chat ID */ - id: number; - /** Check sum dependent on the user ID */ - access_hash: bigint; - /** Date chat was created */ - date: number; - /** Chat creator ID */ - admin_id: bigint; - /** ID of the second chat participant */ - participant_id: bigint; - /** `B = g ^ b mod p`, if the currently authorized user is the chat's creator, - or `A = g ^ a mod p` otherwise - See [Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) for more info */ - g_a_or_b: Uint8Array; - /** 64-bit fingerprint of received key */ - key_fingerprint: bigint; - - protected get [id](): number { - return 0x61F0D4C7; - } - - static get [name](): string { - return "encryptedChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ["g_a_or_b", Uint8Array, "bytes"], - ["key_fingerprint", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - [this.g_a_or_b, Uint8Array, "bytes"], - [this.key_fingerprint, "bigint", "long"], - ]; - } - - constructor(params: { id: number; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint; g_a_or_b: Uint8Array; key_fingerprint: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - this.g_a_or_b = params.g_a_or_b; - this.key_fingerprint = params.key_fingerprint; - } -} - -/** Discarded or deleted chat. */ -export class EncryptedChatDiscarded_ extends _EncryptedChat_ { - /** Whether both users of this secret chat should also remove all of its messages */ - history_deleted?: true; - /** Chat ID */ - id: number; - - protected get [id](): number { - return 0x1E1C7C45; - } - - static get [name](): string { - return "encryptedChatDiscarded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["history_deleted", "true", "flags.0?true"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.history_deleted ?? null, "true", "flags.0?true"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { history_deleted?: true; id: number }) { - super(); - this.history_deleted = params.history_deleted; - this.id = params.id; - } -} - -/** Creates an encrypted chat. */ -export class InputEncryptedChat_ extends _InputEncryptedChat_ { - /** Chat ID */ - chat_id: number; - /** Checking sum from constructor [encryptedChat](https://core.telegram.org/constructor/encryptedChat), [encryptedChatWaiting](https://core.telegram.org/constructor/encryptedChatWaiting) or [encryptedChatRequested](https://core.telegram.org/constructor/encryptedChatRequested) */ - access_hash: bigint; - - protected get [id](): number { - return 0xF141B5E1; - } - - static get [name](): string { - return "inputEncryptedChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "number", "int"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "number", "int"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: number; access_hash: bigint }) { - super(); - this.chat_id = params.chat_id; - this.access_hash = params.access_hash; - } -} - -/** Empty constructor, non-existing file. */ -export class EncryptedFileEmpty_ extends _EncryptedFile_ { - protected get [id](): number { - return 0xC21F497E; - } - - static get [name](): string { - return "encryptedFileEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Encrypted file. */ -export class EncryptedFile_ extends _EncryptedFile_ { - /** File ID */ - id: bigint; - /** Checking sum depending on user ID */ - access_hash: bigint; - /** File size in bytes */ - size: bigint; - /** Number of data center */ - dc_id: number; - /** 32-bit fingerprint of key used for file encryption */ - key_fingerprint: number; - - protected get [id](): number { - return 0xA8008CD8; - } - - static get [name](): string { - return "encryptedFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["size", "bigint", "long"], - ["dc_id", "number", "int"], - ["key_fingerprint", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.size, "bigint", "long"], - [this.dc_id, "number", "int"], - [this.key_fingerprint, "number", "int"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; size: bigint; dc_id: number; key_fingerprint: number }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.size = params.size; - this.dc_id = params.dc_id; - this.key_fingerprint = params.key_fingerprint; - } -} - -/** Empty constructor. */ -export class InputEncryptedFileEmpty_ extends _InputEncryptedFile_ { - protected get [id](): number { - return 0x1837C364; - } - - static get [name](): string { - return "inputEncryptedFileEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Sets new encrypted file saved by parts using upload.saveFilePart method. */ -export class InputEncryptedFileUploaded_ extends _InputEncryptedFile_ { - /** Random file ID created by client */ - id: bigint; - /** Number of saved parts */ - parts: number; - /** In case [md5-HASH](https://en.wikipedia.org/wiki/MD5) of the (already encrypted) file was transmitted, file content will be checked prior to use */ - md5_checksum: string; - /** 32-bit fingerprint of the key used to encrypt a file */ - key_fingerprint: number; - - protected get [id](): number { - return 0x64BD0306; - } - - static get [name](): string { - return "inputEncryptedFileUploaded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["parts", "number", "int"], - ["md5_checksum", "string", "string"], - ["key_fingerprint", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.parts, "number", "int"], - [this.md5_checksum, "string", "string"], - [this.key_fingerprint, "number", "int"], - ]; - } - - constructor(params: { id: bigint; parts: number; md5_checksum: string; key_fingerprint: number }) { - super(); - this.id = params.id; - this.parts = params.parts; - this.md5_checksum = params.md5_checksum; - this.key_fingerprint = params.key_fingerprint; - } -} - -/** Sets forwarded encrypted file for attachment. */ -export class InputEncryptedFile_ extends _InputEncryptedFile_ { - /** File ID, value of **id** parameter from [encryptedFile](https://core.telegram.org/constructor/encryptedFile) */ - id: bigint; - /** Checking sum, value of **access\_hash** parameter from [encryptedFile](https://core.telegram.org/constructor/encryptedFile) */ - access_hash: bigint; - - protected get [id](): number { - return 0x5A17B5E5; - } - - static get [name](): string { - return "inputEncryptedFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method [upload.saveBigFilePart](https://core.telegram.org/method/upload.saveBigFilePart). */ -export class InputEncryptedFileBigUploaded_ extends _InputEncryptedFile_ { - /** Random file id, created by the client */ - id: bigint; - /** Number of saved parts */ - parts: number; - /** 32-bit imprint of the key used to encrypt the file */ - key_fingerprint: number; - - protected get [id](): number { - return 0x2DC173C8; - } - - static get [name](): string { - return "inputEncryptedFileBigUploaded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["parts", "number", "int"], - ["key_fingerprint", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.parts, "number", "int"], - [this.key_fingerprint, "number", "int"], - ]; - } - - constructor(params: { id: bigint; parts: number; key_fingerprint: number }) { - super(); - this.id = params.id; - this.parts = params.parts; - this.key_fingerprint = params.key_fingerprint; - } -} - -/** Encrypted message. */ -export class EncryptedMessage_ extends _EncryptedMessage_ { - /** Random message ID, assigned by the author of message */ - random_id: bigint; - /** ID of encrypted chat */ - chat_id: number; - /** Date of sending */ - date: number; - /** TL-serialization of [DecryptedMessage](https://core.telegram.org/type/DecryptedMessage) type, encrypted with the key created at chat initialization */ - bytes: Uint8Array; - /** Attached encrypted file */ - file: enums.EncryptedFile; - - protected get [id](): number { - return 0xED18C118; - } - - static get [name](): string { - return "encryptedMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["random_id", "bigint", "long"], - ["chat_id", "number", "int"], - ["date", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ["file", _EncryptedFile_, "EncryptedFile"], - ]; - } - - protected get [params](): Params { - return [ - [this.random_id, "bigint", "long"], - [this.chat_id, "number", "int"], - [this.date, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - [this.file, _EncryptedFile_, "EncryptedFile"], - ]; - } - - constructor(params: { random_id: bigint; chat_id: number; date: number; bytes: Uint8Array; file: enums.EncryptedFile }) { - super(); - this.random_id = params.random_id; - this.chat_id = params.chat_id; - this.date = params.date; - this.bytes = params.bytes; - this.file = params.file; - } -} - -/** Encrypted service message */ -export class EncryptedMessageService_ extends _EncryptedMessage_ { - /** Random message ID, assigned by the author of message */ - random_id: bigint; - /** ID of encrypted chat */ - chat_id: number; - /** Date of sending */ - date: number; - /** TL-serialization of the [DecryptedMessage](https://core.telegram.org/type/DecryptedMessage) type, encrypted with the key created at chat initialization */ - bytes: Uint8Array; - - protected get [id](): number { - return 0x23734B06; - } - - static get [name](): string { - return "encryptedMessageService" - } - - static get [paramDesc](): ParamDesc { - return [ - ["random_id", "bigint", "long"], - ["chat_id", "number", "int"], - ["date", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.random_id, "bigint", "long"], - [this.chat_id, "number", "int"], - [this.date, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { random_id: bigint; chat_id: number; date: number; bytes: Uint8Array }) { - super(); - this.random_id = params.random_id; - this.chat_id = params.chat_id; - this.date = params.date; - this.bytes = params.bytes; - } -} - -/** Configuring parameters did not change. */ -export class messages_DhConfigNotModified_ extends _messages_DhConfig_ { - /** Random sequence of bytes of assigned length */ - random: Uint8Array; - - protected get [id](): number { - return 0xC0E24635; - } - - static get [name](): string { - return "messages.dhConfigNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["random", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.random, Uint8Array, "bytes"], - ]; - } - - constructor(params: { random: Uint8Array }) { - super(); - this.random = params.random; - } -} - -/** New set of configuring parameters. */ -export class messages_DhConfig_ extends _messages_DhConfig_ { - /** New value **prime**, see [Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) */ - g: number; - /** New value **primitive root**, see [Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) */ - p: Uint8Array; - /** Version of set of parameters */ - version: number; - /** Random sequence of bytes of assigned length */ - random: Uint8Array; - - protected get [id](): number { - return 0x2C221EDD; - } - - static get [name](): string { - return "messages.dhConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["g", "number", "int"], - ["p", Uint8Array, "bytes"], - ["version", "number", "int"], - ["random", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.g, "number", "int"], - [this.p, Uint8Array, "bytes"], - [this.version, "number", "int"], - [this.random, Uint8Array, "bytes"], - ]; - } - - constructor(params: { g: number; p: Uint8Array; version: number; random: Uint8Array }) { - super(); - this.g = params.g; - this.p = params.p; - this.version = params.version; - this.random = params.random; - } -} - -/** Message without file attachments sent to an encrypted file. */ -export class messages_SentEncryptedMessage_ extends _messages_SentEncryptedMessage_ { - /** Date of sending */ - date: number; - - protected get [id](): number { - return 0x560F8935; - } - - static get [name](): string { - return "messages.sentEncryptedMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.date, "number", "int"], - ]; - } - - constructor(params: { date: number }) { - super(); - this.date = params.date; - } -} - -/** Message with a file enclosure sent to a protected chat */ -export class messages_SentEncryptedFile_ extends _messages_SentEncryptedMessage_ { - /** Sending date */ - date: number; - /** Attached file */ - file: enums.EncryptedFile; - - protected get [id](): number { - return 0x9493FF32; - } - - static get [name](): string { - return "messages.sentEncryptedFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["date", "number", "int"], - ["file", _EncryptedFile_, "EncryptedFile"], - ]; - } - - protected get [params](): Params { - return [ - [this.date, "number", "int"], - [this.file, _EncryptedFile_, "EncryptedFile"], - ]; - } - - constructor(params: { date: number; file: enums.EncryptedFile }) { - super(); - this.date = params.date; - this.file = params.file; - } -} - -/** Empty constructor. */ -export class InputDocumentEmpty_ extends _InputDocument_ { - protected get [id](): number { - return 0x72F0EAAE; - } - - static get [name](): string { - return "inputDocumentEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines a document for subsequent interaction. */ -export class InputDocument_ extends _InputDocument_ { - /** Document ID */ - id: bigint; - /** **access\_hash** parameter from the [document](https://core.telegram.org/constructor/document) constructor */ - access_hash: bigint; - /** [File reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - - protected get [id](): number { - return 0x1ABFB575; - } - - static get [name](): string { - return "inputDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; file_reference: Uint8Array }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - } -} - -/** Empty constructor, document doesn't exist. */ -export class DocumentEmpty_ extends _Document_ { - /** Document ID or `0` */ - id: bigint; - - protected get [id](): number { - return 0x36F8C871; - } - - static get [name](): string { - return "documentEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Document */ -export class Document_ extends _Document_ { - /** Document ID */ - id: bigint; - /** Check sum, dependent on document ID */ - access_hash: bigint; - /** [File reference](https://core.telegram.org/api/file_reference) */ - file_reference: Uint8Array; - /** Creation date */ - date: number; - /** MIME type */ - mime_type: string; - /** Size */ - size: bigint; - /** Thumbnails */ - thumbs?: Array; - /** Video thumbnails */ - video_thumbs?: Array; - /** DC ID */ - dc_id: number; - /** Attributes */ - attributes: Array; - - protected get [id](): number { - return 0x8FD4C4D8; - } - - static get [name](): string { - return "document" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["file_reference", Uint8Array, "bytes"], - ["date", "number", "int"], - ["mime_type", "string", "string"], - ["size", "bigint", "long"], - ["thumbs", [_PhotoSize_], "flags.0?Vector"], - ["video_thumbs", [_VideoSize_], "flags.1?Vector"], - ["dc_id", "number", "int"], - ["attributes", [_DocumentAttribute_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.file_reference, Uint8Array, "bytes"], - [this.date, "number", "int"], - [this.mime_type, "string", "string"], - [this.size, "bigint", "long"], - [this.thumbs ?? null, [_PhotoSize_], "flags.0?Vector"], - [this.video_thumbs ?? null, [_VideoSize_], "flags.1?Vector"], - [this.dc_id, "number", "int"], - [this.attributes, [_DocumentAttribute_], "Vector"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; file_reference: Uint8Array; date: number; mime_type: string; size: bigint; thumbs?: Array; video_thumbs?: Array; dc_id: number; attributes: Array }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.file_reference = params.file_reference; - this.date = params.date; - this.mime_type = params.mime_type; - this.size = params.size; - this.thumbs = params.thumbs; - this.video_thumbs = params.video_thumbs; - this.dc_id = params.dc_id; - this.attributes = params.attributes; - } -} - -/** Info on support user. */ -export class help_Support_ extends _help_Support_ { - /** Phone number */ - phone_number: string; - /** User */ - user: enums.User; - - protected get [id](): number { - return 0x17C6B5F6; - } - - static get [name](): string { - return "help.support" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["user", _User_, "User"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.user, _User_, "User"], - ]; - } - - constructor(params: { phone_number: string; user: enums.User }) { - super(); - this.phone_number = params.phone_number; - this.user = params.user; - } -} - -/** Notifications generated by a certain user or group. */ -export class NotifyPeer_ extends _NotifyPeer_ { - /** user or group */ - peer: enums.Peer; - - protected get [id](): number { - return 0x9FD40BD8; - } - - static get [name](): string { - return "notifyPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - ]; - } - - constructor(params: { peer: enums.Peer }) { - super(); - this.peer = params.peer; - } -} - -/** Notifications generated by all users. */ -export class NotifyUsers_ extends _NotifyPeer_ { - protected get [id](): number { - return 0xB4C83B4C; - } - - static get [name](): string { - return "notifyUsers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Notifications generated by all groups. */ -export class NotifyChats_ extends _NotifyPeer_ { - protected get [id](): number { - return 0xC007CEC3; - } - - static get [name](): string { - return "notifyChats" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Channel notification settings */ -export class NotifyBroadcasts_ extends _NotifyPeer_ { - protected get [id](): number { - return 0xD612E8EF; - } - - static get [name](): string { - return "notifyBroadcasts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Notifications generated by a [topic](https://core.telegram.org/api/forum#forum-topics) in a [forum](https://core.telegram.org/api/forum). */ -export class NotifyForumTopic_ extends _NotifyPeer_ { - /** Forum ID */ - peer: enums.Peer; - /** [Topic ID](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id: number; - - protected get [id](): number { - return 0x226E6308; - } - - static get [name](): string { - return "notifyForumTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["top_msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.top_msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; top_msg_id: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - } -} - -/** User is typing. */ -export class SendMessageTypingAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0x16BF744E; - } - - static get [name](): string { - return "sendMessageTypingAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload. */ -export class SendMessageCancelAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0xFD5EC8F5; - } - - static get [name](): string { - return "sendMessageCancelAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is recording a video. */ -export class SendMessageRecordVideoAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0xA187D66F; - } - - static get [name](): string { - return "sendMessageRecordVideoAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is uploading a video. */ -export class SendMessageUploadVideoAction_ extends _SendMessageAction_ { - /** Progress percentage */ - progress: number; - - protected get [id](): number { - return 0xE9763AEC; - } - - static get [name](): string { - return "sendMessageUploadVideoAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["progress", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.progress, "number", "int"], - ]; - } - - constructor(params: { progress: number }) { - super(); - this.progress = params.progress; - } -} - -/** User is recording a voice message. */ -export class SendMessageRecordAudioAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0xD52F73F7; - } - - static get [name](): string { - return "sendMessageRecordAudioAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is uploading a voice message. */ -export class SendMessageUploadAudioAction_ extends _SendMessageAction_ { - /** Progress percentage */ - progress: number; - - protected get [id](): number { - return 0xF351D7AB; - } - - static get [name](): string { - return "sendMessageUploadAudioAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["progress", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.progress, "number", "int"], - ]; - } - - constructor(params: { progress: number }) { - super(); - this.progress = params.progress; - } -} - -/** User is uploading a photo. */ -export class SendMessageUploadPhotoAction_ extends _SendMessageAction_ { - /** Progress percentage */ - progress: number; - - protected get [id](): number { - return 0xD1D34A26; - } - - static get [name](): string { - return "sendMessageUploadPhotoAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["progress", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.progress, "number", "int"], - ]; - } - - constructor(params: { progress: number }) { - super(); - this.progress = params.progress; - } -} - -/** User is uploading a file. */ -export class SendMessageUploadDocumentAction_ extends _SendMessageAction_ { - /** Progress percentage */ - progress: number; - - protected get [id](): number { - return 0xAA0CD9E4; - } - - static get [name](): string { - return "sendMessageUploadDocumentAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["progress", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.progress, "number", "int"], - ]; - } - - constructor(params: { progress: number }) { - super(); - this.progress = params.progress; - } -} - -/** User is selecting a location to share. */ -export class SendMessageGeoLocationAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0x176F8BA1; - } - - static get [name](): string { - return "sendMessageGeoLocationAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is selecting a contact to share. */ -export class SendMessageChooseContactAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0x628CBC6F; - } - - static get [name](): string { - return "sendMessageChooseContactAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is playing a game */ -export class SendMessageGamePlayAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0xDD6A8F48; - } - - static get [name](): string { - return "sendMessageGamePlayAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is recording a round video to share */ -export class SendMessageRecordRoundAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0x88F27FBC; - } - - static get [name](): string { - return "sendMessageRecordRoundAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User is uploading a round video */ -export class SendMessageUploadRoundAction_ extends _SendMessageAction_ { - /** Progress percentage */ - progress: number; - - protected get [id](): number { - return 0x243E1C66; - } - - static get [name](): string { - return "sendMessageUploadRoundAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["progress", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.progress, "number", "int"], - ]; - } - - constructor(params: { progress: number }) { - super(); - this.progress = params.progress; - } -} - -/** User is currently speaking in the group call */ -export class SpeakingInGroupCallAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0xD92C2285; - } - - static get [name](): string { - return "speakingInGroupCallAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Chat history is being imported */ -export class SendMessageHistoryImportAction_ extends _SendMessageAction_ { - /** Progress percentage */ - progress: number; - - protected get [id](): number { - return 0xDBDA9246; - } - - static get [name](): string { - return "sendMessageHistoryImportAction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["progress", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.progress, "number", "int"], - ]; - } - - constructor(params: { progress: number }) { - super(); - this.progress = params.progress; - } -} - -/** User is choosing a sticker */ -export class SendMessageChooseStickerAction_ extends _SendMessageAction_ { - protected get [id](): number { - return 0xB05AC6B1; - } - - static get [name](): string { - return "sendMessageChooseStickerAction" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** User has clicked on an animated emoji triggering a [reaction, click here for more info »](https://core.telegram.org/api/animated-emojis#emoji-reactions). */ -export class SendMessageEmojiInteraction_ extends _SendMessageAction_ { - /** Emoji */ - emoticon: string; - /** Message ID of the animated emoji that was clicked */ - msg_id: number; - /** A JSON object with interaction info, [click here for more info »](https://core.telegram.org/api/animated-emojis#emoji-reactions) */ - interaction: enums.DataJSON; - - protected get [id](): number { - return 0x25972BCB; - } - - static get [name](): string { - return "sendMessageEmojiInteraction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ["msg_id", "number", "int"], - ["interaction", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - [this.msg_id, "number", "int"], - [this.interaction, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { emoticon: string; msg_id: number; interaction: enums.DataJSON }) { - super(); - this.emoticon = params.emoticon; - this.msg_id = params.msg_id; - this.interaction = params.interaction; - } -} - -/** User is watching an animated emoji reaction triggered by another user, [click here for more info »](https://core.telegram.org/api/animated-emojis#emoji-reactions). */ -export class SendMessageEmojiInteractionSeen_ extends _SendMessageAction_ { - /** Emoji */ - emoticon: string; - - protected get [id](): number { - return 0xB665902E; - } - - static get [name](): string { - return "sendMessageEmojiInteractionSeen" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { emoticon: string }) { - super(); - this.emoticon = params.emoticon; - } -} - -/** Users found by name substring and auxiliary data. */ -export class contacts_Found_ extends _contacts_Found_ { - /** Personalized results */ - my_results: Array; - /** List of found user identifiers */ - results: Array; - /** Found chats */ - chats: Array; - /** List of users */ - users: Array; - - protected get [id](): number { - return 0xB3134D9D; - } - - static get [name](): string { - return "contacts.found" - } - - static get [paramDesc](): ParamDesc { - return [ - ["my_results", [_Peer_], "Vector"], - ["results", [_Peer_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.my_results, [_Peer_], "Vector"], - [this.results, [_Peer_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { my_results: Array; results: Array; chats: Array; users: Array }) { - super(); - this.my_results = params.my_results; - this.results = params.results; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Whether people will be able to see your exact last online timestamp */ -export class InputPrivacyKeyStatusTimestamp_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0x4F96CB18; - } - - static get [name](): string { - return "inputPrivacyKeyStatusTimestamp" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people will be able to invite you to chats */ -export class InputPrivacyKeyChatInvite_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xBDFB0426; - } - - static get [name](): string { - return "inputPrivacyKeyChatInvite" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether you will accept phone calls */ -export class InputPrivacyKeyPhoneCall_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xFABADC5F; - } - - static get [name](): string { - return "inputPrivacyKeyPhoneCall" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether to allow P2P communication during VoIP calls */ -export class InputPrivacyKeyPhoneP2P_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xDB9E70D2; - } - - static get [name](): string { - return "inputPrivacyKeyPhoneP2P" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether messages forwarded from you will be [anonymous](https://telegram.org/blog/unsend-privacy-emoji#anonymous-forwarding) */ -export class InputPrivacyKeyForwards_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xA4DD4C08; - } - - static get [name](): string { - return "inputPrivacyKeyForwards" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people will be able to see your profile picture */ -export class InputPrivacyKeyProfilePhoto_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0x5719BACC; - } - - static get [name](): string { - return "inputPrivacyKeyProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people will be able to see your phone number */ -export class InputPrivacyKeyPhoneNumber_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0x0352DAFA; - } - - static get [name](): string { - return "inputPrivacyKeyPhoneNumber" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people can add you to their contact list by your phone number */ -export class InputPrivacyKeyAddedByPhone_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xD1219BDD; - } - - static get [name](): string { - return "inputPrivacyKeyAddedByPhone" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people can send you voice messages */ -export class InputPrivacyKeyVoiceMessages_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xAEE69D68; - } - - static get [name](): string { - return "inputPrivacyKeyVoiceMessages" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people can see your bio */ -export class InputPrivacyKeyAbout_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0x3823CC40; - } - - static get [name](): string { - return "inputPrivacyKeyAbout" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class InputPrivacyKeyBirthday_ extends _InputPrivacyKey_ { - protected get [id](): number { - return 0xD65A11CC; - } - - static get [name](): string { - return "inputPrivacyKeyBirthday" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether we can see the last online timestamp of this user */ -export class PrivacyKeyStatusTimestamp_ extends _PrivacyKey_ { - protected get [id](): number { - return 0xBC2EAB30; - } - - static get [name](): string { - return "privacyKeyStatusTimestamp" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether the user can be invited to chats */ -export class PrivacyKeyChatInvite_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x500E6DFA; - } - - static get [name](): string { - return "privacyKeyChatInvite" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether the user accepts phone calls */ -export class PrivacyKeyPhoneCall_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x3D662B7B; - } - - static get [name](): string { - return "privacyKeyPhoneCall" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether P2P connections in phone calls with this user are allowed */ -export class PrivacyKeyPhoneP2P_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x39491CC8; - } - - static get [name](): string { - return "privacyKeyPhoneP2P" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether messages forwarded from the user will be [anonymously forwarded](https://telegram.org/blog/unsend-privacy-emoji#anonymous-forwarding) */ -export class PrivacyKeyForwards_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x69EC56A3; - } - - static get [name](): string { - return "privacyKeyForwards" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether the profile picture of the user is visible */ -export class PrivacyKeyProfilePhoto_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x96151FED; - } - - static get [name](): string { - return "privacyKeyProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether the user allows us to see his phone number */ -export class PrivacyKeyPhoneNumber_ extends _PrivacyKey_ { - protected get [id](): number { - return 0xD19AE46D; - } - - static get [name](): string { - return "privacyKeyPhoneNumber" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether this user can be added to our contact list by their phone number */ -export class PrivacyKeyAddedByPhone_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x42FFD42B; - } - - static get [name](): string { - return "privacyKeyAddedByPhone" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether the user accepts voice messages */ -export class PrivacyKeyVoiceMessages_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x0697F414; - } - - static get [name](): string { - return "privacyKeyVoiceMessages" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether people can see your bio */ -export class PrivacyKeyAbout_ extends _PrivacyKey_ { - protected get [id](): number { - return 0xA486B761; - } - - static get [name](): string { - return "privacyKeyAbout" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class PrivacyKeyBirthday_ extends _PrivacyKey_ { - protected get [id](): number { - return 0x2000A518; - } - - static get [name](): string { - return "privacyKeyBirthday" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Allow only contacts */ -export class InputPrivacyValueAllowContacts_ extends _InputPrivacyRule_ { - protected get [id](): number { - return 0x0D09E07B; - } - - static get [name](): string { - return "inputPrivacyValueAllowContacts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Allow all users */ -export class InputPrivacyValueAllowAll_ extends _InputPrivacyRule_ { - protected get [id](): number { - return 0x184B35CE; - } - - static get [name](): string { - return "inputPrivacyValueAllowAll" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Allow only certain users */ -export class InputPrivacyValueAllowUsers_ extends _InputPrivacyRule_ { - /** Allowed users */ - users: Array; - - protected get [id](): number { - return 0x131CC67F; - } - - static get [name](): string { - return "inputPrivacyValueAllowUsers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["users", [_InputUser_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.users, [_InputUser_], "Vector"], - ]; - } - - constructor(params: { users: Array }) { - super(); - this.users = params.users; - } -} - -/** Disallow only contacts */ -export class InputPrivacyValueDisallowContacts_ extends _InputPrivacyRule_ { - protected get [id](): number { - return 0x0BA52007; - } - - static get [name](): string { - return "inputPrivacyValueDisallowContacts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Disallow all */ -export class InputPrivacyValueDisallowAll_ extends _InputPrivacyRule_ { - protected get [id](): number { - return 0xD66B66C9; - } - - static get [name](): string { - return "inputPrivacyValueDisallowAll" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Disallow only certain users */ -export class InputPrivacyValueDisallowUsers_ extends _InputPrivacyRule_ { - /** Users to disallow */ - users: Array; - - protected get [id](): number { - return 0x90110467; - } - - static get [name](): string { - return "inputPrivacyValueDisallowUsers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["users", [_InputUser_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.users, [_InputUser_], "Vector"], - ]; - } - - constructor(params: { users: Array }) { - super(); - this.users = params.users; - } -} - -/** Allow only participants of certain chats */ -export class InputPrivacyValueAllowChatParticipants_ extends _InputPrivacyRule_ { - /** Allowed chat IDs */ - chats: Array; - - protected get [id](): number { - return 0x840649CF; - } - - static get [name](): string { - return "inputPrivacyValueAllowChatParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chats", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chats, ["bigint"], "Vector"], - ]; - } - - constructor(params: { chats: Array }) { - super(); - this.chats = params.chats; - } -} - -/** Disallow only participants of certain chats */ -export class InputPrivacyValueDisallowChatParticipants_ extends _InputPrivacyRule_ { - /** Disallowed chat IDs */ - chats: Array; - - protected get [id](): number { - return 0xE94F0F86; - } - - static get [name](): string { - return "inputPrivacyValueDisallowChatParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chats", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chats, ["bigint"], "Vector"], - ]; - } - - constructor(params: { chats: Array }) { - super(); - this.chats = params.chats; - } -} - -/** Allow only [close friends »](https://core.telegram.org/api/privacy) */ -export class InputPrivacyValueAllowCloseFriends_ extends _InputPrivacyRule_ { - protected get [id](): number { - return 0x2F453E49; - } - - static get [name](): string { - return "inputPrivacyValueAllowCloseFriends" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class InputPrivacyValueAllowPremium_ extends _InputPrivacyRule_ { - protected get [id](): number { - return 0x77CDC9F1; - } - - static get [name](): string { - return "inputPrivacyValueAllowPremium" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Allow all contacts */ -export class PrivacyValueAllowContacts_ extends _PrivacyRule_ { - protected get [id](): number { - return 0xFFFE1BAC; - } - - static get [name](): string { - return "privacyValueAllowContacts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Allow all users */ -export class PrivacyValueAllowAll_ extends _PrivacyRule_ { - protected get [id](): number { - return 0x65427B82; - } - - static get [name](): string { - return "privacyValueAllowAll" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Allow only certain users */ -export class PrivacyValueAllowUsers_ extends _PrivacyRule_ { - /** Allowed users */ - users: Array; - - protected get [id](): number { - return 0xB8905FB2; - } - - static get [name](): string { - return "privacyValueAllowUsers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["users", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.users, ["bigint"], "Vector"], - ]; - } - - constructor(params: { users: Array }) { - super(); - this.users = params.users; - } -} - -/** Disallow only contacts */ -export class PrivacyValueDisallowContacts_ extends _PrivacyRule_ { - protected get [id](): number { - return 0xF888FA1A; - } - - static get [name](): string { - return "privacyValueDisallowContacts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Disallow all users */ -export class PrivacyValueDisallowAll_ extends _PrivacyRule_ { - protected get [id](): number { - return 0x8B73E763; - } - - static get [name](): string { - return "privacyValueDisallowAll" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Disallow only certain users */ -export class PrivacyValueDisallowUsers_ extends _PrivacyRule_ { - /** Disallowed users */ - users: Array; - - protected get [id](): number { - return 0xE4621141; - } - - static get [name](): string { - return "privacyValueDisallowUsers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["users", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.users, ["bigint"], "Vector"], - ]; - } - - constructor(params: { users: Array }) { - super(); - this.users = params.users; - } -} - -/** Allow all participants of certain chats */ -export class PrivacyValueAllowChatParticipants_ extends _PrivacyRule_ { - /** Allowed chats */ - chats: Array; - - protected get [id](): number { - return 0x6B134E8E; - } - - static get [name](): string { - return "privacyValueAllowChatParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chats", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chats, ["bigint"], "Vector"], - ]; - } - - constructor(params: { chats: Array }) { - super(); - this.chats = params.chats; - } -} - -/** Disallow only participants of certain chats */ -export class PrivacyValueDisallowChatParticipants_ extends _PrivacyRule_ { - /** Disallowed chats */ - chats: Array; - - protected get [id](): number { - return 0x41C87565; - } - - static get [name](): string { - return "privacyValueDisallowChatParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chats", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chats, ["bigint"], "Vector"], - ]; - } - - constructor(params: { chats: Array }) { - super(); - this.chats = params.chats; - } -} - -/** Allow only [close friends »](https://core.telegram.org/api/privacy) */ -export class PrivacyValueAllowCloseFriends_ extends _PrivacyRule_ { - protected get [id](): number { - return 0xF7E8D89B; - } - - static get [name](): string { - return "privacyValueAllowCloseFriends" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class PrivacyValueAllowPremium_ extends _PrivacyRule_ { - protected get [id](): number { - return 0xECE9814B; - } - - static get [name](): string { - return "privacyValueAllowPremium" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Privacy rules */ -export class account_PrivacyRules_ extends _account_PrivacyRules_ { - /** Privacy rules */ - rules: Array; - /** Chats to which the rules apply */ - chats: Array; - /** Users to which the rules apply */ - users: Array; - - protected get [id](): number { - return 0x50A04E45; - } - - static get [name](): string { - return "account.privacyRules" - } - - static get [paramDesc](): ParamDesc { - return [ - ["rules", [_PrivacyRule_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.rules, [_PrivacyRule_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { rules: Array; chats: Array; users: Array }) { - super(); - this.rules = params.rules; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Time to live in days of the current account */ -export class AccountDaysTTL_ extends _AccountDaysTTL_ { - /** This account will self-destruct in the specified number of days */ - days: number; - - protected get [id](): number { - return 0xB8D0AFDF; - } - - static get [name](): string { - return "accountDaysTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["days", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.days, "number", "int"], - ]; - } - - constructor(params: { days: number }) { - super(); - this.days = params.days; - } -} - -/** Defines the width and height of an image uploaded as document */ -export class DocumentAttributeImageSize_ extends _DocumentAttribute_ { - /** Width of image */ - w: number; - /** Height of image */ - h: number; - - protected get [id](): number { - return 0x6C37C15C; - } - - static get [name](): string { - return "documentAttributeImageSize" - } - - static get [paramDesc](): ParamDesc { - return [ - ["w", "number", "int"], - ["h", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.w, "number", "int"], - [this.h, "number", "int"], - ]; - } - - constructor(params: { w: number; h: number }) { - super(); - this.w = params.w; - this.h = params.h; - } -} - -/** Defines an animated GIF */ -export class DocumentAttributeAnimated_ extends _DocumentAttribute_ { - protected get [id](): number { - return 0x11B58939; - } - - static get [name](): string { - return "documentAttributeAnimated" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Defines a sticker */ -export class DocumentAttributeSticker_ extends _DocumentAttribute_ { - /** Whether this is a mask sticker */ - mask?: true; - /** Alternative emoji representation of sticker */ - alt: string; - /** Associated stickerset */ - stickerset: enums.InputStickerSet; - /** Mask coordinates (if this is a mask sticker, attached to a photo) */ - mask_coords?: enums.MaskCoords; - - protected get [id](): number { - return 0x6319D612; - } - - static get [name](): string { - return "documentAttributeSticker" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["mask", "true", "flags.1?true"], - ["alt", "string", "string"], - ["stickerset", _InputStickerSet_, "InputStickerSet"], - ["mask_coords", _MaskCoords_, "flags.0?MaskCoords"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.mask ?? null, "true", "flags.1?true"], - [this.alt, "string", "string"], - [this.stickerset, _InputStickerSet_, "InputStickerSet"], - [this.mask_coords ?? null, _MaskCoords_, "flags.0?MaskCoords"], - ]; - } - - constructor(params: { mask?: true; alt: string; stickerset: enums.InputStickerSet; mask_coords?: enums.MaskCoords }) { - super(); - this.mask = params.mask; - this.alt = params.alt; - this.stickerset = params.stickerset; - this.mask_coords = params.mask_coords; - } -} - -/** Defines a video */ -export class DocumentAttributeVideo_ extends _DocumentAttribute_ { - /** Whether this is a round video */ - round_message?: true; - /** Whether the video supports streaming */ - supports_streaming?: true; - /** Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) */ - nosound?: true; - /** Duration in seconds */ - duration: number; - /** Video width */ - w: number; - /** Video height */ - h: number; - /** Number of bytes to preload when preloading videos (particularly [video stories](https://core.telegram.org/api/stories)). */ - preload_prefix_size?: number; - - protected get [id](): number { - return 0xD38FF1C2; - } - - static get [name](): string { - return "documentAttributeVideo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["round_message", "true", "flags.0?true"], - ["supports_streaming", "true", "flags.1?true"], - ["nosound", "true", "flags.3?true"], - ["duration", "number", "double"], - ["w", "number", "int"], - ["h", "number", "int"], - ["preload_prefix_size", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.round_message ?? null, "true", "flags.0?true"], - [this.supports_streaming ?? null, "true", "flags.1?true"], - [this.nosound ?? null, "true", "flags.3?true"], - [this.duration, "number", "double"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.preload_prefix_size ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params: { round_message?: true; supports_streaming?: true; nosound?: true; duration: number; w: number; h: number; preload_prefix_size?: number }) { - super(); - this.round_message = params.round_message; - this.supports_streaming = params.supports_streaming; - this.nosound = params.nosound; - this.duration = params.duration; - this.w = params.w; - this.h = params.h; - this.preload_prefix_size = params.preload_prefix_size; - } -} - -/** Represents an audio file */ -export class DocumentAttributeAudio_ extends _DocumentAttribute_ { - /** Whether this is a voice message */ - voice?: true; - /** Duration in seconds */ - duration: number; - /** Name of song */ - title?: string; - /** Performer */ - performer?: string; - /** Waveform: consists in a series of bitpacked 5-bit values. - Example implementation: [android](https://github.com/DrKLO/Telegram/blob/96dce2c9aabc33b87db61d830aa087b6b03fe397/TMessagesProj/jni/audio.c#L546). */ - waveform?: Uint8Array; - - protected get [id](): number { - return 0x9852F9C6; - } - - static get [name](): string { - return "documentAttributeAudio" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["voice", "true", "flags.10?true"], - ["duration", "number", "int"], - ["title", "string", "flags.0?string"], - ["performer", "string", "flags.1?string"], - ["waveform", Uint8Array, "flags.2?bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.voice ?? null, "true", "flags.10?true"], - [this.duration, "number", "int"], - [this.title ?? null, "string", "flags.0?string"], - [this.performer ?? null, "string", "flags.1?string"], - [this.waveform ?? null, Uint8Array, "flags.2?bytes"], - ]; - } - - constructor(params: { voice?: true; duration: number; title?: string; performer?: string; waveform?: Uint8Array }) { - super(); - this.voice = params.voice; - this.duration = params.duration; - this.title = params.title; - this.performer = params.performer; - this.waveform = params.waveform; - } -} - -/** A simple document with a file name */ -export class DocumentAttributeFilename_ extends _DocumentAttribute_ { - /** The file name */ - file_name: string; - - protected get [id](): number { - return 0x15590068; - } - - static get [name](): string { - return "documentAttributeFilename" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.file_name, "string", "string"], - ]; - } - - constructor(params: { file_name: string }) { - super(); - this.file_name = params.file_name; - } -} - -/** Whether the current document has stickers attached */ -export class DocumentAttributeHasStickers_ extends _DocumentAttribute_ { - protected get [id](): number { - return 0x9801D2F7; - } - - static get [name](): string { - return "documentAttributeHasStickers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Info about a custom emoji */ -export class DocumentAttributeCustomEmoji_ extends _DocumentAttribute_ { - /** Whether this custom emoji can be sent by non-Premium users */ - free?: true; - /** Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. */ - text_color?: true; - /** The actual emoji */ - alt: string; - /** The emoji stickerset to which this emoji belongs. */ - stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0xFD149899; - } - - static get [name](): string { - return "documentAttributeCustomEmoji" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["free", "true", "flags.0?true"], - ["text_color", "true", "flags.1?true"], - ["alt", "string", "string"], - ["stickerset", _InputStickerSet_, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.free ?? null, "true", "flags.0?true"], - [this.text_color ?? null, "true", "flags.1?true"], - [this.alt, "string", "string"], - [this.stickerset, _InputStickerSet_, "InputStickerSet"], - ]; - } - - constructor(params: { free?: true; text_color?: true; alt: string; stickerset: enums.InputStickerSet }) { - super(); - this.free = params.free; - this.text_color = params.text_color; - this.alt = params.alt; - this.stickerset = params.stickerset; - } -} - -/** No new stickers were found for the given query */ -export class messages_StickersNotModified_ extends _messages_Stickers_ { - protected get [id](): number { - return 0xF1749A22; - } - - static get [name](): string { - return "messages.stickersNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Found stickers */ -export class messages_Stickers_ extends _messages_Stickers_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Stickers */ - stickers: Array; - - protected get [id](): number { - return 0x30A6EC7E; - } - - static get [name](): string { - return "messages.stickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["stickers", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.stickers, [_Document_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; stickers: Array }) { - super(); - this.hash = params.hash; - this.stickers = params.stickers; - } -} - -/** A stickerpack is a group of stickers associated to the same emoji. -It is **not** a sticker pack the way it is usually intended, you may be looking for a [StickerSet](https://core.telegram.org/type/StickerSet). */ -export class StickerPack_ extends _StickerPack_ { - /** Emoji */ - emoticon: string; - /** Stickers */ - documents: Array; - - protected get [id](): number { - return 0x12B299D4; - } - - static get [name](): string { - return "stickerPack" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ["documents", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - [this.documents, ["bigint"], "Vector"], - ]; - } - - constructor(params: { emoticon: string; documents: Array }) { - super(); - this.emoticon = params.emoticon; - this.documents = params.documents; - } -} - -/** Info about all installed stickers hasn't changed */ -export class messages_AllStickersNotModified_ extends _messages_AllStickers_ { - protected get [id](): number { - return 0xE86602C3; - } - - static get [name](): string { - return "messages.allStickersNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Info about all installed stickers */ -export class messages_AllStickers_ extends _messages_AllStickers_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** All stickersets */ - sets: Array; - - protected get [id](): number { - return 0xCDBBCEBB; - } - - static get [name](): string { - return "messages.allStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["sets", [_StickerSet_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.sets, [_StickerSet_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; sets: Array }) { - super(); - this.hash = params.hash; - this.sets = params.sets; - } -} - -/** Events affected by operation */ -export class messages_AffectedMessages_ extends _messages_AffectedMessages_ { - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - - protected get [id](): number { - return 0x84D19185; - } - - static get [name](): string { - return "messages.affectedMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - ]; - } - - constructor(params: { pts: number; pts_count: number }) { - super(); - this.pts = params.pts; - this.pts_count = params.pts_count; - } -} - -/** No preview is available for the webpage */ -export class WebPageEmpty_ extends _WebPage_ { - /** Preview ID */ - id: bigint; - /** URL of the webpage. */ - url?: string; - - protected get [id](): number { - return 0x211A1788; - } - - static get [name](): string { - return "webPageEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "bigint", "long"], - ["url", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "bigint", "long"], - [this.url ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { id: bigint; url?: string }) { - super(); - this.id = params.id; - this.url = params.url; - } -} - -/** A preview of the webpage is currently being generated */ -export class WebPagePending_ extends _WebPage_ { - /** ID of preview */ - id: bigint; - /** URL of the webpage */ - url?: string; - /** When was the processing started */ - date: number; - - protected get [id](): number { - return 0xB0D13E47; - } - - static get [name](): string { - return "webPagePending" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "bigint", "long"], - ["url", "string", "flags.0?string"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "bigint", "long"], - [this.url ?? null, "string", "flags.0?string"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { id: bigint; url?: string; date: number }) { - super(); - this.id = params.id; - this.url = params.url; - this.date = params.date; - } -} - -/** Webpage preview */ -export class WebPage_ extends _WebPage_ { - /** Whether the size of the media in the preview can be changed. */ - has_large_media?: true; - /** Preview ID */ - id: bigint; - /** URL of previewed webpage */ - url: string; - /** Webpage URL to be displayed to the user */ - display_url: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - /** Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else */ - type?: string; - /** Short name of the site (e.g., Google Docs, App Store) */ - site_name?: string; - /** Title of the content */ - title?: string; - /** Content description */ - description?: string; - /** Image representing the content */ - photo?: enums.Photo; - /** URL to show in the embedded preview */ - embed_url?: string; - /** MIME type of the embedded preview, (e.g., text/html or video/mp4) */ - embed_type?: string; - /** Width of the embedded preview */ - embed_width?: number; - /** Height of the embedded preview */ - embed_height?: number; - /** Duration of the content, in seconds */ - duration?: number; - /** Author of the content */ - author?: string; - /** Preview of the content as a media file */ - document?: enums.Document; - /** Page contents in [instant view](https://instantview.telegram.org) format */ - cached_page?: enums.Page; - /** Webpage attributes */ - attributes?: Array; - - protected get [id](): number { - return 0xE89C45B2; - } - - static get [name](): string { - return "webPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_large_media", "true", "flags.13?true"], - ["id", "bigint", "long"], - ["url", "string", "string"], - ["display_url", "string", "string"], - ["hash", "number", "int"], - ["type", "string", "flags.0?string"], - ["site_name", "string", "flags.1?string"], - ["title", "string", "flags.2?string"], - ["description", "string", "flags.3?string"], - ["photo", _Photo_, "flags.4?Photo"], - ["embed_url", "string", "flags.5?string"], - ["embed_type", "string", "flags.5?string"], - ["embed_width", "number", "flags.6?int"], - ["embed_height", "number", "flags.6?int"], - ["duration", "number", "flags.7?int"], - ["author", "string", "flags.8?string"], - ["document", _Document_, "flags.9?Document"], - ["cached_page", _Page_, "flags.10?Page"], - ["attributes", [_WebPageAttribute_], "flags.12?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_large_media ?? null, "true", "flags.13?true"], - [this.id, "bigint", "long"], - [this.url, "string", "string"], - [this.display_url, "string", "string"], - [this.hash, "number", "int"], - [this.type ?? null, "string", "flags.0?string"], - [this.site_name ?? null, "string", "flags.1?string"], - [this.title ?? null, "string", "flags.2?string"], - [this.description ?? null, "string", "flags.3?string"], - [this.photo ?? null, _Photo_, "flags.4?Photo"], - [this.embed_url ?? null, "string", "flags.5?string"], - [this.embed_type ?? null, "string", "flags.5?string"], - [this.embed_width ?? null, "number", "flags.6?int"], - [this.embed_height ?? null, "number", "flags.6?int"], - [this.duration ?? null, "number", "flags.7?int"], - [this.author ?? null, "string", "flags.8?string"], - [this.document ?? null, _Document_, "flags.9?Document"], - [this.cached_page ?? null, _Page_, "flags.10?Page"], - [this.attributes ?? null, [_WebPageAttribute_], "flags.12?Vector"], - ]; - } - - constructor(params: { has_large_media?: true; id: bigint; url: string; display_url: string; hash: number; type?: string; site_name?: string; title?: string; description?: string; photo?: enums.Photo; embed_url?: string; embed_type?: string; embed_width?: number; embed_height?: number; duration?: number; author?: string; document?: enums.Document; cached_page?: enums.Page; attributes?: Array }) { - super(); - this.has_large_media = params.has_large_media; - this.id = params.id; - this.url = params.url; - this.display_url = params.display_url; - this.hash = params.hash; - this.type = params.type; - this.site_name = params.site_name; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.embed_url = params.embed_url; - this.embed_type = params.embed_type; - this.embed_width = params.embed_width; - this.embed_height = params.embed_height; - this.duration = params.duration; - this.author = params.author; - this.document = params.document; - this.cached_page = params.cached_page; - this.attributes = params.attributes; - } -} - -/** The preview of the webpage hasn't changed */ -export class WebPageNotModified_ extends _WebPage_ { - /** Page view count */ - cached_page_views?: number; - - protected get [id](): number { - return 0x7311CA11; - } - - static get [name](): string { - return "webPageNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["cached_page_views", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.cached_page_views ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params?: { cached_page_views?: number }) { - super(); - this.cached_page_views = params?.cached_page_views; - } -} - -/** Logged-in session */ -export class Authorization_ extends _Authorization_ { - /** Whether this is the current session */ - current?: true; - /** Whether the session is from an official app */ - official_app?: true; - /** Whether the session is still waiting for a 2FA password */ - password_pending?: true; - /** Whether this session will accept encrypted chats */ - encrypted_requests_disabled?: true; - /** Whether this session will accept phone calls */ - call_requests_disabled?: true; - /** Whether the session is [unconfirmed, see here »](https://core.telegram.org/api/auth#confirming-login) for more info. */ - unconfirmed?: true; - /** Identifier */ - hash: bigint; - /** Device model */ - device_model: string; - /** Platform */ - platform: string; - /** System version */ - system_version: string; - /** [API ID](https://core.telegram.org/api/obtaining_api_id) */ - api_id: number; - /** App name */ - app_name: string; - /** App version */ - app_version: string; - /** When was the session created */ - date_created: number; - /** When was the session last active */ - date_active: number; - /** Last known IP */ - ip: string; - /** Country determined from IP */ - country: string; - /** Region determined from IP */ - region: string; - - protected get [id](): number { - return 0xAD01D61D; - } - - static get [name](): string { - return "authorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["current", "true", "flags.0?true"], - ["official_app", "true", "flags.1?true"], - ["password_pending", "true", "flags.2?true"], - ["encrypted_requests_disabled", "true", "flags.3?true"], - ["call_requests_disabled", "true", "flags.4?true"], - ["unconfirmed", "true", "flags.5?true"], - ["hash", "bigint", "long"], - ["device_model", "string", "string"], - ["platform", "string", "string"], - ["system_version", "string", "string"], - ["api_id", "number", "int"], - ["app_name", "string", "string"], - ["app_version", "string", "string"], - ["date_created", "number", "int"], - ["date_active", "number", "int"], - ["ip", "string", "string"], - ["country", "string", "string"], - ["region", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.current ?? null, "true", "flags.0?true"], - [this.official_app ?? null, "true", "flags.1?true"], - [this.password_pending ?? null, "true", "flags.2?true"], - [this.encrypted_requests_disabled ?? null, "true", "flags.3?true"], - [this.call_requests_disabled ?? null, "true", "flags.4?true"], - [this.unconfirmed ?? null, "true", "flags.5?true"], - [this.hash, "bigint", "long"], - [this.device_model, "string", "string"], - [this.platform, "string", "string"], - [this.system_version, "string", "string"], - [this.api_id, "number", "int"], - [this.app_name, "string", "string"], - [this.app_version, "string", "string"], - [this.date_created, "number", "int"], - [this.date_active, "number", "int"], - [this.ip, "string", "string"], - [this.country, "string", "string"], - [this.region, "string", "string"], - ]; - } - - constructor(params: { current?: true; official_app?: true; password_pending?: true; encrypted_requests_disabled?: true; call_requests_disabled?: true; unconfirmed?: true; hash: bigint; device_model: string; platform: string; system_version: string; api_id: number; app_name: string; app_version: string; date_created: number; date_active: number; ip: string; country: string; region: string }) { - super(); - this.current = params.current; - this.official_app = params.official_app; - this.password_pending = params.password_pending; - this.encrypted_requests_disabled = params.encrypted_requests_disabled; - this.call_requests_disabled = params.call_requests_disabled; - this.unconfirmed = params.unconfirmed; - this.hash = params.hash; - this.device_model = params.device_model; - this.platform = params.platform; - this.system_version = params.system_version; - this.api_id = params.api_id; - this.app_name = params.app_name; - this.app_version = params.app_version; - this.date_created = params.date_created; - this.date_active = params.date_active; - this.ip = params.ip; - this.country = params.country; - this.region = params.region; - } -} - -/** Logged-in sessions */ -export class account_Authorizations_ extends _account_Authorizations_ { - /** Time-to-live of session */ - authorization_ttl_days: number; - /** Logged-in sessions */ - authorizations: Array; - - protected get [id](): number { - return 0x4BFF8EA0; - } - - static get [name](): string { - return "account.authorizations" - } - - static get [paramDesc](): ParamDesc { - return [ - ["authorization_ttl_days", "number", "int"], - ["authorizations", [_Authorization_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.authorization_ttl_days, "number", "int"], - [this.authorizations, [_Authorization_], "Vector"], - ]; - } - - constructor(params: { authorization_ttl_days: number; authorizations: Array }) { - super(); - this.authorization_ttl_days = params.authorization_ttl_days; - this.authorizations = params.authorizations; - } -} - -/** Configuration for two-factor authorization */ -export class account_Password_ extends _account_Password_ { - /** Whether the user has a recovery method configured */ - has_recovery?: true; - /** Whether telegram [passport](https://core.telegram.org/passport) is enabled */ - has_secure_values?: true; - /** Whether the user has a password */ - has_password?: true; - /** The [KDF algorithm for SRP two-factor authentication](https://core.telegram.org/api/srp) of the current password */ - current_algo?: enums.PasswordKdfAlgo; - /** Srp B param for [SRP authorization](https://core.telegram.org/api/srp) */ - srp_B?: Uint8Array; - /** Srp ID param for [SRP authorization](https://core.telegram.org/api/srp) */ - srp_id?: bigint; - /** Text hint for the password */ - hint?: string; - /** A [password recovery email](https://core.telegram.org/api/srp#email-verification) with the specified [pattern](https://core.telegram.org/api/pattern) is still awaiting verification */ - email_unconfirmed_pattern?: string; - /** The [KDF algorithm for SRP two-factor authentication](https://core.telegram.org/api/srp) to use when creating new passwords */ - new_algo: enums.PasswordKdfAlgo; - /** The KDF algorithm for telegram [passport](https://core.telegram.org/passport) */ - new_secure_algo: enums.SecurePasswordKdfAlgo; - /** Secure random string */ - secure_random: Uint8Array; - /** The 2FA password will be automatically removed at this date, unless the user cancels the operation */ - pending_reset_date?: number; - /** A verified login email with the specified [pattern](https://core.telegram.org/api/pattern) is configured */ - login_email_pattern?: string; - - protected get [id](): number { - return 0x957B50FB; - } - - static get [name](): string { - return "account.password" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_recovery", "true", "flags.0?true"], - ["has_secure_values", "true", "flags.1?true"], - ["has_password", "true", "flags.2?true"], - ["current_algo", _PasswordKdfAlgo_, "flags.2?PasswordKdfAlgo"], - ["srp_B", Uint8Array, "flags.2?bytes"], - ["srp_id", "bigint", "flags.2?long"], - ["hint", "string", "flags.3?string"], - ["email_unconfirmed_pattern", "string", "flags.4?string"], - ["new_algo", _PasswordKdfAlgo_, "PasswordKdfAlgo"], - ["new_secure_algo", _SecurePasswordKdfAlgo_, "SecurePasswordKdfAlgo"], - ["secure_random", Uint8Array, "bytes"], - ["pending_reset_date", "number", "flags.5?int"], - ["login_email_pattern", "string", "flags.6?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_recovery ?? null, "true", "flags.0?true"], - [this.has_secure_values ?? null, "true", "flags.1?true"], - [this.has_password ?? null, "true", "flags.2?true"], - [this.current_algo ?? null, _PasswordKdfAlgo_, "flags.2?PasswordKdfAlgo"], - [this.srp_B ?? null, Uint8Array, "flags.2?bytes"], - [this.srp_id ?? null, "bigint", "flags.2?long"], - [this.hint ?? null, "string", "flags.3?string"], - [this.email_unconfirmed_pattern ?? null, "string", "flags.4?string"], - [this.new_algo, _PasswordKdfAlgo_, "PasswordKdfAlgo"], - [this.new_secure_algo, _SecurePasswordKdfAlgo_, "SecurePasswordKdfAlgo"], - [this.secure_random, Uint8Array, "bytes"], - [this.pending_reset_date ?? null, "number", "flags.5?int"], - [this.login_email_pattern ?? null, "string", "flags.6?string"], - ]; - } - - constructor(params: { has_recovery?: true; has_secure_values?: true; has_password?: true; current_algo?: enums.PasswordKdfAlgo; srp_B?: Uint8Array; srp_id?: bigint; hint?: string; email_unconfirmed_pattern?: string; new_algo: enums.PasswordKdfAlgo; new_secure_algo: enums.SecurePasswordKdfAlgo; secure_random: Uint8Array; pending_reset_date?: number; login_email_pattern?: string }) { - super(); - this.has_recovery = params.has_recovery; - this.has_secure_values = params.has_secure_values; - this.has_password = params.has_password; - this.current_algo = params.current_algo; - this.srp_B = params.srp_B; - this.srp_id = params.srp_id; - this.hint = params.hint; - this.email_unconfirmed_pattern = params.email_unconfirmed_pattern; - this.new_algo = params.new_algo; - this.new_secure_algo = params.new_secure_algo; - this.secure_random = params.secure_random; - this.pending_reset_date = params.pending_reset_date; - this.login_email_pattern = params.login_email_pattern; - } -} - -/** Private info associated to the password info (recovery email, telegram [passport](https://core.telegram.org/passport) info & so on) */ -export class account_PasswordSettings_ extends _account_PasswordSettings_ { - /** [2FA Recovery email](https://core.telegram.org/api/srp#email-verification) */ - email?: string; - /** Telegram [passport](https://core.telegram.org/passport) settings */ - secure_settings?: enums.SecureSecretSettings; - - protected get [id](): number { - return 0x9A5C33E5; - } - - static get [name](): string { - return "account.passwordSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["email", "string", "flags.0?string"], - ["secure_settings", _SecureSecretSettings_, "flags.1?SecureSecretSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.email ?? null, "string", "flags.0?string"], - [this.secure_settings ?? null, _SecureSecretSettings_, "flags.1?SecureSecretSettings"], - ]; - } - - constructor(params?: { email?: string; secure_settings?: enums.SecureSecretSettings }) { - super(); - this.email = params?.email; - this.secure_settings = params?.secure_settings; - } -} - -/** Settings for setting up a new password */ -export class account_PasswordInputSettings_ extends _account_PasswordInputSettings_ { - /** The [SRP algorithm](https://core.telegram.org/api/srp) to use */ - new_algo?: enums.PasswordKdfAlgo; - /** The [computed password hash](https://core.telegram.org/api/srp) */ - new_password_hash?: Uint8Array; - /** Text hint for the password */ - hint?: string; - /** Password recovery email */ - email?: string; - /** Telegram [passport](https://core.telegram.org/passport) settings */ - new_secure_settings?: enums.SecureSecretSettings; - - protected get [id](): number { - return 0xC23727C9; - } - - static get [name](): string { - return "account.passwordInputSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["new_algo", _PasswordKdfAlgo_, "flags.0?PasswordKdfAlgo"], - ["new_password_hash", Uint8Array, "flags.0?bytes"], - ["hint", "string", "flags.0?string"], - ["email", "string", "flags.1?string"], - ["new_secure_settings", _SecureSecretSettings_, "flags.2?SecureSecretSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.new_algo ?? null, _PasswordKdfAlgo_, "flags.0?PasswordKdfAlgo"], - [this.new_password_hash ?? null, Uint8Array, "flags.0?bytes"], - [this.hint ?? null, "string", "flags.0?string"], - [this.email ?? null, "string", "flags.1?string"], - [this.new_secure_settings ?? null, _SecureSecretSettings_, "flags.2?SecureSecretSettings"], - ]; - } - - constructor(params?: { new_algo?: enums.PasswordKdfAlgo; new_password_hash?: Uint8Array; hint?: string; email?: string; new_secure_settings?: enums.SecureSecretSettings }) { - super(); - this.new_algo = params?.new_algo; - this.new_password_hash = params?.new_password_hash; - this.hint = params?.hint; - this.email = params?.email; - this.new_secure_settings = params?.new_secure_settings; - } -} - -/** Recovery info of a [2FA password](https://core.telegram.org/api/srp), only for accounts with a [recovery email configured](https://core.telegram.org/api/srp#email-verification). */ -export class auth_PasswordRecovery_ extends _auth_PasswordRecovery_ { - /** The email to which the recovery code was sent must match this [pattern](https://core.telegram.org/api/pattern). */ - email_pattern: string; - - protected get [id](): number { - return 0x137948A5; - } - - static get [name](): string { - return "auth.passwordRecovery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["email_pattern", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.email_pattern, "string", "string"], - ]; - } - - constructor(params: { email_pattern: string }) { - super(); - this.email_pattern = params.email_pattern; - } -} - -/** Message ID, for which PUSH-notifications were cancelled. */ -export class ReceivedNotifyMessage_ extends _ReceivedNotifyMessage_ { - /** Message ID, for which PUSH-notifications were canceled */ - id: number; - /** Reserved for future use */ - flags: number; - - protected get [id](): number { - return 0xA384B779; - } - - static get [name](): string { - return "receivedNotifyMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ["flags", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - [this.flags, "number", "int"], - ]; - } - - constructor(params: { id: number; flags: number }) { - super(); - this.id = params.id; - this.flags = params.flags; - } -} - -/** Exported chat invite */ -export class ChatInviteExported_ extends _ExportedChatInvite_ { - /** Whether this chat invite was revoked */ - revoked?: true; - /** Whether this chat invite has no expiration */ - permanent?: true; - /** Whether users importing this invite link will have to be approved to join the channel or group */ - request_needed?: true; - /** Chat invitation link */ - link: string; - /** ID of the admin that created this chat invite */ - admin_id: bigint; - /** When was this chat invite created */ - date: number; - /** When was this chat invite last modified */ - start_date?: number; - /** When does this chat invite expire */ - expire_date?: number; - /** Maximum number of users that can join using this link */ - usage_limit?: number; - /** How many users joined using this link */ - usage?: number; - /** Number of users that have already used this link to join */ - requested?: number; - /** Custom description for the invite link, visible only to admins */ - title?: string; - - protected get [id](): number { - return 0x0AB4A819; - } - - static get [name](): string { - return "chatInviteExported" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["revoked", "true", "flags.0?true"], - ["permanent", "true", "flags.5?true"], - ["request_needed", "true", "flags.6?true"], - ["link", "string", "string"], - ["admin_id", "bigint", "long"], - ["date", "number", "int"], - ["start_date", "number", "flags.4?int"], - ["expire_date", "number", "flags.1?int"], - ["usage_limit", "number", "flags.2?int"], - ["usage", "number", "flags.3?int"], - ["requested", "number", "flags.7?int"], - ["title", "string", "flags.8?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.revoked ?? null, "true", "flags.0?true"], - [this.permanent ?? null, "true", "flags.5?true"], - [this.request_needed ?? null, "true", "flags.6?true"], - [this.link, "string", "string"], - [this.admin_id, "bigint", "long"], - [this.date, "number", "int"], - [this.start_date ?? null, "number", "flags.4?int"], - [this.expire_date ?? null, "number", "flags.1?int"], - [this.usage_limit ?? null, "number", "flags.2?int"], - [this.usage ?? null, "number", "flags.3?int"], - [this.requested ?? null, "number", "flags.7?int"], - [this.title ?? null, "string", "flags.8?string"], - ]; - } - - constructor(params: { revoked?: true; permanent?: true; request_needed?: true; link: string; admin_id: bigint; date: number; start_date?: number; expire_date?: number; usage_limit?: number; usage?: number; requested?: number; title?: string }) { - super(); - this.revoked = params.revoked; - this.permanent = params.permanent; - this.request_needed = params.request_needed; - this.link = params.link; - this.admin_id = params.admin_id; - this.date = params.date; - this.start_date = params.start_date; - this.expire_date = params.expire_date; - this.usage_limit = params.usage_limit; - this.usage = params.usage; - this.requested = params.requested; - this.title = params.title; - } -} - -/** Used in updates and in the channel log to indicate when a user is requesting to join or has joined a [discussion group](https://core.telegram.org/api/discussion#requiring-users-to-join-the-group) */ -export class ChatInvitePublicJoinRequests_ extends _ExportedChatInvite_ { - protected get [id](): number { - return 0xED107AB7; - } - - static get [name](): string { - return "chatInvitePublicJoinRequests" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The user has already joined this chat */ -export class ChatInviteAlready_ extends _ChatInvite_ { - /** The chat connected to the invite */ - chat: enums.Chat; - - protected get [id](): number { - return 0x5A686D7C; - } - - static get [name](): string { - return "chatInviteAlready" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat", _Chat_, "Chat"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat, _Chat_, "Chat"], - ]; - } - - constructor(params: { chat: enums.Chat }) { - super(); - this.chat = params.chat; - } -} - -/** Chat invite info */ -export class ChatInvite_ extends _ChatInvite_ { - /** Whether this is a [channel/supergroup](https://core.telegram.org/api/channel) or a [normal group](https://core.telegram.org/api/channel) */ - channel?: true; - /** Whether this is a [channel](https://core.telegram.org/api/channel) */ - broadcast?: true; - /** Whether this is a public [channel/supergroup](https://core.telegram.org/api/channel) */ - public?: true; - /** Whether this is a [supergroup](https://core.telegram.org/api/channel) */ - megagroup?: true; - /** Whether the [join request »](https://core.telegram.org/api/invites#join-requests) must be first approved by an administrator */ - request_needed?: true; - /** Is this chat or channel verified by Telegram? */ - verified?: true; - /** This chat is probably a scam */ - scam?: true; - /** If set, this chat was reported by many users as a fake or scam: be careful when interacting with it. */ - fake?: true; - /** Chat/supergroup/channel title */ - title: string; - /** Description of the group of channel */ - about?: string; - /** Chat/supergroup/channel photo */ - photo: enums.Photo; - /** Participant count */ - participants_count: number; - /** A few of the participants that are in the group */ - participants?: Array; - /** [Profile color palette ID](https://core.telegram.org/api/colors) */ - color: number; - - protected get [id](): number { - return 0xCDE0EC40; - } - - static get [name](): string { - return "chatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel", "true", "flags.0?true"], - ["broadcast", "true", "flags.1?true"], - ["public", "true", "flags.2?true"], - ["megagroup", "true", "flags.3?true"], - ["request_needed", "true", "flags.6?true"], - ["verified", "true", "flags.7?true"], - ["scam", "true", "flags.8?true"], - ["fake", "true", "flags.9?true"], - ["title", "string", "string"], - ["about", "string", "flags.5?string"], - ["photo", _Photo_, "Photo"], - ["participants_count", "number", "int"], - ["participants", [_User_], "flags.4?Vector"], - ["color", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel ?? null, "true", "flags.0?true"], - [this.broadcast ?? null, "true", "flags.1?true"], - [this.public ?? null, "true", "flags.2?true"], - [this.megagroup ?? null, "true", "flags.3?true"], - [this.request_needed ?? null, "true", "flags.6?true"], - [this.verified ?? null, "true", "flags.7?true"], - [this.scam ?? null, "true", "flags.8?true"], - [this.fake ?? null, "true", "flags.9?true"], - [this.title, "string", "string"], - [this.about ?? null, "string", "flags.5?string"], - [this.photo, _Photo_, "Photo"], - [this.participants_count, "number", "int"], - [this.participants ?? null, [_User_], "flags.4?Vector"], - [this.color, "number", "int"], - ]; - } - - constructor(params: { channel?: true; broadcast?: true; public?: true; megagroup?: true; request_needed?: true; verified?: true; scam?: true; fake?: true; title: string; about?: string; photo: enums.Photo; participants_count: number; participants?: Array; color: number }) { - super(); - this.channel = params.channel; - this.broadcast = params.broadcast; - this.public = params.public; - this.megagroup = params.megagroup; - this.request_needed = params.request_needed; - this.verified = params.verified; - this.scam = params.scam; - this.fake = params.fake; - this.title = params.title; - this.about = params.about; - this.photo = params.photo; - this.participants_count = params.participants_count; - this.participants = params.participants; - this.color = params.color; - } -} - -/** A chat invitation that also allows peeking into the group to read messages without joining it. */ -export class ChatInvitePeek_ extends _ChatInvite_ { - /** Chat information */ - chat: enums.Chat; - /** Read-only anonymous access to this group will be revoked at this date */ - expires: number; - - protected get [id](): number { - return 0x61695CB0; - } - - static get [name](): string { - return "chatInvitePeek" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat", _Chat_, "Chat"], - ["expires", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat, _Chat_, "Chat"], - [this.expires, "number", "int"], - ]; - } - - constructor(params: { chat: enums.Chat; expires: number }) { - super(); - this.chat = params.chat; - this.expires = params.expires; - } -} - -/** Empty constructor */ -export class InputStickerSetEmpty_ extends _InputStickerSet_ { - protected get [id](): number { - return 0xFFB62B95; - } - - static get [name](): string { - return "inputStickerSetEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Stickerset by ID */ -export class InputStickerSetID_ extends _InputStickerSet_ { - /** ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0x9DE7A269; - } - - static get [name](): string { - return "inputStickerSetID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Stickerset by short name, from a [stickerset deep link »](https://core.telegram.org/api/links#stickerset-links) */ -export class InputStickerSetShortName_ extends _InputStickerSet_ { - /** Short name from a [stickerset deep link »](https://core.telegram.org/api/links#stickerset-links) */ - short_name: string; - - protected get [id](): number { - return 0x861CC8A0; - } - - static get [name](): string { - return "inputStickerSetShortName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["short_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.short_name, "string", "string"], - ]; - } - - constructor(params: { short_name: string }) { - super(); - this.short_name = params.short_name; - } -} - -/** Animated emojis stickerset */ -export class InputStickerSetAnimatedEmoji_ extends _InputStickerSet_ { - protected get [id](): number { - return 0x028703C8; - } - - static get [name](): string { - return "inputStickerSetAnimatedEmoji" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Used for fetching [animated dice stickers](https://core.telegram.org/api/dice) */ -export class InputStickerSetDice_ extends _InputStickerSet_ { - /** The emoji, for now ![🏀](//telegram.org/img/emoji/40/F09F8F80.png), ![🎲](//telegram.org/img/emoji/40/F09F8EB2.png) and ![🎯](//telegram.org/img/emoji/40/F09F8EAF.png) are supported */ - emoticon: string; - - protected get [id](): number { - return 0xE67F520E; - } - - static get [name](): string { - return "inputStickerSetDice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { emoticon: string }) { - super(); - this.emoticon = params.emoticon; - } -} - -/** Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji) */ -export class InputStickerSetAnimatedEmojiAnimations_ extends _InputStickerSet_ { - protected get [id](): number { - return 0x0CDE3739; - } - - static get [name](): string { - return "inputStickerSetAnimatedEmojiAnimations" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Stickers to show when receiving a gifted Telegram Premium subscription */ -export class InputStickerSetPremiumGifts_ extends _InputStickerSet_ { - protected get [id](): number { - return 0xC88B3B02; - } - - static get [name](): string { - return "inputStickerSetPremiumGifts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Generic animation stickerset containing animations to play when [reacting to messages using a normal emoji without a custom animation](https://core.telegram.org/api/reactions) */ -export class InputStickerSetEmojiGenericAnimations_ extends _InputStickerSet_ { - protected get [id](): number { - return 0x04C4D4CE; - } - - static get [name](): string { - return "inputStickerSetEmojiGenericAnimations" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Default [custom emoji status](https://core.telegram.org/api/emoji-status) stickerset */ -export class InputStickerSetEmojiDefaultStatuses_ extends _InputStickerSet_ { - protected get [id](): number { - return 0x29D0F5EE; - } - - static get [name](): string { - return "inputStickerSetEmojiDefaultStatuses" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Default [custom emoji](https://core.telegram.org/api/custom-emoji) stickerset for [forum topic icons](https://core.telegram.org/api/forum#forum-topics) */ -export class InputStickerSetEmojiDefaultTopicIcons_ extends _InputStickerSet_ { - protected get [id](): number { - return 0x44C1F8E9; - } - - static get [name](): string { - return "inputStickerSetEmojiDefaultTopicIcons" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Default [custom emoji status](https://core.telegram.org/api/emoji-status) stickerset for channel statuses */ -export class InputStickerSetEmojiChannelDefaultStatuses_ extends _InputStickerSet_ { - protected get [id](): number { - return 0x49748553; - } - - static get [name](): string { - return "inputStickerSetEmojiChannelDefaultStatuses" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a stickerset (stickerpack) */ -export class StickerSet_ extends _StickerSet_ { - /** Whether this stickerset was archived (due to too many saved stickers in the current account) */ - archived?: true; - /** Is this stickerset official */ - official?: true; - /** Is this a mask stickerset */ - masks?: true; - /** This is a custom emoji stickerset */ - emojis?: true; - /** Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. */ - text_color?: true; - /** If set, this custom emoji stickerset can be used in [channel emoji statuses](https://core.telegram.org/api/emoji-status). */ - channel_emoji_status?: true; - creator?: true; - /** When was this stickerset installed */ - installed_date?: number; - /** ID of the stickerset */ - id: bigint; - /** Access hash of stickerset */ - access_hash: bigint; - /** Title of stickerset */ - title: string; - /** Short name of stickerset, used when sharing stickerset using [stickerset deep links](https://core.telegram.org/api/links#stickerset-links). */ - short_name: string; - /** Stickerset thumbnail */ - thumbs?: Array; - /** DC ID of thumbnail */ - thumb_dc_id?: number; - /** Thumbnail version */ - thumb_version?: number; - /** Document ID of custom emoji thumbnail, fetch the document using [messages.getCustomEmojiDocuments](https://core.telegram.org/method/messages.getCustomEmojiDocuments) */ - thumb_document_id?: bigint; - /** Number of stickers in pack */ - count: number; - /** Hash */ - hash: number; - - protected get [id](): number { - return 0x2DD14EDC; - } - - static get [name](): string { - return "stickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["archived", "true", "flags.1?true"], - ["official", "true", "flags.2?true"], - ["masks", "true", "flags.3?true"], - ["emojis", "true", "flags.7?true"], - ["text_color", "true", "flags.9?true"], - ["channel_emoji_status", "true", "flags.10?true"], - ["creator", "true", "flags.11?true"], - ["installed_date", "number", "flags.0?int"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["title", "string", "string"], - ["short_name", "string", "string"], - ["thumbs", [_PhotoSize_], "flags.4?Vector"], - ["thumb_dc_id", "number", "flags.4?int"], - ["thumb_version", "number", "flags.4?int"], - ["thumb_document_id", "bigint", "flags.8?long"], - ["count", "number", "int"], - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.archived ?? null, "true", "flags.1?true"], - [this.official ?? null, "true", "flags.2?true"], - [this.masks ?? null, "true", "flags.3?true"], - [this.emojis ?? null, "true", "flags.7?true"], - [this.text_color ?? null, "true", "flags.9?true"], - [this.channel_emoji_status ?? null, "true", "flags.10?true"], - [this.creator ?? null, "true", "flags.11?true"], - [this.installed_date ?? null, "number", "flags.0?int"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.title, "string", "string"], - [this.short_name, "string", "string"], - [this.thumbs ?? null, [_PhotoSize_], "flags.4?Vector"], - [this.thumb_dc_id ?? null, "number", "flags.4?int"], - [this.thumb_version ?? null, "number", "flags.4?int"], - [this.thumb_document_id ?? null, "bigint", "flags.8?long"], - [this.count, "number", "int"], - [this.hash, "number", "int"], - ]; - } - - constructor(params: { archived?: true; official?: true; masks?: true; emojis?: true; text_color?: true; channel_emoji_status?: true; creator?: true; installed_date?: number; id: bigint; access_hash: bigint; title: string; short_name: string; thumbs?: Array; thumb_dc_id?: number; thumb_version?: number; thumb_document_id?: bigint; count: number; hash: number }) { - super(); - this.archived = params.archived; - this.official = params.official; - this.masks = params.masks; - this.emojis = params.emojis; - this.text_color = params.text_color; - this.channel_emoji_status = params.channel_emoji_status; - this.creator = params.creator; - this.installed_date = params.installed_date; - this.id = params.id; - this.access_hash = params.access_hash; - this.title = params.title; - this.short_name = params.short_name; - this.thumbs = params.thumbs; - this.thumb_dc_id = params.thumb_dc_id; - this.thumb_version = params.thumb_version; - this.thumb_document_id = params.thumb_document_id; - this.count = params.count; - this.hash = params.hash; - } -} - -/** Stickerset and stickers inside it */ -export class messages_StickerSet_ extends _messages_StickerSet_ { - /** The stickerset */ - set: enums.StickerSet; - /** Emoji info for stickers */ - packs: Array; - /** Keywords for some or every sticker in the stickerset. */ - keywords: Array; - /** Stickers in stickerset */ - documents: Array; - - protected get [id](): number { - return 0x6E153F16; - } - - static get [name](): string { - return "messages.stickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["set", _StickerSet_, "StickerSet"], - ["packs", [_StickerPack_], "Vector"], - ["keywords", [_StickerKeyword_], "Vector"], - ["documents", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.set, _StickerSet_, "StickerSet"], - [this.packs, [_StickerPack_], "Vector"], - [this.keywords, [_StickerKeyword_], "Vector"], - [this.documents, [_Document_], "Vector"], - ]; - } - - constructor(params: { set: enums.StickerSet; packs: Array; keywords: Array; documents: Array }) { - super(); - this.set = params.set; - this.packs = params.packs; - this.keywords = params.keywords; - this.documents = params.documents; - } -} - -/** The stickerset hasn't changed */ -export class messages_StickerSetNotModified_ extends _messages_StickerSet_ { - protected get [id](): number { - return 0xD3F924EB; - } - - static get [name](): string { - return "messages.stickerSetNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Describes a bot command that can be used in a chat */ -export class BotCommand_ extends _BotCommand_ { - /** `/command` name */ - command: string; - /** Description of the command */ - description: string; - - protected get [id](): number { - return 0xC27AC8C7; - } - - static get [name](): string { - return "botCommand" - } - - static get [paramDesc](): ParamDesc { - return [ - ["command", "string", "string"], - ["description", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.command, "string", "string"], - [this.description, "string", "string"], - ]; - } - - constructor(params: { command: string; description: string }) { - super(); - this.command = params.command; - this.description = params.description; - } -} - -/** Info about bots (available bot commands, etc) */ -export class BotInfo_ extends _BotInfo_ { - /** ID of the bot */ - user_id?: bigint; - /** Description of the bot */ - description?: string; - /** Description photo */ - description_photo?: enums.Photo; - /** Description animation in MPEG4 format */ - description_document?: enums.Document; - /** Bot commands that can be used in the chat */ - commands?: Array; - /** Indicates the action to execute when pressing the in-UI menu button for bots */ - menu_button?: enums.BotMenuButton; - - protected get [id](): number { - return 0x8F300B57; - } - - static get [name](): string { - return "botInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["user_id", "bigint", "flags.0?long"], - ["description", "string", "flags.1?string"], - ["description_photo", _Photo_, "flags.4?Photo"], - ["description_document", _Document_, "flags.5?Document"], - ["commands", [_BotCommand_], "flags.2?Vector"], - ["menu_button", _BotMenuButton_, "flags.3?BotMenuButton"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.user_id ?? null, "bigint", "flags.0?long"], - [this.description ?? null, "string", "flags.1?string"], - [this.description_photo ?? null, _Photo_, "flags.4?Photo"], - [this.description_document ?? null, _Document_, "flags.5?Document"], - [this.commands ?? null, [_BotCommand_], "flags.2?Vector"], - [this.menu_button ?? null, _BotMenuButton_, "flags.3?BotMenuButton"], - ]; - } - - constructor(params?: { user_id?: bigint; description?: string; description_photo?: enums.Photo; description_document?: enums.Document; commands?: Array; menu_button?: enums.BotMenuButton }) { - super(); - this.user_id = params?.user_id; - this.description = params?.description; - this.description_photo = params?.description_photo; - this.description_document = params?.description_document; - this.commands = params?.commands; - this.menu_button = params?.menu_button; - } -} - -/** Bot keyboard button */ -export class KeyboardButton_ extends _KeyboardButton_ { - /** Button text */ - text: string; - - protected get [id](): number { - return 0xA2FA4880; - } - - static get [name](): string { - return "keyboardButton" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** URL button */ -export class KeyboardButtonUrl_ extends _KeyboardButton_ { - /** Button label */ - text: string; - /** URL */ - url: string; - - protected get [id](): number { - return 0x258AFF05; - } - - static get [name](): string { - return "keyboardButtonUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { text: string; url: string }) { - super(); - this.text = params.text; - this.url = params.url; - } -} - -/** Callback button */ -export class KeyboardButtonCallback_ extends _KeyboardButton_ { - /** Whether the user should verify his identity by entering his [2FA SRP parameters](https://core.telegram.org/api/srp) to the [messages.getBotCallbackAnswer](https://core.telegram.org/method/messages.getBotCallbackAnswer) method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to [SRP](https://core.telegram.org/api/srp). This button is mainly used by the official [@botfather](https://t.me/botfather) bot, for verifying the user's identity before transferring ownership of a bot to another user. */ - requires_password?: true; - /** Button text */ - text: string; - /** Callback data */ - data: Uint8Array; - - protected get [id](): number { - return 0x35BBDB6B; - } - - static get [name](): string { - return "keyboardButtonCallback" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["requires_password", "true", "flags.0?true"], - ["text", "string", "string"], - ["data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.requires_password ?? null, "true", "flags.0?true"], - [this.text, "string", "string"], - [this.data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { requires_password?: true; text: string; data: Uint8Array }) { - super(); - this.requires_password = params.requires_password; - this.text = params.text; - this.data = params.data; - } -} - -/** Button to request a user's phone number */ -export class KeyboardButtonRequestPhone_ extends _KeyboardButton_ { - /** Button text */ - text: string; - - protected get [id](): number { - return 0xB16A6C29; - } - - static get [name](): string { - return "keyboardButtonRequestPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** Button to request a user's geolocation */ -export class KeyboardButtonRequestGeoLocation_ extends _KeyboardButton_ { - /** Button text */ - text: string; - - protected get [id](): number { - return 0xFC796B3F; - } - - static get [name](): string { - return "keyboardButtonRequestGeoLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. */ -export class KeyboardButtonSwitchInline_ extends _KeyboardButton_ { - /** If set, pressing the button will insert the bot's username and the specified inline `query` in the current chat's input field. */ - same_peer?: true; - /** Button label */ - text: string; - /** The inline query to use */ - query: string; - /** Filter to use when selecting chats. */ - peer_types?: Array; - - protected get [id](): number { - return 0x93B9FBB5; - } - - static get [name](): string { - return "keyboardButtonSwitchInline" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["same_peer", "true", "flags.0?true"], - ["text", "string", "string"], - ["query", "string", "string"], - ["peer_types", [_InlineQueryPeerType_], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.same_peer ?? null, "true", "flags.0?true"], - [this.text, "string", "string"], - [this.query, "string", "string"], - [this.peer_types ?? null, [_InlineQueryPeerType_], "flags.1?Vector"], - ]; - } - - constructor(params: { same_peer?: true; text: string; query: string; peer_types?: Array }) { - super(); - this.same_peer = params.same_peer; - this.text = params.text; - this.query = params.query; - this.peer_types = params.peer_types; - } -} - -/** Button to start a game */ -export class KeyboardButtonGame_ extends _KeyboardButton_ { - /** Button text */ - text: string; - - protected get [id](): number { - return 0x50F41CCF; - } - - static get [name](): string { - return "keyboardButtonGame" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** Button to buy a product */ -export class KeyboardButtonBuy_ extends _KeyboardButton_ { - /** Button text */ - text: string; - - protected get [id](): number { - return 0xAFD93FBB; - } - - static get [name](): string { - return "keyboardButtonBuy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** Button to request a user to authorize via URL using [Seamless Telegram Login](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots). When the user clicks on such a button, [messages.requestUrlAuth](https://core.telegram.org/method/messages.requestUrlAuth) should be called, providing the `button_id` and the ID of the container message. The returned [urlAuthResultRequest](https://core.telegram.org/constructor/urlAuthResultRequest) object will contain more details about the authorization request (`request_write_access` if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call [messages.acceptUrlAuth](https://core.telegram.org/method/messages.acceptUrlAuth) to get a [urlAuthResultAccepted](https://core.telegram.org/constructor/urlAuthResultAccepted) with the URL to open instead of the `url` of this constructor, or a [urlAuthResultDefault](https://core.telegram.org/constructor/urlAuthResultDefault), in which case the `url` of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the `url` of this constructor must be used. */ -export class KeyboardButtonUrlAuth_ extends _KeyboardButton_ { - /** Button label */ - text: string; - /** New text of the button in forwarded messages. */ - fwd_text?: string; - /** An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in [Receiving authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data). - - **NOTE**: Services must **always** check the hash of the received data to verify the authentication and the integrity of the data as described in [Checking authorization](https://core.telegram.org/widgets/login#checking-authorization). */ - url: string; - /** ID of the button to pass to [messages.requestUrlAuth](https://core.telegram.org/method/messages.requestUrlAuth) */ - button_id: number; - - protected get [id](): number { - return 0x10B78D29; - } - - static get [name](): string { - return "keyboardButtonUrlAuth" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["text", "string", "string"], - ["fwd_text", "string", "flags.0?string"], - ["url", "string", "string"], - ["button_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.text, "string", "string"], - [this.fwd_text ?? null, "string", "flags.0?string"], - [this.url, "string", "string"], - [this.button_id, "number", "int"], - ]; - } - - constructor(params: { text: string; fwd_text?: string; url: string; button_id: number }) { - super(); - this.text = params.text; - this.fwd_text = params.fwd_text; - this.url = params.url; - this.button_id = params.button_id; - } -} - -/** Button to request a user to [authorize](https://core.telegram.org/method/messages.acceptUrlAuth) via URL using [Seamless Telegram Login](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots). */ -export class InputKeyboardButtonUrlAuth_ extends _KeyboardButton_ { - /** Set this flag to request the permission for your bot to send messages to the user. */ - request_write_access?: true; - /** Button text */ - text: string; - /** New text of the button in forwarded messages. */ - fwd_text?: string; - /** An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in [Receiving authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data). - NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in [Checking authorization](https://core.telegram.org/widgets/login#checking-authorization). */ - url: string; - /** Username of a bot, which will be used for user authorization. See [Setting up a bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details. */ - bot: enums.InputUser; - - protected get [id](): number { - return 0xD02E7FD4; - } - - static get [name](): string { - return "inputKeyboardButtonUrlAuth" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["request_write_access", "true", "flags.0?true"], - ["text", "string", "string"], - ["fwd_text", "string", "flags.1?string"], - ["url", "string", "string"], - ["bot", _InputUser_, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.request_write_access ?? null, "true", "flags.0?true"], - [this.text, "string", "string"], - [this.fwd_text ?? null, "string", "flags.1?string"], - [this.url, "string", "string"], - [this.bot, _InputUser_, "InputUser"], - ]; - } - - constructor(params: { request_write_access?: true; text: string; fwd_text?: string; url: string; bot: enums.InputUser }) { - super(); - this.request_write_access = params.request_write_access; - this.text = params.text; - this.fwd_text = params.fwd_text; - this.url = params.url; - this.bot = params.bot; - } -} - -/** A button that allows the user to create and send a poll when pressed; available only in private */ -export class KeyboardButtonRequestPoll_ extends _KeyboardButton_ { - /** If set, only quiz polls can be sent */ - quiz?: boolean; - /** Button text */ - text: string; - - protected get [id](): number { - return 0xBBC7515D; - } - - static get [name](): string { - return "keyboardButtonRequestPoll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["quiz", "boolean", "flags.0?Bool"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.quiz ?? null, "boolean", "flags.0?Bool"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { quiz?: boolean; text: string }) { - super(); - this.quiz = params.quiz; - this.text = params.text; - } -} - -/** Button that links directly to a user profile */ -export class InputKeyboardButtonUserProfile_ extends _KeyboardButton_ { - /** Button text */ - text: string; - /** User ID */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0xE988037B; - } - - static get [name](): string { - return "inputKeyboardButtonUserProfile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["user_id", _InputUser_, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.user_id, _InputUser_, "InputUser"], - ]; - } - - constructor(params: { text: string; user_id: enums.InputUser }) { - super(); - this.text = params.text; - this.user_id = params.user_id; - } -} - -/** Button that links directly to a user profile */ -export class KeyboardButtonUserProfile_ extends _KeyboardButton_ { - /** Button text */ - text: string; - /** User ID */ - user_id: bigint; - - protected get [id](): number { - return 0x308660C1; - } - - static get [name](): string { - return "keyboardButtonUserProfile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { text: string; user_id: bigint }) { - super(); - this.text = params.text; - this.user_id = params.user_id; - } -} - -/** Button to open a [bot mini app](https://core.telegram.org/api/bots/webapps) using [messages.requestWebView](https://core.telegram.org/method/messages.requestWebView), sending over user information after user confirmation. */ -export class KeyboardButtonWebView_ extends _KeyboardButton_ { - /** Button text */ - text: string; - /** [Web app url](https://core.telegram.org/api/bots/webapps) */ - url: string; - - protected get [id](): number { - return 0x13767230; - } - - static get [name](): string { - return "keyboardButtonWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { text: string; url: string }) { - super(); - this.text = params.text; - this.url = params.url; - } -} - -/** Button to open a [bot mini app](https://core.telegram.org/api/bots/webapps) using [messages.requestSimpleWebView](https://core.telegram.org/method/messages.requestSimpleWebView), without sending user information to the web app. */ -export class KeyboardButtonSimpleWebView_ extends _KeyboardButton_ { - /** Button text */ - text: string; - /** [Web app URL](https://core.telegram.org/api/bots/webapps) */ - url: string; - - protected get [id](): number { - return 0xA0C0505C; - } - - static get [name](): string { - return "keyboardButtonSimpleWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { text: string; url: string }) { - super(); - this.text = params.text; - this.url = params.url; - } -} - -/** Prompts the user to select and share one or more peers with the bot using [messages.sendBotRequestedPeer](https://core.telegram.org/method/messages.sendBotRequestedPeer) */ -export class KeyboardButtonRequestPeer_ extends _KeyboardButton_ { - /** Button text */ - text: string; - /** Button ID, to be passed to [messages.sendBotRequestedPeer](https://core.telegram.org/method/messages.sendBotRequestedPeer). */ - button_id: number; - /** Filtering criteria to use for the peer selection list shown to the user. - The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to `max_quantity`) peers of the specified type, if needed. */ - peer_type: enums.RequestPeerType; - /** Maximum number of peers that can be chosne. */ - max_quantity: number; - - protected get [id](): number { - return 0x53D7BFD8; - } - - static get [name](): string { - return "keyboardButtonRequestPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["button_id", "number", "int"], - ["peer_type", _RequestPeerType_, "RequestPeerType"], - ["max_quantity", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.button_id, "number", "int"], - [this.peer_type, _RequestPeerType_, "RequestPeerType"], - [this.max_quantity, "number", "int"], - ]; - } - - constructor(params: { text: string; button_id: number; peer_type: enums.RequestPeerType; max_quantity: number }) { - super(); - this.text = params.text; - this.button_id = params.button_id; - this.peer_type = params.peer_type; - this.max_quantity = params.max_quantity; - } -} - -export class InputKeyboardButtonRequestPeer_ extends _KeyboardButton_ { - name_requested?: true; - username_requested?: true; - photo_requested?: true; - text: string; - button_id: number; - peer_type: enums.RequestPeerType; - max_quantity: number; - - protected get [id](): number { - return 0xC9662D05; - } - - static get [name](): string { - return "inputKeyboardButtonRequestPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["name_requested", "true", "flags.0?true"], - ["username_requested", "true", "flags.1?true"], - ["photo_requested", "true", "flags.2?true"], - ["text", "string", "string"], - ["button_id", "number", "int"], - ["peer_type", _RequestPeerType_, "RequestPeerType"], - ["max_quantity", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.name_requested ?? null, "true", "flags.0?true"], - [this.username_requested ?? null, "true", "flags.1?true"], - [this.photo_requested ?? null, "true", "flags.2?true"], - [this.text, "string", "string"], - [this.button_id, "number", "int"], - [this.peer_type, _RequestPeerType_, "RequestPeerType"], - [this.max_quantity, "number", "int"], - ]; - } - - constructor(params: { name_requested?: true; username_requested?: true; photo_requested?: true; text: string; button_id: number; peer_type: enums.RequestPeerType; max_quantity: number }) { - super(); - this.name_requested = params.name_requested; - this.username_requested = params.username_requested; - this.photo_requested = params.photo_requested; - this.text = params.text; - this.button_id = params.button_id; - this.peer_type = params.peer_type; - this.max_quantity = params.max_quantity; - } -} - -/** Inline keyboard row */ -export class KeyboardButtonRow_ extends _KeyboardButtonRow_ { - /** Bot or inline keyboard buttons */ - buttons: Array; - - protected get [id](): number { - return 0x77608B83; - } - - static get [name](): string { - return "keyboardButtonRow" - } - - static get [paramDesc](): ParamDesc { - return [ - ["buttons", [_KeyboardButton_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.buttons, [_KeyboardButton_], "Vector"], - ]; - } - - constructor(params: { buttons: Array }) { - super(); - this.buttons = params.buttons; - } -} - -/** Hide sent bot keyboard */ -export class ReplyKeyboardHide_ extends _ReplyMarkup_ { - /** Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply\_to\_message\_id), sender of the original message. - - Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet */ - selective?: true; - - protected get [id](): number { - return 0xA03E5B85; - } - - static get [name](): string { - return "replyKeyboardHide" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["selective", "true", "flags.2?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.selective ?? null, "true", "flags.2?true"], - ]; - } - - constructor(params?: { selective?: true }) { - super(); - this.selective = params?.selective; - } -} - -/** Force the user to send a reply */ -export class ReplyKeyboardForceReply_ extends _ReplyMarkup_ { - /** Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. */ - single_use?: true; - /** Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply\_to\_message\_id), sender of the original message. - Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. */ - selective?: true; - /** The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. */ - placeholder?: string; - - protected get [id](): number { - return 0x86B40B08; - } - - static get [name](): string { - return "replyKeyboardForceReply" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["single_use", "true", "flags.1?true"], - ["selective", "true", "flags.2?true"], - ["placeholder", "string", "flags.3?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.single_use ?? null, "true", "flags.1?true"], - [this.selective ?? null, "true", "flags.2?true"], - [this.placeholder ?? null, "string", "flags.3?string"], - ]; - } - - constructor(params?: { single_use?: true; selective?: true; placeholder?: string }) { - super(); - this.single_use = params?.single_use; - this.selective = params?.selective; - this.placeholder = params?.placeholder; - } -} - -/** Bot keyboard */ -export class ReplyKeyboardMarkup_ extends _ReplyMarkup_ { - /** Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard. */ - resize?: true; - /** Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. */ - single_use?: true; - /** Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply\_to\_message\_id), sender of the original message. - - Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. */ - selective?: true; - /** Requests clients to always show the keyboard when the regular keyboard is hidden. */ - persistent?: true; - /** Button row */ - rows: Array; - /** The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. */ - placeholder?: string; - - protected get [id](): number { - return 0x85DD99D1; - } - - static get [name](): string { - return "replyKeyboardMarkup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["resize", "true", "flags.0?true"], - ["single_use", "true", "flags.1?true"], - ["selective", "true", "flags.2?true"], - ["persistent", "true", "flags.4?true"], - ["rows", [_KeyboardButtonRow_], "Vector"], - ["placeholder", "string", "flags.3?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.resize ?? null, "true", "flags.0?true"], - [this.single_use ?? null, "true", "flags.1?true"], - [this.selective ?? null, "true", "flags.2?true"], - [this.persistent ?? null, "true", "flags.4?true"], - [this.rows, [_KeyboardButtonRow_], "Vector"], - [this.placeholder ?? null, "string", "flags.3?string"], - ]; - } - - constructor(params: { resize?: true; single_use?: true; selective?: true; persistent?: true; rows: Array; placeholder?: string }) { - super(); - this.resize = params.resize; - this.single_use = params.single_use; - this.selective = params.selective; - this.persistent = params.persistent; - this.rows = params.rows; - this.placeholder = params.placeholder; - } -} - -/** Bot or inline keyboard */ -export class ReplyInlineMarkup_ extends _ReplyMarkup_ { - /** Bot or inline keyboard rows */ - rows: Array; - - protected get [id](): number { - return 0x48A30254; - } - - static get [name](): string { - return "replyInlineMarkup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["rows", [_KeyboardButtonRow_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.rows, [_KeyboardButtonRow_], "Vector"], - ]; - } - - constructor(params: { rows: Array }) { - super(); - this.rows = params.rows; - } -} - -/** Unknown message entity */ -export class MessageEntityUnknown_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0xBB92BA95; - } - - static get [name](): string { - return "messageEntityUnknown" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity [mentioning](https://core.telegram.org/api/mentions) a user by `@username`; [messageEntityMentionName](https://core.telegram.org/constructor/messageEntityMentionName) can also be used to mention users by their ID. */ -export class MessageEntityMention_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0xFA04579D; - } - - static get [name](): string { - return "messageEntityMention" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** **#hashtag** message entity */ -export class MessageEntityHashtag_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x6F635B0D; - } - - static get [name](): string { - return "messageEntityHashtag" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing a bot /command */ -export class MessageEntityBotCommand_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x6CEF8AC7; - } - - static get [name](): string { - return "messageEntityBotCommand" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing an in-text url: [https://google.com](https://google.com); for [text urls](https://google.com), use [messageEntityTextUrl](https://core.telegram.org/constructor/messageEntityTextUrl). */ -export class MessageEntityUrl_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x6ED02538; - } - - static get [name](): string { - return "messageEntityUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing an [email@example.com](mailto:email@example.com). */ -export class MessageEntityEmail_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x64E475C2; - } - - static get [name](): string { - return "messageEntityEmail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing **bold text**. */ -export class MessageEntityBold_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0xBD610BC9; - } - - static get [name](): string { - return "messageEntityBold" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing _italic text_. */ -export class MessageEntityItalic_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x826F8B60; - } - - static get [name](): string { - return "messageEntityItalic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing a `codeblock`. */ -export class MessageEntityCode_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x28A20571; - } - - static get [name](): string { - return "messageEntityCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing a preformatted `codeblock`, allowing the user to specify a programming language for the codeblock. */ -export class MessageEntityPre_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - /** Programming language of the code */ - language: string; - - protected get [id](): number { - return 0x73924BE0; - } - - static get [name](): string { - return "messageEntityPre" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ["language", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - [this.language, "string", "string"], - ]; - } - - constructor(params: { offset: number; length: number; language: string }) { - super(); - this.offset = params.offset; - this.length = params.length; - this.language = params.language; - } -} - -/** Message entity representing a [text url](https://google.com): for in-text urls like [https://google.com](https://google.com) use [messageEntityUrl](https://core.telegram.org/constructor/messageEntityUrl). */ -export class MessageEntityTextUrl_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - /** The actual URL */ - url: string; - - protected get [id](): number { - return 0x76A6D327; - } - - static get [name](): string { - return "messageEntityTextUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { offset: number; length: number; url: string }) { - super(); - this.offset = params.offset; - this.length = params.length; - this.url = params.url; - } -} - -/** Message entity representing a [user mention](https://core.telegram.org/api/mentions): for _creating_ a mention use [inputMessageEntityMentionName](https://core.telegram.org/constructor/inputMessageEntityMentionName). */ -export class MessageEntityMentionName_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - /** Identifier of the user that was mentioned */ - user_id: bigint; - - protected get [id](): number { - return 0xDC7B1140; - } - - static get [name](): string { - return "messageEntityMentionName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { offset: number; length: number; user_id: bigint }) { - super(); - this.offset = params.offset; - this.length = params.length; - this.user_id = params.user_id; - } -} - -/** Message entity that can be used to create a user [user mention](https://core.telegram.org/api/mentions): received mentions use the [messageEntityMentionName](https://core.telegram.org/constructor/messageEntityMentionName) constructor, instead. */ -export class InputMessageEntityMentionName_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - /** Identifier of the user that was mentioned */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x208E68C9; - } - - static get [name](): string { - return "inputMessageEntityMentionName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ["user_id", _InputUser_, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - [this.user_id, _InputUser_, "InputUser"], - ]; - } - - constructor(params: { offset: number; length: number; user_id: enums.InputUser }) { - super(); - this.offset = params.offset; - this.length = params.length; - this.user_id = params.user_id; - } -} - -/** Message entity representing a phone number. */ -export class MessageEntityPhone_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x9B69E34B; - } - - static get [name](): string { - return "messageEntityPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing a **$cashtag**. */ -export class MessageEntityCashtag_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x4C4E743F; - } - - static get [name](): string { - return "messageEntityCashtag" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing underlined text. */ -export class MessageEntityUnderline_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x9C4E7E8B; - } - - static get [name](): string { - return "messageEntityUnderline" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing strikethrough text. */ -export class MessageEntityStrike_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0xBF0693D4; - } - - static get [name](): string { - return "messageEntityStrike" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Indicates a credit card number */ -export class MessageEntityBankCard_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x761E6AF4; - } - - static get [name](): string { - return "messageEntityBankCard" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Message entity representing a spoiler */ -export class MessageEntitySpoiler_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x32CA960F; - } - - static get [name](): string { - return "messageEntitySpoiler" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Represents a custom emoji. -Note that this entity must wrap exactly one regular emoji (the one contained in [documentAttributeCustomEmoji](https://core.telegram.org/constructor/documentAttributeCustomEmoji).`alt`) in the related text, otherwise the server will ignore it. */ -export class MessageEntityCustomEmoji_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - /** Document ID of the [custom emoji](https://core.telegram.org/api/custom-emoji), use [messages.getCustomEmojiDocuments](https://core.telegram.org/method/messages.getCustomEmojiDocuments) to fetch the emoji animation and the actual emoji it represents. */ - document_id: bigint; - - protected get [id](): number { - return 0xC8CF05F8; - } - - static get [name](): string { - return "messageEntityCustomEmoji" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ["document_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - [this.document_id, "bigint", "long"], - ]; - } - - constructor(params: { offset: number; length: number; document_id: bigint }) { - super(); - this.offset = params.offset; - this.length = params.length; - this.document_id = params.document_id; - } -} - -/** Message entity representing a block quote. */ -export class MessageEntityBlockquote_ extends _MessageEntity_ { - /** Offset of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - offset: number; - /** Length of message entity within message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)) */ - length: number; - - protected get [id](): number { - return 0x020DF5D0; - } - - static get [name](): string { - return "messageEntityBlockquote" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { offset: number; length: number }) { - super(); - this.offset = params.offset; - this.length = params.length; - } -} - -/** Represents the absence of a channel */ -export class InputChannelEmpty_ extends _InputChannel_ { - protected get [id](): number { - return 0xEE8C1E86; - } - - static get [name](): string { - return "inputChannelEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a channel */ -export class InputChannel_ extends _InputChannel_ { - /** Channel ID */ - channel_id: bigint; - /** Access hash taken from the [channel](https://core.telegram.org/constructor/channel) constructor */ - access_hash: bigint; - - protected get [id](): number { - return 0xF35AEC28; - } - - static get [name](): string { - return "inputChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel_id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel_id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { channel_id: bigint; access_hash: bigint }) { - super(); - this.channel_id = params.channel_id; - this.access_hash = params.access_hash; - } -} - -/** Defines a [min](https://core.telegram.org/api/min) channel that was seen in a certain message of a certain chat. */ -export class InputChannelFromMessage_ extends _InputChannel_ { - /** The chat where the channel was seen */ - peer: enums.InputPeer; - /** The message ID in the chat where the channel was seen */ - msg_id: number; - /** The channel ID */ - channel_id: bigint; - - protected get [id](): number { - return 0x5B934F9D; - } - - static get [name](): string { - return "inputChannelFromMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["msg_id", "number", "int"], - ["channel_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.msg_id, "number", "int"], - [this.channel_id, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; channel_id: bigint }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.channel_id = params.channel_id; - } -} - -/** Resolved peer */ -export class contacts_ResolvedPeer_ extends _contacts_ResolvedPeer_ { - /** The peer */ - peer: enums.Peer; - /** Chats */ - chats: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0x7F077AD9; - } - - static get [name](): string { - return "contacts.resolvedPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { peer: enums.Peer; chats: Array; users: Array }) { - super(); - this.peer = params.peer; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Indicates a range of chat messages */ -export class MessageRange_ extends _MessageRange_ { - /** Start of range (message ID) */ - min_id: number; - /** End of range (message ID) */ - max_id: number; - - protected get [id](): number { - return 0x0AE30253; - } - - static get [name](): string { - return "messageRange" - } - - static get [paramDesc](): ParamDesc { - return [ - ["min_id", "number", "int"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.min_id, "number", "int"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { min_id: number; max_id: number }) { - super(); - this.min_id = params.min_id; - this.max_id = params.max_id; - } -} - -/** There are no new updates */ -export class updates_ChannelDifferenceEmpty_ extends _updates_ChannelDifference_ { - /** Whether there are more updates that must be fetched (always false) */ - final?: true; - /** The latest [PTS](https://core.telegram.org/api/updates) */ - pts: number; - /** Clients are supposed to refetch the channel difference after timeout seconds have elapsed */ - timeout?: number; - - protected get [id](): number { - return 0x3E11AFFB; - } - - static get [name](): string { - return "updates.channelDifferenceEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["final", "true", "flags.0?true"], - ["pts", "number", "int"], - ["timeout", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.final ?? null, "true", "flags.0?true"], - [this.pts, "number", "int"], - [this.timeout ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { final?: true; pts: number; timeout?: number }) { - super(); - this.final = params.final; - this.pts = params.pts; - this.timeout = params.timeout; - } -} - -/** The provided `pts + limit < remote pts`. Simply, there are too many updates to be fetched (more than `limit`), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages): */ -export class updates_ChannelDifferenceTooLong_ extends _updates_ChannelDifference_ { - /** Whether there are more updates that must be fetched (always false) */ - final?: true; - /** Clients are supposed to refetch the channel difference after timeout seconds have elapsed */ - timeout?: number; - /** Dialog containing the latest [PTS](https://core.telegram.org/api/updates) that can be used to reset the channel state */ - dialog: enums.Dialog; - /** The latest messages */ - messages: Array; - /** Chats from messages */ - chats: Array; - /** Users from messages */ - users: Array; - - protected get [id](): number { - return 0xA4BCC6FE; - } - - static get [name](): string { - return "updates.channelDifferenceTooLong" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["final", "true", "flags.0?true"], - ["timeout", "number", "flags.1?int"], - ["dialog", _Dialog_, "Dialog"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.final ?? null, "true", "flags.0?true"], - [this.timeout ?? null, "number", "flags.1?int"], - [this.dialog, _Dialog_, "Dialog"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { final?: true; timeout?: number; dialog: enums.Dialog; messages: Array; chats: Array; users: Array }) { - super(); - this.final = params.final; - this.timeout = params.timeout; - this.dialog = params.dialog; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** The new updates */ -export class updates_ChannelDifference_ extends _updates_ChannelDifference_ { - /** Whether there are more updates to be fetched using getDifference, starting from the provided `pts` */ - final?: true; - /** The [PTS](https://core.telegram.org/api/updates) from which to start getting updates the next time */ - pts: number; - /** Clients are supposed to refetch the channel difference after timeout seconds have elapsed */ - timeout?: number; - /** New messages */ - new_messages: Array; - /** Other updates */ - other_updates: Array; - /** Chats */ - chats: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0x2064674E; - } - - static get [name](): string { - return "updates.channelDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["final", "true", "flags.0?true"], - ["pts", "number", "int"], - ["timeout", "number", "flags.1?int"], - ["new_messages", [_Message_], "Vector"], - ["other_updates", [_Update_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.final ?? null, "true", "flags.0?true"], - [this.pts, "number", "int"], - [this.timeout ?? null, "number", "flags.1?int"], - [this.new_messages, [_Message_], "Vector"], - [this.other_updates, [_Update_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { final?: true; pts: number; timeout?: number; new_messages: Array; other_updates: Array; chats: Array; users: Array }) { - super(); - this.final = params.final; - this.pts = params.pts; - this.timeout = params.timeout; - this.new_messages = params.new_messages; - this.other_updates = params.other_updates; - this.chats = params.chats; - this.users = params.users; - } -} - -/** No filter */ -export class ChannelMessagesFilterEmpty_ extends _ChannelMessagesFilter_ { - protected get [id](): number { - return 0x94D42EE7; - } - - static get [name](): string { - return "channelMessagesFilterEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Filter for getting only certain types of channel messages */ -export class ChannelMessagesFilter_ extends _ChannelMessagesFilter_ { - /** Whether to exclude new messages from the search */ - exclude_new_messages?: true; - /** A range of messages to fetch */ - ranges: Array; - - protected get [id](): number { - return 0xCD77D957; - } - - static get [name](): string { - return "channelMessagesFilter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["exclude_new_messages", "true", "flags.1?true"], - ["ranges", [_MessageRange_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.exclude_new_messages ?? null, "true", "flags.1?true"], - [this.ranges, [_MessageRange_], "Vector"], - ]; - } - - constructor(params: { exclude_new_messages?: true; ranges: Array }) { - super(); - this.exclude_new_messages = params.exclude_new_messages; - this.ranges = params.ranges; - } -} - -/** Channel/supergroup participant */ -export class ChannelParticipant_ extends _ChannelParticipant_ { - /** Participant user ID */ - user_id: bigint; - /** Date joined */ - date: number; - - protected get [id](): number { - return 0xC00C07C0; - } - - static get [name](): string { - return "channelParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; date: number }) { - super(); - this.user_id = params.user_id; - this.date = params.date; - } -} - -/** Myself */ -export class ChannelParticipantSelf_ extends _ChannelParticipant_ { - /** Whether I joined upon specific approval of an admin */ - via_request?: true; - /** User ID */ - user_id: bigint; - /** User that invited me to the channel/supergroup */ - inviter_id: bigint; - /** When did I join the channel/supergroup */ - date: number; - - protected get [id](): number { - return 0x35A8BFA7; - } - - static get [name](): string { - return "channelParticipantSelf" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["via_request", "true", "flags.0?true"], - ["user_id", "bigint", "long"], - ["inviter_id", "bigint", "long"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.via_request ?? null, "true", "flags.0?true"], - [this.user_id, "bigint", "long"], - [this.inviter_id, "bigint", "long"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { via_request?: true; user_id: bigint; inviter_id: bigint; date: number }) { - super(); - this.via_request = params.via_request; - this.user_id = params.user_id; - this.inviter_id = params.inviter_id; - this.date = params.date; - } -} - -/** Channel/supergroup creator */ -export class ChannelParticipantCreator_ extends _ChannelParticipant_ { - /** User ID */ - user_id: bigint; - /** Creator admin rights */ - admin_rights: enums.ChatAdminRights; - /** The role (rank) of the group creator in the group: just an arbitrary string, `admin` by default */ - rank?: string; - - protected get [id](): number { - return 0x2FE601D3; - } - - static get [name](): string { - return "channelParticipantCreator" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["user_id", "bigint", "long"], - ["admin_rights", _ChatAdminRights_, "ChatAdminRights"], - ["rank", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.user_id, "bigint", "long"], - [this.admin_rights, _ChatAdminRights_, "ChatAdminRights"], - [this.rank ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { user_id: bigint; admin_rights: enums.ChatAdminRights; rank?: string }) { - super(); - this.user_id = params.user_id; - this.admin_rights = params.admin_rights; - this.rank = params.rank; - } -} - -/** Admin */ -export class ChannelParticipantAdmin_ extends _ChannelParticipant_ { - /** Can this admin promote other admins with the same permissions? */ - can_edit?: true; - /** Is this the current user */ - self?: true; - /** Admin user ID */ - user_id: bigint; - /** User that invited the admin to the channel/group */ - inviter_id?: bigint; - /** User that promoted the user to admin */ - promoted_by: bigint; - /** When did the user join */ - date: number; - /** Admin [rights](https://core.telegram.org/api/rights) */ - admin_rights: enums.ChatAdminRights; - /** The role (rank) of the admin in the group: just an arbitrary string, `admin` by default */ - rank?: string; - - protected get [id](): number { - return 0x34C3BB53; - } - - static get [name](): string { - return "channelParticipantAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_edit", "true", "flags.0?true"], - ["self", "true", "flags.1?true"], - ["user_id", "bigint", "long"], - ["inviter_id", "bigint", "flags.1?long"], - ["promoted_by", "bigint", "long"], - ["date", "number", "int"], - ["admin_rights", _ChatAdminRights_, "ChatAdminRights"], - ["rank", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_edit ?? null, "true", "flags.0?true"], - [this.self ?? null, "true", "flags.1?true"], - [this.user_id, "bigint", "long"], - [this.inviter_id ?? null, "bigint", "flags.1?long"], - [this.promoted_by, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_rights, _ChatAdminRights_, "ChatAdminRights"], - [this.rank ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params: { can_edit?: true; self?: true; user_id: bigint; inviter_id?: bigint; promoted_by: bigint; date: number; admin_rights: enums.ChatAdminRights; rank?: string }) { - super(); - this.can_edit = params.can_edit; - this.self = params.self; - this.user_id = params.user_id; - this.inviter_id = params.inviter_id; - this.promoted_by = params.promoted_by; - this.date = params.date; - this.admin_rights = params.admin_rights; - this.rank = params.rank; - } -} - -/** Banned/kicked user */ -export class ChannelParticipantBanned_ extends _ChannelParticipant_ { - /** Whether the user has left the group */ - left?: true; - /** The banned peer */ - peer: enums.Peer; - /** User was kicked by the specified admin */ - kicked_by: bigint; - /** When did the user join the group */ - date: number; - /** Banned [rights](https://core.telegram.org/api/rights) */ - banned_rights: enums.ChatBannedRights; - - protected get [id](): number { - return 0x6DF8014E; - } - - static get [name](): string { - return "channelParticipantBanned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["left", "true", "flags.0?true"], - ["peer", _Peer_, "Peer"], - ["kicked_by", "bigint", "long"], - ["date", "number", "int"], - ["banned_rights", _ChatBannedRights_, "ChatBannedRights"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.left ?? null, "true", "flags.0?true"], - [this.peer, _Peer_, "Peer"], - [this.kicked_by, "bigint", "long"], - [this.date, "number", "int"], - [this.banned_rights, _ChatBannedRights_, "ChatBannedRights"], - ]; - } - - constructor(params: { left?: true; peer: enums.Peer; kicked_by: bigint; date: number; banned_rights: enums.ChatBannedRights }) { - super(); - this.left = params.left; - this.peer = params.peer; - this.kicked_by = params.kicked_by; - this.date = params.date; - this.banned_rights = params.banned_rights; - } -} - -/** A participant that left the channel/supergroup */ -export class ChannelParticipantLeft_ extends _ChannelParticipant_ { - /** The peer that left */ - peer: enums.Peer; - - protected get [id](): number { - return 0x1B03F006; - } - - static get [name](): string { - return "channelParticipantLeft" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - ]; - } - - constructor(params: { peer: enums.Peer }) { - super(); - this.peer = params.peer; - } -} - -/** Fetch only recent participants */ -export class ChannelParticipantsRecent_ extends _ChannelParticipantsFilter_ { - protected get [id](): number { - return 0xDE3F3C79; - } - - static get [name](): string { - return "channelParticipantsRecent" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Fetch only admin participants */ -export class ChannelParticipantsAdmins_ extends _ChannelParticipantsFilter_ { - protected get [id](): number { - return 0xB4608969; - } - - static get [name](): string { - return "channelParticipantsAdmins" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Fetch only kicked participants */ -export class ChannelParticipantsKicked_ extends _ChannelParticipantsFilter_ { - /** Optional filter for searching kicked participants by name (otherwise empty) */ - q: string; - - protected get [id](): number { - return 0xA3B54985; - } - - static get [name](): string { - return "channelParticipantsKicked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["q", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.q, "string", "string"], - ]; - } - - constructor(params: { q: string }) { - super(); - this.q = params.q; - } -} - -/** Fetch only bot participants */ -export class ChannelParticipantsBots_ extends _ChannelParticipantsFilter_ { - protected get [id](): number { - return 0xB0D1865B; - } - - static get [name](): string { - return "channelParticipantsBots" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Fetch only banned participants */ -export class ChannelParticipantsBanned_ extends _ChannelParticipantsFilter_ { - /** Optional filter for searching banned participants by name (otherwise empty) */ - q: string; - - protected get [id](): number { - return 0x1427A5E1; - } - - static get [name](): string { - return "channelParticipantsBanned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["q", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.q, "string", "string"], - ]; - } - - constructor(params: { q: string }) { - super(); - this.q = params.q; - } -} - -/** Query participants by name */ -export class ChannelParticipantsSearch_ extends _ChannelParticipantsFilter_ { - /** Search query */ - q: string; - - protected get [id](): number { - return 0x0656AC4B; - } - - static get [name](): string { - return "channelParticipantsSearch" - } - - static get [paramDesc](): ParamDesc { - return [ - ["q", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.q, "string", "string"], - ]; - } - - constructor(params: { q: string }) { - super(); - this.q = params.q; - } -} - -/** Fetch only participants that are also contacts */ -export class ChannelParticipantsContacts_ extends _ChannelParticipantsFilter_ { - /** Optional search query for searching contact participants by name */ - q: string; - - protected get [id](): number { - return 0xBB6AE88D; - } - - static get [name](): string { - return "channelParticipantsContacts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["q", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.q, "string", "string"], - ]; - } - - constructor(params: { q: string }) { - super(); - this.q = params.q; - } -} - -/** This filter is used when looking for supergroup members to mention. -This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific [thread](https://core.telegram.org/api/threads) through the [comment section](https://core.telegram.org/api/threads#channel-comments) of a channel. */ -export class ChannelParticipantsMentions_ extends _ChannelParticipantsFilter_ { - /** Filter by user name or username */ - q?: string; - /** Look only for users that posted in this [thread](https://core.telegram.org/api/threads) */ - top_msg_id?: number; - - protected get [id](): number { - return 0xE04B5CEB; - } - - static get [name](): string { - return "channelParticipantsMentions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["q", "string", "flags.0?string"], - ["top_msg_id", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.q ?? null, "string", "flags.0?string"], - [this.top_msg_id ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params?: { q?: string; top_msg_id?: number }) { - super(); - this.q = params?.q; - this.top_msg_id = params?.top_msg_id; - } -} - -/** Represents multiple channel participants */ -export class channels_ChannelParticipants_ extends _channels_ChannelParticipants_ { - /** Total number of participants that correspond to the given query */ - count: number; - /** Participants */ - participants: Array; - /** Mentioned chats */ - chats: Array; - /** Users mentioned in participant info */ - users: Array; - - protected get [id](): number { - return 0x9AB0FEAF; - } - - static get [name](): string { - return "channels.channelParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["participants", [_ChannelParticipant_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.participants, [_ChannelParticipant_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; participants: Array; chats: Array; users: Array }) { - super(); - this.count = params.count; - this.participants = params.participants; - this.chats = params.chats; - this.users = params.users; - } -} - -/** No new participant info could be found */ -export class channels_ChannelParticipantsNotModified_ extends _channels_ChannelParticipants_ { - protected get [id](): number { - return 0xF0173FE9; - } - - static get [name](): string { - return "channels.channelParticipantsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a channel participant */ -export class channels_ChannelParticipant_ extends _channels_ChannelParticipant_ { - /** The channel participant */ - participant: enums.ChannelParticipant; - /** Mentioned chats */ - chats: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0xDFB80317; - } - - static get [name](): string { - return "channels.channelParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["participant", _ChannelParticipant_, "ChannelParticipant"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.participant, _ChannelParticipant_, "ChannelParticipant"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { participant: enums.ChannelParticipant; chats: Array; users: Array }) { - super(); - this.participant = params.participant; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Info about the latest telegram Terms Of Service */ -export class help_TermsOfService_ extends _help_TermsOfService_ { - /** Whether a prompt must be showed to the user, in order to accept the new terms. */ - popup?: true; - /** ID of the new terms */ - id: enums.DataJSON; - /** Text of the new terms */ - text: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities: Array; - /** Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age. */ - min_age_confirm?: number; - - protected get [id](): number { - return 0x780A0310; - } - - static get [name](): string { - return "help.termsOfService" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["popup", "true", "flags.0?true"], - ["id", _DataJSON_, "DataJSON"], - ["text", "string", "string"], - ["entities", [_MessageEntity_], "Vector"], - ["min_age_confirm", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.popup ?? null, "true", "flags.0?true"], - [this.id, _DataJSON_, "DataJSON"], - [this.text, "string", "string"], - [this.entities, [_MessageEntity_], "Vector"], - [this.min_age_confirm ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { popup?: true; id: enums.DataJSON; text: string; entities: Array; min_age_confirm?: number }) { - super(); - this.popup = params.popup; - this.id = params.id; - this.text = params.text; - this.entities = params.entities; - this.min_age_confirm = params.min_age_confirm; - } -} - -/** No new saved gifs were found */ -export class messages_SavedGifsNotModified_ extends _messages_SavedGifs_ { - protected get [id](): number { - return 0xE8025CA2; - } - - static get [name](): string { - return "messages.savedGifsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Saved gifs */ -export class messages_SavedGifs_ extends _messages_SavedGifs_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** List of saved gifs */ - gifs: Array; - - protected get [id](): number { - return 0x84A02A0D; - } - - static get [name](): string { - return "messages.savedGifs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["gifs", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.gifs, [_Document_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; gifs: Array }) { - super(); - this.hash = params.hash; - this.gifs = params.gifs; - } -} - -/** A media */ -export class InputBotInlineMessageMediaAuto_ extends _InputBotInlineMessage_ { - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** Caption */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x3380C786; - } - - static get [name](): string { - return "inputBotInlineMessageMediaAuto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["invert_media", "true", "flags.3?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.invert_media ?? null, "true", "flags.3?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { invert_media?: true; message: string; entities?: Array; reply_markup?: enums.ReplyMarkup }) { - super(); - this.invert_media = params.invert_media; - this.message = params.message; - this.entities = params.entities; - this.reply_markup = params.reply_markup; - } -} - -/** Simple text message */ -export class InputBotInlineMessageText_ extends _InputBotInlineMessage_ { - /** Disable webpage preview */ - no_webpage?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** Message */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x3DCD7A87; - } - - static get [name](): string { - return "inputBotInlineMessageText" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.0?true"], - ["invert_media", "true", "flags.3?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.0?true"], - [this.invert_media ?? null, "true", "flags.3?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { no_webpage?: true; invert_media?: true; message: string; entities?: Array; reply_markup?: enums.ReplyMarkup }) { - super(); - this.no_webpage = params.no_webpage; - this.invert_media = params.invert_media; - this.message = params.message; - this.entities = params.entities; - this.reply_markup = params.reply_markup; - } -} - -/** Geolocation */ -export class InputBotInlineMessageMediaGeo_ extends _InputBotInlineMessage_ { - /** Geolocation */ - geo_point: enums.InputGeoPoint; - /** For [live locations](https://core.telegram.org/api/live-location), a direction in which the location moves, in degrees; 1-360 */ - heading?: number; - /** Validity period */ - period?: number; - /** For [live locations](https://core.telegram.org/api/live-location), a maximum distance to another chat member for proximity alerts, in meters (0-100000) */ - proximity_notification_radius?: number; - /** Reply markup for bot/inline keyboards */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x96929A85; - } - - static get [name](): string { - return "inputBotInlineMessageMediaGeo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo_point", _InputGeoPoint_, "InputGeoPoint"], - ["heading", "number", "flags.0?int"], - ["period", "number", "flags.1?int"], - ["proximity_notification_radius", "number", "flags.3?int"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo_point, _InputGeoPoint_, "InputGeoPoint"], - [this.heading ?? null, "number", "flags.0?int"], - [this.period ?? null, "number", "flags.1?int"], - [this.proximity_notification_radius ?? null, "number", "flags.3?int"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { geo_point: enums.InputGeoPoint; heading?: number; period?: number; proximity_notification_radius?: number; reply_markup?: enums.ReplyMarkup }) { - super(); - this.geo_point = params.geo_point; - this.heading = params.heading; - this.period = params.period; - this.proximity_notification_radius = params.proximity_notification_radius; - this.reply_markup = params.reply_markup; - } -} - -/** Venue */ -export class InputBotInlineMessageMediaVenue_ extends _InputBotInlineMessage_ { - /** Geolocation */ - geo_point: enums.InputGeoPoint; - /** Venue name */ - title: string; - /** Address */ - address: string; - /** Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported */ - provider: string; - /** Venue ID in the provider's database */ - venue_id: string; - /** Venue type in the provider's database */ - venue_type: string; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x417BBF11; - } - - static get [name](): string { - return "inputBotInlineMessageMediaVenue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo_point", _InputGeoPoint_, "InputGeoPoint"], - ["title", "string", "string"], - ["address", "string", "string"], - ["provider", "string", "string"], - ["venue_id", "string", "string"], - ["venue_type", "string", "string"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo_point, _InputGeoPoint_, "InputGeoPoint"], - [this.title, "string", "string"], - [this.address, "string", "string"], - [this.provider, "string", "string"], - [this.venue_id, "string", "string"], - [this.venue_type, "string", "string"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { geo_point: enums.InputGeoPoint; title: string; address: string; provider: string; venue_id: string; venue_type: string; reply_markup?: enums.ReplyMarkup }) { - super(); - this.geo_point = params.geo_point; - this.title = params.title; - this.address = params.address; - this.provider = params.provider; - this.venue_id = params.venue_id; - this.venue_type = params.venue_type; - this.reply_markup = params.reply_markup; - } -} - -/** A contact */ -export class InputBotInlineMessageMediaContact_ extends _InputBotInlineMessage_ { - /** Phone number */ - phone_number: string; - /** First name */ - first_name: string; - /** Last name */ - last_name: string; - /** VCard info */ - vcard: string; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0xA6EDBFFD; - } - - static get [name](): string { - return "inputBotInlineMessageMediaContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["phone_number", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["vcard", "string", "string"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.phone_number, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.vcard, "string", "string"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { phone_number: string; first_name: string; last_name: string; vcard: string; reply_markup?: enums.ReplyMarkup }) { - super(); - this.phone_number = params.phone_number; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.vcard = params.vcard; - this.reply_markup = params.reply_markup; - } -} - -/** A game */ -export class InputBotInlineMessageGame_ extends _InputBotInlineMessage_ { - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x4B425864; - } - - static get [name](): string { - return "inputBotInlineMessageGame" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params?: { reply_markup?: enums.ReplyMarkup }) { - super(); - this.reply_markup = params?.reply_markup; - } -} - -/** An invoice */ -export class InputBotInlineMessageMediaInvoice_ extends _InputBotInlineMessage_ { - /** Product name, 1-32 characters */ - title: string; - /** Product description, 1-255 characters */ - description: string; - /** Invoice photo */ - photo?: enums.InputWebDocument; - /** The invoice */ - invoice: enums.Invoice; - /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */ - payload: Uint8Array; - /** Payments provider token, obtained via [Botfather](https://t.me/botfather) */ - provider: string; - /** A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. */ - provider_data: enums.DataJSON; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0xD7E78225; - } - - static get [name](): string { - return "inputBotInlineMessageMediaInvoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _InputWebDocument_, "flags.0?InputWebDocument"], - ["invoice", _Invoice_, "Invoice"], - ["payload", Uint8Array, "bytes"], - ["provider", "string", "string"], - ["provider_data", _DataJSON_, "DataJSON"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo ?? null, _InputWebDocument_, "flags.0?InputWebDocument"], - [this.invoice, _Invoice_, "Invoice"], - [this.payload, Uint8Array, "bytes"], - [this.provider, "string", "string"], - [this.provider_data, _DataJSON_, "DataJSON"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { title: string; description: string; photo?: enums.InputWebDocument; invoice: enums.Invoice; payload: Uint8Array; provider: string; provider_data: enums.DataJSON; reply_markup?: enums.ReplyMarkup }) { - super(); - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.invoice = params.invoice; - this.payload = params.payload; - this.provider = params.provider; - this.provider_data = params.provider_data; - this.reply_markup = params.reply_markup; - } -} - -/** Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message. */ -export class InputBotInlineMessageMediaWebPage_ extends _InputBotInlineMessage_ { - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** If set, specifies that a large media preview should be used. */ - force_large_media?: true; - /** If set, specifies that a small media preview should be used. */ - force_small_media?: true; - /** If **not** set, a `WEBPAGE_NOT_FOUND` RPC error will be emitted if a webpage preview cannot be generated for the specified `url`; otherwise, no error will be emitted (unless the provided message is also empty, in which case a `MESSAGE_EMPTY` will be emitted, instead). */ - optional?: true; - /** The message, can be empty. */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** The URL to use for the link preview. */ - url: string; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0xBDDCC510; - } - - static get [name](): string { - return "inputBotInlineMessageMediaWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["invert_media", "true", "flags.3?true"], - ["force_large_media", "true", "flags.4?true"], - ["force_small_media", "true", "flags.5?true"], - ["optional", "true", "flags.6?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["url", "string", "string"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.invert_media ?? null, "true", "flags.3?true"], - [this.force_large_media ?? null, "true", "flags.4?true"], - [this.force_small_media ?? null, "true", "flags.5?true"], - [this.optional ?? null, "true", "flags.6?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.url, "string", "string"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { invert_media?: true; force_large_media?: true; force_small_media?: true; optional?: true; message: string; entities?: Array; url: string; reply_markup?: enums.ReplyMarkup }) { - super(); - this.invert_media = params.invert_media; - this.force_large_media = params.force_large_media; - this.force_small_media = params.force_small_media; - this.optional = params.optional; - this.message = params.message; - this.entities = params.entities; - this.url = params.url; - this.reply_markup = params.reply_markup; - } -} - -/** An inline bot result */ -export class InputBotInlineResult_ extends _InputBotInlineResult_ { - /** ID of result */ - id: string; - /** Result type (see [bot API docs](https://core.telegram.org/bots/api#inlinequeryresult)) */ - type: string; - /** Result title */ - title?: string; - /** Result description */ - description?: string; - /** URL of result */ - url?: string; - /** Thumbnail for result */ - thumb?: enums.InputWebDocument; - /** Result contents */ - content?: enums.InputWebDocument; - /** Message to send when the result is selected */ - send_message: enums.InputBotInlineMessage; - - protected get [id](): number { - return 0x88BF9319; - } - - static get [name](): string { - return "inputBotInlineResult" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "string", "string"], - ["type", "string", "string"], - ["title", "string", "flags.1?string"], - ["description", "string", "flags.2?string"], - ["url", "string", "flags.3?string"], - ["thumb", _InputWebDocument_, "flags.4?InputWebDocument"], - ["content", _InputWebDocument_, "flags.5?InputWebDocument"], - ["send_message", _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "string", "string"], - [this.type, "string", "string"], - [this.title ?? null, "string", "flags.1?string"], - [this.description ?? null, "string", "flags.2?string"], - [this.url ?? null, "string", "flags.3?string"], - [this.thumb ?? null, _InputWebDocument_, "flags.4?InputWebDocument"], - [this.content ?? null, _InputWebDocument_, "flags.5?InputWebDocument"], - [this.send_message, _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - constructor(params: { id: string; type: string; title?: string; description?: string; url?: string; thumb?: enums.InputWebDocument; content?: enums.InputWebDocument; send_message: enums.InputBotInlineMessage }) { - super(); - this.id = params.id; - this.type = params.type; - this.title = params.title; - this.description = params.description; - this.url = params.url; - this.thumb = params.thumb; - this.content = params.content; - this.send_message = params.send_message; - } -} - -/** Photo */ -export class InputBotInlineResultPhoto_ extends _InputBotInlineResult_ { - /** Result ID */ - id: string; - /** Result type (see [bot API docs](https://core.telegram.org/bots/api#inlinequeryresult)) */ - type: string; - /** Photo to send */ - photo: enums.InputPhoto; - /** Message to send when the result is selected */ - send_message: enums.InputBotInlineMessage; - - protected get [id](): number { - return 0xA8D864A7; - } - - static get [name](): string { - return "inputBotInlineResultPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["type", "string", "string"], - ["photo", _InputPhoto_, "InputPhoto"], - ["send_message", _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.type, "string", "string"], - [this.photo, _InputPhoto_, "InputPhoto"], - [this.send_message, _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - constructor(params: { id: string; type: string; photo: enums.InputPhoto; send_message: enums.InputBotInlineMessage }) { - super(); - this.id = params.id; - this.type = params.type; - this.photo = params.photo; - this.send_message = params.send_message; - } -} - -/** Document (media of any type except for photos) */ -export class InputBotInlineResultDocument_ extends _InputBotInlineResult_ { - /** Result ID */ - id: string; - /** Result type (see [bot API docs](https://core.telegram.org/bots/api#inlinequeryresult)) */ - type: string; - /** Result title */ - title?: string; - /** Result description */ - description?: string; - /** Document to send */ - document: enums.InputDocument; - /** Message to send when the result is selected */ - send_message: enums.InputBotInlineMessage; - - protected get [id](): number { - return 0xFFF8FDC4; - } - - static get [name](): string { - return "inputBotInlineResultDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "string", "string"], - ["type", "string", "string"], - ["title", "string", "flags.1?string"], - ["description", "string", "flags.2?string"], - ["document", _InputDocument_, "InputDocument"], - ["send_message", _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "string", "string"], - [this.type, "string", "string"], - [this.title ?? null, "string", "flags.1?string"], - [this.description ?? null, "string", "flags.2?string"], - [this.document, _InputDocument_, "InputDocument"], - [this.send_message, _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - constructor(params: { id: string; type: string; title?: string; description?: string; document: enums.InputDocument; send_message: enums.InputBotInlineMessage }) { - super(); - this.id = params.id; - this.type = params.type; - this.title = params.title; - this.description = params.description; - this.document = params.document; - this.send_message = params.send_message; - } -} - -/** Game */ -export class InputBotInlineResultGame_ extends _InputBotInlineResult_ { - /** Result ID */ - id: string; - /** Game short name */ - short_name: string; - /** Message to send when the result is selected */ - send_message: enums.InputBotInlineMessage; - - protected get [id](): number { - return 0x4FA417F2; - } - - static get [name](): string { - return "inputBotInlineResultGame" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["short_name", "string", "string"], - ["send_message", _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.short_name, "string", "string"], - [this.send_message, _InputBotInlineMessage_, "InputBotInlineMessage"], - ]; - } - - constructor(params: { id: string; short_name: string; send_message: enums.InputBotInlineMessage }) { - super(); - this.id = params.id; - this.short_name = params.short_name; - this.send_message = params.send_message; - } -} - -/** Send whatever media is attached to the [botInlineMediaResult](https://core.telegram.org/constructor/botInlineMediaResult) */ -export class BotInlineMessageMediaAuto_ extends _BotInlineMessage_ { - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** Caption */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x764CF810; - } - - static get [name](): string { - return "botInlineMessageMediaAuto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["invert_media", "true", "flags.3?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.invert_media ?? null, "true", "flags.3?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { invert_media?: true; message: string; entities?: Array; reply_markup?: enums.ReplyMarkup }) { - super(); - this.invert_media = params.invert_media; - this.message = params.message; - this.entities = params.entities; - this.reply_markup = params.reply_markup; - } -} - -/** Send a simple text message */ -export class BotInlineMessageText_ extends _BotInlineMessage_ { - /** Disable webpage preview */ - no_webpage?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** The message */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x8C7F65E2; - } - - static get [name](): string { - return "botInlineMessageText" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.0?true"], - ["invert_media", "true", "flags.3?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.0?true"], - [this.invert_media ?? null, "true", "flags.3?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { no_webpage?: true; invert_media?: true; message: string; entities?: Array; reply_markup?: enums.ReplyMarkup }) { - super(); - this.no_webpage = params.no_webpage; - this.invert_media = params.invert_media; - this.message = params.message; - this.entities = params.entities; - this.reply_markup = params.reply_markup; - } -} - -/** Send a geolocation */ -export class BotInlineMessageMediaGeo_ extends _BotInlineMessage_ { - /** Geolocation */ - geo: enums.GeoPoint; - /** For [live locations](https://core.telegram.org/api/live-location), a direction in which the location moves, in degrees; 1-360. */ - heading?: number; - /** Validity period */ - period?: number; - /** For [live locations](https://core.telegram.org/api/live-location), a maximum distance to another chat member for proximity alerts, in meters (0-100000). */ - proximity_notification_radius?: number; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x051846FD; - } - - static get [name](): string { - return "botInlineMessageMediaGeo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo", _GeoPoint_, "GeoPoint"], - ["heading", "number", "flags.0?int"], - ["period", "number", "flags.1?int"], - ["proximity_notification_radius", "number", "flags.3?int"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo, _GeoPoint_, "GeoPoint"], - [this.heading ?? null, "number", "flags.0?int"], - [this.period ?? null, "number", "flags.1?int"], - [this.proximity_notification_radius ?? null, "number", "flags.3?int"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { geo: enums.GeoPoint; heading?: number; period?: number; proximity_notification_radius?: number; reply_markup?: enums.ReplyMarkup }) { - super(); - this.geo = params.geo; - this.heading = params.heading; - this.period = params.period; - this.proximity_notification_radius = params.proximity_notification_radius; - this.reply_markup = params.reply_markup; - } -} - -/** Send a venue */ -export class BotInlineMessageMediaVenue_ extends _BotInlineMessage_ { - /** Geolocation of venue */ - geo: enums.GeoPoint; - /** Venue name */ - title: string; - /** Address */ - address: string; - /** Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported */ - provider: string; - /** Venue ID in the provider's database */ - venue_id: string; - /** Venue type in the provider's database */ - venue_type: string; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x8A86659C; - } - - static get [name](): string { - return "botInlineMessageMediaVenue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo", _GeoPoint_, "GeoPoint"], - ["title", "string", "string"], - ["address", "string", "string"], - ["provider", "string", "string"], - ["venue_id", "string", "string"], - ["venue_type", "string", "string"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo, _GeoPoint_, "GeoPoint"], - [this.title, "string", "string"], - [this.address, "string", "string"], - [this.provider, "string", "string"], - [this.venue_id, "string", "string"], - [this.venue_type, "string", "string"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { geo: enums.GeoPoint; title: string; address: string; provider: string; venue_id: string; venue_type: string; reply_markup?: enums.ReplyMarkup }) { - super(); - this.geo = params.geo; - this.title = params.title; - this.address = params.address; - this.provider = params.provider; - this.venue_id = params.venue_id; - this.venue_type = params.venue_type; - this.reply_markup = params.reply_markup; - } -} - -/** Send a contact */ -export class BotInlineMessageMediaContact_ extends _BotInlineMessage_ { - /** Phone number */ - phone_number: string; - /** First name */ - first_name: string; - /** Last name */ - last_name: string; - /** VCard info */ - vcard: string; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x18D1CDC2; - } - - static get [name](): string { - return "botInlineMessageMediaContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["phone_number", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["vcard", "string", "string"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.phone_number, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.vcard, "string", "string"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { phone_number: string; first_name: string; last_name: string; vcard: string; reply_markup?: enums.ReplyMarkup }) { - super(); - this.phone_number = params.phone_number; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.vcard = params.vcard; - this.reply_markup = params.reply_markup; - } -} - -/** Send an invoice */ -export class BotInlineMessageMediaInvoice_ extends _BotInlineMessage_ { - /** Set this flag if you require the user's shipping address to complete the order */ - shipping_address_requested?: true; - /** Test invoice */ - test?: true; - /** Product name, 1-32 characters */ - title: string; - /** Product description, 1-255 characters */ - description: string; - /** Product photo */ - photo?: enums.WebDocument; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - total_amount: bigint; - /** Inline keyboard */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x354A9B09; - } - - static get [name](): string { - return "botInlineMessageMediaInvoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["shipping_address_requested", "true", "flags.1?true"], - ["test", "true", "flags.3?true"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _WebDocument_, "flags.0?WebDocument"], - ["currency", "string", "string"], - ["total_amount", "bigint", "long"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.shipping_address_requested ?? null, "true", "flags.1?true"], - [this.test ?? null, "true", "flags.3?true"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo ?? null, _WebDocument_, "flags.0?WebDocument"], - [this.currency, "string", "string"], - [this.total_amount, "bigint", "long"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { shipping_address_requested?: true; test?: true; title: string; description: string; photo?: enums.WebDocument; currency: string; total_amount: bigint; reply_markup?: enums.ReplyMarkup }) { - super(); - this.shipping_address_requested = params.shipping_address_requested; - this.test = params.test; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.currency = params.currency; - this.total_amount = params.total_amount; - this.reply_markup = params.reply_markup; - } -} - -/** Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message. */ -export class BotInlineMessageMediaWebPage_ extends _BotInlineMessage_ { - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** If set, specifies that a large media preview should be used. */ - force_large_media?: true; - /** If set, specifies that a small media preview should be used. */ - force_small_media?: true; - /** If set, indicates that the URL used for the webpage preview was specified manually using [inputMediaWebPage](https://core.telegram.org/constructor/inputMediaWebPage), and may not be related to any of the URLs specified in the message. */ - manual?: true; - /** If set, the link can be opened directly without user confirmation. */ - safe?: true; - /** The message, can be empty. */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** The URL to use for the link preview. */ - url: string; - /** Reply markup for sending bot buttons */ - reply_markup?: enums.ReplyMarkup; - - protected get [id](): number { - return 0x809AD9A6; - } - - static get [name](): string { - return "botInlineMessageMediaWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["invert_media", "true", "flags.3?true"], - ["force_large_media", "true", "flags.4?true"], - ["force_small_media", "true", "flags.5?true"], - ["manual", "true", "flags.7?true"], - ["safe", "true", "flags.8?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["url", "string", "string"], - ["reply_markup", _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.invert_media ?? null, "true", "flags.3?true"], - [this.force_large_media ?? null, "true", "flags.4?true"], - [this.force_small_media ?? null, "true", "flags.5?true"], - [this.manual ?? null, "true", "flags.7?true"], - [this.safe ?? null, "true", "flags.8?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.url, "string", "string"], - [this.reply_markup ?? null, _ReplyMarkup_, "flags.2?ReplyMarkup"], - ]; - } - - constructor(params: { invert_media?: true; force_large_media?: true; force_small_media?: true; manual?: true; safe?: true; message: string; entities?: Array; url: string; reply_markup?: enums.ReplyMarkup }) { - super(); - this.invert_media = params.invert_media; - this.force_large_media = params.force_large_media; - this.force_small_media = params.force_small_media; - this.manual = params.manual; - this.safe = params.safe; - this.message = params.message; - this.entities = params.entities; - this.url = params.url; - this.reply_markup = params.reply_markup; - } -} - -/** Generic result */ -export class BotInlineResult_ extends _BotInlineResult_ { - /** Result ID */ - id: string; - /** Result type (see [bot API docs](https://core.telegram.org/bots/api#inlinequeryresult)) */ - type: string; - /** Result title */ - title?: string; - /** Result description */ - description?: string; - /** URL of article or webpage */ - url?: string; - /** Thumbnail for the result */ - thumb?: enums.WebDocument; - /** Content of the result */ - content?: enums.WebDocument; - /** Message to send */ - send_message: enums.BotInlineMessage; - - protected get [id](): number { - return 0x11965F3A; - } - - static get [name](): string { - return "botInlineResult" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "string", "string"], - ["type", "string", "string"], - ["title", "string", "flags.1?string"], - ["description", "string", "flags.2?string"], - ["url", "string", "flags.3?string"], - ["thumb", _WebDocument_, "flags.4?WebDocument"], - ["content", _WebDocument_, "flags.5?WebDocument"], - ["send_message", _BotInlineMessage_, "BotInlineMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "string", "string"], - [this.type, "string", "string"], - [this.title ?? null, "string", "flags.1?string"], - [this.description ?? null, "string", "flags.2?string"], - [this.url ?? null, "string", "flags.3?string"], - [this.thumb ?? null, _WebDocument_, "flags.4?WebDocument"], - [this.content ?? null, _WebDocument_, "flags.5?WebDocument"], - [this.send_message, _BotInlineMessage_, "BotInlineMessage"], - ]; - } - - constructor(params: { id: string; type: string; title?: string; description?: string; url?: string; thumb?: enums.WebDocument; content?: enums.WebDocument; send_message: enums.BotInlineMessage }) { - super(); - this.id = params.id; - this.type = params.type; - this.title = params.title; - this.description = params.description; - this.url = params.url; - this.thumb = params.thumb; - this.content = params.content; - this.send_message = params.send_message; - } -} - -/** Media result */ -export class BotInlineMediaResult_ extends _BotInlineResult_ { - /** Result ID */ - id: string; - /** Result type (see [bot API docs](https://core.telegram.org/bots/api#inlinequeryresult)) */ - type: string; - /** If type is `photo`, the photo to send */ - photo?: enums.Photo; - /** If type is `document`, the document to send */ - document?: enums.Document; - /** Result title */ - title?: string; - /** Description */ - description?: string; - /** Depending on the `type` and on the [constructor](https://core.telegram.org/type/BotInlineMessage), contains the caption of the media or the content of the message to be sent **instead** of the media */ - send_message: enums.BotInlineMessage; - - protected get [id](): number { - return 0x17DB940B; - } - - static get [name](): string { - return "botInlineMediaResult" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "string", "string"], - ["type", "string", "string"], - ["photo", _Photo_, "flags.0?Photo"], - ["document", _Document_, "flags.1?Document"], - ["title", "string", "flags.2?string"], - ["description", "string", "flags.3?string"], - ["send_message", _BotInlineMessage_, "BotInlineMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "string", "string"], - [this.type, "string", "string"], - [this.photo ?? null, _Photo_, "flags.0?Photo"], - [this.document ?? null, _Document_, "flags.1?Document"], - [this.title ?? null, "string", "flags.2?string"], - [this.description ?? null, "string", "flags.3?string"], - [this.send_message, _BotInlineMessage_, "BotInlineMessage"], - ]; - } - - constructor(params: { id: string; type: string; photo?: enums.Photo; document?: enums.Document; title?: string; description?: string; send_message: enums.BotInlineMessage }) { - super(); - this.id = params.id; - this.type = params.type; - this.photo = params.photo; - this.document = params.document; - this.title = params.title; - this.description = params.description; - this.send_message = params.send_message; - } -} - -/** Result of a query to an inline bot */ -export class messages_BotResults_ extends _messages_BotResults_ { - /** Whether the result is a picture gallery */ - gallery?: true; - /** Query ID */ - query_id: bigint; - /** The next offset to use when navigating through results */ - next_offset?: string; - /** Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter. */ - switch_pm?: enums.InlineBotSwitchPM; - /** Shown as a button on top of the remaining inline result list; if clicked, opens the specified [inline mode mini app](https://core.telegram.org/api/bots/webapps#inline-mode-mini-apps). */ - switch_webview?: enums.InlineBotWebView; - /** The results */ - results: Array; - /** Caching validity of the results */ - cache_time: number; - /** Users mentioned in the results */ - users: Array; - - protected get [id](): number { - return 0xE021F2F6; - } - - static get [name](): string { - return "messages.botResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["gallery", "true", "flags.0?true"], - ["query_id", "bigint", "long"], - ["next_offset", "string", "flags.1?string"], - ["switch_pm", _InlineBotSwitchPM_, "flags.2?InlineBotSwitchPM"], - ["switch_webview", _InlineBotWebView_, "flags.3?InlineBotWebView"], - ["results", [_BotInlineResult_], "Vector"], - ["cache_time", "number", "int"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.gallery ?? null, "true", "flags.0?true"], - [this.query_id, "bigint", "long"], - [this.next_offset ?? null, "string", "flags.1?string"], - [this.switch_pm ?? null, _InlineBotSwitchPM_, "flags.2?InlineBotSwitchPM"], - [this.switch_webview ?? null, _InlineBotWebView_, "flags.3?InlineBotWebView"], - [this.results, [_BotInlineResult_], "Vector"], - [this.cache_time, "number", "int"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { gallery?: true; query_id: bigint; next_offset?: string; switch_pm?: enums.InlineBotSwitchPM; switch_webview?: enums.InlineBotWebView; results: Array; cache_time: number; users: Array }) { - super(); - this.gallery = params.gallery; - this.query_id = params.query_id; - this.next_offset = params.next_offset; - this.switch_pm = params.switch_pm; - this.switch_webview = params.switch_webview; - this.results = params.results; - this.cache_time = params.cache_time; - this.users = params.users; - } -} - -/** Link to a message in a supergroup/channel */ -export class ExportedMessageLink_ extends _ExportedMessageLink_ { - /** URL */ - link: string; - /** Embed code */ - html: string; - - protected get [id](): number { - return 0x5DAB1AF4; - } - - static get [name](): string { - return "exportedMessageLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["link", "string", "string"], - ["html", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.link, "string", "string"], - [this.html, "string", "string"], - ]; - } - - constructor(params: { link: string; html: string }) { - super(); - this.link = params.link; - this.html = params.html; - } -} - -/** Info about a forwarded message */ -export class MessageFwdHeader_ extends _MessageFwdHeader_ { - /** Whether this message was [imported from a foreign chat service, click here for more info »](https://core.telegram.org/api/import) */ - imported?: true; - /** Only for messages forwarded to [saved messages »](https://core.telegram.org/api/saved-messages), set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if `from_id` points to the current user). */ - saved_out?: true; - /** The ID of the user that originally sent the message */ - from_id?: enums.Peer; - /** The name of the user that originally sent the message */ - from_name?: string; - /** When was the message originally sent */ - date: number; - /** ID of the channel message that was forwarded */ - channel_post?: number; - /** For channels and if signatures are enabled, author of the channel message */ - post_author?: string; - /** Only for messages forwarded to [saved messages »](https://core.telegram.org/api/saved-messages), contains the dialog where the message was originally sent. */ - saved_from_peer?: enums.Peer; - /** Only for messages forwarded to [saved messages »](https://core.telegram.org/api/saved-messages), contains the original ID of the message in `saved_from_peer`. */ - saved_from_msg_id?: number; - /** Only for forwarded messages reforwarded to [saved messages »](https://core.telegram.org/api/saved-messages), contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and `from_id` will contain the ID of user A). */ - saved_from_id?: enums.Peer; - /** Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to [saved messages »](https://core.telegram.org/api/saved-messages), contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and `from_name` will contain the name of user A). */ - saved_from_name?: string; - /** Only for forwarded messages reforwarded to [saved messages »](https://core.telegram.org/api/saved-messages), indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, `date` will contain 1 and the `date` of the containing [message](https://core.telegram.org/constructor/message) will contain 3). */ - saved_date?: number; - /** PSA type */ - psa_type?: string; - - protected get [id](): number { - return 0x4E4DF4BB; - } - - static get [name](): string { - return "messageFwdHeader" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["imported", "true", "flags.7?true"], - ["saved_out", "true", "flags.11?true"], - ["from_id", _Peer_, "flags.0?Peer"], - ["from_name", "string", "flags.5?string"], - ["date", "number", "int"], - ["channel_post", "number", "flags.2?int"], - ["post_author", "string", "flags.3?string"], - ["saved_from_peer", _Peer_, "flags.4?Peer"], - ["saved_from_msg_id", "number", "flags.4?int"], - ["saved_from_id", _Peer_, "flags.8?Peer"], - ["saved_from_name", "string", "flags.9?string"], - ["saved_date", "number", "flags.10?int"], - ["psa_type", "string", "flags.6?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.imported ?? null, "true", "flags.7?true"], - [this.saved_out ?? null, "true", "flags.11?true"], - [this.from_id ?? null, _Peer_, "flags.0?Peer"], - [this.from_name ?? null, "string", "flags.5?string"], - [this.date, "number", "int"], - [this.channel_post ?? null, "number", "flags.2?int"], - [this.post_author ?? null, "string", "flags.3?string"], - [this.saved_from_peer ?? null, _Peer_, "flags.4?Peer"], - [this.saved_from_msg_id ?? null, "number", "flags.4?int"], - [this.saved_from_id ?? null, _Peer_, "flags.8?Peer"], - [this.saved_from_name ?? null, "string", "flags.9?string"], - [this.saved_date ?? null, "number", "flags.10?int"], - [this.psa_type ?? null, "string", "flags.6?string"], - ]; - } - - constructor(params: { imported?: true; saved_out?: true; from_id?: enums.Peer; from_name?: string; date: number; channel_post?: number; post_author?: string; saved_from_peer?: enums.Peer; saved_from_msg_id?: number; saved_from_id?: enums.Peer; saved_from_name?: string; saved_date?: number; psa_type?: string }) { - super(); - this.imported = params.imported; - this.saved_out = params.saved_out; - this.from_id = params.from_id; - this.from_name = params.from_name; - this.date = params.date; - this.channel_post = params.channel_post; - this.post_author = params.post_author; - this.saved_from_peer = params.saved_from_peer; - this.saved_from_msg_id = params.saved_from_msg_id; - this.saved_from_id = params.saved_from_id; - this.saved_from_name = params.saved_from_name; - this.saved_date = params.saved_date; - this.psa_type = params.psa_type; - } -} - -/** The next time, the authentication code will be delivered via an immediately canceled incoming call. */ -export class auth_CodeTypeSms_ extends _auth_CodeType_ { - protected get [id](): number { - return 0x72A3158C; - } - - static get [name](): string { - return "auth.codeTypeSms" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The next time, the authentication code is to be delivered via an outgoing phone call. */ -export class auth_CodeTypeCall_ extends _auth_CodeType_ { - protected get [id](): number { - return 0x741CD3E3; - } - - static get [name](): string { - return "auth.codeTypeCall" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The next time, the authentication code will be delivered via an immediately canceled incoming call. */ -export class auth_CodeTypeFlashCall_ extends _auth_CodeType_ { - protected get [id](): number { - return 0x226CCEFB; - } - - static get [name](): string { - return "auth.codeTypeFlashCall" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user. */ -export class auth_CodeTypeMissedCall_ extends _auth_CodeType_ { - protected get [id](): number { - return 0xD61AD6EE; - } - - static get [name](): string { - return "auth.codeTypeMissedCall" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The next time, the authentication code will be delivered via [fragment.com](https://fragment.com) */ -export class auth_CodeTypeFragmentSms_ extends _auth_CodeType_ { - protected get [id](): number { - return 0x06ED998C; - } - - static get [name](): string { - return "auth.codeTypeFragmentSms" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The code was sent through the telegram app */ -export class auth_SentCodeTypeApp_ extends _auth_SentCodeType_ { - /** Length of the code in bytes */ - length: number; - - protected get [id](): number { - return 0x3DBB5986; - } - - static get [name](): string { - return "auth.sentCodeTypeApp" - } - - static get [paramDesc](): ParamDesc { - return [ - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.length, "number", "int"], - ]; - } - - constructor(params: { length: number }) { - super(); - this.length = params.length; - } -} - -/** The code was sent via SMS */ -export class auth_SentCodeTypeSms_ extends _auth_SentCodeType_ { - /** Length of the code in bytes */ - length: number; - - protected get [id](): number { - return 0xC000BBA2; - } - - static get [name](): string { - return "auth.sentCodeTypeSms" - } - - static get [paramDesc](): ParamDesc { - return [ - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.length, "number", "int"], - ]; - } - - constructor(params: { length: number }) { - super(); - this.length = params.length; - } -} - -/** The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input. */ -export class auth_SentCodeTypeCall_ extends _auth_SentCodeType_ { - /** Length of the verification code */ - length: number; - - protected get [id](): number { - return 0x5353E5A7; - } - - static get [name](): string { - return "auth.sentCodeTypeCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.length, "number", "int"], - ]; - } - - constructor(params: { length: number }) { - super(); - this.length = params.length; - } -} - -/** The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern. */ -export class auth_SentCodeTypeFlashCall_ extends _auth_SentCodeType_ { - /** [pattern](https://core.telegram.org/api/pattern) to match */ - pattern: string; - - protected get [id](): number { - return 0xAB03C6D9; - } - - static get [name](): string { - return "auth.sentCodeTypeFlashCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pattern", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.pattern, "string", "string"], - ]; - } - - constructor(params: { pattern: string }) { - super(); - this.pattern = params.pattern; - } -} - -/** The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user. */ -export class auth_SentCodeTypeMissedCall_ extends _auth_SentCodeType_ { - /** Prefix of the phone number from which the call will be made */ - prefix: string; - /** Length of the verification code */ - length: number; - - protected get [id](): number { - return 0x82006484; - } - - static get [name](): string { - return "auth.sentCodeTypeMissedCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prefix", "string", "string"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.prefix, "string", "string"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { prefix: string; length: number }) { - super(); - this.prefix = params.prefix; - this.length = params.length; - } -} - -/** The code was sent via the [previously configured login email »](https://core.telegram.org/api/auth#email-verification) */ -export class auth_SentCodeTypeEmailCode_ extends _auth_SentCodeType_ { - /** Whether authorization through Apple ID is allowed */ - apple_signin_allowed?: true; - /** Whether authorization through Google ID is allowed */ - google_signin_allowed?: true; - /** [Pattern](https://core.telegram.org/api/pattern) of the email */ - email_pattern: string; - /** Length of the sent verification code */ - length: number; - /** Clients should wait for the specified amount of seconds before allowing the user to invoke [auth.resetLoginEmail](https://core.telegram.org/method/auth.resetLoginEmail) (will be 0 for [Premium](https://core.telegram.org/api/premium) users). */ - reset_available_period?: number; - /** An email reset was already requested, and will occur at the specified date. */ - reset_pending_date?: number; - - protected get [id](): number { - return 0xF450F59B; - } - - static get [name](): string { - return "auth.sentCodeTypeEmailCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["apple_signin_allowed", "true", "flags.0?true"], - ["google_signin_allowed", "true", "flags.1?true"], - ["email_pattern", "string", "string"], - ["length", "number", "int"], - ["reset_available_period", "number", "flags.3?int"], - ["reset_pending_date", "number", "flags.4?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.apple_signin_allowed ?? null, "true", "flags.0?true"], - [this.google_signin_allowed ?? null, "true", "flags.1?true"], - [this.email_pattern, "string", "string"], - [this.length, "number", "int"], - [this.reset_available_period ?? null, "number", "flags.3?int"], - [this.reset_pending_date ?? null, "number", "flags.4?int"], - ]; - } - - constructor(params: { apple_signin_allowed?: true; google_signin_allowed?: true; email_pattern: string; length: number; reset_available_period?: number; reset_pending_date?: number }) { - super(); - this.apple_signin_allowed = params.apple_signin_allowed; - this.google_signin_allowed = params.google_signin_allowed; - this.email_pattern = params.email_pattern; - this.length = params.length; - this.reset_available_period = params.reset_available_period; - this.reset_pending_date = params.reset_pending_date; - } -} - -/** The user should add and verify an email address in order to login as described [here »](https://core.telegram.org/api/auth#email-verification). */ -export class auth_SentCodeTypeSetUpEmailRequired_ extends _auth_SentCodeType_ { - /** Whether authorization through Apple ID is allowed */ - apple_signin_allowed?: true; - /** Whether authorization through Google ID is allowed */ - google_signin_allowed?: true; - - protected get [id](): number { - return 0xA5491DEA; - } - - static get [name](): string { - return "auth.sentCodeTypeSetUpEmailRequired" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["apple_signin_allowed", "true", "flags.0?true"], - ["google_signin_allowed", "true", "flags.1?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.apple_signin_allowed ?? null, "true", "flags.0?true"], - [this.google_signin_allowed ?? null, "true", "flags.1?true"], - ]; - } - - constructor(params?: { apple_signin_allowed?: true; google_signin_allowed?: true }) { - super(); - this.apple_signin_allowed = params?.apple_signin_allowed; - this.google_signin_allowed = params?.google_signin_allowed; - } -} - -/** The code was delivered via [fragment.com](https://fragment.com). */ -export class auth_SentCodeTypeFragmentSms_ extends _auth_SentCodeType_ { - /** Open the specified URL to log into [fragment.com](https://fragment.com) with the wallet that owns the specified phone number and view the code. */ - url: string; - /** Length of the delivered code. */ - length: number; - - protected get [id](): number { - return 0xD9565C39; - } - - static get [name](): string { - return "auth.sentCodeTypeFragmentSms" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { url: string; length: number }) { - super(); - this.url = params.url; - this.length = params.length; - } -} - -/** An authentication code should be delivered via SMS after Firebase attestation, as described in the [auth documentation »](https://core.telegram.org/api/auth). */ -export class auth_SentCodeTypeFirebaseSms_ extends _auth_SentCodeType_ { - /** On Android, the nonce to be used as described in the [auth documentation »](https://core.telegram.org/api/auth) */ - nonce?: Uint8Array; - /** On iOS, must be compared with the `receipt` extracted from the received push notification. */ - receipt?: string; - /** On iOS: if a push notification with the `ios_push_secret` isn't received within `push_timeout` seconds, the `next_type` authentication method must be used, with [auth.resendCode](https://core.telegram.org/method/auth.resendCode). */ - push_timeout?: number; - /** Length of the code that will be delivered. */ - length: number; - - protected get [id](): number { - return 0xE57B1432; - } - - static get [name](): string { - return "auth.sentCodeTypeFirebaseSms" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["nonce", Uint8Array, "flags.0?bytes"], - ["receipt", "string", "flags.1?string"], - ["push_timeout", "number", "flags.1?int"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.nonce ?? null, Uint8Array, "flags.0?bytes"], - [this.receipt ?? null, "string", "flags.1?string"], - [this.push_timeout ?? null, "number", "flags.1?int"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { nonce?: Uint8Array; receipt?: string; push_timeout?: number; length: number }) { - super(); - this.nonce = params.nonce; - this.receipt = params.receipt; - this.push_timeout = params.push_timeout; - this.length = params.length; - } -} - -/** Callback answer sent by the bot in response to a button press */ -export class messages_BotCallbackAnswer_ extends _messages_BotCallbackAnswer_ { - /** Whether an alert should be shown to the user instead of a toast notification */ - alert?: true; - /** Whether an URL is present */ - has_url?: true; - /** Whether to show games in WebView or in native UI. */ - native_ui?: true; - /** Alert to show */ - message?: string; - /** URL to open */ - url?: string; - /** For how long should this answer be cached */ - cache_time: number; - - protected get [id](): number { - return 0x36585EA4; - } - - static get [name](): string { - return "messages.botCallbackAnswer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["alert", "true", "flags.1?true"], - ["has_url", "true", "flags.3?true"], - ["native_ui", "true", "flags.4?true"], - ["message", "string", "flags.0?string"], - ["url", "string", "flags.2?string"], - ["cache_time", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.alert ?? null, "true", "flags.1?true"], - [this.has_url ?? null, "true", "flags.3?true"], - [this.native_ui ?? null, "true", "flags.4?true"], - [this.message ?? null, "string", "flags.0?string"], - [this.url ?? null, "string", "flags.2?string"], - [this.cache_time, "number", "int"], - ]; - } - - constructor(params: { alert?: true; has_url?: true; native_ui?: true; message?: string; url?: string; cache_time: number }) { - super(); - this.alert = params.alert; - this.has_url = params.has_url; - this.native_ui = params.native_ui; - this.message = params.message; - this.url = params.url; - this.cache_time = params.cache_time; - } -} - -/** Message edit data for media */ -export class messages_MessageEditData_ extends _messages_MessageEditData_ { - /** Media caption, if the specified media's caption can be edited */ - caption?: true; - - protected get [id](): number { - return 0x26B5DDE6; - } - - static get [name](): string { - return "messages.messageEditData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["caption", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.caption ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { caption?: true }) { - super(); - this.caption = params?.caption; - } -} - -/** Represents a sent inline message from the perspective of a bot (legacy constructor) */ -export class InputBotInlineMessageID_ extends _InputBotInlineMessageID_ { - /** DC ID to use when working with this inline message */ - dc_id: number; - /** ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID. */ - id: bigint; - /** Access hash of message */ - access_hash: bigint; - - protected get [id](): number { - return 0x890C3D89; - } - - static get [name](): string { - return "inputBotInlineMessageID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_id", "number", "int"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_id, "number", "int"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { dc_id: number; id: bigint; access_hash: bigint }) { - super(); - this.dc_id = params.dc_id; - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Represents a sent inline message from the perspective of a bot */ -export class InputBotInlineMessageID64_ extends _InputBotInlineMessageID_ { - /** DC ID to use when working with this inline message */ - dc_id: number; - /** ID of the owner of this message */ - owner_id: bigint; - /** ID of message */ - id: number; - /** Access hash of message */ - access_hash: bigint; - - protected get [id](): number { - return 0xB6D915D7; - } - - static get [name](): string { - return "inputBotInlineMessageID64" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_id", "number", "int"], - ["owner_id", "bigint", "long"], - ["id", "number", "int"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_id, "number", "int"], - [this.owner_id, "bigint", "long"], - [this.id, "number", "int"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { dc_id: number; owner_id: bigint; id: number; access_hash: bigint }) { - super(); - this.dc_id = params.dc_id; - this.owner_id = params.owner_id; - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** The bot requested the user to message them in private */ -export class InlineBotSwitchPM_ extends _InlineBotSwitchPM_ { - /** Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter `start_parameter` (can be empty) */ - text: string; - /** The parameter for the `/start parameter` */ - start_param: string; - - protected get [id](): number { - return 0x3C20629F; - } - - static get [name](): string { - return "inlineBotSwitchPM" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["start_param", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.start_param, "string", "string"], - ]; - } - - constructor(params: { text: string; start_param: string }) { - super(); - this.text = params.text; - this.start_param = params.start_param; - } -} - -/** Dialog info of multiple peers */ -export class messages_PeerDialogs_ extends _messages_PeerDialogs_ { - /** Dialog info */ - dialogs: Array; - /** Messages mentioned in dialog info */ - messages: Array; - /** Chats */ - chats: Array; - /** Users */ - users: Array; - /** Current [update state of dialog](https://core.telegram.org/api/updates) */ - state: enums.updates.State; - - protected get [id](): number { - return 0x3371C354; - } - - static get [name](): string { - return "messages.peerDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dialogs", [_Dialog_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["state", _updates_State_, "updates.State"], - ]; - } - - protected get [params](): Params { - return [ - [this.dialogs, [_Dialog_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.state, _updates_State_, "updates.State"], - ]; - } - - constructor(params: { dialogs: Array; messages: Array; chats: Array; users: Array; state: enums.updates.State }) { - super(); - this.dialogs = params.dialogs; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - this.state = params.state; - } -} - -/** Top peer */ -export class TopPeer_ extends _TopPeer_ { - /** Peer */ - peer: enums.Peer; - /** Rating as computed in [top peer rating »](https://core.telegram.org/api/top-rating) */ - rating: number; - - protected get [id](): number { - return 0xEDCDC05B; - } - - static get [name](): string { - return "topPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["rating", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.rating, "number", "double"], - ]; - } - - constructor(params: { peer: enums.Peer; rating: number }) { - super(); - this.peer = params.peer; - this.rating = params.rating; - } -} - -/** Most used bots */ -export class TopPeerCategoryBotsPM_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0xAB661B5B; - } - - static get [name](): string { - return "topPeerCategoryBotsPM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Most used inline bots */ -export class TopPeerCategoryBotsInline_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0x148677E2; - } - - static get [name](): string { - return "topPeerCategoryBotsInline" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Users we've chatted most frequently with */ -export class TopPeerCategoryCorrespondents_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0x0637B7ED; - } - - static get [name](): string { - return "topPeerCategoryCorrespondents" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Often-opened groups and supergroups */ -export class TopPeerCategoryGroups_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0xBD17A14A; - } - - static get [name](): string { - return "topPeerCategoryGroups" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Most frequently visited channels */ -export class TopPeerCategoryChannels_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0x161D9628; - } - - static get [name](): string { - return "topPeerCategoryChannels" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Most frequently called users */ -export class TopPeerCategoryPhoneCalls_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0x1E76A78C; - } - - static get [name](): string { - return "topPeerCategoryPhoneCalls" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Users to which the users often forwards messages to */ -export class TopPeerCategoryForwardUsers_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0xA8406CA9; - } - - static get [name](): string { - return "topPeerCategoryForwardUsers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Chats to which the users often forwards messages to */ -export class TopPeerCategoryForwardChats_ extends _TopPeerCategory_ { - protected get [id](): number { - return 0xFBEEC0F0; - } - - static get [name](): string { - return "topPeerCategoryForwardChats" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Top peer category */ -export class TopPeerCategoryPeers_ extends _TopPeerCategoryPeers_ { - /** Top peer category of peers */ - category: enums.TopPeerCategory; - /** Count of peers */ - count: number; - /** Peers */ - peers: Array; - - protected get [id](): number { - return 0xFB834291; - } - - static get [name](): string { - return "topPeerCategoryPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["category", _TopPeerCategory_, "TopPeerCategory"], - ["count", "number", "int"], - ["peers", [_TopPeer_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.category, _TopPeerCategory_, "TopPeerCategory"], - [this.count, "number", "int"], - [this.peers, [_TopPeer_], "Vector"], - ]; - } - - constructor(params: { category: enums.TopPeerCategory; count: number; peers: Array }) { - super(); - this.category = params.category; - this.count = params.count; - this.peers = params.peers; - } -} - -/** Top peer info hasn't changed */ -export class contacts_TopPeersNotModified_ extends _contacts_TopPeers_ { - protected get [id](): number { - return 0xDE266EF5; - } - - static get [name](): string { - return "contacts.topPeersNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Top peers */ -export class contacts_TopPeers_ extends _contacts_TopPeers_ { - /** Top peers by top peer category */ - categories: Array; - /** Chats */ - chats: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0x70B772A8; - } - - static get [name](): string { - return "contacts.topPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["categories", [_TopPeerCategoryPeers_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.categories, [_TopPeerCategoryPeers_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { categories: Array; chats: Array; users: Array }) { - super(); - this.categories = params.categories; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Top peers disabled */ -export class contacts_TopPeersDisabled_ extends _contacts_TopPeers_ { - protected get [id](): number { - return 0xB52C939D; - } - - static get [name](): string { - return "contacts.topPeersDisabled" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Empty draft */ -export class DraftMessageEmpty_ extends _DraftMessage_ { - /** When was the draft last updated */ - date?: number; - - protected get [id](): number { - return 0x1B0C841A; - } - - static get [name](): string { - return "draftMessageEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["date", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.date ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params?: { date?: number }) { - super(); - this.date = params?.date; - } -} - -/** Represents a message [draft](https://core.telegram.org/api/drafts). */ -export class DraftMessage_ extends _DraftMessage_ { - /** Whether no webpage preview will be generated */ - no_webpage?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** If set, indicates that the message should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** The draft */ - message: string; - /** Message [entities](https://core.telegram.org/api/entities) for styled text. */ - entities?: Array; - /** Media. */ - media?: enums.InputMedia; - /** Date of last update of the draft. */ - date: number; - - protected get [id](): number { - return 0x3FCCF7EF; - } - - static get [name](): string { - return "draftMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.1?true"], - ["invert_media", "true", "flags.6?true"], - ["reply_to", _InputReplyTo_, "flags.4?InputReplyTo"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.3?Vector"], - ["media", _InputMedia_, "flags.5?InputMedia"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.1?true"], - [this.invert_media ?? null, "true", "flags.6?true"], - [this.reply_to ?? null, _InputReplyTo_, "flags.4?InputReplyTo"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.3?Vector"], - [this.media ?? null, _InputMedia_, "flags.5?InputMedia"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { no_webpage?: true; invert_media?: true; reply_to?: enums.InputReplyTo; message: string; entities?: Array; media?: enums.InputMedia; date: number }) { - super(); - this.no_webpage = params.no_webpage; - this.invert_media = params.invert_media; - this.reply_to = params.reply_to; - this.message = params.message; - this.entities = params.entities; - this.media = params.media; - this.date = params.date; - } -} - -/** Featured stickers haven't changed */ -export class messages_FeaturedStickersNotModified_ extends _messages_FeaturedStickers_ { - /** Total number of featured stickers */ - count: number; - - protected get [id](): number { - return 0xC6DC0C66; - } - - static get [name](): string { - return "messages.featuredStickersNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - ]; - } - - constructor(params: { count: number }) { - super(); - this.count = params.count; - } -} - -/** Featured stickersets */ -export class messages_FeaturedStickers_ extends _messages_FeaturedStickers_ { - /** Whether this is a premium stickerset */ - premium?: true; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Total number of featured stickers */ - count: number; - /** Featured stickersets */ - sets: Array; - /** IDs of new featured stickersets */ - unread: Array; - - protected get [id](): number { - return 0xBE382906; - } - - static get [name](): string { - return "messages.featuredStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["premium", "true", "flags.0?true"], - ["hash", "bigint", "long"], - ["count", "number", "int"], - ["sets", [_StickerSetCovered_], "Vector"], - ["unread", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.premium ?? null, "true", "flags.0?true"], - [this.hash, "bigint", "long"], - [this.count, "number", "int"], - [this.sets, [_StickerSetCovered_], "Vector"], - [this.unread, ["bigint"], "Vector"], - ]; - } - - constructor(params: { premium?: true; hash: bigint; count: number; sets: Array; unread: Array }) { - super(); - this.premium = params.premium; - this.hash = params.hash; - this.count = params.count; - this.sets = params.sets; - this.unread = params.unread; - } -} - -/** No new recent sticker was found */ -export class messages_RecentStickersNotModified_ extends _messages_RecentStickers_ { - protected get [id](): number { - return 0x0B17F890; - } - - static get [name](): string { - return "messages.recentStickersNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Recently used stickers */ -export class messages_RecentStickers_ extends _messages_RecentStickers_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Emojis associated to stickers */ - packs: Array; - /** Recent stickers */ - stickers: Array; - /** When was each sticker last used */ - dates: Array; - - protected get [id](): number { - return 0x88D37C56; - } - - static get [name](): string { - return "messages.recentStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["packs", [_StickerPack_], "Vector"], - ["stickers", [_Document_], "Vector"], - ["dates", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.packs, [_StickerPack_], "Vector"], - [this.stickers, [_Document_], "Vector"], - [this.dates, ["number"], "Vector"], - ]; - } - - constructor(params: { hash: bigint; packs: Array; stickers: Array; dates: Array }) { - super(); - this.hash = params.hash; - this.packs = params.packs; - this.stickers = params.stickers; - this.dates = params.dates; - } -} - -/** Archived stickersets */ -export class messages_ArchivedStickers_ extends _messages_ArchivedStickers_ { - /** Number of archived stickers */ - count: number; - /** Archived stickersets */ - sets: Array; - - protected get [id](): number { - return 0x4FCBA9C8; - } - - static get [name](): string { - return "messages.archivedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["sets", [_StickerSetCovered_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.sets, [_StickerSetCovered_], "Vector"], - ]; - } - - constructor(params: { count: number; sets: Array }) { - super(); - this.count = params.count; - this.sets = params.sets; - } -} - -/** The stickerset was installed successfully */ -export class messages_StickerSetInstallResultSuccess_ extends _messages_StickerSetInstallResult_ { - protected get [id](): number { - return 0x38641628; - } - - static get [name](): string { - return "messages.stickerSetInstallResultSuccess" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The stickerset was installed, but since there are too many stickersets some were archived */ -export class messages_StickerSetInstallResultArchive_ extends _messages_StickerSetInstallResult_ { - /** Archived stickersets */ - sets: Array; - - protected get [id](): number { - return 0x35E410A8; - } - - static get [name](): string { - return "messages.stickerSetInstallResultArchive" - } - - static get [paramDesc](): ParamDesc { - return [ - ["sets", [_StickerSetCovered_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.sets, [_StickerSetCovered_], "Vector"], - ]; - } - - constructor(params: { sets: Array }) { - super(); - this.sets = params.sets; - } -} - -/** Stickerset with a single sticker as preview */ -export class StickerSetCovered_ extends _StickerSetCovered_ { - /** Stickerset */ - set: enums.StickerSet; - /** Preview */ - cover: enums.Document; - - protected get [id](): number { - return 0x6410A5D2; - } - - static get [name](): string { - return "stickerSetCovered" - } - - static get [paramDesc](): ParamDesc { - return [ - ["set", _StickerSet_, "StickerSet"], - ["cover", _Document_, "Document"], - ]; - } - - protected get [params](): Params { - return [ - [this.set, _StickerSet_, "StickerSet"], - [this.cover, _Document_, "Document"], - ]; - } - - constructor(params: { set: enums.StickerSet; cover: enums.Document }) { - super(); - this.set = params.set; - this.cover = params.cover; - } -} - -/** Stickerset, with multiple stickers as preview */ -export class StickerSetMultiCovered_ extends _StickerSetCovered_ { - /** Stickerset */ - set: enums.StickerSet; - /** Preview stickers */ - covers: Array; - - protected get [id](): number { - return 0x3407E51B; - } - - static get [name](): string { - return "stickerSetMultiCovered" - } - - static get [paramDesc](): ParamDesc { - return [ - ["set", _StickerSet_, "StickerSet"], - ["covers", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.set, _StickerSet_, "StickerSet"], - [this.covers, [_Document_], "Vector"], - ]; - } - - constructor(params: { set: enums.StickerSet; covers: Array }) { - super(); - this.set = params.set; - this.covers = params.covers; - } -} - -/** Stickerset preview with all stickers of the stickerset included. -Currently used only for [custom emoji stickersets](https://core.telegram.org/api/custom-emoji), to avoid a further call to [messages.getStickerSet](https://core.telegram.org/method/messages.getStickerSet). */ -export class StickerSetFullCovered_ extends _StickerSetCovered_ { - /** Stickerset */ - set: enums.StickerSet; - /** Emoji information about every sticker in the stickerset */ - packs: Array; - /** Keywords for some or every sticker in the stickerset. */ - keywords: Array; - /** Stickers */ - documents: Array; - - protected get [id](): number { - return 0x40D13C0E; - } - - static get [name](): string { - return "stickerSetFullCovered" - } - - static get [paramDesc](): ParamDesc { - return [ - ["set", _StickerSet_, "StickerSet"], - ["packs", [_StickerPack_], "Vector"], - ["keywords", [_StickerKeyword_], "Vector"], - ["documents", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.set, _StickerSet_, "StickerSet"], - [this.packs, [_StickerPack_], "Vector"], - [this.keywords, [_StickerKeyword_], "Vector"], - [this.documents, [_Document_], "Vector"], - ]; - } - - constructor(params: { set: enums.StickerSet; packs: Array; keywords: Array; documents: Array }) { - super(); - this.set = params.set; - this.packs = params.packs; - this.keywords = params.keywords; - this.documents = params.documents; - } -} - -/** Just the stickerset information, with no previews. */ -export class StickerSetNoCovered_ extends _StickerSetCovered_ { - /** Stickerset information. */ - set: enums.StickerSet; - - protected get [id](): number { - return 0x77B15D1C; - } - - static get [name](): string { - return "stickerSetNoCovered" - } - - static get [paramDesc](): ParamDesc { - return [ - ["set", _StickerSet_, "StickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.set, _StickerSet_, "StickerSet"], - ]; - } - - constructor(params: { set: enums.StickerSet }) { - super(); - this.set = params.set; - } -} - -/** Position on a photo where a mask should be placed when [attaching stickers to media »](https://core.telegram.org/api/stickers#attached-stickers) */ -export class MaskCoords_ extends _MaskCoords_ { - /** Part of the face, relative to which the mask should be placed */ - n: number; - /** Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) */ - x: number; - /** Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position) */ - y: number; - /** Mask scaling coefficient. (For example, 2.0 means a doubled size) */ - zoom: number; - - protected get [id](): number { - return 0xAED6DBB2; - } - - static get [name](): string { - return "maskCoords" - } - - static get [paramDesc](): ParamDesc { - return [ - ["n", "number", "int"], - ["x", "number", "double"], - ["y", "number", "double"], - ["zoom", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.n, "number", "int"], - [this.x, "number", "double"], - [this.y, "number", "double"], - [this.zoom, "number", "double"], - ]; - } - - constructor(params: { n: number; x: number; y: number; zoom: number }) { - super(); - this.n = params.n; - this.x = params.x; - this.y = params.y; - this.zoom = params.zoom; - } -} - -/** A photo with stickers attached */ -export class InputStickeredMediaPhoto_ extends _InputStickeredMedia_ { - /** The photo */ - id: enums.InputPhoto; - - protected get [id](): number { - return 0x4A992157; - } - - static get [name](): string { - return "inputStickeredMediaPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", _InputPhoto_, "InputPhoto"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, _InputPhoto_, "InputPhoto"], - ]; - } - - constructor(params: { id: enums.InputPhoto }) { - super(); - this.id = params.id; - } -} - -/** A document with stickers attached */ -export class InputStickeredMediaDocument_ extends _InputStickeredMedia_ { - /** The document */ - id: enums.InputDocument; - - protected get [id](): number { - return 0x0438865B; - } - - static get [name](): string { - return "inputStickeredMediaDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", _InputDocument_, "InputDocument"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, _InputDocument_, "InputDocument"], - ]; - } - - constructor(params: { id: enums.InputDocument }) { - super(); - this.id = params.id; - } -} - -/** Indicates an already sent game */ -export class Game_ extends _Game_ { - /** ID of the game */ - id: bigint; - /** Access hash of the game */ - access_hash: bigint; - /** Short name for the game */ - short_name: string; - /** Title of the game */ - title: string; - /** Game description */ - description: string; - /** Game preview */ - photo: enums.Photo; - /** Optional attached document */ - document?: enums.Document; - - protected get [id](): number { - return 0xBDF9653B; - } - - static get [name](): string { - return "game" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["short_name", "string", "string"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _Photo_, "Photo"], - ["document", _Document_, "flags.0?Document"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.short_name, "string", "string"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo, _Photo_, "Photo"], - [this.document ?? null, _Document_, "flags.0?Document"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; short_name: string; title: string; description: string; photo: enums.Photo; document?: enums.Document }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.short_name = params.short_name; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.document = params.document; - } -} - -/** Indicates an already sent game */ -export class InputGameID_ extends _InputGame_ { - /** game ID from [Game](https://core.telegram.org/type/Game) constructor */ - id: bigint; - /** access hash from [Game](https://core.telegram.org/type/Game) constructor */ - access_hash: bigint; - - protected get [id](): number { - return 0x032C3E77; - } - - static get [name](): string { - return "inputGameID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Game by short name */ -export class InputGameShortName_ extends _InputGame_ { - /** The bot that provides the game */ - bot_id: enums.InputUser; - /** The game's short name, usually obtained from a [game link »](https://core.telegram.org/api/links#game-links) */ - short_name: string; - - protected get [id](): number { - return 0xC331E80A; - } - - static get [name](): string { - return "inputGameShortName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot_id", _InputUser_, "InputUser"], - ["short_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot_id, _InputUser_, "InputUser"], - [this.short_name, "string", "string"], - ]; - } - - constructor(params: { bot_id: enums.InputUser; short_name: string }) { - super(); - this.bot_id = params.bot_id; - this.short_name = params.short_name; - } -} - -/** Game highscore */ -export class HighScore_ extends _HighScore_ { - /** Position in highscore list */ - pos: number; - /** User ID */ - user_id: bigint; - /** Score */ - score: number; - - protected get [id](): number { - return 0x73A379EB; - } - - static get [name](): string { - return "highScore" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pos", "number", "int"], - ["user_id", "bigint", "long"], - ["score", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.pos, "number", "int"], - [this.user_id, "bigint", "long"], - [this.score, "number", "int"], - ]; - } - - constructor(params: { pos: number; user_id: bigint; score: number }) { - super(); - this.pos = params.pos; - this.user_id = params.user_id; - this.score = params.score; - } -} - -/** Highscores in a game */ -export class messages_HighScores_ extends _messages_HighScores_ { - /** Highscores */ - scores: Array; - /** Users, associated to the highscores */ - users: Array; - - protected get [id](): number { - return 0x9A3BFD99; - } - - static get [name](): string { - return "messages.highScores" - } - - static get [paramDesc](): ParamDesc { - return [ - ["scores", [_HighScore_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.scores, [_HighScore_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { scores: Array; users: Array }) { - super(); - this.scores = params.scores; - this.users = params.users; - } -} - -/** Empty rich text element */ -export class TextEmpty_ extends _RichText_ { - protected get [id](): number { - return 0xDC3D824F; - } - - static get [name](): string { - return "textEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Plain text */ -export class TextPlain_ extends _RichText_ { - /** Text */ - text: string; - - protected get [id](): number { - return 0x744694E0; - } - - static get [name](): string { - return "textPlain" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - ]; - } - - constructor(params: { text: string }) { - super(); - this.text = params.text; - } -} - -/** **Bold** text */ -export class TextBold_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x6724ABC4; - } - - static get [name](): string { - return "textBold" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** _Italic_ text */ -export class TextItalic_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0xD912A59C; - } - - static get [name](): string { - return "textItalic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Underlined text */ -export class TextUnderline_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0xC12622C4; - } - - static get [name](): string { - return "textUnderline" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Strikethrough text */ -export class TextStrike_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x9BF8BB95; - } - - static get [name](): string { - return "textStrike" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** `fixed-width` rich text */ -export class TextFixed_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x6C3F19B9; - } - - static get [name](): string { - return "textFixed" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Link */ -export class TextUrl_ extends _RichText_ { - /** Text of link */ - text: enums.RichText; - /** Webpage HTTP URL */ - url: string; - /** If a preview was already generated for the page, the page ID */ - webpage_id: bigint; - - protected get [id](): number { - return 0x3C2884C1; - } - - static get [name](): string { - return "textUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["url", "string", "string"], - ["webpage_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.url, "string", "string"], - [this.webpage_id, "bigint", "long"], - ]; - } - - constructor(params: { text: enums.RichText; url: string; webpage_id: bigint }) { - super(); - this.text = params.text; - this.url = params.url; - this.webpage_id = params.webpage_id; - } -} - -/** Rich text email link */ -export class TextEmail_ extends _RichText_ { - /** Link text */ - text: enums.RichText; - /** Email address */ - email: string; - - protected get [id](): number { - return 0xDE5A0DD6; - } - - static get [name](): string { - return "textEmail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["email", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.email, "string", "string"], - ]; - } - - constructor(params: { text: enums.RichText; email: string }) { - super(); - this.text = params.text; - this.email = params.email; - } -} - -/** Concatenation of rich texts */ -export class TextConcat_ extends _RichText_ { - /** Concatenated rich texts */ - texts: Array; - - protected get [id](): number { - return 0x7E6260D7; - } - - static get [name](): string { - return "textConcat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["texts", [_RichText_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.texts, [_RichText_], "Vector"], - ]; - } - - constructor(params: { texts: Array }) { - super(); - this.texts = params.texts; - } -} - -/** Subscript text */ -export class TextSubscript_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0xED6A8504; - } - - static get [name](): string { - return "textSubscript" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Superscript text */ -export class TextSuperscript_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0xC7FB5E01; - } - - static get [name](): string { - return "textSuperscript" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Highlighted text */ -export class TextMarked_ extends _RichText_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x034B8621; - } - - static get [name](): string { - return "textMarked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Rich text linked to a phone number */ -export class TextPhone_ extends _RichText_ { - /** Text */ - text: enums.RichText; - /** Phone number */ - phone: string; - - protected get [id](): number { - return 0x1CCB966A; - } - - static get [name](): string { - return "textPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["phone", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.phone, "string", "string"], - ]; - } - - constructor(params: { text: enums.RichText; phone: string }) { - super(); - this.text = params.text; - this.phone = params.phone; - } -} - -/** Inline image */ -export class TextImage_ extends _RichText_ { - /** Document ID */ - document_id: bigint; - /** Width */ - w: number; - /** Height */ - h: number; - - protected get [id](): number { - return 0x081CCF4F; - } - - static get [name](): string { - return "textImage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document_id", "bigint", "long"], - ["w", "number", "int"], - ["h", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.document_id, "bigint", "long"], - [this.w, "number", "int"], - [this.h, "number", "int"], - ]; - } - - constructor(params: { document_id: bigint; w: number; h: number }) { - super(); - this.document_id = params.document_id; - this.w = params.w; - this.h = params.h; - } -} - -/** Text linking to another section of the page */ -export class TextAnchor_ extends _RichText_ { - /** Text */ - text: enums.RichText; - /** Section name */ - name: string; - - protected get [id](): number { - return 0x35553762; - } - - static get [name](): string { - return "textAnchor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.name, "string", "string"], - ]; - } - - constructor(params: { text: enums.RichText; name: string }) { - super(); - this.text = params.text; - this.name = params.name; - } -} - -/** Unsupported IV element */ -export class PageBlockUnsupported_ extends _PageBlock_ { - protected get [id](): number { - return 0x13567E8A; - } - - static get [name](): string { - return "pageBlockUnsupported" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Title */ -export class PageBlockTitle_ extends _PageBlock_ { - /** Title */ - text: enums.RichText; - - protected get [id](): number { - return 0x70ABC3FD; - } - - static get [name](): string { - return "pageBlockTitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Subtitle */ -export class PageBlockSubtitle_ extends _PageBlock_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x8FFA9A1F; - } - - static get [name](): string { - return "pageBlockSubtitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Author and date of creation of article */ -export class PageBlockAuthorDate_ extends _PageBlock_ { - /** Author name */ - author: enums.RichText; - /** Date of publication */ - published_date: number; - - protected get [id](): number { - return 0xBAAFE5E0; - } - - static get [name](): string { - return "pageBlockAuthorDate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["author", _RichText_, "RichText"], - ["published_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.author, _RichText_, "RichText"], - [this.published_date, "number", "int"], - ]; - } - - constructor(params: { author: enums.RichText; published_date: number }) { - super(); - this.author = params.author; - this.published_date = params.published_date; - } -} - -/** Page header */ -export class PageBlockHeader_ extends _PageBlock_ { - /** Contents */ - text: enums.RichText; - - protected get [id](): number { - return 0xBFD064EC; - } - - static get [name](): string { - return "pageBlockHeader" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Subheader */ -export class PageBlockSubheader_ extends _PageBlock_ { - /** Subheader */ - text: enums.RichText; - - protected get [id](): number { - return 0xF12BB6E1; - } - - static get [name](): string { - return "pageBlockSubheader" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** A paragraph */ -export class PageBlockParagraph_ extends _PageBlock_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x467A0766; - } - - static get [name](): string { - return "pageBlockParagraph" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Preformatted (`
` text) */
-export class PageBlockPreformatted_ extends _PageBlock_ {
-  /** Text */
-  text: enums.RichText;
-  /** Programming language of preformatted text */
-  language: string;
-
-  protected get [id](): number {
-    return 0xC070D93E;
-  }
-
-  static get [name](): string {
-    return "pageBlockPreformatted"
-  }
-
-  static get [paramDesc](): ParamDesc {
-    return [
-      ["text", _RichText_, "RichText"],
-      ["language", "string", "string"],
-    ];
-  }
-
-  protected get [params](): Params {
-    return [
-      [this.text, _RichText_, "RichText"],
-      [this.language, "string", "string"],
-    ];
-  }
-
-  constructor(params: { text: enums.RichText; language: string }) {
-    super();
-    this.text = params.text;
-    this.language = params.language;
-  }
-}
-
-/** Page footer */
-export class PageBlockFooter_ extends _PageBlock_ {
-  /** Contents */
-  text: enums.RichText;
-
-  protected get [id](): number {
-    return 0x48870999;
-  }
-
-  static get [name](): string {
-    return "pageBlockFooter"
-  }
-
-  static get [paramDesc](): ParamDesc {
-    return [
-      ["text", _RichText_, "RichText"],
-    ];
-  }
-
-  protected get [params](): Params {
-    return [
-      [this.text, _RichText_, "RichText"],
-    ];
-  }
-
-  constructor(params: { text: enums.RichText }) {
-    super();
-    this.text = params.text;
-  }
-}
-
-/** An empty block separating a page */
-export class PageBlockDivider_ extends _PageBlock_ {
-  protected get [id](): number {
-    return 0xDB20B188;
-  }
-
-  static get [name](): string {
-    return "pageBlockDivider"
-  }
-
-  static get [paramDesc](): ParamDesc {
-    return [];
-  }
-
-  protected get [params](): Params {
-    return [];
-  }
-
-  constructor() {
-    super();
-  }
-}
-
-/** Link to section within the page itself (like `anchor`) */
-export class PageBlockAnchor_ extends _PageBlock_ {
-  /** Name of target section */
-  name: string;
-
-  protected get [id](): number {
-    return 0xCE0D37B0;
-  }
-
-  static get [name](): string {
-    return "pageBlockAnchor"
-  }
-
-  static get [paramDesc](): ParamDesc {
-    return [
-      ["name", "string", "string"],
-    ];
-  }
-
-  protected get [params](): Params {
-    return [
-      [this.name, "string", "string"],
-    ];
-  }
-
-  constructor(params: { name: string }) {
-    super();
-    this.name = params.name;
-  }
-}
-
-/** Unordered list of IV blocks */
-export class PageBlockList_ extends _PageBlock_ {
-  /** List of blocks in an IV page */
-  items: Array;
-
-  protected get [id](): number {
-    return 0xE4E88011;
-  }
-
-  static get [name](): string {
-    return "pageBlockList"
-  }
-
-  static get [paramDesc](): ParamDesc {
-    return [
-      ["items", [_PageListItem_], "Vector"],
-    ];
-  }
-
-  protected get [params](): Params {
-    return [
-      [this.items, [_PageListItem_], "Vector"],
-    ];
-  }
-
-  constructor(params: { items: Array }) {
-    super();
-    this.items = params.items;
-  }
-}
-
-/** Quote (equivalent to the HTML `
`) */ -export class PageBlockBlockquote_ extends _PageBlock_ { - /** Quote contents */ - text: enums.RichText; - /** Caption */ - caption: enums.RichText; - - protected get [id](): number { - return 0x263D7C26; - } - - static get [name](): string { - return "pageBlockBlockquote" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["caption", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.caption, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText; caption: enums.RichText }) { - super(); - this.text = params.text; - this.caption = params.caption; - } -} - -/** Pullquote */ -export class PageBlockPullquote_ extends _PageBlock_ { - /** Text */ - text: enums.RichText; - /** Caption */ - caption: enums.RichText; - - protected get [id](): number { - return 0x4F4456D3; - } - - static get [name](): string { - return "pageBlockPullquote" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["caption", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.caption, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText; caption: enums.RichText }) { - super(); - this.text = params.text; - this.caption = params.caption; - } -} - -/** A photo */ -export class PageBlockPhoto_ extends _PageBlock_ { - /** Photo ID */ - photo_id: bigint; - /** Caption */ - caption: enums.PageCaption; - /** HTTP URL of page the photo leads to when clicked */ - url?: string; - /** ID of preview of the page the photo leads to when clicked */ - webpage_id?: bigint; - - protected get [id](): number { - return 0x1759C560; - } - - static get [name](): string { - return "pageBlockPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["photo_id", "bigint", "long"], - ["caption", _PageCaption_, "PageCaption"], - ["url", "string", "flags.0?string"], - ["webpage_id", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.photo_id, "bigint", "long"], - [this.caption, _PageCaption_, "PageCaption"], - [this.url ?? null, "string", "flags.0?string"], - [this.webpage_id ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params: { photo_id: bigint; caption: enums.PageCaption; url?: string; webpage_id?: bigint }) { - super(); - this.photo_id = params.photo_id; - this.caption = params.caption; - this.url = params.url; - this.webpage_id = params.webpage_id; - } -} - -/** Video */ -export class PageBlockVideo_ extends _PageBlock_ { - /** Whether the video is set to autoplay */ - autoplay?: true; - /** Whether the video is set to loop */ - loop?: true; - /** Video ID */ - video_id: bigint; - /** Caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0x7C8FE7B6; - } - - static get [name](): string { - return "pageBlockVideo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["autoplay", "true", "flags.0?true"], - ["loop", "true", "flags.1?true"], - ["video_id", "bigint", "long"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.autoplay ?? null, "true", "flags.0?true"], - [this.loop ?? null, "true", "flags.1?true"], - [this.video_id, "bigint", "long"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { autoplay?: true; loop?: true; video_id: bigint; caption: enums.PageCaption }) { - super(); - this.autoplay = params.autoplay; - this.loop = params.loop; - this.video_id = params.video_id; - this.caption = params.caption; - } -} - -/** A page cover */ -export class PageBlockCover_ extends _PageBlock_ { - /** Cover */ - cover: enums.PageBlock; - - protected get [id](): number { - return 0x39F23300; - } - - static get [name](): string { - return "pageBlockCover" - } - - static get [paramDesc](): ParamDesc { - return [ - ["cover", _PageBlock_, "PageBlock"], - ]; - } - - protected get [params](): Params { - return [ - [this.cover, _PageBlock_, "PageBlock"], - ]; - } - - constructor(params: { cover: enums.PageBlock }) { - super(); - this.cover = params.cover; - } -} - -/** An embedded webpage */ -export class PageBlockEmbed_ extends _PageBlock_ { - /** Whether the block should be full width */ - full_width?: true; - /** Whether scrolling should be allowed */ - allow_scrolling?: true; - /** Web page URL, if available */ - url?: string; - /** HTML-markup of the embedded page */ - html?: string; - /** Poster photo, if available */ - poster_photo_id?: bigint; - /** Block width, if known */ - w?: number; - /** Block height, if known */ - h?: number; - /** Caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0xA8718DC5; - } - - static get [name](): string { - return "pageBlockEmbed" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["full_width", "true", "flags.0?true"], - ["allow_scrolling", "true", "flags.3?true"], - ["url", "string", "flags.1?string"], - ["html", "string", "flags.2?string"], - ["poster_photo_id", "bigint", "flags.4?long"], - ["w", "number", "flags.5?int"], - ["h", "number", "flags.5?int"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.full_width ?? null, "true", "flags.0?true"], - [this.allow_scrolling ?? null, "true", "flags.3?true"], - [this.url ?? null, "string", "flags.1?string"], - [this.html ?? null, "string", "flags.2?string"], - [this.poster_photo_id ?? null, "bigint", "flags.4?long"], - [this.w ?? null, "number", "flags.5?int"], - [this.h ?? null, "number", "flags.5?int"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { full_width?: true; allow_scrolling?: true; url?: string; html?: string; poster_photo_id?: bigint; w?: number; h?: number; caption: enums.PageCaption }) { - super(); - this.full_width = params.full_width; - this.allow_scrolling = params.allow_scrolling; - this.url = params.url; - this.html = params.html; - this.poster_photo_id = params.poster_photo_id; - this.w = params.w; - this.h = params.h; - this.caption = params.caption; - } -} - -/** An embedded post */ -export class PageBlockEmbedPost_ extends _PageBlock_ { - /** Web page URL */ - url: string; - /** ID of generated webpage preview */ - webpage_id: bigint; - /** ID of the author's photo */ - author_photo_id: bigint; - /** Author name */ - author: string; - /** Creation date */ - date: number; - /** Post contents */ - blocks: Array; - /** Caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0xF259A80B; - } - - static get [name](): string { - return "pageBlockEmbedPost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["webpage_id", "bigint", "long"], - ["author_photo_id", "bigint", "long"], - ["author", "string", "string"], - ["date", "number", "int"], - ["blocks", [_PageBlock_], "Vector"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.webpage_id, "bigint", "long"], - [this.author_photo_id, "bigint", "long"], - [this.author, "string", "string"], - [this.date, "number", "int"], - [this.blocks, [_PageBlock_], "Vector"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { url: string; webpage_id: bigint; author_photo_id: bigint; author: string; date: number; blocks: Array; caption: enums.PageCaption }) { - super(); - this.url = params.url; - this.webpage_id = params.webpage_id; - this.author_photo_id = params.author_photo_id; - this.author = params.author; - this.date = params.date; - this.blocks = params.blocks; - this.caption = params.caption; - } -} - -/** Collage of media */ -export class PageBlockCollage_ extends _PageBlock_ { - /** Media elements */ - items: Array; - /** Caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0x65A0FA4D; - } - - static get [name](): string { - return "pageBlockCollage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["items", [_PageBlock_], "Vector"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - [this.items, [_PageBlock_], "Vector"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { items: Array; caption: enums.PageCaption }) { - super(); - this.items = params.items; - this.caption = params.caption; - } -} - -/** Slideshow */ -export class PageBlockSlideshow_ extends _PageBlock_ { - /** Slideshow items */ - items: Array; - /** Caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0x031F9590; - } - - static get [name](): string { - return "pageBlockSlideshow" - } - - static get [paramDesc](): ParamDesc { - return [ - ["items", [_PageBlock_], "Vector"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - [this.items, [_PageBlock_], "Vector"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { items: Array; caption: enums.PageCaption }) { - super(); - this.items = params.items; - this.caption = params.caption; - } -} - -/** Reference to a telegram channel */ -export class PageBlockChannel_ extends _PageBlock_ { - /** The channel/supergroup/chat */ - channel: enums.Chat; - - protected get [id](): number { - return 0xEF1751B5; - } - - static get [name](): string { - return "pageBlockChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", _Chat_, "Chat"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, _Chat_, "Chat"], - ]; - } - - constructor(params: { channel: enums.Chat }) { - super(); - this.channel = params.channel; - } -} - -/** Audio */ -export class PageBlockAudio_ extends _PageBlock_ { - /** Audio ID (to be fetched from the container [page](https://core.telegram.org/constructor/page) constructor */ - audio_id: bigint; - /** Audio caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0x804361EA; - } - - static get [name](): string { - return "pageBlockAudio" - } - - static get [paramDesc](): ParamDesc { - return [ - ["audio_id", "bigint", "long"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - [this.audio_id, "bigint", "long"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { audio_id: bigint; caption: enums.PageCaption }) { - super(); - this.audio_id = params.audio_id; - this.caption = params.caption; - } -} - -/** Kicker */ -export class PageBlockKicker_ extends _PageBlock_ { - /** Contents */ - text: enums.RichText; - - protected get [id](): number { - return 0x1E148390; - } - - static get [name](): string { - return "pageBlockKicker" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** Table */ -export class PageBlockTable_ extends _PageBlock_ { - /** Does the table have a visible border? */ - bordered?: true; - /** Is the table striped? */ - striped?: true; - /** Title */ - title: enums.RichText; - /** Table rows */ - rows: Array; - - protected get [id](): number { - return 0xBF4DEA82; - } - - static get [name](): string { - return "pageBlockTable" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["bordered", "true", "flags.0?true"], - ["striped", "true", "flags.1?true"], - ["title", _RichText_, "RichText"], - ["rows", [_PageTableRow_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.bordered ?? null, "true", "flags.0?true"], - [this.striped ?? null, "true", "flags.1?true"], - [this.title, _RichText_, "RichText"], - [this.rows, [_PageTableRow_], "Vector"], - ]; - } - - constructor(params: { bordered?: true; striped?: true; title: enums.RichText; rows: Array }) { - super(); - this.bordered = params.bordered; - this.striped = params.striped; - this.title = params.title; - this.rows = params.rows; - } -} - -/** Ordered list of IV blocks */ -export class PageBlockOrderedList_ extends _PageBlock_ { - /** List items */ - items: Array; - - protected get [id](): number { - return 0x9A8AE1E1; - } - - static get [name](): string { - return "pageBlockOrderedList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["items", [_PageListOrderedItem_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.items, [_PageListOrderedItem_], "Vector"], - ]; - } - - constructor(params: { items: Array }) { - super(); - this.items = params.items; - } -} - -/** A collapsible details block */ -export class PageBlockDetails_ extends _PageBlock_ { - /** Whether the block is open by default */ - open?: true; - /** Block contents */ - blocks: Array; - /** Always visible heading for the block */ - title: enums.RichText; - - protected get [id](): number { - return 0x76768BED; - } - - static get [name](): string { - return "pageBlockDetails" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["open", "true", "flags.0?true"], - ["blocks", [_PageBlock_], "Vector"], - ["title", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.open ?? null, "true", "flags.0?true"], - [this.blocks, [_PageBlock_], "Vector"], - [this.title, _RichText_, "RichText"], - ]; - } - - constructor(params: { open?: true; blocks: Array; title: enums.RichText }) { - super(); - this.open = params.open; - this.blocks = params.blocks; - this.title = params.title; - } -} - -/** Related articles */ -export class PageBlockRelatedArticles_ extends _PageBlock_ { - /** Title */ - title: enums.RichText; - /** Related articles */ - articles: Array; - - protected get [id](): number { - return 0x16115A96; - } - - static get [name](): string { - return "pageBlockRelatedArticles" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", _RichText_, "RichText"], - ["articles", [_PageRelatedArticle_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, _RichText_, "RichText"], - [this.articles, [_PageRelatedArticle_], "Vector"], - ]; - } - - constructor(params: { title: enums.RichText; articles: Array }) { - super(); - this.title = params.title; - this.articles = params.articles; - } -} - -/** A map */ -export class PageBlockMap_ extends _PageBlock_ { - /** Location of the map center */ - geo: enums.GeoPoint; - /** Map zoom level; 13-20 */ - zoom: number; - /** Map width in pixels before applying scale; 16-102 */ - w: number; - /** Map height in pixels before applying scale; 16-1024 */ - h: number; - /** Caption */ - caption: enums.PageCaption; - - protected get [id](): number { - return 0xA44F3EF6; - } - - static get [name](): string { - return "pageBlockMap" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo", _GeoPoint_, "GeoPoint"], - ["zoom", "number", "int"], - ["w", "number", "int"], - ["h", "number", "int"], - ["caption", _PageCaption_, "PageCaption"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo, _GeoPoint_, "GeoPoint"], - [this.zoom, "number", "int"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.caption, _PageCaption_, "PageCaption"], - ]; - } - - constructor(params: { geo: enums.GeoPoint; zoom: number; w: number; h: number; caption: enums.PageCaption }) { - super(); - this.geo = params.geo; - this.zoom = params.zoom; - this.w = params.w; - this.h = params.h; - this.caption = params.caption; - } -} - -/** The phone call was missed */ -export class PhoneCallDiscardReasonMissed_ extends _PhoneCallDiscardReason_ { - protected get [id](): number { - return 0x85E42301; - } - - static get [name](): string { - return "phoneCallDiscardReasonMissed" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The phone call was disconnected */ -export class PhoneCallDiscardReasonDisconnect_ extends _PhoneCallDiscardReason_ { - protected get [id](): number { - return 0xE095C1A0; - } - - static get [name](): string { - return "phoneCallDiscardReasonDisconnect" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The phone call was ended normally */ -export class PhoneCallDiscardReasonHangup_ extends _PhoneCallDiscardReason_ { - protected get [id](): number { - return 0x57ADC690; - } - - static get [name](): string { - return "phoneCallDiscardReasonHangup" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The phone call was discarded because the user is busy in another call */ -export class PhoneCallDiscardReasonBusy_ extends _PhoneCallDiscardReason_ { - protected get [id](): number { - return 0xFAF7E8C9; - } - - static get [name](): string { - return "phoneCallDiscardReasonBusy" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a json-encoded object */ -export class DataJSON_ extends _DataJSON_ { - /** JSON-encoded object */ - data: string; - - protected get [id](): number { - return 0x7D748D04; - } - - static get [name](): string { - return "dataJSON" - } - - static get [paramDesc](): ParamDesc { - return [ - ["data", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.data, "string", "string"], - ]; - } - - constructor(params: { data: string }) { - super(); - this.data = params.data; - } -} - -/** This object represents a portion of the price for goods or services. */ -export class LabeledPrice_ extends _LabeledPrice_ { - /** Portion label */ - label: string; - /** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - - protected get [id](): number { - return 0xCB296BF8; - } - - static get [name](): string { - return "labeledPrice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["label", "string", "string"], - ["amount", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.label, "string", "string"], - [this.amount, "bigint", "long"], - ]; - } - - constructor(params: { label: string; amount: bigint }) { - super(); - this.label = params.label; - this.amount = params.amount; - } -} - -/** Invoice */ -export class Invoice_ extends _Invoice_ { - /** Test invoice */ - test?: true; - /** Set this flag if you require the user's full name to complete the order */ - name_requested?: true; - /** Set this flag if you require the user's phone number to complete the order */ - phone_requested?: true; - /** Set this flag if you require the user's email address to complete the order */ - email_requested?: true; - /** Set this flag if you require the user's shipping address to complete the order */ - shipping_address_requested?: true; - /** Set this flag if the final price depends on the shipping method */ - flexible?: true; - /** Set this flag if user's phone number should be sent to provider */ - phone_to_provider?: true; - /** Set this flag if user's email address should be sent to provider */ - email_to_provider?: true; - /** Whether this is a recurring payment */ - recurring?: true; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */ - prices: Array; - /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - max_tip_amount?: bigint; - /** A vector of suggested amounts of tips in the _smallest units_ of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed `max_tip_amount`. */ - suggested_tip_amounts?: Array; - /** Terms of service URL */ - terms_url?: string; - - protected get [id](): number { - return 0x5DB95A15; - } - - static get [name](): string { - return "invoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["test", "true", "flags.0?true"], - ["name_requested", "true", "flags.1?true"], - ["phone_requested", "true", "flags.2?true"], - ["email_requested", "true", "flags.3?true"], - ["shipping_address_requested", "true", "flags.4?true"], - ["flexible", "true", "flags.5?true"], - ["phone_to_provider", "true", "flags.6?true"], - ["email_to_provider", "true", "flags.7?true"], - ["recurring", "true", "flags.9?true"], - ["currency", "string", "string"], - ["prices", [_LabeledPrice_], "Vector"], - ["max_tip_amount", "bigint", "flags.8?long"], - ["suggested_tip_amounts", ["bigint"], "flags.8?Vector"], - ["terms_url", "string", "flags.10?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.test ?? null, "true", "flags.0?true"], - [this.name_requested ?? null, "true", "flags.1?true"], - [this.phone_requested ?? null, "true", "flags.2?true"], - [this.email_requested ?? null, "true", "flags.3?true"], - [this.shipping_address_requested ?? null, "true", "flags.4?true"], - [this.flexible ?? null, "true", "flags.5?true"], - [this.phone_to_provider ?? null, "true", "flags.6?true"], - [this.email_to_provider ?? null, "true", "flags.7?true"], - [this.recurring ?? null, "true", "flags.9?true"], - [this.currency, "string", "string"], - [this.prices, [_LabeledPrice_], "Vector"], - [this.max_tip_amount ?? null, "bigint", "flags.8?long"], - [this.suggested_tip_amounts ?? null, ["bigint"], "flags.8?Vector"], - [this.terms_url ?? null, "string", "flags.10?string"], - ]; - } - - constructor(params: { test?: true; name_requested?: true; phone_requested?: true; email_requested?: true; shipping_address_requested?: true; flexible?: true; phone_to_provider?: true; email_to_provider?: true; recurring?: true; currency: string; prices: Array; max_tip_amount?: bigint; suggested_tip_amounts?: Array; terms_url?: string }) { - super(); - this.test = params.test; - this.name_requested = params.name_requested; - this.phone_requested = params.phone_requested; - this.email_requested = params.email_requested; - this.shipping_address_requested = params.shipping_address_requested; - this.flexible = params.flexible; - this.phone_to_provider = params.phone_to_provider; - this.email_to_provider = params.email_to_provider; - this.recurring = params.recurring; - this.currency = params.currency; - this.prices = params.prices; - this.max_tip_amount = params.max_tip_amount; - this.suggested_tip_amounts = params.suggested_tip_amounts; - this.terms_url = params.terms_url; - } -} - -/** Payment identifier */ -export class PaymentCharge_ extends _PaymentCharge_ { - /** Telegram payment identifier */ - id: string; - /** Provider payment identifier */ - provider_charge_id: string; - - protected get [id](): number { - return 0xEA02C27E; - } - - static get [name](): string { - return "paymentCharge" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["provider_charge_id", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.provider_charge_id, "string", "string"], - ]; - } - - constructor(params: { id: string; provider_charge_id: string }) { - super(); - this.id = params.id; - this.provider_charge_id = params.provider_charge_id; - } -} - -/** Shipping address */ -export class PostAddress_ extends _PostAddress_ { - /** First line for the address */ - street_line1: string; - /** Second line for the address */ - street_line2: string; - /** City */ - city: string; - /** State, if applicable (empty otherwise) */ - state: string; - /** ISO 3166-1 alpha-2 country code */ - country_iso2: string; - /** Address post code */ - post_code: string; - - protected get [id](): number { - return 0x1E8CAAEB; - } - - static get [name](): string { - return "postAddress" - } - - static get [paramDesc](): ParamDesc { - return [ - ["street_line1", "string", "string"], - ["street_line2", "string", "string"], - ["city", "string", "string"], - ["state", "string", "string"], - ["country_iso2", "string", "string"], - ["post_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.street_line1, "string", "string"], - [this.street_line2, "string", "string"], - [this.city, "string", "string"], - [this.state, "string", "string"], - [this.country_iso2, "string", "string"], - [this.post_code, "string", "string"], - ]; - } - - constructor(params: { street_line1: string; street_line2: string; city: string; state: string; country_iso2: string; post_code: string }) { - super(); - this.street_line1 = params.street_line1; - this.street_line2 = params.street_line2; - this.city = params.city; - this.state = params.state; - this.country_iso2 = params.country_iso2; - this.post_code = params.post_code; - } -} - -/** Order info provided by the user */ -export class PaymentRequestedInfo_ extends _PaymentRequestedInfo_ { - /** User's full name */ - name?: string; - /** User's phone number */ - phone?: string; - /** User's email address */ - email?: string; - /** User's shipping address */ - shipping_address?: enums.PostAddress; - - protected get [id](): number { - return 0x909C3F94; - } - - static get [name](): string { - return "paymentRequestedInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["name", "string", "flags.0?string"], - ["phone", "string", "flags.1?string"], - ["email", "string", "flags.2?string"], - ["shipping_address", _PostAddress_, "flags.3?PostAddress"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.name ?? null, "string", "flags.0?string"], - [this.phone ?? null, "string", "flags.1?string"], - [this.email ?? null, "string", "flags.2?string"], - [this.shipping_address ?? null, _PostAddress_, "flags.3?PostAddress"], - ]; - } - - constructor(params?: { name?: string; phone?: string; email?: string; shipping_address?: enums.PostAddress }) { - super(); - this.name = params?.name; - this.phone = params?.phone; - this.email = params?.email; - this.shipping_address = params?.shipping_address; - } -} - -/** Saved credit card */ -export class PaymentSavedCredentialsCard_ extends _PaymentSavedCredentials_ { - /** Card ID */ - id: string; - /** Title */ - title: string; - - protected get [id](): number { - return 0xCDC27A1F; - } - - static get [name](): string { - return "paymentSavedCredentialsCard" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { id: string; title: string }) { - super(); - this.id = params.id; - this.title = params.title; - } -} - -/** Remote document */ -export class WebDocument_ extends _WebDocument_ { - /** Document URL */ - url: string; - /** Access hash */ - access_hash: bigint; - /** File size */ - size: number; - /** MIME type */ - mime_type: string; - /** Attributes for media types */ - attributes: Array; - - protected get [id](): number { - return 0x1C570ED1; - } - - static get [name](): string { - return "webDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["access_hash", "bigint", "long"], - ["size", "number", "int"], - ["mime_type", "string", "string"], - ["attributes", [_DocumentAttribute_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.access_hash, "bigint", "long"], - [this.size, "number", "int"], - [this.mime_type, "string", "string"], - [this.attributes, [_DocumentAttribute_], "Vector"], - ]; - } - - constructor(params: { url: string; access_hash: bigint; size: number; mime_type: string; attributes: Array }) { - super(); - this.url = params.url; - this.access_hash = params.access_hash; - this.size = params.size; - this.mime_type = params.mime_type; - this.attributes = params.attributes; - } -} - -/** Remote document that can be downloaded without [proxying through telegram](https://core.telegram.org/api/files) */ -export class WebDocumentNoProxy_ extends _WebDocument_ { - /** Document URL */ - url: string; - /** File size */ - size: number; - /** MIME type */ - mime_type: string; - /** Attributes for media types */ - attributes: Array; - - protected get [id](): number { - return 0xF9C8BCC6; - } - - static get [name](): string { - return "webDocumentNoProxy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["size", "number", "int"], - ["mime_type", "string", "string"], - ["attributes", [_DocumentAttribute_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.size, "number", "int"], - [this.mime_type, "string", "string"], - [this.attributes, [_DocumentAttribute_], "Vector"], - ]; - } - - constructor(params: { url: string; size: number; mime_type: string; attributes: Array }) { - super(); - this.url = params.url; - this.size = params.size; - this.mime_type = params.mime_type; - this.attributes = params.attributes; - } -} - -/** The document */ -export class InputWebDocument_ extends _InputWebDocument_ { - /** Remote document URL to be downloaded using the appropriate [method](https://core.telegram.org/api/files) */ - url: string; - /** Remote file size */ - size: number; - /** Mime type */ - mime_type: string; - /** Attributes for media types */ - attributes: Array; - - protected get [id](): number { - return 0x9BED434D; - } - - static get [name](): string { - return "inputWebDocument" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["size", "number", "int"], - ["mime_type", "string", "string"], - ["attributes", [_DocumentAttribute_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.size, "number", "int"], - [this.mime_type, "string", "string"], - [this.attributes, [_DocumentAttribute_], "Vector"], - ]; - } - - constructor(params: { url: string; size: number; mime_type: string; attributes: Array }) { - super(); - this.url = params.url; - this.size = params.size; - this.mime_type = params.mime_type; - this.attributes = params.attributes; - } -} - -/** Location of a remote HTTP(s) file */ -export class InputWebFileLocation_ extends _InputWebFileLocation_ { - /** HTTP URL of file */ - url: string; - /** Access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0xC239D686; - } - - static get [name](): string { - return "inputWebFileLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { url: string; access_hash: bigint }) { - super(); - this.url = params.url; - this.access_hash = params.access_hash; - } -} - -/** Used to download a server-generated image with the map preview from a [geoPoint](https://core.telegram.org/constructor/geoPoint), see the [webfile docs for more info »](https://core.telegram.org/api/files#downloading-webfiles). */ -export class InputWebFileGeoPointLocation_ extends _InputWebFileLocation_ { - /** Generated from the `lat`, `long` and `accuracy_radius` parameters of the [geoPoint](https://core.telegram.org/constructor/geoPoint) */ - geo_point: enums.InputGeoPoint; - /** Access hash of the [geoPoint](https://core.telegram.org/constructor/geoPoint) */ - access_hash: bigint; - /** Map width in pixels before applying scale; 16-1024 */ - w: number; - /** Map height in pixels before applying scale; 16-1024 */ - h: number; - /** Map zoom level; 13-20 */ - zoom: number; - /** Map scale; 1-3 */ - scale: number; - - protected get [id](): number { - return 0x9F2221C9; - } - - static get [name](): string { - return "inputWebFileGeoPointLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo_point", _InputGeoPoint_, "InputGeoPoint"], - ["access_hash", "bigint", "long"], - ["w", "number", "int"], - ["h", "number", "int"], - ["zoom", "number", "int"], - ["scale", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo_point, _InputGeoPoint_, "InputGeoPoint"], - [this.access_hash, "bigint", "long"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.zoom, "number", "int"], - [this.scale, "number", "int"], - ]; - } - - constructor(params: { geo_point: enums.InputGeoPoint; access_hash: bigint; w: number; h: number; zoom: number; scale: number }) { - super(); - this.geo_point = params.geo_point; - this.access_hash = params.access_hash; - this.w = params.w; - this.h = params.h; - this.zoom = params.zoom; - this.scale = params.scale; - } -} - -/** Used to download an album cover for any music file using [upload.getWebFile](https://core.telegram.org/method/upload.getWebFile), see the [webfile docs for more info »](https://core.telegram.org/api/files#downloading-webfiles). */ -export class InputWebFileAudioAlbumThumbLocation_ extends _InputWebFileLocation_ { - /** Used to return a thumbnail with `100x100` resolution (instead of the default `600x600`) */ - small?: true; - /** The audio file in question: must NOT be provided in secret chats, provide the `title` and `performer` fields instead. */ - document?: enums.InputDocument; - /** Song title: should only be used in secret chats, in normal chats provide `document` instead, as it has more lax rate limits. */ - title?: string; - /** Song performer: should only be used in secret chats, in normal chats provide `document` instead, as it has more lax rate limits. */ - performer?: string; - - protected get [id](): number { - return 0xF46FE924; - } - - static get [name](): string { - return "inputWebFileAudioAlbumThumbLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["small", "true", "flags.2?true"], - ["document", _InputDocument_, "flags.0?InputDocument"], - ["title", "string", "flags.1?string"], - ["performer", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.small ?? null, "true", "flags.2?true"], - [this.document ?? null, _InputDocument_, "flags.0?InputDocument"], - [this.title ?? null, "string", "flags.1?string"], - [this.performer ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params?: { small?: true; document?: enums.InputDocument; title?: string; performer?: string }) { - super(); - this.small = params?.small; - this.document = params?.document; - this.title = params?.title; - this.performer = params?.performer; - } -} - -/** Represents a chunk of an [HTTP webfile](https://core.telegram.org/api/files) downloaded through telegram's secure MTProto servers */ -export class upload_WebFile_ extends _upload_WebFile_ { - /** File size */ - size: number; - /** Mime type */ - mime_type: string; - /** File type */ - file_type: enums.storage.FileType; - /** Modified time */ - mtime: number; - /** Data */ - bytes: Uint8Array; - - protected get [id](): number { - return 0x21E753BC; - } - - static get [name](): string { - return "upload.webFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["size", "number", "int"], - ["mime_type", "string", "string"], - ["file_type", _storage_FileType_, "storage.FileType"], - ["mtime", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.size, "number", "int"], - [this.mime_type, "string", "string"], - [this.file_type, _storage_FileType_, "storage.FileType"], - [this.mtime, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { size: number; mime_type: string; file_type: enums.storage.FileType; mtime: number; bytes: Uint8Array }) { - super(); - this.size = params.size; - this.mime_type = params.mime_type; - this.file_type = params.file_type; - this.mtime = params.mtime; - this.bytes = params.bytes; - } -} - -/** Payment form */ -export class payments_PaymentForm_ extends _payments_PaymentForm_ { - /** Whether the user can choose to save credentials. */ - can_save_credentials?: true; - /** Indicates that the user can save payment credentials, but only after setting up a [2FA password](https://core.telegram.org/api/srp) (currently the account doesn't have a [2FA password](https://core.telegram.org/api/srp)) */ - password_missing?: true; - /** Form ID */ - form_id: bigint; - /** Bot ID */ - bot_id: bigint; - /** Form title */ - title: string; - /** Description */ - description: string; - /** Product photo */ - photo?: enums.WebDocument; - /** Invoice */ - invoice: enums.Invoice; - /** Payment provider ID. */ - provider_id: bigint; - /** Payment form URL */ - url: string; - /** Payment provider name. - One of the following: - \- `stripe` */ - native_provider?: string; - /** Contains information about the payment provider, if available, to support it natively without the need for opening the URL. - A JSON object that can contain the following fields: - - \- `apple_pay_merchant_id`: Apple Pay merchant ID - \- `google_pay_public_key`: Google Pay public key - \- `need_country`: True, if the user country must be provided, - \- `need_zip`: True, if the user ZIP/postal code must be provided, - \- `need_cardholder_name`: True, if the cardholder name must be provided */ - native_params?: enums.DataJSON; - /** Additional payment methods */ - additional_methods?: Array; - /** Saved server-side order information */ - saved_info?: enums.PaymentRequestedInfo; - /** Contains information about saved card credentials */ - saved_credentials?: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0xA0058751; - } - - static get [name](): string { - return "payments.paymentForm" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_save_credentials", "true", "flags.2?true"], - ["password_missing", "true", "flags.3?true"], - ["form_id", "bigint", "long"], - ["bot_id", "bigint", "long"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _WebDocument_, "flags.5?WebDocument"], - ["invoice", _Invoice_, "Invoice"], - ["provider_id", "bigint", "long"], - ["url", "string", "string"], - ["native_provider", "string", "flags.4?string"], - ["native_params", _DataJSON_, "flags.4?DataJSON"], - ["additional_methods", [_PaymentFormMethod_], "flags.6?Vector"], - ["saved_info", _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - ["saved_credentials", [_PaymentSavedCredentials_], "flags.1?Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_save_credentials ?? null, "true", "flags.2?true"], - [this.password_missing ?? null, "true", "flags.3?true"], - [this.form_id, "bigint", "long"], - [this.bot_id, "bigint", "long"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo ?? null, _WebDocument_, "flags.5?WebDocument"], - [this.invoice, _Invoice_, "Invoice"], - [this.provider_id, "bigint", "long"], - [this.url, "string", "string"], - [this.native_provider ?? null, "string", "flags.4?string"], - [this.native_params ?? null, _DataJSON_, "flags.4?DataJSON"], - [this.additional_methods ?? null, [_PaymentFormMethod_], "flags.6?Vector"], - [this.saved_info ?? null, _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - [this.saved_credentials ?? null, [_PaymentSavedCredentials_], "flags.1?Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { can_save_credentials?: true; password_missing?: true; form_id: bigint; bot_id: bigint; title: string; description: string; photo?: enums.WebDocument; invoice: enums.Invoice; provider_id: bigint; url: string; native_provider?: string; native_params?: enums.DataJSON; additional_methods?: Array; saved_info?: enums.PaymentRequestedInfo; saved_credentials?: Array; users: Array }) { - super(); - this.can_save_credentials = params.can_save_credentials; - this.password_missing = params.password_missing; - this.form_id = params.form_id; - this.bot_id = params.bot_id; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.invoice = params.invoice; - this.provider_id = params.provider_id; - this.url = params.url; - this.native_provider = params.native_provider; - this.native_params = params.native_params; - this.additional_methods = params.additional_methods; - this.saved_info = params.saved_info; - this.saved_credentials = params.saved_credentials; - this.users = params.users; - } -} - -/** Validated user-provided info */ -export class payments_ValidatedRequestedInfo_ extends _payments_ValidatedRequestedInfo_ { - /** ID */ - id?: string; - /** Shipping options */ - shipping_options?: Array; - - protected get [id](): number { - return 0xD1451883; - } - - static get [name](): string { - return "payments.validatedRequestedInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "string", "flags.0?string"], - ["shipping_options", [_ShippingOption_], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id ?? null, "string", "flags.0?string"], - [this.shipping_options ?? null, [_ShippingOption_], "flags.1?Vector"], - ]; - } - - constructor(params?: { id?: string; shipping_options?: Array }) { - super(); - this.id = params?.id; - this.shipping_options = params?.shipping_options; - } -} - -/** Payment result */ -export class payments_PaymentResult_ extends _payments_PaymentResult_ { - /** Info about the payment */ - updates: enums.Updates; - - protected get [id](): number { - return 0x4E5F810D; - } - - static get [name](): string { - return "payments.paymentResult" - } - - static get [paramDesc](): ParamDesc { - return [ - ["updates", _Updates_, "Updates"], - ]; - } - - protected get [params](): Params { - return [ - [this.updates, _Updates_, "Updates"], - ]; - } - - constructor(params: { updates: enums.Updates }) { - super(); - this.updates = params.updates; - } -} - -/** Payment was not successful, additional verification is needed */ -export class payments_PaymentVerificationNeeded_ extends _payments_PaymentResult_ { - /** URL for additional payment credentials verification */ - url: string; - - protected get [id](): number { - return 0xD8411139; - } - - static get [name](): string { - return "payments.paymentVerificationNeeded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Receipt */ -export class payments_PaymentReceipt_ extends _payments_PaymentReceipt_ { - /** Date of generation */ - date: number; - /** Bot ID */ - bot_id: bigint; - /** Provider ID */ - provider_id: bigint; - /** Title */ - title: string; - /** Description */ - description: string; - /** Photo */ - photo?: enums.WebDocument; - /** Invoice */ - invoice: enums.Invoice; - /** Info */ - info?: enums.PaymentRequestedInfo; - /** Selected shipping option */ - shipping?: enums.ShippingOption; - /** Tipped amount */ - tip_amount?: bigint; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - total_amount: bigint; - /** Payment credential name */ - credentials_title: string; - /** Users */ - users: Array; - - protected get [id](): number { - return 0x70C4FE03; - } - - static get [name](): string { - return "payments.paymentReceipt" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["date", "number", "int"], - ["bot_id", "bigint", "long"], - ["provider_id", "bigint", "long"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _WebDocument_, "flags.2?WebDocument"], - ["invoice", _Invoice_, "Invoice"], - ["info", _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - ["shipping", _ShippingOption_, "flags.1?ShippingOption"], - ["tip_amount", "bigint", "flags.3?long"], - ["currency", "string", "string"], - ["total_amount", "bigint", "long"], - ["credentials_title", "string", "string"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.date, "number", "int"], - [this.bot_id, "bigint", "long"], - [this.provider_id, "bigint", "long"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo ?? null, _WebDocument_, "flags.2?WebDocument"], - [this.invoice, _Invoice_, "Invoice"], - [this.info ?? null, _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - [this.shipping ?? null, _ShippingOption_, "flags.1?ShippingOption"], - [this.tip_amount ?? null, "bigint", "flags.3?long"], - [this.currency, "string", "string"], - [this.total_amount, "bigint", "long"], - [this.credentials_title, "string", "string"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { date: number; bot_id: bigint; provider_id: bigint; title: string; description: string; photo?: enums.WebDocument; invoice: enums.Invoice; info?: enums.PaymentRequestedInfo; shipping?: enums.ShippingOption; tip_amount?: bigint; currency: string; total_amount: bigint; credentials_title: string; users: Array }) { - super(); - this.date = params.date; - this.bot_id = params.bot_id; - this.provider_id = params.provider_id; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.invoice = params.invoice; - this.info = params.info; - this.shipping = params.shipping; - this.tip_amount = params.tip_amount; - this.currency = params.currency; - this.total_amount = params.total_amount; - this.credentials_title = params.credentials_title; - this.users = params.users; - } -} - -/** Saved server-side order information */ -export class payments_SavedInfo_ extends _payments_SavedInfo_ { - /** Whether the user has some saved payment credentials */ - has_saved_credentials?: true; - /** Saved server-side order information */ - saved_info?: enums.PaymentRequestedInfo; - - protected get [id](): number { - return 0xFB8FE43C; - } - - static get [name](): string { - return "payments.savedInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_saved_credentials", "true", "flags.1?true"], - ["saved_info", _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_saved_credentials ?? null, "true", "flags.1?true"], - [this.saved_info ?? null, _PaymentRequestedInfo_, "flags.0?PaymentRequestedInfo"], - ]; - } - - constructor(params?: { has_saved_credentials?: true; saved_info?: enums.PaymentRequestedInfo }) { - super(); - this.has_saved_credentials = params?.has_saved_credentials; - this.saved_info = params?.saved_info; - } -} - -/** Saved payment credentials */ -export class InputPaymentCredentialsSaved_ extends _InputPaymentCredentials_ { - /** Credential ID */ - id: string; - /** Temporary password */ - tmp_password: Uint8Array; - - protected get [id](): number { - return 0xC10EB2CF; - } - - static get [name](): string { - return "inputPaymentCredentialsSaved" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["tmp_password", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.tmp_password, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: string; tmp_password: Uint8Array }) { - super(); - this.id = params.id; - this.tmp_password = params.tmp_password; - } -} - -/** Payment credentials */ -export class InputPaymentCredentials_ extends _InputPaymentCredentials_ { - /** Save payment credential for future use */ - save?: true; - /** Payment credentials */ - data: enums.DataJSON; - - protected get [id](): number { - return 0x3417D728; - } - - static get [name](): string { - return "inputPaymentCredentials" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["save", "true", "flags.0?true"], - ["data", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.save ?? null, "true", "flags.0?true"], - [this.data, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { save?: true; data: enums.DataJSON }) { - super(); - this.save = params.save; - this.data = params.data; - } -} - -/** Apple pay payment credentials */ -export class InputPaymentCredentialsApplePay_ extends _InputPaymentCredentials_ { - /** Payment data */ - payment_data: enums.DataJSON; - - protected get [id](): number { - return 0x0AA1C39F; - } - - static get [name](): string { - return "inputPaymentCredentialsApplePay" - } - - static get [paramDesc](): ParamDesc { - return [ - ["payment_data", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.payment_data, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { payment_data: enums.DataJSON }) { - super(); - this.payment_data = params.payment_data; - } -} - -/** Google Pay payment credentials */ -export class InputPaymentCredentialsGooglePay_ extends _InputPaymentCredentials_ { - /** Payment token */ - payment_token: enums.DataJSON; - - protected get [id](): number { - return 0x8AC32801; - } - - static get [name](): string { - return "inputPaymentCredentialsGooglePay" - } - - static get [paramDesc](): ParamDesc { - return [ - ["payment_token", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.payment_token, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { payment_token: enums.DataJSON }) { - super(); - this.payment_token = params.payment_token; - } -} - -/** Temporary payment password */ -export class account_TmpPassword_ extends _account_TmpPassword_ { - /** Temporary password */ - tmp_password: Uint8Array; - /** Validity period */ - valid_until: number; - - protected get [id](): number { - return 0xDB64FD34; - } - - static get [name](): string { - return "account.tmpPassword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["tmp_password", Uint8Array, "bytes"], - ["valid_until", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.tmp_password, Uint8Array, "bytes"], - [this.valid_until, "number", "int"], - ]; - } - - constructor(params: { tmp_password: Uint8Array; valid_until: number }) { - super(); - this.tmp_password = params.tmp_password; - this.valid_until = params.valid_until; - } -} - -/** Shipping option */ -export class ShippingOption_ extends _ShippingOption_ { - /** Option ID */ - id: string; - /** Title */ - title: string; - /** List of price portions */ - prices: Array; - - protected get [id](): number { - return 0xB6213CDF; - } - - static get [name](): string { - return "shippingOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["title", "string", "string"], - ["prices", [_LabeledPrice_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.title, "string", "string"], - [this.prices, [_LabeledPrice_], "Vector"], - ]; - } - - constructor(params: { id: string; title: string; prices: Array }) { - super(); - this.id = params.id; - this.title = params.title; - this.prices = params.prices; - } -} - -/** Sticker in a stickerset */ -export class InputStickerSetItem_ extends _InputStickerSetItem_ { - /** The sticker */ - document: enums.InputDocument; - /** Associated emoji */ - emoji: string; - /** Coordinates for mask sticker */ - mask_coords?: enums.MaskCoords; - /** Set of keywords, separated by commas (can't be provided for mask stickers) */ - keywords?: string; - - protected get [id](): number { - return 0x32DA9E9C; - } - - static get [name](): string { - return "inputStickerSetItem" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["document", _InputDocument_, "InputDocument"], - ["emoji", "string", "string"], - ["mask_coords", _MaskCoords_, "flags.0?MaskCoords"], - ["keywords", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.document, _InputDocument_, "InputDocument"], - [this.emoji, "string", "string"], - [this.mask_coords ?? null, _MaskCoords_, "flags.0?MaskCoords"], - [this.keywords ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { document: enums.InputDocument; emoji: string; mask_coords?: enums.MaskCoords; keywords?: string }) { - super(); - this.document = params.document; - this.emoji = params.emoji; - this.mask_coords = params.mask_coords; - this.keywords = params.keywords; - } -} - -/** Phone call */ -export class InputPhoneCall_ extends _InputPhoneCall_ { - /** Call ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0x1E36FDED; - } - - static get [name](): string { - return "inputPhoneCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Empty constructor */ -export class PhoneCallEmpty_ extends _PhoneCall_ { - /** Call ID */ - id: bigint; - - protected get [id](): number { - return 0x5366C915; - } - - static get [name](): string { - return "phoneCallEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Incoming phone call */ -export class PhoneCallWaiting_ extends _PhoneCall_ { - /** Is this a video call */ - video?: true; - /** Call ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** Date */ - date: number; - /** Admin ID */ - admin_id: bigint; - /** Participant ID */ - participant_id: bigint; - /** Phone call protocol info */ - protocol: enums.PhoneCallProtocol; - /** When was the phone call received */ - receive_date?: number; - - protected get [id](): number { - return 0xC5226F17; - } - - static get [name](): string { - return "phoneCallWaiting" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["video", "true", "flags.6?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ["protocol", _PhoneCallProtocol_, "PhoneCallProtocol"], - ["receive_date", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.video ?? null, "true", "flags.6?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - [this.protocol, _PhoneCallProtocol_, "PhoneCallProtocol"], - [this.receive_date ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { video?: true; id: bigint; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint; protocol: enums.PhoneCallProtocol; receive_date?: number }) { - super(); - this.video = params.video; - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - this.protocol = params.protocol; - this.receive_date = params.receive_date; - } -} - -/** Requested phone call */ -export class PhoneCallRequested_ extends _PhoneCall_ { - /** Whether this is a video call */ - video?: true; - /** Phone call ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** When was the phone call created */ - date: number; - /** ID of the creator of the phone call */ - admin_id: bigint; - /** ID of the other participant of the phone call */ - participant_id: bigint; - /** [Parameter for key exchange](https://core.telegram.org/api/end-to-end/voice-calls) */ - g_a_hash: Uint8Array; - /** Call protocol info to be passed to libtgvoip */ - protocol: enums.PhoneCallProtocol; - - protected get [id](): number { - return 0x14B0ED0C; - } - - static get [name](): string { - return "phoneCallRequested" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["video", "true", "flags.6?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ["g_a_hash", Uint8Array, "bytes"], - ["protocol", _PhoneCallProtocol_, "PhoneCallProtocol"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.video ?? null, "true", "flags.6?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - [this.g_a_hash, Uint8Array, "bytes"], - [this.protocol, _PhoneCallProtocol_, "PhoneCallProtocol"], - ]; - } - - constructor(params: { video?: true; id: bigint; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint; g_a_hash: Uint8Array; protocol: enums.PhoneCallProtocol }) { - super(); - this.video = params.video; - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - this.g_a_hash = params.g_a_hash; - this.protocol = params.protocol; - } -} - -/** An accepted phone call */ -export class PhoneCallAccepted_ extends _PhoneCall_ { - /** Whether this is a video call */ - video?: true; - /** ID of accepted phone call */ - id: bigint; - /** Access hash of phone call */ - access_hash: bigint; - /** When was the call accepted */ - date: number; - /** ID of the call creator */ - admin_id: bigint; - /** ID of the other user in the call */ - participant_id: bigint; - /** B parameter for [secure E2E phone call key exchange](https://core.telegram.org/api/end-to-end/voice-calls) */ - g_b: Uint8Array; - /** Protocol to use for phone call */ - protocol: enums.PhoneCallProtocol; - - protected get [id](): number { - return 0x3660C311; - } - - static get [name](): string { - return "phoneCallAccepted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["video", "true", "flags.6?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ["g_b", Uint8Array, "bytes"], - ["protocol", _PhoneCallProtocol_, "PhoneCallProtocol"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.video ?? null, "true", "flags.6?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - [this.g_b, Uint8Array, "bytes"], - [this.protocol, _PhoneCallProtocol_, "PhoneCallProtocol"], - ]; - } - - constructor(params: { video?: true; id: bigint; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint; g_b: Uint8Array; protocol: enums.PhoneCallProtocol }) { - super(); - this.video = params.video; - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - this.g_b = params.g_b; - this.protocol = params.protocol; - } -} - -/** Phone call */ -export class PhoneCall_ extends _PhoneCall_ { - /** Whether P2P connection to the other peer is allowed */ - p2p_allowed?: true; - /** Whether this is a video call */ - video?: true; - /** Call ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** Date of creation of the call */ - date: number; - /** User ID of the creator of the call */ - admin_id: bigint; - /** User ID of the other participant in the call */ - participant_id: bigint; - /** [Parameter for key exchange](https://core.telegram.org/api/end-to-end/voice-calls) */ - g_a_or_b: Uint8Array; - /** [Key fingerprint](https://core.telegram.org/api/end-to-end/voice-calls) */ - key_fingerprint: bigint; - /** Call protocol info to be passed to libtgvoip */ - protocol: enums.PhoneCallProtocol; - /** List of endpoints the user can connect to to exchange call data */ - connections: Array; - /** When was the call actually started */ - start_date: number; - custom_parameters?: enums.DataJSON; - - protected get [id](): number { - return 0x30535AF5; - } - - static get [name](): string { - return "phoneCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["p2p_allowed", "true", "flags.5?true"], - ["video", "true", "flags.6?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["date", "number", "int"], - ["admin_id", "bigint", "long"], - ["participant_id", "bigint", "long"], - ["g_a_or_b", Uint8Array, "bytes"], - ["key_fingerprint", "bigint", "long"], - ["protocol", _PhoneCallProtocol_, "PhoneCallProtocol"], - ["connections", [_PhoneConnection_], "Vector"], - ["start_date", "number", "int"], - ["custom_parameters", _DataJSON_, "flags.7?DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.p2p_allowed ?? null, "true", "flags.5?true"], - [this.video ?? null, "true", "flags.6?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.date, "number", "int"], - [this.admin_id, "bigint", "long"], - [this.participant_id, "bigint", "long"], - [this.g_a_or_b, Uint8Array, "bytes"], - [this.key_fingerprint, "bigint", "long"], - [this.protocol, _PhoneCallProtocol_, "PhoneCallProtocol"], - [this.connections, [_PhoneConnection_], "Vector"], - [this.start_date, "number", "int"], - [this.custom_parameters ?? null, _DataJSON_, "flags.7?DataJSON"], - ]; - } - - constructor(params: { p2p_allowed?: true; video?: true; id: bigint; access_hash: bigint; date: number; admin_id: bigint; participant_id: bigint; g_a_or_b: Uint8Array; key_fingerprint: bigint; protocol: enums.PhoneCallProtocol; connections: Array; start_date: number; custom_parameters?: enums.DataJSON }) { - super(); - this.p2p_allowed = params.p2p_allowed; - this.video = params.video; - this.id = params.id; - this.access_hash = params.access_hash; - this.date = params.date; - this.admin_id = params.admin_id; - this.participant_id = params.participant_id; - this.g_a_or_b = params.g_a_or_b; - this.key_fingerprint = params.key_fingerprint; - this.protocol = params.protocol; - this.connections = params.connections; - this.start_date = params.start_date; - this.custom_parameters = params.custom_parameters; - } -} - -/** Indicates a discarded phone call */ -export class PhoneCallDiscarded_ extends _PhoneCall_ { - /** Whether the server required the user to [rate](https://core.telegram.org/method/phone.setCallRating) the call */ - need_rating?: true; - /** Whether the server required the client to [send](https://core.telegram.org/method/phone.saveCallDebug) the libtgvoip call debug data */ - need_debug?: true; - /** Whether the call was a video call */ - video?: true; - /** Call ID */ - id: bigint; - /** Why was the phone call discarded */ - reason?: enums.PhoneCallDiscardReason; - /** Duration of the phone call in seconds */ - duration?: number; - - protected get [id](): number { - return 0x50CA4DE1; - } - - static get [name](): string { - return "phoneCallDiscarded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["need_rating", "true", "flags.2?true"], - ["need_debug", "true", "flags.3?true"], - ["video", "true", "flags.6?true"], - ["id", "bigint", "long"], - ["reason", _PhoneCallDiscardReason_, "flags.0?PhoneCallDiscardReason"], - ["duration", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.need_rating ?? null, "true", "flags.2?true"], - [this.need_debug ?? null, "true", "flags.3?true"], - [this.video ?? null, "true", "flags.6?true"], - [this.id, "bigint", "long"], - [this.reason ?? null, _PhoneCallDiscardReason_, "flags.0?PhoneCallDiscardReason"], - [this.duration ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { need_rating?: true; need_debug?: true; video?: true; id: bigint; reason?: enums.PhoneCallDiscardReason; duration?: number }) { - super(); - this.need_rating = params.need_rating; - this.need_debug = params.need_debug; - this.video = params.video; - this.id = params.id; - this.reason = params.reason; - this.duration = params.duration; - } -} - -/** Identifies an endpoint that can be used to connect to the other user in a phone call */ -export class PhoneConnection_ extends _PhoneConnection_ { - /** Whether TCP should be used */ - tcp?: true; - /** Endpoint ID */ - id: bigint; - /** IP address of endpoint */ - ip: string; - /** IPv6 address of endpoint */ - ipv6: string; - /** Port ID */ - port: number; - /** Our peer tag */ - peer_tag: Uint8Array; - - protected get [id](): number { - return 0x9CC123C7; - } - - static get [name](): string { - return "phoneConnection" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["tcp", "true", "flags.0?true"], - ["id", "bigint", "long"], - ["ip", "string", "string"], - ["ipv6", "string", "string"], - ["port", "number", "int"], - ["peer_tag", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.tcp ?? null, "true", "flags.0?true"], - [this.id, "bigint", "long"], - [this.ip, "string", "string"], - [this.ipv6, "string", "string"], - [this.port, "number", "int"], - [this.peer_tag, Uint8Array, "bytes"], - ]; - } - - constructor(params: { tcp?: true; id: bigint; ip: string; ipv6: string; port: number; peer_tag: Uint8Array }) { - super(); - this.tcp = params.tcp; - this.id = params.id; - this.ip = params.ip; - this.ipv6 = params.ipv6; - this.port = params.port; - this.peer_tag = params.peer_tag; - } -} - -/** WebRTC connection parameters */ -export class PhoneConnectionWebrtc_ extends _PhoneConnection_ { - /** Whether this is a TURN endpoint */ - turn?: true; - /** Whether this is a STUN endpoint */ - stun?: true; - /** Endpoint ID */ - id: bigint; - /** IP address */ - ip: string; - /** IPv6 address */ - ipv6: string; - /** Port */ - port: number; - /** Username */ - username: string; - /** Password */ - password: string; - - protected get [id](): number { - return 0x635FE375; - } - - static get [name](): string { - return "phoneConnectionWebrtc" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["turn", "true", "flags.0?true"], - ["stun", "true", "flags.1?true"], - ["id", "bigint", "long"], - ["ip", "string", "string"], - ["ipv6", "string", "string"], - ["port", "number", "int"], - ["username", "string", "string"], - ["password", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.turn ?? null, "true", "flags.0?true"], - [this.stun ?? null, "true", "flags.1?true"], - [this.id, "bigint", "long"], - [this.ip, "string", "string"], - [this.ipv6, "string", "string"], - [this.port, "number", "int"], - [this.username, "string", "string"], - [this.password, "string", "string"], - ]; - } - - constructor(params: { turn?: true; stun?: true; id: bigint; ip: string; ipv6: string; port: number; username: string; password: string }) { - super(); - this.turn = params.turn; - this.stun = params.stun; - this.id = params.id; - this.ip = params.ip; - this.ipv6 = params.ipv6; - this.port = params.port; - this.username = params.username; - this.password = params.password; - } -} - -/** Protocol info for libtgvoip */ -export class PhoneCallProtocol_ extends _PhoneCallProtocol_ { - /** Whether to allow P2P connection to the other participant */ - udp_p2p?: true; - /** Whether to allow connection to the other participants through the reflector servers */ - udp_reflector?: true; - /** Minimum layer for remote libtgvoip */ - min_layer: number; - /** Maximum layer for remote libtgvoip */ - max_layer: number; - /** When using [phone.requestCall](https://core.telegram.org/method/phone.requestCall) and [phone.acceptCall](https://core.telegram.org/method/phone.acceptCall), specify all library versions supported by the client. - The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's [phone.acceptCall](https://core.telegram.org/method/phone.acceptCall) and in the [phoneCallAccepted](https://core.telegram.org/constructor/phoneCallAccepted) update received by the caller. */ - library_versions: Array; - - protected get [id](): number { - return 0xFC878FC8; - } - - static get [name](): string { - return "phoneCallProtocol" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["udp_p2p", "true", "flags.0?true"], - ["udp_reflector", "true", "flags.1?true"], - ["min_layer", "number", "int"], - ["max_layer", "number", "int"], - ["library_versions", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.udp_p2p ?? null, "true", "flags.0?true"], - [this.udp_reflector ?? null, "true", "flags.1?true"], - [this.min_layer, "number", "int"], - [this.max_layer, "number", "int"], - [this.library_versions, ["string"], "Vector"], - ]; - } - - constructor(params: { udp_p2p?: true; udp_reflector?: true; min_layer: number; max_layer: number; library_versions: Array }) { - super(); - this.udp_p2p = params.udp_p2p; - this.udp_reflector = params.udp_reflector; - this.min_layer = params.min_layer; - this.max_layer = params.max_layer; - this.library_versions = params.library_versions; - } -} - -/** A VoIP phone call */ -export class phone_PhoneCall_ extends _phone_PhoneCall_ { - /** The VoIP phone call */ - phone_call: enums.PhoneCall; - /** VoIP phone call participants */ - users: Array; - - protected get [id](): number { - return 0xEC82E140; - } - - static get [name](): string { - return "phone.phoneCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_call", _PhoneCall_, "PhoneCall"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_call, _PhoneCall_, "PhoneCall"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { phone_call: enums.PhoneCall; users: Array }) { - super(); - this.phone_call = params.phone_call; - this.users = params.users; - } -} - -/** The file was cleared from the temporary RAM cache of the [CDN](https://core.telegram.org/cdn) and has to be re-uploaded. */ -export class upload_CdnFileReuploadNeeded_ extends _upload_CdnFile_ { - /** Request token (see [CDN](https://core.telegram.org/cdn)) */ - request_token: Uint8Array; - - protected get [id](): number { - return 0xEEA8E46E; - } - - static get [name](): string { - return "upload.cdnFileReuploadNeeded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["request_token", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.request_token, Uint8Array, "bytes"], - ]; - } - - constructor(params: { request_token: Uint8Array }) { - super(); - this.request_token = params.request_token; - } -} - -/** Represent a chunk of a [CDN](https://core.telegram.org/cdn) file. */ -export class upload_CdnFile_ extends _upload_CdnFile_ { - /** The data */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xA99FCA4F; - } - - static get [name](): string { - return "upload.cdnFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { bytes: Uint8Array }) { - super(); - this.bytes = params.bytes; - } -} - -/** Public key to use **only** during handshakes to [CDN](https://core.telegram.org/cdn) DCs. */ -export class CdnPublicKey_ extends _CdnPublicKey_ { - /** [CDN DC](https://core.telegram.org/cdn) ID */ - dc_id: number; - /** RSA public key */ - public_key: string; - - protected get [id](): number { - return 0xC982EABA; - } - - static get [name](): string { - return "cdnPublicKey" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_id", "number", "int"], - ["public_key", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_id, "number", "int"], - [this.public_key, "string", "string"], - ]; - } - - constructor(params: { dc_id: number; public_key: string }) { - super(); - this.dc_id = params.dc_id; - this.public_key = params.public_key; - } -} - -/** Configuration for [CDN](https://core.telegram.org/cdn) file downloads. */ -export class CdnConfig_ extends _CdnConfig_ { - /** Vector of public keys to use **only** during handshakes to [CDN](https://core.telegram.org/cdn) DCs. */ - public_keys: Array; - - protected get [id](): number { - return 0x5725E40A; - } - - static get [name](): string { - return "cdnConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["public_keys", [_CdnPublicKey_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.public_keys, [_CdnPublicKey_], "Vector"], - ]; - } - - constructor(params: { public_keys: Array }) { - super(); - this.public_keys = params.public_keys; - } -} - -/** Translated localization string */ -export class LangPackString_ extends _LangPackString_ { - /** Language key */ - key: string; - /** Value */ - value: string; - - protected get [id](): number { - return 0xCAD181F6; - } - - static get [name](): string { - return "langPackString" - } - - static get [paramDesc](): ParamDesc { - return [ - ["key", "string", "string"], - ["value", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.key, "string", "string"], - [this.value, "string", "string"], - ]; - } - - constructor(params: { key: string; value: string }) { - super(); - this.key = params.key; - this.value = params.value; - } -} - -/** A language pack string which has different forms based on the number of some object it mentions. See [https://www.unicode.org/cldr/charts/latest/supplemental/language\_plural\_rules.html](https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html) for more info */ -export class LangPackStringPluralized_ extends _LangPackString_ { - /** Localization key */ - key: string; - /** Value for zero objects */ - zero_value?: string; - /** Value for one object */ - one_value?: string; - /** Value for two objects */ - two_value?: string; - /** Value for a few objects */ - few_value?: string; - /** Value for many objects */ - many_value?: string; - /** Default value */ - other_value: string; - - protected get [id](): number { - return 0x6C47AC9F; - } - - static get [name](): string { - return "langPackStringPluralized" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["key", "string", "string"], - ["zero_value", "string", "flags.0?string"], - ["one_value", "string", "flags.1?string"], - ["two_value", "string", "flags.2?string"], - ["few_value", "string", "flags.3?string"], - ["many_value", "string", "flags.4?string"], - ["other_value", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.key, "string", "string"], - [this.zero_value ?? null, "string", "flags.0?string"], - [this.one_value ?? null, "string", "flags.1?string"], - [this.two_value ?? null, "string", "flags.2?string"], - [this.few_value ?? null, "string", "flags.3?string"], - [this.many_value ?? null, "string", "flags.4?string"], - [this.other_value, "string", "string"], - ]; - } - - constructor(params: { key: string; zero_value?: string; one_value?: string; two_value?: string; few_value?: string; many_value?: string; other_value: string }) { - super(); - this.key = params.key; - this.zero_value = params.zero_value; - this.one_value = params.one_value; - this.two_value = params.two_value; - this.few_value = params.few_value; - this.many_value = params.many_value; - this.other_value = params.other_value; - } -} - -/** Deleted localization string */ -export class LangPackStringDeleted_ extends _LangPackString_ { - /** Localization key */ - key: string; - - protected get [id](): number { - return 0x2979EEB2; - } - - static get [name](): string { - return "langPackStringDeleted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["key", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.key, "string", "string"], - ]; - } - - constructor(params: { key: string }) { - super(); - this.key = params.key; - } -} - -/** Changes to the app's localization pack */ -export class LangPackDifference_ extends _LangPackDifference_ { - /** Language code */ - lang_code: string; - /** Previous version number */ - from_version: number; - /** New version number */ - version: number; - /** Localized strings */ - strings: Array; - - protected get [id](): number { - return 0xF385C1F6; - } - - static get [name](): string { - return "langPackDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ["from_version", "number", "int"], - ["version", "number", "int"], - ["strings", [_LangPackString_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - [this.from_version, "number", "int"], - [this.version, "number", "int"], - [this.strings, [_LangPackString_], "Vector"], - ]; - } - - constructor(params: { lang_code: string; from_version: number; version: number; strings: Array }) { - super(); - this.lang_code = params.lang_code; - this.from_version = params.from_version; - this.version = params.version; - this.strings = params.strings; - } -} - -/** Identifies a localization pack */ -export class LangPackLanguage_ extends _LangPackLanguage_ { - /** Whether the language pack is official */ - official?: true; - /** Is this a localization pack for an RTL language */ - rtl?: true; - /** Is this a beta localization pack? */ - beta?: true; - /** Language name */ - name: string; - /** Language name in the language itself */ - native_name: string; - /** Language code (pack identifier) */ - lang_code: string; - /** Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs */ - base_lang_code?: string; - /** A language code to be used to apply plural forms. See [https://www.unicode.org/cldr/charts/latest/supplemental/language\_plural\_rules.html](https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html) for more info */ - plural_code: string; - /** Total number of non-deleted strings from the language pack */ - strings_count: number; - /** Total number of translated strings from the language pack */ - translated_count: number; - /** Link to language translation interface; empty for custom local language packs */ - translations_url: string; - - protected get [id](): number { - return 0xEECA5CE3; - } - - static get [name](): string { - return "langPackLanguage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["official", "true", "flags.0?true"], - ["rtl", "true", "flags.2?true"], - ["beta", "true", "flags.3?true"], - ["name", "string", "string"], - ["native_name", "string", "string"], - ["lang_code", "string", "string"], - ["base_lang_code", "string", "flags.1?string"], - ["plural_code", "string", "string"], - ["strings_count", "number", "int"], - ["translated_count", "number", "int"], - ["translations_url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.official ?? null, "true", "flags.0?true"], - [this.rtl ?? null, "true", "flags.2?true"], - [this.beta ?? null, "true", "flags.3?true"], - [this.name, "string", "string"], - [this.native_name, "string", "string"], - [this.lang_code, "string", "string"], - [this.base_lang_code ?? null, "string", "flags.1?string"], - [this.plural_code, "string", "string"], - [this.strings_count, "number", "int"], - [this.translated_count, "number", "int"], - [this.translations_url, "string", "string"], - ]; - } - - constructor(params: { official?: true; rtl?: true; beta?: true; name: string; native_name: string; lang_code: string; base_lang_code?: string; plural_code: string; strings_count: number; translated_count: number; translations_url: string }) { - super(); - this.official = params.official; - this.rtl = params.rtl; - this.beta = params.beta; - this.name = params.name; - this.native_name = params.native_name; - this.lang_code = params.lang_code; - this.base_lang_code = params.base_lang_code; - this.plural_code = params.plural_code; - this.strings_count = params.strings_count; - this.translated_count = params.translated_count; - this.translations_url = params.translations_url; - } -} - -/** Channel/supergroup title was changed */ -export class ChannelAdminLogEventActionChangeTitle_ extends _ChannelAdminLogEventAction_ { - /** Previous title */ - prev_value: string; - /** New title */ - new_value: string; - - protected get [id](): number { - return 0xE6DFB825; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeTitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", "string", "string"], - ["new_value", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, "string", "string"], - [this.new_value, "string", "string"], - ]; - } - - constructor(params: { prev_value: string; new_value: string }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The description was changed */ -export class ChannelAdminLogEventActionChangeAbout_ extends _ChannelAdminLogEventAction_ { - /** Previous description */ - prev_value: string; - /** New description */ - new_value: string; - - protected get [id](): number { - return 0x55188A2E; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeAbout" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", "string", "string"], - ["new_value", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, "string", "string"], - [this.new_value, "string", "string"], - ]; - } - - constructor(params: { prev_value: string; new_value: string }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** Channel/supergroup username was changed */ -export class ChannelAdminLogEventActionChangeUsername_ extends _ChannelAdminLogEventAction_ { - /** Old username */ - prev_value: string; - /** New username */ - new_value: string; - - protected get [id](): number { - return 0x6A4AFC38; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", "string", "string"], - ["new_value", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, "string", "string"], - [this.new_value, "string", "string"], - ]; - } - - constructor(params: { prev_value: string; new_value: string }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The channel/supergroup's picture was changed */ -export class ChannelAdminLogEventActionChangePhoto_ extends _ChannelAdminLogEventAction_ { - /** Previous picture */ - prev_photo: enums.Photo; - /** New picture */ - new_photo: enums.Photo; - - protected get [id](): number { - return 0x434BD2AF; - } - - static get [name](): string { - return "channelAdminLogEventActionChangePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_photo", _Photo_, "Photo"], - ["new_photo", _Photo_, "Photo"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_photo, _Photo_, "Photo"], - [this.new_photo, _Photo_, "Photo"], - ]; - } - - constructor(params: { prev_photo: enums.Photo; new_photo: enums.Photo }) { - super(); - this.prev_photo = params.prev_photo; - this.new_photo = params.new_photo; - } -} - -/** Invites were enabled/disabled */ -export class ChannelAdminLogEventActionToggleInvites_ extends _ChannelAdminLogEventAction_ { - /** New value */ - new_value: boolean; - - protected get [id](): number { - return 0x1B7907AE; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_value, "boolean", "Bool"], - ]; - } - - constructor(params: { new_value: boolean }) { - super(); - this.new_value = params.new_value; - } -} - -/** Channel signatures were enabled/disabled */ -export class ChannelAdminLogEventActionToggleSignatures_ extends _ChannelAdminLogEventAction_ { - /** New value */ - new_value: boolean; - - protected get [id](): number { - return 0x26AE0971; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleSignatures" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_value, "boolean", "Bool"], - ]; - } - - constructor(params: { new_value: boolean }) { - super(); - this.new_value = params.new_value; - } -} - -/** A message was pinned */ -export class ChannelAdminLogEventActionUpdatePinned_ extends _ChannelAdminLogEventAction_ { - /** The message that was pinned */ - message: enums.Message; - - protected get [id](): number { - return 0xE9E82C18; - } - - static get [name](): string { - return "channelAdminLogEventActionUpdatePinned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** A message was edited */ -export class ChannelAdminLogEventActionEditMessage_ extends _ChannelAdminLogEventAction_ { - /** Old message */ - prev_message: enums.Message; - /** New message */ - new_message: enums.Message; - - protected get [id](): number { - return 0x709B2405; - } - - static get [name](): string { - return "channelAdminLogEventActionEditMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_message", _Message_, "Message"], - ["new_message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_message, _Message_, "Message"], - [this.new_message, _Message_, "Message"], - ]; - } - - constructor(params: { prev_message: enums.Message; new_message: enums.Message }) { - super(); - this.prev_message = params.prev_message; - this.new_message = params.new_message; - } -} - -/** A message was deleted */ -export class ChannelAdminLogEventActionDeleteMessage_ extends _ChannelAdminLogEventAction_ { - /** The message that was deleted */ - message: enums.Message; - - protected get [id](): number { - return 0x42E047BB; - } - - static get [name](): string { - return "channelAdminLogEventActionDeleteMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** A user has joined the group (in the case of big groups, info of the user that has joined isn't shown) */ -export class ChannelAdminLogEventActionParticipantJoin_ extends _ChannelAdminLogEventAction_ { - protected get [id](): number { - return 0x183040D3; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantJoin" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown) */ -export class ChannelAdminLogEventActionParticipantLeave_ extends _ChannelAdminLogEventAction_ { - protected get [id](): number { - return 0xF89777F2; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantLeave" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A user was invited to the group */ -export class ChannelAdminLogEventActionParticipantInvite_ extends _ChannelAdminLogEventAction_ { - /** The user that was invited */ - participant: enums.ChannelParticipant; - - protected get [id](): number { - return 0xE31C34D8; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["participant", _ChannelParticipant_, "ChannelParticipant"], - ]; - } - - protected get [params](): Params { - return [ - [this.participant, _ChannelParticipant_, "ChannelParticipant"], - ]; - } - - constructor(params: { participant: enums.ChannelParticipant }) { - super(); - this.participant = params.participant; - } -} - -/** The banned [rights](https://core.telegram.org/api/rights) of a user were changed */ -export class ChannelAdminLogEventActionParticipantToggleBan_ extends _ChannelAdminLogEventAction_ { - /** Old banned rights of user */ - prev_participant: enums.ChannelParticipant; - /** New banned rights of user */ - new_participant: enums.ChannelParticipant; - - protected get [id](): number { - return 0xE6D83D7E; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantToggleBan" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_participant", _ChannelParticipant_, "ChannelParticipant"], - ["new_participant", _ChannelParticipant_, "ChannelParticipant"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_participant, _ChannelParticipant_, "ChannelParticipant"], - [this.new_participant, _ChannelParticipant_, "ChannelParticipant"], - ]; - } - - constructor(params: { prev_participant: enums.ChannelParticipant; new_participant: enums.ChannelParticipant }) { - super(); - this.prev_participant = params.prev_participant; - this.new_participant = params.new_participant; - } -} - -/** The admin [rights](https://core.telegram.org/api/rights) of a user were changed */ -export class ChannelAdminLogEventActionParticipantToggleAdmin_ extends _ChannelAdminLogEventAction_ { - /** Previous admin rights */ - prev_participant: enums.ChannelParticipant; - /** New admin rights */ - new_participant: enums.ChannelParticipant; - - protected get [id](): number { - return 0xD5676710; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantToggleAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_participant", _ChannelParticipant_, "ChannelParticipant"], - ["new_participant", _ChannelParticipant_, "ChannelParticipant"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_participant, _ChannelParticipant_, "ChannelParticipant"], - [this.new_participant, _ChannelParticipant_, "ChannelParticipant"], - ]; - } - - constructor(params: { prev_participant: enums.ChannelParticipant; new_participant: enums.ChannelParticipant }) { - super(); - this.prev_participant = params.prev_participant; - this.new_participant = params.new_participant; - } -} - -/** The supergroup's stickerset was changed */ -export class ChannelAdminLogEventActionChangeStickerSet_ extends _ChannelAdminLogEventAction_ { - /** Previous stickerset */ - prev_stickerset: enums.InputStickerSet; - /** New stickerset */ - new_stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0xB1C3CAA7; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_stickerset", _InputStickerSet_, "InputStickerSet"], - ["new_stickerset", _InputStickerSet_, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_stickerset, _InputStickerSet_, "InputStickerSet"], - [this.new_stickerset, _InputStickerSet_, "InputStickerSet"], - ]; - } - - constructor(params: { prev_stickerset: enums.InputStickerSet; new_stickerset: enums.InputStickerSet }) { - super(); - this.prev_stickerset = params.prev_stickerset; - this.new_stickerset = params.new_stickerset; - } -} - -/** The hidden prehistory setting was [changed](https://core.telegram.org/method/channels.togglePreHistoryHidden) */ -export class ChannelAdminLogEventActionTogglePreHistoryHidden_ extends _ChannelAdminLogEventAction_ { - /** New value */ - new_value: boolean; - - protected get [id](): number { - return 0x5F5C95F1; - } - - static get [name](): string { - return "channelAdminLogEventActionTogglePreHistoryHidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_value, "boolean", "Bool"], - ]; - } - - constructor(params: { new_value: boolean }) { - super(); - this.new_value = params.new_value; - } -} - -/** The default banned rights were modified */ -export class ChannelAdminLogEventActionDefaultBannedRights_ extends _ChannelAdminLogEventAction_ { - /** Previous global [banned rights](https://core.telegram.org/api/rights) */ - prev_banned_rights: enums.ChatBannedRights; - /** New global [banned rights](https://core.telegram.org/api/rights). */ - new_banned_rights: enums.ChatBannedRights; - - protected get [id](): number { - return 0x2DF5FC0A; - } - - static get [name](): string { - return "channelAdminLogEventActionDefaultBannedRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_banned_rights", _ChatBannedRights_, "ChatBannedRights"], - ["new_banned_rights", _ChatBannedRights_, "ChatBannedRights"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_banned_rights, _ChatBannedRights_, "ChatBannedRights"], - [this.new_banned_rights, _ChatBannedRights_, "ChatBannedRights"], - ]; - } - - constructor(params: { prev_banned_rights: enums.ChatBannedRights; new_banned_rights: enums.ChatBannedRights }) { - super(); - this.prev_banned_rights = params.prev_banned_rights; - this.new_banned_rights = params.new_banned_rights; - } -} - -/** A poll was stopped */ -export class ChannelAdminLogEventActionStopPoll_ extends _ChannelAdminLogEventAction_ { - /** The poll that was stopped */ - message: enums.Message; - - protected get [id](): number { - return 0x8F079643; - } - - static get [name](): string { - return "channelAdminLogEventActionStopPoll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** The linked chat was changed */ -export class ChannelAdminLogEventActionChangeLinkedChat_ extends _ChannelAdminLogEventAction_ { - /** Previous linked chat */ - prev_value: bigint; - /** New linked chat */ - new_value: bigint; - - protected get [id](): number { - return 0x050C7AC8; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeLinkedChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", "bigint", "long"], - ["new_value", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, "bigint", "long"], - [this.new_value, "bigint", "long"], - ]; - } - - constructor(params: { prev_value: bigint; new_value: bigint }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The geogroup location was changed */ -export class ChannelAdminLogEventActionChangeLocation_ extends _ChannelAdminLogEventAction_ { - /** Previous location */ - prev_value: enums.ChannelLocation; - /** New location */ - new_value: enums.ChannelLocation; - - protected get [id](): number { - return 0x0E6B76AE; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", _ChannelLocation_, "ChannelLocation"], - ["new_value", _ChannelLocation_, "ChannelLocation"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, _ChannelLocation_, "ChannelLocation"], - [this.new_value, _ChannelLocation_, "ChannelLocation"], - ]; - } - - constructor(params: { prev_value: enums.ChannelLocation; new_value: enums.ChannelLocation }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** [Slow mode setting for supergroups was changed](https://core.telegram.org/method/channels.toggleSlowMode) */ -export class ChannelAdminLogEventActionToggleSlowMode_ extends _ChannelAdminLogEventAction_ { - /** Previous slow mode value */ - prev_value: number; - /** New slow mode value */ - new_value: number; - - protected get [id](): number { - return 0x53909779; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleSlowMode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", "number", "int"], - ["new_value", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, "number", "int"], - [this.new_value, "number", "int"], - ]; - } - - constructor(params: { prev_value: number; new_value: number }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** A group call was started */ -export class ChannelAdminLogEventActionStartGroupCall_ extends _ChannelAdminLogEventAction_ { - /** Group call */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0x23209745; - } - - static get [name](): string { - return "channelAdminLogEventActionStartGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", _InputGroupCall_, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, _InputGroupCall_, "InputGroupCall"], - ]; - } - - constructor(params: { call: enums.InputGroupCall }) { - super(); - this.call = params.call; - } -} - -/** A group call was terminated */ -export class ChannelAdminLogEventActionDiscardGroupCall_ extends _ChannelAdminLogEventAction_ { - /** The group call that was terminated */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0xDB9F9140; - } - - static get [name](): string { - return "channelAdminLogEventActionDiscardGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", _InputGroupCall_, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, _InputGroupCall_, "InputGroupCall"], - ]; - } - - constructor(params: { call: enums.InputGroupCall }) { - super(); - this.call = params.call; - } -} - -/** A group call participant was muted */ -export class ChannelAdminLogEventActionParticipantMute_ extends _ChannelAdminLogEventAction_ { - /** The participant that was muted */ - participant: enums.GroupCallParticipant; - - protected get [id](): number { - return 0xF92424D2; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantMute" - } - - static get [paramDesc](): ParamDesc { - return [ - ["participant", _GroupCallParticipant_, "GroupCallParticipant"], - ]; - } - - protected get [params](): Params { - return [ - [this.participant, _GroupCallParticipant_, "GroupCallParticipant"], - ]; - } - - constructor(params: { participant: enums.GroupCallParticipant }) { - super(); - this.participant = params.participant; - } -} - -/** A group call participant was unmuted */ -export class ChannelAdminLogEventActionParticipantUnmute_ extends _ChannelAdminLogEventAction_ { - /** The participant that was unmuted */ - participant: enums.GroupCallParticipant; - - protected get [id](): number { - return 0xE64429C0; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantUnmute" - } - - static get [paramDesc](): ParamDesc { - return [ - ["participant", _GroupCallParticipant_, "GroupCallParticipant"], - ]; - } - - protected get [params](): Params { - return [ - [this.participant, _GroupCallParticipant_, "GroupCallParticipant"], - ]; - } - - constructor(params: { participant: enums.GroupCallParticipant }) { - super(); - this.participant = params.participant; - } -} - -/** Group call settings were changed */ -export class ChannelAdminLogEventActionToggleGroupCallSetting_ extends _ChannelAdminLogEventAction_ { - /** Whether all users are muted by default upon joining */ - join_muted: boolean; - - protected get [id](): number { - return 0x56D6A247; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleGroupCallSetting" - } - - static get [paramDesc](): ParamDesc { - return [ - ["join_muted", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.join_muted, "boolean", "Bool"], - ]; - } - - constructor(params: { join_muted: boolean }) { - super(); - this.join_muted = params.join_muted; - } -} - -/** A user joined the [supergroup/channel](https://core.telegram.org/api/channel) using a specific invite link */ -export class ChannelAdminLogEventActionParticipantJoinByInvite_ extends _ChannelAdminLogEventAction_ { - /** The participant joined by importing a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - via_chatlist?: true; - /** The invite link used to join the [supergroup/channel](https://core.telegram.org/api/channel) */ - invite: enums.ExportedChatInvite; - - protected get [id](): number { - return 0xFE9FC158; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantJoinByInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["via_chatlist", "true", "flags.0?true"], - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.via_chatlist ?? null, "true", "flags.0?true"], - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - constructor(params: { via_chatlist?: true; invite: enums.ExportedChatInvite }) { - super(); - this.via_chatlist = params.via_chatlist; - this.invite = params.invite; - } -} - -/** A chat invite was deleted */ -export class ChannelAdminLogEventActionExportedInviteDelete_ extends _ChannelAdminLogEventAction_ { - /** The deleted chat invite */ - invite: enums.ExportedChatInvite; - - protected get [id](): number { - return 0x5A50FCA4; - } - - static get [name](): string { - return "channelAdminLogEventActionExportedInviteDelete" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - protected get [params](): Params { - return [ - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - constructor(params: { invite: enums.ExportedChatInvite }) { - super(); - this.invite = params.invite; - } -} - -/** A specific invite link was revoked */ -export class ChannelAdminLogEventActionExportedInviteRevoke_ extends _ChannelAdminLogEventAction_ { - /** The invite link that was revoked */ - invite: enums.ExportedChatInvite; - - protected get [id](): number { - return 0x410A134E; - } - - static get [name](): string { - return "channelAdminLogEventActionExportedInviteRevoke" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - protected get [params](): Params { - return [ - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - constructor(params: { invite: enums.ExportedChatInvite }) { - super(); - this.invite = params.invite; - } -} - -/** A chat invite was edited */ -export class ChannelAdminLogEventActionExportedInviteEdit_ extends _ChannelAdminLogEventAction_ { - /** Previous chat invite information */ - prev_invite: enums.ExportedChatInvite; - /** New chat invite information */ - new_invite: enums.ExportedChatInvite; - - protected get [id](): number { - return 0xE90EBB59; - } - - static get [name](): string { - return "channelAdminLogEventActionExportedInviteEdit" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_invite", _ExportedChatInvite_, "ExportedChatInvite"], - ["new_invite", _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_invite, _ExportedChatInvite_, "ExportedChatInvite"], - [this.new_invite, _ExportedChatInvite_, "ExportedChatInvite"], - ]; - } - - constructor(params: { prev_invite: enums.ExportedChatInvite; new_invite: enums.ExportedChatInvite }) { - super(); - this.prev_invite = params.prev_invite; - this.new_invite = params.new_invite; - } -} - -/** channelAdminLogEvent.user\_id has set the volume of participant.peer to participant.volume */ -export class ChannelAdminLogEventActionParticipantVolume_ extends _ChannelAdminLogEventAction_ { - /** The participant whose volume was changed */ - participant: enums.GroupCallParticipant; - - protected get [id](): number { - return 0x3E7F6847; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantVolume" - } - - static get [paramDesc](): ParamDesc { - return [ - ["participant", _GroupCallParticipant_, "GroupCallParticipant"], - ]; - } - - protected get [params](): Params { - return [ - [this.participant, _GroupCallParticipant_, "GroupCallParticipant"], - ]; - } - - constructor(params: { participant: enums.GroupCallParticipant }) { - super(); - this.participant = params.participant; - } -} - -/** The Time-To-Live of messages in this chat was changed */ -export class ChannelAdminLogEventActionChangeHistoryTTL_ extends _ChannelAdminLogEventAction_ { - /** Previous value */ - prev_value: number; - /** New value */ - new_value: number; - - protected get [id](): number { - return 0x6E941A38; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeHistoryTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", "number", "int"], - ["new_value", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, "number", "int"], - [this.new_value, "number", "int"], - ]; - } - - constructor(params: { prev_value: number; new_value: number }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** A new member was accepted to the chat by an admin */ -export class ChannelAdminLogEventActionParticipantJoinByRequest_ extends _ChannelAdminLogEventAction_ { - /** The invite link that was used to join the chat */ - invite: enums.ExportedChatInvite; - /** ID of the admin that approved the invite */ - approved_by: bigint; - - protected get [id](): number { - return 0xAFB6144A; - } - - static get [name](): string { - return "channelAdminLogEventActionParticipantJoinByRequest" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ["approved_by", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - [this.approved_by, "bigint", "long"], - ]; - } - - constructor(params: { invite: enums.ExportedChatInvite; approved_by: bigint }) { - super(); - this.invite = params.invite; - this.approved_by = params.approved_by; - } -} - -/** Forwards were enabled or disabled */ -export class ChannelAdminLogEventActionToggleNoForwards_ extends _ChannelAdminLogEventAction_ { - /** Old value */ - new_value: boolean; - - protected get [id](): number { - return 0xCB2AC766; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleNoForwards" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_value, "boolean", "Bool"], - ]; - } - - constructor(params: { new_value: boolean }) { - super(); - this.new_value = params.new_value; - } -} - -/** A message was posted in a channel */ -export class ChannelAdminLogEventActionSendMessage_ extends _ChannelAdminLogEventAction_ { - /** The message that was sent */ - message: enums.Message; - - protected get [id](): number { - return 0x278F2868; - } - - static get [name](): string { - return "channelAdminLogEventActionSendMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** The set of allowed [message reactions »](https://core.telegram.org/api/reactions) for this channel has changed */ -export class ChannelAdminLogEventActionChangeAvailableReactions_ extends _ChannelAdminLogEventAction_ { - /** Previously allowed reaction emojis */ - prev_value: enums.ChatReactions; - /** New allowed reaction emojis */ - new_value: enums.ChatReactions; - - protected get [id](): number { - return 0xBE4E0EF8; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeAvailableReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", _ChatReactions_, "ChatReactions"], - ["new_value", _ChatReactions_, "ChatReactions"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, _ChatReactions_, "ChatReactions"], - [this.new_value, _ChatReactions_, "ChatReactions"], - ]; - } - - constructor(params: { prev_value: enums.ChatReactions; new_value: enums.ChatReactions }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The list of usernames associated with the channel was changed */ -export class ChannelAdminLogEventActionChangeUsernames_ extends _ChannelAdminLogEventAction_ { - /** Previous set of usernames */ - prev_value: Array; - /** New set of usernames */ - new_value: Array; - - protected get [id](): number { - return 0xF04FB3A9; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeUsernames" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", ["string"], "Vector"], - ["new_value", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, ["string"], "Vector"], - [this.new_value, ["string"], "Vector"], - ]; - } - - constructor(params: { prev_value: Array; new_value: Array }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** [Forum](https://core.telegram.org/api/forum) functionality was enabled or disabled. */ -export class ChannelAdminLogEventActionToggleForum_ extends _ChannelAdminLogEventAction_ { - /** Whether [forum](https://core.telegram.org/api/forum) functionality was enabled or disabled. */ - new_value: boolean; - - protected get [id](): number { - return 0x02CC6383; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleForum" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_value, "boolean", "Bool"], - ]; - } - - constructor(params: { new_value: boolean }) { - super(); - this.new_value = params.new_value; - } -} - -/** A [forum topic](https://core.telegram.org/api/forum#forum-topics) was created */ -export class ChannelAdminLogEventActionCreateTopic_ extends _ChannelAdminLogEventAction_ { - /** The [forum topic](https://core.telegram.org/api/forum#forum-topics) that was created */ - topic: enums.ForumTopic; - - protected get [id](): number { - return 0x58707D28; - } - - static get [name](): string { - return "channelAdminLogEventActionCreateTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["topic", _ForumTopic_, "ForumTopic"], - ]; - } - - protected get [params](): Params { - return [ - [this.topic, _ForumTopic_, "ForumTopic"], - ]; - } - - constructor(params: { topic: enums.ForumTopic }) { - super(); - this.topic = params.topic; - } -} - -/** A [forum topic](https://core.telegram.org/api/forum#forum-topics) was edited */ -export class ChannelAdminLogEventActionEditTopic_ extends _ChannelAdminLogEventAction_ { - /** Previous topic information */ - prev_topic: enums.ForumTopic; - /** New topic information */ - new_topic: enums.ForumTopic; - - protected get [id](): number { - return 0xF06FE208; - } - - static get [name](): string { - return "channelAdminLogEventActionEditTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_topic", _ForumTopic_, "ForumTopic"], - ["new_topic", _ForumTopic_, "ForumTopic"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_topic, _ForumTopic_, "ForumTopic"], - [this.new_topic, _ForumTopic_, "ForumTopic"], - ]; - } - - constructor(params: { prev_topic: enums.ForumTopic; new_topic: enums.ForumTopic }) { - super(); - this.prev_topic = params.prev_topic; - this.new_topic = params.new_topic; - } -} - -/** A [forum topic](https://core.telegram.org/api/forum#forum-topics) was deleted */ -export class ChannelAdminLogEventActionDeleteTopic_ extends _ChannelAdminLogEventAction_ { - /** The [forum topic](https://core.telegram.org/api/forum#forum-topics) that was deleted */ - topic: enums.ForumTopic; - - protected get [id](): number { - return 0xAE168909; - } - - static get [name](): string { - return "channelAdminLogEventActionDeleteTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["topic", _ForumTopic_, "ForumTopic"], - ]; - } - - protected get [params](): Params { - return [ - [this.topic, _ForumTopic_, "ForumTopic"], - ]; - } - - constructor(params: { topic: enums.ForumTopic }) { - super(); - this.topic = params.topic; - } -} - -/** A [forum topic](https://core.telegram.org/api/forum#forum-topics) was pinned or unpinned */ -export class ChannelAdminLogEventActionPinTopic_ extends _ChannelAdminLogEventAction_ { - /** Previous topic information */ - prev_topic?: enums.ForumTopic; - /** New topic information */ - new_topic?: enums.ForumTopic; - - protected get [id](): number { - return 0x5D8D353B; - } - - static get [name](): string { - return "channelAdminLogEventActionPinTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["prev_topic", _ForumTopic_, "flags.0?ForumTopic"], - ["new_topic", _ForumTopic_, "flags.1?ForumTopic"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.prev_topic ?? null, _ForumTopic_, "flags.0?ForumTopic"], - [this.new_topic ?? null, _ForumTopic_, "flags.1?ForumTopic"], - ]; - } - - constructor(params?: { prev_topic?: enums.ForumTopic; new_topic?: enums.ForumTopic }) { - super(); - this.prev_topic = params?.prev_topic; - this.new_topic = params?.new_topic; - } -} - -/** [Native antispam](https://core.telegram.org/api/antispam) functionality was enabled or disabled. */ -export class ChannelAdminLogEventActionToggleAntiSpam_ extends _ChannelAdminLogEventAction_ { - /** Whether antispam functionality was enabled or disabled. */ - new_value: boolean; - - protected get [id](): number { - return 0x64F36DFC; - } - - static get [name](): string { - return "channelAdminLogEventActionToggleAntiSpam" - } - - static get [paramDesc](): ParamDesc { - return [ - ["new_value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.new_value, "boolean", "Bool"], - ]; - } - - constructor(params: { new_value: boolean }) { - super(); - this.new_value = params.new_value; - } -} - -/** The [message accent color](https://core.telegram.org/api/colors) was changed */ -export class ChannelAdminLogEventActionChangePeerColor_ extends _ChannelAdminLogEventAction_ { - /** Previous accent palette */ - prev_value: enums.PeerColor; - /** New accent palette */ - new_value: enums.PeerColor; - - protected get [id](): number { - return 0x5796E780; - } - - static get [name](): string { - return "channelAdminLogEventActionChangePeerColor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", _PeerColor_, "PeerColor"], - ["new_value", _PeerColor_, "PeerColor"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, _PeerColor_, "PeerColor"], - [this.new_value, _PeerColor_, "PeerColor"], - ]; - } - - constructor(params: { prev_value: enums.PeerColor; new_value: enums.PeerColor }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The [profile accent color](https://core.telegram.org/api/colors) was changed */ -export class ChannelAdminLogEventActionChangeProfilePeerColor_ extends _ChannelAdminLogEventAction_ { - /** Previous accent palette */ - prev_value: enums.PeerColor; - /** New accent palette */ - new_value: enums.PeerColor; - - protected get [id](): number { - return 0x5E477B25; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeProfilePeerColor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", _PeerColor_, "PeerColor"], - ["new_value", _PeerColor_, "PeerColor"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, _PeerColor_, "PeerColor"], - [this.new_value, _PeerColor_, "PeerColor"], - ]; - } - - constructor(params: { prev_value: enums.PeerColor; new_value: enums.PeerColor }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The [wallpaper](https://core.telegram.org/api/wallpapers) was changed */ -export class ChannelAdminLogEventActionChangeWallpaper_ extends _ChannelAdminLogEventAction_ { - /** Previous wallpaper */ - prev_value: enums.WallPaper; - /** New wallpaper */ - new_value: enums.WallPaper; - - protected get [id](): number { - return 0x31BB5D52; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeWallpaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", _WallPaper_, "WallPaper"], - ["new_value", _WallPaper_, "WallPaper"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, _WallPaper_, "WallPaper"], - [this.new_value, _WallPaper_, "WallPaper"], - ]; - } - - constructor(params: { prev_value: enums.WallPaper; new_value: enums.WallPaper }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -/** The [emoji status](https://core.telegram.org/api/emoji-status) was changed */ -export class ChannelAdminLogEventActionChangeEmojiStatus_ extends _ChannelAdminLogEventAction_ { - /** Previous emoji status */ - prev_value: enums.EmojiStatus; - /** New emoji status */ - new_value: enums.EmojiStatus; - - protected get [id](): number { - return 0x3EA9FEB1; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeEmojiStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_value", _EmojiStatus_, "EmojiStatus"], - ["new_value", _EmojiStatus_, "EmojiStatus"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_value, _EmojiStatus_, "EmojiStatus"], - [this.new_value, _EmojiStatus_, "EmojiStatus"], - ]; - } - - constructor(params: { prev_value: enums.EmojiStatus; new_value: enums.EmojiStatus }) { - super(); - this.prev_value = params.prev_value; - this.new_value = params.new_value; - } -} - -export class ChannelAdminLogEventActionChangeEmojiStickerSet_ extends _ChannelAdminLogEventAction_ { - prev_stickerset: enums.InputStickerSet; - new_stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0x46D840AB; - } - - static get [name](): string { - return "channelAdminLogEventActionChangeEmojiStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["prev_stickerset", _InputStickerSet_, "InputStickerSet"], - ["new_stickerset", _InputStickerSet_, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.prev_stickerset, _InputStickerSet_, "InputStickerSet"], - [this.new_stickerset, _InputStickerSet_, "InputStickerSet"], - ]; - } - - constructor(params: { prev_stickerset: enums.InputStickerSet; new_stickerset: enums.InputStickerSet }) { - super(); - this.prev_stickerset = params.prev_stickerset; - this.new_stickerset = params.new_stickerset; - } -} - -/** Admin log event */ -export class ChannelAdminLogEvent_ extends _ChannelAdminLogEvent_ { - /** Event ID */ - id: bigint; - /** Date */ - date: number; - /** User ID */ - user_id: bigint; - /** Action */ - action: enums.ChannelAdminLogEventAction; - - protected get [id](): number { - return 0x1FAD68CD; - } - - static get [name](): string { - return "channelAdminLogEvent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["date", "number", "int"], - ["user_id", "bigint", "long"], - ["action", _ChannelAdminLogEventAction_, "ChannelAdminLogEventAction"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.date, "number", "int"], - [this.user_id, "bigint", "long"], - [this.action, _ChannelAdminLogEventAction_, "ChannelAdminLogEventAction"], - ]; - } - - constructor(params: { id: bigint; date: number; user_id: bigint; action: enums.ChannelAdminLogEventAction }) { - super(); - this.id = params.id; - this.date = params.date; - this.user_id = params.user_id; - this.action = params.action; - } -} - -/** Admin log events */ -export class channels_AdminLogResults_ extends _channels_AdminLogResults_ { - /** Admin log events */ - events: Array; - /** Chats mentioned in events */ - chats: Array; - /** Users mentioned in events */ - users: Array; - - protected get [id](): number { - return 0xED8AF74D; - } - - static get [name](): string { - return "channels.adminLogResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["events", [_ChannelAdminLogEvent_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.events, [_ChannelAdminLogEvent_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { events: Array; chats: Array; users: Array }) { - super(); - this.events = params.events; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Filter only certain admin log events */ -export class ChannelAdminLogEventsFilter_ extends _ChannelAdminLogEventsFilter_ { - /** [Join events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoin), including [joins using invite links](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoinByInvite) and [join requests](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoinByRequest). */ - join?: true; - /** [Leave events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantLeave) */ - leave?: true; - /** [Invite events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantInvite) */ - invite?: true; - /** [Ban events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan) */ - ban?: true; - /** [Unban events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan) */ - unban?: true; - /** [Kick events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan) */ - kick?: true; - /** [Unkick events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan) */ - unkick?: true; - /** [Admin promotion events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleAdmin) */ - promote?: true; - /** [Admin demotion events](https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleAdmin) */ - demote?: true; - /** Info change events (when [about](https://core.telegram.org/constructor/channelAdminLogEventActionChangeAbout), [linked chat](https://core.telegram.org/constructor/channelAdminLogEventActionChangeLinkedChat), [location](https://core.telegram.org/constructor/channelAdminLogEventActionChangeLocation), [photo](https://core.telegram.org/constructor/channelAdminLogEventActionChangePhoto), [stickerset](https://core.telegram.org/constructor/channelAdminLogEventActionChangeStickerSet), [title](https://core.telegram.org/constructor/channelAdminLogEventActionChangeTitle) or [username](https://core.telegram.org/constructor/channelAdminLogEventActionChangeUsername), [slowmode](https://core.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode), [history TTL](https://core.telegram.org/constructor/channelAdminLogEventActionChangeHistoryTTL) settings of a channel gets modified) */ - info?: true; - /** Settings change events ([invites](https://core.telegram.org/constructor/channelAdminLogEventActionToggleInvites), [hidden prehistory](https://core.telegram.org/constructor/channelAdminLogEventActionTogglePreHistoryHidden), [signatures](https://core.telegram.org/constructor/channelAdminLogEventActionToggleSignatures), [default banned rights](https://core.telegram.org/constructor/channelAdminLogEventActionDefaultBannedRights), [forum toggle events](https://core.telegram.org/constructor/channelAdminLogEventActionToggleForum)) */ - settings?: true; - /** [Message pin events](https://core.telegram.org/constructor/channelAdminLogEventActionUpdatePinned) */ - pinned?: true; - /** [Message edit events](https://core.telegram.org/constructor/channelAdminLogEventActionEditMessage) */ - edit?: true; - /** [Message deletion events](https://core.telegram.org/constructor/channelAdminLogEventActionDeleteMessage) */ - delete?: true; - /** Group call events */ - group_call?: true; - /** Invite events */ - invites?: true; - /** A message was posted in a channel */ - send?: true; - /** [Forum](https://core.telegram.org/api/forum)\-related events */ - forums?: true; - - protected get [id](): number { - return 0xEA107AE4; - } - - static get [name](): string { - return "channelAdminLogEventsFilter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["join", "true", "flags.0?true"], - ["leave", "true", "flags.1?true"], - ["invite", "true", "flags.2?true"], - ["ban", "true", "flags.3?true"], - ["unban", "true", "flags.4?true"], - ["kick", "true", "flags.5?true"], - ["unkick", "true", "flags.6?true"], - ["promote", "true", "flags.7?true"], - ["demote", "true", "flags.8?true"], - ["info", "true", "flags.9?true"], - ["settings", "true", "flags.10?true"], - ["pinned", "true", "flags.11?true"], - ["edit", "true", "flags.12?true"], - ["delete", "true", "flags.13?true"], - ["group_call", "true", "flags.14?true"], - ["invites", "true", "flags.15?true"], - ["send", "true", "flags.16?true"], - ["forums", "true", "flags.17?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.join ?? null, "true", "flags.0?true"], - [this.leave ?? null, "true", "flags.1?true"], - [this.invite ?? null, "true", "flags.2?true"], - [this.ban ?? null, "true", "flags.3?true"], - [this.unban ?? null, "true", "flags.4?true"], - [this.kick ?? null, "true", "flags.5?true"], - [this.unkick ?? null, "true", "flags.6?true"], - [this.promote ?? null, "true", "flags.7?true"], - [this.demote ?? null, "true", "flags.8?true"], - [this.info ?? null, "true", "flags.9?true"], - [this.settings ?? null, "true", "flags.10?true"], - [this.pinned ?? null, "true", "flags.11?true"], - [this.edit ?? null, "true", "flags.12?true"], - [this.delete ?? null, "true", "flags.13?true"], - [this.group_call ?? null, "true", "flags.14?true"], - [this.invites ?? null, "true", "flags.15?true"], - [this.send ?? null, "true", "flags.16?true"], - [this.forums ?? null, "true", "flags.17?true"], - ]; - } - - constructor(params?: { join?: true; leave?: true; invite?: true; ban?: true; unban?: true; kick?: true; unkick?: true; promote?: true; demote?: true; info?: true; settings?: true; pinned?: true; edit?: true; delete?: true; group_call?: true; invites?: true; send?: true; forums?: true }) { - super(); - this.join = params?.join; - this.leave = params?.leave; - this.invite = params?.invite; - this.ban = params?.ban; - this.unban = params?.unban; - this.kick = params?.kick; - this.unkick = params?.unkick; - this.promote = params?.promote; - this.demote = params?.demote; - this.info = params?.info; - this.settings = params?.settings; - this.pinned = params?.pinned; - this.edit = params?.edit; - this.delete = params?.delete; - this.group_call = params?.group_call; - this.invites = params?.invites; - this.send = params?.send; - this.forums = params?.forums; - } -} - -/** Popular contact */ -export class PopularContact_ extends _PopularContact_ { - /** Contact identifier */ - client_id: bigint; - /** How many people imported this contact */ - importers: number; - - protected get [id](): number { - return 0x5CE14175; - } - - static get [name](): string { - return "popularContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["client_id", "bigint", "long"], - ["importers", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.client_id, "bigint", "long"], - [this.importers, "number", "int"], - ]; - } - - constructor(params: { client_id: bigint; importers: number }) { - super(); - this.client_id = params.client_id; - this.importers = params.importers; - } -} - -/** No new favorited stickers were found */ -export class messages_FavedStickersNotModified_ extends _messages_FavedStickers_ { - protected get [id](): number { - return 0x9E8FA6D3; - } - - static get [name](): string { - return "messages.favedStickersNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Favorited stickers */ -export class messages_FavedStickers_ extends _messages_FavedStickers_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Emojis associated to stickers */ - packs: Array; - /** Favorited stickers */ - stickers: Array; - - protected get [id](): number { - return 0x2CB51097; - } - - static get [name](): string { - return "messages.favedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["packs", [_StickerPack_], "Vector"], - ["stickers", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.packs, [_StickerPack_], "Vector"], - [this.stickers, [_Document_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; packs: Array; stickers: Array }) { - super(); - this.hash = params.hash; - this.packs = params.packs; - this.stickers = params.stickers; - } -} - -/** Unknown t.me url */ -export class RecentMeUrlUnknown_ extends _RecentMeUrl_ { - /** URL */ - url: string; - - protected get [id](): number { - return 0x46E1D13D; - } - - static get [name](): string { - return "recentMeUrlUnknown" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Recent t.me link to a user */ -export class RecentMeUrlUser_ extends _RecentMeUrl_ { - /** URL */ - url: string; - /** User ID */ - user_id: bigint; - - protected get [id](): number { - return 0xB92C09E2; - } - - static get [name](): string { - return "recentMeUrlUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { url: string; user_id: bigint }) { - super(); - this.url = params.url; - this.user_id = params.user_id; - } -} - -/** Recent t.me link to a chat */ -export class RecentMeUrlChat_ extends _RecentMeUrl_ { - /** t.me URL */ - url: string; - /** Chat ID */ - chat_id: bigint; - - protected get [id](): number { - return 0xB2DA71D2; - } - - static get [name](): string { - return "recentMeUrlChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { url: string; chat_id: bigint }) { - super(); - this.url = params.url; - this.chat_id = params.chat_id; - } -} - -/** Recent t.me invite link to a chat */ -export class RecentMeUrlChatInvite_ extends _RecentMeUrl_ { - /** t.me URL */ - url: string; - /** Chat invitation */ - chat_invite: enums.ChatInvite; - - protected get [id](): number { - return 0xEB49081D; - } - - static get [name](): string { - return "recentMeUrlChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["chat_invite", _ChatInvite_, "ChatInvite"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.chat_invite, _ChatInvite_, "ChatInvite"], - ]; - } - - constructor(params: { url: string; chat_invite: enums.ChatInvite }) { - super(); - this.url = params.url; - this.chat_invite = params.chat_invite; - } -} - -/** Recent t.me stickerset installation URL */ -export class RecentMeUrlStickerSet_ extends _RecentMeUrl_ { - /** t.me URL */ - url: string; - /** Stickerset */ - set: enums.StickerSetCovered; - - protected get [id](): number { - return 0xBC0A57DC; - } - - static get [name](): string { - return "recentMeUrlStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["set", _StickerSetCovered_, "StickerSetCovered"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.set, _StickerSetCovered_, "StickerSetCovered"], - ]; - } - - constructor(params: { url: string; set: enums.StickerSetCovered }) { - super(); - this.url = params.url; - this.set = params.set; - } -} - -/** Recent t.me URLs */ -export class help_RecentMeUrls_ extends _help_RecentMeUrls_ { - /** URLs */ - urls: Array; - /** Chats */ - chats: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0x0E0310D7; - } - - static get [name](): string { - return "help.recentMeUrls" - } - - static get [paramDesc](): ParamDesc { - return [ - ["urls", [_RecentMeUrl_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.urls, [_RecentMeUrl_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { urls: Array; chats: Array; users: Array }) { - super(); - this.urls = params.urls; - this.chats = params.chats; - this.users = params.users; - } -} - -/** A single media in an [album or grouped media](https://core.telegram.org/api/files#albums-grouped-media) sent with [messages.sendMultiMedia](https://core.telegram.org/method/messages.sendMultiMedia). */ -export class InputSingleMedia_ extends _InputSingleMedia_ { - /** The media */ - media: enums.InputMedia; - /** Unique client media ID required to prevent message resending */ - random_id: bigint; - /** A caption for the media */ - message: string; - /** Message [entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - - protected get [id](): number { - return 0x1CC6E91F; - } - - static get [name](): string { - return "inputSingleMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["media", _InputMedia_, "InputMedia"], - ["random_id", "bigint", "long"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.media, _InputMedia_, "InputMedia"], - [this.random_id, "bigint", "long"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.0?Vector"], - ]; - } - - constructor(params: { media: enums.InputMedia; random_id: bigint; message: string; entities?: Array }) { - super(); - this.media = params.media; - this.random_id = params.random_id; - this.message = params.message; - this.entities = params.entities; - } -} - -/** Represents a bot logged in using the [Telegram login widget](https://core.telegram.org/widgets/login) */ -export class WebAuthorization_ extends _WebAuthorization_ { - /** Authorization hash */ - hash: bigint; - /** Bot ID */ - bot_id: bigint; - /** The domain name of the website on which the user has logged in. */ - domain: string; - /** Browser user-agent */ - browser: string; - /** Platform */ - platform: string; - /** When was the web session created */ - date_created: number; - /** When was the web session last active */ - date_active: number; - /** IP address */ - ip: string; - /** Region, determined from IP address */ - region: string; - - protected get [id](): number { - return 0xA6F8F452; - } - - static get [name](): string { - return "webAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["bot_id", "bigint", "long"], - ["domain", "string", "string"], - ["browser", "string", "string"], - ["platform", "string", "string"], - ["date_created", "number", "int"], - ["date_active", "number", "int"], - ["ip", "string", "string"], - ["region", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.bot_id, "bigint", "long"], - [this.domain, "string", "string"], - [this.browser, "string", "string"], - [this.platform, "string", "string"], - [this.date_created, "number", "int"], - [this.date_active, "number", "int"], - [this.ip, "string", "string"], - [this.region, "string", "string"], - ]; - } - - constructor(params: { hash: bigint; bot_id: bigint; domain: string; browser: string; platform: string; date_created: number; date_active: number; ip: string; region: string }) { - super(); - this.hash = params.hash; - this.bot_id = params.bot_id; - this.domain = params.domain; - this.browser = params.browser; - this.platform = params.platform; - this.date_created = params.date_created; - this.date_active = params.date_active; - this.ip = params.ip; - this.region = params.region; - } -} - -/** Web authorizations */ -export class account_WebAuthorizations_ extends _account_WebAuthorizations_ { - /** Web authorization list */ - authorizations: Array; - /** Users */ - users: Array; - - protected get [id](): number { - return 0xED56C9FC; - } - - static get [name](): string { - return "account.webAuthorizations" - } - - static get [paramDesc](): ParamDesc { - return [ - ["authorizations", [_WebAuthorization_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.authorizations, [_WebAuthorization_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { authorizations: Array; users: Array }) { - super(); - this.authorizations = params.authorizations; - this.users = params.users; - } -} - -/** Message by ID */ -export class InputMessageID_ extends _InputMessage_ { - /** Message ID */ - id: number; - - protected get [id](): number { - return 0xA676A322; - } - - static get [name](): string { - return "inputMessageID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - ]; - } - - constructor(params: { id: number }) { - super(); - this.id = params.id; - } -} - -/** Message to which the specified message replies to */ -export class InputMessageReplyTo_ extends _InputMessage_ { - /** ID of the message that replies to the message we need */ - id: number; - - protected get [id](): number { - return 0xBAD88395; - } - - static get [name](): string { - return "inputMessageReplyTo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - ]; - } - - constructor(params: { id: number }) { - super(); - this.id = params.id; - } -} - -/** Pinned message */ -export class InputMessagePinned_ extends _InputMessage_ { - protected get [id](): number { - return 0x86872538; - } - - static get [name](): string { - return "inputMessagePinned" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Used by bots for fetching information about the message that originated a callback query */ -export class InputMessageCallbackQuery_ extends _InputMessage_ { - /** Message ID */ - id: number; - /** Callback query ID */ - query_id: bigint; - - protected get [id](): number { - return 0xACFA1A7E; - } - - static get [name](): string { - return "inputMessageCallbackQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ["query_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - [this.query_id, "bigint", "long"], - ]; - } - - constructor(params: { id: number; query_id: bigint }) { - super(); - this.id = params.id; - this.query_id = params.query_id; - } -} - -/** A peer */ -export class InputDialogPeer_ extends _InputDialogPeer_ { - /** Peer */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xFCAAFEB7; - } - - static get [name](): string { - return "inputDialogPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** All peers in a [peer folder](https://core.telegram.org/api/folders#peer-folders) */ -export class InputDialogPeerFolder_ extends _InputDialogPeer_ { - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id: number; - - protected get [id](): number { - return 0x64600527; - } - - static get [name](): string { - return "inputDialogPeerFolder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["folder_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.folder_id, "number", "int"], - ]; - } - - constructor(params: { folder_id: number }) { - super(); - this.folder_id = params.folder_id; - } -} - -/** Peer */ -export class DialogPeer_ extends _DialogPeer_ { - /** Peer */ - peer: enums.Peer; - - protected get [id](): number { - return 0xE56DBF05; - } - - static get [name](): string { - return "dialogPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - ]; - } - - constructor(params: { peer: enums.Peer }) { - super(); - this.peer = params.peer; - } -} - -/** [Peer folder](https://core.telegram.org/api/folders#peer-folders) */ -export class DialogPeerFolder_ extends _DialogPeer_ { - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id: number; - - protected get [id](): number { - return 0x514519E2; - } - - static get [name](): string { - return "dialogPeerFolder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["folder_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.folder_id, "number", "int"], - ]; - } - - constructor(params: { folder_id: number }) { - super(); - this.folder_id = params.folder_id; - } -} - -/** No further results were found */ -export class messages_FoundStickerSetsNotModified_ extends _messages_FoundStickerSets_ { - protected get [id](): number { - return 0x0D54B65D; - } - - static get [name](): string { - return "messages.foundStickerSetsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Found stickersets */ -export class messages_FoundStickerSets_ extends _messages_FoundStickerSets_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Found stickersets */ - sets: Array; - - protected get [id](): number { - return 0x8AF09DD2; - } - - static get [name](): string { - return "messages.foundStickerSets" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["sets", [_StickerSetCovered_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.sets, [_StickerSetCovered_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; sets: Array }) { - super(); - this.hash = params.hash; - this.sets = params.sets; - } -} - -/** SHA256 Hash of an uploaded file, to be checked for validity after download */ -export class FileHash_ extends _FileHash_ { - /** Offset from where to start computing SHA-256 hash */ - offset: bigint; - /** Length */ - limit: number; - /** SHA-256 Hash of file chunk, to be checked for validity after download */ - hash: Uint8Array; - - protected get [id](): number { - return 0xF39B035C; - } - - static get [name](): string { - return "fileHash" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "bigint", "long"], - ["limit", "number", "int"], - ["hash", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "bigint", "long"], - [this.limit, "number", "int"], - [this.hash, Uint8Array, "bytes"], - ]; - } - - constructor(params: { offset: bigint; limit: number; hash: Uint8Array }) { - super(); - this.offset = params.offset; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Info about an [MTProxy](https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation) used to connect. */ -export class InputClientProxy_ extends _InputClientProxy_ { - /** Proxy address */ - address: string; - /** Proxy port */ - port: number; - - protected get [id](): number { - return 0x75588B3F; - } - - static get [name](): string { - return "inputClientProxy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["address", "string", "string"], - ["port", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.address, "string", "string"], - [this.port, "number", "int"], - ]; - } - - constructor(params: { address: string; port: number }) { - super(); - this.address = params.address; - this.port = params.port; - } -} - -/** No changes were made to telegram's terms of service */ -export class help_TermsOfServiceUpdateEmpty_ extends _help_TermsOfServiceUpdate_ { - /** New TOS updates will have to be queried using [help.getTermsOfServiceUpdate](https://core.telegram.org/method/help.getTermsOfServiceUpdate) in `expires` seconds */ - expires: number; - - protected get [id](): number { - return 0xE3309F7F; - } - - static get [name](): string { - return "help.termsOfServiceUpdateEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["expires", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.expires, "number", "int"], - ]; - } - - constructor(params: { expires: number }) { - super(); - this.expires = params.expires; - } -} - -/** Info about an update of telegram's terms of service. If the terms of service are declined, then the [account.deleteAccount](https://core.telegram.org/method/account.deleteAccount) method should be called with the reason "Decline ToS update" */ -export class help_TermsOfServiceUpdate_ extends _help_TermsOfServiceUpdate_ { - /** New TOS updates will have to be queried using [help.getTermsOfServiceUpdate](https://core.telegram.org/method/help.getTermsOfServiceUpdate) in `expires` seconds */ - expires: number; - /** New terms of service */ - terms_of_service: enums.help.TermsOfService; - - protected get [id](): number { - return 0x28ECF961; - } - - static get [name](): string { - return "help.termsOfServiceUpdate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["expires", "number", "int"], - ["terms_of_service", _help_TermsOfService_, "help.TermsOfService"], - ]; - } - - protected get [params](): Params { - return [ - [this.expires, "number", "int"], - [this.terms_of_service, _help_TermsOfService_, "help.TermsOfService"], - ]; - } - - constructor(params: { expires: number; terms_of_service: enums.help.TermsOfService }) { - super(); - this.expires = params.expires; - this.terms_of_service = params.terms_of_service; - } -} - -/** Uploaded secure file, for more info [see the passport docs »](https://core.telegram.org/passport/encryption#inputsecurefile) */ -export class InputSecureFileUploaded_ extends _InputSecureFile_ { - /** Secure file ID */ - id: bigint; - /** Secure file part count */ - parts: number; - /** MD5 hash of encrypted uploaded file, to be checked server-side */ - md5_checksum: string; - /** File hash */ - file_hash: Uint8Array; - /** Secret */ - secret: Uint8Array; - - protected get [id](): number { - return 0x3334B0F0; - } - - static get [name](): string { - return "inputSecureFileUploaded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["parts", "number", "int"], - ["md5_checksum", "string", "string"], - ["file_hash", Uint8Array, "bytes"], - ["secret", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.parts, "number", "int"], - [this.md5_checksum, "string", "string"], - [this.file_hash, Uint8Array, "bytes"], - [this.secret, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: bigint; parts: number; md5_checksum: string; file_hash: Uint8Array; secret: Uint8Array }) { - super(); - this.id = params.id; - this.parts = params.parts; - this.md5_checksum = params.md5_checksum; - this.file_hash = params.file_hash; - this.secret = params.secret; - } -} - -/** Pre-uploaded [passport](https://core.telegram.org/passport) file, for more info [see the passport docs »](https://core.telegram.org/passport/encryption#inputsecurefile) */ -export class InputSecureFile_ extends _InputSecureFile_ { - /** Secure file ID */ - id: bigint; - /** Secure file access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0x5367E5BE; - } - - static get [name](): string { - return "inputSecureFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Empty constructor */ -export class SecureFileEmpty_ extends _SecureFile_ { - protected get [id](): number { - return 0x64199744; - } - - static get [name](): string { - return "secureFileEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Secure [passport](https://core.telegram.org/passport) file, for more info [see the passport docs »](https://core.telegram.org/passport/encryption#inputsecurefile) */ -export class SecureFile_ extends _SecureFile_ { - /** ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - /** File size */ - size: bigint; - /** DC ID */ - dc_id: number; - /** Date of upload */ - date: number; - /** File hash */ - file_hash: Uint8Array; - /** Secret */ - secret: Uint8Array; - - protected get [id](): number { - return 0x7D09C27E; - } - - static get [name](): string { - return "secureFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["size", "bigint", "long"], - ["dc_id", "number", "int"], - ["date", "number", "int"], - ["file_hash", Uint8Array, "bytes"], - ["secret", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.size, "bigint", "long"], - [this.dc_id, "number", "int"], - [this.date, "number", "int"], - [this.file_hash, Uint8Array, "bytes"], - [this.secret, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; size: bigint; dc_id: number; date: number; file_hash: Uint8Array; secret: Uint8Array }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.size = params.size; - this.dc_id = params.dc_id; - this.date = params.date; - this.file_hash = params.file_hash; - this.secret = params.secret; - } -} - -/** Secure [passport](https://core.telegram.org/passport) data, for more info [see the passport docs »](https://core.telegram.org/passport/encryption#securedata) */ -export class SecureData_ extends _SecureData_ { - /** Data */ - data: Uint8Array; - /** Data hash */ - data_hash: Uint8Array; - /** Secret */ - secret: Uint8Array; - - protected get [id](): number { - return 0x8AEABEC3; - } - - static get [name](): string { - return "secureData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["data", Uint8Array, "bytes"], - ["data_hash", Uint8Array, "bytes"], - ["secret", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.data, Uint8Array, "bytes"], - [this.data_hash, Uint8Array, "bytes"], - [this.secret, Uint8Array, "bytes"], - ]; - } - - constructor(params: { data: Uint8Array; data_hash: Uint8Array; secret: Uint8Array }) { - super(); - this.data = params.data; - this.data_hash = params.data_hash; - this.secret = params.secret; - } -} - -/** Phone number to use in [telegram passport](https://core.telegram.org/passport): [it must be verified, first »](https://core.telegram.org/passport/encryption#secureplaindata). */ -export class SecurePlainPhone_ extends _SecurePlainData_ { - /** Phone number */ - phone: string; - - protected get [id](): number { - return 0x7D6099DD; - } - - static get [name](): string { - return "securePlainPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone, "string", "string"], - ]; - } - - constructor(params: { phone: string }) { - super(); - this.phone = params.phone; - } -} - -/** Email address to use in [telegram passport](https://core.telegram.org/passport): [it must be verified, first »](https://core.telegram.org/passport/encryption#secureplaindata). */ -export class SecurePlainEmail_ extends _SecurePlainData_ { - /** Email address */ - email: string; - - protected get [id](): number { - return 0x21EC5A5F; - } - - static get [name](): string { - return "securePlainEmail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["email", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.email, "string", "string"], - ]; - } - - constructor(params: { email: string }) { - super(); - this.email = params.email; - } -} - -/** Personal details */ -export class SecureValueTypePersonalDetails_ extends _SecureValueType_ { - protected get [id](): number { - return 0x9D2A81E3; - } - - static get [name](): string { - return "secureValueTypePersonalDetails" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Passport */ -export class SecureValueTypePassport_ extends _SecureValueType_ { - protected get [id](): number { - return 0x3DAC6A00; - } - - static get [name](): string { - return "secureValueTypePassport" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Driver's license */ -export class SecureValueTypeDriverLicense_ extends _SecureValueType_ { - protected get [id](): number { - return 0x06E425C4; - } - - static get [name](): string { - return "secureValueTypeDriverLicense" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Identity card */ -export class SecureValueTypeIdentityCard_ extends _SecureValueType_ { - protected get [id](): number { - return 0xA0D0744B; - } - - static get [name](): string { - return "secureValueTypeIdentityCard" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Internal [passport](https://core.telegram.org/passport) */ -export class SecureValueTypeInternalPassport_ extends _SecureValueType_ { - protected get [id](): number { - return 0x99A48F23; - } - - static get [name](): string { - return "secureValueTypeInternalPassport" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Address */ -export class SecureValueTypeAddress_ extends _SecureValueType_ { - protected get [id](): number { - return 0xCBE31E26; - } - - static get [name](): string { - return "secureValueTypeAddress" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Utility bill */ -export class SecureValueTypeUtilityBill_ extends _SecureValueType_ { - protected get [id](): number { - return 0xFC36954E; - } - - static get [name](): string { - return "secureValueTypeUtilityBill" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Bank statement */ -export class SecureValueTypeBankStatement_ extends _SecureValueType_ { - protected get [id](): number { - return 0x89137C0D; - } - - static get [name](): string { - return "secureValueTypeBankStatement" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Rental agreement */ -export class SecureValueTypeRentalAgreement_ extends _SecureValueType_ { - protected get [id](): number { - return 0x8B883488; - } - - static get [name](): string { - return "secureValueTypeRentalAgreement" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Internal registration [passport](https://core.telegram.org/passport) */ -export class SecureValueTypePassportRegistration_ extends _SecureValueType_ { - protected get [id](): number { - return 0x99E3806A; - } - - static get [name](): string { - return "secureValueTypePassportRegistration" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Temporary registration */ -export class SecureValueTypeTemporaryRegistration_ extends _SecureValueType_ { - protected get [id](): number { - return 0xEA02EC33; - } - - static get [name](): string { - return "secureValueTypeTemporaryRegistration" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Phone */ -export class SecureValueTypePhone_ extends _SecureValueType_ { - protected get [id](): number { - return 0xB320AADB; - } - - static get [name](): string { - return "secureValueTypePhone" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Email */ -export class SecureValueTypeEmail_ extends _SecureValueType_ { - protected get [id](): number { - return 0x8E3CA7EE; - } - - static get [name](): string { - return "secureValueTypeEmail" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Secure value */ -export class SecureValue_ extends _SecureValue_ { - /** Secure [passport](https://core.telegram.org/passport) value type */ - type: enums.SecureValueType; - /** Encrypted [Telegram Passport](https://core.telegram.org/passport) element data */ - data?: enums.SecureData; - /** Encrypted [passport](https://core.telegram.org/passport) file with the front side of the document */ - front_side?: enums.SecureFile; - /** Encrypted [passport](https://core.telegram.org/passport) file with the reverse side of the document */ - reverse_side?: enums.SecureFile; - /** Encrypted [passport](https://core.telegram.org/passport) file with a selfie of the user holding the document */ - selfie?: enums.SecureFile; - /** Array of encrypted [passport](https://core.telegram.org/passport) files with translated versions of the provided documents */ - translation?: Array; - /** Array of encrypted [passport](https://core.telegram.org/passport) files with photos the of the documents */ - files?: Array; - /** Plaintext verified [passport](https://core.telegram.org/passport) data */ - plain_data?: enums.SecurePlainData; - /** Data hash */ - hash: Uint8Array; - - protected get [id](): number { - return 0x187FA0CA; - } - - static get [name](): string { - return "secureValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["type", _SecureValueType_, "SecureValueType"], - ["data", _SecureData_, "flags.0?SecureData"], - ["front_side", _SecureFile_, "flags.1?SecureFile"], - ["reverse_side", _SecureFile_, "flags.2?SecureFile"], - ["selfie", _SecureFile_, "flags.3?SecureFile"], - ["translation", [_SecureFile_], "flags.6?Vector"], - ["files", [_SecureFile_], "flags.4?Vector"], - ["plain_data", _SecurePlainData_, "flags.5?SecurePlainData"], - ["hash", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.type, _SecureValueType_, "SecureValueType"], - [this.data ?? null, _SecureData_, "flags.0?SecureData"], - [this.front_side ?? null, _SecureFile_, "flags.1?SecureFile"], - [this.reverse_side ?? null, _SecureFile_, "flags.2?SecureFile"], - [this.selfie ?? null, _SecureFile_, "flags.3?SecureFile"], - [this.translation ?? null, [_SecureFile_], "flags.6?Vector"], - [this.files ?? null, [_SecureFile_], "flags.4?Vector"], - [this.plain_data ?? null, _SecurePlainData_, "flags.5?SecurePlainData"], - [this.hash, Uint8Array, "bytes"], - ]; - } - - constructor(params: { type: enums.SecureValueType; data?: enums.SecureData; front_side?: enums.SecureFile; reverse_side?: enums.SecureFile; selfie?: enums.SecureFile; translation?: Array; files?: Array; plain_data?: enums.SecurePlainData; hash: Uint8Array }) { - super(); - this.type = params.type; - this.data = params.data; - this.front_side = params.front_side; - this.reverse_side = params.reverse_side; - this.selfie = params.selfie; - this.translation = params.translation; - this.files = params.files; - this.plain_data = params.plain_data; - this.hash = params.hash; - } -} - -/** Secure value, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ -export class InputSecureValue_ extends _InputSecureValue_ { - /** Secure [passport](https://core.telegram.org/passport) value type */ - type: enums.SecureValueType; - /** Encrypted [Telegram Passport](https://core.telegram.org/passport) element data */ - data?: enums.SecureData; - /** Encrypted [passport](https://core.telegram.org/passport) file with the front side of the document */ - front_side?: enums.InputSecureFile; - /** Encrypted [passport](https://core.telegram.org/passport) file with the reverse side of the document */ - reverse_side?: enums.InputSecureFile; - /** Encrypted [passport](https://core.telegram.org/passport) file with a selfie of the user holding the document */ - selfie?: enums.InputSecureFile; - /** Array of encrypted [passport](https://core.telegram.org/passport) files with translated versions of the provided documents */ - translation?: Array; - /** Array of encrypted [passport](https://core.telegram.org/passport) files with photos the of the documents */ - files?: Array; - /** Plaintext verified [passport](https://core.telegram.org/passport) data */ - plain_data?: enums.SecurePlainData; - - protected get [id](): number { - return 0xDB21D0A7; - } - - static get [name](): string { - return "inputSecureValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["type", _SecureValueType_, "SecureValueType"], - ["data", _SecureData_, "flags.0?SecureData"], - ["front_side", _InputSecureFile_, "flags.1?InputSecureFile"], - ["reverse_side", _InputSecureFile_, "flags.2?InputSecureFile"], - ["selfie", _InputSecureFile_, "flags.3?InputSecureFile"], - ["translation", [_InputSecureFile_], "flags.6?Vector"], - ["files", [_InputSecureFile_], "flags.4?Vector"], - ["plain_data", _SecurePlainData_, "flags.5?SecurePlainData"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.type, _SecureValueType_, "SecureValueType"], - [this.data ?? null, _SecureData_, "flags.0?SecureData"], - [this.front_side ?? null, _InputSecureFile_, "flags.1?InputSecureFile"], - [this.reverse_side ?? null, _InputSecureFile_, "flags.2?InputSecureFile"], - [this.selfie ?? null, _InputSecureFile_, "flags.3?InputSecureFile"], - [this.translation ?? null, [_InputSecureFile_], "flags.6?Vector"], - [this.files ?? null, [_InputSecureFile_], "flags.4?Vector"], - [this.plain_data ?? null, _SecurePlainData_, "flags.5?SecurePlainData"], - ]; - } - - constructor(params: { type: enums.SecureValueType; data?: enums.SecureData; front_side?: enums.InputSecureFile; reverse_side?: enums.InputSecureFile; selfie?: enums.InputSecureFile; translation?: Array; files?: Array; plain_data?: enums.SecurePlainData }) { - super(); - this.type = params.type; - this.data = params.data; - this.front_side = params.front_side; - this.reverse_side = params.reverse_side; - this.selfie = params.selfie; - this.translation = params.translation; - this.files = params.files; - this.plain_data = params.plain_data; - } -} - -/** Secure value hash */ -export class SecureValueHash_ extends _SecureValueHash_ { - /** Secure value type */ - type: enums.SecureValueType; - /** Hash */ - hash: Uint8Array; - - protected get [id](): number { - return 0xED1ECDB0; - } - - static get [name](): string { - return "secureValueHash" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["hash", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.hash, Uint8Array, "bytes"], - ]; - } - - constructor(params: { type: enums.SecureValueType; hash: Uint8Array }) { - super(); - this.type = params.type; - this.hash = params.hash; - } -} - -/** Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. */ -export class SecureValueErrorData_ extends _SecureValueError_ { - /** The section of the user's Telegram Passport which has the error, one of [secureValueTypePersonalDetails](https://core.telegram.org/constructor/secureValueTypePersonalDetails), [secureValueTypePassport](https://core.telegram.org/constructor/secureValueTypePassport), [secureValueTypeDriverLicense](https://core.telegram.org/constructor/secureValueTypeDriverLicense), [secureValueTypeIdentityCard](https://core.telegram.org/constructor/secureValueTypeIdentityCard), [secureValueTypeInternalPassport](https://core.telegram.org/constructor/secureValueTypeInternalPassport), [secureValueTypeAddress](https://core.telegram.org/constructor/secureValueTypeAddress) */ - type: enums.SecureValueType; - /** Data hash */ - data_hash: Uint8Array; - /** Name of the data field which has the error */ - field: string; - /** Error message */ - text: string; - - protected get [id](): number { - return 0xE8A40BD9; - } - - static get [name](): string { - return "secureValueErrorData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["data_hash", Uint8Array, "bytes"], - ["field", "string", "string"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.data_hash, Uint8Array, "bytes"], - [this.field, "string", "string"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; data_hash: Uint8Array; field: string; text: string }) { - super(); - this.type = params.type; - this.data_hash = params.data_hash; - this.field = params.field; - this.text = params.text; - } -} - -/** Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. */ -export class SecureValueErrorFrontSide_ extends _SecureValueError_ { - /** One of [secureValueTypePassport](https://core.telegram.org/constructor/secureValueTypePassport), [secureValueTypeDriverLicense](https://core.telegram.org/constructor/secureValueTypeDriverLicense), [secureValueTypeIdentityCard](https://core.telegram.org/constructor/secureValueTypeIdentityCard), [secureValueTypeInternalPassport](https://core.telegram.org/constructor/secureValueTypeInternalPassport) */ - type: enums.SecureValueType; - /** File hash */ - file_hash: Uint8Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0x00BE3DFA; - } - - static get [name](): string { - return "secureValueErrorFrontSide" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", Uint8Array, "bytes"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, Uint8Array, "bytes"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Uint8Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. */ -export class SecureValueErrorReverseSide_ extends _SecureValueError_ { - /** One of [secureValueTypeDriverLicense](https://core.telegram.org/constructor/secureValueTypeDriverLicense), [secureValueTypeIdentityCard](https://core.telegram.org/constructor/secureValueTypeIdentityCard) */ - type: enums.SecureValueType; - /** File hash */ - file_hash: Uint8Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0x868A2AA5; - } - - static get [name](): string { - return "secureValueErrorReverseSide" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", Uint8Array, "bytes"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, Uint8Array, "bytes"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Uint8Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. */ -export class SecureValueErrorSelfie_ extends _SecureValueError_ { - /** One of [secureValueTypePassport](https://core.telegram.org/constructor/secureValueTypePassport), [secureValueTypeDriverLicense](https://core.telegram.org/constructor/secureValueTypeDriverLicense), [secureValueTypeIdentityCard](https://core.telegram.org/constructor/secureValueTypeIdentityCard), [secureValueTypeInternalPassport](https://core.telegram.org/constructor/secureValueTypeInternalPassport) */ - type: enums.SecureValueType; - /** File hash */ - file_hash: Uint8Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0xE537CED6; - } - - static get [name](): string { - return "secureValueErrorSelfie" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", Uint8Array, "bytes"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, Uint8Array, "bytes"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Uint8Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. */ -export class SecureValueErrorFile_ extends _SecureValueError_ { - /** One of [secureValueTypeUtilityBill](https://core.telegram.org/constructor/secureValueTypeUtilityBill), [secureValueTypeBankStatement](https://core.telegram.org/constructor/secureValueTypeBankStatement), [secureValueTypeRentalAgreement](https://core.telegram.org/constructor/secureValueTypeRentalAgreement), [secureValueTypePassportRegistration](https://core.telegram.org/constructor/secureValueTypePassportRegistration), [secureValueTypeTemporaryRegistration](https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration) */ - type: enums.SecureValueType; - /** File hash */ - file_hash: Uint8Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0x7A700873; - } - - static get [name](): string { - return "secureValueErrorFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", Uint8Array, "bytes"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, Uint8Array, "bytes"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Uint8Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. */ -export class SecureValueErrorFiles_ extends _SecureValueError_ { - /** One of [secureValueTypeUtilityBill](https://core.telegram.org/constructor/secureValueTypeUtilityBill), [secureValueTypeBankStatement](https://core.telegram.org/constructor/secureValueTypeBankStatement), [secureValueTypeRentalAgreement](https://core.telegram.org/constructor/secureValueTypeRentalAgreement), [secureValueTypePassportRegistration](https://core.telegram.org/constructor/secureValueTypePassportRegistration), [secureValueTypeTemporaryRegistration](https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration) */ - type: enums.SecureValueType; - /** File hash */ - file_hash: Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0x666220E9; - } - - static get [name](): string { - return "secureValueErrorFiles" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", [Uint8Array], "Vector"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, [Uint8Array], "Vector"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Secure value error */ -export class SecureValueError_ extends _SecureValueError_ { - /** Type of element which has the issue */ - type: enums.SecureValueType; - /** Hash */ - hash: Uint8Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0x869D758F; - } - - static get [name](): string { - return "secureValueError" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["hash", Uint8Array, "bytes"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.hash, Uint8Array, "bytes"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; hash: Uint8Array; text: string }) { - super(); - this.type = params.type; - this.hash = params.hash; - this.text = params.text; - } -} - -/** Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. */ -export class SecureValueErrorTranslationFile_ extends _SecureValueError_ { - /** One of [secureValueTypePersonalDetails](https://core.telegram.org/constructor/secureValueTypePersonalDetails), [secureValueTypePassport](https://core.telegram.org/constructor/secureValueTypePassport), [secureValueTypeDriverLicense](https://core.telegram.org/constructor/secureValueTypeDriverLicense), [secureValueTypeIdentityCard](https://core.telegram.org/constructor/secureValueTypeIdentityCard), [secureValueTypeInternalPassport](https://core.telegram.org/constructor/secureValueTypeInternalPassport), [secureValueTypeUtilityBill](https://core.telegram.org/constructor/secureValueTypeUtilityBill), [secureValueTypeBankStatement](https://core.telegram.org/constructor/secureValueTypeBankStatement), [secureValueTypeRentalAgreement](https://core.telegram.org/constructor/secureValueTypeRentalAgreement), [secureValueTypePassportRegistration](https://core.telegram.org/constructor/secureValueTypePassportRegistration), [secureValueTypeTemporaryRegistration](https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration) */ - type: enums.SecureValueType; - /** File hash */ - file_hash: Uint8Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0xA1144770; - } - - static get [name](): string { - return "secureValueErrorTranslationFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", Uint8Array, "bytes"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, Uint8Array, "bytes"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Uint8Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes. */ -export class SecureValueErrorTranslationFiles_ extends _SecureValueError_ { - /** One of [secureValueTypePersonalDetails](https://core.telegram.org/constructor/secureValueTypePersonalDetails), [secureValueTypePassport](https://core.telegram.org/constructor/secureValueTypePassport), [secureValueTypeDriverLicense](https://core.telegram.org/constructor/secureValueTypeDriverLicense), [secureValueTypeIdentityCard](https://core.telegram.org/constructor/secureValueTypeIdentityCard), [secureValueTypeInternalPassport](https://core.telegram.org/constructor/secureValueTypeInternalPassport), [secureValueTypeUtilityBill](https://core.telegram.org/constructor/secureValueTypeUtilityBill), [secureValueTypeBankStatement](https://core.telegram.org/constructor/secureValueTypeBankStatement), [secureValueTypeRentalAgreement](https://core.telegram.org/constructor/secureValueTypeRentalAgreement), [secureValueTypePassportRegistration](https://core.telegram.org/constructor/secureValueTypePassportRegistration), [secureValueTypeTemporaryRegistration](https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration) */ - type: enums.SecureValueType; - /** Hash */ - file_hash: Array; - /** Error message */ - text: string; - - protected get [id](): number { - return 0x34636DD8; - } - - static get [name](): string { - return "secureValueErrorTranslationFiles" - } - - static get [paramDesc](): ParamDesc { - return [ - ["type", _SecureValueType_, "SecureValueType"], - ["file_hash", [Uint8Array], "Vector"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.type, _SecureValueType_, "SecureValueType"], - [this.file_hash, [Uint8Array], "Vector"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { type: enums.SecureValueType; file_hash: Array; text: string }) { - super(); - this.type = params.type; - this.file_hash = params.file_hash; - this.text = params.text; - } -} - -/** Encrypted credentials required to decrypt [telegram passport](https://core.telegram.org/passport) data. */ -export class SecureCredentialsEncrypted_ extends _SecureCredentialsEncrypted_ { - /** Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in [decrypting data »](https://core.telegram.org/passport#decrypting-data) */ - data: Uint8Array; - /** Data hash for data authentication as described in [decrypting data »](https://core.telegram.org/passport#decrypting-data) */ - hash: Uint8Array; - /** Secret, encrypted with the bot's public RSA key, required for data decryption as described in [decrypting data »](https://core.telegram.org/passport#decrypting-data) */ - secret: Uint8Array; - - protected get [id](): number { - return 0x33F0EA47; - } - - static get [name](): string { - return "secureCredentialsEncrypted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["data", Uint8Array, "bytes"], - ["hash", Uint8Array, "bytes"], - ["secret", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.data, Uint8Array, "bytes"], - [this.hash, Uint8Array, "bytes"], - [this.secret, Uint8Array, "bytes"], - ]; - } - - constructor(params: { data: Uint8Array; hash: Uint8Array; secret: Uint8Array }) { - super(); - this.data = params.data; - this.hash = params.hash; - this.secret = params.secret; - } -} - -/** [Telegram Passport](https://core.telegram.org/passport) authorization form */ -export class account_AuthorizationForm_ extends _account_AuthorizationForm_ { - /** Required [Telegram Passport](https://core.telegram.org/passport) documents */ - required_types: Array; - /** Already submitted [Telegram Passport](https://core.telegram.org/passport) documents */ - values: Array; - /** [Telegram Passport](https://core.telegram.org/passport) errors */ - errors: Array; - /** Info about the bot to which the form will be submitted */ - users: Array; - /** URL of the service's privacy policy */ - privacy_policy_url?: string; - - protected get [id](): number { - return 0xAD2E1CD8; - } - - static get [name](): string { - return "account.authorizationForm" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["required_types", [_SecureRequiredType_], "Vector"], - ["values", [_SecureValue_], "Vector"], - ["errors", [_SecureValueError_], "Vector"], - ["users", [_User_], "Vector"], - ["privacy_policy_url", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.required_types, [_SecureRequiredType_], "Vector"], - [this.values, [_SecureValue_], "Vector"], - [this.errors, [_SecureValueError_], "Vector"], - [this.users, [_User_], "Vector"], - [this.privacy_policy_url ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { required_types: Array; values: Array; errors: Array; users: Array; privacy_policy_url?: string }) { - super(); - this.required_types = params.required_types; - this.values = params.values; - this.errors = params.errors; - this.users = params.users; - this.privacy_policy_url = params.privacy_policy_url; - } -} - -/** The sent email code */ -export class account_SentEmailCode_ extends _account_SentEmailCode_ { - /** The email (to which the code was sent) must match this [pattern](https://core.telegram.org/api/pattern) */ - email_pattern: string; - /** The length of the verification code */ - length: number; - - protected get [id](): number { - return 0x811F854F; - } - - static get [name](): string { - return "account.sentEmailCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["email_pattern", "string", "string"], - ["length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.email_pattern, "string", "string"], - [this.length, "number", "int"], - ]; - } - - constructor(params: { email_pattern: string; length: number }) { - super(); - this.email_pattern = params.email_pattern; - this.length = params.length; - } -} - -/** Deep link info empty */ -export class help_DeepLinkInfoEmpty_ extends _help_DeepLinkInfo_ { - protected get [id](): number { - return 0x66AFA166; - } - - static get [name](): string { - return "help.deepLinkInfoEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Deep link info, see [the here for more details](https://core.telegram.org/api/links#unsupported-links) */ -export class help_DeepLinkInfo_ extends _help_DeepLinkInfo_ { - /** An update of the app is required to parse this link */ - update_app?: true; - /** Message to show to the user */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - - protected get [id](): number { - return 0x6A4EE832; - } - - static get [name](): string { - return "help.deepLinkInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["update_app", "true", "flags.0?true"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.update_app ?? null, "true", "flags.0?true"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - ]; - } - - constructor(params: { update_app?: true; message: string; entities?: Array }) { - super(); - this.update_app = params.update_app; - this.message = params.message; - this.entities = params.entities; - } -} - -/** Saved contact */ -export class SavedPhoneContact_ extends _SavedContact_ { - /** Phone number */ - phone: string; - /** First name */ - first_name: string; - /** Last name */ - last_name: string; - /** Date added */ - date: number; - - protected get [id](): number { - return 0x1142BD56; - } - - static get [name](): string { - return "savedPhoneContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { phone: string; first_name: string; last_name: string; date: number }) { - super(); - this.phone = params.phone; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.date = params.date; - } -} - -/** Takeout info */ -export class account_Takeout_ extends _account_Takeout_ { - /** Takeout ID */ - id: bigint; - - protected get [id](): number { - return 0x4DBA4501; - } - - static get [name](): string { - return "account.takeout" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm) */ -export class PasswordKdfAlgoUnknown_ extends _PasswordKdfAlgo_ { - protected get [id](): number { - return 0xD45AB096; - } - - static get [name](): string { - return "passwordKdfAlgoUnknown" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** This key derivation algorithm defines that [SRP 2FA login](https://core.telegram.org/api/srp) must be used */ -export class PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_ extends _PasswordKdfAlgo_ { - /** One of two salts used by the derivation function (see [SRP 2FA login](https://core.telegram.org/api/srp)) */ - salt1: Uint8Array; - /** One of two salts used by the derivation function (see [SRP 2FA login](https://core.telegram.org/api/srp)) */ - salt2: Uint8Array; - /** Base (see [SRP 2FA login](https://core.telegram.org/api/srp)) */ - g: number; - /** 2048-bit modulus (see [SRP 2FA login](https://core.telegram.org/api/srp)) */ - p: Uint8Array; - - protected get [id](): number { - return 0x3A912D4A; - } - - static get [name](): string { - return "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow" - } - - static get [paramDesc](): ParamDesc { - return [ - ["salt1", Uint8Array, "bytes"], - ["salt2", Uint8Array, "bytes"], - ["g", "number", "int"], - ["p", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.salt1, Uint8Array, "bytes"], - [this.salt2, Uint8Array, "bytes"], - [this.g, "number", "int"], - [this.p, Uint8Array, "bytes"], - ]; - } - - constructor(params: { salt1: Uint8Array; salt2: Uint8Array; g: number; p: Uint8Array }) { - super(); - this.salt1 = params.salt1; - this.salt2 = params.salt2; - this.g = params.g; - this.p = params.p; - } -} - -/** Unknown KDF algo (most likely the client has to be updated) */ -export class SecurePasswordKdfAlgoUnknown_ extends _SecurePasswordKdfAlgo_ { - protected get [id](): number { - return 0x004A8537; - } - - static get [name](): string { - return "securePasswordKdfAlgoUnknown" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** PBKDF2 with SHA512 and 100000 iterations KDF algo */ -export class SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000_ extends _SecurePasswordKdfAlgo_ { - /** Salt */ - salt: Uint8Array; - - protected get [id](): number { - return 0xBBF2DDA0; - } - - static get [name](): string { - return "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000" - } - - static get [paramDesc](): ParamDesc { - return [ - ["salt", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.salt, Uint8Array, "bytes"], - ]; - } - - constructor(params: { salt: Uint8Array }) { - super(); - this.salt = params.salt; - } -} - -/** SHA512 KDF algo */ -export class SecurePasswordKdfAlgoSHA512_ extends _SecurePasswordKdfAlgo_ { - /** Salt */ - salt: Uint8Array; - - protected get [id](): number { - return 0x86471D92; - } - - static get [name](): string { - return "securePasswordKdfAlgoSHA512" - } - - static get [paramDesc](): ParamDesc { - return [ - ["salt", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.salt, Uint8Array, "bytes"], - ]; - } - - constructor(params: { salt: Uint8Array }) { - super(); - this.salt = params.salt; - } -} - -/** Secure settings */ -export class SecureSecretSettings_ extends _SecureSecretSettings_ { - /** Secure KDF algo */ - secure_algo: enums.SecurePasswordKdfAlgo; - /** Secure secret */ - secure_secret: Uint8Array; - /** Secret ID */ - secure_secret_id: bigint; - - protected get [id](): number { - return 0x1527BCAC; - } - - static get [name](): string { - return "secureSecretSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["secure_algo", _SecurePasswordKdfAlgo_, "SecurePasswordKdfAlgo"], - ["secure_secret", Uint8Array, "bytes"], - ["secure_secret_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.secure_algo, _SecurePasswordKdfAlgo_, "SecurePasswordKdfAlgo"], - [this.secure_secret, Uint8Array, "bytes"], - [this.secure_secret_id, "bigint", "long"], - ]; - } - - constructor(params: { secure_algo: enums.SecurePasswordKdfAlgo; secure_secret: Uint8Array; secure_secret_id: bigint }) { - super(); - this.secure_algo = params.secure_algo; - this.secure_secret = params.secure_secret; - this.secure_secret_id = params.secure_secret_id; - } -} - -/** There is no password */ -export class InputCheckPasswordEmpty_ extends _InputCheckPasswordSRP_ { - protected get [id](): number { - return 0x9880F658; - } - - static get [name](): string { - return "inputCheckPasswordEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Constructor for checking the validity of a 2FA SRP password (see [SRP](https://core.telegram.org/api/srp)) */ -export class InputCheckPasswordSRP_ extends _InputCheckPasswordSRP_ { - /** [SRP ID](https://core.telegram.org/api/srp) */ - srp_id: bigint; - /** `A` parameter (see [SRP](https://core.telegram.org/api/srp)) */ - A: Uint8Array; - /** `M1` parameter (see [SRP](https://core.telegram.org/api/srp)) */ - M1: Uint8Array; - - protected get [id](): number { - return 0xD27FF082; - } - - static get [name](): string { - return "inputCheckPasswordSRP" - } - - static get [paramDesc](): ParamDesc { - return [ - ["srp_id", "bigint", "long"], - ["A", Uint8Array, "bytes"], - ["M1", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.srp_id, "bigint", "long"], - [this.A, Uint8Array, "bytes"], - [this.M1, Uint8Array, "bytes"], - ]; - } - - constructor(params: { srp_id: bigint; A: Uint8Array; M1: Uint8Array }) { - super(); - this.srp_id = params.srp_id; - this.A = params.A; - this.M1 = params.M1; - } -} - -/** Required type */ -export class SecureRequiredType_ extends _SecureRequiredType_ { - /** Native names */ - native_names?: true; - /** Is a selfie required */ - selfie_required?: true; - /** Is a translation required */ - translation_required?: true; - /** Secure value type */ - type: enums.SecureValueType; - - protected get [id](): number { - return 0x829D99DA; - } - - static get [name](): string { - return "secureRequiredType" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["native_names", "true", "flags.0?true"], - ["selfie_required", "true", "flags.1?true"], - ["translation_required", "true", "flags.2?true"], - ["type", _SecureValueType_, "SecureValueType"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.native_names ?? null, "true", "flags.0?true"], - [this.selfie_required ?? null, "true", "flags.1?true"], - [this.translation_required ?? null, "true", "flags.2?true"], - [this.type, _SecureValueType_, "SecureValueType"], - ]; - } - - constructor(params: { native_names?: true; selfie_required?: true; translation_required?: true; type: enums.SecureValueType }) { - super(); - this.native_names = params.native_names; - this.selfie_required = params.selfie_required; - this.translation_required = params.translation_required; - this.type = params.type; - } -} - -/** One of */ -export class SecureRequiredTypeOneOf_ extends _SecureRequiredType_ { - /** Secure required value types */ - types: Array; - - protected get [id](): number { - return 0x027477B4; - } - - static get [name](): string { - return "secureRequiredTypeOneOf" - } - - static get [paramDesc](): ParamDesc { - return [ - ["types", [_SecureRequiredType_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.types, [_SecureRequiredType_], "Vector"], - ]; - } - - constructor(params: { types: Array }) { - super(); - this.types = params.types; - } -} - -/** Password configuration not modified */ -export class help_PassportConfigNotModified_ extends _help_PassportConfig_ { - protected get [id](): number { - return 0xBFB9F457; - } - - static get [name](): string { - return "help.passportConfigNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Telegram [passport](https://core.telegram.org/passport) configuration */ -export class help_PassportConfig_ extends _help_PassportConfig_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - /** Localization */ - countries_langs: enums.DataJSON; - - protected get [id](): number { - return 0xA098D6AF; - } - - static get [name](): string { - return "help.passportConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ["countries_langs", _DataJSON_, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - [this.countries_langs, _DataJSON_, "DataJSON"], - ]; - } - - constructor(params: { hash: number; countries_langs: enums.DataJSON }) { - super(); - this.hash = params.hash; - this.countries_langs = params.countries_langs; - } -} - -/** Event that occurred in the application. */ -export class InputAppEvent_ extends _InputAppEvent_ { - /** Client's exact timestamp for the event */ - time: number; - /** Type of event */ - type: string; - /** Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object */ - peer: bigint; - /** Details of the event */ - data: enums.JSONValue; - - protected get [id](): number { - return 0x1D1B1245; - } - - static get [name](): string { - return "inputAppEvent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["time", "number", "double"], - ["type", "string", "string"], - ["peer", "bigint", "long"], - ["data", _JSONValue_, "JSONValue"], - ]; - } - - protected get [params](): Params { - return [ - [this.time, "number", "double"], - [this.type, "string", "string"], - [this.peer, "bigint", "long"], - [this.data, _JSONValue_, "JSONValue"], - ]; - } - - constructor(params: { time: number; type: string; peer: bigint; data: enums.JSONValue }) { - super(); - this.time = params.time; - this.type = params.type; - this.peer = params.peer; - this.data = params.data; - } -} - -/** JSON key: value pair */ -export class JsonObjectValue_ extends _JSONObjectValue_ { - /** Key */ - key: string; - /** Value */ - value: enums.JSONValue; - - protected get [id](): number { - return 0xC0DE1BD9; - } - - static get [name](): string { - return "jsonObjectValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["key", "string", "string"], - ["value", _JSONValue_, "JSONValue"], - ]; - } - - protected get [params](): Params { - return [ - [this.key, "string", "string"], - [this.value, _JSONValue_, "JSONValue"], - ]; - } - - constructor(params: { key: string; value: enums.JSONValue }) { - super(); - this.key = params.key; - this.value = params.value; - } -} - -/** null JSON value */ -export class JsonNull_ extends _JSONValue_ { - protected get [id](): number { - return 0x3F6D7B68; - } - - static get [name](): string { - return "jsonNull" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** JSON boolean value */ -export class JsonBool_ extends _JSONValue_ { - /** Value */ - value: boolean; - - protected get [id](): number { - return 0xC7345E6A; - } - - static get [name](): string { - return "jsonBool" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, "boolean", "Bool"], - ]; - } - - constructor(params: { value: boolean }) { - super(); - this.value = params.value; - } -} - -/** JSON numeric value */ -export class JsonNumber_ extends _JSONValue_ { - /** Value */ - value: number; - - protected get [id](): number { - return 0x2BE0DFA4; - } - - static get [name](): string { - return "jsonNumber" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, "number", "double"], - ]; - } - - constructor(params: { value: number }) { - super(); - this.value = params.value; - } -} - -/** JSON string */ -export class JsonString_ extends _JSONValue_ { - /** Value */ - value: string; - - protected get [id](): number { - return 0xB71E767A; - } - - static get [name](): string { - return "jsonString" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, "string", "string"], - ]; - } - - constructor(params: { value: string }) { - super(); - this.value = params.value; - } -} - -/** JSON array */ -export class JsonArray_ extends _JSONValue_ { - /** JSON values */ - value: Array; - - protected get [id](): number { - return 0xF7444763; - } - - static get [name](): string { - return "jsonArray" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", [_JSONValue_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, [_JSONValue_], "Vector"], - ]; - } - - constructor(params: { value: Array }) { - super(); - this.value = params.value; - } -} - -/** JSON object value */ -export class JsonObject_ extends _JSONValue_ { - /** Values */ - value: Array; - - protected get [id](): number { - return 0x99C1D49D; - } - - static get [name](): string { - return "jsonObject" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", [_JSONObjectValue_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, [_JSONObjectValue_], "Vector"], - ]; - } - - constructor(params: { value: Array }) { - super(); - this.value = params.value; - } -} - -/** Table cell */ -export class PageTableCell_ extends _PageTableCell_ { - /** Is this element part of the column header */ - header?: true; - /** Horizontally centered block */ - align_center?: true; - /** Right-aligned block */ - align_right?: true; - /** Vertically centered block */ - valign_middle?: true; - /** Block vertically-aligned to the bottom */ - valign_bottom?: true; - /** Content */ - text?: enums.RichText; - /** For how many columns should this cell extend */ - colspan?: number; - /** For how many rows should this cell extend */ - rowspan?: number; - - protected get [id](): number { - return 0x34566B6A; - } - - static get [name](): string { - return "pageTableCell" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["header", "true", "flags.0?true"], - ["align_center", "true", "flags.3?true"], - ["align_right", "true", "flags.4?true"], - ["valign_middle", "true", "flags.5?true"], - ["valign_bottom", "true", "flags.6?true"], - ["text", _RichText_, "flags.7?RichText"], - ["colspan", "number", "flags.1?int"], - ["rowspan", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.header ?? null, "true", "flags.0?true"], - [this.align_center ?? null, "true", "flags.3?true"], - [this.align_right ?? null, "true", "flags.4?true"], - [this.valign_middle ?? null, "true", "flags.5?true"], - [this.valign_bottom ?? null, "true", "flags.6?true"], - [this.text ?? null, _RichText_, "flags.7?RichText"], - [this.colspan ?? null, "number", "flags.1?int"], - [this.rowspan ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params?: { header?: true; align_center?: true; align_right?: true; valign_middle?: true; valign_bottom?: true; text?: enums.RichText; colspan?: number; rowspan?: number }) { - super(); - this.header = params?.header; - this.align_center = params?.align_center; - this.align_right = params?.align_right; - this.valign_middle = params?.valign_middle; - this.valign_bottom = params?.valign_bottom; - this.text = params?.text; - this.colspan = params?.colspan; - this.rowspan = params?.rowspan; - } -} - -/** Table row */ -export class PageTableRow_ extends _PageTableRow_ { - /** Table cells */ - cells: Array; - - protected get [id](): number { - return 0xE0C0C5E5; - } - - static get [name](): string { - return "pageTableRow" - } - - static get [paramDesc](): ParamDesc { - return [ - ["cells", [_PageTableCell_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.cells, [_PageTableCell_], "Vector"], - ]; - } - - constructor(params: { cells: Array }) { - super(); - this.cells = params.cells; - } -} - -/** Page caption */ -export class PageCaption_ extends _PageCaption_ { - /** Caption */ - text: enums.RichText; - /** Credits */ - credit: enums.RichText; - - protected get [id](): number { - return 0x6F747657; - } - - static get [name](): string { - return "pageCaption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ["credit", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - [this.credit, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText; credit: enums.RichText }) { - super(); - this.text = params.text; - this.credit = params.credit; - } -} - -/** List item */ -export class PageListItemText_ extends _PageListItem_ { - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0xB92FB6CD; - } - - static get [name](): string { - return "pageListItemText" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { text: enums.RichText }) { - super(); - this.text = params.text; - } -} - -/** List item */ -export class PageListItemBlocks_ extends _PageListItem_ { - /** Blocks */ - blocks: Array; - - protected get [id](): number { - return 0x25E073FC; - } - - static get [name](): string { - return "pageListItemBlocks" - } - - static get [paramDesc](): ParamDesc { - return [ - ["blocks", [_PageBlock_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.blocks, [_PageBlock_], "Vector"], - ]; - } - - constructor(params: { blocks: Array }) { - super(); - this.blocks = params.blocks; - } -} - -/** Ordered list of text items */ -export class PageListOrderedItemText_ extends _PageListOrderedItem_ { - /** Number of element within ordered list */ - num: string; - /** Text */ - text: enums.RichText; - - protected get [id](): number { - return 0x5E068047; - } - - static get [name](): string { - return "pageListOrderedItemText" - } - - static get [paramDesc](): ParamDesc { - return [ - ["num", "string", "string"], - ["text", _RichText_, "RichText"], - ]; - } - - protected get [params](): Params { - return [ - [this.num, "string", "string"], - [this.text, _RichText_, "RichText"], - ]; - } - - constructor(params: { num: string; text: enums.RichText }) { - super(); - this.num = params.num; - this.text = params.text; - } -} - -/** Ordered list of [IV](https://instantview.telegram.org) blocks */ -export class PageListOrderedItemBlocks_ extends _PageListOrderedItem_ { - /** Number of element within ordered list */ - num: string; - /** Item contents */ - blocks: Array; - - protected get [id](): number { - return 0x98DD8936; - } - - static get [name](): string { - return "pageListOrderedItemBlocks" - } - - static get [paramDesc](): ParamDesc { - return [ - ["num", "string", "string"], - ["blocks", [_PageBlock_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.num, "string", "string"], - [this.blocks, [_PageBlock_], "Vector"], - ]; - } - - constructor(params: { num: string; blocks: Array }) { - super(); - this.num = params.num; - this.blocks = params.blocks; - } -} - -/** Related article */ -export class PageRelatedArticle_ extends _PageRelatedArticle_ { - /** URL of article */ - url: string; - /** Webpage ID of generated IV preview */ - webpage_id: bigint; - /** Title */ - title?: string; - /** Description */ - description?: string; - /** ID of preview photo */ - photo_id?: bigint; - /** Author name */ - author?: string; - /** Date of publication */ - published_date?: number; - - protected get [id](): number { - return 0xB390DC08; - } - - static get [name](): string { - return "pageRelatedArticle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["url", "string", "string"], - ["webpage_id", "bigint", "long"], - ["title", "string", "flags.0?string"], - ["description", "string", "flags.1?string"], - ["photo_id", "bigint", "flags.2?long"], - ["author", "string", "flags.3?string"], - ["published_date", "number", "flags.4?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.url, "string", "string"], - [this.webpage_id, "bigint", "long"], - [this.title ?? null, "string", "flags.0?string"], - [this.description ?? null, "string", "flags.1?string"], - [this.photo_id ?? null, "bigint", "flags.2?long"], - [this.author ?? null, "string", "flags.3?string"], - [this.published_date ?? null, "number", "flags.4?int"], - ]; - } - - constructor(params: { url: string; webpage_id: bigint; title?: string; description?: string; photo_id?: bigint; author?: string; published_date?: number }) { - super(); - this.url = params.url; - this.webpage_id = params.webpage_id; - this.title = params.title; - this.description = params.description; - this.photo_id = params.photo_id; - this.author = params.author; - this.published_date = params.published_date; - } -} - -/** [Instant view](https://instantview.telegram.org) page */ -export class Page_ extends _Page_ { - /** Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using [messages.getWebPagePreview](https://core.telegram.org/method/messages.getWebPagePreview). */ - part?: true; - /** Whether the page contains RTL text */ - rtl?: true; - /** Whether this is an [IV v2](https://instantview.telegram.org/docs#what-39s-new-in-2-0) page */ - v2?: true; - /** Original page HTTP URL */ - url: string; - /** Page elements (like with HTML elements, only as TL constructors) */ - blocks: Array; - /** Photos in page */ - photos: Array; - /** Media in page */ - documents: Array; - /** View count */ - views?: number; - - protected get [id](): number { - return 0x98657F0D; - } - - static get [name](): string { - return "page" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["part", "true", "flags.0?true"], - ["rtl", "true", "flags.1?true"], - ["v2", "true", "flags.2?true"], - ["url", "string", "string"], - ["blocks", [_PageBlock_], "Vector"], - ["photos", [_Photo_], "Vector"], - ["documents", [_Document_], "Vector"], - ["views", "number", "flags.3?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.part ?? null, "true", "flags.0?true"], - [this.rtl ?? null, "true", "flags.1?true"], - [this.v2 ?? null, "true", "flags.2?true"], - [this.url, "string", "string"], - [this.blocks, [_PageBlock_], "Vector"], - [this.photos, [_Photo_], "Vector"], - [this.documents, [_Document_], "Vector"], - [this.views ?? null, "number", "flags.3?int"], - ]; - } - - constructor(params: { part?: true; rtl?: true; v2?: true; url: string; blocks: Array; photos: Array; documents: Array; views?: number }) { - super(); - this.part = params.part; - this.rtl = params.rtl; - this.v2 = params.v2; - this.url = params.url; - this.blocks = params.blocks; - this.photos = params.photos; - this.documents = params.documents; - this.views = params.views; - } -} - -/** Localized name for telegram support */ -export class help_SupportName_ extends _help_SupportName_ { - /** Localized name */ - name: string; - - protected get [id](): number { - return 0x8C05F1C9; - } - - static get [name](): string { - return "help.supportName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.name, "string", "string"], - ]; - } - - constructor(params: { name: string }) { - super(); - this.name = params.name; - } -} - -/** Internal use */ -export class help_UserInfoEmpty_ extends _help_UserInfo_ { - protected get [id](): number { - return 0xF3AE2EED; - } - - static get [name](): string { - return "help.userInfoEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Internal use */ -export class help_UserInfo_ extends _help_UserInfo_ { - /** Info */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities: Array; - /** Author */ - author: string; - /** Date */ - date: number; - - protected get [id](): number { - return 0x01EB3758; - } - - static get [name](): string { - return "help.userInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", "string", "string"], - ["entities", [_MessageEntity_], "Vector"], - ["author", "string", "string"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, "string", "string"], - [this.entities, [_MessageEntity_], "Vector"], - [this.author, "string", "string"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { message: string; entities: Array; author: string; date: number }) { - super(); - this.message = params.message; - this.entities = params.entities; - this.author = params.author; - this.date = params.date; - } -} - -/** A possible answer of a poll */ -export class PollAnswer_ extends _PollAnswer_ { - /** Textual representation of the answer */ - text: string; - /** The param that has to be passed to [messages.sendVote](https://core.telegram.org/method/messages.sendVote). */ - option: Uint8Array; - - protected get [id](): number { - return 0x6CA9C2E9; - } - - static get [name](): string { - return "pollAnswer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["option", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.option, Uint8Array, "bytes"], - ]; - } - - constructor(params: { text: string; option: Uint8Array }) { - super(); - this.text = params.text; - this.option = params.option; - } -} - -/** Poll */ -export class Poll_ extends _Poll_ { - /** ID of the poll */ - id: bigint; - /** Whether the poll is closed and doesn't accept any more answers */ - closed?: true; - /** Whether cast votes are publicly visible to all users (non-anonymous poll) */ - public_voters?: true; - /** Whether multiple options can be chosen as answer */ - multiple_choice?: true; - /** Whether this is a quiz (with wrong and correct answers, results shown in the return type) */ - quiz?: true; - /** The question of the poll */ - question: string; - /** The possible answers, vote using [messages.sendVote](https://core.telegram.org/method/messages.sendVote). */ - answers: Array; - /** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close\_date. */ - close_period?: number; - /** Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close\_period. */ - close_date?: number; - - protected get [id](): number { - return 0x86E18161; - } - - static get [name](): string { - return "poll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["flags", flags, "#"], - ["closed", "true", "flags.0?true"], - ["public_voters", "true", "flags.1?true"], - ["multiple_choice", "true", "flags.2?true"], - ["quiz", "true", "flags.3?true"], - ["question", "string", "string"], - ["answers", [_PollAnswer_], "Vector"], - ["close_period", "number", "flags.4?int"], - ["close_date", "number", "flags.5?int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ["flags", flags, "#"], - [this.closed ?? null, "true", "flags.0?true"], - [this.public_voters ?? null, "true", "flags.1?true"], - [this.multiple_choice ?? null, "true", "flags.2?true"], - [this.quiz ?? null, "true", "flags.3?true"], - [this.question, "string", "string"], - [this.answers, [_PollAnswer_], "Vector"], - [this.close_period ?? null, "number", "flags.4?int"], - [this.close_date ?? null, "number", "flags.5?int"], - ]; - } - - constructor(params: { id: bigint; closed?: true; public_voters?: true; multiple_choice?: true; quiz?: true; question: string; answers: Array; close_period?: number; close_date?: number }) { - super(); - this.id = params.id; - this.closed = params.closed; - this.public_voters = params.public_voters; - this.multiple_choice = params.multiple_choice; - this.quiz = params.quiz; - this.question = params.question; - this.answers = params.answers; - this.close_period = params.close_period; - this.close_date = params.close_date; - } -} - -/** A poll answer, and how users voted on it */ -export class PollAnswerVoters_ extends _PollAnswerVoters_ { - /** Whether we have chosen this answer */ - chosen?: true; - /** For quizzes, whether the option we have chosen is correct */ - correct?: true; - /** The param that has to be passed to [messages.sendVote](https://core.telegram.org/method/messages.sendVote). */ - option: Uint8Array; - /** How many users voted for this option */ - voters: number; - - protected get [id](): number { - return 0x3B6DDAD2; - } - - static get [name](): string { - return "pollAnswerVoters" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["chosen", "true", "flags.0?true"], - ["correct", "true", "flags.1?true"], - ["option", Uint8Array, "bytes"], - ["voters", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.chosen ?? null, "true", "flags.0?true"], - [this.correct ?? null, "true", "flags.1?true"], - [this.option, Uint8Array, "bytes"], - [this.voters, "number", "int"], - ]; - } - - constructor(params: { chosen?: true; correct?: true; option: Uint8Array; voters: number }) { - super(); - this.chosen = params.chosen; - this.correct = params.correct; - this.option = params.option; - this.voters = params.voters; - } -} - -/** Results of poll */ -export class PollResults_ extends _PollResults_ { - /** Similar to [min](https://core.telegram.org/api/min) objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use [messages.getPollResults](https://core.telegram.org/method/messages.getPollResults) to get the full poll results). */ - min?: true; - /** Poll results */ - results?: Array; - /** Total number of people that voted in the poll */ - total_voters?: number; - /** IDs of the last users that recently voted in the poll */ - recent_voters?: Array; - /** Explanation of quiz solution */ - solution?: string; - /** [Message entities for styled text in quiz solution](https://core.telegram.org/api/entities) */ - solution_entities?: Array; - - protected get [id](): number { - return 0x7ADF2420; - } - - static get [name](): string { - return "pollResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["min", "true", "flags.0?true"], - ["results", [_PollAnswerVoters_], "flags.1?Vector"], - ["total_voters", "number", "flags.2?int"], - ["recent_voters", [_Peer_], "flags.3?Vector"], - ["solution", "string", "flags.4?string"], - ["solution_entities", [_MessageEntity_], "flags.4?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.min ?? null, "true", "flags.0?true"], - [this.results ?? null, [_PollAnswerVoters_], "flags.1?Vector"], - [this.total_voters ?? null, "number", "flags.2?int"], - [this.recent_voters ?? null, [_Peer_], "flags.3?Vector"], - [this.solution ?? null, "string", "flags.4?string"], - [this.solution_entities ?? null, [_MessageEntity_], "flags.4?Vector"], - ]; - } - - constructor(params?: { min?: true; results?: Array; total_voters?: number; recent_voters?: Array; solution?: string; solution_entities?: Array }) { - super(); - this.min = params?.min; - this.results = params?.results; - this.total_voters = params?.total_voters; - this.recent_voters = params?.recent_voters; - this.solution = params?.solution; - this.solution_entities = params?.solution_entities; - } -} - -/** Number of online users in a chat */ -export class ChatOnlines_ extends _ChatOnlines_ { - /** Number of online users */ - onlines: number; - - protected get [id](): number { - return 0xF041E250; - } - - static get [name](): string { - return "chatOnlines" - } - - static get [paramDesc](): ParamDesc { - return [ - ["onlines", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.onlines, "number", "int"], - ]; - } - - constructor(params: { onlines: number }) { - super(); - this.onlines = params.onlines; - } -} - -/** URL with chat statistics */ -export class StatsURL_ extends _StatsURL_ { - /** Chat statistics */ - url: string; - - protected get [id](): number { - return 0x47A971E0; - } - - static get [name](): string { - return "statsURL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Represents the rights of an admin in a [channel/supergroup](https://core.telegram.org/api/channel). */ -export class ChatAdminRights_ extends _ChatAdminRights_ { - /** If set, allows the admin to modify the description of the [channel/supergroup](https://core.telegram.org/api/channel) */ - change_info?: true; - /** If set, allows the admin to post messages in the [channel](https://core.telegram.org/api/channel) */ - post_messages?: true; - /** If set, allows the admin to also edit messages from other admins in the [channel](https://core.telegram.org/api/channel) */ - edit_messages?: true; - /** If set, allows the admin to also delete messages from other admins in the [channel](https://core.telegram.org/api/channel) */ - delete_messages?: true; - /** If set, allows the admin to ban users from the [channel/supergroup](https://core.telegram.org/api/channel) */ - ban_users?: true; - /** If set, allows the admin to invite users in the [channel/supergroup](https://core.telegram.org/api/channel) */ - invite_users?: true; - /** If set, allows the admin to pin messages in the [channel/supergroup](https://core.telegram.org/api/channel) */ - pin_messages?: true; - /** If set, allows the admin to add other admins with the same (or more limited) permissions in the [channel/supergroup](https://core.telegram.org/api/channel) */ - add_admins?: true; - /** Whether this admin is anonymous */ - anonymous?: true; - /** If set, allows the admin to change group call/livestream settings */ - manage_call?: true; - /** Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat [admin log](https://core.telegram.org/api/recent-actions), get [chat statistics](https://core.telegram.org/api/stats), get [message statistics in channels](https://core.telegram.org/api/stats), get channel members, see anonymous administrators in supergroups and ignore slow mode. */ - other?: true; - /** If set, allows the admin to create, delete or modify [forum topics »](https://core.telegram.org/api/forum#forum-topics). */ - manage_topics?: true; - /** If set, allows the admin to post [stories](https://core.telegram.org/api/stories) as the [channel](https://core.telegram.org/api/channel). */ - post_stories?: true; - /** If set, allows the admin to edit [stories](https://core.telegram.org/api/stories) posted by the other admins of the [channel](https://core.telegram.org/api/channel). */ - edit_stories?: true; - /** If set, allows the admin to delete [stories](https://core.telegram.org/api/stories) posted by the other admins of the [channel](https://core.telegram.org/api/channel). */ - delete_stories?: true; - - protected get [id](): number { - return 0x5FB224D5; - } - - static get [name](): string { - return "chatAdminRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["change_info", "true", "flags.0?true"], - ["post_messages", "true", "flags.1?true"], - ["edit_messages", "true", "flags.2?true"], - ["delete_messages", "true", "flags.3?true"], - ["ban_users", "true", "flags.4?true"], - ["invite_users", "true", "flags.5?true"], - ["pin_messages", "true", "flags.7?true"], - ["add_admins", "true", "flags.9?true"], - ["anonymous", "true", "flags.10?true"], - ["manage_call", "true", "flags.11?true"], - ["other", "true", "flags.12?true"], - ["manage_topics", "true", "flags.13?true"], - ["post_stories", "true", "flags.14?true"], - ["edit_stories", "true", "flags.15?true"], - ["delete_stories", "true", "flags.16?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.change_info ?? null, "true", "flags.0?true"], - [this.post_messages ?? null, "true", "flags.1?true"], - [this.edit_messages ?? null, "true", "flags.2?true"], - [this.delete_messages ?? null, "true", "flags.3?true"], - [this.ban_users ?? null, "true", "flags.4?true"], - [this.invite_users ?? null, "true", "flags.5?true"], - [this.pin_messages ?? null, "true", "flags.7?true"], - [this.add_admins ?? null, "true", "flags.9?true"], - [this.anonymous ?? null, "true", "flags.10?true"], - [this.manage_call ?? null, "true", "flags.11?true"], - [this.other ?? null, "true", "flags.12?true"], - [this.manage_topics ?? null, "true", "flags.13?true"], - [this.post_stories ?? null, "true", "flags.14?true"], - [this.edit_stories ?? null, "true", "flags.15?true"], - [this.delete_stories ?? null, "true", "flags.16?true"], - ]; - } - - constructor(params?: { change_info?: true; post_messages?: true; edit_messages?: true; delete_messages?: true; ban_users?: true; invite_users?: true; pin_messages?: true; add_admins?: true; anonymous?: true; manage_call?: true; other?: true; manage_topics?: true; post_stories?: true; edit_stories?: true; delete_stories?: true }) { - super(); - this.change_info = params?.change_info; - this.post_messages = params?.post_messages; - this.edit_messages = params?.edit_messages; - this.delete_messages = params?.delete_messages; - this.ban_users = params?.ban_users; - this.invite_users = params?.invite_users; - this.pin_messages = params?.pin_messages; - this.add_admins = params?.add_admins; - this.anonymous = params?.anonymous; - this.manage_call = params?.manage_call; - this.other = params?.other; - this.manage_topics = params?.manage_topics; - this.post_stories = params?.post_stories; - this.edit_stories = params?.edit_stories; - this.delete_stories = params?.delete_stories; - } -} - -/** Represents the rights of a normal user in a [supergroup/channel/chat](https://core.telegram.org/api/channel). In this case, the flags are inverted: if set, a flag **does not allow** a user to do X. */ -export class ChatBannedRights_ extends _ChatBannedRights_ { - /** If set, does not allow a user to view messages in a [supergroup/channel/chat](https://core.telegram.org/api/channel) */ - view_messages?: true; - /** If set, does not allow a user to send messages in a [supergroup/chat](https://core.telegram.org/api/channel) */ - send_messages?: true; - /** If set, does not allow a user to send any media in a [supergroup/chat](https://core.telegram.org/api/channel) */ - send_media?: true; - /** If set, does not allow a user to send stickers in a [supergroup/chat](https://core.telegram.org/api/channel) */ - send_stickers?: true; - /** If set, does not allow a user to send gifs in a [supergroup/chat](https://core.telegram.org/api/channel) */ - send_gifs?: true; - /** If set, does not allow a user to send games in a [supergroup/chat](https://core.telegram.org/api/channel) */ - send_games?: true; - /** If set, does not allow a user to use inline bots in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_inline?: true; - /** If set, does not allow a user to embed links in the messages of a [supergroup/chat](https://core.telegram.org/api/channel) */ - embed_links?: true; - /** If set, does not allow a user to send polls in a [supergroup/chat](https://core.telegram.org/api/channel) */ - send_polls?: true; - /** If set, does not allow any user to change the description of a [supergroup/chat](https://core.telegram.org/api/channel) */ - change_info?: true; - /** If set, does not allow any user to invite users in a [supergroup/chat](https://core.telegram.org/api/channel) */ - invite_users?: true; - /** If set, does not allow any user to pin messages in a [supergroup/chat](https://core.telegram.org/api/channel) */ - pin_messages?: true; - /** If set, does not allow any user to create, delete or modify [forum topics »](https://core.telegram.org/api/forum#forum-topics). */ - manage_topics?: true; - /** If set, does not allow a user to send photos in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_photos?: true; - /** If set, does not allow a user to send videos in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_videos?: true; - /** If set, does not allow a user to send round videos in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_roundvideos?: true; - /** If set, does not allow a user to send audio files in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_audios?: true; - /** If set, does not allow a user to send voice messages in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_voices?: true; - /** If set, does not allow a user to send documents in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_docs?: true; - /** If set, does not allow a user to send text messages in a [supergroup/chat](https://core.telegram.org/api/channel). */ - send_plain?: true; - /** Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days). */ - until_date: number; - - protected get [id](): number { - return 0x9F120418; - } - - static get [name](): string { - return "chatBannedRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["view_messages", "true", "flags.0?true"], - ["send_messages", "true", "flags.1?true"], - ["send_media", "true", "flags.2?true"], - ["send_stickers", "true", "flags.3?true"], - ["send_gifs", "true", "flags.4?true"], - ["send_games", "true", "flags.5?true"], - ["send_inline", "true", "flags.6?true"], - ["embed_links", "true", "flags.7?true"], - ["send_polls", "true", "flags.8?true"], - ["change_info", "true", "flags.10?true"], - ["invite_users", "true", "flags.15?true"], - ["pin_messages", "true", "flags.17?true"], - ["manage_topics", "true", "flags.18?true"], - ["send_photos", "true", "flags.19?true"], - ["send_videos", "true", "flags.20?true"], - ["send_roundvideos", "true", "flags.21?true"], - ["send_audios", "true", "flags.22?true"], - ["send_voices", "true", "flags.23?true"], - ["send_docs", "true", "flags.24?true"], - ["send_plain", "true", "flags.25?true"], - ["until_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.view_messages ?? null, "true", "flags.0?true"], - [this.send_messages ?? null, "true", "flags.1?true"], - [this.send_media ?? null, "true", "flags.2?true"], - [this.send_stickers ?? null, "true", "flags.3?true"], - [this.send_gifs ?? null, "true", "flags.4?true"], - [this.send_games ?? null, "true", "flags.5?true"], - [this.send_inline ?? null, "true", "flags.6?true"], - [this.embed_links ?? null, "true", "flags.7?true"], - [this.send_polls ?? null, "true", "flags.8?true"], - [this.change_info ?? null, "true", "flags.10?true"], - [this.invite_users ?? null, "true", "flags.15?true"], - [this.pin_messages ?? null, "true", "flags.17?true"], - [this.manage_topics ?? null, "true", "flags.18?true"], - [this.send_photos ?? null, "true", "flags.19?true"], - [this.send_videos ?? null, "true", "flags.20?true"], - [this.send_roundvideos ?? null, "true", "flags.21?true"], - [this.send_audios ?? null, "true", "flags.22?true"], - [this.send_voices ?? null, "true", "flags.23?true"], - [this.send_docs ?? null, "true", "flags.24?true"], - [this.send_plain ?? null, "true", "flags.25?true"], - [this.until_date, "number", "int"], - ]; - } - - constructor(params: { view_messages?: true; send_messages?: true; send_media?: true; send_stickers?: true; send_gifs?: true; send_games?: true; send_inline?: true; embed_links?: true; send_polls?: true; change_info?: true; invite_users?: true; pin_messages?: true; manage_topics?: true; send_photos?: true; send_videos?: true; send_roundvideos?: true; send_audios?: true; send_voices?: true; send_docs?: true; send_plain?: true; until_date: number }) { - super(); - this.view_messages = params.view_messages; - this.send_messages = params.send_messages; - this.send_media = params.send_media; - this.send_stickers = params.send_stickers; - this.send_gifs = params.send_gifs; - this.send_games = params.send_games; - this.send_inline = params.send_inline; - this.embed_links = params.embed_links; - this.send_polls = params.send_polls; - this.change_info = params.change_info; - this.invite_users = params.invite_users; - this.pin_messages = params.pin_messages; - this.manage_topics = params.manage_topics; - this.send_photos = params.send_photos; - this.send_videos = params.send_videos; - this.send_roundvideos = params.send_roundvideos; - this.send_audios = params.send_audios; - this.send_voices = params.send_voices; - this.send_docs = params.send_docs; - this.send_plain = params.send_plain; - this.until_date = params.until_date; - } -} - -/** [Wallpaper](https://core.telegram.org/api/wallpapers) */ -export class InputWallPaper_ extends _InputWallPaper_ { - /** [Wallpaper](https://core.telegram.org/api/wallpapers) ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0xE630B979; - } - - static get [name](): string { - return "inputWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** [Wallpaper](https://core.telegram.org/api/wallpapers) by slug (a unique ID, obtained from a [wallpaper link »](https://core.telegram.org/api/links#wallpaper-links)) */ -export class InputWallPaperSlug_ extends _InputWallPaper_ { - /** Unique wallpaper ID */ - slug: string; - - protected get [id](): number { - return 0x72091C80; - } - - static get [name](): string { - return "inputWallPaperSlug" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -/** [Wallpaper](https://core.telegram.org/api/wallpapers) with no file access hash, used for example when deleting (`unsave=true`) wallpapers using [account.saveWallPaper](https://core.telegram.org/method/account.saveWallPaper), specifying just the wallpaper ID. */ -export class InputWallPaperNoFile_ extends _InputWallPaper_ { - /** Wallpaper ID */ - id: bigint; - - protected get [id](): number { - return 0x967A462E; - } - - static get [name](): string { - return "inputWallPaperNoFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** No new [wallpapers](https://core.telegram.org/api/wallpapers) were found */ -export class account_WallPapersNotModified_ extends _account_WallPapers_ { - protected get [id](): number { - return 0x1C199183; - } - - static get [name](): string { - return "account.wallPapersNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Installed [wallpapers](https://core.telegram.org/api/wallpapers) */ -export class account_WallPapers_ extends _account_WallPapers_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** [Wallpapers](https://core.telegram.org/api/wallpapers) */ - wallpapers: Array; - - protected get [id](): number { - return 0xCDC3858C; - } - - static get [name](): string { - return "account.wallPapers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["wallpapers", [_WallPaper_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.wallpapers, [_WallPaper_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; wallpapers: Array }) { - super(); - this.hash = params.hash; - this.wallpapers = params.wallpapers; - } -} - -/** Settings used by telegram servers for sending the confirm code. */ -export class CodeSettings_ extends _CodeSettings_ { - /** Whether to allow phone verification via [phone calls](https://core.telegram.org/api/auth). */ - allow_flashcall?: true; - /** Pass true if the phone number is used on the current device. Ignored if allow\_flashcall is not set. */ - current_number?: true; - /** If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the [android SMS receiver APIs](https://developers.google.com/identity/sms-retriever/overview) */ - allow_app_hash?: true; - /** Whether this device supports receiving the code using the [auth.codeTypeMissedCall](https://core.telegram.org/constructor/auth.codeTypeMissedCall) method */ - allow_missed_call?: true; - /** Whether Firebase auth is supported */ - allow_firebase?: true; - /** Previously stored future auth tokens, see [the documentation for more info »](https://core.telegram.org/api/auth#future-auth-tokens) */ - logout_tokens?: Array; - /** Used only by official iOS apps for Firebase auth: device token for apple push. */ - token?: string; - /** Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification. */ - app_sandbox?: boolean; - - protected get [id](): number { - return 0xAD253D78; - } - - static get [name](): string { - return "codeSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["allow_flashcall", "true", "flags.0?true"], - ["current_number", "true", "flags.1?true"], - ["allow_app_hash", "true", "flags.4?true"], - ["allow_missed_call", "true", "flags.5?true"], - ["allow_firebase", "true", "flags.7?true"], - ["logout_tokens", [Uint8Array], "flags.6?Vector"], - ["token", "string", "flags.8?string"], - ["app_sandbox", "boolean", "flags.8?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.allow_flashcall ?? null, "true", "flags.0?true"], - [this.current_number ?? null, "true", "flags.1?true"], - [this.allow_app_hash ?? null, "true", "flags.4?true"], - [this.allow_missed_call ?? null, "true", "flags.5?true"], - [this.allow_firebase ?? null, "true", "flags.7?true"], - [this.logout_tokens ?? null, [Uint8Array], "flags.6?Vector"], - [this.token ?? null, "string", "flags.8?string"], - [this.app_sandbox ?? null, "boolean", "flags.8?Bool"], - ]; - } - - constructor(params?: { allow_flashcall?: true; current_number?: true; allow_app_hash?: true; allow_missed_call?: true; allow_firebase?: true; logout_tokens?: Array; token?: string; app_sandbox?: boolean }) { - super(); - this.allow_flashcall = params?.allow_flashcall; - this.current_number = params?.current_number; - this.allow_app_hash = params?.allow_app_hash; - this.allow_missed_call = params?.allow_missed_call; - this.allow_firebase = params?.allow_firebase; - this.logout_tokens = params?.logout_tokens; - this.token = params?.token; - this.app_sandbox = params?.app_sandbox; - } -} - -/** [Wallpaper](https://core.telegram.org/api/wallpapers) rendering information. */ -export class WallPaperSettings_ extends _WallPaperSettings_ { - /** For [image wallpapers »](https://core.telegram.org/api/wallpapers#image-wallpapers): if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12. */ - blur?: true; - /** If set, the background needs to be slightly moved when the device is rotated. */ - motion?: true; - /** Used for [solid »](https://core.telegram.org/api/wallpapers#solid-fill), [gradient »](https://core.telegram.org/api/wallpapers#gradient-fill) and [freeform gradient »](https://core.telegram.org/api/wallpapers#freeform-gradient-fill) fills. */ - background_color?: number; - /** Used for [gradient »](https://core.telegram.org/api/wallpapers#gradient-fill) and [freeform gradient »](https://core.telegram.org/api/wallpapers#freeform-gradient-fill) fills. */ - second_background_color?: number; - /** Used for [freeform gradient »](https://core.telegram.org/api/wallpapers#freeform-gradient-fill) fills. */ - third_background_color?: number; - /** Used for [freeform gradient »](https://core.telegram.org/api/wallpapers#freeform-gradient-fill) fills. */ - fourth_background_color?: number; - /** Used for [pattern wallpapers »](https://core.telegram.org/api/wallpapers#pattern-wallpapers). */ - intensity?: number; - /** Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45. */ - rotation?: number; - /** If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji. */ - emoticon?: string; - - protected get [id](): number { - return 0x372EFCD0; - } - - static get [name](): string { - return "wallPaperSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["blur", "true", "flags.1?true"], - ["motion", "true", "flags.2?true"], - ["background_color", "number", "flags.0?int"], - ["second_background_color", "number", "flags.4?int"], - ["third_background_color", "number", "flags.5?int"], - ["fourth_background_color", "number", "flags.6?int"], - ["intensity", "number", "flags.3?int"], - ["rotation", "number", "flags.4?int"], - ["emoticon", "string", "flags.7?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.blur ?? null, "true", "flags.1?true"], - [this.motion ?? null, "true", "flags.2?true"], - [this.background_color ?? null, "number", "flags.0?int"], - [this.second_background_color ?? null, "number", "flags.4?int"], - [this.third_background_color ?? null, "number", "flags.5?int"], - [this.fourth_background_color ?? null, "number", "flags.6?int"], - [this.intensity ?? null, "number", "flags.3?int"], - [this.rotation ?? null, "number", "flags.4?int"], - [this.emoticon ?? null, "string", "flags.7?string"], - ]; - } - - constructor(params?: { blur?: true; motion?: true; background_color?: number; second_background_color?: number; third_background_color?: number; fourth_background_color?: number; intensity?: number; rotation?: number; emoticon?: string }) { - super(); - this.blur = params?.blur; - this.motion = params?.motion; - this.background_color = params?.background_color; - this.second_background_color = params?.second_background_color; - this.third_background_color = params?.third_background_color; - this.fourth_background_color = params?.fourth_background_color; - this.intensity = params?.intensity; - this.rotation = params?.rotation; - this.emoticon = params?.emoticon; - } -} - -/** Autodownload settings */ -export class AutoDownloadSettings_ extends _AutoDownloadSettings_ { - /** Disable automatic media downloads? */ - disabled?: true; - /** Whether to preload the first seconds of videos larger than the specified limit */ - video_preload_large?: true; - /** Whether to preload the next audio track when you're listening to music */ - audio_preload_next?: true; - /** Whether to enable data saving mode in phone calls */ - phonecalls_less_data?: true; - /** Whether to preload [stories](https://core.telegram.org/api/stories); in particular, the first [documentAttributeVideo](https://core.telegram.org/constructor/documentAttributeVideo).`preload_prefix_size` bytes of story videos should be preloaded. */ - stories_preload?: true; - /** Maximum size of photos to preload */ - photo_size_max: number; - /** Maximum size of videos to preload */ - video_size_max: bigint; - /** Maximum size of other files to preload */ - file_size_max: bigint; - /** Maximum suggested bitrate for **uploading** videos */ - video_upload_maxbitrate: number; - /** A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB. */ - small_queue_active_operations_max: number; - /** A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB. */ - large_queue_active_operations_max: number; - - protected get [id](): number { - return 0xBAA57628; - } - - static get [name](): string { - return "autoDownloadSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["disabled", "true", "flags.0?true"], - ["video_preload_large", "true", "flags.1?true"], - ["audio_preload_next", "true", "flags.2?true"], - ["phonecalls_less_data", "true", "flags.3?true"], - ["stories_preload", "true", "flags.4?true"], - ["photo_size_max", "number", "int"], - ["video_size_max", "bigint", "long"], - ["file_size_max", "bigint", "long"], - ["video_upload_maxbitrate", "number", "int"], - ["small_queue_active_operations_max", "number", "int"], - ["large_queue_active_operations_max", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.disabled ?? null, "true", "flags.0?true"], - [this.video_preload_large ?? null, "true", "flags.1?true"], - [this.audio_preload_next ?? null, "true", "flags.2?true"], - [this.phonecalls_less_data ?? null, "true", "flags.3?true"], - [this.stories_preload ?? null, "true", "flags.4?true"], - [this.photo_size_max, "number", "int"], - [this.video_size_max, "bigint", "long"], - [this.file_size_max, "bigint", "long"], - [this.video_upload_maxbitrate, "number", "int"], - [this.small_queue_active_operations_max, "number", "int"], - [this.large_queue_active_operations_max, "number", "int"], - ]; - } - - constructor(params: { disabled?: true; video_preload_large?: true; audio_preload_next?: true; phonecalls_less_data?: true; stories_preload?: true; photo_size_max: number; video_size_max: bigint; file_size_max: bigint; video_upload_maxbitrate: number; small_queue_active_operations_max: number; large_queue_active_operations_max: number }) { - super(); - this.disabled = params.disabled; - this.video_preload_large = params.video_preload_large; - this.audio_preload_next = params.audio_preload_next; - this.phonecalls_less_data = params.phonecalls_less_data; - this.stories_preload = params.stories_preload; - this.photo_size_max = params.photo_size_max; - this.video_size_max = params.video_size_max; - this.file_size_max = params.file_size_max; - this.video_upload_maxbitrate = params.video_upload_maxbitrate; - this.small_queue_active_operations_max = params.small_queue_active_operations_max; - this.large_queue_active_operations_max = params.large_queue_active_operations_max; - } -} - -/** Media autodownload settings */ -export class account_AutoDownloadSettings_ extends _account_AutoDownloadSettings_ { - /** Low data usage preset */ - low: enums.AutoDownloadSettings; - /** Medium data usage preset */ - medium: enums.AutoDownloadSettings; - /** High data usage preset */ - high: enums.AutoDownloadSettings; - - protected get [id](): number { - return 0x63CACF26; - } - - static get [name](): string { - return "account.autoDownloadSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["low", _AutoDownloadSettings_, "AutoDownloadSettings"], - ["medium", _AutoDownloadSettings_, "AutoDownloadSettings"], - ["high", _AutoDownloadSettings_, "AutoDownloadSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.low, _AutoDownloadSettings_, "AutoDownloadSettings"], - [this.medium, _AutoDownloadSettings_, "AutoDownloadSettings"], - [this.high, _AutoDownloadSettings_, "AutoDownloadSettings"], - ]; - } - - constructor(params: { low: enums.AutoDownloadSettings; medium: enums.AutoDownloadSettings; high: enums.AutoDownloadSettings }) { - super(); - this.low = params.low; - this.medium = params.medium; - this.high = params.high; - } -} - -/** Emoji keyword */ -export class EmojiKeyword_ extends _EmojiKeyword_ { - /** Keyword */ - keyword: string; - /** Emojis associated to keyword */ - emoticons: Array; - - protected get [id](): number { - return 0xD5B3B9F9; - } - - static get [name](): string { - return "emojiKeyword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["keyword", "string", "string"], - ["emoticons", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.keyword, "string", "string"], - [this.emoticons, ["string"], "Vector"], - ]; - } - - constructor(params: { keyword: string; emoticons: Array }) { - super(); - this.keyword = params.keyword; - this.emoticons = params.emoticons; - } -} - -/** Deleted emoji keyword */ -export class EmojiKeywordDeleted_ extends _EmojiKeyword_ { - /** Keyword */ - keyword: string; - /** Emojis that were associated to keyword */ - emoticons: Array; - - protected get [id](): number { - return 0x236DF622; - } - - static get [name](): string { - return "emojiKeywordDeleted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["keyword", "string", "string"], - ["emoticons", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.keyword, "string", "string"], - [this.emoticons, ["string"], "Vector"], - ]; - } - - constructor(params: { keyword: string; emoticons: Array }) { - super(); - this.keyword = params.keyword; - this.emoticons = params.emoticons; - } -} - -/** Changes to emoji keywords */ -export class EmojiKeywordsDifference_ extends _EmojiKeywordsDifference_ { - /** Language code for keywords */ - lang_code: string; - /** Previous emoji keyword list version */ - from_version: number; - /** Current version of emoji keyword list */ - version: number; - /** Emojis associated to keywords */ - keywords: Array; - - protected get [id](): number { - return 0x5CC761BD; - } - - static get [name](): string { - return "emojiKeywordsDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ["from_version", "number", "int"], - ["version", "number", "int"], - ["keywords", [_EmojiKeyword_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - [this.from_version, "number", "int"], - [this.version, "number", "int"], - [this.keywords, [_EmojiKeyword_], "Vector"], - ]; - } - - constructor(params: { lang_code: string; from_version: number; version: number; keywords: Array }) { - super(); - this.lang_code = params.lang_code; - this.from_version = params.from_version; - this.version = params.version; - this.keywords = params.keywords; - } -} - -/** An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation */ -export class EmojiURL_ extends _EmojiURL_ { - /** An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation */ - url: string; - - protected get [id](): number { - return 0xA575739D; - } - - static get [name](): string { - return "emojiURL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Emoji language */ -export class EmojiLanguage_ extends _EmojiLanguage_ { - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0xB3FB5361; - } - - static get [name](): string { - return "emojiLanguage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { lang_code: string }) { - super(); - this.lang_code = params.lang_code; - } -} - -/** Folder */ -export class Folder_ extends _Folder_ { - /** Automatically add new channels to this folder */ - autofill_new_broadcasts?: true; - /** Automatically add joined new public supergroups to this folder */ - autofill_public_groups?: true; - /** Automatically add new private chats to this folder */ - autofill_new_correspondents?: true; - /** Folder ID */ - id: number; - /** Folder title */ - title: string; - /** Folder picture */ - photo?: enums.ChatPhoto; - - protected get [id](): number { - return 0xFF544E65; - } - - static get [name](): string { - return "folder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["autofill_new_broadcasts", "true", "flags.0?true"], - ["autofill_public_groups", "true", "flags.1?true"], - ["autofill_new_correspondents", "true", "flags.2?true"], - ["id", "number", "int"], - ["title", "string", "string"], - ["photo", _ChatPhoto_, "flags.3?ChatPhoto"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.autofill_new_broadcasts ?? null, "true", "flags.0?true"], - [this.autofill_public_groups ?? null, "true", "flags.1?true"], - [this.autofill_new_correspondents ?? null, "true", "flags.2?true"], - [this.id, "number", "int"], - [this.title, "string", "string"], - [this.photo ?? null, _ChatPhoto_, "flags.3?ChatPhoto"], - ]; - } - - constructor(params: { autofill_new_broadcasts?: true; autofill_public_groups?: true; autofill_new_correspondents?: true; id: number; title: string; photo?: enums.ChatPhoto }) { - super(); - this.autofill_new_broadcasts = params.autofill_new_broadcasts; - this.autofill_public_groups = params.autofill_public_groups; - this.autofill_new_correspondents = params.autofill_new_correspondents; - this.id = params.id; - this.title = params.title; - this.photo = params.photo; - } -} - -/** Peer in a folder */ -export class InputFolderPeer_ extends _InputFolderPeer_ { - /** Peer */ - peer: enums.InputPeer; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id: number; - - protected get [id](): number { - return 0xFBD2C296; - } - - static get [name](): string { - return "inputFolderPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["folder_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.folder_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; folder_id: number }) { - super(); - this.peer = params.peer; - this.folder_id = params.folder_id; - } -} - -/** Peer in a folder */ -export class FolderPeer_ extends _FolderPeer_ { - /** Folder peer info */ - peer: enums.Peer; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id: number; - - protected get [id](): number { - return 0xE9BAA668; - } - - static get [name](): string { - return "folderPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["folder_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.folder_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; folder_id: number }) { - super(); - this.peer = params.peer; - this.folder_id = params.folder_id; - } -} - -/** Indicates how many results would be found by a [messages.search](https://core.telegram.org/method/messages.search) call with the same parameters */ -export class messages_SearchCounter_ extends _messages_SearchCounter_ { - /** If set, the results may be inexact */ - inexact?: true; - /** Provided message filter */ - filter: enums.MessagesFilter; - /** Number of results that were found server-side */ - count: number; - - protected get [id](): number { - return 0xE844EBFF; - } - - static get [name](): string { - return "messages.searchCounter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inexact", "true", "flags.1?true"], - ["filter", _MessagesFilter_, "MessagesFilter"], - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inexact ?? null, "true", "flags.1?true"], - [this.filter, _MessagesFilter_, "MessagesFilter"], - [this.count, "number", "int"], - ]; - } - - constructor(params: { inexact?: true; filter: enums.MessagesFilter; count: number }) { - super(); - this.inexact = params.inexact; - this.filter = params.filter; - this.count = params.count; - } -} - -/** Details about the authorization request, for more info [click here »](https://core.telegram.org/api/url-authorization) */ -export class UrlAuthResultRequest_ extends _UrlAuthResult_ { - /** Whether the bot would like to send messages to the user */ - request_write_access?: true; - /** Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details. */ - bot: enums.User; - /** The domain name of the website on which the user will log in. */ - domain: string; - - protected get [id](): number { - return 0x92D33A0E; - } - - static get [name](): string { - return "urlAuthResultRequest" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["request_write_access", "true", "flags.0?true"], - ["bot", _User_, "User"], - ["domain", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.request_write_access ?? null, "true", "flags.0?true"], - [this.bot, _User_, "User"], - [this.domain, "string", "string"], - ]; - } - - constructor(params: { request_write_access?: true; bot: enums.User; domain: string }) { - super(); - this.request_write_access = params.request_write_access; - this.bot = params.bot; - this.domain = params.domain; - } -} - -/** Details about an accepted authorization request, for more info [click here »](https://core.telegram.org/api/url-authorization) */ -export class UrlAuthResultAccepted_ extends _UrlAuthResult_ { - /** The URL name of the website on which the user has logged in. */ - url: string; - - protected get [id](): number { - return 0x8F8C0E4E; - } - - static get [name](): string { - return "urlAuthResultAccepted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Details about an accepted authorization request, for more info [click here »](https://core.telegram.org/api/url-authorization) */ -export class UrlAuthResultDefault_ extends _UrlAuthResult_ { - protected get [id](): number { - return 0xA9D6DB1F; - } - - static get [name](): string { - return "urlAuthResultDefault" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** No location (normal supergroup) */ -export class ChannelLocationEmpty_ extends _ChannelLocation_ { - protected get [id](): number { - return 0xBFB5AD8B; - } - - static get [name](): string { - return "channelLocationEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Geographical location of supergroup (geogroups) */ -export class ChannelLocation_ extends _ChannelLocation_ { - /** Geographical location of supergroup */ - geo_point: enums.GeoPoint; - /** Textual description of the address */ - address: string; - - protected get [id](): number { - return 0x209B82DB; - } - - static get [name](): string { - return "channelLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["geo_point", _GeoPoint_, "GeoPoint"], - ["address", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.geo_point, _GeoPoint_, "GeoPoint"], - [this.address, "string", "string"], - ]; - } - - constructor(params: { geo_point: enums.GeoPoint; address: string }) { - super(); - this.geo_point = params.geo_point; - this.address = params.address; - } -} - -/** Peer geolocated nearby */ -export class PeerLocated_ extends _PeerLocated_ { - /** Peer */ - peer: enums.Peer; - /** Validity period of current data */ - expires: number; - /** Distance from the peer in meters */ - distance: number; - - protected get [id](): number { - return 0xCA461B5D; - } - - static get [name](): string { - return "peerLocated" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["expires", "number", "int"], - ["distance", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.expires, "number", "int"], - [this.distance, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; expires: number; distance: number }) { - super(); - this.peer = params.peer; - this.expires = params.expires; - this.distance = params.distance; - } -} - -/** Current peer */ -export class PeerSelfLocated_ extends _PeerLocated_ { - /** Expiry of geolocation info for current peer */ - expires: number; - - protected get [id](): number { - return 0xF8EC284B; - } - - static get [name](): string { - return "peerSelfLocated" - } - - static get [paramDesc](): ParamDesc { - return [ - ["expires", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.expires, "number", "int"], - ]; - } - - constructor(params: { expires: number }) { - super(); - this.expires = params.expires; - } -} - -/** Restriction reason. */ -export class RestrictionReason_ extends _RestrictionReason_ { - /** Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (`android-ios`, `ios-wp`, etc) */ - platform: string; - /** Restriction reason (`porno`, `terms`, etc.) */ - reason: string; - /** Error message to be shown to the user */ - text: string; - - protected get [id](): number { - return 0xD072ACB4; - } - - static get [name](): string { - return "restrictionReason" - } - - static get [paramDesc](): ParamDesc { - return [ - ["platform", "string", "string"], - ["reason", "string", "string"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.platform, "string", "string"], - [this.reason, "string", "string"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { platform: string; reason: string; text: string }) { - super(); - this.platform = params.platform; - this.reason = params.reason; - this.text = params.text; - } -} - -/** Theme */ -export class InputTheme_ extends _InputTheme_ { - /** ID */ - id: bigint; - /** Access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0x3C5693E9; - } - - static get [name](): string { - return "inputTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Theme by theme ID */ -export class InputThemeSlug_ extends _InputTheme_ { - /** Unique theme ID obtained from a [theme deep link »](https://core.telegram.org/api/links#theme-links) */ - slug: string; - - protected get [id](): number { - return 0xF5890DF1; - } - - static get [name](): string { - return "inputThemeSlug" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -/** Theme */ -export class Theme_ extends _Theme_ { - /** Whether the current user is the creator of this theme */ - creator?: true; - /** Whether this is the default theme */ - default?: true; - /** Whether this theme is meant to be used as a [chat theme](https://telegram.org/blog/chat-themes-interactive-emoji-read-receipts) */ - for_chat?: true; - /** Theme ID */ - id: bigint; - /** Theme access hash */ - access_hash: bigint; - /** Unique theme ID */ - slug: string; - /** Theme name */ - title: string; - /** Theme */ - document?: enums.Document; - /** Theme settings */ - settings?: Array; - /** Theme emoji */ - emoticon?: string; - /** Installation count */ - installs_count?: number; - - protected get [id](): number { - return 0xA00E67D6; - } - - static get [name](): string { - return "theme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["creator", "true", "flags.0?true"], - ["default", "true", "flags.1?true"], - ["for_chat", "true", "flags.5?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["slug", "string", "string"], - ["title", "string", "string"], - ["document", _Document_, "flags.2?Document"], - ["settings", [_ThemeSettings_], "flags.3?Vector"], - ["emoticon", "string", "flags.6?string"], - ["installs_count", "number", "flags.4?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.creator ?? null, "true", "flags.0?true"], - [this.default ?? null, "true", "flags.1?true"], - [this.for_chat ?? null, "true", "flags.5?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.slug, "string", "string"], - [this.title, "string", "string"], - [this.document ?? null, _Document_, "flags.2?Document"], - [this.settings ?? null, [_ThemeSettings_], "flags.3?Vector"], - [this.emoticon ?? null, "string", "flags.6?string"], - [this.installs_count ?? null, "number", "flags.4?int"], - ]; - } - - constructor(params: { creator?: true; default?: true; for_chat?: true; id: bigint; access_hash: bigint; slug: string; title: string; document?: enums.Document; settings?: Array; emoticon?: string; installs_count?: number }) { - super(); - this.creator = params.creator; - this.default = params.default; - this.for_chat = params.for_chat; - this.id = params.id; - this.access_hash = params.access_hash; - this.slug = params.slug; - this.title = params.title; - this.document = params.document; - this.settings = params.settings; - this.emoticon = params.emoticon; - this.installs_count = params.installs_count; - } -} - -/** No new themes were installed */ -export class account_ThemesNotModified_ extends _account_Themes_ { - protected get [id](): number { - return 0xF41EB622; - } - - static get [name](): string { - return "account.themesNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Installed themes */ -export class account_Themes_ extends _account_Themes_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Themes */ - themes: Array; - - protected get [id](): number { - return 0x9A3D8C6D; - } - - static get [name](): string { - return "account.themes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["themes", [_Theme_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.themes, [_Theme_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; themes: Array }) { - super(); - this.hash = params.hash; - this.themes = params.themes; - } -} - -/** Login token (for [QR code login](https://core.telegram.org/api/qr-login)) */ -export class auth_LoginToken_ extends _auth_LoginToken_ { - /** Expiration date of QR code */ - expires: number; - /** Token to render in QR code */ - token: Uint8Array; - - protected get [id](): number { - return 0x629F1980; - } - - static get [name](): string { - return "auth.loginToken" - } - - static get [paramDesc](): ParamDesc { - return [ - ["expires", "number", "int"], - ["token", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.expires, "number", "int"], - [this.token, Uint8Array, "bytes"], - ]; - } - - constructor(params: { expires: number; token: Uint8Array }) { - super(); - this.expires = params.expires; - this.token = params.token; - } -} - -/** Repeat the query to the specified DC */ -export class auth_LoginTokenMigrateTo_ extends _auth_LoginToken_ { - /** DC ID */ - dc_id: number; - /** Token to use for login */ - token: Uint8Array; - - protected get [id](): number { - return 0x068E9916; - } - - static get [name](): string { - return "auth.loginTokenMigrateTo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_id", "number", "int"], - ["token", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_id, "number", "int"], - [this.token, Uint8Array, "bytes"], - ]; - } - - constructor(params: { dc_id: number; token: Uint8Array }) { - super(); - this.dc_id = params.dc_id; - this.token = params.token; - } -} - -/** Login via token (QR code) succeeded! */ -export class auth_LoginTokenSuccess_ extends _auth_LoginToken_ { - /** Authorization info */ - authorization: enums.auth.Authorization; - - protected get [id](): number { - return 0x390D5C5E; - } - - static get [name](): string { - return "auth.loginTokenSuccess" - } - - static get [paramDesc](): ParamDesc { - return [ - ["authorization", _auth_Authorization_, "auth.Authorization"], - ]; - } - - protected get [params](): Params { - return [ - [this.authorization, _auth_Authorization_, "auth.Authorization"], - ]; - } - - constructor(params: { authorization: enums.auth.Authorization }) { - super(); - this.authorization = params.authorization; - } -} - -/** Sensitive content settings */ -export class account_ContentSettings_ extends _account_ContentSettings_ { - /** Whether viewing of sensitive (NSFW) content is enabled */ - sensitive_enabled?: true; - /** Whether the current client can change the sensitive content settings to view NSFW content */ - sensitive_can_change?: true; - - protected get [id](): number { - return 0x57E28221; - } - - static get [name](): string { - return "account.contentSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["sensitive_enabled", "true", "flags.0?true"], - ["sensitive_can_change", "true", "flags.1?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.sensitive_enabled ?? null, "true", "flags.0?true"], - [this.sensitive_can_change ?? null, "true", "flags.1?true"], - ]; - } - - constructor(params?: { sensitive_enabled?: true; sensitive_can_change?: true }) { - super(); - this.sensitive_enabled = params?.sensitive_enabled; - this.sensitive_can_change = params?.sensitive_can_change; - } -} - -/** Inactive chat list */ -export class messages_InactiveChats_ extends _messages_InactiveChats_ { - /** When was the chat last active */ - dates: Array; - /** Chat list */ - chats: Array; - /** Users mentioned in the chat list */ - users: Array; - - protected get [id](): number { - return 0xA927FEC5; - } - - static get [name](): string { - return "messages.inactiveChats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dates", ["number"], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.dates, ["number"], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { dates: Array; chats: Array; users: Array }) { - super(); - this.dates = params.dates; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Classic theme */ -export class BaseThemeClassic_ extends _BaseTheme_ { - protected get [id](): number { - return 0xC3A12462; - } - - static get [name](): string { - return "baseThemeClassic" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Day theme */ -export class BaseThemeDay_ extends _BaseTheme_ { - protected get [id](): number { - return 0xFBD81688; - } - - static get [name](): string { - return "baseThemeDay" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Night theme */ -export class BaseThemeNight_ extends _BaseTheme_ { - protected get [id](): number { - return 0xB7B31EA8; - } - - static get [name](): string { - return "baseThemeNight" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Tinted theme */ -export class BaseThemeTinted_ extends _BaseTheme_ { - protected get [id](): number { - return 0x6D5F77EE; - } - - static get [name](): string { - return "baseThemeTinted" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Arctic theme */ -export class BaseThemeArctic_ extends _BaseTheme_ { - protected get [id](): number { - return 0x5B11125A; - } - - static get [name](): string { - return "baseThemeArctic" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Theme settings */ -export class InputThemeSettings_ extends _InputThemeSettings_ { - /** If set, the freeform gradient fill needs to be animated on every sent message */ - message_colors_animated?: true; - /** Default theme on which this theme is based */ - base_theme: enums.BaseTheme; - /** Accent color, ARGB format */ - accent_color: number; - /** Accent color of outgoing messages in ARGB format */ - outbox_accent_color?: number; - /** The fill to be used as a background for outgoing messages, in RGB24 format. - If just one or two equal colors are provided, describes a solid fill of a background. - If two different colors are provided, describes the top and bottom colors of a 0-degree gradient. - If three or four colors are provided, describes a freeform gradient fill of a background. */ - message_colors?: Array; - /** [inputWallPaper](https://core.telegram.org/constructor/inputWallPaper) or [inputWallPaperSlug](https://core.telegram.org/constructor/inputWallPaper) when passing wallpaper files for [image](https://core.telegram.org/api/wallpapers#image-wallpapers) or [pattern](https://core.telegram.org/api/wallpapers#pattern-wallpapers) wallpapers, [inputWallPaperNoFile](https://core.telegram.org/constructor/inputWallPaperNoFile) with `id=0` otherwise. */ - wallpaper?: enums.InputWallPaper; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) settings. */ - wallpaper_settings?: enums.WallPaperSettings; - - protected get [id](): number { - return 0x8FDE504F; - } - - static get [name](): string { - return "inputThemeSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["message_colors_animated", "true", "flags.2?true"], - ["base_theme", _BaseTheme_, "BaseTheme"], - ["accent_color", "number", "int"], - ["outbox_accent_color", "number", "flags.3?int"], - ["message_colors", ["number"], "flags.0?Vector"], - ["wallpaper", _InputWallPaper_, "flags.1?InputWallPaper"], - ["wallpaper_settings", _WallPaperSettings_, "flags.1?WallPaperSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.message_colors_animated ?? null, "true", "flags.2?true"], - [this.base_theme, _BaseTheme_, "BaseTheme"], - [this.accent_color, "number", "int"], - [this.outbox_accent_color ?? null, "number", "flags.3?int"], - [this.message_colors ?? null, ["number"], "flags.0?Vector"], - [this.wallpaper ?? null, _InputWallPaper_, "flags.1?InputWallPaper"], - [this.wallpaper_settings ?? null, _WallPaperSettings_, "flags.1?WallPaperSettings"], - ]; - } - - constructor(params: { message_colors_animated?: true; base_theme: enums.BaseTheme; accent_color: number; outbox_accent_color?: number; message_colors?: Array; wallpaper?: enums.InputWallPaper; wallpaper_settings?: enums.WallPaperSettings }) { - super(); - this.message_colors_animated = params.message_colors_animated; - this.base_theme = params.base_theme; - this.accent_color = params.accent_color; - this.outbox_accent_color = params.outbox_accent_color; - this.message_colors = params.message_colors; - this.wallpaper = params.wallpaper; - this.wallpaper_settings = params.wallpaper_settings; - } -} - -/** Theme settings */ -export class ThemeSettings_ extends _ThemeSettings_ { - /** If set, the freeform gradient fill needs to be animated on every sent message. */ - message_colors_animated?: true; - /** Base theme */ - base_theme: enums.BaseTheme; - /** Accent color, ARGB format */ - accent_color: number; - /** Accent color of outgoing messages in ARGB format */ - outbox_accent_color?: number; - /** The fill to be used as a background for outgoing messages, in RGB24 format. - If just one or two equal colors are provided, describes a solid fill of a background. - If two different colors are provided, describes the top and bottom colors of a 0-degree gradient. - If three or four colors are provided, describes a freeform gradient fill of a background. */ - message_colors?: Array; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) */ - wallpaper?: enums.WallPaper; - - protected get [id](): number { - return 0xFA58B6D4; - } - - static get [name](): string { - return "themeSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["message_colors_animated", "true", "flags.2?true"], - ["base_theme", _BaseTheme_, "BaseTheme"], - ["accent_color", "number", "int"], - ["outbox_accent_color", "number", "flags.3?int"], - ["message_colors", ["number"], "flags.0?Vector"], - ["wallpaper", _WallPaper_, "flags.1?WallPaper"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.message_colors_animated ?? null, "true", "flags.2?true"], - [this.base_theme, _BaseTheme_, "BaseTheme"], - [this.accent_color, "number", "int"], - [this.outbox_accent_color ?? null, "number", "flags.3?int"], - [this.message_colors ?? null, ["number"], "flags.0?Vector"], - [this.wallpaper ?? null, _WallPaper_, "flags.1?WallPaper"], - ]; - } - - constructor(params: { message_colors_animated?: true; base_theme: enums.BaseTheme; accent_color: number; outbox_accent_color?: number; message_colors?: Array; wallpaper?: enums.WallPaper }) { - super(); - this.message_colors_animated = params.message_colors_animated; - this.base_theme = params.base_theme; - this.accent_color = params.accent_color; - this.outbox_accent_color = params.outbox_accent_color; - this.message_colors = params.message_colors; - this.wallpaper = params.wallpaper; - } -} - -/** Page theme */ -export class WebPageAttributeTheme_ extends _WebPageAttribute_ { - /** Theme files */ - documents?: Array; - /** Theme settings */ - settings?: enums.ThemeSettings; - - protected get [id](): number { - return 0x54B56617; - } - - static get [name](): string { - return "webPageAttributeTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["documents", [_Document_], "flags.0?Vector"], - ["settings", _ThemeSettings_, "flags.1?ThemeSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.documents ?? null, [_Document_], "flags.0?Vector"], - [this.settings ?? null, _ThemeSettings_, "flags.1?ThemeSettings"], - ]; - } - - constructor(params?: { documents?: Array; settings?: enums.ThemeSettings }) { - super(); - this.documents = params?.documents; - this.settings = params?.settings; - } -} - -/** Webpage preview of a Telegram story */ -export class WebPageAttributeStory_ extends _WebPageAttribute_ { - /** Peer that posted the story */ - peer: enums.Peer; - /** [Story ID](https://core.telegram.org/api/stories#watching-stories) */ - id: number; - /** May contain the story, if not the story should be fetched when and if needed using [stories.getStoriesByID](https://core.telegram.org/method/stories.getStoriesByID) with the above `id` and `peer`. */ - story?: enums.StoryItem; - - protected get [id](): number { - return 0x2E94C3E7; - } - - static get [name](): string { - return "webPageAttributeStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", _Peer_, "Peer"], - ["id", "number", "int"], - ["story", _StoryItem_, "flags.0?StoryItem"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, _Peer_, "Peer"], - [this.id, "number", "int"], - [this.story ?? null, _StoryItem_, "flags.0?StoryItem"], - ]; - } - - constructor(params: { peer: enums.Peer; id: number; story?: enums.StoryItem }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.story = params.story; - } -} - -/** How users voted in a poll */ -export class messages_VotesList_ extends _messages_VotesList_ { - /** Total number of votes for all options (or only for the chosen `option`, if provided to [messages.getPollVotes](https://core.telegram.org/method/messages.getPollVotes)) */ - count: number; - /** Vote info for each user */ - votes: Array; - /** Mentioned chats */ - chats: Array; - /** Info about users that voted in the poll */ - users: Array; - /** Offset to use with the next [messages.getPollVotes](https://core.telegram.org/method/messages.getPollVotes) request, empty string if no more results are available. */ - next_offset?: string; - - protected get [id](): number { - return 0x4899484E; - } - - static get [name](): string { - return "messages.votesList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["count", "number", "int"], - ["votes", [_MessagePeerVote_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["next_offset", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.count, "number", "int"], - [this.votes, [_MessagePeerVote_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.next_offset ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { count: number; votes: Array; chats: Array; users: Array; next_offset?: string }) { - super(); - this.count = params.count; - this.votes = params.votes; - this.chats = params.chats; - this.users = params.users; - this.next_offset = params.next_offset; - } -} - -/** Credit card info URL provided by the bank */ -export class BankCardOpenUrl_ extends _BankCardOpenUrl_ { - /** Info URL */ - url: string; - /** Bank name */ - name: string; - - protected get [id](): number { - return 0xF568028A; - } - - static get [name](): string { - return "bankCardOpenUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.name, "string", "string"], - ]; - } - - constructor(params: { url: string; name: string }) { - super(); - this.url = params.url; - this.name = params.name; - } -} - -/** Credit card info, provided by the card's bank(s) */ -export class payments_BankCardData_ extends _payments_BankCardData_ { - /** Credit card title */ - title: string; - /** Info URL(s) provided by the card's bank(s) */ - open_urls: Array; - - protected get [id](): number { - return 0x3E24E573; - } - - static get [name](): string { - return "payments.bankCardData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ["open_urls", [_BankCardOpenUrl_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - [this.open_urls, [_BankCardOpenUrl_], "Vector"], - ]; - } - - constructor(params: { title: string; open_urls: Array }) { - super(); - this.title = params.title; - this.open_urls = params.open_urls; - } -} - -/** Dialog filter AKA [folder](https://core.telegram.org/api/folders) */ -export class DialogFilter_ extends _DialogFilter_ { - /** Whether to include all contacts in this [folder](https://core.telegram.org/api/folders) */ - contacts?: true; - /** Whether to include all non-contacts in this [folder](https://core.telegram.org/api/folders) */ - non_contacts?: true; - /** Whether to include all groups in this [folder](https://core.telegram.org/api/folders) */ - groups?: true; - /** Whether to include all channels in this [folder](https://core.telegram.org/api/folders) */ - broadcasts?: true; - /** Whether to include all bots in this [folder](https://core.telegram.org/api/folders) */ - bots?: true; - /** Whether to exclude muted chats from this [folder](https://core.telegram.org/api/folders) */ - exclude_muted?: true; - /** Whether to exclude read chats from this [folder](https://core.telegram.org/api/folders) */ - exclude_read?: true; - /** Whether to exclude archived chats from this [folder](https://core.telegram.org/api/folders) */ - exclude_archived?: true; - /** [Folder](https://core.telegram.org/api/folders) ID */ - id: number; - /** [Folder](https://core.telegram.org/api/folders) name */ - title: string; - /** Emoji to use as icon for the folder. */ - emoticon?: string; - color?: number; - /** Pinned chats, [folders](https://core.telegram.org/api/folders) can have unlimited pinned chats */ - pinned_peers: Array; - /** Include the following chats in this [folder](https://core.telegram.org/api/folders) */ - include_peers: Array; - /** Exclude the following chats from this [folder](https://core.telegram.org/api/folders) */ - exclude_peers: Array; - - protected get [id](): number { - return 0x5FB5523B; - } - - static get [name](): string { - return "dialogFilter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["contacts", "true", "flags.0?true"], - ["non_contacts", "true", "flags.1?true"], - ["groups", "true", "flags.2?true"], - ["broadcasts", "true", "flags.3?true"], - ["bots", "true", "flags.4?true"], - ["exclude_muted", "true", "flags.11?true"], - ["exclude_read", "true", "flags.12?true"], - ["exclude_archived", "true", "flags.13?true"], - ["id", "number", "int"], - ["title", "string", "string"], - ["emoticon", "string", "flags.25?string"], - ["color", "number", "flags.27?int"], - ["pinned_peers", [_InputPeer_], "Vector"], - ["include_peers", [_InputPeer_], "Vector"], - ["exclude_peers", [_InputPeer_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.contacts ?? null, "true", "flags.0?true"], - [this.non_contacts ?? null, "true", "flags.1?true"], - [this.groups ?? null, "true", "flags.2?true"], - [this.broadcasts ?? null, "true", "flags.3?true"], - [this.bots ?? null, "true", "flags.4?true"], - [this.exclude_muted ?? null, "true", "flags.11?true"], - [this.exclude_read ?? null, "true", "flags.12?true"], - [this.exclude_archived ?? null, "true", "flags.13?true"], - [this.id, "number", "int"], - [this.title, "string", "string"], - [this.emoticon ?? null, "string", "flags.25?string"], - [this.color ?? null, "number", "flags.27?int"], - [this.pinned_peers, [_InputPeer_], "Vector"], - [this.include_peers, [_InputPeer_], "Vector"], - [this.exclude_peers, [_InputPeer_], "Vector"], - ]; - } - - constructor(params: { contacts?: true; non_contacts?: true; groups?: true; broadcasts?: true; bots?: true; exclude_muted?: true; exclude_read?: true; exclude_archived?: true; id: number; title: string; emoticon?: string; color?: number; pinned_peers: Array; include_peers: Array; exclude_peers: Array }) { - super(); - this.contacts = params.contacts; - this.non_contacts = params.non_contacts; - this.groups = params.groups; - this.broadcasts = params.broadcasts; - this.bots = params.bots; - this.exclude_muted = params.exclude_muted; - this.exclude_read = params.exclude_read; - this.exclude_archived = params.exclude_archived; - this.id = params.id; - this.title = params.title; - this.emoticon = params.emoticon; - this.color = params.color; - this.pinned_peers = params.pinned_peers; - this.include_peers = params.include_peers; - this.exclude_peers = params.exclude_peers; - } -} - -/** Used only when reordering folders to indicate the default (all chats) folder. */ -export class DialogFilterDefault_ extends _DialogFilter_ { - protected get [id](): number { - return 0x363293AE; - } - - static get [name](): string { - return "dialogFilterDefault" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A folder imported using a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class DialogFilterChatlist_ extends _DialogFilter_ { - /** Whether the current user has created some [chat folder deep links »](https://core.telegram.org/api/links#chat-folder-links) to share the folder as well. */ - has_my_invites?: true; - /** ID of the folder */ - id: number; - /** Name of the folder */ - title: string; - /** Emoji to use as icon for the folder. */ - emoticon?: string; - color?: number; - /** Pinned chats, [folders](https://core.telegram.org/api/folders) can have unlimited pinned chats */ - pinned_peers: Array; - /** Chats to include in the folder */ - include_peers: Array; - - protected get [id](): number { - return 0x9FE28EA4; - } - - static get [name](): string { - return "dialogFilterChatlist" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_my_invites", "true", "flags.26?true"], - ["id", "number", "int"], - ["title", "string", "string"], - ["emoticon", "string", "flags.25?string"], - ["color", "number", "flags.27?int"], - ["pinned_peers", [_InputPeer_], "Vector"], - ["include_peers", [_InputPeer_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_my_invites ?? null, "true", "flags.26?true"], - [this.id, "number", "int"], - [this.title, "string", "string"], - [this.emoticon ?? null, "string", "flags.25?string"], - [this.color ?? null, "number", "flags.27?int"], - [this.pinned_peers, [_InputPeer_], "Vector"], - [this.include_peers, [_InputPeer_], "Vector"], - ]; - } - - constructor(params: { has_my_invites?: true; id: number; title: string; emoticon?: string; color?: number; pinned_peers: Array; include_peers: Array }) { - super(); - this.has_my_invites = params.has_my_invites; - this.id = params.id; - this.title = params.title; - this.emoticon = params.emoticon; - this.color = params.color; - this.pinned_peers = params.pinned_peers; - this.include_peers = params.include_peers; - } -} - -/** Suggested [folders](https://core.telegram.org/api/folders) */ -export class DialogFilterSuggested_ extends _DialogFilterSuggested_ { - /** [Folder info](https://core.telegram.org/api/folders) */ - filter: enums.DialogFilter; - /** [Folder](https://core.telegram.org/api/folders) description */ - description: string; - - protected get [id](): number { - return 0x77744D4A; - } - - static get [name](): string { - return "dialogFilterSuggested" - } - - static get [paramDesc](): ParamDesc { - return [ - ["filter", _DialogFilter_, "DialogFilter"], - ["description", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.filter, _DialogFilter_, "DialogFilter"], - [this.description, "string", "string"], - ]; - } - - constructor(params: { filter: enums.DialogFilter; description: string }) { - super(); - this.filter = params.filter; - this.description = params.description; - } -} - -/** [Channel statistics](https://core.telegram.org/api/stats) date range */ -export class StatsDateRangeDays_ extends _StatsDateRangeDays_ { - /** Initial date */ - min_date: number; - /** Final date */ - max_date: number; - - protected get [id](): number { - return 0xB637EDAF; - } - - static get [name](): string { - return "statsDateRangeDays" - } - - static get [paramDesc](): ParamDesc { - return [ - ["min_date", "number", "int"], - ["max_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.min_date, "number", "int"], - [this.max_date, "number", "int"], - ]; - } - - constructor(params: { min_date: number; max_date: number }) { - super(); - this.min_date = params.min_date; - this.max_date = params.max_date; - } -} - -/** Statistics value couple; initial and final value for period of time currently in consideration */ -export class StatsAbsValueAndPrev_ extends _StatsAbsValueAndPrev_ { - /** Current value */ - current: number; - /** Previous value */ - previous: number; - - protected get [id](): number { - return 0xCB43ACDE; - } - - static get [name](): string { - return "statsAbsValueAndPrev" - } - - static get [paramDesc](): ParamDesc { - return [ - ["current", "number", "double"], - ["previous", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.current, "number", "double"], - [this.previous, "number", "double"], - ]; - } - - constructor(params: { current: number; previous: number }) { - super(); - this.current = params.current; - this.previous = params.previous; - } -} - -/** [Channel statistics percentage](https://core.telegram.org/api/stats). -Compute the percentage simply by doing `part * total / 100` */ -export class StatsPercentValue_ extends _StatsPercentValue_ { - /** Partial value */ - part: number; - /** Total value */ - total: number; - - protected get [id](): number { - return 0xCBCE2FE0; - } - - static get [name](): string { - return "statsPercentValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["part", "number", "double"], - ["total", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.part, "number", "double"], - [this.total, "number", "double"], - ]; - } - - constructor(params: { part: number; total: number }) { - super(); - this.part = params.part; - this.total = params.total; - } -} - -/** This [channel statistics graph](https://core.telegram.org/api/stats) must be generated asynchronously using [stats.loadAsyncGraph](https://core.telegram.org/method/stats.loadAsyncGraph) to reduce server load */ -export class StatsGraphAsync_ extends _StatsGraph_ { - /** Token to use for fetching the async graph */ - token: string; - - protected get [id](): number { - return 0x4A27EB2D; - } - - static get [name](): string { - return "statsGraphAsync" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.token, "string", "string"], - ]; - } - - constructor(params: { token: string }) { - super(); - this.token = params.token; - } -} - -/** An error occurred while generating the [statistics graph](https://core.telegram.org/api/stats) */ -export class StatsGraphError_ extends _StatsGraph_ { - /** The error */ - error: string; - - protected get [id](): number { - return 0xBEDC9822; - } - - static get [name](): string { - return "statsGraphError" - } - - static get [paramDesc](): ParamDesc { - return [ - ["error", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.error, "string", "string"], - ]; - } - - constructor(params: { error: string }) { - super(); - this.error = params.error; - } -} - -/** [Channel statistics graph](https://core.telegram.org/api/stats) */ -export class StatsGraph_ extends _StatsGraph_ { - /** Statistics data */ - json: enums.DataJSON; - /** Zoom token */ - zoom_token?: string; - - protected get [id](): number { - return 0x8EA464B6; - } - - static get [name](): string { - return "statsGraph" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["json", _DataJSON_, "DataJSON"], - ["zoom_token", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.json, _DataJSON_, "DataJSON"], - [this.zoom_token ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { json: enums.DataJSON; zoom_token?: string }) { - super(); - this.json = params.json; - this.zoom_token = params.zoom_token; - } -} - -/** [Channel statistics](https://core.telegram.org/api/stats). */ -export class stats_BroadcastStats_ extends _stats_BroadcastStats_ { - /** Period in consideration */ - period: enums.StatsDateRangeDays; - /** Follower count change for period in consideration */ - followers: enums.StatsAbsValueAndPrev; - /** `total_viewcount/postcount`, for posts posted during the period in consideration. - Note that in this case, `current` refers to the `period` in consideration (`min_date` till `max_date`), and `prev` refers to the previous period (`(min_date - (max_date - min_date))` till `min_date`). */ - views_per_post: enums.StatsAbsValueAndPrev; - /** `total_sharecount/postcount`, for posts posted during the period in consideration. - Note that in this case, `current` refers to the `period` in consideration (`min_date` till `max_date`), and `prev` refers to the previous period (`(min_date - (max_date - min_date))` till `min_date`) */ - shares_per_post: enums.StatsAbsValueAndPrev; - /** `total_reactions/postcount`, for posts posted during the period in consideration. - Note that in this case, `current` refers to the `period` in consideration (`min_date` till `max_date`), and `prev` refers to the previous period (`(min_date - (max_date - min_date))` till `min_date`) */ - reactions_per_post: enums.StatsAbsValueAndPrev; - /** `total_views/storycount`, for posts posted during the period in consideration. - Note that in this case, `current` refers to the `period` in consideration (`min_date` till `max_date`), and `prev` refers to the previous period (`(min_date - (max_date - min_date))` till `min_date`) */ - views_per_story: enums.StatsAbsValueAndPrev; - /** `total_shares/storycount`, for posts posted during the period in consideration. - Note that in this case, `current` refers to the `period` in consideration (`min_date` till `max_date`), and `prev` refers to the previous period (`(min_date - (max_date - min_date))` till `min_date`) */ - shares_per_story: enums.StatsAbsValueAndPrev; - /** `total_reactions/storycount`, for posts posted during the period in consideration. - Note that in this case, `current` refers to the `period` in consideration (`min_date` till `max_date`), and `prev` refers to the previous period (`(min_date - (max_date - min_date))` till `min_date`) */ - reactions_per_story: enums.StatsAbsValueAndPrev; - /** Percentage of subscribers with enabled notifications */ - enabled_notifications: enums.StatsPercentValue; - /** Channel growth graph (absolute subscriber count) */ - growth_graph: enums.StatsGraph; - /** Followers growth graph (relative subscriber count) */ - followers_graph: enums.StatsGraph; - /** Muted users graph (relative) */ - mute_graph: enums.StatsGraph; - /** Views per hour graph (absolute) */ - top_hours_graph: enums.StatsGraph; - /** Interactions graph (absolute) */ - interactions_graph: enums.StatsGraph; - /** IV interactions graph (absolute) */ - iv_interactions_graph: enums.StatsGraph; - /** Views by source graph (absolute) */ - views_by_source_graph: enums.StatsGraph; - /** New followers by source graph (absolute) */ - new_followers_by_source_graph: enums.StatsGraph; - /** Subscriber language graph (pie chart) */ - languages_graph: enums.StatsGraph; - /** A graph containing the number of reactions on posts categorized by emotion */ - reactions_by_emotion_graph: enums.StatsGraph; - /** A graph containing the number of story views and shares */ - story_interactions_graph: enums.StatsGraph; - /** A graph containing the number of reactions on stories categorized by emotion */ - story_reactions_by_emotion_graph: enums.StatsGraph; - /** Detailed statistics about number of views and shares of recently sent messages and stories */ - recent_posts_interactions: Array; - - protected get [id](): number { - return 0x396CA5FC; - } - - static get [name](): string { - return "stats.broadcastStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["period", _StatsDateRangeDays_, "StatsDateRangeDays"], - ["followers", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["views_per_post", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["shares_per_post", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["reactions_per_post", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["views_per_story", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["shares_per_story", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["reactions_per_story", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["enabled_notifications", _StatsPercentValue_, "StatsPercentValue"], - ["growth_graph", _StatsGraph_, "StatsGraph"], - ["followers_graph", _StatsGraph_, "StatsGraph"], - ["mute_graph", _StatsGraph_, "StatsGraph"], - ["top_hours_graph", _StatsGraph_, "StatsGraph"], - ["interactions_graph", _StatsGraph_, "StatsGraph"], - ["iv_interactions_graph", _StatsGraph_, "StatsGraph"], - ["views_by_source_graph", _StatsGraph_, "StatsGraph"], - ["new_followers_by_source_graph", _StatsGraph_, "StatsGraph"], - ["languages_graph", _StatsGraph_, "StatsGraph"], - ["reactions_by_emotion_graph", _StatsGraph_, "StatsGraph"], - ["story_interactions_graph", _StatsGraph_, "StatsGraph"], - ["story_reactions_by_emotion_graph", _StatsGraph_, "StatsGraph"], - ["recent_posts_interactions", [_PostInteractionCounters_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.period, _StatsDateRangeDays_, "StatsDateRangeDays"], - [this.followers, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.views_per_post, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.shares_per_post, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.reactions_per_post, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.views_per_story, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.shares_per_story, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.reactions_per_story, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.enabled_notifications, _StatsPercentValue_, "StatsPercentValue"], - [this.growth_graph, _StatsGraph_, "StatsGraph"], - [this.followers_graph, _StatsGraph_, "StatsGraph"], - [this.mute_graph, _StatsGraph_, "StatsGraph"], - [this.top_hours_graph, _StatsGraph_, "StatsGraph"], - [this.interactions_graph, _StatsGraph_, "StatsGraph"], - [this.iv_interactions_graph, _StatsGraph_, "StatsGraph"], - [this.views_by_source_graph, _StatsGraph_, "StatsGraph"], - [this.new_followers_by_source_graph, _StatsGraph_, "StatsGraph"], - [this.languages_graph, _StatsGraph_, "StatsGraph"], - [this.reactions_by_emotion_graph, _StatsGraph_, "StatsGraph"], - [this.story_interactions_graph, _StatsGraph_, "StatsGraph"], - [this.story_reactions_by_emotion_graph, _StatsGraph_, "StatsGraph"], - [this.recent_posts_interactions, [_PostInteractionCounters_], "Vector"], - ]; - } - - constructor(params: { period: enums.StatsDateRangeDays; followers: enums.StatsAbsValueAndPrev; views_per_post: enums.StatsAbsValueAndPrev; shares_per_post: enums.StatsAbsValueAndPrev; reactions_per_post: enums.StatsAbsValueAndPrev; views_per_story: enums.StatsAbsValueAndPrev; shares_per_story: enums.StatsAbsValueAndPrev; reactions_per_story: enums.StatsAbsValueAndPrev; enabled_notifications: enums.StatsPercentValue; growth_graph: enums.StatsGraph; followers_graph: enums.StatsGraph; mute_graph: enums.StatsGraph; top_hours_graph: enums.StatsGraph; interactions_graph: enums.StatsGraph; iv_interactions_graph: enums.StatsGraph; views_by_source_graph: enums.StatsGraph; new_followers_by_source_graph: enums.StatsGraph; languages_graph: enums.StatsGraph; reactions_by_emotion_graph: enums.StatsGraph; story_interactions_graph: enums.StatsGraph; story_reactions_by_emotion_graph: enums.StatsGraph; recent_posts_interactions: Array }) { - super(); - this.period = params.period; - this.followers = params.followers; - this.views_per_post = params.views_per_post; - this.shares_per_post = params.shares_per_post; - this.reactions_per_post = params.reactions_per_post; - this.views_per_story = params.views_per_story; - this.shares_per_story = params.shares_per_story; - this.reactions_per_story = params.reactions_per_story; - this.enabled_notifications = params.enabled_notifications; - this.growth_graph = params.growth_graph; - this.followers_graph = params.followers_graph; - this.mute_graph = params.mute_graph; - this.top_hours_graph = params.top_hours_graph; - this.interactions_graph = params.interactions_graph; - this.iv_interactions_graph = params.iv_interactions_graph; - this.views_by_source_graph = params.views_by_source_graph; - this.new_followers_by_source_graph = params.new_followers_by_source_graph; - this.languages_graph = params.languages_graph; - this.reactions_by_emotion_graph = params.reactions_by_emotion_graph; - this.story_interactions_graph = params.story_interactions_graph; - this.story_reactions_by_emotion_graph = params.story_reactions_by_emotion_graph; - this.recent_posts_interactions = params.recent_posts_interactions; - } -} - -/** No PSA/MTProxy info is available */ -export class help_PromoDataEmpty_ extends _help_PromoData_ { - /** Re-fetch PSA/MTProxy info after the specified number of seconds */ - expires: number; - - protected get [id](): number { - return 0x98F6AC75; - } - - static get [name](): string { - return "help.promoDataEmpty" - } - - static get [paramDesc](): ParamDesc { - return [ - ["expires", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.expires, "number", "int"], - ]; - } - - constructor(params: { expires: number }) { - super(); - this.expires = params.expires; - } -} - -/** MTProxy/Public Service Announcement information */ -export class help_PromoData_ extends _help_PromoData_ { - /** MTProxy-related channel */ - proxy?: true; - /** Expiry of PSA/MTProxy info */ - expires: number; - /** MTProxy/PSA peer */ - peer: enums.Peer; - /** Chat info */ - chats: Array; - /** User info */ - users: Array; - /** PSA type */ - psa_type?: string; - /** PSA message */ - psa_message?: string; - - protected get [id](): number { - return 0x8C39793F; - } - - static get [name](): string { - return "help.promoData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["proxy", "true", "flags.0?true"], - ["expires", "number", "int"], - ["peer", _Peer_, "Peer"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["psa_type", "string", "flags.1?string"], - ["psa_message", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.proxy ?? null, "true", "flags.0?true"], - [this.expires, "number", "int"], - [this.peer, _Peer_, "Peer"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.psa_type ?? null, "string", "flags.1?string"], - [this.psa_message ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params: { proxy?: true; expires: number; peer: enums.Peer; chats: Array; users: Array; psa_type?: string; psa_message?: string }) { - super(); - this.proxy = params.proxy; - this.expires = params.expires; - this.peer = params.peer; - this.chats = params.chats; - this.users = params.users; - this.psa_type = params.psa_type; - this.psa_message = params.psa_message; - } -} - -/** An [animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) in MPEG4 format */ -export class VideoSize_ extends _VideoSize_ { - /** `u` for animated profile pictures, and `v` for trimmed and downscaled video previews */ - type: string; - /** Video width */ - w: number; - /** Video height */ - h: number; - /** File size */ - size: number; - /** Timestamp that should be shown as static preview to the user (seconds) */ - video_start_ts?: number; - - protected get [id](): number { - return 0xDE33B094; - } - - static get [name](): string { - return "videoSize" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["type", "string", "string"], - ["w", "number", "int"], - ["h", "number", "int"], - ["size", "number", "int"], - ["video_start_ts", "number", "flags.0?double"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.type, "string", "string"], - [this.w, "number", "int"], - [this.h, "number", "int"], - [this.size, "number", "int"], - [this.video_start_ts ?? null, "number", "flags.0?double"], - ]; - } - - constructor(params: { type: string; w: number; h: number; size: number; video_start_ts?: number }) { - super(); - this.type = params.type; - this.w = params.w; - this.h = params.h; - this.size = params.size; - this.video_start_ts = params.video_start_ts; - } -} - -/** An [animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) based on a [custom emoji sticker](https://core.telegram.org/api/custom-emoji). */ -export class VideoSizeEmojiMarkup_ extends _VideoSize_ { - /** [Custom emoji ID](https://core.telegram.org/api/custom-emoji): the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it. */ - emoji_id: bigint; - /** 1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how [fill wallpapers](https://core.telegram.org/api/wallpapers#fill-types) are generated. The rotation angle for gradient backgrounds is 0. */ - background_colors: Array; - - protected get [id](): number { - return 0xF85C413C; - } - - static get [name](): string { - return "videoSizeEmojiMarkup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoji_id", "bigint", "long"], - ["background_colors", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoji_id, "bigint", "long"], - [this.background_colors, ["number"], "Vector"], - ]; - } - - constructor(params: { emoji_id: bigint; background_colors: Array }) { - super(); - this.emoji_id = params.emoji_id; - this.background_colors = params.background_colors; - } -} - -/** An [animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) based on a [sticker](https://core.telegram.org/api/stickers). */ -export class VideoSizeStickerMarkup_ extends _VideoSize_ { - /** Stickerset */ - stickerset: enums.InputStickerSet; - /** Sticker ID */ - sticker_id: bigint; - /** 1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how [fill wallpapers](https://core.telegram.org/api/wallpapers#fill-types) are generated. The rotation angle for gradient backgrounds is 0. */ - background_colors: Array; - - protected get [id](): number { - return 0x0DA082FE; - } - - static get [name](): string { - return "videoSizeStickerMarkup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", _InputStickerSet_, "InputStickerSet"], - ["sticker_id", "bigint", "long"], - ["background_colors", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, _InputStickerSet_, "InputStickerSet"], - [this.sticker_id, "bigint", "long"], - [this.background_colors, ["number"], "Vector"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; sticker_id: bigint; background_colors: Array }) { - super(); - this.stickerset = params.stickerset; - this.sticker_id = params.sticker_id; - this.background_colors = params.background_colors; - } -} - -/** Information about an active user in a supergroup */ -export class StatsGroupTopPoster_ extends _StatsGroupTopPoster_ { - /** User ID */ - user_id: bigint; - /** Number of messages for [statistics](https://core.telegram.org/api/stats) period in consideration */ - messages: number; - /** Average number of characters per message */ - avg_chars: number; - - protected get [id](): number { - return 0x9D04AF9B; - } - - static get [name](): string { - return "statsGroupTopPoster" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["messages", "number", "int"], - ["avg_chars", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.messages, "number", "int"], - [this.avg_chars, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; messages: number; avg_chars: number }) { - super(); - this.user_id = params.user_id; - this.messages = params.messages; - this.avg_chars = params.avg_chars; - } -} - -/** Information about an active admin in a supergroup */ -export class StatsGroupTopAdmin_ extends _StatsGroupTopAdmin_ { - /** User ID */ - user_id: bigint; - /** Number of deleted messages for [statistics](https://core.telegram.org/api/stats) period in consideration */ - deleted: number; - /** Number of kicked users for [statistics](https://core.telegram.org/api/stats) period in consideration */ - kicked: number; - /** Number of banned users for [statistics](https://core.telegram.org/api/stats) period in consideration */ - banned: number; - - protected get [id](): number { - return 0xD7584C87; - } - - static get [name](): string { - return "statsGroupTopAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["deleted", "number", "int"], - ["kicked", "number", "int"], - ["banned", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.deleted, "number", "int"], - [this.kicked, "number", "int"], - [this.banned, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; deleted: number; kicked: number; banned: number }) { - super(); - this.user_id = params.user_id; - this.deleted = params.deleted; - this.kicked = params.kicked; - this.banned = params.banned; - } -} - -/** Information about an active supergroup inviter */ -export class StatsGroupTopInviter_ extends _StatsGroupTopInviter_ { - /** User ID */ - user_id: bigint; - /** Number of invitations for [statistics](https://core.telegram.org/api/stats) period in consideration */ - invitations: number; - - protected get [id](): number { - return 0x535F779D; - } - - static get [name](): string { - return "statsGroupTopInviter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["invitations", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.invitations, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; invitations: number }) { - super(); - this.user_id = params.user_id; - this.invitations = params.invitations; - } -} - -/** Supergroup [statistics](https://core.telegram.org/api/stats) */ -export class stats_MegagroupStats_ extends _stats_MegagroupStats_ { - /** Period in consideration */ - period: enums.StatsDateRangeDays; - /** Member count change for period in consideration */ - members: enums.StatsAbsValueAndPrev; - /** Message number change for period in consideration */ - messages: enums.StatsAbsValueAndPrev; - /** Number of users that viewed messages, for range in consideration */ - viewers: enums.StatsAbsValueAndPrev; - /** Number of users that posted messages, for range in consideration */ - posters: enums.StatsAbsValueAndPrev; - /** Supergroup growth graph (absolute subscriber count) */ - growth_graph: enums.StatsGraph; - /** Members growth (relative subscriber count) */ - members_graph: enums.StatsGraph; - /** New members by source graph */ - new_members_by_source_graph: enums.StatsGraph; - /** Subscriber language graph (pie chart) */ - languages_graph: enums.StatsGraph; - /** Message activity graph (stacked bar graph, message type) */ - messages_graph: enums.StatsGraph; - /** Group activity graph (deleted, modified messages, blocked users) */ - actions_graph: enums.StatsGraph; - /** Activity per hour graph (absolute) */ - top_hours_graph: enums.StatsGraph; - /** Activity per day of week graph (absolute) */ - weekdays_graph: enums.StatsGraph; - /** Info about most active group members */ - top_posters: Array; - /** Info about most active group admins */ - top_admins: Array; - /** Info about most active group inviters */ - top_inviters: Array; - /** Info about users mentioned in statistics */ - users: Array; - - protected get [id](): number { - return 0xEF7FF916; - } - - static get [name](): string { - return "stats.megagroupStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["period", _StatsDateRangeDays_, "StatsDateRangeDays"], - ["members", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["messages", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["viewers", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["posters", _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - ["growth_graph", _StatsGraph_, "StatsGraph"], - ["members_graph", _StatsGraph_, "StatsGraph"], - ["new_members_by_source_graph", _StatsGraph_, "StatsGraph"], - ["languages_graph", _StatsGraph_, "StatsGraph"], - ["messages_graph", _StatsGraph_, "StatsGraph"], - ["actions_graph", _StatsGraph_, "StatsGraph"], - ["top_hours_graph", _StatsGraph_, "StatsGraph"], - ["weekdays_graph", _StatsGraph_, "StatsGraph"], - ["top_posters", [_StatsGroupTopPoster_], "Vector"], - ["top_admins", [_StatsGroupTopAdmin_], "Vector"], - ["top_inviters", [_StatsGroupTopInviter_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.period, _StatsDateRangeDays_, "StatsDateRangeDays"], - [this.members, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.messages, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.viewers, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.posters, _StatsAbsValueAndPrev_, "StatsAbsValueAndPrev"], - [this.growth_graph, _StatsGraph_, "StatsGraph"], - [this.members_graph, _StatsGraph_, "StatsGraph"], - [this.new_members_by_source_graph, _StatsGraph_, "StatsGraph"], - [this.languages_graph, _StatsGraph_, "StatsGraph"], - [this.messages_graph, _StatsGraph_, "StatsGraph"], - [this.actions_graph, _StatsGraph_, "StatsGraph"], - [this.top_hours_graph, _StatsGraph_, "StatsGraph"], - [this.weekdays_graph, _StatsGraph_, "StatsGraph"], - [this.top_posters, [_StatsGroupTopPoster_], "Vector"], - [this.top_admins, [_StatsGroupTopAdmin_], "Vector"], - [this.top_inviters, [_StatsGroupTopInviter_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { period: enums.StatsDateRangeDays; members: enums.StatsAbsValueAndPrev; messages: enums.StatsAbsValueAndPrev; viewers: enums.StatsAbsValueAndPrev; posters: enums.StatsAbsValueAndPrev; growth_graph: enums.StatsGraph; members_graph: enums.StatsGraph; new_members_by_source_graph: enums.StatsGraph; languages_graph: enums.StatsGraph; messages_graph: enums.StatsGraph; actions_graph: enums.StatsGraph; top_hours_graph: enums.StatsGraph; weekdays_graph: enums.StatsGraph; top_posters: Array; top_admins: Array; top_inviters: Array; users: Array }) { - super(); - this.period = params.period; - this.members = params.members; - this.messages = params.messages; - this.viewers = params.viewers; - this.posters = params.posters; - this.growth_graph = params.growth_graph; - this.members_graph = params.members_graph; - this.new_members_by_source_graph = params.new_members_by_source_graph; - this.languages_graph = params.languages_graph; - this.messages_graph = params.messages_graph; - this.actions_graph = params.actions_graph; - this.top_hours_graph = params.top_hours_graph; - this.weekdays_graph = params.weekdays_graph; - this.top_posters = params.top_posters; - this.top_admins = params.top_admins; - this.top_inviters = params.top_inviters; - this.users = params.users; - } -} - -/** Global privacy settings */ -export class GlobalPrivacySettings_ extends _GlobalPrivacySettings_ { - /** Whether to archive and mute new chats from non-contacts */ - archive_and_mute_new_noncontact_peers?: true; - /** Whether unmuted chats will be kept in the Archive chat list when they get a new message. */ - keep_archived_unmuted?: true; - /** Whether unmuted chats that are always included or pinned in a [folder](https://core.telegram.org/api/folders), will be kept in the Archive chat list when they get a new message. Ignored if `keep_archived_unmuted` is set. */ - keep_archived_folders?: true; - hide_read_marks?: true; - new_noncontact_peers_require_premium?: true; - - protected get [id](): number { - return 0x734C4CCB; - } - - static get [name](): string { - return "globalPrivacySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["archive_and_mute_new_noncontact_peers", "true", "flags.0?true"], - ["keep_archived_unmuted", "true", "flags.1?true"], - ["keep_archived_folders", "true", "flags.2?true"], - ["hide_read_marks", "true", "flags.3?true"], - ["new_noncontact_peers_require_premium", "true", "flags.4?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.archive_and_mute_new_noncontact_peers ?? null, "true", "flags.0?true"], - [this.keep_archived_unmuted ?? null, "true", "flags.1?true"], - [this.keep_archived_folders ?? null, "true", "flags.2?true"], - [this.hide_read_marks ?? null, "true", "flags.3?true"], - [this.new_noncontact_peers_require_premium ?? null, "true", "flags.4?true"], - ]; - } - - constructor(params?: { archive_and_mute_new_noncontact_peers?: true; keep_archived_unmuted?: true; keep_archived_folders?: true; hide_read_marks?: true; new_noncontact_peers_require_premium?: true }) { - super(); - this.archive_and_mute_new_noncontact_peers = params?.archive_and_mute_new_noncontact_peers; - this.keep_archived_unmuted = params?.keep_archived_unmuted; - this.keep_archived_folders = params?.keep_archived_folders; - this.hide_read_marks = params?.hide_read_marks; - this.new_noncontact_peers_require_premium = params?.new_noncontact_peers_require_premium; - } -} - -/** Country code and phone number pattern of a specific country */ -export class help_CountryCode_ extends _help_CountryCode_ { - /** ISO country code */ - country_code: string; - /** Possible phone prefixes */ - prefixes?: Array; - /** Phone patterns: for example, `XXX XXX XXX` */ - patterns?: Array; - - protected get [id](): number { - return 0x4203C5EF; - } - - static get [name](): string { - return "help.countryCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["country_code", "string", "string"], - ["prefixes", ["string"], "flags.0?Vector"], - ["patterns", ["string"], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.country_code, "string", "string"], - [this.prefixes ?? null, ["string"], "flags.0?Vector"], - [this.patterns ?? null, ["string"], "flags.1?Vector"], - ]; - } - - constructor(params: { country_code: string; prefixes?: Array; patterns?: Array }) { - super(); - this.country_code = params.country_code; - this.prefixes = params.prefixes; - this.patterns = params.patterns; - } -} - -/** Name, ISO code, localized name and phone codes/patterns of a specific country */ -export class help_Country_ extends _help_Country_ { - /** Whether this country should not be shown in the list */ - hidden?: true; - /** ISO code of country */ - iso2: string; - /** Name of the country in the country's language */ - default_name: string; - /** Name of the country in the user's language, if different from the original name */ - name?: string; - /** Phone codes/patterns */ - country_codes: Array; - - protected get [id](): number { - return 0xC3878E23; - } - - static get [name](): string { - return "help.country" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["hidden", "true", "flags.0?true"], - ["iso2", "string", "string"], - ["default_name", "string", "string"], - ["name", "string", "flags.1?string"], - ["country_codes", [_help_CountryCode_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.hidden ?? null, "true", "flags.0?true"], - [this.iso2, "string", "string"], - [this.default_name, "string", "string"], - [this.name ?? null, "string", "flags.1?string"], - [this.country_codes, [_help_CountryCode_], "Vector"], - ]; - } - - constructor(params: { hidden?: true; iso2: string; default_name: string; name?: string; country_codes: Array }) { - super(); - this.hidden = params.hidden; - this.iso2 = params.iso2; - this.default_name = params.default_name; - this.name = params.name; - this.country_codes = params.country_codes; - } -} - -/** The country list has not changed */ -export class help_CountriesListNotModified_ extends _help_CountriesList_ { - protected get [id](): number { - return 0x93CC1F32; - } - - static get [name](): string { - return "help.countriesListNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Name, ISO code, localized name and phone codes/patterns of all available countries */ -export class help_CountriesList_ extends _help_CountriesList_ { - /** Name, ISO code, localized name and phone codes/patterns of all available countries */ - countries: Array; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x87D0759E; - } - - static get [name](): string { - return "help.countriesList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["countries", [_help_Country_], "Vector"], - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.countries, [_help_Country_], "Vector"], - [this.hash, "number", "int"], - ]; - } - - constructor(params: { countries: Array; hash: number }) { - super(); - this.countries = params.countries; - this.hash = params.hash; - } -} - -/** View, forward counter + info about replies of a specific message */ -export class MessageViews_ extends _MessageViews_ { - /** View count of message */ - views?: number; - /** Forward count of message */ - forwards?: number; - /** Reply and [thread](https://core.telegram.org/api/threads) information of message */ - replies?: enums.MessageReplies; - - protected get [id](): number { - return 0x455B853D; - } - - static get [name](): string { - return "messageViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["views", "number", "flags.0?int"], - ["forwards", "number", "flags.1?int"], - ["replies", _MessageReplies_, "flags.2?MessageReplies"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.views ?? null, "number", "flags.0?int"], - [this.forwards ?? null, "number", "flags.1?int"], - [this.replies ?? null, _MessageReplies_, "flags.2?MessageReplies"], - ]; - } - - constructor(params?: { views?: number; forwards?: number; replies?: enums.MessageReplies }) { - super(); - this.views = params?.views; - this.forwards = params?.forwards; - this.replies = params?.replies; - } -} - -/** View, forward counter + info about replies */ -export class messages_MessageViews_ extends _messages_MessageViews_ { - /** View, forward counter + info about replies */ - views: Array; - /** Chats mentioned in constructor */ - chats: Array; - /** Users mentioned in constructor */ - users: Array; - - protected get [id](): number { - return 0xB6C4F543; - } - - static get [name](): string { - return "messages.messageViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["views", [_MessageViews_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.views, [_MessageViews_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { views: Array; chats: Array; users: Array }) { - super(); - this.views = params.views; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Information about a [message thread](https://core.telegram.org/api/threads) */ -export class messages_DiscussionMessage_ extends _messages_DiscussionMessage_ { - /** The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID). */ - messages: Array; - /** Message ID of latest reply in this [thread](https://core.telegram.org/api/threads) */ - max_id?: number; - /** Message ID of latest read incoming message in this [thread](https://core.telegram.org/api/threads) */ - read_inbox_max_id?: number; - /** Message ID of latest read outgoing message in this [thread](https://core.telegram.org/api/threads) */ - read_outbox_max_id?: number; - /** Number of unread messages */ - unread_count: number; - /** Chats mentioned in constructor */ - chats: Array; - /** Users mentioned in constructor */ - users: Array; - - protected get [id](): number { - return 0xA6341782; - } - - static get [name](): string { - return "messages.discussionMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["messages", [_Message_], "Vector"], - ["max_id", "number", "flags.0?int"], - ["read_inbox_max_id", "number", "flags.1?int"], - ["read_outbox_max_id", "number", "flags.2?int"], - ["unread_count", "number", "int"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.messages, [_Message_], "Vector"], - [this.max_id ?? null, "number", "flags.0?int"], - [this.read_inbox_max_id ?? null, "number", "flags.1?int"], - [this.read_outbox_max_id ?? null, "number", "flags.2?int"], - [this.unread_count, "number", "int"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { messages: Array; max_id?: number; read_inbox_max_id?: number; read_outbox_max_id?: number; unread_count: number; chats: Array; users: Array }) { - super(); - this.messages = params.messages; - this.max_id = params.max_id; - this.read_inbox_max_id = params.read_inbox_max_id; - this.read_outbox_max_id = params.read_outbox_max_id; - this.unread_count = params.unread_count; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Message replies and [thread](https://core.telegram.org/api/threads) information */ -export class MessageReplyHeader_ extends _MessageReplyHeader_ { - /** This is a reply to a scheduled message. */ - reply_to_scheduled?: true; - /** Whether this message was sent in a [forum topic](https://core.telegram.org/api/forum#forum-topics) (except for the General topic). */ - forum_topic?: true; - /** Whether this message is quoting a part of another message. */ - quote?: true; - /** ID of message to which this message is replying */ - reply_to_msg_id?: number; - /** For replies sent in [channel discussion threads](https://core.telegram.org/api/threads) of which the current user is not a member, the discussion group ID */ - reply_to_peer_id?: enums.Peer; - /** When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat. */ - reply_from?: enums.MessageFwdHeader; - /** When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message. */ - reply_media?: enums.MessageMedia; - /** ID of the message that started this [message thread](https://core.telegram.org/api/threads) */ - reply_to_top_id?: number; - /** Used to quote-reply to only a certain section (specified here) of the original message. */ - quote_text?: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) from the `quote_text` field. */ - quote_entities?: Array; - /** Offset of the message `quote_text` within the original message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)). */ - quote_offset?: number; - - protected get [id](): number { - return 0xAFBC09DB; - } - - static get [name](): string { - return "messageReplyHeader" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reply_to_scheduled", "true", "flags.2?true"], - ["forum_topic", "true", "flags.3?true"], - ["quote", "true", "flags.9?true"], - ["reply_to_msg_id", "number", "flags.4?int"], - ["reply_to_peer_id", _Peer_, "flags.0?Peer"], - ["reply_from", _MessageFwdHeader_, "flags.5?MessageFwdHeader"], - ["reply_media", _MessageMedia_, "flags.8?MessageMedia"], - ["reply_to_top_id", "number", "flags.1?int"], - ["quote_text", "string", "flags.6?string"], - ["quote_entities", [_MessageEntity_], "flags.7?Vector"], - ["quote_offset", "number", "flags.10?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reply_to_scheduled ?? null, "true", "flags.2?true"], - [this.forum_topic ?? null, "true", "flags.3?true"], - [this.quote ?? null, "true", "flags.9?true"], - [this.reply_to_msg_id ?? null, "number", "flags.4?int"], - [this.reply_to_peer_id ?? null, _Peer_, "flags.0?Peer"], - [this.reply_from ?? null, _MessageFwdHeader_, "flags.5?MessageFwdHeader"], - [this.reply_media ?? null, _MessageMedia_, "flags.8?MessageMedia"], - [this.reply_to_top_id ?? null, "number", "flags.1?int"], - [this.quote_text ?? null, "string", "flags.6?string"], - [this.quote_entities ?? null, [_MessageEntity_], "flags.7?Vector"], - [this.quote_offset ?? null, "number", "flags.10?int"], - ]; - } - - constructor(params?: { reply_to_scheduled?: true; forum_topic?: true; quote?: true; reply_to_msg_id?: number; reply_to_peer_id?: enums.Peer; reply_from?: enums.MessageFwdHeader; reply_media?: enums.MessageMedia; reply_to_top_id?: number; quote_text?: string; quote_entities?: Array; quote_offset?: number }) { - super(); - this.reply_to_scheduled = params?.reply_to_scheduled; - this.forum_topic = params?.forum_topic; - this.quote = params?.quote; - this.reply_to_msg_id = params?.reply_to_msg_id; - this.reply_to_peer_id = params?.reply_to_peer_id; - this.reply_from = params?.reply_from; - this.reply_media = params?.reply_media; - this.reply_to_top_id = params?.reply_to_top_id; - this.quote_text = params?.quote_text; - this.quote_entities = params?.quote_entities; - this.quote_offset = params?.quote_offset; - } -} - -/** Represents a reply to a [story](https://core.telegram.org/api/stories) */ -export class MessageReplyStoryHeader_ extends _MessageReplyHeader_ { - peer: enums.Peer; - /** Story ID */ - story_id: number; - - protected get [id](): number { - return 0x0E5AF939; - } - - static get [name](): string { - return "messageReplyStoryHeader" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["story_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.story_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; story_id: number }) { - super(); - this.peer = params.peer; - this.story_id = params.story_id; - } -} - -/** Info about [the comment section of a channel post, or a simple message thread](https://core.telegram.org/api/threads) */ -export class MessageReplies_ extends _MessageReplies_ { - /** Whether this constructor contains information about the [comment section of a channel post, or a simple message thread](https://core.telegram.org/api/threads) */ - comments?: true; - /** Contains the total number of replies in this thread or comment section. */ - replies: number; - /** [PTS](https://core.telegram.org/api/updates) of the message that started this thread. */ - replies_pts: number; - /** For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews. */ - recent_repliers?: Array; - /** For channel post comments, contains the ID of the associated [discussion supergroup](https://core.telegram.org/api/discussion) */ - channel_id?: bigint; - /** ID of the latest message in this thread or comment section. */ - max_id?: number; - /** Contains the ID of the latest read message in this thread or comment section. */ - read_max_id?: number; - - protected get [id](): number { - return 0x83D60FC2; - } - - static get [name](): string { - return "messageReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["comments", "true", "flags.0?true"], - ["replies", "number", "int"], - ["replies_pts", "number", "int"], - ["recent_repliers", [_Peer_], "flags.1?Vector"], - ["channel_id", "bigint", "flags.0?long"], - ["max_id", "number", "flags.2?int"], - ["read_max_id", "number", "flags.3?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.comments ?? null, "true", "flags.0?true"], - [this.replies, "number", "int"], - [this.replies_pts, "number", "int"], - [this.recent_repliers ?? null, [_Peer_], "flags.1?Vector"], - [this.channel_id ?? null, "bigint", "flags.0?long"], - [this.max_id ?? null, "number", "flags.2?int"], - [this.read_max_id ?? null, "number", "flags.3?int"], - ]; - } - - constructor(params: { comments?: true; replies: number; replies_pts: number; recent_repliers?: Array; channel_id?: bigint; max_id?: number; read_max_id?: number }) { - super(); - this.comments = params.comments; - this.replies = params.replies; - this.replies_pts = params.replies_pts; - this.recent_repliers = params.recent_repliers; - this.channel_id = params.channel_id; - this.max_id = params.max_id; - this.read_max_id = params.read_max_id; - } -} - -/** Information about a blocked peer */ -export class PeerBlocked_ extends _PeerBlocked_ { - /** Peer ID */ - peer_id: enums.Peer; - /** When was the peer blocked */ - date: number; - - protected get [id](): number { - return 0xE8FD8014; - } - - static get [name](): string { - return "peerBlocked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer_id", _Peer_, "Peer"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer_id, _Peer_, "Peer"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { peer_id: enums.Peer; date: number }) { - super(); - this.peer_id = params.peer_id; - this.date = params.date; - } -} - -/** Message statistics */ -export class stats_MessageStats_ extends _stats_MessageStats_ { - /** Message view graph */ - views_graph: enums.StatsGraph; - /** A graph containing the number of reactions on stories categorized by emotion */ - reactions_by_emotion_graph: enums.StatsGraph; - - protected get [id](): number { - return 0x7FE91C14; - } - - static get [name](): string { - return "stats.messageStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["views_graph", _StatsGraph_, "StatsGraph"], - ["reactions_by_emotion_graph", _StatsGraph_, "StatsGraph"], - ]; - } - - protected get [params](): Params { - return [ - [this.views_graph, _StatsGraph_, "StatsGraph"], - [this.reactions_by_emotion_graph, _StatsGraph_, "StatsGraph"], - ]; - } - - constructor(params: { views_graph: enums.StatsGraph; reactions_by_emotion_graph: enums.StatsGraph }) { - super(); - this.views_graph = params.views_graph; - this.reactions_by_emotion_graph = params.reactions_by_emotion_graph; - } -} - -/** An ended group call */ -export class GroupCallDiscarded_ extends _GroupCall_ { - /** Group call ID */ - id: bigint; - /** Group call access hash */ - access_hash: bigint; - /** Group call duration */ - duration: number; - - protected get [id](): number { - return 0x7780BCB4; - } - - static get [name](): string { - return "groupCallDiscarded" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["duration", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.duration, "number", "int"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; duration: number }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.duration = params.duration; - } -} - -/** Info about a group call or livestream */ -export class GroupCall_ extends _GroupCall_ { - /** Whether the user should be muted upon joining the call */ - join_muted?: true; - /** Whether the current user can change the value of the `join_muted` flag using [phone.toggleGroupCallSettings](https://core.telegram.org/method/phone.toggleGroupCallSettings) */ - can_change_join_muted?: true; - /** Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants. */ - join_date_asc?: true; - /** Whether we subscribed to the scheduled call */ - schedule_start_subscribed?: true; - /** Whether you can start streaming video into the call */ - can_start_video?: true; - /** Whether the group call is currently being recorded */ - record_video_active?: true; - /** Whether RTMP streams are allowed */ - rtmp_stream?: true; - /** Whether the listeners list is hidden and cannot be fetched using [phone.getGroupParticipants](https://core.telegram.org/method/phone.getGroupParticipants). The `phone.groupParticipants.count` and `groupCall.participants_count` counters will still include listeners. */ - listeners_hidden?: true; - /** Group call ID */ - id: bigint; - /** Group call access hash */ - access_hash: bigint; - /** Participant count */ - participants_count: number; - /** Group call title */ - title?: string; - /** DC ID to be used for livestream chunks */ - stream_dc_id?: number; - /** When was the recording started */ - record_start_date?: number; - /** When is the call scheduled to start */ - schedule_date?: number; - /** Number of people currently streaming video into the call */ - unmuted_video_count?: number; - /** Maximum number of people allowed to stream video into the call */ - unmuted_video_limit: number; - /** Version */ - version: number; - - protected get [id](): number { - return 0xD597650C; - } - - static get [name](): string { - return "groupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["join_muted", "true", "flags.1?true"], - ["can_change_join_muted", "true", "flags.2?true"], - ["join_date_asc", "true", "flags.6?true"], - ["schedule_start_subscribed", "true", "flags.8?true"], - ["can_start_video", "true", "flags.9?true"], - ["record_video_active", "true", "flags.11?true"], - ["rtmp_stream", "true", "flags.12?true"], - ["listeners_hidden", "true", "flags.13?true"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["participants_count", "number", "int"], - ["title", "string", "flags.3?string"], - ["stream_dc_id", "number", "flags.4?int"], - ["record_start_date", "number", "flags.5?int"], - ["schedule_date", "number", "flags.7?int"], - ["unmuted_video_count", "number", "flags.10?int"], - ["unmuted_video_limit", "number", "int"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.join_muted ?? null, "true", "flags.1?true"], - [this.can_change_join_muted ?? null, "true", "flags.2?true"], - [this.join_date_asc ?? null, "true", "flags.6?true"], - [this.schedule_start_subscribed ?? null, "true", "flags.8?true"], - [this.can_start_video ?? null, "true", "flags.9?true"], - [this.record_video_active ?? null, "true", "flags.11?true"], - [this.rtmp_stream ?? null, "true", "flags.12?true"], - [this.listeners_hidden ?? null, "true", "flags.13?true"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.participants_count, "number", "int"], - [this.title ?? null, "string", "flags.3?string"], - [this.stream_dc_id ?? null, "number", "flags.4?int"], - [this.record_start_date ?? null, "number", "flags.5?int"], - [this.schedule_date ?? null, "number", "flags.7?int"], - [this.unmuted_video_count ?? null, "number", "flags.10?int"], - [this.unmuted_video_limit, "number", "int"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { join_muted?: true; can_change_join_muted?: true; join_date_asc?: true; schedule_start_subscribed?: true; can_start_video?: true; record_video_active?: true; rtmp_stream?: true; listeners_hidden?: true; id: bigint; access_hash: bigint; participants_count: number; title?: string; stream_dc_id?: number; record_start_date?: number; schedule_date?: number; unmuted_video_count?: number; unmuted_video_limit: number; version: number }) { - super(); - this.join_muted = params.join_muted; - this.can_change_join_muted = params.can_change_join_muted; - this.join_date_asc = params.join_date_asc; - this.schedule_start_subscribed = params.schedule_start_subscribed; - this.can_start_video = params.can_start_video; - this.record_video_active = params.record_video_active; - this.rtmp_stream = params.rtmp_stream; - this.listeners_hidden = params.listeners_hidden; - this.id = params.id; - this.access_hash = params.access_hash; - this.participants_count = params.participants_count; - this.title = params.title; - this.stream_dc_id = params.stream_dc_id; - this.record_start_date = params.record_start_date; - this.schedule_date = params.schedule_date; - this.unmuted_video_count = params.unmuted_video_count; - this.unmuted_video_limit = params.unmuted_video_limit; - this.version = params.version; - } -} - -/** Points to a specific group call */ -export class InputGroupCall_ extends _InputGroupCall_ { - /** Group call ID */ - id: bigint; - /** Group call access hash */ - access_hash: bigint; - - protected get [id](): number { - return 0xD8AA840F; - } - - static get [name](): string { - return "inputGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Info about a group call participant */ -export class GroupCallParticipant_ extends _GroupCallParticipant_ { - /** Whether the participant is muted */ - muted?: true; - /** Whether the participant has left */ - left?: true; - /** Whether the participant can unmute themselves */ - can_self_unmute?: true; - /** Whether the participant has just joined */ - just_joined?: true; - /** If set, and [updateGroupCallParticipants](https://core.telegram.org/constructor/updateGroupCallParticipants).version < locally stored call.version, info about this participant should be ignored. If (...), and [updateGroupCallParticipants](https://core.telegram.org/constructor/updateGroupCallParticipants).version > call.version+1, the participant list should be refetched using [phone.getGroupParticipants](https://core.telegram.org/method/phone.getGroupParticipants). */ - versioned?: true; - /** If not set, the `volume` and `muted_by_you` fields can be safely used to overwrite locally cached information; otherwise, `volume` will contain valid information only if `volume_by_admin` is set both in the cache and in the received constructor. */ - min?: true; - /** Whether this participant was muted by the current user */ - muted_by_you?: true; - /** Whether our volume can only changed by an admin */ - volume_by_admin?: true; - /** Whether this participant is the current user */ - self?: true; - /** Whether this participant is currently broadcasting video */ - video_joined?: true; - /** Peer information */ - peer: enums.Peer; - /** When did this participant join the group call */ - date: number; - /** When was this participant last active in the group call */ - active_date?: number; - /** Source ID */ - source: number; - /** Volume, if not set the volume is set to 100%. */ - volume?: number; - /** Info about this participant */ - about?: string; - /** Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list. */ - raise_hand_rating?: bigint; - /** Info about the video stream the participant is currently broadcasting */ - video?: enums.GroupCallParticipantVideo; - /** Info about the screen sharing stream the participant is currently broadcasting */ - presentation?: enums.GroupCallParticipantVideo; - - protected get [id](): number { - return 0xEBA636FE; - } - - static get [name](): string { - return "groupCallParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["muted", "true", "flags.0?true"], - ["left", "true", "flags.1?true"], - ["can_self_unmute", "true", "flags.2?true"], - ["just_joined", "true", "flags.4?true"], - ["versioned", "true", "flags.5?true"], - ["min", "true", "flags.8?true"], - ["muted_by_you", "true", "flags.9?true"], - ["volume_by_admin", "true", "flags.10?true"], - ["self", "true", "flags.12?true"], - ["video_joined", "true", "flags.15?true"], - ["peer", _Peer_, "Peer"], - ["date", "number", "int"], - ["active_date", "number", "flags.3?int"], - ["source", "number", "int"], - ["volume", "number", "flags.7?int"], - ["about", "string", "flags.11?string"], - ["raise_hand_rating", "bigint", "flags.13?long"], - ["video", _GroupCallParticipantVideo_, "flags.6?GroupCallParticipantVideo"], - ["presentation", _GroupCallParticipantVideo_, "flags.14?GroupCallParticipantVideo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.muted ?? null, "true", "flags.0?true"], - [this.left ?? null, "true", "flags.1?true"], - [this.can_self_unmute ?? null, "true", "flags.2?true"], - [this.just_joined ?? null, "true", "flags.4?true"], - [this.versioned ?? null, "true", "flags.5?true"], - [this.min ?? null, "true", "flags.8?true"], - [this.muted_by_you ?? null, "true", "flags.9?true"], - [this.volume_by_admin ?? null, "true", "flags.10?true"], - [this.self ?? null, "true", "flags.12?true"], - [this.video_joined ?? null, "true", "flags.15?true"], - [this.peer, _Peer_, "Peer"], - [this.date, "number", "int"], - [this.active_date ?? null, "number", "flags.3?int"], - [this.source, "number", "int"], - [this.volume ?? null, "number", "flags.7?int"], - [this.about ?? null, "string", "flags.11?string"], - [this.raise_hand_rating ?? null, "bigint", "flags.13?long"], - [this.video ?? null, _GroupCallParticipantVideo_, "flags.6?GroupCallParticipantVideo"], - [this.presentation ?? null, _GroupCallParticipantVideo_, "flags.14?GroupCallParticipantVideo"], - ]; - } - - constructor(params: { muted?: true; left?: true; can_self_unmute?: true; just_joined?: true; versioned?: true; min?: true; muted_by_you?: true; volume_by_admin?: true; self?: true; video_joined?: true; peer: enums.Peer; date: number; active_date?: number; source: number; volume?: number; about?: string; raise_hand_rating?: bigint; video?: enums.GroupCallParticipantVideo; presentation?: enums.GroupCallParticipantVideo }) { - super(); - this.muted = params.muted; - this.left = params.left; - this.can_self_unmute = params.can_self_unmute; - this.just_joined = params.just_joined; - this.versioned = params.versioned; - this.min = params.min; - this.muted_by_you = params.muted_by_you; - this.volume_by_admin = params.volume_by_admin; - this.self = params.self; - this.video_joined = params.video_joined; - this.peer = params.peer; - this.date = params.date; - this.active_date = params.active_date; - this.source = params.source; - this.volume = params.volume; - this.about = params.about; - this.raise_hand_rating = params.raise_hand_rating; - this.video = params.video; - this.presentation = params.presentation; - } -} - -/** Contains info about a group call, and partial info about its participants. */ -export class phone_GroupCall_ extends _phone_GroupCall_ { - /** Info about the group call */ - call: enums.GroupCall; - /** A partial list of participants. */ - participants: Array; - /** Next offset to use when fetching the remaining participants using [phone.getGroupParticipants](https://core.telegram.org/method/phone.getGroupParticipants) */ - participants_next_offset: string; - /** Chats mentioned in the participants vector */ - chats: Array; - /** Users mentioned in the participants vector */ - users: Array; - - protected get [id](): number { - return 0x9E727AAD; - } - - static get [name](): string { - return "phone.groupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", _GroupCall_, "GroupCall"], - ["participants", [_GroupCallParticipant_], "Vector"], - ["participants_next_offset", "string", "string"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, _GroupCall_, "GroupCall"], - [this.participants, [_GroupCallParticipant_], "Vector"], - [this.participants_next_offset, "string", "string"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { call: enums.GroupCall; participants: Array; participants_next_offset: string; chats: Array; users: Array }) { - super(); - this.call = params.call; - this.participants = params.participants; - this.participants_next_offset = params.participants_next_offset; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Info about the participants of a group call or livestream */ -export class phone_GroupParticipants_ extends _phone_GroupParticipants_ { - /** Number of participants */ - count: number; - /** List of participants */ - participants: Array; - /** If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as `offset` in [phone.getGroupParticipants](https://core.telegram.org/method/phone.getGroupParticipants). */ - next_offset: string; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - /** Version info */ - version: number; - - protected get [id](): number { - return 0xF47751B6; - } - - static get [name](): string { - return "phone.groupParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["participants", [_GroupCallParticipant_], "Vector"], - ["next_offset", "string", "string"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.participants, [_GroupCallParticipant_], "Vector"], - [this.next_offset, "string", "string"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.version, "number", "int"], - ]; - } - - constructor(params: { count: number; participants: Array; next_offset: string; chats: Array; users: Array; version: number }) { - super(); - this.count = params.count; - this.participants = params.participants; - this.next_offset = params.next_offset; - this.chats = params.chats; - this.users = params.users; - this.version = params.version; - } -} - -/** Peer type: private chat with the bot itself */ -export class InlineQueryPeerTypeSameBotPM_ extends _InlineQueryPeerType_ { - protected get [id](): number { - return 0x3081ED9D; - } - - static get [name](): string { - return "inlineQueryPeerTypeSameBotPM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Peer type: private chat */ -export class InlineQueryPeerTypePM_ extends _InlineQueryPeerType_ { - protected get [id](): number { - return 0x833C0FAC; - } - - static get [name](): string { - return "inlineQueryPeerTypePM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Peer type: [chat](https://core.telegram.org/api/channel) */ -export class InlineQueryPeerTypeChat_ extends _InlineQueryPeerType_ { - protected get [id](): number { - return 0xD766C50A; - } - - static get [name](): string { - return "inlineQueryPeerTypeChat" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Peer type: [supergroup](https://core.telegram.org/api/channel) */ -export class InlineQueryPeerTypeMegagroup_ extends _InlineQueryPeerType_ { - protected get [id](): number { - return 0x5EC4BE43; - } - - static get [name](): string { - return "inlineQueryPeerTypeMegagroup" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Peer type: [channel](https://core.telegram.org/api/channel) */ -export class InlineQueryPeerTypeBroadcast_ extends _InlineQueryPeerType_ { - protected get [id](): number { - return 0x6334EE9A; - } - - static get [name](): string { - return "inlineQueryPeerTypeBroadcast" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Peer type: private chat with a bot. */ -export class InlineQueryPeerTypeBotPM_ extends _InlineQueryPeerType_ { - protected get [id](): number { - return 0x0E3B2D0C; - } - - static get [name](): string { - return "inlineQueryPeerTypeBotPM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** ID of a specific [chat import session, click here for more info »](https://core.telegram.org/api/import). */ -export class messages_HistoryImport_ extends _messages_HistoryImport_ { - /** [History import ID](https://core.telegram.org/api/import) */ - id: bigint; - - protected get [id](): number { - return 0x1662AF0B; - } - - static get [name](): string { - return "messages.historyImport" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** Contains information about a chat export file [generated by a foreign chat app, click here for more info](https://core.telegram.org/api/import). -If neither the `pm` or `group` flags are set, the specified chat export was generated from a chat of unknown type. */ -export class messages_HistoryImportParsed_ extends _messages_HistoryImportParsed_ { - /** The chat export file was generated from a private chat. */ - pm?: true; - /** The chat export file was generated from a group chat. */ - group?: true; - /** Title of the chat. */ - title?: string; - - protected get [id](): number { - return 0x5E0FB7B9; - } - - static get [name](): string { - return "messages.historyImportParsed" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pm", "true", "flags.0?true"], - ["group", "true", "flags.1?true"], - ["title", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pm ?? null, "true", "flags.0?true"], - [this.group ?? null, "true", "flags.1?true"], - [this.title ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params?: { pm?: true; group?: true; title?: string }) { - super(); - this.pm = params?.pm; - this.group = params?.group; - this.title = params?.title; - } -} - -/** Messages found and affected by changes */ -export class messages_AffectedFoundMessages_ extends _messages_AffectedFoundMessages_ { - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - /** [Number of events that were generated](https://core.telegram.org/api/updates) */ - pts_count: number; - /** If bigger than zero, the request must be repeated to remove more messages */ - offset: number; - /** Affected message IDs */ - messages: Array; - - protected get [id](): number { - return 0xEF8D3E6C; - } - - static get [name](): string { - return "messages.affectedFoundMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pts", "number", "int"], - ["pts_count", "number", "int"], - ["offset", "number", "int"], - ["messages", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.pts, "number", "int"], - [this.pts_count, "number", "int"], - [this.offset, "number", "int"], - [this.messages, ["number"], "Vector"], - ]; - } - - constructor(params: { pts: number; pts_count: number; offset: number; messages: Array }) { - super(); - this.pts = params.pts; - this.pts_count = params.pts_count; - this.offset = params.offset; - this.messages = params.messages; - } -} - -/** When and which user joined the chat using a chat invite */ -export class ChatInviteImporter_ extends _ChatInviteImporter_ { - /** Whether this user currently has a pending [join request »](https://core.telegram.org/api/invites#join-requests) */ - requested?: true; - /** The participant joined by importing a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - via_chatlist?: true; - /** The user */ - user_id: bigint; - /** When did the user join */ - date: number; - /** For users with pending requests, contains bio of the user that requested to join */ - about?: string; - /** The administrator that approved the [join request »](https://core.telegram.org/api/invites#join-requests) of the user */ - approved_by?: bigint; - - protected get [id](): number { - return 0x8C5ADFD9; - } - - static get [name](): string { - return "chatInviteImporter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["requested", "true", "flags.0?true"], - ["via_chatlist", "true", "flags.3?true"], - ["user_id", "bigint", "long"], - ["date", "number", "int"], - ["about", "string", "flags.2?string"], - ["approved_by", "bigint", "flags.1?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.requested ?? null, "true", "flags.0?true"], - [this.via_chatlist ?? null, "true", "flags.3?true"], - [this.user_id, "bigint", "long"], - [this.date, "number", "int"], - [this.about ?? null, "string", "flags.2?string"], - [this.approved_by ?? null, "bigint", "flags.1?long"], - ]; - } - - constructor(params: { requested?: true; via_chatlist?: true; user_id: bigint; date: number; about?: string; approved_by?: bigint }) { - super(); - this.requested = params.requested; - this.via_chatlist = params.via_chatlist; - this.user_id = params.user_id; - this.date = params.date; - this.about = params.about; - this.approved_by = params.approved_by; - } -} - -/** Info about chat invites exported by a certain admin. */ -export class messages_ExportedChatInvites_ extends _messages_ExportedChatInvites_ { - /** Number of invites exported by the admin */ - count: number; - /** Exported invites */ - invites: Array; - /** Info about the admin */ - users: Array; - - protected get [id](): number { - return 0xBDC62DCC; - } - - static get [name](): string { - return "messages.exportedChatInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["invites", [_ExportedChatInvite_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.invites, [_ExportedChatInvite_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; invites: Array; users: Array }) { - super(); - this.count = params.count; - this.invites = params.invites; - this.users = params.users; - } -} - -/** Info about a chat invite */ -export class messages_ExportedChatInvite_ extends _messages_ExportedChatInvite_ { - /** Info about the chat invite */ - invite: enums.ExportedChatInvite; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x1871BE50; - } - - static get [name](): string { - return "messages.exportedChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { invite: enums.ExportedChatInvite; users: Array }) { - super(); - this.invite = params.invite; - this.users = params.users; - } -} - -/** The specified chat invite was replaced with another one */ -export class messages_ExportedChatInviteReplaced_ extends _messages_ExportedChatInvite_ { - /** The replaced chat invite */ - invite: enums.ExportedChatInvite; - /** The invite that replaces the previous invite */ - new_invite: enums.ExportedChatInvite; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x222600EF; - } - - static get [name](): string { - return "messages.exportedChatInviteReplaced" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invite", _ExportedChatInvite_, "ExportedChatInvite"], - ["new_invite", _ExportedChatInvite_, "ExportedChatInvite"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.invite, _ExportedChatInvite_, "ExportedChatInvite"], - [this.new_invite, _ExportedChatInvite_, "ExportedChatInvite"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { invite: enums.ExportedChatInvite; new_invite: enums.ExportedChatInvite; users: Array }) { - super(); - this.invite = params.invite; - this.new_invite = params.new_invite; - this.users = params.users; - } -} - -/** Info about the users that joined the chat using a specific chat invite */ -export class messages_ChatInviteImporters_ extends _messages_ChatInviteImporters_ { - /** Number of users that joined */ - count: number; - /** The users that joined */ - importers: Array; - /** The users that joined */ - users: Array; - - protected get [id](): number { - return 0x81B6B00A; - } - - static get [name](): string { - return "messages.chatInviteImporters" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["importers", [_ChatInviteImporter_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.importers, [_ChatInviteImporter_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; importers: Array; users: Array }) { - super(); - this.count = params.count; - this.importers = params.importers; - this.users = params.users; - } -} - -/** Info about chat invites generated by admins. */ -export class ChatAdminWithInvites_ extends _ChatAdminWithInvites_ { - /** The admin */ - admin_id: bigint; - /** Number of invites generated by the admin */ - invites_count: number; - /** Number of revoked invites */ - revoked_invites_count: number; - - protected get [id](): number { - return 0xF2ECEF23; - } - - static get [name](): string { - return "chatAdminWithInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["admin_id", "bigint", "long"], - ["invites_count", "number", "int"], - ["revoked_invites_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.admin_id, "bigint", "long"], - [this.invites_count, "number", "int"], - [this.revoked_invites_count, "number", "int"], - ]; - } - - constructor(params: { admin_id: bigint; invites_count: number; revoked_invites_count: number }) { - super(); - this.admin_id = params.admin_id; - this.invites_count = params.invites_count; - this.revoked_invites_count = params.revoked_invites_count; - } -} - -/** Info about chat invites generated by admins. */ -export class messages_ChatAdminsWithInvites_ extends _messages_ChatAdminsWithInvites_ { - /** Info about chat invites generated by admins. */ - admins: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0xB69B72D7; - } - - static get [name](): string { - return "messages.chatAdminsWithInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["admins", [_ChatAdminWithInvites_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.admins, [_ChatAdminWithInvites_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { admins: Array; users: Array }) { - super(); - this.admins = params.admins; - this.users = params.users; - } -} - -/** Contains a confirmation text to be shown to the user, upon [importing chat history, click here for more info »](https://core.telegram.org/api/import). */ -export class messages_CheckedHistoryImportPeer_ extends _messages_CheckedHistoryImportPeer_ { - /** A confirmation text to be shown to the user, upon [importing chat history »](https://core.telegram.org/api/import). */ - confirm_text: string; - - protected get [id](): number { - return 0xA24DE717; - } - - static get [name](): string { - return "messages.checkedHistoryImportPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["confirm_text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.confirm_text, "string", "string"], - ]; - } - - constructor(params: { confirm_text: string }) { - super(); - this.confirm_text = params.confirm_text; - } -} - -/** A list of peers that can be used to join a group call, presenting yourself as a specific user/channel. */ -export class phone_JoinAsPeers_ extends _phone_JoinAsPeers_ { - /** Peers */ - peers: Array; - /** Chats mentioned in the peers vector */ - chats: Array; - /** Users mentioned in the peers vector */ - users: Array; - - protected get [id](): number { - return 0xAFE5623F; - } - - static get [name](): string { - return "phone.joinAsPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peers", [_Peer_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peers, [_Peer_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { peers: Array; chats: Array; users: Array }) { - super(); - this.peers = params.peers; - this.chats = params.chats; - this.users = params.users; - } -} - -/** An invite to a group call or livestream */ -export class phone_ExportedGroupCallInvite_ extends _phone_ExportedGroupCallInvite_ { - /** Invite link */ - link: string; - - protected get [id](): number { - return 0x204BD158; - } - - static get [name](): string { - return "phone.exportedGroupCallInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["link", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.link, "string", "string"], - ]; - } - - constructor(params: { link: string }) { - super(); - this.link = params.link; - } -} - -/** Describes a group of video synchronization source identifiers */ -export class GroupCallParticipantVideoSourceGroup_ extends _GroupCallParticipantVideoSourceGroup_ { - /** SDP semantics */ - semantics: string; - /** Source IDs */ - sources: Array; - - protected get [id](): number { - return 0xDCB118B7; - } - - static get [name](): string { - return "groupCallParticipantVideoSourceGroup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["semantics", "string", "string"], - ["sources", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.semantics, "string", "string"], - [this.sources, ["number"], "Vector"], - ]; - } - - constructor(params: { semantics: string; sources: Array }) { - super(); - this.semantics = params.semantics; - this.sources = params.sources; - } -} - -/** Info about a video stream */ -export class GroupCallParticipantVideo_ extends _GroupCallParticipantVideo_ { - /** Whether the stream is currently paused */ - paused?: true; - /** Endpoint */ - endpoint: string; - /** Source groups */ - source_groups: Array; - /** Audio source ID */ - audio_source?: number; - - protected get [id](): number { - return 0x67753AC8; - } - - static get [name](): string { - return "groupCallParticipantVideo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["paused", "true", "flags.0?true"], - ["endpoint", "string", "string"], - ["source_groups", [_GroupCallParticipantVideoSourceGroup_], "Vector"], - ["audio_source", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.paused ?? null, "true", "flags.0?true"], - [this.endpoint, "string", "string"], - [this.source_groups, [_GroupCallParticipantVideoSourceGroup_], "Vector"], - [this.audio_source ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { paused?: true; endpoint: string; source_groups: Array; audio_source?: number }) { - super(); - this.paused = params.paused; - this.endpoint = params.endpoint; - this.source_groups = params.source_groups; - this.audio_source = params.audio_source; - } -} - -/** A suggested short name for a stickerpack */ -export class stickers_SuggestedShortName_ extends _stickers_SuggestedShortName_ { - /** Suggested short name */ - short_name: string; - - protected get [id](): number { - return 0x85FEA03F; - } - - static get [name](): string { - return "stickers.suggestedShortName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["short_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.short_name, "string", "string"], - ]; - } - - constructor(params: { short_name: string }) { - super(); - this.short_name = params.short_name; - } -} - -/** The commands will be valid in all dialogs */ -export class BotCommandScopeDefault_ extends _BotCommandScope_ { - protected get [id](): number { - return 0x2F6CB2AB; - } - - static get [name](): string { - return "botCommandScopeDefault" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The specified bot commands will only be valid in all private chats with users. */ -export class BotCommandScopeUsers_ extends _BotCommandScope_ { - protected get [id](): number { - return 0x3C4F04D8; - } - - static get [name](): string { - return "botCommandScopeUsers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The specified bot commands will be valid in all [groups and supergroups](https://core.telegram.org/api/channel). */ -export class BotCommandScopeChats_ extends _BotCommandScope_ { - protected get [id](): number { - return 0x6FE1A881; - } - - static get [name](): string { - return "botCommandScopeChats" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The specified bot commands will be valid only for chat administrators, in all [groups and supergroups](https://core.telegram.org/api/channel). */ -export class BotCommandScopeChatAdmins_ extends _BotCommandScope_ { - protected get [id](): number { - return 0xB9AA606A; - } - - static get [name](): string { - return "botCommandScopeChatAdmins" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The specified bot commands will be valid only in a specific dialog. */ -export class BotCommandScopePeer_ extends _BotCommandScope_ { - /** The dialog */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xDB9D897D; - } - - static get [name](): string { - return "botCommandScopePeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** The specified bot commands will be valid for all admins of the specified [group or supergroup](https://core.telegram.org/api/channel). */ -export class BotCommandScopePeerAdmins_ extends _BotCommandScope_ { - /** The chat */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x3FD863D1; - } - - static get [name](): string { - return "botCommandScopePeerAdmins" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** The specified bot commands will be valid only for a specific user in the specified [group or supergroup](https://core.telegram.org/api/channel). */ -export class BotCommandScopePeerUser_ extends _BotCommandScope_ { - /** The chat */ - peer: enums.InputPeer; - /** The user */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x0A1321F3; - } - - static get [name](): string { - return "botCommandScopePeerUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["user_id", _InputUser_, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.user_id, _InputUser_, "InputUser"], - ]; - } - - constructor(params: { peer: enums.InputPeer; user_id: enums.InputUser }) { - super(); - this.peer = params.peer; - this.user_id = params.user_id; - } -} - -/** You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset. */ -export class account_ResetPasswordFailedWait_ extends _account_ResetPasswordResult_ { - /** Wait until this date before requesting another reset. */ - retry_date: number; - - protected get [id](): number { - return 0xE3779861; - } - - static get [name](): string { - return "account.resetPasswordFailedWait" - } - - static get [paramDesc](): ParamDesc { - return [ - ["retry_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.retry_date, "number", "int"], - ]; - } - - constructor(params: { retry_date: number }) { - super(); - this.retry_date = params.retry_date; - } -} - -/** You successfully requested a password reset, please wait until the specified date before finalizing the reset. */ -export class account_ResetPasswordRequestedWait_ extends _account_ResetPasswordResult_ { - /** Wait until this date before finalizing the reset. */ - until_date: number; - - protected get [id](): number { - return 0xE9EFFC7D; - } - - static get [name](): string { - return "account.resetPasswordRequestedWait" - } - - static get [paramDesc](): ParamDesc { - return [ - ["until_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.until_date, "number", "int"], - ]; - } - - constructor(params: { until_date: number }) { - super(); - this.until_date = params.until_date; - } -} - -/** The 2FA password was reset successfully. */ -export class account_ResetPasswordOk_ extends _account_ResetPasswordResult_ { - protected get [id](): number { - return 0xE926D63E; - } - - static get [name](): string { - return "account.resetPasswordOk" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A [sponsored message](https://core.telegram.org/api/sponsored-messages). */ -export class SponsoredMessage_ extends _SponsoredMessage_ { - /** Whether the message needs to be labeled as "recommended" instead of "sponsored" */ - recommended?: true; - /** Whether a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in `from_id`, or from `chat_invite`. */ - show_peer_photo?: true; - can_report?: true; - /** Message ID */ - random_id: Uint8Array; - /** ID of the sender of the message */ - from_id?: enums.Peer; - /** Information about the chat invite hash specified in `chat_invite_hash` */ - chat_invite?: enums.ChatInvite; - /** Chat invite */ - chat_invite_hash?: string; - /** Optional link to a channel post if `from_id` points to a channel */ - channel_post?: number; - /** Parameter for the bot start message if the sponsored chat is a chat with a bot. */ - start_param?: string; - /** Sponsored website */ - webpage?: enums.SponsoredWebPage; - /** [Mini App »](https://core.telegram.org/api/bots/webapps) to open when the sponsored message is clicked. */ - app?: enums.BotApp; - /** Sponsored message */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Text of the sponsored message button. */ - button_text?: string; - /** If set, contains additional information about the sponsor to be shown along with the message. */ - sponsor_info?: string; - /** If set, contains additional information about the sponsored message to be shown along with the message. */ - additional_info?: string; - - protected get [id](): number { - return 0xED5383F7; - } - - static get [name](): string { - return "sponsoredMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["recommended", "true", "flags.5?true"], - ["show_peer_photo", "true", "flags.6?true"], - ["can_report", "true", "flags.12?true"], - ["random_id", Uint8Array, "bytes"], - ["from_id", _Peer_, "flags.3?Peer"], - ["chat_invite", _ChatInvite_, "flags.4?ChatInvite"], - ["chat_invite_hash", "string", "flags.4?string"], - ["channel_post", "number", "flags.2?int"], - ["start_param", "string", "flags.0?string"], - ["webpage", _SponsoredWebPage_, "flags.9?SponsoredWebPage"], - ["app", _BotApp_, "flags.10?BotApp"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["button_text", "string", "flags.11?string"], - ["sponsor_info", "string", "flags.7?string"], - ["additional_info", "string", "flags.8?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.recommended ?? null, "true", "flags.5?true"], - [this.show_peer_photo ?? null, "true", "flags.6?true"], - [this.can_report ?? null, "true", "flags.12?true"], - [this.random_id, Uint8Array, "bytes"], - [this.from_id ?? null, _Peer_, "flags.3?Peer"], - [this.chat_invite ?? null, _ChatInvite_, "flags.4?ChatInvite"], - [this.chat_invite_hash ?? null, "string", "flags.4?string"], - [this.channel_post ?? null, "number", "flags.2?int"], - [this.start_param ?? null, "string", "flags.0?string"], - [this.webpage ?? null, _SponsoredWebPage_, "flags.9?SponsoredWebPage"], - [this.app ?? null, _BotApp_, "flags.10?BotApp"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.button_text ?? null, "string", "flags.11?string"], - [this.sponsor_info ?? null, "string", "flags.7?string"], - [this.additional_info ?? null, "string", "flags.8?string"], - ]; - } - - constructor(params: { recommended?: true; show_peer_photo?: true; can_report?: true; random_id: Uint8Array; from_id?: enums.Peer; chat_invite?: enums.ChatInvite; chat_invite_hash?: string; channel_post?: number; start_param?: string; webpage?: enums.SponsoredWebPage; app?: enums.BotApp; message: string; entities?: Array; button_text?: string; sponsor_info?: string; additional_info?: string }) { - super(); - this.recommended = params.recommended; - this.show_peer_photo = params.show_peer_photo; - this.can_report = params.can_report; - this.random_id = params.random_id; - this.from_id = params.from_id; - this.chat_invite = params.chat_invite; - this.chat_invite_hash = params.chat_invite_hash; - this.channel_post = params.channel_post; - this.start_param = params.start_param; - this.webpage = params.webpage; - this.app = params.app; - this.message = params.message; - this.entities = params.entities; - this.button_text = params.button_text; - this.sponsor_info = params.sponsor_info; - this.additional_info = params.additional_info; - } -} - -/** A set of sponsored messages associated to a channel */ -export class messages_SponsoredMessages_ extends _messages_SponsoredMessages_ { - /** If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages. */ - posts_between?: number; - /** Sponsored messages */ - messages: Array; - /** Chats mentioned in the sponsored messages */ - chats: Array; - /** Users mentioned in the sponsored messages */ - users: Array; - - protected get [id](): number { - return 0xC9EE1D87; - } - - static get [name](): string { - return "messages.sponsoredMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["posts_between", "number", "flags.0?int"], - ["messages", [_SponsoredMessage_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.posts_between ?? null, "number", "flags.0?int"], - [this.messages, [_SponsoredMessage_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { posts_between?: number; messages: Array; chats: Array; users: Array }) { - super(); - this.posts_between = params.posts_between; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** No sponsored messages are available. */ -export class messages_SponsoredMessagesEmpty_ extends _messages_SponsoredMessages_ { - protected get [id](): number { - return 0x1839490F; - } - - static get [name](): string { - return "messages.sponsoredMessagesEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Information about found messages sent on a specific day, used to split the `messages` in [messages.searchResultsCalendar](https://core.telegram.org/constructor/messages.searchResultsCalendar) constructors by days. */ -export class SearchResultsCalendarPeriod_ extends _SearchResultsCalendarPeriod_ { - /** The day this object is referring to. */ - date: number; - /** First message ID that was sent on this day. */ - min_msg_id: number; - /** Last message ID that was sent on this day. */ - max_msg_id: number; - /** All messages that were sent on this day. */ - count: number; - - protected get [id](): number { - return 0xC9B0539F; - } - - static get [name](): string { - return "searchResultsCalendarPeriod" - } - - static get [paramDesc](): ParamDesc { - return [ - ["date", "number", "int"], - ["min_msg_id", "number", "int"], - ["max_msg_id", "number", "int"], - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.date, "number", "int"], - [this.min_msg_id, "number", "int"], - [this.max_msg_id, "number", "int"], - [this.count, "number", "int"], - ]; - } - - constructor(params: { date: number; min_msg_id: number; max_msg_id: number; count: number }) { - super(); - this.date = params.date; - this.min_msg_id = params.min_msg_id; - this.max_msg_id = params.max_msg_id; - this.count = params.count; - } -} - -/** Information about found messages sent on a specific day */ -export class messages_SearchResultsCalendar_ extends _messages_SearchResultsCalendar_ { - /** If set, indicates that the results may be inexact */ - inexact?: true; - /** Total number of results matching query */ - count: number; - /** Starting timestamp of attached messages */ - min_date: number; - /** Ending timestamp of attached messages */ - min_msg_id: number; - /** Indicates the absolute position of `messages[0]` within the total result set with count `count`. - This is useful, for example, if we need to display a `progress/total` counter (like `photo 134 of 200`, for all media in a chat, we could simply use `photo ${offset_id_offset} of ${count}`. */ - offset_id_offset?: number; - /** Used to split the `messages` by days: multiple [SearchResultsCalendarPeriod](https://core.telegram.org/type/SearchResultsCalendarPeriod) constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day. - This information can be easily used to split the returned `messages` by day. */ - periods: Array; - /** Messages */ - messages: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x147EE23C; - } - - static get [name](): string { - return "messages.searchResultsCalendar" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inexact", "true", "flags.0?true"], - ["count", "number", "int"], - ["min_date", "number", "int"], - ["min_msg_id", "number", "int"], - ["offset_id_offset", "number", "flags.1?int"], - ["periods", [_SearchResultsCalendarPeriod_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inexact ?? null, "true", "flags.0?true"], - [this.count, "number", "int"], - [this.min_date, "number", "int"], - [this.min_msg_id, "number", "int"], - [this.offset_id_offset ?? null, "number", "flags.1?int"], - [this.periods, [_SearchResultsCalendarPeriod_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { inexact?: true; count: number; min_date: number; min_msg_id: number; offset_id_offset?: number; periods: Array; messages: Array; chats: Array; users: Array }) { - super(); - this.inexact = params.inexact; - this.count = params.count; - this.min_date = params.min_date; - this.min_msg_id = params.min_msg_id; - this.offset_id_offset = params.offset_id_offset; - this.periods = params.periods; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Information about a message in a specific position */ -export class SearchResultPosition_ extends _SearchResultsPosition_ { - /** Message ID */ - msg_id: number; - /** When was the message sent */ - date: number; - /** 0-based message position in the full list of suitable messages */ - offset: number; - - protected get [id](): number { - return 0x7F648B67; - } - - static get [name](): string { - return "searchResultPosition" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_id", "number", "int"], - ["date", "number", "int"], - ["offset", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_id, "number", "int"], - [this.date, "number", "int"], - [this.offset, "number", "int"], - ]; - } - - constructor(params: { msg_id: number; date: number; offset: number }) { - super(); - this.msg_id = params.msg_id; - this.date = params.date; - this.offset = params.offset; - } -} - -/** Information about sparse positions of messages */ -export class messages_SearchResultsPositions_ extends _messages_SearchResultsPositions_ { - /** Total number of found messages */ - count: number; - /** List of message positions */ - positions: Array; - - protected get [id](): number { - return 0x53B22BAF; - } - - static get [name](): string { - return "messages.searchResultsPositions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["positions", [_SearchResultsPosition_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.positions, [_SearchResultsPosition_], "Vector"], - ]; - } - - constructor(params: { count: number; positions: Array }) { - super(); - this.count = params.count; - this.positions = params.positions; - } -} - -/** A list of peers that can be used to send messages in a specific group */ -export class channels_SendAsPeers_ extends _channels_SendAsPeers_ { - /** Peers that can be used to send messages to the group */ - peers: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0xF496B0C6; - } - - static get [name](): string { - return "channels.sendAsPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peers", [_SendAsPeer_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peers, [_SendAsPeer_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { peers: Array; chats: Array; users: Array }) { - super(); - this.peers = params.peers; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Full user information */ -export class users_UserFull_ extends _users_UserFull_ { - /** Full user information */ - full_user: enums.UserFull; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x3B6D152E; - } - - static get [name](): string { - return "users.userFull" - } - - static get [paramDesc](): ParamDesc { - return [ - ["full_user", _UserFull_, "UserFull"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.full_user, _UserFull_, "UserFull"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { full_user: enums.UserFull; chats: Array; users: Array }) { - super(); - this.full_user = params.full_user; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Peer settings */ -export class messages_PeerSettings_ extends _messages_PeerSettings_ { - /** Peer settings */ - settings: enums.PeerSettings; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x6880B94D; - } - - static get [name](): string { - return "messages.peerSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["settings", _PeerSettings_, "PeerSettings"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.settings, _PeerSettings_, "PeerSettings"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { settings: enums.PeerSettings; chats: Array; users: Array }) { - super(); - this.settings = params.settings; - this.chats = params.chats; - this.users = params.users; - } -} - -/** [Future auth token »](https://core.telegram.org/api/auth#future-auth-tokens) to be used on subsequent authorizations */ -export class auth_LoggedOut_ extends _auth_LoggedOut_ { - /** [Future auth token »](https://core.telegram.org/api/auth#future-auth-tokens) to be used on subsequent authorizations */ - future_auth_token?: Uint8Array; - - protected get [id](): number { - return 0xC3A2835F; - } - - static get [name](): string { - return "auth.loggedOut" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["future_auth_token", Uint8Array, "flags.0?bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.future_auth_token ?? null, Uint8Array, "flags.0?bytes"], - ]; - } - - constructor(params?: { future_auth_token?: Uint8Array }) { - super(); - this.future_auth_token = params?.future_auth_token; - } -} - -/** Reactions */ -export class ReactionCount_ extends _ReactionCount_ { - /** If set, indicates that the current user also sent this reaction. - The integer value indicates when was the reaction added: the bigger the value, the newer the reaction. */ - chosen_order?: number; - /** The reaction. */ - reaction: enums.Reaction; - /** Number of users that reacted with this emoji. */ - count: number; - - protected get [id](): number { - return 0xA3D1CB80; - } - - static get [name](): string { - return "reactionCount" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["chosen_order", "number", "flags.0?int"], - ["reaction", _Reaction_, "Reaction"], - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.chosen_order ?? null, "number", "flags.0?int"], - [this.reaction, _Reaction_, "Reaction"], - [this.count, "number", "int"], - ]; - } - - constructor(params: { chosen_order?: number; reaction: enums.Reaction; count: number }) { - super(); - this.chosen_order = params.chosen_order; - this.reaction = params.reaction; - this.count = params.count; - } -} - -/** [Message reactions »](https://core.telegram.org/api/reactions) */ -export class MessageReactions_ extends _MessageReactions_ { - /** Similar to [min](https://core.telegram.org/api/min) objects, used for [message reaction »](https://core.telegram.org/api/reactions) constructors that are the same for all users so they don't have the reactions sent by the current user (you can use [messages.getMessagesReactions](https://core.telegram.org/method/messages.getMessagesReactions) to get the full reaction info). */ - min?: true; - /** Whether [messages.getMessageReactionsList](https://core.telegram.org/method/messages.getMessageReactionsList) can be used to see how each specific peer reacted to the message */ - can_see_list?: true; - reactions_as_tags?: true; - /** Reactions */ - results: Array; - /** List of recent peers and their reactions */ - recent_reactions?: Array; - - protected get [id](): number { - return 0x4F2B9479; - } - - static get [name](): string { - return "messageReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["min", "true", "flags.0?true"], - ["can_see_list", "true", "flags.2?true"], - ["reactions_as_tags", "true", "flags.3?true"], - ["results", [_ReactionCount_], "Vector"], - ["recent_reactions", [_MessagePeerReaction_], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.min ?? null, "true", "flags.0?true"], - [this.can_see_list ?? null, "true", "flags.2?true"], - [this.reactions_as_tags ?? null, "true", "flags.3?true"], - [this.results, [_ReactionCount_], "Vector"], - [this.recent_reactions ?? null, [_MessagePeerReaction_], "flags.1?Vector"], - ]; - } - - constructor(params: { min?: true; can_see_list?: true; reactions_as_tags?: true; results: Array; recent_reactions?: Array }) { - super(); - this.min = params.min; - this.can_see_list = params.can_see_list; - this.reactions_as_tags = params.reactions_as_tags; - this.results = params.results; - this.recent_reactions = params.recent_reactions; - } -} - -/** List of peers that reacted to a specific message */ -export class messages_MessageReactionsList_ extends _messages_MessageReactionsList_ { - /** Total number of reactions matching query */ - count: number; - /** List of peers that reacted to a specific message */ - reactions: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - /** If set, indicates the next offset to use to load more results by invoking [messages.getMessageReactionsList](https://core.telegram.org/method/messages.getMessageReactionsList). */ - next_offset?: string; - - protected get [id](): number { - return 0x31BD492D; - } - - static get [name](): string { - return "messages.messageReactionsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["count", "number", "int"], - ["reactions", [_MessagePeerReaction_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["next_offset", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.count, "number", "int"], - [this.reactions, [_MessagePeerReaction_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.next_offset ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { count: number; reactions: Array; chats: Array; users: Array; next_offset?: string }) { - super(); - this.count = params.count; - this.reactions = params.reactions; - this.chats = params.chats; - this.users = params.users; - this.next_offset = params.next_offset; - } -} - -/** Animations associated with a message reaction */ -export class AvailableReaction_ extends _AvailableReaction_ { - /** If not set, the reaction can be added to new messages and enabled in chats. */ - inactive?: true; - /** Whether this reaction can only be used by Telegram Premium users */ - premium?: true; - /** Reaction emoji */ - reaction: string; - /** Reaction description */ - title: string; - /** Static icon for the reaction */ - static_icon: enums.Document; - /** The animated sticker to show when the user opens the reaction dropdown */ - appear_animation: enums.Document; - /** The animated sticker to show when the user hovers over the reaction */ - select_animation: enums.Document; - /** The animated sticker to show when the reaction is chosen and activated */ - activate_animation: enums.Document; - /** The background effect (still an animated sticker) to play under the `activate_animation`, when the reaction is chosen and activated */ - effect_animation: enums.Document; - /** The animation that plays around the button when you press an existing reaction (played together with `center_icon`). */ - around_animation?: enums.Document; - /** The animation of the emoji inside the button when you press an existing reaction (played together with `around_animation`). */ - center_icon?: enums.Document; - - protected get [id](): number { - return 0xC077EC01; - } - - static get [name](): string { - return "availableReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inactive", "true", "flags.0?true"], - ["premium", "true", "flags.2?true"], - ["reaction", "string", "string"], - ["title", "string", "string"], - ["static_icon", _Document_, "Document"], - ["appear_animation", _Document_, "Document"], - ["select_animation", _Document_, "Document"], - ["activate_animation", _Document_, "Document"], - ["effect_animation", _Document_, "Document"], - ["around_animation", _Document_, "flags.1?Document"], - ["center_icon", _Document_, "flags.1?Document"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inactive ?? null, "true", "flags.0?true"], - [this.premium ?? null, "true", "flags.2?true"], - [this.reaction, "string", "string"], - [this.title, "string", "string"], - [this.static_icon, _Document_, "Document"], - [this.appear_animation, _Document_, "Document"], - [this.select_animation, _Document_, "Document"], - [this.activate_animation, _Document_, "Document"], - [this.effect_animation, _Document_, "Document"], - [this.around_animation ?? null, _Document_, "flags.1?Document"], - [this.center_icon ?? null, _Document_, "flags.1?Document"], - ]; - } - - constructor(params: { inactive?: true; premium?: true; reaction: string; title: string; static_icon: enums.Document; appear_animation: enums.Document; select_animation: enums.Document; activate_animation: enums.Document; effect_animation: enums.Document; around_animation?: enums.Document; center_icon?: enums.Document }) { - super(); - this.inactive = params.inactive; - this.premium = params.premium; - this.reaction = params.reaction; - this.title = params.title; - this.static_icon = params.static_icon; - this.appear_animation = params.appear_animation; - this.select_animation = params.select_animation; - this.activate_animation = params.activate_animation; - this.effect_animation = params.effect_animation; - this.around_animation = params.around_animation; - this.center_icon = params.center_icon; - } -} - -/** No new reactions are available */ -export class messages_AvailableReactionsNotModified_ extends _messages_AvailableReactions_ { - protected get [id](): number { - return 0x9F071957; - } - - static get [name](): string { - return "messages.availableReactionsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Animations and metadata associated with [message reactions »](https://core.telegram.org/api/reactions) */ -export class messages_AvailableReactions_ extends _messages_AvailableReactions_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - /** Animations and metadata associated with [message reactions »](https://core.telegram.org/api/reactions) */ - reactions: Array; - - protected get [id](): number { - return 0x768E3AAD; - } - - static get [name](): string { - return "messages.availableReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ["reactions", [_AvailableReaction_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - [this.reactions, [_AvailableReaction_], "Vector"], - ]; - } - - constructor(params: { hash: number; reactions: Array }) { - super(); - this.hash = params.hash; - this.reactions = params.reactions; - } -} - -/** How a certain peer reacted to the message */ -export class MessagePeerReaction_ extends _MessagePeerReaction_ { - /** Whether the specified [message reaction »](https://core.telegram.org/api/reactions) should elicit a bigger and longer reaction */ - big?: true; - /** Whether the reaction wasn't yet marked as read by the current user */ - unread?: true; - /** Starting from layer 159, [messages.sendReaction](https://core.telegram.org/method/messages.sendReaction) will send reactions from the peer (user or channel) specified using [messages.saveDefaultSendAs](https://core.telegram.org/method/messages.saveDefaultSendAs). - If set, this flag indicates that this reaction was sent by us, even if the `peer` doesn't point to the current account. */ - my?: true; - /** Peer that reacted to the message */ - peer_id: enums.Peer; - /** When was this reaction added */ - date: number; - /** Reaction emoji */ - reaction: enums.Reaction; - - protected get [id](): number { - return 0x8C79B63C; - } - - static get [name](): string { - return "messagePeerReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["big", "true", "flags.0?true"], - ["unread", "true", "flags.1?true"], - ["my", "true", "flags.2?true"], - ["peer_id", _Peer_, "Peer"], - ["date", "number", "int"], - ["reaction", _Reaction_, "Reaction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.big ?? null, "true", "flags.0?true"], - [this.unread ?? null, "true", "flags.1?true"], - [this.my ?? null, "true", "flags.2?true"], - [this.peer_id, _Peer_, "Peer"], - [this.date, "number", "int"], - [this.reaction, _Reaction_, "Reaction"], - ]; - } - - constructor(params: { big?: true; unread?: true; my?: true; peer_id: enums.Peer; date: number; reaction: enums.Reaction }) { - super(); - this.big = params.big; - this.unread = params.unread; - this.my = params.my; - this.peer_id = params.peer_id; - this.date = params.date; - this.reaction = params.reaction; - } -} - -/** Info about an RTMP stream in a group call or livestream */ -export class GroupCallStreamChannel_ extends _GroupCallStreamChannel_ { - /** Channel ID */ - channel: number; - /** Specifies the duration of the video segment to fetch in milliseconds, by bitshifting `1000` to the right `scale` times: `duration_ms := 1000 >> scale`. */ - scale: number; - /** Last seen timestamp to easily start fetching livestream chunks using [inputGroupCallStream](https://core.telegram.org/constructor/inputGroupCallStream) */ - last_timestamp_ms: bigint; - - protected get [id](): number { - return 0x80EB48AF; - } - - static get [name](): string { - return "groupCallStreamChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", "number", "int"], - ["scale", "number", "int"], - ["last_timestamp_ms", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, "number", "int"], - [this.scale, "number", "int"], - [this.last_timestamp_ms, "bigint", "long"], - ]; - } - - constructor(params: { channel: number; scale: number; last_timestamp_ms: bigint }) { - super(); - this.channel = params.channel; - this.scale = params.scale; - this.last_timestamp_ms = params.last_timestamp_ms; - } -} - -/** Info about RTMP streams in a group call or livestream */ -export class phone_GroupCallStreamChannels_ extends _phone_GroupCallStreamChannels_ { - /** RTMP streams */ - channels: Array; - - protected get [id](): number { - return 0xD0E482B2; - } - - static get [name](): string { - return "phone.groupCallStreamChannels" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channels", [_GroupCallStreamChannel_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channels, [_GroupCallStreamChannel_], "Vector"], - ]; - } - - constructor(params: { channels: Array }) { - super(); - this.channels = params.channels; - } -} - -/** RTMP URL and stream key to be used in streaming software */ -export class phone_GroupCallStreamRtmpUrl_ extends _phone_GroupCallStreamRtmpUrl_ { - /** RTMP URL */ - url: string; - /** Stream key */ - key: string; - - protected get [id](): number { - return 0x2DBF3432; - } - - static get [name](): string { - return "phone.groupCallStreamRtmpUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["key", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.key, "string", "string"], - ]; - } - - constructor(params: { url: string; key: string }) { - super(); - this.url = params.url; - this.key = params.key; - } -} - -/** Represents an attachment menu icon color for [bot mini apps »](https://core.telegram.org/api/bots/attach) */ -export class AttachMenuBotIconColor_ extends _AttachMenuBotIconColor_ { - /** One of the following values: - `light_icon` - Color of the attachment menu icon (light mode) - `light_text` - Color of the attachment menu label, once selected (light mode) - `dark_icon` - Color of the attachment menu icon (dark mode) - `dark_text` - Color of the attachment menu label, once selected (dark mode) */ - name: string; - /** Color in RGB24 format */ - color: number; - - protected get [id](): number { - return 0x4576F3F0; - } - - static get [name](): string { - return "attachMenuBotIconColor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["name", "string", "string"], - ["color", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.name, "string", "string"], - [this.color, "number", "int"], - ]; - } - - constructor(params: { name: string; color: number }) { - super(); - this.name = params.name; - this.color = params.color; - } -} - -/** Represents an attachment menu icon for [bot mini apps »](https://core.telegram.org/api/bots/attach) */ -export class AttachMenuBotIcon_ extends _AttachMenuBotIcon_ { - /** One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app. - - `default_static` - Default attachment menu icon in SVG format - `placeholder_static` - Default placeholder for opened Web Apps in SVG format - `ios_static` - Attachment menu icon in SVG format for the official iOS app - `ios_animated` - Animated attachment menu icon in TGS format for the official iOS app - `android_animated` - Animated attachment menu icon in TGS format for the official Android app - `macos_animated` - Animated attachment menu icon in TGS format for the official native Mac OS app - `ios_side_menu_static` - Side menu icon in PNG format for the official iOS app - `android_side_menu_static` - Side menu icon in SVG format for the official android app - `macos_side_menu_static` - Side menu icon in PNG format for the official native Mac OS app */ - name: string; - /** The actual icon file. */ - icon: enums.Document; - /** Attachment menu icon colors. */ - colors?: Array; - - protected get [id](): number { - return 0xB2A7386B; - } - - static get [name](): string { - return "attachMenuBotIcon" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["name", "string", "string"], - ["icon", _Document_, "Document"], - ["colors", [_AttachMenuBotIconColor_], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.name, "string", "string"], - [this.icon, _Document_, "Document"], - [this.colors ?? null, [_AttachMenuBotIconColor_], "flags.0?Vector"], - ]; - } - - constructor(params: { name: string; icon: enums.Document; colors?: Array }) { - super(); - this.name = params.name; - this.icon = params.icon; - this.colors = params.colors; - } -} - -/** Represents a [bot mini app that can be launched from the attachment/side menu »](https://core.telegram.org/api/bots/attach) */ -export class AttachMenuBot_ extends _AttachMenuBot_ { - /** If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking [messages.toggleBotInAttachMenu](https://core.telegram.org/method/messages.toggleBotInAttachMenu) the app should be opened. */ - inactive?: true; - /** Deprecated flag, can be ignored. */ - has_settings?: true; - /** Whether the bot would like to send messages to the user. */ - request_write_access?: true; - /** Whether, when installed, an attachment menu entry should be shown for the Mini App. */ - show_in_attach_menu?: true; - /** Whether, when installed, an entry in the main view side menu should be shown for the Mini App. */ - show_in_side_menu?: true; - /** If `inactive` if set and the user hasn't previously accepted the third-party mini apps [Terms of Service](https://telegram.org/tos/mini-apps) for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the [mini apps TOS](https://telegram.org/tos/mini-apps) and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown. */ - side_menu_disclaimer_needed?: true; - /** Bot ID */ - bot_id: bigint; - /** Attachment menu item name */ - short_name: string; - /** List of dialog types where this attachment menu entry should be shown */ - peer_types?: Array; - /** List of platform-specific static icons and animations to use for the attachment menu button */ - icons: Array; - - protected get [id](): number { - return 0xD90D8DFE; - } - - static get [name](): string { - return "attachMenuBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inactive", "true", "flags.0?true"], - ["has_settings", "true", "flags.1?true"], - ["request_write_access", "true", "flags.2?true"], - ["show_in_attach_menu", "true", "flags.3?true"], - ["show_in_side_menu", "true", "flags.4?true"], - ["side_menu_disclaimer_needed", "true", "flags.5?true"], - ["bot_id", "bigint", "long"], - ["short_name", "string", "string"], - ["peer_types", [_AttachMenuPeerType_], "flags.3?Vector"], - ["icons", [_AttachMenuBotIcon_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inactive ?? null, "true", "flags.0?true"], - [this.has_settings ?? null, "true", "flags.1?true"], - [this.request_write_access ?? null, "true", "flags.2?true"], - [this.show_in_attach_menu ?? null, "true", "flags.3?true"], - [this.show_in_side_menu ?? null, "true", "flags.4?true"], - [this.side_menu_disclaimer_needed ?? null, "true", "flags.5?true"], - [this.bot_id, "bigint", "long"], - [this.short_name, "string", "string"], - [this.peer_types ?? null, [_AttachMenuPeerType_], "flags.3?Vector"], - [this.icons, [_AttachMenuBotIcon_], "Vector"], - ]; - } - - constructor(params: { inactive?: true; has_settings?: true; request_write_access?: true; show_in_attach_menu?: true; show_in_side_menu?: true; side_menu_disclaimer_needed?: true; bot_id: bigint; short_name: string; peer_types?: Array; icons: Array }) { - super(); - this.inactive = params.inactive; - this.has_settings = params.has_settings; - this.request_write_access = params.request_write_access; - this.show_in_attach_menu = params.show_in_attach_menu; - this.show_in_side_menu = params.show_in_side_menu; - this.side_menu_disclaimer_needed = params.side_menu_disclaimer_needed; - this.bot_id = params.bot_id; - this.short_name = params.short_name; - this.peer_types = params.peer_types; - this.icons = params.icons; - } -} - -/** The list of bot mini apps hasn't changed */ -export class AttachMenuBotsNotModified_ extends _AttachMenuBots_ { - protected get [id](): number { - return 0xF1D88A5C; - } - - static get [name](): string { - return "attachMenuBotsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a list of [bot mini apps that can be launched from the attachment menu »](https://core.telegram.org/api/bots/attach) */ -export class AttachMenuBots_ extends _AttachMenuBots_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** List of [bot mini apps that can be launched from the attachment menu »](https://core.telegram.org/api/bots/attach) */ - bots: Array; - /** Info about related users/bots */ - users: Array; - - protected get [id](): number { - return 0x3C4301C0; - } - - static get [name](): string { - return "attachMenuBots" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["bots", [_AttachMenuBot_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.bots, [_AttachMenuBot_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; bots: Array; users: Array }) { - super(); - this.hash = params.hash; - this.bots = params.bots; - this.users = params.users; - } -} - -/** Represents a [bot mini app that can be launched from the attachment menu »](https://core.telegram.org/api/bots/attach) */ -export class AttachMenuBotsBot_ extends _AttachMenuBotsBot_ { - /** Represents a [bot mini app that can be launched from the attachment menu »](https://core.telegram.org/api/bots/attach) */ - bot: enums.AttachMenuBot; - /** Info about related users and bots */ - users: Array; - - protected get [id](): number { - return 0x93BF667F; - } - - static get [name](): string { - return "attachMenuBotsBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", _AttachMenuBot_, "AttachMenuBot"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, _AttachMenuBot_, "AttachMenuBot"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { bot: enums.AttachMenuBot; users: Array }) { - super(); - this.bot = params.bot; - this.users = params.users; - } -} - -/** Contains the webview URL with appropriate theme and user info parameters added */ -export class WebViewResultUrl_ extends _WebViewResult_ { - /** Webview session ID */ - query_id: bigint; - /** Webview URL to open */ - url: string; - - protected get [id](): number { - return 0x0C14557C; - } - - static get [name](): string { - return "webViewResultUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["query_id", "bigint", "long"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.query_id, "bigint", "long"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { query_id: bigint; url: string }) { - super(); - this.query_id = params.query_id; - this.url = params.url; - } -} - -/** Contains the webview URL with appropriate theme parameters added */ -export class SimpleWebViewResultUrl_ extends _SimpleWebViewResult_ { - /** URL */ - url: string; - - protected get [id](): number { - return 0x882F76BB; - } - - static get [name](): string { - return "simpleWebViewResultUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Info about a sent inline webview message */ -export class WebViewMessageSent_ extends _WebViewMessageSent_ { - /** Message ID */ - msg_id?: enums.InputBotInlineMessageID; - - protected get [id](): number { - return 0x0C94511C; - } - - static get [name](): string { - return "webViewMessageSent" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["msg_id", _InputBotInlineMessageID_, "flags.0?InputBotInlineMessageID"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.msg_id ?? null, _InputBotInlineMessageID_, "flags.0?InputBotInlineMessageID"], - ]; - } - - constructor(params?: { msg_id?: enums.InputBotInlineMessageID }) { - super(); - this.msg_id = params?.msg_id; - } -} - -/** Placeholder [bot menu button](https://core.telegram.org/api/bots/menu) never returned to users: see [the docs for more info](https://core.telegram.org/api/bots/menu). */ -export class BotMenuButtonDefault_ extends _BotMenuButton_ { - protected get [id](): number { - return 0x7533A588; - } - - static get [name](): string { - return "botMenuButtonDefault" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** [Bot menu button](https://core.telegram.org/api/bots/menu) that opens the bot command list when clicked. */ -export class BotMenuButtonCommands_ extends _BotMenuButton_ { - protected get [id](): number { - return 0x4258C205; - } - - static get [name](): string { - return "botMenuButtonCommands" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** [Bot menu button](https://core.telegram.org/api/bots/menu) that opens a [web app](https://core.telegram.org/api/bots/webapps) when clicked. */ -export class BotMenuButton_ extends _BotMenuButton_ { - /** Title to be displayed on the menu button instead of 'Menu' */ - text: string; - /** URL of a [web app](https://core.telegram.org/api/bots/webapps) to open when the user clicks on the button */ - url: string; - - protected get [id](): number { - return 0xC7B57CE6; - } - - static get [name](): string { - return "botMenuButton" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { text: string; url: string }) { - super(); - this.text = params.text; - this.url = params.url; - } -} - -/** The notification sound list hasn't changed. */ -export class account_SavedRingtonesNotModified_ extends _account_SavedRingtones_ { - protected get [id](): number { - return 0xFBF6E8B1; - } - - static get [name](): string { - return "account.savedRingtonesNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A list of saved notification sounds */ -export class account_SavedRingtones_ extends _account_SavedRingtones_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Saved notification sounds */ - ringtones: Array; - - protected get [id](): number { - return 0xC1E92CC5; - } - - static get [name](): string { - return "account.savedRingtones" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["ringtones", [_Document_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.ringtones, [_Document_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; ringtones: Array }) { - super(); - this.hash = params.hash; - this.ringtones = params.ringtones; - } -} - -/** Indicates the default notification sound should be used */ -export class NotificationSoundDefault_ extends _NotificationSound_ { - protected get [id](): number { - return 0x97E8BEBE; - } - - static get [name](): string { - return "notificationSoundDefault" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** No notification sound should be used */ -export class NotificationSoundNone_ extends _NotificationSound_ { - protected get [id](): number { - return 0x6F0C34DF; - } - - static get [name](): string { - return "notificationSoundNone" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Indicates a specific local notification sound should be used */ -export class NotificationSoundLocal_ extends _NotificationSound_ { - /** Notification sound title */ - title: string; - /** Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound) */ - data: string; - - protected get [id](): number { - return 0x830B9AE4; - } - - static get [name](): string { - return "notificationSoundLocal" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ["data", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - [this.data, "string", "string"], - ]; - } - - constructor(params: { title: string; data: string }) { - super(); - this.title = params.title; - this.data = params.data; - } -} - -/** A specific previously uploaded notification sound should be used */ -export class NotificationSoundRingtone_ extends _NotificationSound_ { - /** Document ID of notification sound uploaded using [account.uploadRingtone](https://core.telegram.org/method/account.uploadRingtone) */ - id: bigint; - - protected get [id](): number { - return 0xFF6C8049; - } - - static get [name](): string { - return "notificationSoundRingtone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint }) { - super(); - this.id = params.id; - } -} - -/** The notification sound was already in MP3 format and was saved without any modification */ -export class account_SavedRingtone_ extends _account_SavedRingtone_ { - protected get [id](): number { - return 0xB7263F6D; - } - - static get [name](): string { - return "account.savedRingtone" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The notification sound was not in MP3 format and was successfully converted and saved, use the returned [Document](https://core.telegram.org/type/Document) to refer to the notification sound from now on */ -export class account_SavedRingtoneConverted_ extends _account_SavedRingtone_ { - /** The converted notification sound */ - document: enums.Document; - - protected get [id](): number { - return 0x1F307EB7; - } - - static get [name](): string { - return "account.savedRingtoneConverted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document", _Document_, "Document"], - ]; - } - - protected get [params](): Params { - return [ - [this.document, _Document_, "Document"], - ]; - } - - constructor(params: { document: enums.Document }) { - super(); - this.document = params.document; - } -} - -/** The bot attachment menu entry is available in the chat with the bot that offers it */ -export class AttachMenuPeerTypeSameBotPM_ extends _AttachMenuPeerType_ { - protected get [id](): number { - return 0x7D6BE90E; - } - - static get [name](): string { - return "attachMenuPeerTypeSameBotPM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu) */ -export class AttachMenuPeerTypeBotPM_ extends _AttachMenuPeerType_ { - protected get [id](): number { - return 0xC32BFA1A; - } - - static get [name](): string { - return "attachMenuPeerTypeBotPM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The bot attachment menu entry is available in private chats with other users (not bots) */ -export class AttachMenuPeerTypePM_ extends _AttachMenuPeerType_ { - protected get [id](): number { - return 0xF146D31F; - } - - static get [name](): string { - return "attachMenuPeerTypePM" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The bot attachment menu entry is available in [groups and supergroups](https://core.telegram.org/api/channel) */ -export class AttachMenuPeerTypeChat_ extends _AttachMenuPeerType_ { - protected get [id](): number { - return 0x0509113F; - } - - static get [name](): string { - return "attachMenuPeerTypeChat" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** The bot attachment menu entry is available in channels */ -export class AttachMenuPeerTypeBroadcast_ extends _AttachMenuPeerType_ { - protected get [id](): number { - return 0x7BFBDEFC; - } - - static get [name](): string { - return "attachMenuPeerTypeBroadcast" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** An invoice contained in a [messageMediaInvoice](https://core.telegram.org/constructor/messageMediaInvoice) message. */ -export class InputInvoiceMessage_ extends _InputInvoice_ { - /** Chat where the invoice was sent */ - peer: enums.InputPeer; - /** Message ID */ - msg_id: number; - - protected get [id](): number { - return 0xC5B56859; - } - - static get [name](): string { - return "inputInvoiceMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** An invoice slug taken from an [invoice deep link](https://core.telegram.org/api/links#invoice-links) or from the [`premium_invoice_slug` app config parameter »](https://core.telegram.org/api/config#premium-invoice-slug) */ -export class InputInvoiceSlug_ extends _InputInvoice_ { - /** The invoice slug */ - slug: string; - - protected get [id](): number { - return 0xC326CAEF; - } - - static get [name](): string { - return "inputInvoiceSlug" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -/** Used if the user wishes to start a channel [giveaway](https://core.telegram.org/api/giveaways) or send some [giftcodes](https://core.telegram.org/api/giveaways) to members of a channel, in exchange for [boosts](https://core.telegram.org/api/boost). */ -export class InputInvoicePremiumGiftCode_ extends _InputInvoice_ { - /** Should be populated with [inputStorePaymentPremiumGiveaway](https://core.telegram.org/constructor/inputStorePaymentPremiumGiveaway) for [giveaways](https://core.telegram.org/api/giveaways) and [inputStorePaymentPremiumGiftCode](https://core.telegram.org/constructor/inputStorePaymentPremiumGiftCode) for [gifts](https://core.telegram.org/api/giveaways). */ - purpose: enums.InputStorePaymentPurpose; - /** Should be populated with one of the giveaway options returned by [payments.getPremiumGiftCodeOptions](https://core.telegram.org/method/payments.getPremiumGiftCodeOptions), see the [giveaways »](https://core.telegram.org/api/giveaways) documentation for more info. */ - option: enums.PremiumGiftCodeOption; - - protected get [id](): number { - return 0x98986C0D; - } - - static get [name](): string { - return "inputInvoicePremiumGiftCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["purpose", _InputStorePaymentPurpose_, "InputStorePaymentPurpose"], - ["option", _PremiumGiftCodeOption_, "PremiumGiftCodeOption"], - ]; - } - - protected get [params](): Params { - return [ - [this.purpose, _InputStorePaymentPurpose_, "InputStorePaymentPurpose"], - [this.option, _PremiumGiftCodeOption_, "PremiumGiftCodeOption"], - ]; - } - - constructor(params: { purpose: enums.InputStorePaymentPurpose; option: enums.PremiumGiftCodeOption }) { - super(); - this.purpose = params.purpose; - this.option = params.option; - } -} - -/** Exported [invoice deep link](https://core.telegram.org/api/links#invoice-links) */ -export class payments_ExportedInvoice_ extends _payments_ExportedInvoice_ { - /** Exported [invoice deep link](https://core.telegram.org/api/links#invoice-links) */ - url: string; - - protected get [id](): number { - return 0xAED0CBD9; - } - - static get [name](): string { - return "payments.exportedInvoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** [Transcribed text from a voice message »](https://core.telegram.org/api/transcribe) */ -export class messages_TranscribedAudio_ extends _messages_TranscribedAudio_ { - /** Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further [updateTranscribedAudio](https://core.telegram.org/constructor/updateTranscribedAudio) updates with the updated transcription. */ - pending?: true; - /** Transcription ID */ - transcription_id: bigint; - /** Transcripted text */ - text: string; - /** For non-[Premium](https://core.telegram.org/api/premium) users, this flag will be set, indicating the remaining transcriptions in the free trial period. */ - trial_remains_num?: number; - /** For non-[Premium](https://core.telegram.org/api/premium) users, this flag will be set, indicating the date when the `trial_remains_num` counter will be reset to the maximum value of [transcribe\_audio\_trial\_weekly\_number](https://core.telegram.org/api/config#transcribe-audio-trial-weekly-number). */ - trial_remains_until_date?: number; - - protected get [id](): number { - return 0xCFB9D957; - } - - static get [name](): string { - return "messages.transcribedAudio" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pending", "true", "flags.0?true"], - ["transcription_id", "bigint", "long"], - ["text", "string", "string"], - ["trial_remains_num", "number", "flags.1?int"], - ["trial_remains_until_date", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pending ?? null, "true", "flags.0?true"], - [this.transcription_id, "bigint", "long"], - [this.text, "string", "string"], - [this.trial_remains_num ?? null, "number", "flags.1?int"], - [this.trial_remains_until_date ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { pending?: true; transcription_id: bigint; text: string; trial_remains_num?: number; trial_remains_until_date?: number }) { - super(); - this.pending = params.pending; - this.transcription_id = params.transcription_id; - this.text = params.text; - this.trial_remains_num = params.trial_remains_num; - this.trial_remains_until_date = params.trial_remains_until_date; - } -} - -/** Telegram Premium promotion information */ -export class help_PremiumPromo_ extends _help_PremiumPromo_ { - /** Description of the current state of the user's Telegram Premium subscription */ - status_text: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - status_entities: Array; - /** A list of [premium feature identifiers »](https://core.telegram.org/api/premium), associated to each video */ - video_sections: Array; - /** A list of videos */ - videos: Array; - /** Telegram Premium subscription options */ - period_options: Array; - /** Related user information */ - users: Array; - - protected get [id](): number { - return 0x5334759C; - } - - static get [name](): string { - return "help.premiumPromo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["status_text", "string", "string"], - ["status_entities", [_MessageEntity_], "Vector"], - ["video_sections", ["string"], "Vector"], - ["videos", [_Document_], "Vector"], - ["period_options", [_PremiumSubscriptionOption_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.status_text, "string", "string"], - [this.status_entities, [_MessageEntity_], "Vector"], - [this.video_sections, ["string"], "Vector"], - [this.videos, [_Document_], "Vector"], - [this.period_options, [_PremiumSubscriptionOption_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { status_text: string; status_entities: Array; video_sections: Array; videos: Array; period_options: Array; users: Array }) { - super(); - this.status_text = params.status_text; - this.status_entities = params.status_entities; - this.video_sections = params.video_sections; - this.videos = params.videos; - this.period_options = params.period_options; - this.users = params.users; - } -} - -/** Info about a Telegram Premium purchase */ -export class InputStorePaymentPremiumSubscription_ extends _InputStorePaymentPurpose_ { - /** Pass true if this is a restore of a Telegram Premium purchase; only for the App Store */ - restore?: true; - /** Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store */ - upgrade?: true; - - protected get [id](): number { - return 0xA6751E66; - } - - static get [name](): string { - return "inputStorePaymentPremiumSubscription" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["restore", "true", "flags.0?true"], - ["upgrade", "true", "flags.1?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.restore ?? null, "true", "flags.0?true"], - [this.upgrade ?? null, "true", "flags.1?true"], - ]; - } - - constructor(params?: { restore?: true; upgrade?: true }) { - super(); - this.restore = params?.restore; - this.upgrade = params?.upgrade; - } -} - -/** Info about a gifted Telegram Premium purchase */ -export class InputStorePaymentGiftPremium_ extends _InputStorePaymentPurpose_ { - /** The user to which the Telegram Premium subscription was gifted */ - user_id: enums.InputUser; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - - protected get [id](): number { - return 0x616F7FE8; - } - - static get [name](): string { - return "inputStorePaymentGiftPremium" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", _InputUser_, "InputUser"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, _InputUser_, "InputUser"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - ]; - } - - constructor(params: { user_id: enums.InputUser; currency: string; amount: bigint }) { - super(); - this.user_id = params.user_id; - this.currency = params.currency; - this.amount = params.amount; - } -} - -/** Used to gift [Telegram Premium](https://core.telegram.org/api/premium) subscriptions only to some specific subscribers of a channel or to some of our contacts, see [here »](https://core.telegram.org/api/giveaways) for more info on giveaways and gifts. */ -export class InputStorePaymentPremiumGiftCode_ extends _InputStorePaymentPurpose_ { - /** The users that will receive the [Telegram Premium](https://core.telegram.org/api/premium) subscriptions. */ - users: Array; - /** If set, the gifts will be sent on behalf of a channel we are an admin of, which will also assign some [boosts](https://core.telegram.org/api/boost) to it. Otherwise, the gift will be sent directly from the currently logged in users, and we will gain some extra [boost slots](https://core.telegram.org/api/boost). See [here »](https://core.telegram.org/api/giveaways) for more info on giveaways and gifts. */ - boost_peer?: enums.InputPeer; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - - protected get [id](): number { - return 0xA3805F3F; - } - - static get [name](): string { - return "inputStorePaymentPremiumGiftCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["users", [_InputUser_], "Vector"], - ["boost_peer", _InputPeer_, "flags.0?InputPeer"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.users, [_InputUser_], "Vector"], - [this.boost_peer ?? null, _InputPeer_, "flags.0?InputPeer"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - ]; - } - - constructor(params: { users: Array; boost_peer?: enums.InputPeer; currency: string; amount: bigint }) { - super(); - this.users = params.users; - this.boost_peer = params.boost_peer; - this.currency = params.currency; - this.amount = params.amount; - } -} - -/** Used to pay for a [giveaway, see here »](https://core.telegram.org/api/giveaways) for more info. */ -export class InputStorePaymentPremiumGiveaway_ extends _InputStorePaymentPurpose_ { - /** If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. */ - only_new_subscribers?: true; - /** If set, giveaway winners are public and will be listed in a [messageMediaGiveawayResults](https://core.telegram.org/constructor/messageMediaGiveawayResults) message that will be automatically sent to the channel once the giveaway ends. */ - winners_are_visible?: true; - /** The channel starting the giveaway, that the user must join to participate, that will receive the giveaway [boosts](https://core.telegram.org/api/boost); see [here »](https://core.telegram.org/api/giveaways) for more info on giveaways. */ - boost_peer: enums.InputPeer; - /** Additional channels that the user must join to participate to the giveaway can be specified here. */ - additional_peers?: Array; - /** The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to [giveaway\_countries\_max](https://core.telegram.org/api/config#giveaway-countries-max) countries, specified as two-letter ISO 3166-1 alpha-2 country codes. */ - countries_iso2?: Array; - /** Can contain a textual description of additional giveaway prizes. */ - prize_description?: string; - /** Random ID to avoid resending the giveaway */ - random_id: bigint; - /** The end date of the giveaway, must be at most [giveaway\_period\_max](https://core.telegram.org/api/config#giveaway-period-max) seconds in the future; see [here »](https://core.telegram.org/api/giveaways) for more info on giveaways. */ - until_date: number; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - - protected get [id](): number { - return 0x160544CA; - } - - static get [name](): string { - return "inputStorePaymentPremiumGiveaway" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["only_new_subscribers", "true", "flags.0?true"], - ["winners_are_visible", "true", "flags.3?true"], - ["boost_peer", _InputPeer_, "InputPeer"], - ["additional_peers", [_InputPeer_], "flags.1?Vector"], - ["countries_iso2", ["string"], "flags.2?Vector"], - ["prize_description", "string", "flags.4?string"], - ["random_id", "bigint", "long"], - ["until_date", "number", "int"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.only_new_subscribers ?? null, "true", "flags.0?true"], - [this.winners_are_visible ?? null, "true", "flags.3?true"], - [this.boost_peer, _InputPeer_, "InputPeer"], - [this.additional_peers ?? null, [_InputPeer_], "flags.1?Vector"], - [this.countries_iso2 ?? null, ["string"], "flags.2?Vector"], - [this.prize_description ?? null, "string", "flags.4?string"], - [this.random_id, "bigint", "long"], - [this.until_date, "number", "int"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - ]; - } - - constructor(params: { only_new_subscribers?: true; winners_are_visible?: true; boost_peer: enums.InputPeer; additional_peers?: Array; countries_iso2?: Array; prize_description?: string; random_id: bigint; until_date: number; currency: string; amount: bigint }) { - super(); - this.only_new_subscribers = params.only_new_subscribers; - this.winners_are_visible = params.winners_are_visible; - this.boost_peer = params.boost_peer; - this.additional_peers = params.additional_peers; - this.countries_iso2 = params.countries_iso2; - this.prize_description = params.prize_description; - this.random_id = params.random_id; - this.until_date = params.until_date; - this.currency = params.currency; - this.amount = params.amount; - } -} - -/** Telegram Premium gift option */ -export class PremiumGiftOption_ extends _PremiumGiftOption_ { - /** Duration of gifted Telegram Premium subscription */ - months: number; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - /** An [invoice deep link »](https://core.telegram.org/api/links#invoice-links) to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available. */ - bot_url: string; - /** An identifier for the App Store/Play Store product associated with the Premium gift. */ - store_product?: string; - - protected get [id](): number { - return 0x74C34319; - } - - static get [name](): string { - return "premiumGiftOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["months", "number", "int"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ["bot_url", "string", "string"], - ["store_product", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.months, "number", "int"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - [this.bot_url, "string", "string"], - [this.store_product ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { months: number; currency: string; amount: bigint; bot_url: string; store_product?: string }) { - super(); - this.months = params.months; - this.currency = params.currency; - this.amount = params.amount; - this.bot_url = params.bot_url; - this.store_product = params.store_product; - } -} - -/** Represents an additional payment method */ -export class PaymentFormMethod_ extends _PaymentFormMethod_ { - /** URL to open in a webview to process the payment */ - url: string; - /** Payment method description */ - title: string; - - protected get [id](): number { - return 0x88F8F21B; - } - - static get [name](): string { - return "paymentFormMethod" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { url: string; title: string }) { - super(); - this.url = params.url; - this.title = params.title; - } -} - -/** No emoji status is set */ -export class EmojiStatusEmpty_ extends _EmojiStatus_ { - protected get [id](): number { - return 0x2DE11AAE; - } - - static get [name](): string { - return "emojiStatusEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** An [emoji status](https://core.telegram.org/api/emoji-status) */ -export class EmojiStatus_ extends _EmojiStatus_ { - /** [Custom emoji document ID](https://core.telegram.org/api/custom-emoji) */ - document_id: bigint; - - protected get [id](): number { - return 0x929B619D; - } - - static get [name](): string { - return "emojiStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.document_id, "bigint", "long"], - ]; - } - - constructor(params: { document_id: bigint }) { - super(); - this.document_id = params.document_id; - } -} - -/** An [emoji status](https://core.telegram.org/api/emoji-status) valid until the specified date */ -export class EmojiStatusUntil_ extends _EmojiStatus_ { - /** [Custom emoji document ID](https://core.telegram.org/api/custom-emoji) */ - document_id: bigint; - /** This status is valid until this date */ - until: number; - - protected get [id](): number { - return 0xFA30A8C7; - } - - static get [name](): string { - return "emojiStatusUntil" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document_id", "bigint", "long"], - ["until", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.document_id, "bigint", "long"], - [this.until, "number", "int"], - ]; - } - - constructor(params: { document_id: bigint; until: number }) { - super(); - this.document_id = params.document_id; - this.until = params.until; - } -} - -/** The server-side list of [emoji statuses](https://core.telegram.org/api/emoji-status) hasn't changed */ -export class account_EmojiStatusesNotModified_ extends _account_EmojiStatuses_ { - protected get [id](): number { - return 0xD08CE645; - } - - static get [name](): string { - return "account.emojiStatusesNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** A list of [emoji statuses](https://core.telegram.org/api/emoji-status) */ -export class account_EmojiStatuses_ extends _account_EmojiStatuses_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** [Emoji statuses](https://core.telegram.org/api/emoji-status) */ - statuses: Array; - - protected get [id](): number { - return 0x90C467D1; - } - - static get [name](): string { - return "account.emojiStatuses" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["statuses", [_EmojiStatus_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.statuses, [_EmojiStatus_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; statuses: Array }) { - super(); - this.hash = params.hash; - this.statuses = params.statuses; - } -} - -/** No reaction */ -export class ReactionEmpty_ extends _Reaction_ { - protected get [id](): number { - return 0x79F5D419; - } - - static get [name](): string { - return "reactionEmpty" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Normal emoji message reaction */ -export class ReactionEmoji_ extends _Reaction_ { - /** Emoji */ - emoticon: string; - - protected get [id](): number { - return 0x1B2286B8; - } - - static get [name](): string { - return "reactionEmoji" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { emoticon: string }) { - super(); - this.emoticon = params.emoticon; - } -} - -/** [Custom emoji](https://core.telegram.org/api/custom-emoji) message reaction */ -export class ReactionCustomEmoji_ extends _Reaction_ { - /** [Custom emoji document ID](https://core.telegram.org/api/custom-emoji) */ - document_id: bigint; - - protected get [id](): number { - return 0x8935FC73; - } - - static get [name](): string { - return "reactionCustomEmoji" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.document_id, "bigint", "long"], - ]; - } - - constructor(params: { document_id: bigint }) { - super(); - this.document_id = params.document_id; - } -} - -/** No reactions are allowed */ -export class ChatReactionsNone_ extends _ChatReactions_ { - protected get [id](): number { - return 0xEAFC32BC; - } - - static get [name](): string { - return "chatReactionsNone" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** All reactions or all non-custom reactions are allowed */ -export class ChatReactionsAll_ extends _ChatReactions_ { - /** Whether to allow custom reactions */ - allow_custom?: true; - - protected get [id](): number { - return 0x52928BCA; - } - - static get [name](): string { - return "chatReactionsAll" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["allow_custom", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.allow_custom ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { allow_custom?: true }) { - super(); - this.allow_custom = params?.allow_custom; - } -} - -/** Some reactions are allowed */ -export class ChatReactionsSome_ extends _ChatReactions_ { - /** Allowed set of reactions: the [reactions\_in\_chat\_max](https://core.telegram.org/api/config#reactions-in-chat-max) configuration field indicates the maximum number of reactions that can be specified in this field. */ - reactions: Array; - - protected get [id](): number { - return 0x661D4037; - } - - static get [name](): string { - return "chatReactionsSome" - } - - static get [paramDesc](): ParamDesc { - return [ - ["reactions", [_Reaction_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.reactions, [_Reaction_], "Vector"], - ]; - } - - constructor(params: { reactions: Array }) { - super(); - this.reactions = params.reactions; - } -} - -/** The server-side list of [message reactions](https://core.telegram.org/api/reactions) hasn't changed */ -export class messages_ReactionsNotModified_ extends _messages_Reactions_ { - protected get [id](): number { - return 0xB06FDBDF; - } - - static get [name](): string { - return "messages.reactionsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** List of [message reactions](https://core.telegram.org/api/reactions) */ -export class messages_Reactions_ extends _messages_Reactions_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Reactions */ - reactions: Array; - - protected get [id](): number { - return 0xEAFDF716; - } - - static get [name](): string { - return "messages.reactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["reactions", [_Reaction_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.reactions, [_Reaction_], "Vector"], - ]; - } - - constructor(params: { hash: bigint; reactions: Array }) { - super(); - this.hash = params.hash; - this.reactions = params.reactions; - } -} - -/** Email verification purpose: setup login email */ -export class EmailVerifyPurposeLoginSetup_ extends _EmailVerifyPurpose_ { - /** Phone number */ - phone_number: string; - /** Phone code hash as specified by the [documentation](https://core.telegram.org/api/auth#email-verification) */ - phone_code_hash: string; - - protected get [id](): number { - return 0x4345BE73; - } - - static get [name](): string { - return "emailVerifyPurposeLoginSetup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - } -} - -/** Email verification purpose: change login email */ -export class EmailVerifyPurposeLoginChange_ extends _EmailVerifyPurpose_ { - protected get [id](): number { - return 0x527D22EB; - } - - static get [name](): string { - return "emailVerifyPurposeLoginChange" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Verify an email for use in [telegram passport](https://core.telegram.org/api/passport) */ -export class EmailVerifyPurposePassport_ extends _EmailVerifyPurpose_ { - protected get [id](): number { - return 0xBBF51685; - } - - static get [name](): string { - return "emailVerifyPurposePassport" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Email verification code */ -export class EmailVerificationCode_ extends _EmailVerification_ { - /** Received verification code */ - code: string; - - protected get [id](): number { - return 0x922E55A9; - } - - static get [name](): string { - return "emailVerificationCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.code, "string", "string"], - ]; - } - - constructor(params: { code: string }) { - super(); - this.code = params.code; - } -} - -/** Google ID email verification token */ -export class EmailVerificationGoogle_ extends _EmailVerification_ { - /** Token */ - token: string; - - protected get [id](): number { - return 0xDB909EC2; - } - - static get [name](): string { - return "emailVerificationGoogle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.token, "string", "string"], - ]; - } - - constructor(params: { token: string }) { - super(); - this.token = params.token; - } -} - -/** Apple ID email verification token */ -export class EmailVerificationApple_ extends _EmailVerification_ { - /** Token */ - token: string; - - protected get [id](): number { - return 0x96D074FD; - } - - static get [name](): string { - return "emailVerificationApple" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.token, "string", "string"], - ]; - } - - constructor(params: { token: string }) { - super(); - this.token = params.token; - } -} - -/** The email was verified correctly. */ -export class account_EmailVerified_ extends _account_EmailVerified_ { - /** The verified email address. */ - email: string; - - protected get [id](): number { - return 0x2B96CD1B; - } - - static get [name](): string { - return "account.emailVerified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["email", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.email, "string", "string"], - ]; - } - - constructor(params: { email: string }) { - super(); - this.email = params.email; - } -} - -/** The email was verified correctly, and a login code was just sent to it. */ -export class account_EmailVerifiedLogin_ extends _account_EmailVerified_ { - /** The verified email address. */ - email: string; - /** Info about the sent [login code](https://core.telegram.org/api/auth) */ - sent_code: enums.auth.SentCode; - - protected get [id](): number { - return 0xE1BB0D61; - } - - static get [name](): string { - return "account.emailVerifiedLogin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["email", "string", "string"], - ["sent_code", _auth_SentCode_, "auth.SentCode"], - ]; - } - - protected get [params](): Params { - return [ - [this.email, "string", "string"], - [this.sent_code, _auth_SentCode_, "auth.SentCode"], - ]; - } - - constructor(params: { email: string; sent_code: enums.auth.SentCode }) { - super(); - this.email = params.email; - this.sent_code = params.sent_code; - } -} - -/** Describes a Telegram Premium subscription option */ -export class PremiumSubscriptionOption_ extends _PremiumSubscriptionOption_ { - /** Whether this subscription option is currently in use. */ - current?: true; - /** Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to `transaction`, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts. */ - can_purchase_upgrade?: true; - /** Identifier of the last in-store transaction for the currently used subscription on the current account. */ - transaction?: string; - /** Duration of subscription in months */ - months: number; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - /** [Deep link](https://core.telegram.org/api/links) used to initiate payment */ - bot_url: string; - /** Store product ID, only for official apps */ - store_product?: string; - - protected get [id](): number { - return 0x5F2D1DF2; - } - - static get [name](): string { - return "premiumSubscriptionOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["current", "true", "flags.1?true"], - ["can_purchase_upgrade", "true", "flags.2?true"], - ["transaction", "string", "flags.3?string"], - ["months", "number", "int"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ["bot_url", "string", "string"], - ["store_product", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.current ?? null, "true", "flags.1?true"], - [this.can_purchase_upgrade ?? null, "true", "flags.2?true"], - [this.transaction ?? null, "string", "flags.3?string"], - [this.months, "number", "int"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - [this.bot_url, "string", "string"], - [this.store_product ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { current?: true; can_purchase_upgrade?: true; transaction?: string; months: number; currency: string; amount: bigint; bot_url: string; store_product?: string }) { - super(); - this.current = params.current; - this.can_purchase_upgrade = params.can_purchase_upgrade; - this.transaction = params.transaction; - this.months = params.months; - this.currency = params.currency; - this.amount = params.amount; - this.bot_url = params.bot_url; - this.store_product = params.store_product; - } -} - -/** Indicates a peer that can be used to send messages */ -export class SendAsPeer_ extends _SendAsPeer_ { - /** Whether a Telegram Premium account is required to send messages as this peer */ - premium_required?: true; - /** Peer */ - peer: enums.Peer; - - protected get [id](): number { - return 0xB81C7034; - } - - static get [name](): string { - return "sendAsPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["premium_required", "true", "flags.0?true"], - ["peer", _Peer_, "Peer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.premium_required ?? null, "true", "flags.0?true"], - [this.peer, _Peer_, "Peer"], - ]; - } - - constructor(params: { premium_required?: true; peer: enums.Peer }) { - super(); - this.premium_required = params.premium_required; - this.peer = params.peer; - } -} - -/** Extended media preview */ -export class MessageExtendedMediaPreview_ extends _MessageExtendedMedia_ { - /** Width */ - w?: number; - /** Height */ - h?: number; - /** Thumbnail */ - thumb?: enums.PhotoSize; - /** Video duration */ - video_duration?: number; - - protected get [id](): number { - return 0xAD628CC8; - } - - static get [name](): string { - return "messageExtendedMediaPreview" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["w", "number", "flags.0?int"], - ["h", "number", "flags.0?int"], - ["thumb", _PhotoSize_, "flags.1?PhotoSize"], - ["video_duration", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.w ?? null, "number", "flags.0?int"], - [this.h ?? null, "number", "flags.0?int"], - [this.thumb ?? null, _PhotoSize_, "flags.1?PhotoSize"], - [this.video_duration ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params?: { w?: number; h?: number; thumb?: enums.PhotoSize; video_duration?: number }) { - super(); - this.w = params?.w; - this.h = params?.h; - this.thumb = params?.thumb; - this.video_duration = params?.video_duration; - } -} - -/** Extended media */ -export class MessageExtendedMedia_ extends _MessageExtendedMedia_ { - /** Media */ - media: enums.MessageMedia; - - protected get [id](): number { - return 0xEE479C64; - } - - static get [name](): string { - return "messageExtendedMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["media", _MessageMedia_, "MessageMedia"], - ]; - } - - protected get [params](): Params { - return [ - [this.media, _MessageMedia_, "MessageMedia"], - ]; - } - - constructor(params: { media: enums.MessageMedia }) { - super(); - this.media = params.media; - } -} - -/** Keywords for a certain sticker */ -export class StickerKeyword_ extends _StickerKeyword_ { - /** Sticker ID */ - document_id: bigint; - /** Keywords */ - keyword: Array; - - protected get [id](): number { - return 0xFCFEB29C; - } - - static get [name](): string { - return "stickerKeyword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document_id", "bigint", "long"], - ["keyword", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.document_id, "bigint", "long"], - [this.keyword, ["string"], "Vector"], - ]; - } - - constructor(params: { document_id: bigint; keyword: Array }) { - super(); - this.document_id = params.document_id; - this.keyword = params.keyword; - } -} - -/** Contains information about a username. */ -export class Username_ extends _Username_ { - /** Whether the username is editable, meaning it wasn't bought on [fragment](https://fragment.com). */ - editable?: true; - /** Whether the username is active. */ - active?: true; - /** The username. */ - username: string; - - protected get [id](): number { - return 0xB4073647; - } - - static get [name](): string { - return "username" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["editable", "true", "flags.0?true"], - ["active", "true", "flags.1?true"], - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.editable ?? null, "true", "flags.0?true"], - [this.active ?? null, "true", "flags.1?true"], - [this.username, "string", "string"], - ]; - } - - constructor(params: { editable?: true; active?: true; username: string }) { - super(); - this.editable = params.editable; - this.active = params.active; - this.username = params.username; - } -} - -/** Represents a deleted forum topic. */ -export class ForumTopicDeleted_ extends _ForumTopic_ { - /** The ID of the deleted forum topic. */ - id: number; - - protected get [id](): number { - return 0x023F109B; - } - - static get [name](): string { - return "forumTopicDeleted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - ]; - } - - constructor(params: { id: number }) { - super(); - this.id = params.id; - } -} - -/** Represents a [forum topic](https://core.telegram.org/api/forum#forum-topics). */ -export class ForumTopic_ extends _ForumTopic_ { - /** Whether the topic was created by the current user */ - my?: true; - /** Whether the topic is closed (no messages can be sent to it) */ - closed?: true; - /** Whether the topic is pinned */ - pinned?: true; - /** Whether this constructor is a reduced version of the full topic information. - If set, only the `my`, `closed`, `id`, `date`, `title`, `icon_color`, `icon_emoji_id` and `from_id` parameters will contain valid information. - Reduced info is usually only returned in topic-related [admin log events »](https://core.telegram.org/api/recent-actions) and in the [messages.channelMessages](https://core.telegram.org/constructor/messages.channelMessages) constructor: if needed, full information can be fetched using [channels.getForumTopicsByID](https://core.telegram.org/method/channels.getForumTopicsByID). */ - short?: true; - /** Whether the topic is hidden (only valid for the "General" topic, `id=1`) */ - hidden?: true; - /** [Topic ID](https://core.telegram.org/api/forum#forum-topics) */ - id: number; - /** Topic creation date */ - date: number; - /** Topic title */ - title: string; - /** If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of `0x6FB9F0`, `0xFFD67E`, `0xCB86DB`, `0x8EEE98`, `0xFF93B2`, or `0xFB6F5F`. */ - icon_color: number; - /** ID of the [custom emoji](https://core.telegram.org/api/custom-emoji) used as topic icon. */ - icon_emoji_id?: bigint; - /** ID of the last message that was sent to this topic */ - top_message: number; - /** Position up to which all incoming messages are read. */ - read_inbox_max_id: number; - /** Position up to which all outgoing messages are read. */ - read_outbox_max_id: number; - /** Number of unread messages */ - unread_count: number; - /** Number of [unread mentions](https://core.telegram.org/api/mentions) */ - unread_mentions_count: number; - /** Number of unread reactions to messages you sent */ - unread_reactions_count: number; - /** ID of the peer that created the topic */ - from_id: enums.Peer; - /** Notification settings */ - notify_settings: enums.PeerNotifySettings; - /** Message [draft](https://core.telegram.org/api/drafts) */ - draft?: enums.DraftMessage; - - protected get [id](): number { - return 0x71701DA9; - } - - static get [name](): string { - return "forumTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["my", "true", "flags.1?true"], - ["closed", "true", "flags.2?true"], - ["pinned", "true", "flags.3?true"], - ["short", "true", "flags.5?true"], - ["hidden", "true", "flags.6?true"], - ["id", "number", "int"], - ["date", "number", "int"], - ["title", "string", "string"], - ["icon_color", "number", "int"], - ["icon_emoji_id", "bigint", "flags.0?long"], - ["top_message", "number", "int"], - ["read_inbox_max_id", "number", "int"], - ["read_outbox_max_id", "number", "int"], - ["unread_count", "number", "int"], - ["unread_mentions_count", "number", "int"], - ["unread_reactions_count", "number", "int"], - ["from_id", _Peer_, "Peer"], - ["notify_settings", _PeerNotifySettings_, "PeerNotifySettings"], - ["draft", _DraftMessage_, "flags.4?DraftMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.my ?? null, "true", "flags.1?true"], - [this.closed ?? null, "true", "flags.2?true"], - [this.pinned ?? null, "true", "flags.3?true"], - [this.short ?? null, "true", "flags.5?true"], - [this.hidden ?? null, "true", "flags.6?true"], - [this.id, "number", "int"], - [this.date, "number", "int"], - [this.title, "string", "string"], - [this.icon_color, "number", "int"], - [this.icon_emoji_id ?? null, "bigint", "flags.0?long"], - [this.top_message, "number", "int"], - [this.read_inbox_max_id, "number", "int"], - [this.read_outbox_max_id, "number", "int"], - [this.unread_count, "number", "int"], - [this.unread_mentions_count, "number", "int"], - [this.unread_reactions_count, "number", "int"], - [this.from_id, _Peer_, "Peer"], - [this.notify_settings, _PeerNotifySettings_, "PeerNotifySettings"], - [this.draft ?? null, _DraftMessage_, "flags.4?DraftMessage"], - ]; - } - - constructor(params: { my?: true; closed?: true; pinned?: true; short?: true; hidden?: true; id: number; date: number; title: string; icon_color: number; icon_emoji_id?: bigint; top_message: number; read_inbox_max_id: number; read_outbox_max_id: number; unread_count: number; unread_mentions_count: number; unread_reactions_count: number; from_id: enums.Peer; notify_settings: enums.PeerNotifySettings; draft?: enums.DraftMessage }) { - super(); - this.my = params.my; - this.closed = params.closed; - this.pinned = params.pinned; - this.short = params.short; - this.hidden = params.hidden; - this.id = params.id; - this.date = params.date; - this.title = params.title; - this.icon_color = params.icon_color; - this.icon_emoji_id = params.icon_emoji_id; - this.top_message = params.top_message; - this.read_inbox_max_id = params.read_inbox_max_id; - this.read_outbox_max_id = params.read_outbox_max_id; - this.unread_count = params.unread_count; - this.unread_mentions_count = params.unread_mentions_count; - this.unread_reactions_count = params.unread_reactions_count; - this.from_id = params.from_id; - this.notify_settings = params.notify_settings; - this.draft = params.draft; - } -} - -/** Contains information about multiple [forum topics](https://core.telegram.org/api/forum#forum-topics) */ -export class messages_ForumTopics_ extends _messages_ForumTopics_ { - /** Whether the returned topics are ordered by creation date; if set, pagination by `offset_date` should use [forumTopic](https://core.telegram.org/constructor/forumTopic).`date`; otherwise topics are ordered by the last message date, so paginate by the `date` of the [message](https://core.telegram.org/type/Message) referenced by [forumTopic](https://core.telegram.org/constructor/forumTopic).`top_message`. */ - order_by_create_date?: true; - /** Total number of topics matching query; may be more than the topics contained in `topics`, in which case [pagination](https://core.telegram.org/api/offsets) is required. */ - count: number; - /** Forum topics */ - topics: Array; - /** Related messages (contains the messages mentioned by [forumTopic](https://core.telegram.org/constructor/forumTopic).`top_message`). */ - messages: Array; - /** Related chats */ - chats: Array; - /** Related users */ - users: Array; - /** [Event count after generation](https://core.telegram.org/api/updates) */ - pts: number; - - protected get [id](): number { - return 0x367617D3; - } - - static get [name](): string { - return "messages.forumTopics" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["order_by_create_date", "true", "flags.0?true"], - ["count", "number", "int"], - ["topics", [_ForumTopic_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["pts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.order_by_create_date ?? null, "true", "flags.0?true"], - [this.count, "number", "int"], - [this.topics, [_ForumTopic_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.pts, "number", "int"], - ]; - } - - constructor(params: { order_by_create_date?: true; count: number; topics: Array; messages: Array; chats: Array; users: Array; pts: number }) { - super(); - this.order_by_create_date = params.order_by_create_date; - this.count = params.count; - this.topics = params.topics; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - this.pts = params.pts; - } -} - -/** Contains info about the default value of the Time-To-Live setting, applied to all new chats. */ -export class DefaultHistoryTTL_ extends _DefaultHistoryTTL_ { - /** Time-To-Live setting applied to all new chats. */ - period: number; - - protected get [id](): number { - return 0x43B46B20; - } - - static get [name](): string { - return "defaultHistoryTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["period", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.period, "number", "int"], - ]; - } - - constructor(params: { period: number }) { - super(); - this.period = params.period; - } -} - -/** Describes a [temporary profile link](https://core.telegram.org/api/links#temporary-profile-links). */ -export class ExportedContactToken_ extends _ExportedContactToken_ { - /** The [temporary profile link](https://core.telegram.org/api/links#temporary-profile-links). */ - url: string; - /** Its expiration date */ - expires: number; - - protected get [id](): number { - return 0x41BF109B; - } - - static get [name](): string { - return "exportedContactToken" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["expires", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.expires, "number", "int"], - ]; - } - - constructor(params: { url: string; expires: number }) { - super(); - this.url = params.url; - this.expires = params.expires; - } -} - -/** Choose a user. */ -export class RequestPeerTypeUser_ extends _RequestPeerType_ { - /** Whether to allow choosing only bots. */ - bot?: boolean; - /** Whether to allow choosing only [Premium](https://core.telegram.org/api/premium) users. */ - premium?: boolean; - - protected get [id](): number { - return 0x5F3B8A00; - } - - static get [name](): string { - return "requestPeerTypeUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["bot", "boolean", "flags.0?Bool"], - ["premium", "boolean", "flags.1?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.bot ?? null, "boolean", "flags.0?Bool"], - [this.premium ?? null, "boolean", "flags.1?Bool"], - ]; - } - - constructor(params?: { bot?: boolean; premium?: boolean }) { - super(); - this.bot = params?.bot; - this.premium = params?.premium; - } -} - -/** Choose a chat or supergroup */ -export class RequestPeerTypeChat_ extends _RequestPeerType_ { - /** Whether to allow only choosing chats or supergroups that were created by the current user. */ - creator?: true; - /** Whether to allow only choosing chats or supergroups where the bot is a participant. */ - bot_participant?: true; - /** If specified, allows only choosing channels with or without a username, according to the value of [Bool](https://core.telegram.org/type/Bool). */ - has_username?: boolean; - /** If specified, allows only choosing chats or supergroups that are or aren't [forums](https://core.telegram.org/api/forum), according to the value of [Bool](https://core.telegram.org/type/Bool). */ - forum?: boolean; - /** If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights. */ - user_admin_rights?: enums.ChatAdminRights; - /** If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights. */ - bot_admin_rights?: enums.ChatAdminRights; - - protected get [id](): number { - return 0xC9F06E1B; - } - - static get [name](): string { - return "requestPeerTypeChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["creator", "true", "flags.0?true"], - ["bot_participant", "true", "flags.5?true"], - ["has_username", "boolean", "flags.3?Bool"], - ["forum", "boolean", "flags.4?Bool"], - ["user_admin_rights", _ChatAdminRights_, "flags.1?ChatAdminRights"], - ["bot_admin_rights", _ChatAdminRights_, "flags.2?ChatAdminRights"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.creator ?? null, "true", "flags.0?true"], - [this.bot_participant ?? null, "true", "flags.5?true"], - [this.has_username ?? null, "boolean", "flags.3?Bool"], - [this.forum ?? null, "boolean", "flags.4?Bool"], - [this.user_admin_rights ?? null, _ChatAdminRights_, "flags.1?ChatAdminRights"], - [this.bot_admin_rights ?? null, _ChatAdminRights_, "flags.2?ChatAdminRights"], - ]; - } - - constructor(params?: { creator?: true; bot_participant?: true; has_username?: boolean; forum?: boolean; user_admin_rights?: enums.ChatAdminRights; bot_admin_rights?: enums.ChatAdminRights }) { - super(); - this.creator = params?.creator; - this.bot_participant = params?.bot_participant; - this.has_username = params?.has_username; - this.forum = params?.forum; - this.user_admin_rights = params?.user_admin_rights; - this.bot_admin_rights = params?.bot_admin_rights; - } -} - -/** Choose a channel */ -export class RequestPeerTypeBroadcast_ extends _RequestPeerType_ { - /** Whether to allow only choosing channels that were created by the current user. */ - creator?: true; - /** If specified, allows only choosing channels with or without a username, according to the value of [Bool](https://core.telegram.org/type/Bool). */ - has_username?: boolean; - /** If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights. */ - user_admin_rights?: enums.ChatAdminRights; - /** If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights. */ - bot_admin_rights?: enums.ChatAdminRights; - - protected get [id](): number { - return 0x339BEF6C; - } - - static get [name](): string { - return "requestPeerTypeBroadcast" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["creator", "true", "flags.0?true"], - ["has_username", "boolean", "flags.3?Bool"], - ["user_admin_rights", _ChatAdminRights_, "flags.1?ChatAdminRights"], - ["bot_admin_rights", _ChatAdminRights_, "flags.2?ChatAdminRights"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.creator ?? null, "true", "flags.0?true"], - [this.has_username ?? null, "boolean", "flags.3?Bool"], - [this.user_admin_rights ?? null, _ChatAdminRights_, "flags.1?ChatAdminRights"], - [this.bot_admin_rights ?? null, _ChatAdminRights_, "flags.2?ChatAdminRights"], - ]; - } - - constructor(params?: { creator?: true; has_username?: boolean; user_admin_rights?: enums.ChatAdminRights; bot_admin_rights?: enums.ChatAdminRights }) { - super(); - this.creator = params?.creator; - this.has_username = params?.has_username; - this.user_admin_rights = params?.user_admin_rights; - this.bot_admin_rights = params?.bot_admin_rights; - } -} - -/** The list of [custom emojis](https://core.telegram.org/api/custom-emoji) hasn't changed. */ -export class EmojiListNotModified_ extends _EmojiList_ { - protected get [id](): number { - return 0x481EADFA; - } - - static get [name](): string { - return "emojiListNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a list of [custom emojis](https://core.telegram.org/api/custom-emoji). */ -export class EmojiList_ extends _EmojiList_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - /** Custom emoji IDs */ - document_id: Array; - - protected get [id](): number { - return 0x7A1E11D1; - } - - static get [name](): string { - return "emojiList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ["document_id", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - [this.document_id, ["bigint"], "Vector"], - ]; - } - - constructor(params: { hash: bigint; document_id: Array }) { - super(); - this.hash = params.hash; - this.document_id = params.document_id; - } -} - -/** Represents an [emoji category](https://core.telegram.org/api/custom-emoji#emoji-categories). */ -export class EmojiGroup_ extends _EmojiGroup_ { - /** Category name, i.e. "Animals", "Flags", "Faces" and so on... */ - title: string; - /** A single custom emoji used as preview for the category. */ - icon_emoji_id: bigint; - /** A list of UTF-8 emojis, matching the category. */ - emoticons: Array; - - protected get [id](): number { - return 0x7A9ABDA9; - } - - static get [name](): string { - return "emojiGroup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ["icon_emoji_id", "bigint", "long"], - ["emoticons", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - [this.icon_emoji_id, "bigint", "long"], - [this.emoticons, ["string"], "Vector"], - ]; - } - - constructor(params: { title: string; icon_emoji_id: bigint; emoticons: Array }) { - super(); - this.title = params.title; - this.icon_emoji_id = params.icon_emoji_id; - this.emoticons = params.emoticons; - } -} - -/** The list of [emoji categories](https://core.telegram.org/api/custom-emoji#emoji-categories) hasn't changed. */ -export class messages_EmojiGroupsNotModified_ extends _messages_EmojiGroups_ { - protected get [id](): number { - return 0x6FB4AD87; - } - - static get [name](): string { - return "messages.emojiGroupsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Represents a list of [emoji categories](https://core.telegram.org/api/custom-emoji#emoji-categories). */ -export class messages_EmojiGroups_ extends _messages_EmojiGroups_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - /** A list of [emoji categories](https://core.telegram.org/api/custom-emoji#emoji-categories). */ - groups: Array; - - protected get [id](): number { - return 0x881FB94B; - } - - static get [name](): string { - return "messages.emojiGroups" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ["groups", [_EmojiGroup_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - [this.groups, [_EmojiGroup_], "Vector"], - ]; - } - - constructor(params: { hash: number; groups: Array }) { - super(); - this.hash = params.hash; - this.groups = params.groups; - } -} - -/** Styled text with [message entities](https://core.telegram.org/api/entities) */ -export class TextWithEntities_ extends _TextWithEntities_ { - /** Text */ - text: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities: Array; - - protected get [id](): number { - return 0x751F3146; - } - - static get [name](): string { - return "textWithEntities" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["entities", [_MessageEntity_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.entities, [_MessageEntity_], "Vector"], - ]; - } - - constructor(params: { text: string; entities: Array }) { - super(); - this.text = params.text; - this.entities = params.entities; - } -} - -/** Translated text with [entities](https://core.telegram.org/api/entities) */ -export class messages_TranslateResult_ extends _messages_TranslatedText_ { - /** Text+[entities](https://core.telegram.org/api/entities), for each input message. */ - result: Array; - - protected get [id](): number { - return 0x33DB32F8; - } - - static get [name](): string { - return "messages.translateResult" - } - - static get [paramDesc](): ParamDesc { - return [ - ["result", [_TextWithEntities_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.result, [_TextWithEntities_], "Vector"], - ]; - } - - constructor(params: { result: Array }) { - super(); - this.result = params.result; - } -} - -/** Media autosave settings */ -export class AutoSaveSettings_ extends _AutoSaveSettings_ { - /** Whether photos should be autosaved to the gallery. */ - photos?: true; - /** Whether videos should be autosaved to the gallery. */ - videos?: true; - /** If set, specifies a size limit for autosavable videos */ - video_max_size?: bigint; - - protected get [id](): number { - return 0xC84834CE; - } - - static get [name](): string { - return "autoSaveSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["photos", "true", "flags.0?true"], - ["videos", "true", "flags.1?true"], - ["video_max_size", "bigint", "flags.2?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.photos ?? null, "true", "flags.0?true"], - [this.videos ?? null, "true", "flags.1?true"], - [this.video_max_size ?? null, "bigint", "flags.2?long"], - ]; - } - - constructor(params?: { photos?: true; videos?: true; video_max_size?: bigint }) { - super(); - this.photos = params?.photos; - this.videos = params?.videos; - this.video_max_size = params?.video_max_size; - } -} - -/** Peer-specific media autosave settings */ -export class AutoSaveException_ extends _AutoSaveException_ { - /** The peer */ - peer: enums.Peer; - /** Media autosave settings */ - settings: enums.AutoSaveSettings; - - protected get [id](): number { - return 0x81602D47; - } - - static get [name](): string { - return "autoSaveException" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["settings", _AutoSaveSettings_, "AutoSaveSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.settings, _AutoSaveSettings_, "AutoSaveSettings"], - ]; - } - - constructor(params: { peer: enums.Peer; settings: enums.AutoSaveSettings }) { - super(); - this.peer = params.peer; - this.settings = params.settings; - } -} - -/** Contains media autosave settings */ -export class account_AutoSaveSettings_ extends _account_AutoSaveSettings_ { - /** Default media autosave settings for private chats */ - users_settings: enums.AutoSaveSettings; - /** Default media autosave settings for [groups and supergroups](https://core.telegram.org/api/channel) */ - chats_settings: enums.AutoSaveSettings; - /** Default media autosave settings for [channels](https://core.telegram.org/api/channel) */ - broadcasts_settings: enums.AutoSaveSettings; - /** Peer-specific granular autosave settings */ - exceptions: Array; - /** Chats mentioned in the peer-specific granular autosave settings */ - chats: Array; - /** Users mentioned in the peer-specific granular autosave settings */ - users: Array; - - protected get [id](): number { - return 0x4C3E069D; - } - - static get [name](): string { - return "account.autoSaveSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["users_settings", _AutoSaveSettings_, "AutoSaveSettings"], - ["chats_settings", _AutoSaveSettings_, "AutoSaveSettings"], - ["broadcasts_settings", _AutoSaveSettings_, "AutoSaveSettings"], - ["exceptions", [_AutoSaveException_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.users_settings, _AutoSaveSettings_, "AutoSaveSettings"], - [this.chats_settings, _AutoSaveSettings_, "AutoSaveSettings"], - [this.broadcasts_settings, _AutoSaveSettings_, "AutoSaveSettings"], - [this.exceptions, [_AutoSaveException_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { users_settings: enums.AutoSaveSettings; chats_settings: enums.AutoSaveSettings; broadcasts_settings: enums.AutoSaveSettings; exceptions: Array; chats: Array; users: Array }) { - super(); - this.users_settings = params.users_settings; - this.chats_settings = params.chats_settings; - this.broadcasts_settings = params.broadcasts_settings; - this.exceptions = params.exceptions; - this.chats = params.chats; - this.users = params.users; - } -} - -/** The client configuration parameters haven't changed */ -export class help_AppConfigNotModified_ extends _help_AppConfig_ { - protected get [id](): number { - return 0x7CDE641D; - } - - static get [name](): string { - return "help.appConfigNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Contains various [client configuration parameters](https://core.telegram.org/api/config#client-configuration) */ -export class help_AppConfig_ extends _help_AppConfig_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - /** [Client configuration parameters](https://core.telegram.org/api/config#client-configuration) */ - config: enums.JSONValue; - - protected get [id](): number { - return 0xDD18782E; - } - - static get [name](): string { - return "help.appConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ["config", _JSONValue_, "JSONValue"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - [this.config, _JSONValue_, "JSONValue"], - ]; - } - - constructor(params: { hash: number; config: enums.JSONValue }) { - super(); - this.hash = params.hash; - this.config = params.config; - } -} - -/** Used to fetch information about a [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps) by its ID */ -export class InputBotAppID_ extends _InputBotApp_ { - /** [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps) ID. */ - id: bigint; - /** Access hash, obtained from the [botApp](https://core.telegram.org/constructor/botApp) constructor. */ - access_hash: bigint; - - protected get [id](): number { - return 0xA920BD7A; - } - - static get [name](): string { - return "inputBotAppID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - } -} - -/** Used to fetch information about a [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps) by its short name */ -export class InputBotAppShortName_ extends _InputBotApp_ { - /** ID of the bot that owns the bot mini app */ - bot_id: enums.InputUser; - /** Short name, obtained from a [Direct Mini App deep link](https://core.telegram.org/api/links#direct-mini-app-links) */ - short_name: string; - - protected get [id](): number { - return 0x908C0407; - } - - static get [name](): string { - return "inputBotAppShortName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot_id", _InputUser_, "InputUser"], - ["short_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot_id, _InputUser_, "InputUser"], - [this.short_name, "string", "string"], - ]; - } - - constructor(params: { bot_id: enums.InputUser; short_name: string }) { - super(); - this.bot_id = params.bot_id; - this.short_name = params.short_name; - } -} - -/** Bot app info hasn't changed. */ -export class BotAppNotModified_ extends _BotApp_ { - protected get [id](): number { - return 0x5DA674B7; - } - - static get [name](): string { - return "botAppNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Contains information about a [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps). */ -export class BotApp_ extends _BotApp_ { - /** bot mini app ID */ - id: bigint; - /** bot mini app access hash */ - access_hash: bigint; - /** bot mini app short name, used to generate [Direct Mini App deep links](https://core.telegram.org/api/links#direct-mini-app-links). */ - short_name: string; - /** bot mini app title. */ - title: string; - /** bot mini app description. */ - description: string; - /** bot mini app photo. */ - photo: enums.Photo; - /** bot mini app animation. */ - document?: enums.Document; - /** Hash to pass to [messages.getBotApp](https://core.telegram.org/method/messages.getBotApp), to avoid refetching bot app info if it hasn't changed. */ - hash: bigint; - - protected get [id](): number { - return 0x95FCD1D6; - } - - static get [name](): string { - return "botApp" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "bigint", "long"], - ["access_hash", "bigint", "long"], - ["short_name", "string", "string"], - ["title", "string", "string"], - ["description", "string", "string"], - ["photo", _Photo_, "Photo"], - ["document", _Document_, "flags.0?Document"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "bigint", "long"], - [this.access_hash, "bigint", "long"], - [this.short_name, "string", "string"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.photo, _Photo_, "Photo"], - [this.document ?? null, _Document_, "flags.0?Document"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { id: bigint; access_hash: bigint; short_name: string; title: string; description: string; photo: enums.Photo; document?: enums.Document; hash: bigint }) { - super(); - this.id = params.id; - this.access_hash = params.access_hash; - this.short_name = params.short_name; - this.title = params.title; - this.description = params.description; - this.photo = params.photo; - this.document = params.document; - this.hash = params.hash; - } -} - -/** Contains information about a [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps) */ -export class messages_BotApp_ extends _messages_BotApp_ { - /** Whether the web app was never used by the user, and confirmation must be asked from the user before opening it. */ - inactive?: true; - /** The bot is asking permission to send messages to the user: if the user agrees, set the `write_allowed` flag when invoking [messages.requestAppWebView](https://core.telegram.org/method/messages.requestAppWebView). */ - request_write_access?: true; - /** Deprecated flag, can be ignored. */ - has_settings?: true; - /** Bot app information */ - app: enums.BotApp; - - protected get [id](): number { - return 0xEB50ADF5; - } - - static get [name](): string { - return "messages.botApp" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["inactive", "true", "flags.0?true"], - ["request_write_access", "true", "flags.1?true"], - ["has_settings", "true", "flags.2?true"], - ["app", _BotApp_, "BotApp"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.inactive ?? null, "true", "flags.0?true"], - [this.request_write_access ?? null, "true", "flags.1?true"], - [this.has_settings ?? null, "true", "flags.2?true"], - [this.app, _BotApp_, "BotApp"], - ]; - } - - constructor(params: { inactive?: true; request_write_access?: true; has_settings?: true; app: enums.BotApp }) { - super(); - this.inactive = params.inactive; - this.request_write_access = params.request_write_access; - this.has_settings = params.has_settings; - this.app = params.app; - } -} - -/** Contains the link that must be used to open a [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps). */ -export class AppWebViewResultUrl_ extends _AppWebViewResult_ { - /** The URL to open */ - url: string; - - protected get [id](): number { - return 0x3C1B4F0D; - } - - static get [name](): string { - return "appWebViewResultUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -/** Specifies an [inline mode mini app](https://core.telegram.org/api/bots/webapps#inline-mode-mini-apps) button, shown on top of the inline query results list. */ -export class InlineBotWebView_ extends _InlineBotWebView_ { - /** Text of the button */ - text: string; - /** Webapp URL */ - url: string; - - protected get [id](): number { - return 0xB57295D5; - } - - static get [name](): string { - return "inlineBotWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { text: string; url: string }) { - super(); - this.text = params.text; - this.url = params.url; - } -} - -/** Contains info about when a certain participant has read a message */ -export class ReadParticipantDate_ extends _ReadParticipantDate_ { - /** User ID */ - user_id: bigint; - /** When the user read the message */ - date: number; - - protected get [id](): number { - return 0x4A4FF172; - } - - static get [name](): string { - return "readParticipantDate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", "bigint", "long"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, "bigint", "long"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { user_id: bigint; date: number }) { - super(); - this.user_id = params.user_id; - this.date = params.date; - } -} - -/** Folder ID */ -export class InputChatlistDialogFilter_ extends _InputChatlist_ { - /** [Folder](https://core.telegram.org/api/folders) ID */ - filter_id: number; - - protected get [id](): number { - return 0xF3E0DA33; - } - - static get [name](): string { - return "inputChatlistDialogFilter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["filter_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.filter_id, "number", "int"], - ]; - } - - constructor(params: { filter_id: number }) { - super(); - this.filter_id = params.filter_id; - } -} - -/** Exported [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class ExportedChatlistInvite_ extends _ExportedChatlistInvite_ { - /** Name of the link */ - title: string; - /** The [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - url: string; - /** Peers to import */ - peers: Array; - - protected get [id](): number { - return 0x0C5181AC; - } - - static get [name](): string { - return "exportedChatlistInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["url", "string", "string"], - ["peers", [_Peer_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.url, "string", "string"], - [this.peers, [_Peer_], "Vector"], - ]; - } - - constructor(params: { title: string; url: string; peers: Array }) { - super(); - this.title = params.title; - this.url = params.url; - this.peers = params.peers; - } -} - -/** Info about an exported [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_ExportedChatlistInvite_ extends _chatlists_ExportedChatlistInvite_ { - /** Folder ID */ - filter: enums.DialogFilter; - /** The exported [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - invite: enums.ExportedChatlistInvite; - - protected get [id](): number { - return 0x10E6E3A6; - } - - static get [name](): string { - return "chatlists.exportedChatlistInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["filter", _DialogFilter_, "DialogFilter"], - ["invite", _ExportedChatlistInvite_, "ExportedChatlistInvite"], - ]; - } - - protected get [params](): Params { - return [ - [this.filter, _DialogFilter_, "DialogFilter"], - [this.invite, _ExportedChatlistInvite_, "ExportedChatlistInvite"], - ]; - } - - constructor(params: { filter: enums.DialogFilter; invite: enums.ExportedChatlistInvite }) { - super(); - this.filter = params.filter; - this.invite = params.invite; - } -} - -/** Info about multiple [chat folder deep links »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_ExportedInvites_ extends _chatlists_ExportedInvites_ { - /** The [chat folder deep links »](https://core.telegram.org/api/links#chat-folder-links). */ - invites: Array; - /** Related chat information */ - chats: Array; - /** Related user information */ - users: Array; - - protected get [id](): number { - return 0x10AB6DC7; - } - - static get [name](): string { - return "chatlists.exportedInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invites", [_ExportedChatlistInvite_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.invites, [_ExportedChatlistInvite_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { invites: Array; chats: Array; users: Array }) { - super(); - this.invites = params.invites; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Updated info about a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links) we already imported. */ -export class chatlists_ChatlistInviteAlready_ extends _chatlists_ChatlistInvite_ { - /** ID of the imported folder */ - filter_id: number; - /** New peers to be imported */ - missing_peers: Array; - /** Peers that were already imported */ - already_peers: Array; - /** Related chat information */ - chats: Array; - /** Related user information */ - users: Array; - - protected get [id](): number { - return 0xFA87F659; - } - - static get [name](): string { - return "chatlists.chatlistInviteAlready" - } - - static get [paramDesc](): ParamDesc { - return [ - ["filter_id", "number", "int"], - ["missing_peers", [_Peer_], "Vector"], - ["already_peers", [_Peer_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.filter_id, "number", "int"], - [this.missing_peers, [_Peer_], "Vector"], - [this.already_peers, [_Peer_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { filter_id: number; missing_peers: Array; already_peers: Array; chats: Array; users: Array }) { - super(); - this.filter_id = params.filter_id; - this.missing_peers = params.missing_peers; - this.already_peers = params.already_peers; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Info about a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_ChatlistInvite_ extends _chatlists_ChatlistInvite_ { - /** Name of the link */ - title: string; - /** Emoji to use as icon for the folder. */ - emoticon?: string; - /** Supergroups and channels to join */ - peers: Array; - /** Related chat information */ - chats: Array; - /** Related user information */ - users: Array; - - protected get [id](): number { - return 0x1DCD839D; - } - - static get [name](): string { - return "chatlists.chatlistInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["emoticon", "string", "flags.0?string"], - ["peers", [_Peer_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.emoticon ?? null, "string", "flags.0?string"], - [this.peers, [_Peer_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { title: string; emoticon?: string; peers: Array; chats: Array; users: Array }) { - super(); - this.title = params.title; - this.emoticon = params.emoticon; - this.peers = params.peers; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Updated information about a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_ChatlistUpdates_ extends _chatlists_ChatlistUpdates_ { - /** New peers to join */ - missing_peers: Array; - /** Related chat information */ - chats: Array; - /** Related user information */ - users: Array; - - protected get [id](): number { - return 0x93BD878D; - } - - static get [name](): string { - return "chatlists.chatlistUpdates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["missing_peers", [_Peer_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.missing_peers, [_Peer_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { missing_peers: Array; chats: Array; users: Array }) { - super(); - this.missing_peers = params.missing_peers; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Localized information about a bot. */ -export class bots_BotInfo_ extends _bots_BotInfo_ { - /** Bot name */ - name: string; - /** Bot about text */ - about: string; - /** Bot description */ - description: string; - - protected get [id](): number { - return 0xE8A775B0; - } - - static get [name](): string { - return "bots.botInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["name", "string", "string"], - ["about", "string", "string"], - ["description", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.name, "string", "string"], - [this.about, "string", "string"], - [this.description, "string", "string"], - ]; - } - - constructor(params: { name: string; about: string; description: string }) { - super(); - this.name = params.name; - this.about = params.about; - this.description = params.description; - } -} - -/** How a peer voted in a poll */ -export class MessagePeerVote_ extends _MessagePeerVote_ { - /** Peer ID */ - peer: enums.Peer; - /** The option chosen by the peer */ - option: Uint8Array; - /** When did the peer cast the vote */ - date: number; - - protected get [id](): number { - return 0xB6CC2D5C; - } - - static get [name](): string { - return "messagePeerVote" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["option", Uint8Array, "bytes"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.option, Uint8Array, "bytes"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; option: Uint8Array; date: number }) { - super(); - this.peer = params.peer; - this.option = params.option; - this.date = params.date; - } -} - -/** How a peer voted in a poll (reduced constructor, returned if an `option` was provided to [messages.getPollVotes](https://core.telegram.org/method/messages.getPollVotes)) */ -export class MessagePeerVoteInputOption_ extends _MessagePeerVote_ { - /** The peer that voted for the queried `option` */ - peer: enums.Peer; - /** When did the peer cast the vote */ - date: number; - - protected get [id](): number { - return 0x74CDA504; - } - - static get [name](): string { - return "messagePeerVoteInputOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; date: number }) { - super(); - this.peer = params.peer; - this.date = params.date; - } -} - -/** How a peer voted in a multiple-choice poll */ -export class MessagePeerVoteMultiple_ extends _MessagePeerVote_ { - /** Peer ID */ - peer: enums.Peer; - /** Options chosen by the peer */ - options: Array; - /** When did the peer cast their votes */ - date: number; - - protected get [id](): number { - return 0x4628F6E6; - } - - static get [name](): string { - return "messagePeerVoteMultiple" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["options", [Uint8Array], "Vector"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.options, [Uint8Array], "Vector"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { peer: enums.Peer; options: Array; date: number }) { - super(); - this.peer = params.peer; - this.options = params.options; - this.date = params.date; - } -} - -/** Represents a sponsored website. */ -export class SponsoredWebPage_ extends _SponsoredWebPage_ { - /** Web page URL. */ - url: string; - /** Website name. */ - site_name: string; - /** Optional image preview. */ - photo?: enums.Photo; - - protected get [id](): number { - return 0x3DB8EC63; - } - - static get [name](): string { - return "sponsoredWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["url", "string", "string"], - ["site_name", "string", "string"], - ["photo", _Photo_, "flags.0?Photo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.url, "string", "string"], - [this.site_name, "string", "string"], - [this.photo ?? null, _Photo_, "flags.0?Photo"], - ]; - } - - constructor(params: { url: string; site_name: string; photo?: enums.Photo }) { - super(); - this.url = params.url; - this.site_name = params.site_name; - this.photo = params.photo; - } -} - -/** Aggregated view and reaction information of a [story](https://core.telegram.org/api/stories). */ -export class StoryViews_ extends _StoryViews_ { - /** If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a [Premium](https://core.telegram.org/api/premium) account. */ - has_viewers?: true; - /** View counter of the story */ - views_count: number; - /** Forward counter of the story */ - forwards_count?: number; - /** All reactions sent to this story */ - reactions?: Array; - /** Number of reactions added to the story */ - reactions_count?: number; - /** User IDs of some recent viewers of the story */ - recent_viewers?: Array; - - protected get [id](): number { - return 0x8D595CD6; - } - - static get [name](): string { - return "storyViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_viewers", "true", "flags.1?true"], - ["views_count", "number", "int"], - ["forwards_count", "number", "flags.2?int"], - ["reactions", [_ReactionCount_], "flags.3?Vector"], - ["reactions_count", "number", "flags.4?int"], - ["recent_viewers", ["bigint"], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_viewers ?? null, "true", "flags.1?true"], - [this.views_count, "number", "int"], - [this.forwards_count ?? null, "number", "flags.2?int"], - [this.reactions ?? null, [_ReactionCount_], "flags.3?Vector"], - [this.reactions_count ?? null, "number", "flags.4?int"], - [this.recent_viewers ?? null, ["bigint"], "flags.0?Vector"], - ]; - } - - constructor(params: { has_viewers?: true; views_count: number; forwards_count?: number; reactions?: Array; reactions_count?: number; recent_viewers?: Array }) { - super(); - this.has_viewers = params.has_viewers; - this.views_count = params.views_count; - this.forwards_count = params.forwards_count; - this.reactions = params.reactions; - this.reactions_count = params.reactions_count; - this.recent_viewers = params.recent_viewers; - } -} - -/** Represents a previously active story, that was deleted */ -export class StoryItemDeleted_ extends _StoryItem_ { - /** Story ID */ - id: number; - - protected get [id](): number { - return 0x51E6EE4F; - } - - static get [name](): string { - return "storyItemDeleted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "number", "int"], - ]; - } - - constructor(params: { id: number }) { - super(); - this.id = params.id; - } -} - -/** Represents an active story, whose full information was omitted for space and performance reasons; use [stories.getStoriesByID](https://core.telegram.org/method/stories.getStoriesByID) to fetch full info about the skipped story when and if needed. */ -export class StoryItemSkipped_ extends _StoryItem_ { - /** Whether this story can only be viewed by [our close friends, see here »](https://core.telegram.org/api/privacy) for more info */ - close_friends?: true; - /** Story ID */ - id: number; - /** When was the story posted. */ - date: number; - /** When does the story expire. */ - expire_date: number; - - protected get [id](): number { - return 0xFFADC913; - } - - static get [name](): string { - return "storyItemSkipped" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["close_friends", "true", "flags.8?true"], - ["id", "number", "int"], - ["date", "number", "int"], - ["expire_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.close_friends ?? null, "true", "flags.8?true"], - [this.id, "number", "int"], - [this.date, "number", "int"], - [this.expire_date, "number", "int"], - ]; - } - - constructor(params: { close_friends?: true; id: number; date: number; expire_date: number }) { - super(); - this.close_friends = params.close_friends; - this.id = params.id; - this.date = params.date; - this.expire_date = params.expire_date; - } -} - -/** Represents a [story](https://core.telegram.org/api/stories). */ -export class StoryItem_ extends _StoryItem_ { - /** Whether this story is pinned on the user's profile */ - pinned?: true; - /** Whether this story is public and can be viewed by everyone */ - public?: true; - /** Whether this story can only be viewed by [our close friends, see here »](https://core.telegram.org/api/privacy) for more info */ - close_friends?: true; - /** Full information about this story was omitted for space and performance reasons; use [stories.getStoriesByID](https://core.telegram.org/method/stories.getStoriesByID) to fetch full info about this story when and if needed. */ - min?: true; - /** Whether this story is [protected](https://telegram.org/blog/protected-content-delete-by-date-and-more) and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera). */ - noforwards?: true; - /** Indicates whether the story was edited. */ - edited?: true; - /** Whether this story can only be viewed by our contacts */ - contacts?: true; - /** Whether this story can only be viewed by a select list of our contacts */ - selected_contacts?: true; - /** indicates whether we sent this story. */ - out?: true; - /** ID of the story. */ - id: number; - /** When was the story posted. */ - date: number; - from_id?: enums.Peer; - /** For [reposted stories »](https://core.telegram.org/api/stories#reposting-stories), contains info about the original story. */ - fwd_from?: enums.StoryFwdHeader; - /** When does the story expire. */ - expire_date: number; - /** Story caption. */ - caption?: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Story media. */ - media: enums.MessageMedia; - /** List of media areas, see [here »](https://core.telegram.org/api/stories#media-areas) for more info on media areas. */ - media_areas?: Array; - /** [Privacy rules](https://core.telegram.org/api/privacy) indicating who can and can't view this story */ - privacy?: Array; - /** View date and reaction information */ - views?: enums.StoryViews; - /** The reaction we sent. */ - sent_reaction?: enums.Reaction; - - protected get [id](): number { - return 0x79B26A24; - } - - static get [name](): string { - return "storyItem" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.5?true"], - ["public", "true", "flags.7?true"], - ["close_friends", "true", "flags.8?true"], - ["min", "true", "flags.9?true"], - ["noforwards", "true", "flags.10?true"], - ["edited", "true", "flags.11?true"], - ["contacts", "true", "flags.12?true"], - ["selected_contacts", "true", "flags.13?true"], - ["out", "true", "flags.16?true"], - ["id", "number", "int"], - ["date", "number", "int"], - ["from_id", _Peer_, "flags.18?Peer"], - ["fwd_from", _StoryFwdHeader_, "flags.17?StoryFwdHeader"], - ["expire_date", "number", "int"], - ["caption", "string", "flags.0?string"], - ["entities", [_MessageEntity_], "flags.1?Vector"], - ["media", _MessageMedia_, "MessageMedia"], - ["media_areas", [_MediaArea_], "flags.14?Vector"], - ["privacy", [_PrivacyRule_], "flags.2?Vector"], - ["views", _StoryViews_, "flags.3?StoryViews"], - ["sent_reaction", _Reaction_, "flags.15?Reaction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.5?true"], - [this.public ?? null, "true", "flags.7?true"], - [this.close_friends ?? null, "true", "flags.8?true"], - [this.min ?? null, "true", "flags.9?true"], - [this.noforwards ?? null, "true", "flags.10?true"], - [this.edited ?? null, "true", "flags.11?true"], - [this.contacts ?? null, "true", "flags.12?true"], - [this.selected_contacts ?? null, "true", "flags.13?true"], - [this.out ?? null, "true", "flags.16?true"], - [this.id, "number", "int"], - [this.date, "number", "int"], - [this.from_id ?? null, _Peer_, "flags.18?Peer"], - [this.fwd_from ?? null, _StoryFwdHeader_, "flags.17?StoryFwdHeader"], - [this.expire_date, "number", "int"], - [this.caption ?? null, "string", "flags.0?string"], - [this.entities ?? null, [_MessageEntity_], "flags.1?Vector"], - [this.media, _MessageMedia_, "MessageMedia"], - [this.media_areas ?? null, [_MediaArea_], "flags.14?Vector"], - [this.privacy ?? null, [_PrivacyRule_], "flags.2?Vector"], - [this.views ?? null, _StoryViews_, "flags.3?StoryViews"], - [this.sent_reaction ?? null, _Reaction_, "flags.15?Reaction"], - ]; - } - - constructor(params: { pinned?: true; public?: true; close_friends?: true; min?: true; noforwards?: true; edited?: true; contacts?: true; selected_contacts?: true; out?: true; id: number; date: number; from_id?: enums.Peer; fwd_from?: enums.StoryFwdHeader; expire_date: number; caption?: string; entities?: Array; media: enums.MessageMedia; media_areas?: Array; privacy?: Array; views?: enums.StoryViews; sent_reaction?: enums.Reaction }) { - super(); - this.pinned = params.pinned; - this.public = params.public; - this.close_friends = params.close_friends; - this.min = params.min; - this.noforwards = params.noforwards; - this.edited = params.edited; - this.contacts = params.contacts; - this.selected_contacts = params.selected_contacts; - this.out = params.out; - this.id = params.id; - this.date = params.date; - this.from_id = params.from_id; - this.fwd_from = params.fwd_from; - this.expire_date = params.expire_date; - this.caption = params.caption; - this.entities = params.entities; - this.media = params.media; - this.media_areas = params.media_areas; - this.privacy = params.privacy; - this.views = params.views; - this.sent_reaction = params.sent_reaction; - } -} - -/** The list of active (or active and hidden) [stories](https://core.telegram.org/api/stories#watching-stories) has not changed. */ -export class stories_AllStoriesNotModified_ extends _stories_AllStories_ { - /** State to use to ask for updates */ - state: string; - /** Current [stealth mode](https://core.telegram.org/api/stories#stealth-mode) information */ - stealth_mode: enums.StoriesStealthMode; - - protected get [id](): number { - return 0x1158FE3E; - } - - static get [name](): string { - return "stories.allStoriesNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["state", "string", "string"], - ["stealth_mode", _StoriesStealthMode_, "StoriesStealthMode"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.state, "string", "string"], - [this.stealth_mode, _StoriesStealthMode_, "StoriesStealthMode"], - ]; - } - - constructor(params: { state: string; stealth_mode: enums.StoriesStealthMode }) { - super(); - this.state = params.state; - this.stealth_mode = params.stealth_mode; - } -} - -/** Full list of active (or active and hidden) [stories](https://core.telegram.org/api/stories#watching-stories). */ -export class stories_AllStories_ extends _stories_AllStories_ { - /** Whether more results can be fetched as [described here »](https://core.telegram.org/api/stories#watching-stories). */ - has_more?: true; - /** Total number of active (or active and hidden) stories */ - count: number; - /** State to use for pagination */ - state: string; - /** Stories */ - peer_stories: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - /** Current [stealth mode](https://core.telegram.org/api/stories#stealth-mode) information */ - stealth_mode: enums.StoriesStealthMode; - - protected get [id](): number { - return 0x6EFC5E81; - } - - static get [name](): string { - return "stories.allStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["has_more", "true", "flags.0?true"], - ["count", "number", "int"], - ["state", "string", "string"], - ["peer_stories", [_PeerStories_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["stealth_mode", _StoriesStealthMode_, "StoriesStealthMode"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.has_more ?? null, "true", "flags.0?true"], - [this.count, "number", "int"], - [this.state, "string", "string"], - [this.peer_stories, [_PeerStories_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.stealth_mode, _StoriesStealthMode_, "StoriesStealthMode"], - ]; - } - - constructor(params: { has_more?: true; count: number; state: string; peer_stories: Array; chats: Array; users: Array; stealth_mode: enums.StoriesStealthMode }) { - super(); - this.has_more = params.has_more; - this.count = params.count; - this.state = params.state; - this.peer_stories = params.peer_stories; - this.chats = params.chats; - this.users = params.users; - this.stealth_mode = params.stealth_mode; - } -} - -/** List of [stories](https://core.telegram.org/api/stories#pinned-or-archived-stories) */ -export class stories_Stories_ extends _stories_Stories_ { - /** Total number of stories that can be fetched */ - count: number; - /** Stories */ - stories: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x5DD8C3C8; - } - - static get [name](): string { - return "stories.stories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["stories", [_StoryItem_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.stories, [_StoryItem_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; stories: Array; chats: Array; users: Array }) { - super(); - this.count = params.count; - this.stories = params.stories; - this.chats = params.chats; - this.users = params.users; - } -} - -/** [Story](https://core.telegram.org/api/stories) view date and reaction information */ -export class StoryView_ extends _StoryView_ { - /** Whether we have [completely blocked](https://core.telegram.org/api/block) this user, including from viewing more of our stories. */ - blocked?: true; - /** Whether we have [blocked](https://core.telegram.org/api/block) this user from viewing more of our stories. */ - blocked_my_stories_from?: true; - /** The user that viewed the story */ - user_id: bigint; - /** When did the user view the story */ - date: number; - /** If present, contains the reaction that the user left on the story */ - reaction?: enums.Reaction; - - protected get [id](): number { - return 0xB0BDEAC5; - } - - static get [name](): string { - return "storyView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["blocked", "true", "flags.0?true"], - ["blocked_my_stories_from", "true", "flags.1?true"], - ["user_id", "bigint", "long"], - ["date", "number", "int"], - ["reaction", _Reaction_, "flags.2?Reaction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.blocked ?? null, "true", "flags.0?true"], - [this.blocked_my_stories_from ?? null, "true", "flags.1?true"], - [this.user_id, "bigint", "long"], - [this.date, "number", "int"], - [this.reaction ?? null, _Reaction_, "flags.2?Reaction"], - ]; - } - - constructor(params: { blocked?: true; blocked_my_stories_from?: true; user_id: bigint; date: number; reaction?: enums.Reaction }) { - super(); - this.blocked = params.blocked; - this.blocked_my_stories_from = params.blocked_my_stories_from; - this.user_id = params.user_id; - this.date = params.date; - this.reaction = params.reaction; - } -} - -/** A certain peer has forwarded the story as a message to a public chat or channel. */ -export class StoryViewPublicForward_ extends _StoryView_ { - /** Whether we have [completely blocked](https://core.telegram.org/api/block) this user, including from viewing more of our stories. */ - blocked?: true; - /** Whether we have [blocked](https://core.telegram.org/api/block) this user from viewing more of our stories. */ - blocked_my_stories_from?: true; - /** The message with the forwarded story. */ - message: enums.Message; - - protected get [id](): number { - return 0x9083670B; - } - - static get [name](): string { - return "storyViewPublicForward" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["blocked", "true", "flags.0?true"], - ["blocked_my_stories_from", "true", "flags.1?true"], - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.blocked ?? null, "true", "flags.0?true"], - [this.blocked_my_stories_from ?? null, "true", "flags.1?true"], - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { blocked?: true; blocked_my_stories_from?: true; message: enums.Message }) { - super(); - this.blocked = params.blocked; - this.blocked_my_stories_from = params.blocked_my_stories_from; - this.message = params.message; - } -} - -/** A certain peer has reposted the story. */ -export class StoryViewPublicRepost_ extends _StoryView_ { - /** Whether we have [completely blocked](https://core.telegram.org/api/block) this user, including from viewing more of our stories. */ - blocked?: true; - /** Whether we have [blocked](https://core.telegram.org/api/block) this user from viewing more of our stories. */ - blocked_my_stories_from?: true; - /** The peer that reposted the story. */ - peer_id: enums.Peer; - /** The reposted story. */ - story: enums.StoryItem; - - protected get [id](): number { - return 0xBD74CF49; - } - - static get [name](): string { - return "storyViewPublicRepost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["blocked", "true", "flags.0?true"], - ["blocked_my_stories_from", "true", "flags.1?true"], - ["peer_id", _Peer_, "Peer"], - ["story", _StoryItem_, "StoryItem"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.blocked ?? null, "true", "flags.0?true"], - [this.blocked_my_stories_from ?? null, "true", "flags.1?true"], - [this.peer_id, _Peer_, "Peer"], - [this.story, _StoryItem_, "StoryItem"], - ]; - } - - constructor(params: { blocked?: true; blocked_my_stories_from?: true; peer_id: enums.Peer; story: enums.StoryItem }) { - super(); - this.blocked = params.blocked; - this.blocked_my_stories_from = params.blocked_my_stories_from; - this.peer_id = params.peer_id; - this.story = params.story; - } -} - -/** Reaction and view counters for a [story](https://core.telegram.org/api/stories) */ -export class stories_StoryViewsList_ extends _stories_StoryViewsList_ { - /** Total number of results that can be fetched */ - count: number; - /** Total number of story views */ - views_count: number; - /** Total number of story forwards/reposts */ - forwards_count: number; - /** Number of reactions that were added to the story */ - reactions_count: number; - /** Story view date and reaction information */ - views: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - /** Offset for pagination */ - next_offset?: string; - - protected get [id](): number { - return 0x59D78FC5; - } - - static get [name](): string { - return "stories.storyViewsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["count", "number", "int"], - ["views_count", "number", "int"], - ["forwards_count", "number", "int"], - ["reactions_count", "number", "int"], - ["views", [_StoryView_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["next_offset", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.count, "number", "int"], - [this.views_count, "number", "int"], - [this.forwards_count, "number", "int"], - [this.reactions_count, "number", "int"], - [this.views, [_StoryView_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.next_offset ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { count: number; views_count: number; forwards_count: number; reactions_count: number; views: Array; chats: Array; users: Array; next_offset?: string }) { - super(); - this.count = params.count; - this.views_count = params.views_count; - this.forwards_count = params.forwards_count; - this.reactions_count = params.reactions_count; - this.views = params.views; - this.chats = params.chats; - this.users = params.users; - this.next_offset = params.next_offset; - } -} - -/** Reaction and view counters for a list of [stories](https://core.telegram.org/api/stories) */ -export class stories_StoryViews_ extends _stories_StoryViews_ { - /** View date and reaction information of multiple stories */ - views: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0xDE9EED1D; - } - - static get [name](): string { - return "stories.storyViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["views", [_StoryViews_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.views, [_StoryViews_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { views: Array; users: Array }) { - super(); - this.views = params.views; - this.users = params.users; - } -} - -/** Reply to a message. */ -export class InputReplyToMessage_ extends _InputReplyTo_ { - /** The message ID to reply to. */ - reply_to_msg_id: number; - /** This field must contain the topic ID **only** when replying to messages in forum topics different from the "General" topic (i.e. `reply_to_msg_id` is set and `reply_to_msg_id != topicID` and `topicID != 1`). - If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic. */ - top_msg_id?: number; - /** Used to reply to messages sent to another chat (specified here), can only be used for non-`protected` chats and messages. */ - reply_to_peer_id?: enums.InputPeer; - /** Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the [quote\_length\_max](https://core.telegram.org/api/config#quote-length-max) config key. */ - quote_text?: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) from the `quote_text` field. */ - quote_entities?: Array; - /** Offset of the message `quote_text` within the original message (in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length)). */ - quote_offset?: number; - - protected get [id](): number { - return 0x22C0F6D5; - } - - static get [name](): string { - return "inputReplyToMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reply_to_msg_id", "number", "int"], - ["top_msg_id", "number", "flags.0?int"], - ["reply_to_peer_id", _InputPeer_, "flags.1?InputPeer"], - ["quote_text", "string", "flags.2?string"], - ["quote_entities", [_MessageEntity_], "flags.3?Vector"], - ["quote_offset", "number", "flags.4?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reply_to_msg_id, "number", "int"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.reply_to_peer_id ?? null, _InputPeer_, "flags.1?InputPeer"], - [this.quote_text ?? null, "string", "flags.2?string"], - [this.quote_entities ?? null, [_MessageEntity_], "flags.3?Vector"], - [this.quote_offset ?? null, "number", "flags.4?int"], - ]; - } - - constructor(params: { reply_to_msg_id: number; top_msg_id?: number; reply_to_peer_id?: enums.InputPeer; quote_text?: string; quote_entities?: Array; quote_offset?: number }) { - super(); - this.reply_to_msg_id = params.reply_to_msg_id; - this.top_msg_id = params.top_msg_id; - this.reply_to_peer_id = params.reply_to_peer_id; - this.quote_text = params.quote_text; - this.quote_entities = params.quote_entities; - this.quote_offset = params.quote_offset; - } -} - -/** Reply to a story. */ -export class InputReplyToStory_ extends _InputReplyTo_ { - peer: enums.InputPeer; - /** ID of the story to reply to. */ - story_id: number; - - protected get [id](): number { - return 0x5881323A; - } - - static get [name](): string { - return "inputReplyToStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _InputPeer_, "InputPeer"], - ["story_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _InputPeer_, "InputPeer"], - [this.story_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; story_id: number }) { - super(); - this.peer = params.peer; - this.story_id = params.story_id; - } -} - -/** Represents a [story deep link](https://core.telegram.org/api/stories#story-links). */ -export class ExportedStoryLink_ extends _ExportedStoryLink_ { - /** The [story deep link](https://core.telegram.org/api/stories#story-links). */ - link: string; - - protected get [id](): number { - return 0x3FC9053B; - } - - static get [name](): string { - return "exportedStoryLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["link", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.link, "string", "string"], - ]; - } - - constructor(params: { link: string }) { - super(); - this.link = params.link; - } -} - -/** Information about the current [stealth mode](https://core.telegram.org/api/stories#stealth-mode) session. */ -export class StoriesStealthMode_ extends _StoriesStealthMode_ { - /** The date up to which stealth mode will be active. */ - active_until_date?: number; - /** The date starting from which the user will be allowed to re-enable stealth mode again. */ - cooldown_until_date?: number; - - protected get [id](): number { - return 0x712E27FD; - } - - static get [name](): string { - return "storiesStealthMode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["active_until_date", "number", "flags.0?int"], - ["cooldown_until_date", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.active_until_date ?? null, "number", "flags.0?int"], - [this.cooldown_until_date ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params?: { active_until_date?: number; cooldown_until_date?: number }) { - super(); - this.active_until_date = params?.active_until_date; - this.cooldown_until_date = params?.cooldown_until_date; - } -} - -/** Coordinates and size of a clicable rectangular area on top of a story. */ -export class MediaAreaCoordinates_ extends _MediaAreaCoordinates_ { - /** The abscissa of the rectangle's center, as a percentage of the media width (0-100). */ - x: number; - /** The ordinate of the rectangle's center, as a percentage of the media height (0-100). */ - y: number; - /** The width of the rectangle, as a percentage of the media width (0-100). */ - w: number; - /** The height of the rectangle, as a percentage of the media height (0-100). */ - h: number; - /** Clockwise rotation angle of the rectangle, in degrees (0-360). */ - rotation: number; - - protected get [id](): number { - return 0x03D1EA4E; - } - - static get [name](): string { - return "mediaAreaCoordinates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["x", "number", "double"], - ["y", "number", "double"], - ["w", "number", "double"], - ["h", "number", "double"], - ["rotation", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.x, "number", "double"], - [this.y, "number", "double"], - [this.w, "number", "double"], - [this.h, "number", "double"], - [this.rotation, "number", "double"], - ]; - } - - constructor(params: { x: number; y: number; w: number; h: number; rotation: number }) { - super(); - this.x = params.x; - this.y = params.y; - this.w = params.w; - this.h = params.h; - this.rotation = params.rotation; - } -} - -/** Represents a location tag attached to a [story](https://core.telegram.org/api/stories), with additional venue information. */ -export class MediaAreaVenue_ extends _MediaArea_ { - /** The size and location of the media area corresponding to the location sticker on top of the story media. */ - coordinates: enums.MediaAreaCoordinates; - /** Coordinates of the venue */ - geo: enums.GeoPoint; - /** Venue name */ - title: string; - /** Address */ - address: string; - /** Venue provider: currently only "foursquare" needs to be supported. */ - provider: string; - /** Venue ID in the provider's database */ - venue_id: string; - /** Venue type in the provider's database */ - venue_type: string; - - protected get [id](): number { - return 0xBE82DB9C; - } - - static get [name](): string { - return "mediaAreaVenue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["coordinates", _MediaAreaCoordinates_, "MediaAreaCoordinates"], - ["geo", _GeoPoint_, "GeoPoint"], - ["title", "string", "string"], - ["address", "string", "string"], - ["provider", "string", "string"], - ["venue_id", "string", "string"], - ["venue_type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.coordinates, _MediaAreaCoordinates_, "MediaAreaCoordinates"], - [this.geo, _GeoPoint_, "GeoPoint"], - [this.title, "string", "string"], - [this.address, "string", "string"], - [this.provider, "string", "string"], - [this.venue_id, "string", "string"], - [this.venue_type, "string", "string"], - ]; - } - - constructor(params: { coordinates: enums.MediaAreaCoordinates; geo: enums.GeoPoint; title: string; address: string; provider: string; venue_id: string; venue_type: string }) { - super(); - this.coordinates = params.coordinates; - this.geo = params.geo; - this.title = params.title; - this.address = params.address; - this.provider = params.provider; - this.venue_id = params.venue_id; - this.venue_type = params.venue_type; - } -} - -/** Represents a [location tag](https://core.telegram.org/api/stories#media-areas) attached to a [story](https://core.telegram.org/api/stories), with additional venue information. */ -export class InputMediaAreaVenue_ extends _MediaArea_ { - /** The size and location of the media area corresponding to the location sticker on top of the story media. */ - coordinates: enums.MediaAreaCoordinates; - /** The `query_id` from [messages.botResults](https://core.telegram.org/constructor/messages.botResults), see [here »](https://core.telegram.org/api/stories#media-areas) for more info. */ - query_id: bigint; - /** The `id` of the chosen result, see [here »](https://core.telegram.org/api/stories#media-areas) for more info. */ - result_id: string; - - protected get [id](): number { - return 0xB282217F; - } - - static get [name](): string { - return "inputMediaAreaVenue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["coordinates", _MediaAreaCoordinates_, "MediaAreaCoordinates"], - ["query_id", "bigint", "long"], - ["result_id", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.coordinates, _MediaAreaCoordinates_, "MediaAreaCoordinates"], - [this.query_id, "bigint", "long"], - [this.result_id, "string", "string"], - ]; - } - - constructor(params: { coordinates: enums.MediaAreaCoordinates; query_id: bigint; result_id: string }) { - super(); - this.coordinates = params.coordinates; - this.query_id = params.query_id; - this.result_id = params.result_id; - } -} - -/** Represents a geolocation tag attached to a [story](https://core.telegram.org/api/stories). */ -export class MediaAreaGeoPoint_ extends _MediaArea_ { - /** The size and position of the media area corresponding to the location sticker on top of the story media. */ - coordinates: enums.MediaAreaCoordinates; - /** Coordinates of the geolocation tag. */ - geo: enums.GeoPoint; - - protected get [id](): number { - return 0xDF8B3B22; - } - - static get [name](): string { - return "mediaAreaGeoPoint" - } - - static get [paramDesc](): ParamDesc { - return [ - ["coordinates", _MediaAreaCoordinates_, "MediaAreaCoordinates"], - ["geo", _GeoPoint_, "GeoPoint"], - ]; - } - - protected get [params](): Params { - return [ - [this.coordinates, _MediaAreaCoordinates_, "MediaAreaCoordinates"], - [this.geo, _GeoPoint_, "GeoPoint"], - ]; - } - - constructor(params: { coordinates: enums.MediaAreaCoordinates; geo: enums.GeoPoint }) { - super(); - this.coordinates = params.coordinates; - this.geo = params.geo; - } -} - -/** Represents a reaction bubble. */ -export class MediaAreaSuggestedReaction_ extends _MediaArea_ { - /** Whether the reaction bubble has a dark background. */ - dark?: true; - /** Whether the reaction bubble is mirrored (see [here »](https://core.telegram.org/api/stories#reactions) for more info). */ - flipped?: true; - /** The coordinates of the media area corresponding to the reaction button. */ - coordinates: enums.MediaAreaCoordinates; - /** The reaction that should be sent when this area is clicked. */ - reaction: enums.Reaction; - - protected get [id](): number { - return 0x14455871; - } - - static get [name](): string { - return "mediaAreaSuggestedReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["flipped", "true", "flags.1?true"], - ["coordinates", _MediaAreaCoordinates_, "MediaAreaCoordinates"], - ["reaction", _Reaction_, "Reaction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.flipped ?? null, "true", "flags.1?true"], - [this.coordinates, _MediaAreaCoordinates_, "MediaAreaCoordinates"], - [this.reaction, _Reaction_, "Reaction"], - ]; - } - - constructor(params: { dark?: true; flipped?: true; coordinates: enums.MediaAreaCoordinates; reaction: enums.Reaction }) { - super(); - this.dark = params.dark; - this.flipped = params.flipped; - this.coordinates = params.coordinates; - this.reaction = params.reaction; - } -} - -/** Represents a channel post. */ -export class MediaAreaChannelPost_ extends _MediaArea_ { - /** The size and location of the media area corresponding to the location sticker on top of the story media. */ - coordinates: enums.MediaAreaCoordinates; - /** The channel that posted the message */ - channel_id: bigint; - /** ID of the channel message */ - msg_id: number; - - protected get [id](): number { - return 0x770416AF; - } - - static get [name](): string { - return "mediaAreaChannelPost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["coordinates", _MediaAreaCoordinates_, "MediaAreaCoordinates"], - ["channel_id", "bigint", "long"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.coordinates, _MediaAreaCoordinates_, "MediaAreaCoordinates"], - [this.channel_id, "bigint", "long"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { coordinates: enums.MediaAreaCoordinates; channel_id: bigint; msg_id: number }) { - super(); - this.coordinates = params.coordinates; - this.channel_id = params.channel_id; - this.msg_id = params.msg_id; - } -} - -/** Represents a channel post */ -export class InputMediaAreaChannelPost_ extends _MediaArea_ { - /** The size and location of the media area corresponding to the location sticker on top of the story media. */ - coordinates: enums.MediaAreaCoordinates; - /** The channel that posted the message */ - channel: enums.InputChannel; - /** ID of the channel message */ - msg_id: number; - - protected get [id](): number { - return 0x2271F2BF; - } - - static get [name](): string { - return "inputMediaAreaChannelPost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["coordinates", _MediaAreaCoordinates_, "MediaAreaCoordinates"], - ["channel", _InputChannel_, "InputChannel"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.coordinates, _MediaAreaCoordinates_, "MediaAreaCoordinates"], - [this.channel, _InputChannel_, "InputChannel"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { coordinates: enums.MediaAreaCoordinates; channel: enums.InputChannel; msg_id: number }) { - super(); - this.coordinates = params.coordinates; - this.channel = params.channel; - this.msg_id = params.msg_id; - } -} - -/** [Stories](https://core.telegram.org/api/stories) associated to a peer */ -export class PeerStories_ extends _PeerStories_ { - /** The peer */ - peer: enums.Peer; - /** If set, contains the ID of the maximum read story */ - max_read_id?: number; - /** Stories */ - stories: Array; - - protected get [id](): number { - return 0x9A35E999; - } - - static get [name](): string { - return "peerStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", _Peer_, "Peer"], - ["max_read_id", "number", "flags.0?int"], - ["stories", [_StoryItem_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, _Peer_, "Peer"], - [this.max_read_id ?? null, "number", "flags.0?int"], - [this.stories, [_StoryItem_], "Vector"], - ]; - } - - constructor(params: { peer: enums.Peer; max_read_id?: number; stories: Array }) { - super(); - this.peer = params.peer; - this.max_read_id = params.max_read_id; - this.stories = params.stories; - } -} - -/** [Active story list](https://core.telegram.org/api/stories#watching-stories) of a specific peer. */ -export class stories_PeerStories_ extends _stories_PeerStories_ { - /** Stories */ - stories: enums.PeerStories; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0xCAE68768; - } - - static get [name](): string { - return "stories.peerStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stories", _PeerStories_, "PeerStories"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.stories, _PeerStories_, "PeerStories"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { stories: enums.PeerStories; chats: Array; users: Array }) { - super(); - this.stories = params.stories; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Represents an Instant View webpage. */ -export class messages_WebPage_ extends _messages_WebPage_ { - /** The instant view webpage. */ - webpage: enums.WebPage; - /** Chats mentioned in the webpage. */ - chats: Array; - /** Users mentioned in the webpage. */ - users: Array; - - protected get [id](): number { - return 0xFD5E12BD; - } - - static get [name](): string { - return "messages.webPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["webpage", _WebPage_, "WebPage"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.webpage, _WebPage_, "WebPage"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { webpage: enums.WebPage; chats: Array; users: Array }) { - super(); - this.webpage = params.webpage; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Contains info about a [giveaway/gift](https://core.telegram.org/api/giveaways) option. */ -export class PremiumGiftCodeOption_ extends _PremiumGiftCodeOption_ { - /** Number of users which will be able to activate the gift codes. */ - users: number; - /** Duration in months of each gifted [Telegram Premium](https://core.telegram.org/api/premium) subscription. */ - months: number; - /** Identifier of the store product associated with the option, official apps only. */ - store_product?: string; - /** Number of times the store product must be paid */ - store_quantity?: number; - /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code */ - currency: string; - /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - amount: bigint; - - protected get [id](): number { - return 0x257E962B; - } - - static get [name](): string { - return "premiumGiftCodeOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["users", "number", "int"], - ["months", "number", "int"], - ["store_product", "string", "flags.0?string"], - ["store_quantity", "number", "flags.1?int"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.users, "number", "int"], - [this.months, "number", "int"], - [this.store_product ?? null, "string", "flags.0?string"], - [this.store_quantity ?? null, "number", "flags.1?int"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - ]; - } - - constructor(params: { users: number; months: number; store_product?: string; store_quantity?: number; currency: string; amount: bigint }) { - super(); - this.users = params.users; - this.months = params.months; - this.store_product = params.store_product; - this.store_quantity = params.store_quantity; - this.currency = params.currency; - this.amount = params.amount; - } -} - -/** Contains info about a [Telegram Premium giftcode link](https://core.telegram.org/api/links#premium-giftcode-links). */ -export class payments_CheckedGiftCode_ extends _payments_CheckedGiftCode_ { - /** Whether this giftcode was created by a [giveaway](https://core.telegram.org/api/giveaways). */ - via_giveaway?: true; - /** The peer that created the gift code. */ - from_id?: enums.Peer; - /** Message ID of the giveaway in the channel specified in `from_id`. */ - giveaway_msg_id?: number; - /** The destination user of the gift. */ - to_id?: bigint; - /** Creation date of the gift code. */ - date: number; - /** Duration in months of the gifted [Telegram Premium](https://core.telegram.org/api/premium) subscription. */ - months: number; - /** When was the giftcode imported, if it was imported. */ - used_date?: number; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x284A1096; - } - - static get [name](): string { - return "payments.checkedGiftCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["via_giveaway", "true", "flags.2?true"], - ["from_id", _Peer_, "flags.4?Peer"], - ["giveaway_msg_id", "number", "flags.3?int"], - ["to_id", "bigint", "flags.0?long"], - ["date", "number", "int"], - ["months", "number", "int"], - ["used_date", "number", "flags.1?int"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.via_giveaway ?? null, "true", "flags.2?true"], - [this.from_id ?? null, _Peer_, "flags.4?Peer"], - [this.giveaway_msg_id ?? null, "number", "flags.3?int"], - [this.to_id ?? null, "bigint", "flags.0?long"], - [this.date, "number", "int"], - [this.months, "number", "int"], - [this.used_date ?? null, "number", "flags.1?int"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { via_giveaway?: true; from_id?: enums.Peer; giveaway_msg_id?: number; to_id?: bigint; date: number; months: number; used_date?: number; chats: Array; users: Array }) { - super(); - this.via_giveaway = params.via_giveaway; - this.from_id = params.from_id; - this.giveaway_msg_id = params.giveaway_msg_id; - this.to_id = params.to_id; - this.date = params.date; - this.months = params.months; - this.used_date = params.used_date; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Contains info about an ongoing [giveaway](https://core.telegram.org/api/giveaways). */ -export class payments_GiveawayInfo_ extends _payments_GiveawayInfo_ { - /** The current user is participating in the giveaway. */ - participating?: true; - /** If set, the giveaway has ended and the results are being prepared. */ - preparing_results?: true; - /** When was the giveaway started */ - start_date: number; - /** The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the `only_new_subscribers` was set when starting the giveaway. */ - joined_too_early_date?: number; - /** If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway. */ - admin_disallowed_chat_id?: bigint; - /** If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code). */ - disallowed_country?: string; - - protected get [id](): number { - return 0x4367DAA0; - } - - static get [name](): string { - return "payments.giveawayInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["participating", "true", "flags.0?true"], - ["preparing_results", "true", "flags.3?true"], - ["start_date", "number", "int"], - ["joined_too_early_date", "number", "flags.1?int"], - ["admin_disallowed_chat_id", "bigint", "flags.2?long"], - ["disallowed_country", "string", "flags.4?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.participating ?? null, "true", "flags.0?true"], - [this.preparing_results ?? null, "true", "flags.3?true"], - [this.start_date, "number", "int"], - [this.joined_too_early_date ?? null, "number", "flags.1?int"], - [this.admin_disallowed_chat_id ?? null, "bigint", "flags.2?long"], - [this.disallowed_country ?? null, "string", "flags.4?string"], - ]; - } - - constructor(params: { participating?: true; preparing_results?: true; start_date: number; joined_too_early_date?: number; admin_disallowed_chat_id?: bigint; disallowed_country?: string }) { - super(); - this.participating = params.participating; - this.preparing_results = params.preparing_results; - this.start_date = params.start_date; - this.joined_too_early_date = params.joined_too_early_date; - this.admin_disallowed_chat_id = params.admin_disallowed_chat_id; - this.disallowed_country = params.disallowed_country; - } -} - -/** A [giveaway](https://core.telegram.org/api/giveaways) has ended. */ -export class payments_GiveawayInfoResults_ extends _payments_GiveawayInfo_ { - /** Whether we're one of the winners of this giveaway. */ - winner?: true; - /** Whether the giveaway was canceled and was fully refunded. */ - refunded?: true; - /** Start date of the giveaway */ - start_date: number; - /** If we're one of the winners of this giveaway, contains the [Premium gift code](https://core.telegram.org/api/links#premium-giftcode-links), see [here »](https://core.telegram.org/api/giveaways) for more info on the full giveaway flow. */ - gift_code_slug?: string; - /** End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway. */ - finish_date: number; - /** Number of winners in the giveaway */ - winners_count: number; - /** Number of winners, which activated their [gift codes](https://core.telegram.org/api/links#premium-giftcode-links). */ - activated_count: number; - - protected get [id](): number { - return 0x00CD5570; - } - - static get [name](): string { - return "payments.giveawayInfoResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["winner", "true", "flags.0?true"], - ["refunded", "true", "flags.1?true"], - ["start_date", "number", "int"], - ["gift_code_slug", "string", "flags.0?string"], - ["finish_date", "number", "int"], - ["winners_count", "number", "int"], - ["activated_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.winner ?? null, "true", "flags.0?true"], - [this.refunded ?? null, "true", "flags.1?true"], - [this.start_date, "number", "int"], - [this.gift_code_slug ?? null, "string", "flags.0?string"], - [this.finish_date, "number", "int"], - [this.winners_count, "number", "int"], - [this.activated_count, "number", "int"], - ]; - } - - constructor(params: { winner?: true; refunded?: true; start_date: number; gift_code_slug?: string; finish_date: number; winners_count: number; activated_count: number }) { - super(); - this.winner = params.winner; - this.refunded = params.refunded; - this.start_date = params.start_date; - this.gift_code_slug = params.gift_code_slug; - this.finish_date = params.finish_date; - this.winners_count = params.winners_count; - this.activated_count = params.activated_count; - } -} - -/** Contains info about a [prepaid giveaway »](https://core.telegram.org/api/giveaways). */ -export class PrepaidGiveaway_ extends _PrepaidGiveaway_ { - /** Prepaid giveaway ID. */ - id: bigint; - /** Duration in months of each gifted [Telegram Premium](https://core.telegram.org/api/premium) subscription. */ - months: number; - /** Number of given away [Telegram Premium](https://core.telegram.org/api/premium) subscriptions. */ - quantity: number; - /** Payment date. */ - date: number; - - protected get [id](): number { - return 0xB2539D54; - } - - static get [name](): string { - return "prepaidGiveaway" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["months", "number", "int"], - ["quantity", "number", "int"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.months, "number", "int"], - [this.quantity, "number", "int"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { id: bigint; months: number; quantity: number; date: number }) { - super(); - this.id = params.id; - this.months = params.months; - this.quantity = params.quantity; - this.date = params.date; - } -} - -/** Info about one or more [boosts](https://core.telegram.org/api/boost) applied by a specific user. */ -export class Boost_ extends _Boost_ { - /** Whether this boost was applied because the channel [directly gifted a subscription to the user](https://core.telegram.org/api/giveaways). */ - gift?: true; - /** Whether this boost was applied because the user was chosen in a [giveaway started by the channel](https://core.telegram.org/api/giveaways). */ - giveaway?: true; - /** If set, the user hasn't yet invoked [payments.applyGiftCode](https://core.telegram.org/method/payments.applyGiftCode) to claim a subscription gifted [directly or in a giveaway by the channel](https://core.telegram.org/api/giveaways). */ - unclaimed?: true; - /** Unique ID for this set of boosts. */ - id: string; - /** ID of the user that applied the boost. */ - user_id?: bigint; - /** The message ID of the [giveaway](https://core.telegram.org/api/giveaways) */ - giveaway_msg_id?: number; - /** When was the boost applied */ - date: number; - /** When does the boost expire */ - expires: number; - /** The created Telegram Premium gift code, only set if either `gift` or `giveaway` are set AND it is either a gift code for the currently logged in user or if it was already claimed. */ - used_gift_slug?: string; - /** If set, this boost counts as `multiplier` boosts, otherwise it counts as a single boost. */ - multiplier?: number; - - protected get [id](): number { - return 0x2A1C8C71; - } - - static get [name](): string { - return "boost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["gift", "true", "flags.1?true"], - ["giveaway", "true", "flags.2?true"], - ["unclaimed", "true", "flags.3?true"], - ["id", "string", "string"], - ["user_id", "bigint", "flags.0?long"], - ["giveaway_msg_id", "number", "flags.2?int"], - ["date", "number", "int"], - ["expires", "number", "int"], - ["used_gift_slug", "string", "flags.4?string"], - ["multiplier", "number", "flags.5?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.gift ?? null, "true", "flags.1?true"], - [this.giveaway ?? null, "true", "flags.2?true"], - [this.unclaimed ?? null, "true", "flags.3?true"], - [this.id, "string", "string"], - [this.user_id ?? null, "bigint", "flags.0?long"], - [this.giveaway_msg_id ?? null, "number", "flags.2?int"], - [this.date, "number", "int"], - [this.expires, "number", "int"], - [this.used_gift_slug ?? null, "string", "flags.4?string"], - [this.multiplier ?? null, "number", "flags.5?int"], - ]; - } - - constructor(params: { gift?: true; giveaway?: true; unclaimed?: true; id: string; user_id?: bigint; giveaway_msg_id?: number; date: number; expires: number; used_gift_slug?: string; multiplier?: number }) { - super(); - this.gift = params.gift; - this.giveaway = params.giveaway; - this.unclaimed = params.unclaimed; - this.id = params.id; - this.user_id = params.user_id; - this.giveaway_msg_id = params.giveaway_msg_id; - this.date = params.date; - this.expires = params.expires; - this.used_gift_slug = params.used_gift_slug; - this.multiplier = params.multiplier; - } -} - -/** List of [boosts](https://core.telegram.org/api/boost) that were applied to a peer by multiple users. */ -export class premium_BoostsList_ extends _premium_BoostsList_ { - /** Total number of results */ - count: number; - /** [Boosts](https://core.telegram.org/api/boost) */ - boosts: Array; - /** Offset that can be used for [pagination](https://core.telegram.org/api/offsets). */ - next_offset?: string; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x86F8613C; - } - - static get [name](): string { - return "premium.boostsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["count", "number", "int"], - ["boosts", [_Boost_], "Vector"], - ["next_offset", "string", "flags.0?string"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.count, "number", "int"], - [this.boosts, [_Boost_], "Vector"], - [this.next_offset ?? null, "string", "flags.0?string"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; boosts: Array; next_offset?: string; users: Array }) { - super(); - this.count = params.count; - this.boosts = params.boosts; - this.next_offset = params.next_offset; - this.users = params.users; - } -} - -/** Contains information about a single [boost slot »](https://core.telegram.org/api/boost). */ -export class MyBoost_ extends _MyBoost_ { - /** [Boost slot ID »](https://core.telegram.org/api/boost) */ - slot: number; - /** If set, indicates this slot is currently occupied, i.e. we are [boosting](https://core.telegram.org/api/boost) this peer. - Note that we can assign multiple boost slots to the same peer. */ - peer?: enums.Peer; - /** When (unixtime) we started boosting the `peer`, `0` otherwise. */ - date: number; - /** Indicates the (unixtime) expiration date of the boost in `peer` (`0` if `peer` is not set). */ - expires: number; - /** If `peer` is set, indicates the (unixtime) date after which this boost can be reassigned to another channel. */ - cooldown_until_date?: number; - - protected get [id](): number { - return 0xC448415C; - } - - static get [name](): string { - return "myBoost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["slot", "number", "int"], - ["peer", _Peer_, "flags.0?Peer"], - ["date", "number", "int"], - ["expires", "number", "int"], - ["cooldown_until_date", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.slot, "number", "int"], - [this.peer ?? null, _Peer_, "flags.0?Peer"], - [this.date, "number", "int"], - [this.expires, "number", "int"], - [this.cooldown_until_date ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { slot: number; peer?: enums.Peer; date: number; expires: number; cooldown_until_date?: number }) { - super(); - this.slot = params.slot; - this.peer = params.peer; - this.date = params.date; - this.expires = params.expires; - this.cooldown_until_date = params.cooldown_until_date; - } -} - -/** A list of peers we are currently [boosting](https://core.telegram.org/api/boost), and how many [boost slots](https://core.telegram.org/api/boost) we have left. */ -export class premium_MyBoosts_ extends _premium_MyBoosts_ { - /** Info about boosted peers and remaining boost slots. */ - my_boosts: Array; - /** Referenced chats */ - chats: Array; - /** Referenced users */ - users: Array; - - protected get [id](): number { - return 0x9AE228E2; - } - - static get [name](): string { - return "premium.myBoosts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["my_boosts", [_MyBoost_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.my_boosts, [_MyBoost_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { my_boosts: Array; chats: Array; users: Array }) { - super(); - this.my_boosts = params.my_boosts; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Contains info about the current [boost status](https://core.telegram.org/api/boost) of a peer. */ -export class premium_BoostsStatus_ extends _premium_BoostsStatus_ { - /** Whether we're currently boosting this channel, `my_boost_slots` will also be set. */ - my_boost?: true; - /** The current boost level of the channel. */ - level: number; - /** The number of boosts acquired so far in the current level. */ - current_level_boosts: number; - /** Total number of boosts acquired so far. */ - boosts: number; - /** The number of boosts acquired from created Telegram Premium [gift codes](https://core.telegram.org/api/giveaways) and [giveaways](https://core.telegram.org/api/giveaways); only returned to channel admins. */ - gift_boosts?: number; - /** Total number of boosts needed to reach the next level; if absent, the next level isn't available. */ - next_level_boosts?: number; - /** Only returned to channel admins: contains the approximated number of Premium users subscribed to the channel, related to the total number of subscribers. */ - premium_audience?: enums.StatsPercentValue; - /** [Boost deep link »](https://core.telegram.org/api/links#boost-links) that can be used to boost the chat. */ - boost_url: string; - /** A list of prepaid [giveaways](https://core.telegram.org/api/giveaways) available for the chat; only returned to channel admins. */ - prepaid_giveaways?: Array; - /** Indicates which of our [boost slots](https://core.telegram.org/api/boost) we've assigned to this peer (populated if `my_boost` is set). */ - my_boost_slots?: Array; - - protected get [id](): number { - return 0x4959427A; - } - - static get [name](): string { - return "premium.boostsStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["my_boost", "true", "flags.2?true"], - ["level", "number", "int"], - ["current_level_boosts", "number", "int"], - ["boosts", "number", "int"], - ["gift_boosts", "number", "flags.4?int"], - ["next_level_boosts", "number", "flags.0?int"], - ["premium_audience", _StatsPercentValue_, "flags.1?StatsPercentValue"], - ["boost_url", "string", "string"], - ["prepaid_giveaways", [_PrepaidGiveaway_], "flags.3?Vector"], - ["my_boost_slots", ["number"], "flags.2?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.my_boost ?? null, "true", "flags.2?true"], - [this.level, "number", "int"], - [this.current_level_boosts, "number", "int"], - [this.boosts, "number", "int"], - [this.gift_boosts ?? null, "number", "flags.4?int"], - [this.next_level_boosts ?? null, "number", "flags.0?int"], - [this.premium_audience ?? null, _StatsPercentValue_, "flags.1?StatsPercentValue"], - [this.boost_url, "string", "string"], - [this.prepaid_giveaways ?? null, [_PrepaidGiveaway_], "flags.3?Vector"], - [this.my_boost_slots ?? null, ["number"], "flags.2?Vector"], - ]; - } - - constructor(params: { my_boost?: true; level: number; current_level_boosts: number; boosts: number; gift_boosts?: number; next_level_boosts?: number; premium_audience?: enums.StatsPercentValue; boost_url: string; prepaid_giveaways?: Array; my_boost_slots?: Array }) { - super(); - this.my_boost = params.my_boost; - this.level = params.level; - this.current_level_boosts = params.current_level_boosts; - this.boosts = params.boosts; - this.gift_boosts = params.gift_boosts; - this.next_level_boosts = params.next_level_boosts; - this.premium_audience = params.premium_audience; - this.boost_url = params.boost_url; - this.prepaid_giveaways = params.prepaid_giveaways; - this.my_boost_slots = params.my_boost_slots; - } -} - -/** Contains info about the original poster of a reposted story. */ -export class StoryFwdHeader_ extends _StoryFwdHeader_ { - /** Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction). */ - modified?: true; - /** Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case `from_name` will be set, instead. */ - from?: enums.Peer; - /** Will be set for stories forwarded from a user with forwards privacy enabled, in which case `from` will also be empty. */ - from_name?: string; - /** , contains the story ID */ - story_id?: number; - - protected get [id](): number { - return 0xB826E150; - } - - static get [name](): string { - return "storyFwdHeader" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["modified", "true", "flags.3?true"], - ["from", _Peer_, "flags.0?Peer"], - ["from_name", "string", "flags.1?string"], - ["story_id", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.modified ?? null, "true", "flags.3?true"], - [this.from ?? null, _Peer_, "flags.0?Peer"], - [this.from_name ?? null, "string", "flags.1?string"], - [this.story_id ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params?: { modified?: true; from?: enums.Peer; from_name?: string; story_id?: number }) { - super(); - this.modified = params?.modified; - this.from = params?.from; - this.from_name = params?.from_name; - this.story_id = params?.story_id; - } -} - -/** Interaction counters for a message. */ -export class PostInteractionCountersMessage_ extends _PostInteractionCounters_ { - /** Message ID */ - msg_id: number; - /** Number of views */ - views: number; - /** Number of forwards to public channels */ - forwards: number; - /** Number of reactions */ - reactions: number; - - protected get [id](): number { - return 0xE7058E7F; - } - - static get [name](): string { - return "postInteractionCountersMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_id", "number", "int"], - ["views", "number", "int"], - ["forwards", "number", "int"], - ["reactions", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_id, "number", "int"], - [this.views, "number", "int"], - [this.forwards, "number", "int"], - [this.reactions, "number", "int"], - ]; - } - - constructor(params: { msg_id: number; views: number; forwards: number; reactions: number }) { - super(); - this.msg_id = params.msg_id; - this.views = params.views; - this.forwards = params.forwards; - this.reactions = params.reactions; - } -} - -/** Interaction counters for a story. */ -export class PostInteractionCountersStory_ extends _PostInteractionCounters_ { - /** Story ID */ - story_id: number; - /** Number of views */ - views: number; - /** Number of forwards and reposts to public chats and channels */ - forwards: number; - /** Number of reactions */ - reactions: number; - - protected get [id](): number { - return 0x8A480E27; - } - - static get [name](): string { - return "postInteractionCountersStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["story_id", "number", "int"], - ["views", "number", "int"], - ["forwards", "number", "int"], - ["reactions", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.story_id, "number", "int"], - [this.views, "number", "int"], - [this.forwards, "number", "int"], - [this.reactions, "number", "int"], - ]; - } - - constructor(params: { story_id: number; views: number; forwards: number; reactions: number }) { - super(); - this.story_id = params.story_id; - this.views = params.views; - this.forwards = params.forwards; - this.reactions = params.reactions; - } -} - -/** Contains [statistics](https://core.telegram.org/api/stats) about a [story](https://core.telegram.org/api/stories). */ -export class stats_StoryStats_ extends _stats_StoryStats_ { - /** A graph containing the number of story views and shares */ - views_graph: enums.StatsGraph; - /** A bar graph containing the number of story reactions categorized by "emotion" (i.e. Positive, Negative, Other, etc...) */ - reactions_by_emotion_graph: enums.StatsGraph; - - protected get [id](): number { - return 0x50CD067C; - } - - static get [name](): string { - return "stats.storyStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["views_graph", _StatsGraph_, "StatsGraph"], - ["reactions_by_emotion_graph", _StatsGraph_, "StatsGraph"], - ]; - } - - protected get [params](): Params { - return [ - [this.views_graph, _StatsGraph_, "StatsGraph"], - [this.reactions_by_emotion_graph, _StatsGraph_, "StatsGraph"], - ]; - } - - constructor(params: { views_graph: enums.StatsGraph; reactions_by_emotion_graph: enums.StatsGraph }) { - super(); - this.views_graph = params.views_graph; - this.reactions_by_emotion_graph = params.reactions_by_emotion_graph; - } -} - -/** Contains info about a forward of a [story](https://core.telegram.org/api/stories) as a message. */ -export class PublicForwardMessage_ extends _PublicForward_ { - /** Info about the message with the reposted story. */ - message: enums.Message; - - protected get [id](): number { - return 0x01F2BF4A; - } - - static get [name](): string { - return "publicForwardMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** Contains info about a forward of a [story](https://core.telegram.org/api/stories) as a repost by a public channel. */ -export class PublicForwardStory_ extends _PublicForward_ { - /** The channel that reposted the story. */ - peer: enums.Peer; - /** The reposted story (may be different from the original story). */ - story: enums.StoryItem; - - protected get [id](): number { - return 0xEDF3ADD0; - } - - static get [name](): string { - return "publicForwardStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", _Peer_, "Peer"], - ["story", _StoryItem_, "StoryItem"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, _Peer_, "Peer"], - [this.story, _StoryItem_, "StoryItem"], - ]; - } - - constructor(params: { peer: enums.Peer; story: enums.StoryItem }) { - super(); - this.peer = params.peer; - this.story = params.story; - } -} - -/** Contains info about the forwards of a [story](https://core.telegram.org/api/stories) as a message to public chats and reposts by public channels. */ -export class stats_PublicForwards_ extends _stats_PublicForwards_ { - /** Total number of results */ - count: number; - /** Info about the forwards of a story. */ - forwards: Array; - /** Offset used for [pagination](https://core.telegram.org/api/offsets). */ - next_offset?: string; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x93037E20; - } - - static get [name](): string { - return "stats.publicForwards" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["count", "number", "int"], - ["forwards", [_PublicForward_], "Vector"], - ["next_offset", "string", "flags.0?string"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.count, "number", "int"], - [this.forwards, [_PublicForward_], "Vector"], - [this.next_offset ?? null, "string", "flags.0?string"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; forwards: Array; next_offset?: string; chats: Array; users: Array }) { - super(); - this.count = params.count; - this.forwards = params.forwards; - this.next_offset = params.next_offset; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Represents a [color palette »](https://core.telegram.org/api/colors). */ -export class PeerColor_ extends _PeerColor_ { - /** [Color palette ID, see here »](https://core.telegram.org/api/colors) for more info; if not set, the default palette should be used. */ - color?: number; - /** Optional [custom emoji ID](https://core.telegram.org/api/custom-emoji) used to generate the pattern. */ - background_emoji_id?: bigint; - - protected get [id](): number { - return 0xB54B5ACF; - } - - static get [name](): string { - return "peerColor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["color", "number", "flags.0?int"], - ["background_emoji_id", "bigint", "flags.1?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.color ?? null, "number", "flags.0?int"], - [this.background_emoji_id ?? null, "bigint", "flags.1?long"], - ]; - } - - constructor(params?: { color?: number; background_emoji_id?: bigint }) { - super(); - this.color = params?.color; - this.background_emoji_id = params?.background_emoji_id; - } -} - -/** Represents a [color palette that can be used in message accents »](https://core.telegram.org/api/colors). */ -export class help_PeerColorSet_ extends _help_PeerColorSet_ { - /** A list of 1-3 colors in RGB format, describing the accent color. */ - colors: Array; - - protected get [id](): number { - return 0x26219A58; - } - - static get [name](): string { - return "help.peerColorSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["colors", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.colors, ["number"], "Vector"], - ]; - } - - constructor(params: { colors: Array }) { - super(); - this.colors = params.colors; - } -} - -/** Represents a [color palette that can be used in profile pages »](https://core.telegram.org/api/colors). */ -export class help_PeerColorProfileSet_ extends _help_PeerColorSet_ { - /** A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette. */ - palette_colors: Array; - /** A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page. */ - bg_colors: Array; - /** A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo. */ - story_colors: Array; - - protected get [id](): number { - return 0x767D61EB; - } - - static get [name](): string { - return "help.peerColorProfileSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["palette_colors", ["number"], "Vector"], - ["bg_colors", ["number"], "Vector"], - ["story_colors", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.palette_colors, ["number"], "Vector"], - [this.bg_colors, ["number"], "Vector"], - [this.story_colors, ["number"], "Vector"], - ]; - } - - constructor(params: { palette_colors: Array; bg_colors: Array; story_colors: Array }) { - super(); - this.palette_colors = params.palette_colors; - this.bg_colors = params.bg_colors; - this.story_colors = params.story_colors; - } -} - -/** Contains info about a [color palette »](https://core.telegram.org/api/colors). */ -export class help_PeerColorOption_ extends _help_PeerColorOption_ { - /** Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents. */ - hidden?: true; - /** Palette ID. */ - color_id: number; - /** Light mode palette. - Will be empty for IDs `0` to `6` inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6. */ - colors?: enums.help.PeerColorSet; - /** Dark mode palette. Optional, defaults to the palette in `colors` (or the autogenerated palette for IDs `0` to `6`) if absent. */ - dark_colors?: enums.help.PeerColorSet; - /** Channels can use this palette only after reaching at least the [boost level](https://core.telegram.org/api/boost) specified in this field. */ - channel_min_level?: number; - group_min_level?: number; - - protected get [id](): number { - return 0xADEC6EBE; - } - - static get [name](): string { - return "help.peerColorOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["hidden", "true", "flags.0?true"], - ["color_id", "number", "int"], - ["colors", _help_PeerColorSet_, "flags.1?help.PeerColorSet"], - ["dark_colors", _help_PeerColorSet_, "flags.2?help.PeerColorSet"], - ["channel_min_level", "number", "flags.3?int"], - ["group_min_level", "number", "flags.4?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.hidden ?? null, "true", "flags.0?true"], - [this.color_id, "number", "int"], - [this.colors ?? null, _help_PeerColorSet_, "flags.1?help.PeerColorSet"], - [this.dark_colors ?? null, _help_PeerColorSet_, "flags.2?help.PeerColorSet"], - [this.channel_min_level ?? null, "number", "flags.3?int"], - [this.group_min_level ?? null, "number", "flags.4?int"], - ]; - } - - constructor(params: { hidden?: true; color_id: number; colors?: enums.help.PeerColorSet; dark_colors?: enums.help.PeerColorSet; channel_min_level?: number; group_min_level?: number }) { - super(); - this.hidden = params.hidden; - this.color_id = params.color_id; - this.colors = params.colors; - this.dark_colors = params.dark_colors; - this.channel_min_level = params.channel_min_level; - this.group_min_level = params.group_min_level; - } -} - -/** The list of color palettes has not changed. */ -export class help_PeerColorsNotModified_ extends _help_PeerColors_ { - protected get [id](): number { - return 0x2BA1F5CE; - } - - static get [name](): string { - return "help.peerColorsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Contains info about multiple [color palettes »](https://core.telegram.org/api/colors). */ -export class help_PeerColors_ extends _help_PeerColors_ { - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - /** Usable [color palettes](https://core.telegram.org/api/colors). */ - colors: Array; - - protected get [id](): number { - return 0x00F8ED08; - } - - static get [name](): string { - return "help.peerColors" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ["colors", [_help_PeerColorOption_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - [this.colors, [_help_PeerColorOption_], "Vector"], - ]; - } - - constructor(params: { hash: number; colors: Array }) { - super(); - this.hash = params.hash; - this.colors = params.colors; - } -} - -/** How a certain peer reacted to a story */ -export class StoryReaction_ extends _StoryReaction_ { - /** The peer */ - peer_id: enums.Peer; - /** Reaction date */ - date: number; - /** The reaction */ - reaction: enums.Reaction; - - protected get [id](): number { - return 0x6090D6D5; - } - - static get [name](): string { - return "storyReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer_id", _Peer_, "Peer"], - ["date", "number", "int"], - ["reaction", _Reaction_, "Reaction"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer_id, _Peer_, "Peer"], - [this.date, "number", "int"], - [this.reaction, _Reaction_, "Reaction"], - ]; - } - - constructor(params: { peer_id: enums.Peer; date: number; reaction: enums.Reaction }) { - super(); - this.peer_id = params.peer_id; - this.date = params.date; - this.reaction = params.reaction; - } -} - -/** A certain peer has forwarded the story as a message to a public chat or channel. */ -export class StoryReactionPublicForward_ extends _StoryReaction_ { - /** The message with the forwarded story. */ - message: enums.Message; - - protected get [id](): number { - return 0xBBAB2643; - } - - static get [name](): string { - return "storyReactionPublicForward" - } - - static get [paramDesc](): ParamDesc { - return [ - ["message", _Message_, "Message"], - ]; - } - - protected get [params](): Params { - return [ - [this.message, _Message_, "Message"], - ]; - } - - constructor(params: { message: enums.Message }) { - super(); - this.message = params.message; - } -} - -/** A certain peer has reposted the story. */ -export class StoryReactionPublicRepost_ extends _StoryReaction_ { - /** The peer that reposted the story. */ - peer_id: enums.Peer; - /** The reposted story. */ - story: enums.StoryItem; - - protected get [id](): number { - return 0xCFCD0F13; - } - - static get [name](): string { - return "storyReactionPublicRepost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer_id", _Peer_, "Peer"], - ["story", _StoryItem_, "StoryItem"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer_id, _Peer_, "Peer"], - [this.story, _StoryItem_, "StoryItem"], - ]; - } - - constructor(params: { peer_id: enums.Peer; story: enums.StoryItem }) { - super(); - this.peer_id = params.peer_id; - this.story = params.story; - } -} - -/** List of peers that reacted to or intercated with a specific [story](https://core.telegram.org/api/stories) */ -export class stories_StoryReactionsList_ extends _stories_StoryReactionsList_ { - /** Total number of reactions matching query */ - count: number; - /** List of peers that reacted to or interacted with a specific story */ - reactions: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - /** If set, indicates the next offset to use to load more results by invoking [stories.getStoryReactionsList](https://core.telegram.org/method/stories.getStoryReactionsList). */ - next_offset?: string; - - protected get [id](): number { - return 0xAA5F789C; - } - - static get [name](): string { - return "stories.storyReactionsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["count", "number", "int"], - ["reactions", [_StoryReaction_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ["next_offset", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.count, "number", "int"], - [this.reactions, [_StoryReaction_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - [this.next_offset ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { count: number; reactions: Array; chats: Array; users: Array; next_offset?: string }) { - super(); - this.count = params.count; - this.reactions = params.reactions; - this.chats = params.chats; - this.users = params.users; - this.next_offset = params.next_offset; - } -} - -/** Represents a [saved dialog »](https://core.telegram.org/api/saved-messages). */ -export class SavedDialog_ extends _SavedDialog_ { - /** Is the dialog pinned */ - pinned?: true; - /** The dialog */ - peer: enums.Peer; - /** The latest message ID */ - top_message: number; - - protected get [id](): number { - return 0xBD87CB6C; - } - - static get [name](): string { - return "savedDialog" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.2?true"], - ["peer", _Peer_, "Peer"], - ["top_message", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.2?true"], - [this.peer, _Peer_, "Peer"], - [this.top_message, "number", "int"], - ]; - } - - constructor(params: { pinned?: true; peer: enums.Peer; top_message: number }) { - super(); - this.pinned = params.pinned; - this.peer = params.peer; - this.top_message = params.top_message; - } -} - -/** Represents some [saved message dialogs »](https://core.telegram.org/api/saved-messages). */ -export class messages_SavedDialogs_ extends _messages_SavedDialogs_ { - /** [Saved message dialogs »](https://core.telegram.org/api/saved-messages). */ - dialogs: Array; - /** List of last messages from each saved dialog */ - messages: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0xF83AE221; - } - - static get [name](): string { - return "messages.savedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dialogs", [_SavedDialog_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.dialogs, [_SavedDialog_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { dialogs: Array; messages: Array; chats: Array; users: Array }) { - super(); - this.dialogs = params.dialogs; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** Incomplete list of [saved message dialogs »](https://core.telegram.org/api/saved-messages) with messages and auxiliary data. */ -export class messages_SavedDialogsSlice_ extends _messages_SavedDialogs_ { - /** Total number of saved message dialogs */ - count: number; - /** List of saved message dialogs */ - dialogs: Array; - /** List of last messages from dialogs */ - messages: Array; - /** Mentioned chats */ - chats: Array; - /** Mentioned users */ - users: Array; - - protected get [id](): number { - return 0x44BA9DD9; - } - - static get [name](): string { - return "messages.savedDialogsSlice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["dialogs", [_SavedDialog_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.dialogs, [_SavedDialog_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { count: number; dialogs: Array; messages: Array; chats: Array; users: Array }) { - super(); - this.count = params.count; - this.dialogs = params.dialogs; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -/** The saved dialogs haven't changed */ -export class messages_SavedDialogsNotModified_ extends _messages_SavedDialogs_ { - /** Number of [saved dialogs](https://core.telegram.org/api/saved-messages) found server-side by the query */ - count: number; - - protected get [id](): number { - return 0xC01F6FE8; - } - - static get [name](): string { - return "messages.savedDialogsNotModified" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - ]; - } - - constructor(params: { count: number }) { - super(); - this.count = params.count; - } -} - -export class SavedReactionTag_ extends _SavedReactionTag_ { - reaction: enums.Reaction; - title?: string; - count: number; - - protected get [id](): number { - return 0xCB6FF828; - } - - static get [name](): string { - return "savedReactionTag" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reaction", _Reaction_, "Reaction"], - ["title", "string", "flags.0?string"], - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reaction, _Reaction_, "Reaction"], - [this.title ?? null, "string", "flags.0?string"], - [this.count, "number", "int"], - ]; - } - - constructor(params: { reaction: enums.Reaction; title?: string; count: number }) { - super(); - this.reaction = params.reaction; - this.title = params.title; - this.count = params.count; - } -} - -export class messages_SavedReactionTagsNotModified_ extends _messages_SavedReactionTags_ { - protected get [id](): number { - return 0x889B59EF; - } - - static get [name](): string { - return "messages.savedReactionTagsNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class messages_SavedReactionTags_ extends _messages_SavedReactionTags_ { - tags: Array; - hash: bigint; - - protected get [id](): number { - return 0x3259950A; - } - - static get [name](): string { - return "messages.savedReactionTags" - } - - static get [paramDesc](): ParamDesc { - return [ - ["tags", [_SavedReactionTag_], "Vector"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.tags, [_SavedReactionTag_], "Vector"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { tags: Array; hash: bigint }) { - super(); - this.tags = params.tags; - this.hash = params.hash; - } -} - -export class OutboxReadDate_ extends _OutboxReadDate_ { - date: number; - - protected get [id](): number { - return 0x3BB842AC; - } - - static get [name](): string { - return "outboxReadDate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.date, "number", "int"], - ]; - } - - constructor(params: { date: number }) { - super(); - this.date = params.date; - } -} - -export class smsjobs_EligibleToJoin_ extends _smsjobs_EligibilityToJoin_ { - terms_url: string; - monthly_sent_sms: number; - - protected get [id](): number { - return 0xDC8B44CF; - } - - static get [name](): string { - return "smsjobs.eligibleToJoin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["terms_url", "string", "string"], - ["monthly_sent_sms", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.terms_url, "string", "string"], - [this.monthly_sent_sms, "number", "int"], - ]; - } - - constructor(params: { terms_url: string; monthly_sent_sms: number }) { - super(); - this.terms_url = params.terms_url; - this.monthly_sent_sms = params.monthly_sent_sms; - } -} - -export class smsjobs_Status_ extends _smsjobs_Status_ { - allow_international?: true; - recent_sent: number; - recent_since: number; - recent_remains: number; - total_sent: number; - total_since: number; - last_gift_slug?: string; - terms_url: string; - - protected get [id](): number { - return 0x2AEE9191; - } - - static get [name](): string { - return "smsjobs.status" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["allow_international", "true", "flags.0?true"], - ["recent_sent", "number", "int"], - ["recent_since", "number", "int"], - ["recent_remains", "number", "int"], - ["total_sent", "number", "int"], - ["total_since", "number", "int"], - ["last_gift_slug", "string", "flags.1?string"], - ["terms_url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.allow_international ?? null, "true", "flags.0?true"], - [this.recent_sent, "number", "int"], - [this.recent_since, "number", "int"], - [this.recent_remains, "number", "int"], - [this.total_sent, "number", "int"], - [this.total_since, "number", "int"], - [this.last_gift_slug ?? null, "string", "flags.1?string"], - [this.terms_url, "string", "string"], - ]; - } - - constructor(params: { allow_international?: true; recent_sent: number; recent_since: number; recent_remains: number; total_sent: number; total_since: number; last_gift_slug?: string; terms_url: string }) { - super(); - this.allow_international = params.allow_international; - this.recent_sent = params.recent_sent; - this.recent_since = params.recent_since; - this.recent_remains = params.recent_remains; - this.total_sent = params.total_sent; - this.total_since = params.total_since; - this.last_gift_slug = params.last_gift_slug; - this.terms_url = params.terms_url; - } -} - -export class SmsJob_ extends _SmsJob_ { - job_id: string; - phone_number: string; - text: string; - - protected get [id](): number { - return 0xE6A1EEB8; - } - - static get [name](): string { - return "smsJob" - } - - static get [paramDesc](): ParamDesc { - return [ - ["job_id", "string", "string"], - ["phone_number", "string", "string"], - ["text", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.job_id, "string", "string"], - [this.phone_number, "string", "string"], - [this.text, "string", "string"], - ]; - } - - constructor(params: { job_id: string; phone_number: string; text: string }) { - super(); - this.job_id = params.job_id; - this.phone_number = params.phone_number; - this.text = params.text; - } -} - -export class BusinessWeeklyOpen_ extends _BusinessWeeklyOpen_ { - start_minute: number; - end_minute: number; - - protected get [id](): number { - return 0x120B1AB9; - } - - static get [name](): string { - return "businessWeeklyOpen" - } - - static get [paramDesc](): ParamDesc { - return [ - ["start_minute", "number", "int"], - ["end_minute", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.start_minute, "number", "int"], - [this.end_minute, "number", "int"], - ]; - } - - constructor(params: { start_minute: number; end_minute: number }) { - super(); - this.start_minute = params.start_minute; - this.end_minute = params.end_minute; - } -} - -export class BusinessWorkHours_ extends _BusinessWorkHours_ { - open_now?: true; - timezone_id: string; - weekly_open: Array; - - protected get [id](): number { - return 0x8C92B098; - } - - static get [name](): string { - return "businessWorkHours" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["open_now", "true", "flags.0?true"], - ["timezone_id", "string", "string"], - ["weekly_open", [_BusinessWeeklyOpen_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.open_now ?? null, "true", "flags.0?true"], - [this.timezone_id, "string", "string"], - [this.weekly_open, [_BusinessWeeklyOpen_], "Vector"], - ]; - } - - constructor(params: { open_now?: true; timezone_id: string; weekly_open: Array }) { - super(); - this.open_now = params.open_now; - this.timezone_id = params.timezone_id; - this.weekly_open = params.weekly_open; - } -} - -export class BusinessLocation_ extends _BusinessLocation_ { - geo_point?: enums.GeoPoint; - address: string; - - protected get [id](): number { - return 0xAC5C1AF7; - } - - static get [name](): string { - return "businessLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo_point", _GeoPoint_, "flags.0?GeoPoint"], - ["address", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo_point ?? null, _GeoPoint_, "flags.0?GeoPoint"], - [this.address, "string", "string"], - ]; - } - - constructor(params: { geo_point?: enums.GeoPoint; address: string }) { - super(); - this.geo_point = params.geo_point; - this.address = params.address; - } -} - -export class InputBusinessRecipients_ extends _InputBusinessRecipients_ { - existing_chats?: true; - new_chats?: true; - contacts?: true; - non_contacts?: true; - exclude_selected?: true; - users?: Array; - - protected get [id](): number { - return 0x6F8B32AA; - } - - static get [name](): string { - return "inputBusinessRecipients" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["existing_chats", "true", "flags.0?true"], - ["new_chats", "true", "flags.1?true"], - ["contacts", "true", "flags.2?true"], - ["non_contacts", "true", "flags.3?true"], - ["exclude_selected", "true", "flags.5?true"], - ["users", [_InputUser_], "flags.4?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.existing_chats ?? null, "true", "flags.0?true"], - [this.new_chats ?? null, "true", "flags.1?true"], - [this.contacts ?? null, "true", "flags.2?true"], - [this.non_contacts ?? null, "true", "flags.3?true"], - [this.exclude_selected ?? null, "true", "flags.5?true"], - [this.users ?? null, [_InputUser_], "flags.4?Vector"], - ]; - } - - constructor(params?: { existing_chats?: true; new_chats?: true; contacts?: true; non_contacts?: true; exclude_selected?: true; users?: Array }) { - super(); - this.existing_chats = params?.existing_chats; - this.new_chats = params?.new_chats; - this.contacts = params?.contacts; - this.non_contacts = params?.non_contacts; - this.exclude_selected = params?.exclude_selected; - this.users = params?.users; - } -} - -export class BusinessRecipients_ extends _BusinessRecipients_ { - existing_chats?: true; - new_chats?: true; - contacts?: true; - non_contacts?: true; - exclude_selected?: true; - users?: Array; - - protected get [id](): number { - return 0x21108FF7; - } - - static get [name](): string { - return "businessRecipients" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["existing_chats", "true", "flags.0?true"], - ["new_chats", "true", "flags.1?true"], - ["contacts", "true", "flags.2?true"], - ["non_contacts", "true", "flags.3?true"], - ["exclude_selected", "true", "flags.5?true"], - ["users", ["bigint"], "flags.4?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.existing_chats ?? null, "true", "flags.0?true"], - [this.new_chats ?? null, "true", "flags.1?true"], - [this.contacts ?? null, "true", "flags.2?true"], - [this.non_contacts ?? null, "true", "flags.3?true"], - [this.exclude_selected ?? null, "true", "flags.5?true"], - [this.users ?? null, ["bigint"], "flags.4?Vector"], - ]; - } - - constructor(params?: { existing_chats?: true; new_chats?: true; contacts?: true; non_contacts?: true; exclude_selected?: true; users?: Array }) { - super(); - this.existing_chats = params?.existing_chats; - this.new_chats = params?.new_chats; - this.contacts = params?.contacts; - this.non_contacts = params?.non_contacts; - this.exclude_selected = params?.exclude_selected; - this.users = params?.users; - } -} - -export class BusinessAwayMessageScheduleAlways_ extends _BusinessAwayMessageSchedule_ { - protected get [id](): number { - return 0xC9B9E2B9; - } - - static get [name](): string { - return "businessAwayMessageScheduleAlways" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class BusinessAwayMessageScheduleOutsideWorkHours_ extends _BusinessAwayMessageSchedule_ { - protected get [id](): number { - return 0xC3F2F501; - } - - static get [name](): string { - return "businessAwayMessageScheduleOutsideWorkHours" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class BusinessAwayMessageScheduleCustom_ extends _BusinessAwayMessageSchedule_ { - start_date: number; - end_date: number; - - protected get [id](): number { - return 0xCC4D9ECC; - } - - static get [name](): string { - return "businessAwayMessageScheduleCustom" - } - - static get [paramDesc](): ParamDesc { - return [ - ["start_date", "number", "int"], - ["end_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.start_date, "number", "int"], - [this.end_date, "number", "int"], - ]; - } - - constructor(params: { start_date: number; end_date: number }) { - super(); - this.start_date = params.start_date; - this.end_date = params.end_date; - } -} - -export class InputBusinessGreetingMessage_ extends _InputBusinessGreetingMessage_ { - shortcut_id: number; - recipients: enums.InputBusinessRecipients; - no_activity_days: number; - - protected get [id](): number { - return 0x0194CB3B; - } - - static get [name](): string { - return "inputBusinessGreetingMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ["recipients", _InputBusinessRecipients_, "InputBusinessRecipients"], - ["no_activity_days", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - [this.recipients, _InputBusinessRecipients_, "InputBusinessRecipients"], - [this.no_activity_days, "number", "int"], - ]; - } - - constructor(params: { shortcut_id: number; recipients: enums.InputBusinessRecipients; no_activity_days: number }) { - super(); - this.shortcut_id = params.shortcut_id; - this.recipients = params.recipients; - this.no_activity_days = params.no_activity_days; - } -} - -export class BusinessGreetingMessage_ extends _BusinessGreetingMessage_ { - shortcut_id: number; - recipients: enums.BusinessRecipients; - no_activity_days: number; - - protected get [id](): number { - return 0xE519ABAB; - } - - static get [name](): string { - return "businessGreetingMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ["recipients", _BusinessRecipients_, "BusinessRecipients"], - ["no_activity_days", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - [this.recipients, _BusinessRecipients_, "BusinessRecipients"], - [this.no_activity_days, "number", "int"], - ]; - } - - constructor(params: { shortcut_id: number; recipients: enums.BusinessRecipients; no_activity_days: number }) { - super(); - this.shortcut_id = params.shortcut_id; - this.recipients = params.recipients; - this.no_activity_days = params.no_activity_days; - } -} - -export class InputBusinessAwayMessage_ extends _InputBusinessAwayMessage_ { - offline_only?: true; - shortcut_id: number; - schedule: enums.BusinessAwayMessageSchedule; - recipients: enums.InputBusinessRecipients; - - protected get [id](): number { - return 0x832175E0; - } - - static get [name](): string { - return "inputBusinessAwayMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["offline_only", "true", "flags.0?true"], - ["shortcut_id", "number", "int"], - ["schedule", _BusinessAwayMessageSchedule_, "BusinessAwayMessageSchedule"], - ["recipients", _InputBusinessRecipients_, "InputBusinessRecipients"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.offline_only ?? null, "true", "flags.0?true"], - [this.shortcut_id, "number", "int"], - [this.schedule, _BusinessAwayMessageSchedule_, "BusinessAwayMessageSchedule"], - [this.recipients, _InputBusinessRecipients_, "InputBusinessRecipients"], - ]; - } - - constructor(params: { offline_only?: true; shortcut_id: number; schedule: enums.BusinessAwayMessageSchedule; recipients: enums.InputBusinessRecipients }) { - super(); - this.offline_only = params.offline_only; - this.shortcut_id = params.shortcut_id; - this.schedule = params.schedule; - this.recipients = params.recipients; - } -} - -export class BusinessAwayMessage_ extends _BusinessAwayMessage_ { - offline_only?: true; - shortcut_id: number; - schedule: enums.BusinessAwayMessageSchedule; - recipients: enums.BusinessRecipients; - - protected get [id](): number { - return 0xEF156A5C; - } - - static get [name](): string { - return "businessAwayMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["offline_only", "true", "flags.0?true"], - ["shortcut_id", "number", "int"], - ["schedule", _BusinessAwayMessageSchedule_, "BusinessAwayMessageSchedule"], - ["recipients", _BusinessRecipients_, "BusinessRecipients"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.offline_only ?? null, "true", "flags.0?true"], - [this.shortcut_id, "number", "int"], - [this.schedule, _BusinessAwayMessageSchedule_, "BusinessAwayMessageSchedule"], - [this.recipients, _BusinessRecipients_, "BusinessRecipients"], - ]; - } - - constructor(params: { offline_only?: true; shortcut_id: number; schedule: enums.BusinessAwayMessageSchedule; recipients: enums.BusinessRecipients }) { - super(); - this.offline_only = params.offline_only; - this.shortcut_id = params.shortcut_id; - this.schedule = params.schedule; - this.recipients = params.recipients; - } -} - -export class Timezone_ extends _Timezone_ { - id: string; - name: string; - utc_offset: number; - - protected get [id](): number { - return 0xFF9289F5; - } - - static get [name](): string { - return "timezone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "string", "string"], - ["name", "string", "string"], - ["utc_offset", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "string", "string"], - [this.name, "string", "string"], - [this.utc_offset, "number", "int"], - ]; - } - - constructor(params: { id: string; name: string; utc_offset: number }) { - super(); - this.id = params.id; - this.name = params.name; - this.utc_offset = params.utc_offset; - } -} - -export class help_TimezonesListNotModified_ extends _help_TimezonesList_ { - protected get [id](): number { - return 0x970708CC; - } - - static get [name](): string { - return "help.timezonesListNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class help_TimezonesList_ extends _help_TimezonesList_ { - timezones: Array; - hash: number; - - protected get [id](): number { - return 0x7B74ED71; - } - - static get [name](): string { - return "help.timezonesList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["timezones", [_Timezone_], "Vector"], - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.timezones, [_Timezone_], "Vector"], - [this.hash, "number", "int"], - ]; - } - - constructor(params: { timezones: Array; hash: number }) { - super(); - this.timezones = params.timezones; - this.hash = params.hash; - } -} - -export class QuickReply_ extends _QuickReply_ { - shortcut_id: number; - shortcut: string; - top_message: number; - count: number; - - protected get [id](): number { - return 0x0697102B; - } - - static get [name](): string { - return "quickReply" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ["shortcut", "string", "string"], - ["top_message", "number", "int"], - ["count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - [this.shortcut, "string", "string"], - [this.top_message, "number", "int"], - [this.count, "number", "int"], - ]; - } - - constructor(params: { shortcut_id: number; shortcut: string; top_message: number; count: number }) { - super(); - this.shortcut_id = params.shortcut_id; - this.shortcut = params.shortcut; - this.top_message = params.top_message; - this.count = params.count; - } -} - -export class InputQuickReplyShortcut_ extends _InputQuickReplyShortcut_ { - shortcut: string; - - protected get [id](): number { - return 0x24596D41; - } - - static get [name](): string { - return "inputQuickReplyShortcut" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut, "string", "string"], - ]; - } - - constructor(params: { shortcut: string }) { - super(); - this.shortcut = params.shortcut; - } -} - -export class InputQuickReplyShortcutId_ extends _InputQuickReplyShortcut_ { - shortcut_id: number; - - protected get [id](): number { - return 0x01190CF1; - } - - static get [name](): string { - return "inputQuickReplyShortcutId" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - ]; - } - - constructor(params: { shortcut_id: number }) { - super(); - this.shortcut_id = params.shortcut_id; - } -} - -export class messages_QuickReplies_ extends _messages_QuickReplies_ { - quick_replies: Array; - messages: Array; - chats: Array; - users: Array; - - protected get [id](): number { - return 0xC68D6695; - } - - static get [name](): string { - return "messages.quickReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["quick_replies", [_QuickReply_], "Vector"], - ["messages", [_Message_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.quick_replies, [_QuickReply_], "Vector"], - [this.messages, [_Message_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { quick_replies: Array; messages: Array; chats: Array; users: Array }) { - super(); - this.quick_replies = params.quick_replies; - this.messages = params.messages; - this.chats = params.chats; - this.users = params.users; - } -} - -export class messages_QuickRepliesNotModified_ extends _messages_QuickReplies_ { - protected get [id](): number { - return 0x5F91EB5B; - } - - static get [name](): string { - return "messages.quickRepliesNotModified" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class ConnectedBot_ extends _ConnectedBot_ { - can_reply?: true; - bot_id: bigint; - recipients: enums.BusinessBotRecipients; - - protected get [id](): number { - return 0xBD068601; - } - - static get [name](): string { - return "connectedBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_reply", "true", "flags.0?true"], - ["bot_id", "bigint", "long"], - ["recipients", _BusinessBotRecipients_, "BusinessBotRecipients"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_reply ?? null, "true", "flags.0?true"], - [this.bot_id, "bigint", "long"], - [this.recipients, _BusinessBotRecipients_, "BusinessBotRecipients"], - ]; - } - - constructor(params: { can_reply?: true; bot_id: bigint; recipients: enums.BusinessBotRecipients }) { - super(); - this.can_reply = params.can_reply; - this.bot_id = params.bot_id; - this.recipients = params.recipients; - } -} - -export class account_ConnectedBots_ extends _account_ConnectedBots_ { - connected_bots: Array; - users: Array; - - protected get [id](): number { - return 0x17D7F87B; - } - - static get [name](): string { - return "account.connectedBots" - } - - static get [paramDesc](): ParamDesc { - return [ - ["connected_bots", [_ConnectedBot_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.connected_bots, [_ConnectedBot_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { connected_bots: Array; users: Array }) { - super(); - this.connected_bots = params.connected_bots; - this.users = params.users; - } -} - -export class messages_DialogFilters_ extends _messages_DialogFilters_ { - tags_enabled?: true; - filters: Array; - - protected get [id](): number { - return 0x2AD93719; - } - - static get [name](): string { - return "messages.dialogFilters" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["tags_enabled", "true", "flags.0?true"], - ["filters", [_DialogFilter_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.tags_enabled ?? null, "true", "flags.0?true"], - [this.filters, [_DialogFilter_], "Vector"], - ]; - } - - constructor(params: { tags_enabled?: true; filters: Array }) { - super(); - this.tags_enabled = params.tags_enabled; - this.filters = params.filters; - } -} - -export class Birthday_ extends _Birthday_ { - day: number; - month: number; - year?: number; - - protected get [id](): number { - return 0x6C8E1E06; - } - - static get [name](): string { - return "birthday" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["day", "number", "int"], - ["month", "number", "int"], - ["year", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.day, "number", "int"], - [this.month, "number", "int"], - [this.year ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { day: number; month: number; year?: number }) { - super(); - this.day = params.day; - this.month = params.month; - this.year = params.year; - } -} - -export class BotBusinessConnection_ extends _BotBusinessConnection_ { - can_reply?: true; - disabled?: true; - connection_id: string; - user_id: bigint; - dc_id: number; - date: number; - - protected get [id](): number { - return 0x896433B4; - } - - static get [name](): string { - return "botBusinessConnection" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_reply", "true", "flags.0?true"], - ["disabled", "true", "flags.1?true"], - ["connection_id", "string", "string"], - ["user_id", "bigint", "long"], - ["dc_id", "number", "int"], - ["date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_reply ?? null, "true", "flags.0?true"], - [this.disabled ?? null, "true", "flags.1?true"], - [this.connection_id, "string", "string"], - [this.user_id, "bigint", "long"], - [this.dc_id, "number", "int"], - [this.date, "number", "int"], - ]; - } - - constructor(params: { can_reply?: true; disabled?: true; connection_id: string; user_id: bigint; dc_id: number; date: number }) { - super(); - this.can_reply = params.can_reply; - this.disabled = params.disabled; - this.connection_id = params.connection_id; - this.user_id = params.user_id; - this.dc_id = params.dc_id; - this.date = params.date; - } -} - -export class InputBusinessIntro_ extends _InputBusinessIntro_ { - title: string; - description: string; - sticker?: enums.InputDocument; - - protected get [id](): number { - return 0x09C469CD; - } - - static get [name](): string { - return "inputBusinessIntro" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["description", "string", "string"], - ["sticker", _InputDocument_, "flags.0?InputDocument"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.sticker ?? null, _InputDocument_, "flags.0?InputDocument"], - ]; - } - - constructor(params: { title: string; description: string; sticker?: enums.InputDocument }) { - super(); - this.title = params.title; - this.description = params.description; - this.sticker = params.sticker; - } -} - -export class BusinessIntro_ extends _BusinessIntro_ { - title: string; - description: string; - sticker?: enums.Document; - - protected get [id](): number { - return 0x5A0A066D; - } - - static get [name](): string { - return "businessIntro" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["title", "string", "string"], - ["description", "string", "string"], - ["sticker", _Document_, "flags.0?Document"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.title, "string", "string"], - [this.description, "string", "string"], - [this.sticker ?? null, _Document_, "flags.0?Document"], - ]; - } - - constructor(params: { title: string; description: string; sticker?: enums.Document }) { - super(); - this.title = params.title; - this.description = params.description; - this.sticker = params.sticker; - } -} - -export class messages_MyStickers_ extends _messages_MyStickers_ { - count: number; - sets: Array; - - protected get [id](): number { - return 0xFAFF629D; - } - - static get [name](): string { - return "messages.myStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["sets", [_StickerSetCovered_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.sets, [_StickerSetCovered_], "Vector"], - ]; - } - - constructor(params: { count: number; sets: Array }) { - super(); - this.count = params.count; - this.sets = params.sets; - } -} - -export class InputCollectibleUsername_ extends _InputCollectible_ { - username: string; - - protected get [id](): number { - return 0xE39460A9; - } - - static get [name](): string { - return "inputCollectibleUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.username, "string", "string"], - ]; - } - - constructor(params: { username: string }) { - super(); - this.username = params.username; - } -} - -export class InputCollectiblePhone_ extends _InputCollectible_ { - phone: string; - - protected get [id](): number { - return 0xA2E214A4; - } - - static get [name](): string { - return "inputCollectiblePhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone, "string", "string"], - ]; - } - - constructor(params: { phone: string }) { - super(); - this.phone = params.phone; - } -} - -export class fragment_CollectibleInfo_ extends _fragment_CollectibleInfo_ { - purchase_date: number; - currency: string; - amount: bigint; - crypto_currency: string; - crypto_amount: bigint; - url: string; - - protected get [id](): number { - return 0x6EBDFF91; - } - - static get [name](): string { - return "fragment.collectibleInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["purchase_date", "number", "int"], - ["currency", "string", "string"], - ["amount", "bigint", "long"], - ["crypto_currency", "string", "string"], - ["crypto_amount", "bigint", "long"], - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.purchase_date, "number", "int"], - [this.currency, "string", "string"], - [this.amount, "bigint", "long"], - [this.crypto_currency, "string", "string"], - [this.crypto_amount, "bigint", "long"], - [this.url, "string", "string"], - ]; - } - - constructor(params: { purchase_date: number; currency: string; amount: bigint; crypto_currency: string; crypto_amount: bigint; url: string }) { - super(); - this.purchase_date = params.purchase_date; - this.currency = params.currency; - this.amount = params.amount; - this.crypto_currency = params.crypto_currency; - this.crypto_amount = params.crypto_amount; - this.url = params.url; - } -} - -export class InputBusinessBotRecipients_ extends _InputBusinessBotRecipients_ { - existing_chats?: true; - new_chats?: true; - contacts?: true; - non_contacts?: true; - exclude_selected?: true; - users?: Array; - exclude_users?: Array; - - protected get [id](): number { - return 0xC4E5921E; - } - - static get [name](): string { - return "inputBusinessBotRecipients" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["existing_chats", "true", "flags.0?true"], - ["new_chats", "true", "flags.1?true"], - ["contacts", "true", "flags.2?true"], - ["non_contacts", "true", "flags.3?true"], - ["exclude_selected", "true", "flags.5?true"], - ["users", [_InputUser_], "flags.4?Vector"], - ["exclude_users", [_InputUser_], "flags.6?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.existing_chats ?? null, "true", "flags.0?true"], - [this.new_chats ?? null, "true", "flags.1?true"], - [this.contacts ?? null, "true", "flags.2?true"], - [this.non_contacts ?? null, "true", "flags.3?true"], - [this.exclude_selected ?? null, "true", "flags.5?true"], - [this.users ?? null, [_InputUser_], "flags.4?Vector"], - [this.exclude_users ?? null, [_InputUser_], "flags.6?Vector"], - ]; - } - - constructor(params?: { existing_chats?: true; new_chats?: true; contacts?: true; non_contacts?: true; exclude_selected?: true; users?: Array; exclude_users?: Array }) { - super(); - this.existing_chats = params?.existing_chats; - this.new_chats = params?.new_chats; - this.contacts = params?.contacts; - this.non_contacts = params?.non_contacts; - this.exclude_selected = params?.exclude_selected; - this.users = params?.users; - this.exclude_users = params?.exclude_users; - } -} - -export class BusinessBotRecipients_ extends _BusinessBotRecipients_ { - existing_chats?: true; - new_chats?: true; - contacts?: true; - non_contacts?: true; - exclude_selected?: true; - users?: Array; - exclude_users?: Array; - - protected get [id](): number { - return 0xB88CF373; - } - - static get [name](): string { - return "businessBotRecipients" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["existing_chats", "true", "flags.0?true"], - ["new_chats", "true", "flags.1?true"], - ["contacts", "true", "flags.2?true"], - ["non_contacts", "true", "flags.3?true"], - ["exclude_selected", "true", "flags.5?true"], - ["users", ["bigint"], "flags.4?Vector"], - ["exclude_users", ["bigint"], "flags.6?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.existing_chats ?? null, "true", "flags.0?true"], - [this.new_chats ?? null, "true", "flags.1?true"], - [this.contacts ?? null, "true", "flags.2?true"], - [this.non_contacts ?? null, "true", "flags.3?true"], - [this.exclude_selected ?? null, "true", "flags.5?true"], - [this.users ?? null, ["bigint"], "flags.4?Vector"], - [this.exclude_users ?? null, ["bigint"], "flags.6?Vector"], - ]; - } - - constructor(params?: { existing_chats?: true; new_chats?: true; contacts?: true; non_contacts?: true; exclude_selected?: true; users?: Array; exclude_users?: Array }) { - super(); - this.existing_chats = params?.existing_chats; - this.new_chats = params?.new_chats; - this.contacts = params?.contacts; - this.non_contacts = params?.non_contacts; - this.exclude_selected = params?.exclude_selected; - this.users = params?.users; - this.exclude_users = params?.exclude_users; - } -} - -export class ContactBirthday_ extends _ContactBirthday_ { - contact_id: bigint; - birthday: enums.Birthday; - - protected get [id](): number { - return 0x1D998733; - } - - static get [name](): string { - return "contactBirthday" - } - - static get [paramDesc](): ParamDesc { - return [ - ["contact_id", "bigint", "long"], - ["birthday", _Birthday_, "Birthday"], - ]; - } - - protected get [params](): Params { - return [ - [this.contact_id, "bigint", "long"], - [this.birthday, _Birthday_, "Birthday"], - ]; - } - - constructor(params: { contact_id: bigint; birthday: enums.Birthday }) { - super(); - this.contact_id = params.contact_id; - this.birthday = params.birthday; - } -} - -export class contacts_ContactBirthdays_ extends _contacts_ContactBirthdays_ { - contacts: Array; - users: Array; - - protected get [id](): number { - return 0x114FF30D; - } - - static get [name](): string { - return "contacts.contactBirthdays" - } - - static get [paramDesc](): ParamDesc { - return [ - ["contacts", [_ContactBirthday_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.contacts, [_ContactBirthday_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { contacts: Array; users: Array }) { - super(); - this.contacts = params.contacts; - this.users = params.users; - } -} - -export class MissingInvitee_ extends _MissingInvitee_ { - premium_would_allow_invite?: true; - premium_required_for_pm?: true; - user_id: bigint; - - protected get [id](): number { - return 0x628C9224; - } - - static get [name](): string { - return "missingInvitee" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["premium_would_allow_invite", "true", "flags.0?true"], - ["premium_required_for_pm", "true", "flags.1?true"], - ["user_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.premium_would_allow_invite ?? null, "true", "flags.0?true"], - [this.premium_required_for_pm ?? null, "true", "flags.1?true"], - [this.user_id, "bigint", "long"], - ]; - } - - constructor(params: { premium_would_allow_invite?: true; premium_required_for_pm?: true; user_id: bigint }) { - super(); - this.premium_would_allow_invite = params.premium_would_allow_invite; - this.premium_required_for_pm = params.premium_required_for_pm; - this.user_id = params.user_id; - } -} - -export class messages_InvitedUsers_ extends _messages_InvitedUsers_ { - updates: enums.Updates; - missing_invitees: Array; - - protected get [id](): number { - return 0x7F5DEFA6; - } - - static get [name](): string { - return "messages.invitedUsers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["updates", _Updates_, "Updates"], - ["missing_invitees", [_MissingInvitee_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.updates, _Updates_, "Updates"], - [this.missing_invitees, [_MissingInvitee_], "Vector"], - ]; - } - - constructor(params: { updates: enums.Updates; missing_invitees: Array }) { - super(); - this.updates = params.updates; - this.missing_invitees = params.missing_invitees; - } -} - -export class InputBusinessChatLink_ extends _InputBusinessChatLink_ { - message: string; - entities?: Array; - title?: string; - - protected get [id](): number { - return 0x11679FA7; - } - - static get [name](): string { - return "inputBusinessChatLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.0?Vector"], - ["title", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.0?Vector"], - [this.title ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { message: string; entities?: Array; title?: string }) { - super(); - this.message = params.message; - this.entities = params.entities; - this.title = params.title; - } -} - -export class BusinessChatLink_ extends _BusinessChatLink_ { - link: string; - message: string; - entities?: Array; - title?: string; - views: number; - - protected get [id](): number { - return 0xB4AE666F; - } - - static get [name](): string { - return "businessChatLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["link", "string", "string"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.0?Vector"], - ["title", "string", "flags.1?string"], - ["views", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.link, "string", "string"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.0?Vector"], - [this.title ?? null, "string", "flags.1?string"], - [this.views, "number", "int"], - ]; - } - - constructor(params: { link: string; message: string; entities?: Array; title?: string; views: number }) { - super(); - this.link = params.link; - this.message = params.message; - this.entities = params.entities; - this.title = params.title; - this.views = params.views; - } -} - -export class account_BusinessChatLinks_ extends _account_BusinessChatLinks_ { - links: Array; - chats: Array; - users: Array; - - protected get [id](): number { - return 0xEC43A2D1; - } - - static get [name](): string { - return "account.businessChatLinks" - } - - static get [paramDesc](): ParamDesc { - return [ - ["links", [_BusinessChatLink_], "Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.links, [_BusinessChatLink_], "Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { links: Array; chats: Array; users: Array }) { - super(); - this.links = params.links; - this.chats = params.chats; - this.users = params.users; - } -} - -export class account_ResolvedBusinessChatLinks_ extends _account_ResolvedBusinessChatLinks_ { - peer: enums.Peer; - message: string; - entities?: Array; - chats: Array; - users: Array; - - protected get [id](): number { - return 0x9A23AF21; - } - - static get [name](): string { - return "account.resolvedBusinessChatLinks" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", _Peer_, "Peer"], - ["message", "string", "string"], - ["entities", [_MessageEntity_], "flags.0?Vector"], - ["chats", [_Chat_], "Vector"], - ["users", [_User_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, _Peer_, "Peer"], - [this.message, "string", "string"], - [this.entities ?? null, [_MessageEntity_], "flags.0?Vector"], - [this.chats, [_Chat_], "Vector"], - [this.users, [_User_], "Vector"], - ]; - } - - constructor(params: { peer: enums.Peer; message: string; entities?: Array; chats: Array; users: Array }) { - super(); - this.peer = params.peer; - this.message = params.message; - this.entities = params.entities; - this.chats = params.chats; - this.users = params.users; - } -} - -export class RequestedPeerUser_ extends _RequestedPeer_ { - user_id: bigint; - first_name?: string; - last_name?: string; - username?: string; - photo?: enums.Photo; - - protected get [id](): number { - return 0xD62FF46A; - } - - static get [name](): string { - return "requestedPeerUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["user_id", "bigint", "long"], - ["first_name", "string", "flags.0?string"], - ["last_name", "string", "flags.0?string"], - ["username", "string", "flags.1?string"], - ["photo", _Photo_, "flags.2?Photo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.user_id, "bigint", "long"], - [this.first_name ?? null, "string", "flags.0?string"], - [this.last_name ?? null, "string", "flags.0?string"], - [this.username ?? null, "string", "flags.1?string"], - [this.photo ?? null, _Photo_, "flags.2?Photo"], - ]; - } - - constructor(params: { user_id: bigint; first_name?: string; last_name?: string; username?: string; photo?: enums.Photo }) { - super(); - this.user_id = params.user_id; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.username = params.username; - this.photo = params.photo; - } -} - -export class RequestedPeerChat_ extends _RequestedPeer_ { - chat_id: bigint; - title?: string; - photo?: enums.Photo; - - protected get [id](): number { - return 0x7307544F; - } - - static get [name](): string { - return "requestedPeerChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["chat_id", "bigint", "long"], - ["title", "string", "flags.0?string"], - ["photo", _Photo_, "flags.2?Photo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.chat_id, "bigint", "long"], - [this.title ?? null, "string", "flags.0?string"], - [this.photo ?? null, _Photo_, "flags.2?Photo"], - ]; - } - - constructor(params: { chat_id: bigint; title?: string; photo?: enums.Photo }) { - super(); - this.chat_id = params.chat_id; - this.title = params.title; - this.photo = params.photo; - } -} - -export class RequestedPeerChannel_ extends _RequestedPeer_ { - channel_id: bigint; - title?: string; - username?: string; - photo?: enums.Photo; - - protected get [id](): number { - return 0x8BA403E4; - } - - static get [name](): string { - return "requestedPeerChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel_id", "bigint", "long"], - ["title", "string", "flags.0?string"], - ["username", "string", "flags.1?string"], - ["photo", _Photo_, "flags.2?Photo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel_id, "bigint", "long"], - [this.title ?? null, "string", "flags.0?string"], - [this.username ?? null, "string", "flags.1?string"], - [this.photo ?? null, _Photo_, "flags.2?Photo"], - ]; - } - - constructor(params: { channel_id: bigint; title?: string; username?: string; photo?: enums.Photo }) { - super(); - this.channel_id = params.channel_id; - this.title = params.title; - this.username = params.username; - this.photo = params.photo; - } -} - -export class SponsoredMessageReportOption_ extends _SponsoredMessageReportOption_ { - text: string; - option: Uint8Array; - - protected get [id](): number { - return 0x430D3150; - } - - static get [name](): string { - return "sponsoredMessageReportOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["text", "string", "string"], - ["option", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.text, "string", "string"], - [this.option, Uint8Array, "bytes"], - ]; - } - - constructor(params: { text: string; option: Uint8Array }) { - super(); - this.text = params.text; - this.option = params.option; - } -} - -export class channels_SponsoredMessageReportResultChooseOption_ extends _channels_SponsoredMessageReportResult_ { - title: string; - options: Array; - - protected get [id](): number { - return 0x846F9E42; - } - - static get [name](): string { - return "channels.sponsoredMessageReportResultChooseOption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ["options", [_SponsoredMessageReportOption_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - [this.options, [_SponsoredMessageReportOption_], "Vector"], - ]; - } - - constructor(params: { title: string; options: Array }) { - super(); - this.title = params.title; - this.options = params.options; - } -} - -export class channels_SponsoredMessageReportResultAdsHidden_ extends _channels_SponsoredMessageReportResult_ { - protected get [id](): number { - return 0x3E3BCF2F; - } - - static get [name](): string { - return "channels.sponsoredMessageReportResultAdsHidden" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class channels_SponsoredMessageReportResultReported_ extends _channels_SponsoredMessageReportResult_ { - protected get [id](): number { - return 0xAD798849; - } - - static get [name](): string { - return "channels.sponsoredMessageReportResultReported" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class stats_BroadcastRevenueStats_ extends _stats_BroadcastRevenueStats_ { - top_hours_graph: enums.StatsGraph; - revenue_graph: enums.StatsGraph; - current_balance: bigint; - available_balance: bigint; - overall_revenue: bigint; - usd_rate: number; - - protected get [id](): number { - return 0xD07B4BAD; - } - - static get [name](): string { - return "stats.broadcastRevenueStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["top_hours_graph", _StatsGraph_, "StatsGraph"], - ["revenue_graph", _StatsGraph_, "StatsGraph"], - ["current_balance", "bigint", "long"], - ["available_balance", "bigint", "long"], - ["overall_revenue", "bigint", "long"], - ["usd_rate", "number", "double"], - ]; - } - - protected get [params](): Params { - return [ - [this.top_hours_graph, _StatsGraph_, "StatsGraph"], - [this.revenue_graph, _StatsGraph_, "StatsGraph"], - [this.current_balance, "bigint", "long"], - [this.available_balance, "bigint", "long"], - [this.overall_revenue, "bigint", "long"], - [this.usd_rate, "number", "double"], - ]; - } - - constructor(params: { top_hours_graph: enums.StatsGraph; revenue_graph: enums.StatsGraph; current_balance: bigint; available_balance: bigint; overall_revenue: bigint; usd_rate: number }) { - super(); - this.top_hours_graph = params.top_hours_graph; - this.revenue_graph = params.revenue_graph; - this.current_balance = params.current_balance; - this.available_balance = params.available_balance; - this.overall_revenue = params.overall_revenue; - this.usd_rate = params.usd_rate; - } -} - -export class stats_BroadcastRevenueWithdrawalUrl_ extends _stats_BroadcastRevenueWithdrawalUrl_ { - url: string; - - protected get [id](): number { - return 0xEC659737; - } - - static get [name](): string { - return "stats.broadcastRevenueWithdrawalUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - ]; - } - - constructor(params: { url: string }) { - super(); - this.url = params.url; - } -} - -export class BroadcastRevenueTransactionProceeds_ extends _BroadcastRevenueTransaction_ { - amount: bigint; - from_date: number; - to_date: number; - - protected get [id](): number { - return 0x557E2CC4; - } - - static get [name](): string { - return "broadcastRevenueTransactionProceeds" - } - - static get [paramDesc](): ParamDesc { - return [ - ["amount", "bigint", "long"], - ["from_date", "number", "int"], - ["to_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.amount, "bigint", "long"], - [this.from_date, "number", "int"], - [this.to_date, "number", "int"], - ]; - } - - constructor(params: { amount: bigint; from_date: number; to_date: number }) { - super(); - this.amount = params.amount; - this.from_date = params.from_date; - this.to_date = params.to_date; - } -} - -export class BroadcastRevenueTransactionWithdrawal_ extends _BroadcastRevenueTransaction_ { - pending?: true; - failed?: true; - amount: bigint; - date: number; - provider: string; - transaction_date?: number; - transaction_url?: string; - - protected get [id](): number { - return 0x5A590978; - } - - static get [name](): string { - return "broadcastRevenueTransactionWithdrawal" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pending", "true", "flags.0?true"], - ["failed", "true", "flags.2?true"], - ["amount", "bigint", "long"], - ["date", "number", "int"], - ["provider", "string", "string"], - ["transaction_date", "number", "flags.1?int"], - ["transaction_url", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pending ?? null, "true", "flags.0?true"], - [this.failed ?? null, "true", "flags.2?true"], - [this.amount, "bigint", "long"], - [this.date, "number", "int"], - [this.provider, "string", "string"], - [this.transaction_date ?? null, "number", "flags.1?int"], - [this.transaction_url ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { pending?: true; failed?: true; amount: bigint; date: number; provider: string; transaction_date?: number; transaction_url?: string }) { - super(); - this.pending = params.pending; - this.failed = params.failed; - this.amount = params.amount; - this.date = params.date; - this.provider = params.provider; - this.transaction_date = params.transaction_date; - this.transaction_url = params.transaction_url; - } -} - -export class BroadcastRevenueTransactionRefund_ extends _BroadcastRevenueTransaction_ { - amount: bigint; - date: number; - provider: string; - - protected get [id](): number { - return 0x42D30D2E; - } - - static get [name](): string { - return "broadcastRevenueTransactionRefund" - } - - static get [paramDesc](): ParamDesc { - return [ - ["amount", "bigint", "long"], - ["date", "number", "int"], - ["provider", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.amount, "bigint", "long"], - [this.date, "number", "int"], - [this.provider, "string", "string"], - ]; - } - - constructor(params: { amount: bigint; date: number; provider: string }) { - super(); - this.amount = params.amount; - this.date = params.date; - this.provider = params.provider; - } -} - -export class stats_BroadcastRevenueTransactions_ extends _stats_BroadcastRevenueTransactions_ { - count: number; - transactions: Array; - - protected get [id](): number { - return 0x87158466; - } - - static get [name](): string { - return "stats.broadcastRevenueTransactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["count", "number", "int"], - ["transactions", [_BroadcastRevenueTransaction_], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.count, "number", "int"], - [this.transactions, [_BroadcastRevenueTransaction_], "Vector"], - ]; - } - - constructor(params: { count: number; transactions: Array }) { - super(); - this.count = params.count; - this.transactions = params.transactions; - } -} - -export const types = { - Type: Type_, - TypeX: TypeX_, - _ResPQ: _ResPQ_, - _P_Q_inner_data: _P_Q_inner_data_, - _Server_DH_Params: _Server_DH_Params_, - _Server_DH_inner_data: _Server_DH_inner_data_, - _Client_DH_Inner_Data: _Client_DH_Inner_Data_, - _Set_client_DH_params_answer: _Set_client_DH_params_answer_, - _BindAuthKeyInner: _BindAuthKeyInner_, - _RpcError: _RpcError_, - _RpcDropAnswer: _RpcDropAnswer_, - _FutureSalt: _FutureSalt_, - _FutureSalts: _FutureSalts_, - _Pong: _Pong_, - _DestroySessionRes: _DestroySessionRes_, - _NewSession: _NewSession_, - _Object: _Object_, - _MsgsAck: _MsgsAck_, - _BadMsgNotification: _BadMsgNotification_, - _MsgResendReq: _MsgResendReq_, - _MsgsStateReq: _MsgsStateReq_, - _MsgsStateInfo: _MsgsStateInfo_, - _MsgsAllInfo: _MsgsAllInfo_, - _MsgDetailedInfo: _MsgDetailedInfo_, - _DestroyAuthKeyRes: _DestroyAuthKeyRes_, - _HttpWait: _HttpWait_, - _True: _True_, - _Error: _Error_, - _IpPort: _IpPort_, - _AccessPointRule: _AccessPointRule_, - _help_ConfigSimple: _help_ConfigSimple_, - _InputFileLocation: _InputFileLocation_, - _InputPeer: _InputPeer_, - _InputUser: _InputUser_, - _InputContact: _InputContact_, - _InputFile: _InputFile_, - _InputMedia: _InputMedia_, - _InputChatPhoto: _InputChatPhoto_, - _InputGeoPoint: _InputGeoPoint_, - _InputPhoto: _InputPhoto_, - _Peer: _Peer_, - _storage_FileType: _storage_FileType_, - _User: _User_, - _UserProfilePhoto: _UserProfilePhoto_, - _UserStatus: _UserStatus_, - _Chat: _Chat_, - _ChatFull: _ChatFull_, - _ChatParticipant: _ChatParticipant_, - _ChatParticipants: _ChatParticipants_, - _ChatPhoto: _ChatPhoto_, - _Message: _Message_, - _MessageMedia: _MessageMedia_, - _MessageAction: _MessageAction_, - _Dialog: _Dialog_, - _Photo: _Photo_, - _PhotoSize: _PhotoSize_, - _GeoPoint: _GeoPoint_, - _auth_SentCode: _auth_SentCode_, - _auth_Authorization: _auth_Authorization_, - _auth_ExportedAuthorization: _auth_ExportedAuthorization_, - _InputNotifyPeer: _InputNotifyPeer_, - _InputPeerNotifySettings: _InputPeerNotifySettings_, - _PeerNotifySettings: _PeerNotifySettings_, - _PeerSettings: _PeerSettings_, - _WallPaper: _WallPaper_, - _ReportReason: _ReportReason_, - _UserFull: _UserFull_, - _Contact: _Contact_, - _ImportedContact: _ImportedContact_, - _ContactStatus: _ContactStatus_, - _contacts_Contacts: _contacts_Contacts_, - _contacts_ImportedContacts: _contacts_ImportedContacts_, - _contacts_Blocked: _contacts_Blocked_, - _messages_Dialogs: _messages_Dialogs_, - _messages_Messages: _messages_Messages_, - _messages_Chats: _messages_Chats_, - _messages_ChatFull: _messages_ChatFull_, - _messages_AffectedHistory: _messages_AffectedHistory_, - _MessagesFilter: _MessagesFilter_, - _Update: _Update_, - _updates_State: _updates_State_, - _updates_Difference: _updates_Difference_, - _Updates: _Updates_, - _photos_Photos: _photos_Photos_, - _photos_Photo: _photos_Photo_, - _upload_File: _upload_File_, - _DcOption: _DcOption_, - _Config: _Config_, - _NearestDc: _NearestDc_, - _help_AppUpdate: _help_AppUpdate_, - _help_InviteText: _help_InviteText_, - _EncryptedChat: _EncryptedChat_, - _InputEncryptedChat: _InputEncryptedChat_, - _EncryptedFile: _EncryptedFile_, - _InputEncryptedFile: _InputEncryptedFile_, - _EncryptedMessage: _EncryptedMessage_, - _messages_DhConfig: _messages_DhConfig_, - _messages_SentEncryptedMessage: _messages_SentEncryptedMessage_, - _InputDocument: _InputDocument_, - _Document: _Document_, - _help_Support: _help_Support_, - _NotifyPeer: _NotifyPeer_, - _SendMessageAction: _SendMessageAction_, - _contacts_Found: _contacts_Found_, - _InputPrivacyKey: _InputPrivacyKey_, - _PrivacyKey: _PrivacyKey_, - _InputPrivacyRule: _InputPrivacyRule_, - _PrivacyRule: _PrivacyRule_, - _account_PrivacyRules: _account_PrivacyRules_, - _AccountDaysTTL: _AccountDaysTTL_, - _DocumentAttribute: _DocumentAttribute_, - _messages_Stickers: _messages_Stickers_, - _StickerPack: _StickerPack_, - _messages_AllStickers: _messages_AllStickers_, - _messages_AffectedMessages: _messages_AffectedMessages_, - _WebPage: _WebPage_, - _Authorization: _Authorization_, - _account_Authorizations: _account_Authorizations_, - _account_Password: _account_Password_, - _account_PasswordSettings: _account_PasswordSettings_, - _account_PasswordInputSettings: _account_PasswordInputSettings_, - _auth_PasswordRecovery: _auth_PasswordRecovery_, - _ReceivedNotifyMessage: _ReceivedNotifyMessage_, - _ExportedChatInvite: _ExportedChatInvite_, - _ChatInvite: _ChatInvite_, - _InputStickerSet: _InputStickerSet_, - _StickerSet: _StickerSet_, - _messages_StickerSet: _messages_StickerSet_, - _BotCommand: _BotCommand_, - _BotInfo: _BotInfo_, - _KeyboardButton: _KeyboardButton_, - _KeyboardButtonRow: _KeyboardButtonRow_, - _ReplyMarkup: _ReplyMarkup_, - _MessageEntity: _MessageEntity_, - _InputChannel: _InputChannel_, - _contacts_ResolvedPeer: _contacts_ResolvedPeer_, - _MessageRange: _MessageRange_, - _updates_ChannelDifference: _updates_ChannelDifference_, - _ChannelMessagesFilter: _ChannelMessagesFilter_, - _ChannelParticipant: _ChannelParticipant_, - _ChannelParticipantsFilter: _ChannelParticipantsFilter_, - _channels_ChannelParticipants: _channels_ChannelParticipants_, - _channels_ChannelParticipant: _channels_ChannelParticipant_, - _help_TermsOfService: _help_TermsOfService_, - _messages_SavedGifs: _messages_SavedGifs_, - _InputBotInlineMessage: _InputBotInlineMessage_, - _InputBotInlineResult: _InputBotInlineResult_, - _BotInlineMessage: _BotInlineMessage_, - _BotInlineResult: _BotInlineResult_, - _messages_BotResults: _messages_BotResults_, - _ExportedMessageLink: _ExportedMessageLink_, - _MessageFwdHeader: _MessageFwdHeader_, - _auth_CodeType: _auth_CodeType_, - _auth_SentCodeType: _auth_SentCodeType_, - _messages_BotCallbackAnswer: _messages_BotCallbackAnswer_, - _messages_MessageEditData: _messages_MessageEditData_, - _InputBotInlineMessageID: _InputBotInlineMessageID_, - _InlineBotSwitchPM: _InlineBotSwitchPM_, - _messages_PeerDialogs: _messages_PeerDialogs_, - _TopPeer: _TopPeer_, - _TopPeerCategory: _TopPeerCategory_, - _TopPeerCategoryPeers: _TopPeerCategoryPeers_, - _contacts_TopPeers: _contacts_TopPeers_, - _DraftMessage: _DraftMessage_, - _messages_FeaturedStickers: _messages_FeaturedStickers_, - _messages_RecentStickers: _messages_RecentStickers_, - _messages_ArchivedStickers: _messages_ArchivedStickers_, - _messages_StickerSetInstallResult: _messages_StickerSetInstallResult_, - _StickerSetCovered: _StickerSetCovered_, - _MaskCoords: _MaskCoords_, - _InputStickeredMedia: _InputStickeredMedia_, - _Game: _Game_, - _InputGame: _InputGame_, - _HighScore: _HighScore_, - _messages_HighScores: _messages_HighScores_, - _RichText: _RichText_, - _PageBlock: _PageBlock_, - _PhoneCallDiscardReason: _PhoneCallDiscardReason_, - _DataJSON: _DataJSON_, - _LabeledPrice: _LabeledPrice_, - _Invoice: _Invoice_, - _PaymentCharge: _PaymentCharge_, - _PostAddress: _PostAddress_, - _PaymentRequestedInfo: _PaymentRequestedInfo_, - _PaymentSavedCredentials: _PaymentSavedCredentials_, - _WebDocument: _WebDocument_, - _InputWebDocument: _InputWebDocument_, - _InputWebFileLocation: _InputWebFileLocation_, - _upload_WebFile: _upload_WebFile_, - _payments_PaymentForm: _payments_PaymentForm_, - _payments_ValidatedRequestedInfo: _payments_ValidatedRequestedInfo_, - _payments_PaymentResult: _payments_PaymentResult_, - _payments_PaymentReceipt: _payments_PaymentReceipt_, - _payments_SavedInfo: _payments_SavedInfo_, - _InputPaymentCredentials: _InputPaymentCredentials_, - _account_TmpPassword: _account_TmpPassword_, - _ShippingOption: _ShippingOption_, - _InputStickerSetItem: _InputStickerSetItem_, - _InputPhoneCall: _InputPhoneCall_, - _PhoneCall: _PhoneCall_, - _PhoneConnection: _PhoneConnection_, - _PhoneCallProtocol: _PhoneCallProtocol_, - _phone_PhoneCall: _phone_PhoneCall_, - _upload_CdnFile: _upload_CdnFile_, - _CdnPublicKey: _CdnPublicKey_, - _CdnConfig: _CdnConfig_, - _LangPackString: _LangPackString_, - _LangPackDifference: _LangPackDifference_, - _LangPackLanguage: _LangPackLanguage_, - _ChannelAdminLogEventAction: _ChannelAdminLogEventAction_, - _ChannelAdminLogEvent: _ChannelAdminLogEvent_, - _channels_AdminLogResults: _channels_AdminLogResults_, - _ChannelAdminLogEventsFilter: _ChannelAdminLogEventsFilter_, - _PopularContact: _PopularContact_, - _messages_FavedStickers: _messages_FavedStickers_, - _RecentMeUrl: _RecentMeUrl_, - _help_RecentMeUrls: _help_RecentMeUrls_, - _InputSingleMedia: _InputSingleMedia_, - _WebAuthorization: _WebAuthorization_, - _account_WebAuthorizations: _account_WebAuthorizations_, - _InputMessage: _InputMessage_, - _InputDialogPeer: _InputDialogPeer_, - _DialogPeer: _DialogPeer_, - _messages_FoundStickerSets: _messages_FoundStickerSets_, - _FileHash: _FileHash_, - _InputClientProxy: _InputClientProxy_, - _help_TermsOfServiceUpdate: _help_TermsOfServiceUpdate_, - _InputSecureFile: _InputSecureFile_, - _SecureFile: _SecureFile_, - _SecureData: _SecureData_, - _SecurePlainData: _SecurePlainData_, - _SecureValueType: _SecureValueType_, - _SecureValue: _SecureValue_, - _InputSecureValue: _InputSecureValue_, - _SecureValueHash: _SecureValueHash_, - _SecureValueError: _SecureValueError_, - _SecureCredentialsEncrypted: _SecureCredentialsEncrypted_, - _account_AuthorizationForm: _account_AuthorizationForm_, - _account_SentEmailCode: _account_SentEmailCode_, - _help_DeepLinkInfo: _help_DeepLinkInfo_, - _SavedContact: _SavedContact_, - _account_Takeout: _account_Takeout_, - _PasswordKdfAlgo: _PasswordKdfAlgo_, - _SecurePasswordKdfAlgo: _SecurePasswordKdfAlgo_, - _SecureSecretSettings: _SecureSecretSettings_, - _InputCheckPasswordSRP: _InputCheckPasswordSRP_, - _SecureRequiredType: _SecureRequiredType_, - _help_PassportConfig: _help_PassportConfig_, - _InputAppEvent: _InputAppEvent_, - _JSONObjectValue: _JSONObjectValue_, - _JSONValue: _JSONValue_, - _PageTableCell: _PageTableCell_, - _PageTableRow: _PageTableRow_, - _PageCaption: _PageCaption_, - _PageListItem: _PageListItem_, - _PageListOrderedItem: _PageListOrderedItem_, - _PageRelatedArticle: _PageRelatedArticle_, - _Page: _Page_, - _help_SupportName: _help_SupportName_, - _help_UserInfo: _help_UserInfo_, - _PollAnswer: _PollAnswer_, - _Poll: _Poll_, - _PollAnswerVoters: _PollAnswerVoters_, - _PollResults: _PollResults_, - _ChatOnlines: _ChatOnlines_, - _StatsURL: _StatsURL_, - _ChatAdminRights: _ChatAdminRights_, - _ChatBannedRights: _ChatBannedRights_, - _InputWallPaper: _InputWallPaper_, - _account_WallPapers: _account_WallPapers_, - _CodeSettings: _CodeSettings_, - _WallPaperSettings: _WallPaperSettings_, - _AutoDownloadSettings: _AutoDownloadSettings_, - _account_AutoDownloadSettings: _account_AutoDownloadSettings_, - _EmojiKeyword: _EmojiKeyword_, - _EmojiKeywordsDifference: _EmojiKeywordsDifference_, - _EmojiURL: _EmojiURL_, - _EmojiLanguage: _EmojiLanguage_, - _Folder: _Folder_, - _InputFolderPeer: _InputFolderPeer_, - _FolderPeer: _FolderPeer_, - _messages_SearchCounter: _messages_SearchCounter_, - _UrlAuthResult: _UrlAuthResult_, - _ChannelLocation: _ChannelLocation_, - _PeerLocated: _PeerLocated_, - _RestrictionReason: _RestrictionReason_, - _InputTheme: _InputTheme_, - _Theme: _Theme_, - _account_Themes: _account_Themes_, - _auth_LoginToken: _auth_LoginToken_, - _account_ContentSettings: _account_ContentSettings_, - _messages_InactiveChats: _messages_InactiveChats_, - _BaseTheme: _BaseTheme_, - _InputThemeSettings: _InputThemeSettings_, - _ThemeSettings: _ThemeSettings_, - _WebPageAttribute: _WebPageAttribute_, - _messages_VotesList: _messages_VotesList_, - _BankCardOpenUrl: _BankCardOpenUrl_, - _payments_BankCardData: _payments_BankCardData_, - _DialogFilter: _DialogFilter_, - _DialogFilterSuggested: _DialogFilterSuggested_, - _StatsDateRangeDays: _StatsDateRangeDays_, - _StatsAbsValueAndPrev: _StatsAbsValueAndPrev_, - _StatsPercentValue: _StatsPercentValue_, - _StatsGraph: _StatsGraph_, - _stats_BroadcastStats: _stats_BroadcastStats_, - _help_PromoData: _help_PromoData_, - _VideoSize: _VideoSize_, - _StatsGroupTopPoster: _StatsGroupTopPoster_, - _StatsGroupTopAdmin: _StatsGroupTopAdmin_, - _StatsGroupTopInviter: _StatsGroupTopInviter_, - _stats_MegagroupStats: _stats_MegagroupStats_, - _GlobalPrivacySettings: _GlobalPrivacySettings_, - _help_CountryCode: _help_CountryCode_, - _help_Country: _help_Country_, - _help_CountriesList: _help_CountriesList_, - _MessageViews: _MessageViews_, - _messages_MessageViews: _messages_MessageViews_, - _messages_DiscussionMessage: _messages_DiscussionMessage_, - _MessageReplyHeader: _MessageReplyHeader_, - _MessageReplies: _MessageReplies_, - _PeerBlocked: _PeerBlocked_, - _stats_MessageStats: _stats_MessageStats_, - _GroupCall: _GroupCall_, - _InputGroupCall: _InputGroupCall_, - _GroupCallParticipant: _GroupCallParticipant_, - _phone_GroupCall: _phone_GroupCall_, - _phone_GroupParticipants: _phone_GroupParticipants_, - _InlineQueryPeerType: _InlineQueryPeerType_, - _messages_HistoryImport: _messages_HistoryImport_, - _messages_HistoryImportParsed: _messages_HistoryImportParsed_, - _messages_AffectedFoundMessages: _messages_AffectedFoundMessages_, - _ChatInviteImporter: _ChatInviteImporter_, - _messages_ExportedChatInvites: _messages_ExportedChatInvites_, - _messages_ExportedChatInvite: _messages_ExportedChatInvite_, - _messages_ChatInviteImporters: _messages_ChatInviteImporters_, - _ChatAdminWithInvites: _ChatAdminWithInvites_, - _messages_ChatAdminsWithInvites: _messages_ChatAdminsWithInvites_, - _messages_CheckedHistoryImportPeer: _messages_CheckedHistoryImportPeer_, - _phone_JoinAsPeers: _phone_JoinAsPeers_, - _phone_ExportedGroupCallInvite: _phone_ExportedGroupCallInvite_, - _GroupCallParticipantVideoSourceGroup: _GroupCallParticipantVideoSourceGroup_, - _GroupCallParticipantVideo: _GroupCallParticipantVideo_, - _stickers_SuggestedShortName: _stickers_SuggestedShortName_, - _BotCommandScope: _BotCommandScope_, - _account_ResetPasswordResult: _account_ResetPasswordResult_, - _SponsoredMessage: _SponsoredMessage_, - _messages_SponsoredMessages: _messages_SponsoredMessages_, - _SearchResultsCalendarPeriod: _SearchResultsCalendarPeriod_, - _messages_SearchResultsCalendar: _messages_SearchResultsCalendar_, - _SearchResultsPosition: _SearchResultsPosition_, - _messages_SearchResultsPositions: _messages_SearchResultsPositions_, - _channels_SendAsPeers: _channels_SendAsPeers_, - _users_UserFull: _users_UserFull_, - _messages_PeerSettings: _messages_PeerSettings_, - _auth_LoggedOut: _auth_LoggedOut_, - _ReactionCount: _ReactionCount_, - _MessageReactions: _MessageReactions_, - _messages_MessageReactionsList: _messages_MessageReactionsList_, - _AvailableReaction: _AvailableReaction_, - _messages_AvailableReactions: _messages_AvailableReactions_, - _MessagePeerReaction: _MessagePeerReaction_, - _GroupCallStreamChannel: _GroupCallStreamChannel_, - _phone_GroupCallStreamChannels: _phone_GroupCallStreamChannels_, - _phone_GroupCallStreamRtmpUrl: _phone_GroupCallStreamRtmpUrl_, - _AttachMenuBotIconColor: _AttachMenuBotIconColor_, - _AttachMenuBotIcon: _AttachMenuBotIcon_, - _AttachMenuBot: _AttachMenuBot_, - _AttachMenuBots: _AttachMenuBots_, - _AttachMenuBotsBot: _AttachMenuBotsBot_, - _WebViewResult: _WebViewResult_, - _SimpleWebViewResult: _SimpleWebViewResult_, - _WebViewMessageSent: _WebViewMessageSent_, - _BotMenuButton: _BotMenuButton_, - _account_SavedRingtones: _account_SavedRingtones_, - _NotificationSound: _NotificationSound_, - _account_SavedRingtone: _account_SavedRingtone_, - _AttachMenuPeerType: _AttachMenuPeerType_, - _InputInvoice: _InputInvoice_, - _payments_ExportedInvoice: _payments_ExportedInvoice_, - _messages_TranscribedAudio: _messages_TranscribedAudio_, - _help_PremiumPromo: _help_PremiumPromo_, - _InputStorePaymentPurpose: _InputStorePaymentPurpose_, - _PremiumGiftOption: _PremiumGiftOption_, - _PaymentFormMethod: _PaymentFormMethod_, - _EmojiStatus: _EmojiStatus_, - _account_EmojiStatuses: _account_EmojiStatuses_, - _Reaction: _Reaction_, - _ChatReactions: _ChatReactions_, - _messages_Reactions: _messages_Reactions_, - _EmailVerifyPurpose: _EmailVerifyPurpose_, - _EmailVerification: _EmailVerification_, - _account_EmailVerified: _account_EmailVerified_, - _PremiumSubscriptionOption: _PremiumSubscriptionOption_, - _SendAsPeer: _SendAsPeer_, - _MessageExtendedMedia: _MessageExtendedMedia_, - _StickerKeyword: _StickerKeyword_, - _Username: _Username_, - _ForumTopic: _ForumTopic_, - _messages_ForumTopics: _messages_ForumTopics_, - _DefaultHistoryTTL: _DefaultHistoryTTL_, - _ExportedContactToken: _ExportedContactToken_, - _RequestPeerType: _RequestPeerType_, - _EmojiList: _EmojiList_, - _EmojiGroup: _EmojiGroup_, - _messages_EmojiGroups: _messages_EmojiGroups_, - _TextWithEntities: _TextWithEntities_, - _messages_TranslatedText: _messages_TranslatedText_, - _AutoSaveSettings: _AutoSaveSettings_, - _AutoSaveException: _AutoSaveException_, - _account_AutoSaveSettings: _account_AutoSaveSettings_, - _help_AppConfig: _help_AppConfig_, - _InputBotApp: _InputBotApp_, - _BotApp: _BotApp_, - _messages_BotApp: _messages_BotApp_, - _AppWebViewResult: _AppWebViewResult_, - _InlineBotWebView: _InlineBotWebView_, - _ReadParticipantDate: _ReadParticipantDate_, - _InputChatlist: _InputChatlist_, - _ExportedChatlistInvite: _ExportedChatlistInvite_, - _chatlists_ExportedChatlistInvite: _chatlists_ExportedChatlistInvite_, - _chatlists_ExportedInvites: _chatlists_ExportedInvites_, - _chatlists_ChatlistInvite: _chatlists_ChatlistInvite_, - _chatlists_ChatlistUpdates: _chatlists_ChatlistUpdates_, - _bots_BotInfo: _bots_BotInfo_, - _MessagePeerVote: _MessagePeerVote_, - _SponsoredWebPage: _SponsoredWebPage_, - _StoryViews: _StoryViews_, - _StoryItem: _StoryItem_, - _stories_AllStories: _stories_AllStories_, - _stories_Stories: _stories_Stories_, - _StoryView: _StoryView_, - _stories_StoryViewsList: _stories_StoryViewsList_, - _stories_StoryViews: _stories_StoryViews_, - _InputReplyTo: _InputReplyTo_, - _ExportedStoryLink: _ExportedStoryLink_, - _StoriesStealthMode: _StoriesStealthMode_, - _MediaAreaCoordinates: _MediaAreaCoordinates_, - _MediaArea: _MediaArea_, - _PeerStories: _PeerStories_, - _stories_PeerStories: _stories_PeerStories_, - _messages_WebPage: _messages_WebPage_, - _PremiumGiftCodeOption: _PremiumGiftCodeOption_, - _payments_CheckedGiftCode: _payments_CheckedGiftCode_, - _payments_GiveawayInfo: _payments_GiveawayInfo_, - _PrepaidGiveaway: _PrepaidGiveaway_, - _Boost: _Boost_, - _premium_BoostsList: _premium_BoostsList_, - _MyBoost: _MyBoost_, - _premium_MyBoosts: _premium_MyBoosts_, - _premium_BoostsStatus: _premium_BoostsStatus_, - _StoryFwdHeader: _StoryFwdHeader_, - _PostInteractionCounters: _PostInteractionCounters_, - _stats_StoryStats: _stats_StoryStats_, - _PublicForward: _PublicForward_, - _stats_PublicForwards: _stats_PublicForwards_, - _PeerColor: _PeerColor_, - _help_PeerColorSet: _help_PeerColorSet_, - _help_PeerColorOption: _help_PeerColorOption_, - _help_PeerColors: _help_PeerColors_, - _StoryReaction: _StoryReaction_, - _stories_StoryReactionsList: _stories_StoryReactionsList_, - _SavedDialog: _SavedDialog_, - _messages_SavedDialogs: _messages_SavedDialogs_, - _SavedReactionTag: _SavedReactionTag_, - _messages_SavedReactionTags: _messages_SavedReactionTags_, - _OutboxReadDate: _OutboxReadDate_, - _smsjobs_EligibilityToJoin: _smsjobs_EligibilityToJoin_, - _smsjobs_Status: _smsjobs_Status_, - _SmsJob: _SmsJob_, - _BusinessWeeklyOpen: _BusinessWeeklyOpen_, - _BusinessWorkHours: _BusinessWorkHours_, - _BusinessLocation: _BusinessLocation_, - _InputBusinessRecipients: _InputBusinessRecipients_, - _BusinessRecipients: _BusinessRecipients_, - _BusinessAwayMessageSchedule: _BusinessAwayMessageSchedule_, - _InputBusinessGreetingMessage: _InputBusinessGreetingMessage_, - _BusinessGreetingMessage: _BusinessGreetingMessage_, - _InputBusinessAwayMessage: _InputBusinessAwayMessage_, - _BusinessAwayMessage: _BusinessAwayMessage_, - _Timezone: _Timezone_, - _help_TimezonesList: _help_TimezonesList_, - _QuickReply: _QuickReply_, - _InputQuickReplyShortcut: _InputQuickReplyShortcut_, - _messages_QuickReplies: _messages_QuickReplies_, - _ConnectedBot: _ConnectedBot_, - _account_ConnectedBots: _account_ConnectedBots_, - _messages_DialogFilters: _messages_DialogFilters_, - _Birthday: _Birthday_, - _BotBusinessConnection: _BotBusinessConnection_, - _InputBusinessIntro: _InputBusinessIntro_, - _BusinessIntro: _BusinessIntro_, - _messages_MyStickers: _messages_MyStickers_, - _InputCollectible: _InputCollectible_, - _fragment_CollectibleInfo: _fragment_CollectibleInfo_, - _InputBusinessBotRecipients: _InputBusinessBotRecipients_, - _BusinessBotRecipients: _BusinessBotRecipients_, - _ContactBirthday: _ContactBirthday_, - _contacts_ContactBirthdays: _contacts_ContactBirthdays_, - _MissingInvitee: _MissingInvitee_, - _messages_InvitedUsers: _messages_InvitedUsers_, - _InputBusinessChatLink: _InputBusinessChatLink_, - _BusinessChatLink: _BusinessChatLink_, - _account_BusinessChatLinks: _account_BusinessChatLinks_, - _account_ResolvedBusinessChatLinks: _account_ResolvedBusinessChatLinks_, - _RequestedPeer: _RequestedPeer_, - _SponsoredMessageReportOption: _SponsoredMessageReportOption_, - _channels_SponsoredMessageReportResult: _channels_SponsoredMessageReportResult_, - _stats_BroadcastRevenueStats: _stats_BroadcastRevenueStats_, - _stats_BroadcastRevenueWithdrawalUrl: _stats_BroadcastRevenueWithdrawalUrl_, - _BroadcastRevenueTransaction: _BroadcastRevenueTransaction_, - _stats_BroadcastRevenueTransactions: _stats_BroadcastRevenueTransactions_, - ResPQ: ResPQ_, - P_q_inner_data_dc: P_q_inner_data_dc_, - P_q_inner_data_temp_dc: P_q_inner_data_temp_dc_, - Server_DH_params_ok: Server_DH_params_ok_, - Server_DH_inner_data: Server_DH_inner_data_, - Client_DH_inner_data: Client_DH_inner_data_, - Dh_gen_ok: Dh_gen_ok_, - Dh_gen_retry: Dh_gen_retry_, - Dh_gen_fail: Dh_gen_fail_, - Bind_auth_key_inner: Bind_auth_key_inner_, - Rpc_error: Rpc_error_, - Rpc_answer_unknown: Rpc_answer_unknown_, - Rpc_answer_dropped_running: Rpc_answer_dropped_running_, - Rpc_answer_dropped: Rpc_answer_dropped_, - Future_salt: Future_salt_, - Future_salts: Future_salts_, - Pong: Pong_, - Destroy_session_ok: Destroy_session_ok_, - Destroy_session_none: Destroy_session_none_, - New_session_created: New_session_created_, - Gzip_packed: Gzip_packed_, - Msgs_ack: Msgs_ack_, - Bad_msg_notification: Bad_msg_notification_, - Bad_server_salt: Bad_server_salt_, - Msg_resend_req: Msg_resend_req_, - Msgs_state_req: Msgs_state_req_, - Msgs_state_info: Msgs_state_info_, - Msgs_all_info: Msgs_all_info_, - Msg_detailed_info: Msg_detailed_info_, - Msg_new_detailed_info: Msg_new_detailed_info_, - Destroy_auth_key_ok: Destroy_auth_key_ok_, - Destroy_auth_key_none: Destroy_auth_key_none_, - Destroy_auth_key_fail: Destroy_auth_key_fail_, - Http_wait: Http_wait_, - True: True_, - Error: Error_, - IpPort: IpPort_, - IpPortSecret: IpPortSecret_, - AccessPointRule: AccessPointRule_, - InputPeerPhotoFileLocationLegacy: InputPeerPhotoFileLocationLegacy_, - InputStickerSetThumbLegacy: InputStickerSetThumbLegacy_, - InputPeerEmpty: InputPeerEmpty_, - InputPeerSelf: InputPeerSelf_, - InputPeerChat: InputPeerChat_, - InputPeerUser: InputPeerUser_, - InputPeerChannel: InputPeerChannel_, - InputPeerUserFromMessage: InputPeerUserFromMessage_, - InputPeerChannelFromMessage: InputPeerChannelFromMessage_, - InputUserEmpty: InputUserEmpty_, - InputUserSelf: InputUserSelf_, - InputUser: InputUser_, - InputUserFromMessage: InputUserFromMessage_, - InputPhoneContact: InputPhoneContact_, - InputFile: InputFile_, - InputFileBig: InputFileBig_, - InputMediaEmpty: InputMediaEmpty_, - InputMediaUploadedPhoto: InputMediaUploadedPhoto_, - InputMediaPhoto: InputMediaPhoto_, - InputMediaGeoPoint: InputMediaGeoPoint_, - InputMediaContact: InputMediaContact_, - InputMediaUploadedDocument: InputMediaUploadedDocument_, - InputMediaDocument: InputMediaDocument_, - InputMediaVenue: InputMediaVenue_, - InputMediaPhotoExternal: InputMediaPhotoExternal_, - InputMediaDocumentExternal: InputMediaDocumentExternal_, - InputMediaGame: InputMediaGame_, - InputMediaInvoice: InputMediaInvoice_, - InputMediaGeoLive: InputMediaGeoLive_, - InputMediaPoll: InputMediaPoll_, - InputMediaDice: InputMediaDice_, - InputMediaStory: InputMediaStory_, - InputMediaWebPage: InputMediaWebPage_, - InputChatPhotoEmpty: InputChatPhotoEmpty_, - InputChatUploadedPhoto: InputChatUploadedPhoto_, - InputChatPhoto: InputChatPhoto_, - InputGeoPointEmpty: InputGeoPointEmpty_, - InputGeoPoint: InputGeoPoint_, - InputPhotoEmpty: InputPhotoEmpty_, - InputPhoto: InputPhoto_, - InputFileLocation: InputFileLocation_, - InputEncryptedFileLocation: InputEncryptedFileLocation_, - InputDocumentFileLocation: InputDocumentFileLocation_, - InputSecureFileLocation: InputSecureFileLocation_, - InputTakeoutFileLocation: InputTakeoutFileLocation_, - InputPhotoFileLocation: InputPhotoFileLocation_, - InputPhotoLegacyFileLocation: InputPhotoLegacyFileLocation_, - InputPeerPhotoFileLocation: InputPeerPhotoFileLocation_, - InputStickerSetThumb: InputStickerSetThumb_, - InputGroupCallStream: InputGroupCallStream_, - PeerUser: PeerUser_, - PeerChat: PeerChat_, - PeerChannel: PeerChannel_, - UserEmpty: UserEmpty_, - User: User_, - UserProfilePhotoEmpty: UserProfilePhotoEmpty_, - UserProfilePhoto: UserProfilePhoto_, - UserStatusEmpty: UserStatusEmpty_, - UserStatusOnline: UserStatusOnline_, - UserStatusOffline: UserStatusOffline_, - UserStatusRecently: UserStatusRecently_, - UserStatusLastWeek: UserStatusLastWeek_, - UserStatusLastMonth: UserStatusLastMonth_, - ChatEmpty: ChatEmpty_, - Chat: Chat_, - ChatForbidden: ChatForbidden_, - Channel: Channel_, - ChannelForbidden: ChannelForbidden_, - ChatFull: ChatFull_, - ChannelFull: ChannelFull_, - ChatParticipant: ChatParticipant_, - ChatParticipantCreator: ChatParticipantCreator_, - ChatParticipantAdmin: ChatParticipantAdmin_, - ChatParticipantsForbidden: ChatParticipantsForbidden_, - ChatParticipants: ChatParticipants_, - ChatPhotoEmpty: ChatPhotoEmpty_, - ChatPhoto: ChatPhoto_, - MessageEmpty: MessageEmpty_, - Message: Message_, - MessageService: MessageService_, - MessageMediaEmpty: MessageMediaEmpty_, - MessageMediaPhoto: MessageMediaPhoto_, - MessageMediaGeo: MessageMediaGeo_, - MessageMediaContact: MessageMediaContact_, - MessageMediaUnsupported: MessageMediaUnsupported_, - MessageMediaDocument: MessageMediaDocument_, - MessageMediaWebPage: MessageMediaWebPage_, - MessageMediaVenue: MessageMediaVenue_, - MessageMediaGame: MessageMediaGame_, - MessageMediaInvoice: MessageMediaInvoice_, - MessageMediaGeoLive: MessageMediaGeoLive_, - MessageMediaPoll: MessageMediaPoll_, - MessageMediaDice: MessageMediaDice_, - MessageMediaStory: MessageMediaStory_, - MessageMediaGiveaway: MessageMediaGiveaway_, - MessageMediaGiveawayResults: MessageMediaGiveawayResults_, - MessageActionEmpty: MessageActionEmpty_, - MessageActionChatCreate: MessageActionChatCreate_, - MessageActionChatEditTitle: MessageActionChatEditTitle_, - MessageActionChatEditPhoto: MessageActionChatEditPhoto_, - MessageActionChatDeletePhoto: MessageActionChatDeletePhoto_, - MessageActionChatAddUser: MessageActionChatAddUser_, - MessageActionChatDeleteUser: MessageActionChatDeleteUser_, - MessageActionChatJoinedByLink: MessageActionChatJoinedByLink_, - MessageActionChannelCreate: MessageActionChannelCreate_, - MessageActionChatMigrateTo: MessageActionChatMigrateTo_, - MessageActionChannelMigrateFrom: MessageActionChannelMigrateFrom_, - MessageActionPinMessage: MessageActionPinMessage_, - MessageActionHistoryClear: MessageActionHistoryClear_, - MessageActionGameScore: MessageActionGameScore_, - MessageActionPaymentSentMe: MessageActionPaymentSentMe_, - MessageActionPaymentSent: MessageActionPaymentSent_, - MessageActionPhoneCall: MessageActionPhoneCall_, - MessageActionScreenshotTaken: MessageActionScreenshotTaken_, - MessageActionCustomAction: MessageActionCustomAction_, - MessageActionBotAllowed: MessageActionBotAllowed_, - MessageActionSecureValuesSentMe: MessageActionSecureValuesSentMe_, - MessageActionSecureValuesSent: MessageActionSecureValuesSent_, - MessageActionContactSignUp: MessageActionContactSignUp_, - MessageActionGeoProximityReached: MessageActionGeoProximityReached_, - MessageActionGroupCall: MessageActionGroupCall_, - MessageActionInviteToGroupCall: MessageActionInviteToGroupCall_, - MessageActionSetMessagesTTL: MessageActionSetMessagesTTL_, - MessageActionGroupCallScheduled: MessageActionGroupCallScheduled_, - MessageActionSetChatTheme: MessageActionSetChatTheme_, - MessageActionChatJoinedByRequest: MessageActionChatJoinedByRequest_, - MessageActionWebViewDataSentMe: MessageActionWebViewDataSentMe_, - MessageActionWebViewDataSent: MessageActionWebViewDataSent_, - MessageActionGiftPremium: MessageActionGiftPremium_, - MessageActionTopicCreate: MessageActionTopicCreate_, - MessageActionTopicEdit: MessageActionTopicEdit_, - MessageActionSuggestProfilePhoto: MessageActionSuggestProfilePhoto_, - MessageActionRequestedPeer: MessageActionRequestedPeer_, - MessageActionSetChatWallPaper: MessageActionSetChatWallPaper_, - MessageActionGiftCode: MessageActionGiftCode_, - MessageActionGiveawayLaunch: MessageActionGiveawayLaunch_, - MessageActionGiveawayResults: MessageActionGiveawayResults_, - MessageActionBoostApply: MessageActionBoostApply_, - MessageActionRequestedPeerSentMe: MessageActionRequestedPeerSentMe_, - Dialog: Dialog_, - DialogFolder: DialogFolder_, - PhotoEmpty: PhotoEmpty_, - Photo: Photo_, - PhotoSizeEmpty: PhotoSizeEmpty_, - PhotoSize: PhotoSize_, - PhotoCachedSize: PhotoCachedSize_, - PhotoStrippedSize: PhotoStrippedSize_, - PhotoSizeProgressive: PhotoSizeProgressive_, - PhotoPathSize: PhotoPathSize_, - GeoPointEmpty: GeoPointEmpty_, - GeoPoint: GeoPoint_, - InputNotifyPeer: InputNotifyPeer_, - InputNotifyUsers: InputNotifyUsers_, - InputNotifyChats: InputNotifyChats_, - InputNotifyBroadcasts: InputNotifyBroadcasts_, - InputNotifyForumTopic: InputNotifyForumTopic_, - InputPeerNotifySettings: InputPeerNotifySettings_, - PeerNotifySettings: PeerNotifySettings_, - PeerSettings: PeerSettings_, - WallPaper: WallPaper_, - WallPaperNoFile: WallPaperNoFile_, - InputReportReasonSpam: InputReportReasonSpam_, - InputReportReasonViolence: InputReportReasonViolence_, - InputReportReasonPornography: InputReportReasonPornography_, - InputReportReasonChildAbuse: InputReportReasonChildAbuse_, - InputReportReasonOther: InputReportReasonOther_, - InputReportReasonCopyright: InputReportReasonCopyright_, - InputReportReasonGeoIrrelevant: InputReportReasonGeoIrrelevant_, - InputReportReasonFake: InputReportReasonFake_, - InputReportReasonIllegalDrugs: InputReportReasonIllegalDrugs_, - InputReportReasonPersonalDetails: InputReportReasonPersonalDetails_, - UserFull: UserFull_, - Contact: Contact_, - ImportedContact: ImportedContact_, - ContactStatus: ContactStatus_, - InputMessagesFilterEmpty: InputMessagesFilterEmpty_, - InputMessagesFilterPhotos: InputMessagesFilterPhotos_, - InputMessagesFilterVideo: InputMessagesFilterVideo_, - InputMessagesFilterPhotoVideo: InputMessagesFilterPhotoVideo_, - InputMessagesFilterDocument: InputMessagesFilterDocument_, - InputMessagesFilterUrl: InputMessagesFilterUrl_, - InputMessagesFilterGif: InputMessagesFilterGif_, - InputMessagesFilterVoice: InputMessagesFilterVoice_, - InputMessagesFilterMusic: InputMessagesFilterMusic_, - InputMessagesFilterChatPhotos: InputMessagesFilterChatPhotos_, - InputMessagesFilterPhoneCalls: InputMessagesFilterPhoneCalls_, - InputMessagesFilterRoundVoice: InputMessagesFilterRoundVoice_, - InputMessagesFilterRoundVideo: InputMessagesFilterRoundVideo_, - InputMessagesFilterMyMentions: InputMessagesFilterMyMentions_, - InputMessagesFilterGeo: InputMessagesFilterGeo_, - InputMessagesFilterContacts: InputMessagesFilterContacts_, - InputMessagesFilterPinned: InputMessagesFilterPinned_, - UpdateNewMessage: UpdateNewMessage_, - UpdateMessageID: UpdateMessageID_, - UpdateDeleteMessages: UpdateDeleteMessages_, - UpdateUserTyping: UpdateUserTyping_, - UpdateChatUserTyping: UpdateChatUserTyping_, - UpdateChatParticipants: UpdateChatParticipants_, - UpdateUserStatus: UpdateUserStatus_, - UpdateUserName: UpdateUserName_, - UpdateNewAuthorization: UpdateNewAuthorization_, - UpdateNewEncryptedMessage: UpdateNewEncryptedMessage_, - UpdateEncryptedChatTyping: UpdateEncryptedChatTyping_, - UpdateEncryption: UpdateEncryption_, - UpdateEncryptedMessagesRead: UpdateEncryptedMessagesRead_, - UpdateChatParticipantAdd: UpdateChatParticipantAdd_, - UpdateChatParticipantDelete: UpdateChatParticipantDelete_, - UpdateDcOptions: UpdateDcOptions_, - UpdateNotifySettings: UpdateNotifySettings_, - UpdateServiceNotification: UpdateServiceNotification_, - UpdatePrivacy: UpdatePrivacy_, - UpdateUserPhone: UpdateUserPhone_, - UpdateReadHistoryInbox: UpdateReadHistoryInbox_, - UpdateReadHistoryOutbox: UpdateReadHistoryOutbox_, - UpdateWebPage: UpdateWebPage_, - UpdateReadMessagesContents: UpdateReadMessagesContents_, - UpdateChannelTooLong: UpdateChannelTooLong_, - UpdateChannel: UpdateChannel_, - UpdateNewChannelMessage: UpdateNewChannelMessage_, - UpdateReadChannelInbox: UpdateReadChannelInbox_, - UpdateDeleteChannelMessages: UpdateDeleteChannelMessages_, - UpdateChannelMessageViews: UpdateChannelMessageViews_, - UpdateChatParticipantAdmin: UpdateChatParticipantAdmin_, - UpdateNewStickerSet: UpdateNewStickerSet_, - UpdateStickerSetsOrder: UpdateStickerSetsOrder_, - UpdateStickerSets: UpdateStickerSets_, - UpdateSavedGifs: UpdateSavedGifs_, - UpdateBotInlineQuery: UpdateBotInlineQuery_, - UpdateBotInlineSend: UpdateBotInlineSend_, - UpdateEditChannelMessage: UpdateEditChannelMessage_, - UpdateBotCallbackQuery: UpdateBotCallbackQuery_, - UpdateEditMessage: UpdateEditMessage_, - UpdateInlineBotCallbackQuery: UpdateInlineBotCallbackQuery_, - UpdateReadChannelOutbox: UpdateReadChannelOutbox_, - UpdateDraftMessage: UpdateDraftMessage_, - UpdateReadFeaturedStickers: UpdateReadFeaturedStickers_, - UpdateRecentStickers: UpdateRecentStickers_, - UpdateConfig: UpdateConfig_, - UpdatePtsChanged: UpdatePtsChanged_, - UpdateChannelWebPage: UpdateChannelWebPage_, - UpdateDialogPinned: UpdateDialogPinned_, - UpdatePinnedDialogs: UpdatePinnedDialogs_, - UpdateBotWebhookJSON: UpdateBotWebhookJSON_, - UpdateBotWebhookJSONQuery: UpdateBotWebhookJSONQuery_, - UpdateBotShippingQuery: UpdateBotShippingQuery_, - UpdateBotPrecheckoutQuery: UpdateBotPrecheckoutQuery_, - UpdatePhoneCall: UpdatePhoneCall_, - UpdateLangPackTooLong: UpdateLangPackTooLong_, - UpdateLangPack: UpdateLangPack_, - UpdateFavedStickers: UpdateFavedStickers_, - UpdateChannelReadMessagesContents: UpdateChannelReadMessagesContents_, - UpdateContactsReset: UpdateContactsReset_, - UpdateChannelAvailableMessages: UpdateChannelAvailableMessages_, - UpdateDialogUnreadMark: UpdateDialogUnreadMark_, - UpdateMessagePoll: UpdateMessagePoll_, - UpdateChatDefaultBannedRights: UpdateChatDefaultBannedRights_, - UpdateFolderPeers: UpdateFolderPeers_, - UpdatePeerSettings: UpdatePeerSettings_, - UpdatePeerLocated: UpdatePeerLocated_, - UpdateNewScheduledMessage: UpdateNewScheduledMessage_, - UpdateDeleteScheduledMessages: UpdateDeleteScheduledMessages_, - UpdateTheme: UpdateTheme_, - UpdateGeoLiveViewed: UpdateGeoLiveViewed_, - UpdateLoginToken: UpdateLoginToken_, - UpdateMessagePollVote: UpdateMessagePollVote_, - UpdateDialogFilter: UpdateDialogFilter_, - UpdateDialogFilterOrder: UpdateDialogFilterOrder_, - UpdateDialogFilters: UpdateDialogFilters_, - UpdatePhoneCallSignalingData: UpdatePhoneCallSignalingData_, - UpdateChannelMessageForwards: UpdateChannelMessageForwards_, - UpdateReadChannelDiscussionInbox: UpdateReadChannelDiscussionInbox_, - UpdateReadChannelDiscussionOutbox: UpdateReadChannelDiscussionOutbox_, - UpdatePeerBlocked: UpdatePeerBlocked_, - UpdateChannelUserTyping: UpdateChannelUserTyping_, - UpdatePinnedMessages: UpdatePinnedMessages_, - UpdatePinnedChannelMessages: UpdatePinnedChannelMessages_, - UpdateChat: UpdateChat_, - UpdateGroupCallParticipants: UpdateGroupCallParticipants_, - UpdateGroupCall: UpdateGroupCall_, - UpdatePeerHistoryTTL: UpdatePeerHistoryTTL_, - UpdateChatParticipant: UpdateChatParticipant_, - UpdateChannelParticipant: UpdateChannelParticipant_, - UpdateBotStopped: UpdateBotStopped_, - UpdateGroupCallConnection: UpdateGroupCallConnection_, - UpdateBotCommands: UpdateBotCommands_, - UpdatePendingJoinRequests: UpdatePendingJoinRequests_, - UpdateBotChatInviteRequester: UpdateBotChatInviteRequester_, - UpdateMessageReactions: UpdateMessageReactions_, - UpdateAttachMenuBots: UpdateAttachMenuBots_, - UpdateWebViewResultSent: UpdateWebViewResultSent_, - UpdateBotMenuButton: UpdateBotMenuButton_, - UpdateSavedRingtones: UpdateSavedRingtones_, - UpdateTranscribedAudio: UpdateTranscribedAudio_, - UpdateReadFeaturedEmojiStickers: UpdateReadFeaturedEmojiStickers_, - UpdateUserEmojiStatus: UpdateUserEmojiStatus_, - UpdateRecentEmojiStatuses: UpdateRecentEmojiStatuses_, - UpdateRecentReactions: UpdateRecentReactions_, - UpdateMoveStickerSetToTop: UpdateMoveStickerSetToTop_, - UpdateMessageExtendedMedia: UpdateMessageExtendedMedia_, - UpdateChannelPinnedTopic: UpdateChannelPinnedTopic_, - UpdateChannelPinnedTopics: UpdateChannelPinnedTopics_, - UpdateUser: UpdateUser_, - UpdateAutoSaveSettings: UpdateAutoSaveSettings_, - UpdateStory: UpdateStory_, - UpdateReadStories: UpdateReadStories_, - UpdateStoryID: UpdateStoryID_, - UpdateStoriesStealthMode: UpdateStoriesStealthMode_, - UpdateSentStoryReaction: UpdateSentStoryReaction_, - UpdateBotChatBoost: UpdateBotChatBoost_, - UpdateChannelViewForumAsMessages: UpdateChannelViewForumAsMessages_, - UpdatePeerWallpaper: UpdatePeerWallpaper_, - UpdateBotMessageReaction: UpdateBotMessageReaction_, - UpdateBotMessageReactions: UpdateBotMessageReactions_, - UpdateSavedDialogPinned: UpdateSavedDialogPinned_, - UpdatePinnedSavedDialogs: UpdatePinnedSavedDialogs_, - UpdateSavedReactionTags: UpdateSavedReactionTags_, - UpdateSmsJob: UpdateSmsJob_, - UpdateQuickReplies: UpdateQuickReplies_, - UpdateNewQuickReply: UpdateNewQuickReply_, - UpdateDeleteQuickReply: UpdateDeleteQuickReply_, - UpdateQuickReplyMessage: UpdateQuickReplyMessage_, - UpdateDeleteQuickReplyMessages: UpdateDeleteQuickReplyMessages_, - UpdateBotBusinessConnect: UpdateBotBusinessConnect_, - UpdateBotNewBusinessMessage: UpdateBotNewBusinessMessage_, - UpdateBotEditBusinessMessage: UpdateBotEditBusinessMessage_, - UpdateBotDeleteBusinessMessage: UpdateBotDeleteBusinessMessage_, - UpdatesTooLong: UpdatesTooLong_, - UpdateShortMessage: UpdateShortMessage_, - UpdateShortChatMessage: UpdateShortChatMessage_, - UpdateShort: UpdateShort_, - UpdatesCombined: UpdatesCombined_, - Updates: Updates_, - UpdateShortSentMessage: UpdateShortSentMessage_, - DcOption: DcOption_, - Config: Config_, - NearestDc: NearestDc_, - EncryptedChatEmpty: EncryptedChatEmpty_, - EncryptedChatWaiting: EncryptedChatWaiting_, - EncryptedChatRequested: EncryptedChatRequested_, - EncryptedChat: EncryptedChat_, - EncryptedChatDiscarded: EncryptedChatDiscarded_, - InputEncryptedChat: InputEncryptedChat_, - EncryptedFileEmpty: EncryptedFileEmpty_, - EncryptedFile: EncryptedFile_, - InputEncryptedFileEmpty: InputEncryptedFileEmpty_, - InputEncryptedFileUploaded: InputEncryptedFileUploaded_, - InputEncryptedFile: InputEncryptedFile_, - InputEncryptedFileBigUploaded: InputEncryptedFileBigUploaded_, - EncryptedMessage: EncryptedMessage_, - EncryptedMessageService: EncryptedMessageService_, - InputDocumentEmpty: InputDocumentEmpty_, - InputDocument: InputDocument_, - DocumentEmpty: DocumentEmpty_, - Document: Document_, - NotifyPeer: NotifyPeer_, - NotifyUsers: NotifyUsers_, - NotifyChats: NotifyChats_, - NotifyBroadcasts: NotifyBroadcasts_, - NotifyForumTopic: NotifyForumTopic_, - SendMessageTypingAction: SendMessageTypingAction_, - SendMessageCancelAction: SendMessageCancelAction_, - SendMessageRecordVideoAction: SendMessageRecordVideoAction_, - SendMessageUploadVideoAction: SendMessageUploadVideoAction_, - SendMessageRecordAudioAction: SendMessageRecordAudioAction_, - SendMessageUploadAudioAction: SendMessageUploadAudioAction_, - SendMessageUploadPhotoAction: SendMessageUploadPhotoAction_, - SendMessageUploadDocumentAction: SendMessageUploadDocumentAction_, - SendMessageGeoLocationAction: SendMessageGeoLocationAction_, - SendMessageChooseContactAction: SendMessageChooseContactAction_, - SendMessageGamePlayAction: SendMessageGamePlayAction_, - SendMessageRecordRoundAction: SendMessageRecordRoundAction_, - SendMessageUploadRoundAction: SendMessageUploadRoundAction_, - SpeakingInGroupCallAction: SpeakingInGroupCallAction_, - SendMessageHistoryImportAction: SendMessageHistoryImportAction_, - SendMessageChooseStickerAction: SendMessageChooseStickerAction_, - SendMessageEmojiInteraction: SendMessageEmojiInteraction_, - SendMessageEmojiInteractionSeen: SendMessageEmojiInteractionSeen_, - InputPrivacyKeyStatusTimestamp: InputPrivacyKeyStatusTimestamp_, - InputPrivacyKeyChatInvite: InputPrivacyKeyChatInvite_, - InputPrivacyKeyPhoneCall: InputPrivacyKeyPhoneCall_, - InputPrivacyKeyPhoneP2P: InputPrivacyKeyPhoneP2P_, - InputPrivacyKeyForwards: InputPrivacyKeyForwards_, - InputPrivacyKeyProfilePhoto: InputPrivacyKeyProfilePhoto_, - InputPrivacyKeyPhoneNumber: InputPrivacyKeyPhoneNumber_, - InputPrivacyKeyAddedByPhone: InputPrivacyKeyAddedByPhone_, - InputPrivacyKeyVoiceMessages: InputPrivacyKeyVoiceMessages_, - InputPrivacyKeyAbout: InputPrivacyKeyAbout_, - InputPrivacyKeyBirthday: InputPrivacyKeyBirthday_, - PrivacyKeyStatusTimestamp: PrivacyKeyStatusTimestamp_, - PrivacyKeyChatInvite: PrivacyKeyChatInvite_, - PrivacyKeyPhoneCall: PrivacyKeyPhoneCall_, - PrivacyKeyPhoneP2P: PrivacyKeyPhoneP2P_, - PrivacyKeyForwards: PrivacyKeyForwards_, - PrivacyKeyProfilePhoto: PrivacyKeyProfilePhoto_, - PrivacyKeyPhoneNumber: PrivacyKeyPhoneNumber_, - PrivacyKeyAddedByPhone: PrivacyKeyAddedByPhone_, - PrivacyKeyVoiceMessages: PrivacyKeyVoiceMessages_, - PrivacyKeyAbout: PrivacyKeyAbout_, - PrivacyKeyBirthday: PrivacyKeyBirthday_, - InputPrivacyValueAllowContacts: InputPrivacyValueAllowContacts_, - InputPrivacyValueAllowAll: InputPrivacyValueAllowAll_, - InputPrivacyValueAllowUsers: InputPrivacyValueAllowUsers_, - InputPrivacyValueDisallowContacts: InputPrivacyValueDisallowContacts_, - InputPrivacyValueDisallowAll: InputPrivacyValueDisallowAll_, - InputPrivacyValueDisallowUsers: InputPrivacyValueDisallowUsers_, - InputPrivacyValueAllowChatParticipants: InputPrivacyValueAllowChatParticipants_, - InputPrivacyValueDisallowChatParticipants: InputPrivacyValueDisallowChatParticipants_, - InputPrivacyValueAllowCloseFriends: InputPrivacyValueAllowCloseFriends_, - InputPrivacyValueAllowPremium: InputPrivacyValueAllowPremium_, - PrivacyValueAllowContacts: PrivacyValueAllowContacts_, - PrivacyValueAllowAll: PrivacyValueAllowAll_, - PrivacyValueAllowUsers: PrivacyValueAllowUsers_, - PrivacyValueDisallowContacts: PrivacyValueDisallowContacts_, - PrivacyValueDisallowAll: PrivacyValueDisallowAll_, - PrivacyValueDisallowUsers: PrivacyValueDisallowUsers_, - PrivacyValueAllowChatParticipants: PrivacyValueAllowChatParticipants_, - PrivacyValueDisallowChatParticipants: PrivacyValueDisallowChatParticipants_, - PrivacyValueAllowCloseFriends: PrivacyValueAllowCloseFriends_, - PrivacyValueAllowPremium: PrivacyValueAllowPremium_, - AccountDaysTTL: AccountDaysTTL_, - DocumentAttributeImageSize: DocumentAttributeImageSize_, - DocumentAttributeAnimated: DocumentAttributeAnimated_, - DocumentAttributeSticker: DocumentAttributeSticker_, - DocumentAttributeVideo: DocumentAttributeVideo_, - DocumentAttributeAudio: DocumentAttributeAudio_, - DocumentAttributeFilename: DocumentAttributeFilename_, - DocumentAttributeHasStickers: DocumentAttributeHasStickers_, - DocumentAttributeCustomEmoji: DocumentAttributeCustomEmoji_, - StickerPack: StickerPack_, - WebPageEmpty: WebPageEmpty_, - WebPagePending: WebPagePending_, - WebPage: WebPage_, - WebPageNotModified: WebPageNotModified_, - Authorization: Authorization_, - ReceivedNotifyMessage: ReceivedNotifyMessage_, - ChatInviteExported: ChatInviteExported_, - ChatInvitePublicJoinRequests: ChatInvitePublicJoinRequests_, - ChatInviteAlready: ChatInviteAlready_, - ChatInvite: ChatInvite_, - ChatInvitePeek: ChatInvitePeek_, - InputStickerSetEmpty: InputStickerSetEmpty_, - InputStickerSetID: InputStickerSetID_, - InputStickerSetShortName: InputStickerSetShortName_, - InputStickerSetAnimatedEmoji: InputStickerSetAnimatedEmoji_, - InputStickerSetDice: InputStickerSetDice_, - InputStickerSetAnimatedEmojiAnimations: InputStickerSetAnimatedEmojiAnimations_, - InputStickerSetPremiumGifts: InputStickerSetPremiumGifts_, - InputStickerSetEmojiGenericAnimations: InputStickerSetEmojiGenericAnimations_, - InputStickerSetEmojiDefaultStatuses: InputStickerSetEmojiDefaultStatuses_, - InputStickerSetEmojiDefaultTopicIcons: InputStickerSetEmojiDefaultTopicIcons_, - InputStickerSetEmojiChannelDefaultStatuses: InputStickerSetEmojiChannelDefaultStatuses_, - StickerSet: StickerSet_, - BotCommand: BotCommand_, - BotInfo: BotInfo_, - KeyboardButton: KeyboardButton_, - KeyboardButtonUrl: KeyboardButtonUrl_, - KeyboardButtonCallback: KeyboardButtonCallback_, - KeyboardButtonRequestPhone: KeyboardButtonRequestPhone_, - KeyboardButtonRequestGeoLocation: KeyboardButtonRequestGeoLocation_, - KeyboardButtonSwitchInline: KeyboardButtonSwitchInline_, - KeyboardButtonGame: KeyboardButtonGame_, - KeyboardButtonBuy: KeyboardButtonBuy_, - KeyboardButtonUrlAuth: KeyboardButtonUrlAuth_, - InputKeyboardButtonUrlAuth: InputKeyboardButtonUrlAuth_, - KeyboardButtonRequestPoll: KeyboardButtonRequestPoll_, - InputKeyboardButtonUserProfile: InputKeyboardButtonUserProfile_, - KeyboardButtonUserProfile: KeyboardButtonUserProfile_, - KeyboardButtonWebView: KeyboardButtonWebView_, - KeyboardButtonSimpleWebView: KeyboardButtonSimpleWebView_, - KeyboardButtonRequestPeer: KeyboardButtonRequestPeer_, - InputKeyboardButtonRequestPeer: InputKeyboardButtonRequestPeer_, - KeyboardButtonRow: KeyboardButtonRow_, - ReplyKeyboardHide: ReplyKeyboardHide_, - ReplyKeyboardForceReply: ReplyKeyboardForceReply_, - ReplyKeyboardMarkup: ReplyKeyboardMarkup_, - ReplyInlineMarkup: ReplyInlineMarkup_, - MessageEntityUnknown: MessageEntityUnknown_, - MessageEntityMention: MessageEntityMention_, - MessageEntityHashtag: MessageEntityHashtag_, - MessageEntityBotCommand: MessageEntityBotCommand_, - MessageEntityUrl: MessageEntityUrl_, - MessageEntityEmail: MessageEntityEmail_, - MessageEntityBold: MessageEntityBold_, - MessageEntityItalic: MessageEntityItalic_, - MessageEntityCode: MessageEntityCode_, - MessageEntityPre: MessageEntityPre_, - MessageEntityTextUrl: MessageEntityTextUrl_, - MessageEntityMentionName: MessageEntityMentionName_, - InputMessageEntityMentionName: InputMessageEntityMentionName_, - MessageEntityPhone: MessageEntityPhone_, - MessageEntityCashtag: MessageEntityCashtag_, - MessageEntityUnderline: MessageEntityUnderline_, - MessageEntityStrike: MessageEntityStrike_, - MessageEntityBankCard: MessageEntityBankCard_, - MessageEntitySpoiler: MessageEntitySpoiler_, - MessageEntityCustomEmoji: MessageEntityCustomEmoji_, - MessageEntityBlockquote: MessageEntityBlockquote_, - InputChannelEmpty: InputChannelEmpty_, - InputChannel: InputChannel_, - InputChannelFromMessage: InputChannelFromMessage_, - MessageRange: MessageRange_, - ChannelMessagesFilterEmpty: ChannelMessagesFilterEmpty_, - ChannelMessagesFilter: ChannelMessagesFilter_, - ChannelParticipant: ChannelParticipant_, - ChannelParticipantSelf: ChannelParticipantSelf_, - ChannelParticipantCreator: ChannelParticipantCreator_, - ChannelParticipantAdmin: ChannelParticipantAdmin_, - ChannelParticipantBanned: ChannelParticipantBanned_, - ChannelParticipantLeft: ChannelParticipantLeft_, - ChannelParticipantsRecent: ChannelParticipantsRecent_, - ChannelParticipantsAdmins: ChannelParticipantsAdmins_, - ChannelParticipantsKicked: ChannelParticipantsKicked_, - ChannelParticipantsBots: ChannelParticipantsBots_, - ChannelParticipantsBanned: ChannelParticipantsBanned_, - ChannelParticipantsSearch: ChannelParticipantsSearch_, - ChannelParticipantsContacts: ChannelParticipantsContacts_, - ChannelParticipantsMentions: ChannelParticipantsMentions_, - InputBotInlineMessageMediaAuto: InputBotInlineMessageMediaAuto_, - InputBotInlineMessageText: InputBotInlineMessageText_, - InputBotInlineMessageMediaGeo: InputBotInlineMessageMediaGeo_, - InputBotInlineMessageMediaVenue: InputBotInlineMessageMediaVenue_, - InputBotInlineMessageMediaContact: InputBotInlineMessageMediaContact_, - InputBotInlineMessageGame: InputBotInlineMessageGame_, - InputBotInlineMessageMediaInvoice: InputBotInlineMessageMediaInvoice_, - InputBotInlineMessageMediaWebPage: InputBotInlineMessageMediaWebPage_, - InputBotInlineResult: InputBotInlineResult_, - InputBotInlineResultPhoto: InputBotInlineResultPhoto_, - InputBotInlineResultDocument: InputBotInlineResultDocument_, - InputBotInlineResultGame: InputBotInlineResultGame_, - BotInlineMessageMediaAuto: BotInlineMessageMediaAuto_, - BotInlineMessageText: BotInlineMessageText_, - BotInlineMessageMediaGeo: BotInlineMessageMediaGeo_, - BotInlineMessageMediaVenue: BotInlineMessageMediaVenue_, - BotInlineMessageMediaContact: BotInlineMessageMediaContact_, - BotInlineMessageMediaInvoice: BotInlineMessageMediaInvoice_, - BotInlineMessageMediaWebPage: BotInlineMessageMediaWebPage_, - BotInlineResult: BotInlineResult_, - BotInlineMediaResult: BotInlineMediaResult_, - ExportedMessageLink: ExportedMessageLink_, - MessageFwdHeader: MessageFwdHeader_, - InputBotInlineMessageID: InputBotInlineMessageID_, - InputBotInlineMessageID64: InputBotInlineMessageID64_, - InlineBotSwitchPM: InlineBotSwitchPM_, - TopPeer: TopPeer_, - TopPeerCategoryBotsPM: TopPeerCategoryBotsPM_, - TopPeerCategoryBotsInline: TopPeerCategoryBotsInline_, - TopPeerCategoryCorrespondents: TopPeerCategoryCorrespondents_, - TopPeerCategoryGroups: TopPeerCategoryGroups_, - TopPeerCategoryChannels: TopPeerCategoryChannels_, - TopPeerCategoryPhoneCalls: TopPeerCategoryPhoneCalls_, - TopPeerCategoryForwardUsers: TopPeerCategoryForwardUsers_, - TopPeerCategoryForwardChats: TopPeerCategoryForwardChats_, - TopPeerCategoryPeers: TopPeerCategoryPeers_, - DraftMessageEmpty: DraftMessageEmpty_, - DraftMessage: DraftMessage_, - StickerSetCovered: StickerSetCovered_, - StickerSetMultiCovered: StickerSetMultiCovered_, - StickerSetFullCovered: StickerSetFullCovered_, - StickerSetNoCovered: StickerSetNoCovered_, - MaskCoords: MaskCoords_, - InputStickeredMediaPhoto: InputStickeredMediaPhoto_, - InputStickeredMediaDocument: InputStickeredMediaDocument_, - Game: Game_, - InputGameID: InputGameID_, - InputGameShortName: InputGameShortName_, - HighScore: HighScore_, - TextEmpty: TextEmpty_, - TextPlain: TextPlain_, - TextBold: TextBold_, - TextItalic: TextItalic_, - TextUnderline: TextUnderline_, - TextStrike: TextStrike_, - TextFixed: TextFixed_, - TextUrl: TextUrl_, - TextEmail: TextEmail_, - TextConcat: TextConcat_, - TextSubscript: TextSubscript_, - TextSuperscript: TextSuperscript_, - TextMarked: TextMarked_, - TextPhone: TextPhone_, - TextImage: TextImage_, - TextAnchor: TextAnchor_, - PageBlockUnsupported: PageBlockUnsupported_, - PageBlockTitle: PageBlockTitle_, - PageBlockSubtitle: PageBlockSubtitle_, - PageBlockAuthorDate: PageBlockAuthorDate_, - PageBlockHeader: PageBlockHeader_, - PageBlockSubheader: PageBlockSubheader_, - PageBlockParagraph: PageBlockParagraph_, - PageBlockPreformatted: PageBlockPreformatted_, - PageBlockFooter: PageBlockFooter_, - PageBlockDivider: PageBlockDivider_, - PageBlockAnchor: PageBlockAnchor_, - PageBlockList: PageBlockList_, - PageBlockBlockquote: PageBlockBlockquote_, - PageBlockPullquote: PageBlockPullquote_, - PageBlockPhoto: PageBlockPhoto_, - PageBlockVideo: PageBlockVideo_, - PageBlockCover: PageBlockCover_, - PageBlockEmbed: PageBlockEmbed_, - PageBlockEmbedPost: PageBlockEmbedPost_, - PageBlockCollage: PageBlockCollage_, - PageBlockSlideshow: PageBlockSlideshow_, - PageBlockChannel: PageBlockChannel_, - PageBlockAudio: PageBlockAudio_, - PageBlockKicker: PageBlockKicker_, - PageBlockTable: PageBlockTable_, - PageBlockOrderedList: PageBlockOrderedList_, - PageBlockDetails: PageBlockDetails_, - PageBlockRelatedArticles: PageBlockRelatedArticles_, - PageBlockMap: PageBlockMap_, - PhoneCallDiscardReasonMissed: PhoneCallDiscardReasonMissed_, - PhoneCallDiscardReasonDisconnect: PhoneCallDiscardReasonDisconnect_, - PhoneCallDiscardReasonHangup: PhoneCallDiscardReasonHangup_, - PhoneCallDiscardReasonBusy: PhoneCallDiscardReasonBusy_, - DataJSON: DataJSON_, - LabeledPrice: LabeledPrice_, - Invoice: Invoice_, - PaymentCharge: PaymentCharge_, - PostAddress: PostAddress_, - PaymentRequestedInfo: PaymentRequestedInfo_, - PaymentSavedCredentialsCard: PaymentSavedCredentialsCard_, - WebDocument: WebDocument_, - WebDocumentNoProxy: WebDocumentNoProxy_, - InputWebDocument: InputWebDocument_, - InputWebFileLocation: InputWebFileLocation_, - InputWebFileGeoPointLocation: InputWebFileGeoPointLocation_, - InputWebFileAudioAlbumThumbLocation: InputWebFileAudioAlbumThumbLocation_, - InputPaymentCredentialsSaved: InputPaymentCredentialsSaved_, - InputPaymentCredentials: InputPaymentCredentials_, - InputPaymentCredentialsApplePay: InputPaymentCredentialsApplePay_, - InputPaymentCredentialsGooglePay: InputPaymentCredentialsGooglePay_, - ShippingOption: ShippingOption_, - InputStickerSetItem: InputStickerSetItem_, - InputPhoneCall: InputPhoneCall_, - PhoneCallEmpty: PhoneCallEmpty_, - PhoneCallWaiting: PhoneCallWaiting_, - PhoneCallRequested: PhoneCallRequested_, - PhoneCallAccepted: PhoneCallAccepted_, - PhoneCall: PhoneCall_, - PhoneCallDiscarded: PhoneCallDiscarded_, - PhoneConnection: PhoneConnection_, - PhoneConnectionWebrtc: PhoneConnectionWebrtc_, - PhoneCallProtocol: PhoneCallProtocol_, - CdnPublicKey: CdnPublicKey_, - CdnConfig: CdnConfig_, - LangPackString: LangPackString_, - LangPackStringPluralized: LangPackStringPluralized_, - LangPackStringDeleted: LangPackStringDeleted_, - LangPackDifference: LangPackDifference_, - LangPackLanguage: LangPackLanguage_, - ChannelAdminLogEventActionChangeTitle: ChannelAdminLogEventActionChangeTitle_, - ChannelAdminLogEventActionChangeAbout: ChannelAdminLogEventActionChangeAbout_, - ChannelAdminLogEventActionChangeUsername: ChannelAdminLogEventActionChangeUsername_, - ChannelAdminLogEventActionChangePhoto: ChannelAdminLogEventActionChangePhoto_, - ChannelAdminLogEventActionToggleInvites: ChannelAdminLogEventActionToggleInvites_, - ChannelAdminLogEventActionToggleSignatures: ChannelAdminLogEventActionToggleSignatures_, - ChannelAdminLogEventActionUpdatePinned: ChannelAdminLogEventActionUpdatePinned_, - ChannelAdminLogEventActionEditMessage: ChannelAdminLogEventActionEditMessage_, - ChannelAdminLogEventActionDeleteMessage: ChannelAdminLogEventActionDeleteMessage_, - ChannelAdminLogEventActionParticipantJoin: ChannelAdminLogEventActionParticipantJoin_, - ChannelAdminLogEventActionParticipantLeave: ChannelAdminLogEventActionParticipantLeave_, - ChannelAdminLogEventActionParticipantInvite: ChannelAdminLogEventActionParticipantInvite_, - ChannelAdminLogEventActionParticipantToggleBan: ChannelAdminLogEventActionParticipantToggleBan_, - ChannelAdminLogEventActionParticipantToggleAdmin: ChannelAdminLogEventActionParticipantToggleAdmin_, - ChannelAdminLogEventActionChangeStickerSet: ChannelAdminLogEventActionChangeStickerSet_, - ChannelAdminLogEventActionTogglePreHistoryHidden: ChannelAdminLogEventActionTogglePreHistoryHidden_, - ChannelAdminLogEventActionDefaultBannedRights: ChannelAdminLogEventActionDefaultBannedRights_, - ChannelAdminLogEventActionStopPoll: ChannelAdminLogEventActionStopPoll_, - ChannelAdminLogEventActionChangeLinkedChat: ChannelAdminLogEventActionChangeLinkedChat_, - ChannelAdminLogEventActionChangeLocation: ChannelAdminLogEventActionChangeLocation_, - ChannelAdminLogEventActionToggleSlowMode: ChannelAdminLogEventActionToggleSlowMode_, - ChannelAdminLogEventActionStartGroupCall: ChannelAdminLogEventActionStartGroupCall_, - ChannelAdminLogEventActionDiscardGroupCall: ChannelAdminLogEventActionDiscardGroupCall_, - ChannelAdminLogEventActionParticipantMute: ChannelAdminLogEventActionParticipantMute_, - ChannelAdminLogEventActionParticipantUnmute: ChannelAdminLogEventActionParticipantUnmute_, - ChannelAdminLogEventActionToggleGroupCallSetting: ChannelAdminLogEventActionToggleGroupCallSetting_, - ChannelAdminLogEventActionParticipantJoinByInvite: ChannelAdminLogEventActionParticipantJoinByInvite_, - ChannelAdminLogEventActionExportedInviteDelete: ChannelAdminLogEventActionExportedInviteDelete_, - ChannelAdminLogEventActionExportedInviteRevoke: ChannelAdminLogEventActionExportedInviteRevoke_, - ChannelAdminLogEventActionExportedInviteEdit: ChannelAdminLogEventActionExportedInviteEdit_, - ChannelAdminLogEventActionParticipantVolume: ChannelAdminLogEventActionParticipantVolume_, - ChannelAdminLogEventActionChangeHistoryTTL: ChannelAdminLogEventActionChangeHistoryTTL_, - ChannelAdminLogEventActionParticipantJoinByRequest: ChannelAdminLogEventActionParticipantJoinByRequest_, - ChannelAdminLogEventActionToggleNoForwards: ChannelAdminLogEventActionToggleNoForwards_, - ChannelAdminLogEventActionSendMessage: ChannelAdminLogEventActionSendMessage_, - ChannelAdminLogEventActionChangeAvailableReactions: ChannelAdminLogEventActionChangeAvailableReactions_, - ChannelAdminLogEventActionChangeUsernames: ChannelAdminLogEventActionChangeUsernames_, - ChannelAdminLogEventActionToggleForum: ChannelAdminLogEventActionToggleForum_, - ChannelAdminLogEventActionCreateTopic: ChannelAdminLogEventActionCreateTopic_, - ChannelAdminLogEventActionEditTopic: ChannelAdminLogEventActionEditTopic_, - ChannelAdminLogEventActionDeleteTopic: ChannelAdminLogEventActionDeleteTopic_, - ChannelAdminLogEventActionPinTopic: ChannelAdminLogEventActionPinTopic_, - ChannelAdminLogEventActionToggleAntiSpam: ChannelAdminLogEventActionToggleAntiSpam_, - ChannelAdminLogEventActionChangePeerColor: ChannelAdminLogEventActionChangePeerColor_, - ChannelAdminLogEventActionChangeProfilePeerColor: ChannelAdminLogEventActionChangeProfilePeerColor_, - ChannelAdminLogEventActionChangeWallpaper: ChannelAdminLogEventActionChangeWallpaper_, - ChannelAdminLogEventActionChangeEmojiStatus: ChannelAdminLogEventActionChangeEmojiStatus_, - ChannelAdminLogEventActionChangeEmojiStickerSet: ChannelAdminLogEventActionChangeEmojiStickerSet_, - ChannelAdminLogEvent: ChannelAdminLogEvent_, - ChannelAdminLogEventsFilter: ChannelAdminLogEventsFilter_, - PopularContact: PopularContact_, - RecentMeUrlUnknown: RecentMeUrlUnknown_, - RecentMeUrlUser: RecentMeUrlUser_, - RecentMeUrlChat: RecentMeUrlChat_, - RecentMeUrlChatInvite: RecentMeUrlChatInvite_, - RecentMeUrlStickerSet: RecentMeUrlStickerSet_, - InputSingleMedia: InputSingleMedia_, - WebAuthorization: WebAuthorization_, - InputMessageID: InputMessageID_, - InputMessageReplyTo: InputMessageReplyTo_, - InputMessagePinned: InputMessagePinned_, - InputMessageCallbackQuery: InputMessageCallbackQuery_, - InputDialogPeer: InputDialogPeer_, - InputDialogPeerFolder: InputDialogPeerFolder_, - DialogPeer: DialogPeer_, - DialogPeerFolder: DialogPeerFolder_, - FileHash: FileHash_, - InputClientProxy: InputClientProxy_, - InputSecureFileUploaded: InputSecureFileUploaded_, - InputSecureFile: InputSecureFile_, - SecureFileEmpty: SecureFileEmpty_, - SecureFile: SecureFile_, - SecureData: SecureData_, - SecurePlainPhone: SecurePlainPhone_, - SecurePlainEmail: SecurePlainEmail_, - SecureValueTypePersonalDetails: SecureValueTypePersonalDetails_, - SecureValueTypePassport: SecureValueTypePassport_, - SecureValueTypeDriverLicense: SecureValueTypeDriverLicense_, - SecureValueTypeIdentityCard: SecureValueTypeIdentityCard_, - SecureValueTypeInternalPassport: SecureValueTypeInternalPassport_, - SecureValueTypeAddress: SecureValueTypeAddress_, - SecureValueTypeUtilityBill: SecureValueTypeUtilityBill_, - SecureValueTypeBankStatement: SecureValueTypeBankStatement_, - SecureValueTypeRentalAgreement: SecureValueTypeRentalAgreement_, - SecureValueTypePassportRegistration: SecureValueTypePassportRegistration_, - SecureValueTypeTemporaryRegistration: SecureValueTypeTemporaryRegistration_, - SecureValueTypePhone: SecureValueTypePhone_, - SecureValueTypeEmail: SecureValueTypeEmail_, - SecureValue: SecureValue_, - InputSecureValue: InputSecureValue_, - SecureValueHash: SecureValueHash_, - SecureValueErrorData: SecureValueErrorData_, - SecureValueErrorFrontSide: SecureValueErrorFrontSide_, - SecureValueErrorReverseSide: SecureValueErrorReverseSide_, - SecureValueErrorSelfie: SecureValueErrorSelfie_, - SecureValueErrorFile: SecureValueErrorFile_, - SecureValueErrorFiles: SecureValueErrorFiles_, - SecureValueError: SecureValueError_, - SecureValueErrorTranslationFile: SecureValueErrorTranslationFile_, - SecureValueErrorTranslationFiles: SecureValueErrorTranslationFiles_, - SecureCredentialsEncrypted: SecureCredentialsEncrypted_, - SavedPhoneContact: SavedPhoneContact_, - PasswordKdfAlgoUnknown: PasswordKdfAlgoUnknown_, - PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow: PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_, - SecurePasswordKdfAlgoUnknown: SecurePasswordKdfAlgoUnknown_, - SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000: SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000_, - SecurePasswordKdfAlgoSHA512: SecurePasswordKdfAlgoSHA512_, - SecureSecretSettings: SecureSecretSettings_, - InputCheckPasswordEmpty: InputCheckPasswordEmpty_, - InputCheckPasswordSRP: InputCheckPasswordSRP_, - SecureRequiredType: SecureRequiredType_, - SecureRequiredTypeOneOf: SecureRequiredTypeOneOf_, - InputAppEvent: InputAppEvent_, - JsonObjectValue: JsonObjectValue_, - JsonNull: JsonNull_, - JsonBool: JsonBool_, - JsonNumber: JsonNumber_, - JsonString: JsonString_, - JsonArray: JsonArray_, - JsonObject: JsonObject_, - PageTableCell: PageTableCell_, - PageTableRow: PageTableRow_, - PageCaption: PageCaption_, - PageListItemText: PageListItemText_, - PageListItemBlocks: PageListItemBlocks_, - PageListOrderedItemText: PageListOrderedItemText_, - PageListOrderedItemBlocks: PageListOrderedItemBlocks_, - PageRelatedArticle: PageRelatedArticle_, - Page: Page_, - PollAnswer: PollAnswer_, - Poll: Poll_, - PollAnswerVoters: PollAnswerVoters_, - PollResults: PollResults_, - ChatOnlines: ChatOnlines_, - StatsURL: StatsURL_, - ChatAdminRights: ChatAdminRights_, - ChatBannedRights: ChatBannedRights_, - InputWallPaper: InputWallPaper_, - InputWallPaperSlug: InputWallPaperSlug_, - InputWallPaperNoFile: InputWallPaperNoFile_, - CodeSettings: CodeSettings_, - WallPaperSettings: WallPaperSettings_, - AutoDownloadSettings: AutoDownloadSettings_, - EmojiKeyword: EmojiKeyword_, - EmojiKeywordDeleted: EmojiKeywordDeleted_, - EmojiKeywordsDifference: EmojiKeywordsDifference_, - EmojiURL: EmojiURL_, - EmojiLanguage: EmojiLanguage_, - Folder: Folder_, - InputFolderPeer: InputFolderPeer_, - FolderPeer: FolderPeer_, - UrlAuthResultRequest: UrlAuthResultRequest_, - UrlAuthResultAccepted: UrlAuthResultAccepted_, - UrlAuthResultDefault: UrlAuthResultDefault_, - ChannelLocationEmpty: ChannelLocationEmpty_, - ChannelLocation: ChannelLocation_, - PeerLocated: PeerLocated_, - PeerSelfLocated: PeerSelfLocated_, - RestrictionReason: RestrictionReason_, - InputTheme: InputTheme_, - InputThemeSlug: InputThemeSlug_, - Theme: Theme_, - BaseThemeClassic: BaseThemeClassic_, - BaseThemeDay: BaseThemeDay_, - BaseThemeNight: BaseThemeNight_, - BaseThemeTinted: BaseThemeTinted_, - BaseThemeArctic: BaseThemeArctic_, - InputThemeSettings: InputThemeSettings_, - ThemeSettings: ThemeSettings_, - WebPageAttributeTheme: WebPageAttributeTheme_, - WebPageAttributeStory: WebPageAttributeStory_, - BankCardOpenUrl: BankCardOpenUrl_, - DialogFilter: DialogFilter_, - DialogFilterDefault: DialogFilterDefault_, - DialogFilterChatlist: DialogFilterChatlist_, - DialogFilterSuggested: DialogFilterSuggested_, - StatsDateRangeDays: StatsDateRangeDays_, - StatsAbsValueAndPrev: StatsAbsValueAndPrev_, - StatsPercentValue: StatsPercentValue_, - StatsGraphAsync: StatsGraphAsync_, - StatsGraphError: StatsGraphError_, - StatsGraph: StatsGraph_, - VideoSize: VideoSize_, - VideoSizeEmojiMarkup: VideoSizeEmojiMarkup_, - VideoSizeStickerMarkup: VideoSizeStickerMarkup_, - StatsGroupTopPoster: StatsGroupTopPoster_, - StatsGroupTopAdmin: StatsGroupTopAdmin_, - StatsGroupTopInviter: StatsGroupTopInviter_, - GlobalPrivacySettings: GlobalPrivacySettings_, - MessageViews: MessageViews_, - MessageReplyHeader: MessageReplyHeader_, - MessageReplyStoryHeader: MessageReplyStoryHeader_, - MessageReplies: MessageReplies_, - PeerBlocked: PeerBlocked_, - GroupCallDiscarded: GroupCallDiscarded_, - GroupCall: GroupCall_, - InputGroupCall: InputGroupCall_, - GroupCallParticipant: GroupCallParticipant_, - InlineQueryPeerTypeSameBotPM: InlineQueryPeerTypeSameBotPM_, - InlineQueryPeerTypePM: InlineQueryPeerTypePM_, - InlineQueryPeerTypeChat: InlineQueryPeerTypeChat_, - InlineQueryPeerTypeMegagroup: InlineQueryPeerTypeMegagroup_, - InlineQueryPeerTypeBroadcast: InlineQueryPeerTypeBroadcast_, - InlineQueryPeerTypeBotPM: InlineQueryPeerTypeBotPM_, - ChatInviteImporter: ChatInviteImporter_, - ChatAdminWithInvites: ChatAdminWithInvites_, - GroupCallParticipantVideoSourceGroup: GroupCallParticipantVideoSourceGroup_, - GroupCallParticipantVideo: GroupCallParticipantVideo_, - BotCommandScopeDefault: BotCommandScopeDefault_, - BotCommandScopeUsers: BotCommandScopeUsers_, - BotCommandScopeChats: BotCommandScopeChats_, - BotCommandScopeChatAdmins: BotCommandScopeChatAdmins_, - BotCommandScopePeer: BotCommandScopePeer_, - BotCommandScopePeerAdmins: BotCommandScopePeerAdmins_, - BotCommandScopePeerUser: BotCommandScopePeerUser_, - SponsoredMessage: SponsoredMessage_, - SearchResultsCalendarPeriod: SearchResultsCalendarPeriod_, - SearchResultPosition: SearchResultPosition_, - ReactionCount: ReactionCount_, - MessageReactions: MessageReactions_, - AvailableReaction: AvailableReaction_, - MessagePeerReaction: MessagePeerReaction_, - GroupCallStreamChannel: GroupCallStreamChannel_, - AttachMenuBotIconColor: AttachMenuBotIconColor_, - AttachMenuBotIcon: AttachMenuBotIcon_, - AttachMenuBot: AttachMenuBot_, - AttachMenuBotsNotModified: AttachMenuBotsNotModified_, - AttachMenuBots: AttachMenuBots_, - AttachMenuBotsBot: AttachMenuBotsBot_, - WebViewResultUrl: WebViewResultUrl_, - SimpleWebViewResultUrl: SimpleWebViewResultUrl_, - WebViewMessageSent: WebViewMessageSent_, - BotMenuButtonDefault: BotMenuButtonDefault_, - BotMenuButtonCommands: BotMenuButtonCommands_, - BotMenuButton: BotMenuButton_, - NotificationSoundDefault: NotificationSoundDefault_, - NotificationSoundNone: NotificationSoundNone_, - NotificationSoundLocal: NotificationSoundLocal_, - NotificationSoundRingtone: NotificationSoundRingtone_, - AttachMenuPeerTypeSameBotPM: AttachMenuPeerTypeSameBotPM_, - AttachMenuPeerTypeBotPM: AttachMenuPeerTypeBotPM_, - AttachMenuPeerTypePM: AttachMenuPeerTypePM_, - AttachMenuPeerTypeChat: AttachMenuPeerTypeChat_, - AttachMenuPeerTypeBroadcast: AttachMenuPeerTypeBroadcast_, - InputInvoiceMessage: InputInvoiceMessage_, - InputInvoiceSlug: InputInvoiceSlug_, - InputInvoicePremiumGiftCode: InputInvoicePremiumGiftCode_, - InputStorePaymentPremiumSubscription: InputStorePaymentPremiumSubscription_, - InputStorePaymentGiftPremium: InputStorePaymentGiftPremium_, - InputStorePaymentPremiumGiftCode: InputStorePaymentPremiumGiftCode_, - InputStorePaymentPremiumGiveaway: InputStorePaymentPremiumGiveaway_, - PremiumGiftOption: PremiumGiftOption_, - PaymentFormMethod: PaymentFormMethod_, - EmojiStatusEmpty: EmojiStatusEmpty_, - EmojiStatus: EmojiStatus_, - EmojiStatusUntil: EmojiStatusUntil_, - ReactionEmpty: ReactionEmpty_, - ReactionEmoji: ReactionEmoji_, - ReactionCustomEmoji: ReactionCustomEmoji_, - ChatReactionsNone: ChatReactionsNone_, - ChatReactionsAll: ChatReactionsAll_, - ChatReactionsSome: ChatReactionsSome_, - EmailVerifyPurposeLoginSetup: EmailVerifyPurposeLoginSetup_, - EmailVerifyPurposeLoginChange: EmailVerifyPurposeLoginChange_, - EmailVerifyPurposePassport: EmailVerifyPurposePassport_, - EmailVerificationCode: EmailVerificationCode_, - EmailVerificationGoogle: EmailVerificationGoogle_, - EmailVerificationApple: EmailVerificationApple_, - PremiumSubscriptionOption: PremiumSubscriptionOption_, - SendAsPeer: SendAsPeer_, - MessageExtendedMediaPreview: MessageExtendedMediaPreview_, - MessageExtendedMedia: MessageExtendedMedia_, - StickerKeyword: StickerKeyword_, - Username: Username_, - ForumTopicDeleted: ForumTopicDeleted_, - ForumTopic: ForumTopic_, - DefaultHistoryTTL: DefaultHistoryTTL_, - ExportedContactToken: ExportedContactToken_, - RequestPeerTypeUser: RequestPeerTypeUser_, - RequestPeerTypeChat: RequestPeerTypeChat_, - RequestPeerTypeBroadcast: RequestPeerTypeBroadcast_, - EmojiListNotModified: EmojiListNotModified_, - EmojiList: EmojiList_, - EmojiGroup: EmojiGroup_, - TextWithEntities: TextWithEntities_, - AutoSaveSettings: AutoSaveSettings_, - AutoSaveException: AutoSaveException_, - InputBotAppID: InputBotAppID_, - InputBotAppShortName: InputBotAppShortName_, - BotAppNotModified: BotAppNotModified_, - BotApp: BotApp_, - AppWebViewResultUrl: AppWebViewResultUrl_, - InlineBotWebView: InlineBotWebView_, - ReadParticipantDate: ReadParticipantDate_, - InputChatlistDialogFilter: InputChatlistDialogFilter_, - ExportedChatlistInvite: ExportedChatlistInvite_, - MessagePeerVote: MessagePeerVote_, - MessagePeerVoteInputOption: MessagePeerVoteInputOption_, - MessagePeerVoteMultiple: MessagePeerVoteMultiple_, - SponsoredWebPage: SponsoredWebPage_, - StoryViews: StoryViews_, - StoryItemDeleted: StoryItemDeleted_, - StoryItemSkipped: StoryItemSkipped_, - StoryItem: StoryItem_, - StoryView: StoryView_, - StoryViewPublicForward: StoryViewPublicForward_, - StoryViewPublicRepost: StoryViewPublicRepost_, - InputReplyToMessage: InputReplyToMessage_, - InputReplyToStory: InputReplyToStory_, - ExportedStoryLink: ExportedStoryLink_, - StoriesStealthMode: StoriesStealthMode_, - MediaAreaCoordinates: MediaAreaCoordinates_, - MediaAreaVenue: MediaAreaVenue_, - InputMediaAreaVenue: InputMediaAreaVenue_, - MediaAreaGeoPoint: MediaAreaGeoPoint_, - MediaAreaSuggestedReaction: MediaAreaSuggestedReaction_, - MediaAreaChannelPost: MediaAreaChannelPost_, - InputMediaAreaChannelPost: InputMediaAreaChannelPost_, - PeerStories: PeerStories_, - PremiumGiftCodeOption: PremiumGiftCodeOption_, - PrepaidGiveaway: PrepaidGiveaway_, - Boost: Boost_, - MyBoost: MyBoost_, - StoryFwdHeader: StoryFwdHeader_, - PostInteractionCountersMessage: PostInteractionCountersMessage_, - PostInteractionCountersStory: PostInteractionCountersStory_, - PublicForwardMessage: PublicForwardMessage_, - PublicForwardStory: PublicForwardStory_, - PeerColor: PeerColor_, - StoryReaction: StoryReaction_, - StoryReactionPublicForward: StoryReactionPublicForward_, - StoryReactionPublicRepost: StoryReactionPublicRepost_, - SavedDialog: SavedDialog_, - SavedReactionTag: SavedReactionTag_, - OutboxReadDate: OutboxReadDate_, - SmsJob: SmsJob_, - BusinessWeeklyOpen: BusinessWeeklyOpen_, - BusinessWorkHours: BusinessWorkHours_, - BusinessLocation: BusinessLocation_, - InputBusinessRecipients: InputBusinessRecipients_, - BusinessRecipients: BusinessRecipients_, - BusinessAwayMessageScheduleAlways: BusinessAwayMessageScheduleAlways_, - BusinessAwayMessageScheduleOutsideWorkHours: BusinessAwayMessageScheduleOutsideWorkHours_, - BusinessAwayMessageScheduleCustom: BusinessAwayMessageScheduleCustom_, - InputBusinessGreetingMessage: InputBusinessGreetingMessage_, - BusinessGreetingMessage: BusinessGreetingMessage_, - InputBusinessAwayMessage: InputBusinessAwayMessage_, - BusinessAwayMessage: BusinessAwayMessage_, - Timezone: Timezone_, - QuickReply: QuickReply_, - InputQuickReplyShortcut: InputQuickReplyShortcut_, - InputQuickReplyShortcutId: InputQuickReplyShortcutId_, - ConnectedBot: ConnectedBot_, - Birthday: Birthday_, - BotBusinessConnection: BotBusinessConnection_, - InputBusinessIntro: InputBusinessIntro_, - BusinessIntro: BusinessIntro_, - InputCollectibleUsername: InputCollectibleUsername_, - InputCollectiblePhone: InputCollectiblePhone_, - InputBusinessBotRecipients: InputBusinessBotRecipients_, - BusinessBotRecipients: BusinessBotRecipients_, - ContactBirthday: ContactBirthday_, - MissingInvitee: MissingInvitee_, - InputBusinessChatLink: InputBusinessChatLink_, - BusinessChatLink: BusinessChatLink_, - RequestedPeerUser: RequestedPeerUser_, - RequestedPeerChat: RequestedPeerChat_, - RequestedPeerChannel: RequestedPeerChannel_, - SponsoredMessageReportOption: SponsoredMessageReportOption_, - BroadcastRevenueTransactionProceeds: BroadcastRevenueTransactionProceeds_, - BroadcastRevenueTransactionWithdrawal: BroadcastRevenueTransactionWithdrawal_, - BroadcastRevenueTransactionRefund: BroadcastRevenueTransactionRefund_, - help: { - ConfigSimple: help_ConfigSimple_, - AppUpdate: help_AppUpdate_, - NoAppUpdate: help_NoAppUpdate_, - InviteText: help_InviteText_, - Support: help_Support_, - TermsOfService: help_TermsOfService_, - RecentMeUrls: help_RecentMeUrls_, - TermsOfServiceUpdateEmpty: help_TermsOfServiceUpdateEmpty_, - TermsOfServiceUpdate: help_TermsOfServiceUpdate_, - DeepLinkInfoEmpty: help_DeepLinkInfoEmpty_, - DeepLinkInfo: help_DeepLinkInfo_, - PassportConfigNotModified: help_PassportConfigNotModified_, - PassportConfig: help_PassportConfig_, - SupportName: help_SupportName_, - UserInfoEmpty: help_UserInfoEmpty_, - UserInfo: help_UserInfo_, - PromoDataEmpty: help_PromoDataEmpty_, - PromoData: help_PromoData_, - CountryCode: help_CountryCode_, - Country: help_Country_, - CountriesListNotModified: help_CountriesListNotModified_, - CountriesList: help_CountriesList_, - PremiumPromo: help_PremiumPromo_, - AppConfigNotModified: help_AppConfigNotModified_, - AppConfig: help_AppConfig_, - PeerColorSet: help_PeerColorSet_, - PeerColorProfileSet: help_PeerColorProfileSet_, - PeerColorOption: help_PeerColorOption_, - PeerColorsNotModified: help_PeerColorsNotModified_, - PeerColors: help_PeerColors_, - TimezonesListNotModified: help_TimezonesListNotModified_, - TimezonesList: help_TimezonesList_, - }, - storage: { - FileUnknown: storage_FileUnknown_, - FilePartial: storage_FilePartial_, - FileJpeg: storage_FileJpeg_, - FileGif: storage_FileGif_, - FilePng: storage_FilePng_, - FilePdf: storage_FilePdf_, - FileMp3: storage_FileMp3_, - FileMov: storage_FileMov_, - FileMp4: storage_FileMp4_, - FileWebp: storage_FileWebp_, - }, - auth: { - SentCode: auth_SentCode_, - SentCodeSuccess: auth_SentCodeSuccess_, - Authorization: auth_Authorization_, - AuthorizationSignUpRequired: auth_AuthorizationSignUpRequired_, - ExportedAuthorization: auth_ExportedAuthorization_, - PasswordRecovery: auth_PasswordRecovery_, - CodeTypeSms: auth_CodeTypeSms_, - CodeTypeCall: auth_CodeTypeCall_, - CodeTypeFlashCall: auth_CodeTypeFlashCall_, - CodeTypeMissedCall: auth_CodeTypeMissedCall_, - CodeTypeFragmentSms: auth_CodeTypeFragmentSms_, - SentCodeTypeApp: auth_SentCodeTypeApp_, - SentCodeTypeSms: auth_SentCodeTypeSms_, - SentCodeTypeCall: auth_SentCodeTypeCall_, - SentCodeTypeFlashCall: auth_SentCodeTypeFlashCall_, - SentCodeTypeMissedCall: auth_SentCodeTypeMissedCall_, - SentCodeTypeEmailCode: auth_SentCodeTypeEmailCode_, - SentCodeTypeSetUpEmailRequired: auth_SentCodeTypeSetUpEmailRequired_, - SentCodeTypeFragmentSms: auth_SentCodeTypeFragmentSms_, - SentCodeTypeFirebaseSms: auth_SentCodeTypeFirebaseSms_, - LoginToken: auth_LoginToken_, - LoginTokenMigrateTo: auth_LoginTokenMigrateTo_, - LoginTokenSuccess: auth_LoginTokenSuccess_, - LoggedOut: auth_LoggedOut_, - }, - contacts: { - ContactsNotModified: contacts_ContactsNotModified_, - Contacts: contacts_Contacts_, - ImportedContacts: contacts_ImportedContacts_, - Blocked: contacts_Blocked_, - BlockedSlice: contacts_BlockedSlice_, - Found: contacts_Found_, - ResolvedPeer: contacts_ResolvedPeer_, - TopPeersNotModified: contacts_TopPeersNotModified_, - TopPeers: contacts_TopPeers_, - TopPeersDisabled: contacts_TopPeersDisabled_, - ContactBirthdays: contacts_ContactBirthdays_, - }, - messages: { - Dialogs: messages_Dialogs_, - DialogsSlice: messages_DialogsSlice_, - DialogsNotModified: messages_DialogsNotModified_, - Messages: messages_Messages_, - MessagesSlice: messages_MessagesSlice_, - ChannelMessages: messages_ChannelMessages_, - MessagesNotModified: messages_MessagesNotModified_, - Chats: messages_Chats_, - ChatsSlice: messages_ChatsSlice_, - ChatFull: messages_ChatFull_, - AffectedHistory: messages_AffectedHistory_, - DhConfigNotModified: messages_DhConfigNotModified_, - DhConfig: messages_DhConfig_, - SentEncryptedMessage: messages_SentEncryptedMessage_, - SentEncryptedFile: messages_SentEncryptedFile_, - StickersNotModified: messages_StickersNotModified_, - Stickers: messages_Stickers_, - AllStickersNotModified: messages_AllStickersNotModified_, - AllStickers: messages_AllStickers_, - AffectedMessages: messages_AffectedMessages_, - StickerSet: messages_StickerSet_, - StickerSetNotModified: messages_StickerSetNotModified_, - SavedGifsNotModified: messages_SavedGifsNotModified_, - SavedGifs: messages_SavedGifs_, - BotResults: messages_BotResults_, - BotCallbackAnswer: messages_BotCallbackAnswer_, - MessageEditData: messages_MessageEditData_, - PeerDialogs: messages_PeerDialogs_, - FeaturedStickersNotModified: messages_FeaturedStickersNotModified_, - FeaturedStickers: messages_FeaturedStickers_, - RecentStickersNotModified: messages_RecentStickersNotModified_, - RecentStickers: messages_RecentStickers_, - ArchivedStickers: messages_ArchivedStickers_, - StickerSetInstallResultSuccess: messages_StickerSetInstallResultSuccess_, - StickerSetInstallResultArchive: messages_StickerSetInstallResultArchive_, - HighScores: messages_HighScores_, - FavedStickersNotModified: messages_FavedStickersNotModified_, - FavedStickers: messages_FavedStickers_, - FoundStickerSetsNotModified: messages_FoundStickerSetsNotModified_, - FoundStickerSets: messages_FoundStickerSets_, - SearchCounter: messages_SearchCounter_, - InactiveChats: messages_InactiveChats_, - VotesList: messages_VotesList_, - MessageViews: messages_MessageViews_, - DiscussionMessage: messages_DiscussionMessage_, - HistoryImport: messages_HistoryImport_, - HistoryImportParsed: messages_HistoryImportParsed_, - AffectedFoundMessages: messages_AffectedFoundMessages_, - ExportedChatInvites: messages_ExportedChatInvites_, - ExportedChatInvite: messages_ExportedChatInvite_, - ExportedChatInviteReplaced: messages_ExportedChatInviteReplaced_, - ChatInviteImporters: messages_ChatInviteImporters_, - ChatAdminsWithInvites: messages_ChatAdminsWithInvites_, - CheckedHistoryImportPeer: messages_CheckedHistoryImportPeer_, - SponsoredMessages: messages_SponsoredMessages_, - SponsoredMessagesEmpty: messages_SponsoredMessagesEmpty_, - SearchResultsCalendar: messages_SearchResultsCalendar_, - SearchResultsPositions: messages_SearchResultsPositions_, - PeerSettings: messages_PeerSettings_, - MessageReactionsList: messages_MessageReactionsList_, - AvailableReactionsNotModified: messages_AvailableReactionsNotModified_, - AvailableReactions: messages_AvailableReactions_, - TranscribedAudio: messages_TranscribedAudio_, - ReactionsNotModified: messages_ReactionsNotModified_, - Reactions: messages_Reactions_, - ForumTopics: messages_ForumTopics_, - EmojiGroupsNotModified: messages_EmojiGroupsNotModified_, - EmojiGroups: messages_EmojiGroups_, - TranslateResult: messages_TranslateResult_, - BotApp: messages_BotApp_, - WebPage: messages_WebPage_, - SavedDialogs: messages_SavedDialogs_, - SavedDialogsSlice: messages_SavedDialogsSlice_, - SavedDialogsNotModified: messages_SavedDialogsNotModified_, - SavedReactionTagsNotModified: messages_SavedReactionTagsNotModified_, - SavedReactionTags: messages_SavedReactionTags_, - QuickReplies: messages_QuickReplies_, - QuickRepliesNotModified: messages_QuickRepliesNotModified_, - DialogFilters: messages_DialogFilters_, - MyStickers: messages_MyStickers_, - InvitedUsers: messages_InvitedUsers_, - }, - updates: { - State: updates_State_, - DifferenceEmpty: updates_DifferenceEmpty_, - Difference: updates_Difference_, - DifferenceSlice: updates_DifferenceSlice_, - DifferenceTooLong: updates_DifferenceTooLong_, - ChannelDifferenceEmpty: updates_ChannelDifferenceEmpty_, - ChannelDifferenceTooLong: updates_ChannelDifferenceTooLong_, - ChannelDifference: updates_ChannelDifference_, - }, - photos: { - Photos: photos_Photos_, - PhotosSlice: photos_PhotosSlice_, - Photo: photos_Photo_, - }, - upload: { - File: upload_File_, - FileCdnRedirect: upload_FileCdnRedirect_, - WebFile: upload_WebFile_, - CdnFileReuploadNeeded: upload_CdnFileReuploadNeeded_, - CdnFile: upload_CdnFile_, - }, - account: { - PrivacyRules: account_PrivacyRules_, - Authorizations: account_Authorizations_, - Password: account_Password_, - PasswordSettings: account_PasswordSettings_, - PasswordInputSettings: account_PasswordInputSettings_, - TmpPassword: account_TmpPassword_, - WebAuthorizations: account_WebAuthorizations_, - AuthorizationForm: account_AuthorizationForm_, - SentEmailCode: account_SentEmailCode_, - Takeout: account_Takeout_, - WallPapersNotModified: account_WallPapersNotModified_, - WallPapers: account_WallPapers_, - AutoDownloadSettings: account_AutoDownloadSettings_, - ThemesNotModified: account_ThemesNotModified_, - Themes: account_Themes_, - ContentSettings: account_ContentSettings_, - ResetPasswordFailedWait: account_ResetPasswordFailedWait_, - ResetPasswordRequestedWait: account_ResetPasswordRequestedWait_, - ResetPasswordOk: account_ResetPasswordOk_, - SavedRingtonesNotModified: account_SavedRingtonesNotModified_, - SavedRingtones: account_SavedRingtones_, - SavedRingtone: account_SavedRingtone_, - SavedRingtoneConverted: account_SavedRingtoneConverted_, - EmojiStatusesNotModified: account_EmojiStatusesNotModified_, - EmojiStatuses: account_EmojiStatuses_, - EmailVerified: account_EmailVerified_, - EmailVerifiedLogin: account_EmailVerifiedLogin_, - AutoSaveSettings: account_AutoSaveSettings_, - ConnectedBots: account_ConnectedBots_, - BusinessChatLinks: account_BusinessChatLinks_, - ResolvedBusinessChatLinks: account_ResolvedBusinessChatLinks_, - }, - channels: { - ChannelParticipants: channels_ChannelParticipants_, - ChannelParticipantsNotModified: channels_ChannelParticipantsNotModified_, - ChannelParticipant: channels_ChannelParticipant_, - AdminLogResults: channels_AdminLogResults_, - SendAsPeers: channels_SendAsPeers_, - SponsoredMessageReportResultChooseOption: channels_SponsoredMessageReportResultChooseOption_, - SponsoredMessageReportResultAdsHidden: channels_SponsoredMessageReportResultAdsHidden_, - SponsoredMessageReportResultReported: channels_SponsoredMessageReportResultReported_, - }, - payments: { - PaymentForm: payments_PaymentForm_, - ValidatedRequestedInfo: payments_ValidatedRequestedInfo_, - PaymentResult: payments_PaymentResult_, - PaymentVerificationNeeded: payments_PaymentVerificationNeeded_, - PaymentReceipt: payments_PaymentReceipt_, - SavedInfo: payments_SavedInfo_, - BankCardData: payments_BankCardData_, - ExportedInvoice: payments_ExportedInvoice_, - CheckedGiftCode: payments_CheckedGiftCode_, - GiveawayInfo: payments_GiveawayInfo_, - GiveawayInfoResults: payments_GiveawayInfoResults_, - }, - phone: { - PhoneCall: phone_PhoneCall_, - GroupCall: phone_GroupCall_, - GroupParticipants: phone_GroupParticipants_, - JoinAsPeers: phone_JoinAsPeers_, - ExportedGroupCallInvite: phone_ExportedGroupCallInvite_, - GroupCallStreamChannels: phone_GroupCallStreamChannels_, - GroupCallStreamRtmpUrl: phone_GroupCallStreamRtmpUrl_, - }, - stats: { - BroadcastStats: stats_BroadcastStats_, - MegagroupStats: stats_MegagroupStats_, - MessageStats: stats_MessageStats_, - StoryStats: stats_StoryStats_, - PublicForwards: stats_PublicForwards_, - BroadcastRevenueStats: stats_BroadcastRevenueStats_, - BroadcastRevenueWithdrawalUrl: stats_BroadcastRevenueWithdrawalUrl_, - BroadcastRevenueTransactions: stats_BroadcastRevenueTransactions_, - }, - stickers: { - SuggestedShortName: stickers_SuggestedShortName_, - }, - users: { - UserFull: users_UserFull_, - }, - chatlists: { - ExportedChatlistInvite: chatlists_ExportedChatlistInvite_, - ExportedInvites: chatlists_ExportedInvites_, - ChatlistInviteAlready: chatlists_ChatlistInviteAlready_, - ChatlistInvite: chatlists_ChatlistInvite_, - ChatlistUpdates: chatlists_ChatlistUpdates_, - }, - bots: { - BotInfo: bots_BotInfo_, - }, - stories: { - AllStoriesNotModified: stories_AllStoriesNotModified_, - AllStories: stories_AllStories_, - Stories: stories_Stories_, - StoryViewsList: stories_StoryViewsList_, - StoryViews: stories_StoryViews_, - PeerStories: stories_PeerStories_, - StoryReactionsList: stories_StoryReactionsList_, - }, - premium: { - BoostsList: premium_BoostsList_, - MyBoosts: premium_MyBoosts_, - BoostsStatus: premium_BoostsStatus_, - }, - smsjobs: { - EligibleToJoin: smsjobs_EligibleToJoin_, - Status: smsjobs_Status_, - }, - fragment: { - CollectibleInfo: fragment_CollectibleInfo_, - }, -}; -export declare namespace types { - type Type = Type_; - type TypeX = TypeX_; - type _ResPQ = _ResPQ_; - type _P_Q_inner_data = _P_Q_inner_data_; - type _Server_DH_Params = _Server_DH_Params_; - type _Server_DH_inner_data = _Server_DH_inner_data_; - type _Client_DH_Inner_Data = _Client_DH_Inner_Data_; - type _Set_client_DH_params_answer = _Set_client_DH_params_answer_; - type _BindAuthKeyInner = _BindAuthKeyInner_; - type _RpcError = _RpcError_; - type _RpcDropAnswer = _RpcDropAnswer_; - type _FutureSalt = _FutureSalt_; - type _FutureSalts = _FutureSalts_; - type _Pong = _Pong_; - type _DestroySessionRes = _DestroySessionRes_; - type _NewSession = _NewSession_; - type _Object = _Object_; - type _MsgsAck = _MsgsAck_; - type _BadMsgNotification = _BadMsgNotification_; - type _MsgResendReq = _MsgResendReq_; - type _MsgsStateReq = _MsgsStateReq_; - type _MsgsStateInfo = _MsgsStateInfo_; - type _MsgsAllInfo = _MsgsAllInfo_; - type _MsgDetailedInfo = _MsgDetailedInfo_; - type _DestroyAuthKeyRes = _DestroyAuthKeyRes_; - type _HttpWait = _HttpWait_; - type _True = _True_; - type _Error = _Error_; - type _IpPort = _IpPort_; - type _AccessPointRule = _AccessPointRule_; - type _help_ConfigSimple = _help_ConfigSimple_; - type _InputFileLocation = _InputFileLocation_; - type _InputPeer = _InputPeer_; - type _InputUser = _InputUser_; - type _InputContact = _InputContact_; - type _InputFile = _InputFile_; - type _InputMedia = _InputMedia_; - type _InputChatPhoto = _InputChatPhoto_; - type _InputGeoPoint = _InputGeoPoint_; - type _InputPhoto = _InputPhoto_; - type _Peer = _Peer_; - type _storage_FileType = _storage_FileType_; - type _User = _User_; - type _UserProfilePhoto = _UserProfilePhoto_; - type _UserStatus = _UserStatus_; - type _Chat = _Chat_; - type _ChatFull = _ChatFull_; - type _ChatParticipant = _ChatParticipant_; - type _ChatParticipants = _ChatParticipants_; - type _ChatPhoto = _ChatPhoto_; - type _Message = _Message_; - type _MessageMedia = _MessageMedia_; - type _MessageAction = _MessageAction_; - type _Dialog = _Dialog_; - type _Photo = _Photo_; - type _PhotoSize = _PhotoSize_; - type _GeoPoint = _GeoPoint_; - type _auth_SentCode = _auth_SentCode_; - type _auth_Authorization = _auth_Authorization_; - type _auth_ExportedAuthorization = _auth_ExportedAuthorization_; - type _InputNotifyPeer = _InputNotifyPeer_; - type _InputPeerNotifySettings = _InputPeerNotifySettings_; - type _PeerNotifySettings = _PeerNotifySettings_; - type _PeerSettings = _PeerSettings_; - type _WallPaper = _WallPaper_; - type _ReportReason = _ReportReason_; - type _UserFull = _UserFull_; - type _Contact = _Contact_; - type _ImportedContact = _ImportedContact_; - type _ContactStatus = _ContactStatus_; - type _contacts_Contacts = _contacts_Contacts_; - type _contacts_ImportedContacts = _contacts_ImportedContacts_; - type _contacts_Blocked = _contacts_Blocked_; - type _messages_Dialogs = _messages_Dialogs_; - type _messages_Messages = _messages_Messages_; - type _messages_Chats = _messages_Chats_; - type _messages_ChatFull = _messages_ChatFull_; - type _messages_AffectedHistory = _messages_AffectedHistory_; - type _MessagesFilter = _MessagesFilter_; - type _Update = _Update_; - type _updates_State = _updates_State_; - type _updates_Difference = _updates_Difference_; - type _Updates = _Updates_; - type _photos_Photos = _photos_Photos_; - type _photos_Photo = _photos_Photo_; - type _upload_File = _upload_File_; - type _DcOption = _DcOption_; - type _Config = _Config_; - type _NearestDc = _NearestDc_; - type _help_AppUpdate = _help_AppUpdate_; - type _help_InviteText = _help_InviteText_; - type _EncryptedChat = _EncryptedChat_; - type _InputEncryptedChat = _InputEncryptedChat_; - type _EncryptedFile = _EncryptedFile_; - type _InputEncryptedFile = _InputEncryptedFile_; - type _EncryptedMessage = _EncryptedMessage_; - type _messages_DhConfig = _messages_DhConfig_; - type _messages_SentEncryptedMessage = _messages_SentEncryptedMessage_; - type _InputDocument = _InputDocument_; - type _Document = _Document_; - type _help_Support = _help_Support_; - type _NotifyPeer = _NotifyPeer_; - type _SendMessageAction = _SendMessageAction_; - type _contacts_Found = _contacts_Found_; - type _InputPrivacyKey = _InputPrivacyKey_; - type _PrivacyKey = _PrivacyKey_; - type _InputPrivacyRule = _InputPrivacyRule_; - type _PrivacyRule = _PrivacyRule_; - type _account_PrivacyRules = _account_PrivacyRules_; - type _AccountDaysTTL = _AccountDaysTTL_; - type _DocumentAttribute = _DocumentAttribute_; - type _messages_Stickers = _messages_Stickers_; - type _StickerPack = _StickerPack_; - type _messages_AllStickers = _messages_AllStickers_; - type _messages_AffectedMessages = _messages_AffectedMessages_; - type _WebPage = _WebPage_; - type _Authorization = _Authorization_; - type _account_Authorizations = _account_Authorizations_; - type _account_Password = _account_Password_; - type _account_PasswordSettings = _account_PasswordSettings_; - type _account_PasswordInputSettings = _account_PasswordInputSettings_; - type _auth_PasswordRecovery = _auth_PasswordRecovery_; - type _ReceivedNotifyMessage = _ReceivedNotifyMessage_; - type _ExportedChatInvite = _ExportedChatInvite_; - type _ChatInvite = _ChatInvite_; - type _InputStickerSet = _InputStickerSet_; - type _StickerSet = _StickerSet_; - type _messages_StickerSet = _messages_StickerSet_; - type _BotCommand = _BotCommand_; - type _BotInfo = _BotInfo_; - type _KeyboardButton = _KeyboardButton_; - type _KeyboardButtonRow = _KeyboardButtonRow_; - type _ReplyMarkup = _ReplyMarkup_; - type _MessageEntity = _MessageEntity_; - type _InputChannel = _InputChannel_; - type _contacts_ResolvedPeer = _contacts_ResolvedPeer_; - type _MessageRange = _MessageRange_; - type _updates_ChannelDifference = _updates_ChannelDifference_; - type _ChannelMessagesFilter = _ChannelMessagesFilter_; - type _ChannelParticipant = _ChannelParticipant_; - type _ChannelParticipantsFilter = _ChannelParticipantsFilter_; - type _channels_ChannelParticipants = _channels_ChannelParticipants_; - type _channels_ChannelParticipant = _channels_ChannelParticipant_; - type _help_TermsOfService = _help_TermsOfService_; - type _messages_SavedGifs = _messages_SavedGifs_; - type _InputBotInlineMessage = _InputBotInlineMessage_; - type _InputBotInlineResult = _InputBotInlineResult_; - type _BotInlineMessage = _BotInlineMessage_; - type _BotInlineResult = _BotInlineResult_; - type _messages_BotResults = _messages_BotResults_; - type _ExportedMessageLink = _ExportedMessageLink_; - type _MessageFwdHeader = _MessageFwdHeader_; - type _auth_CodeType = _auth_CodeType_; - type _auth_SentCodeType = _auth_SentCodeType_; - type _messages_BotCallbackAnswer = _messages_BotCallbackAnswer_; - type _messages_MessageEditData = _messages_MessageEditData_; - type _InputBotInlineMessageID = _InputBotInlineMessageID_; - type _InlineBotSwitchPM = _InlineBotSwitchPM_; - type _messages_PeerDialogs = _messages_PeerDialogs_; - type _TopPeer = _TopPeer_; - type _TopPeerCategory = _TopPeerCategory_; - type _TopPeerCategoryPeers = _TopPeerCategoryPeers_; - type _contacts_TopPeers = _contacts_TopPeers_; - type _DraftMessage = _DraftMessage_; - type _messages_FeaturedStickers = _messages_FeaturedStickers_; - type _messages_RecentStickers = _messages_RecentStickers_; - type _messages_ArchivedStickers = _messages_ArchivedStickers_; - type _messages_StickerSetInstallResult = _messages_StickerSetInstallResult_; - type _StickerSetCovered = _StickerSetCovered_; - type _MaskCoords = _MaskCoords_; - type _InputStickeredMedia = _InputStickeredMedia_; - type _Game = _Game_; - type _InputGame = _InputGame_; - type _HighScore = _HighScore_; - type _messages_HighScores = _messages_HighScores_; - type _RichText = _RichText_; - type _PageBlock = _PageBlock_; - type _PhoneCallDiscardReason = _PhoneCallDiscardReason_; - type _DataJSON = _DataJSON_; - type _LabeledPrice = _LabeledPrice_; - type _Invoice = _Invoice_; - type _PaymentCharge = _PaymentCharge_; - type _PostAddress = _PostAddress_; - type _PaymentRequestedInfo = _PaymentRequestedInfo_; - type _PaymentSavedCredentials = _PaymentSavedCredentials_; - type _WebDocument = _WebDocument_; - type _InputWebDocument = _InputWebDocument_; - type _InputWebFileLocation = _InputWebFileLocation_; - type _upload_WebFile = _upload_WebFile_; - type _payments_PaymentForm = _payments_PaymentForm_; - type _payments_ValidatedRequestedInfo = _payments_ValidatedRequestedInfo_; - type _payments_PaymentResult = _payments_PaymentResult_; - type _payments_PaymentReceipt = _payments_PaymentReceipt_; - type _payments_SavedInfo = _payments_SavedInfo_; - type _InputPaymentCredentials = _InputPaymentCredentials_; - type _account_TmpPassword = _account_TmpPassword_; - type _ShippingOption = _ShippingOption_; - type _InputStickerSetItem = _InputStickerSetItem_; - type _InputPhoneCall = _InputPhoneCall_; - type _PhoneCall = _PhoneCall_; - type _PhoneConnection = _PhoneConnection_; - type _PhoneCallProtocol = _PhoneCallProtocol_; - type _phone_PhoneCall = _phone_PhoneCall_; - type _upload_CdnFile = _upload_CdnFile_; - type _CdnPublicKey = _CdnPublicKey_; - type _CdnConfig = _CdnConfig_; - type _LangPackString = _LangPackString_; - type _LangPackDifference = _LangPackDifference_; - type _LangPackLanguage = _LangPackLanguage_; - type _ChannelAdminLogEventAction = _ChannelAdminLogEventAction_; - type _ChannelAdminLogEvent = _ChannelAdminLogEvent_; - type _channels_AdminLogResults = _channels_AdminLogResults_; - type _ChannelAdminLogEventsFilter = _ChannelAdminLogEventsFilter_; - type _PopularContact = _PopularContact_; - type _messages_FavedStickers = _messages_FavedStickers_; - type _RecentMeUrl = _RecentMeUrl_; - type _help_RecentMeUrls = _help_RecentMeUrls_; - type _InputSingleMedia = _InputSingleMedia_; - type _WebAuthorization = _WebAuthorization_; - type _account_WebAuthorizations = _account_WebAuthorizations_; - type _InputMessage = _InputMessage_; - type _InputDialogPeer = _InputDialogPeer_; - type _DialogPeer = _DialogPeer_; - type _messages_FoundStickerSets = _messages_FoundStickerSets_; - type _FileHash = _FileHash_; - type _InputClientProxy = _InputClientProxy_; - type _help_TermsOfServiceUpdate = _help_TermsOfServiceUpdate_; - type _InputSecureFile = _InputSecureFile_; - type _SecureFile = _SecureFile_; - type _SecureData = _SecureData_; - type _SecurePlainData = _SecurePlainData_; - type _SecureValueType = _SecureValueType_; - type _SecureValue = _SecureValue_; - type _InputSecureValue = _InputSecureValue_; - type _SecureValueHash = _SecureValueHash_; - type _SecureValueError = _SecureValueError_; - type _SecureCredentialsEncrypted = _SecureCredentialsEncrypted_; - type _account_AuthorizationForm = _account_AuthorizationForm_; - type _account_SentEmailCode = _account_SentEmailCode_; - type _help_DeepLinkInfo = _help_DeepLinkInfo_; - type _SavedContact = _SavedContact_; - type _account_Takeout = _account_Takeout_; - type _PasswordKdfAlgo = _PasswordKdfAlgo_; - type _SecurePasswordKdfAlgo = _SecurePasswordKdfAlgo_; - type _SecureSecretSettings = _SecureSecretSettings_; - type _InputCheckPasswordSRP = _InputCheckPasswordSRP_; - type _SecureRequiredType = _SecureRequiredType_; - type _help_PassportConfig = _help_PassportConfig_; - type _InputAppEvent = _InputAppEvent_; - type _JSONObjectValue = _JSONObjectValue_; - type _JSONValue = _JSONValue_; - type _PageTableCell = _PageTableCell_; - type _PageTableRow = _PageTableRow_; - type _PageCaption = _PageCaption_; - type _PageListItem = _PageListItem_; - type _PageListOrderedItem = _PageListOrderedItem_; - type _PageRelatedArticle = _PageRelatedArticle_; - type _Page = _Page_; - type _help_SupportName = _help_SupportName_; - type _help_UserInfo = _help_UserInfo_; - type _PollAnswer = _PollAnswer_; - type _Poll = _Poll_; - type _PollAnswerVoters = _PollAnswerVoters_; - type _PollResults = _PollResults_; - type _ChatOnlines = _ChatOnlines_; - type _StatsURL = _StatsURL_; - type _ChatAdminRights = _ChatAdminRights_; - type _ChatBannedRights = _ChatBannedRights_; - type _InputWallPaper = _InputWallPaper_; - type _account_WallPapers = _account_WallPapers_; - type _CodeSettings = _CodeSettings_; - type _WallPaperSettings = _WallPaperSettings_; - type _AutoDownloadSettings = _AutoDownloadSettings_; - type _account_AutoDownloadSettings = _account_AutoDownloadSettings_; - type _EmojiKeyword = _EmojiKeyword_; - type _EmojiKeywordsDifference = _EmojiKeywordsDifference_; - type _EmojiURL = _EmojiURL_; - type _EmojiLanguage = _EmojiLanguage_; - type _Folder = _Folder_; - type _InputFolderPeer = _InputFolderPeer_; - type _FolderPeer = _FolderPeer_; - type _messages_SearchCounter = _messages_SearchCounter_; - type _UrlAuthResult = _UrlAuthResult_; - type _ChannelLocation = _ChannelLocation_; - type _PeerLocated = _PeerLocated_; - type _RestrictionReason = _RestrictionReason_; - type _InputTheme = _InputTheme_; - type _Theme = _Theme_; - type _account_Themes = _account_Themes_; - type _auth_LoginToken = _auth_LoginToken_; - type _account_ContentSettings = _account_ContentSettings_; - type _messages_InactiveChats = _messages_InactiveChats_; - type _BaseTheme = _BaseTheme_; - type _InputThemeSettings = _InputThemeSettings_; - type _ThemeSettings = _ThemeSettings_; - type _WebPageAttribute = _WebPageAttribute_; - type _messages_VotesList = _messages_VotesList_; - type _BankCardOpenUrl = _BankCardOpenUrl_; - type _payments_BankCardData = _payments_BankCardData_; - type _DialogFilter = _DialogFilter_; - type _DialogFilterSuggested = _DialogFilterSuggested_; - type _StatsDateRangeDays = _StatsDateRangeDays_; - type _StatsAbsValueAndPrev = _StatsAbsValueAndPrev_; - type _StatsPercentValue = _StatsPercentValue_; - type _StatsGraph = _StatsGraph_; - type _stats_BroadcastStats = _stats_BroadcastStats_; - type _help_PromoData = _help_PromoData_; - type _VideoSize = _VideoSize_; - type _StatsGroupTopPoster = _StatsGroupTopPoster_; - type _StatsGroupTopAdmin = _StatsGroupTopAdmin_; - type _StatsGroupTopInviter = _StatsGroupTopInviter_; - type _stats_MegagroupStats = _stats_MegagroupStats_; - type _GlobalPrivacySettings = _GlobalPrivacySettings_; - type _help_CountryCode = _help_CountryCode_; - type _help_Country = _help_Country_; - type _help_CountriesList = _help_CountriesList_; - type _MessageViews = _MessageViews_; - type _messages_MessageViews = _messages_MessageViews_; - type _messages_DiscussionMessage = _messages_DiscussionMessage_; - type _MessageReplyHeader = _MessageReplyHeader_; - type _MessageReplies = _MessageReplies_; - type _PeerBlocked = _PeerBlocked_; - type _stats_MessageStats = _stats_MessageStats_; - type _GroupCall = _GroupCall_; - type _InputGroupCall = _InputGroupCall_; - type _GroupCallParticipant = _GroupCallParticipant_; - type _phone_GroupCall = _phone_GroupCall_; - type _phone_GroupParticipants = _phone_GroupParticipants_; - type _InlineQueryPeerType = _InlineQueryPeerType_; - type _messages_HistoryImport = _messages_HistoryImport_; - type _messages_HistoryImportParsed = _messages_HistoryImportParsed_; - type _messages_AffectedFoundMessages = _messages_AffectedFoundMessages_; - type _ChatInviteImporter = _ChatInviteImporter_; - type _messages_ExportedChatInvites = _messages_ExportedChatInvites_; - type _messages_ExportedChatInvite = _messages_ExportedChatInvite_; - type _messages_ChatInviteImporters = _messages_ChatInviteImporters_; - type _ChatAdminWithInvites = _ChatAdminWithInvites_; - type _messages_ChatAdminsWithInvites = _messages_ChatAdminsWithInvites_; - type _messages_CheckedHistoryImportPeer = _messages_CheckedHistoryImportPeer_; - type _phone_JoinAsPeers = _phone_JoinAsPeers_; - type _phone_ExportedGroupCallInvite = _phone_ExportedGroupCallInvite_; - type _GroupCallParticipantVideoSourceGroup = _GroupCallParticipantVideoSourceGroup_; - type _GroupCallParticipantVideo = _GroupCallParticipantVideo_; - type _stickers_SuggestedShortName = _stickers_SuggestedShortName_; - type _BotCommandScope = _BotCommandScope_; - type _account_ResetPasswordResult = _account_ResetPasswordResult_; - type _SponsoredMessage = _SponsoredMessage_; - type _messages_SponsoredMessages = _messages_SponsoredMessages_; - type _SearchResultsCalendarPeriod = _SearchResultsCalendarPeriod_; - type _messages_SearchResultsCalendar = _messages_SearchResultsCalendar_; - type _SearchResultsPosition = _SearchResultsPosition_; - type _messages_SearchResultsPositions = _messages_SearchResultsPositions_; - type _channels_SendAsPeers = _channels_SendAsPeers_; - type _users_UserFull = _users_UserFull_; - type _messages_PeerSettings = _messages_PeerSettings_; - type _auth_LoggedOut = _auth_LoggedOut_; - type _ReactionCount = _ReactionCount_; - type _MessageReactions = _MessageReactions_; - type _messages_MessageReactionsList = _messages_MessageReactionsList_; - type _AvailableReaction = _AvailableReaction_; - type _messages_AvailableReactions = _messages_AvailableReactions_; - type _MessagePeerReaction = _MessagePeerReaction_; - type _GroupCallStreamChannel = _GroupCallStreamChannel_; - type _phone_GroupCallStreamChannels = _phone_GroupCallStreamChannels_; - type _phone_GroupCallStreamRtmpUrl = _phone_GroupCallStreamRtmpUrl_; - type _AttachMenuBotIconColor = _AttachMenuBotIconColor_; - type _AttachMenuBotIcon = _AttachMenuBotIcon_; - type _AttachMenuBot = _AttachMenuBot_; - type _AttachMenuBots = _AttachMenuBots_; - type _AttachMenuBotsBot = _AttachMenuBotsBot_; - type _WebViewResult = _WebViewResult_; - type _SimpleWebViewResult = _SimpleWebViewResult_; - type _WebViewMessageSent = _WebViewMessageSent_; - type _BotMenuButton = _BotMenuButton_; - type _account_SavedRingtones = _account_SavedRingtones_; - type _NotificationSound = _NotificationSound_; - type _account_SavedRingtone = _account_SavedRingtone_; - type _AttachMenuPeerType = _AttachMenuPeerType_; - type _InputInvoice = _InputInvoice_; - type _payments_ExportedInvoice = _payments_ExportedInvoice_; - type _messages_TranscribedAudio = _messages_TranscribedAudio_; - type _help_PremiumPromo = _help_PremiumPromo_; - type _InputStorePaymentPurpose = _InputStorePaymentPurpose_; - type _PremiumGiftOption = _PremiumGiftOption_; - type _PaymentFormMethod = _PaymentFormMethod_; - type _EmojiStatus = _EmojiStatus_; - type _account_EmojiStatuses = _account_EmojiStatuses_; - type _Reaction = _Reaction_; - type _ChatReactions = _ChatReactions_; - type _messages_Reactions = _messages_Reactions_; - type _EmailVerifyPurpose = _EmailVerifyPurpose_; - type _EmailVerification = _EmailVerification_; - type _account_EmailVerified = _account_EmailVerified_; - type _PremiumSubscriptionOption = _PremiumSubscriptionOption_; - type _SendAsPeer = _SendAsPeer_; - type _MessageExtendedMedia = _MessageExtendedMedia_; - type _StickerKeyword = _StickerKeyword_; - type _Username = _Username_; - type _ForumTopic = _ForumTopic_; - type _messages_ForumTopics = _messages_ForumTopics_; - type _DefaultHistoryTTL = _DefaultHistoryTTL_; - type _ExportedContactToken = _ExportedContactToken_; - type _RequestPeerType = _RequestPeerType_; - type _EmojiList = _EmojiList_; - type _EmojiGroup = _EmojiGroup_; - type _messages_EmojiGroups = _messages_EmojiGroups_; - type _TextWithEntities = _TextWithEntities_; - type _messages_TranslatedText = _messages_TranslatedText_; - type _AutoSaveSettings = _AutoSaveSettings_; - type _AutoSaveException = _AutoSaveException_; - type _account_AutoSaveSettings = _account_AutoSaveSettings_; - type _help_AppConfig = _help_AppConfig_; - type _InputBotApp = _InputBotApp_; - type _BotApp = _BotApp_; - type _messages_BotApp = _messages_BotApp_; - type _AppWebViewResult = _AppWebViewResult_; - type _InlineBotWebView = _InlineBotWebView_; - type _ReadParticipantDate = _ReadParticipantDate_; - type _InputChatlist = _InputChatlist_; - type _ExportedChatlistInvite = _ExportedChatlistInvite_; - type _chatlists_ExportedChatlistInvite = _chatlists_ExportedChatlistInvite_; - type _chatlists_ExportedInvites = _chatlists_ExportedInvites_; - type _chatlists_ChatlistInvite = _chatlists_ChatlistInvite_; - type _chatlists_ChatlistUpdates = _chatlists_ChatlistUpdates_; - type _bots_BotInfo = _bots_BotInfo_; - type _MessagePeerVote = _MessagePeerVote_; - type _SponsoredWebPage = _SponsoredWebPage_; - type _StoryViews = _StoryViews_; - type _StoryItem = _StoryItem_; - type _stories_AllStories = _stories_AllStories_; - type _stories_Stories = _stories_Stories_; - type _StoryView = _StoryView_; - type _stories_StoryViewsList = _stories_StoryViewsList_; - type _stories_StoryViews = _stories_StoryViews_; - type _InputReplyTo = _InputReplyTo_; - type _ExportedStoryLink = _ExportedStoryLink_; - type _StoriesStealthMode = _StoriesStealthMode_; - type _MediaAreaCoordinates = _MediaAreaCoordinates_; - type _MediaArea = _MediaArea_; - type _PeerStories = _PeerStories_; - type _stories_PeerStories = _stories_PeerStories_; - type _messages_WebPage = _messages_WebPage_; - type _PremiumGiftCodeOption = _PremiumGiftCodeOption_; - type _payments_CheckedGiftCode = _payments_CheckedGiftCode_; - type _payments_GiveawayInfo = _payments_GiveawayInfo_; - type _PrepaidGiveaway = _PrepaidGiveaway_; - type _Boost = _Boost_; - type _premium_BoostsList = _premium_BoostsList_; - type _MyBoost = _MyBoost_; - type _premium_MyBoosts = _premium_MyBoosts_; - type _premium_BoostsStatus = _premium_BoostsStatus_; - type _StoryFwdHeader = _StoryFwdHeader_; - type _PostInteractionCounters = _PostInteractionCounters_; - type _stats_StoryStats = _stats_StoryStats_; - type _PublicForward = _PublicForward_; - type _stats_PublicForwards = _stats_PublicForwards_; - type _PeerColor = _PeerColor_; - type _help_PeerColorSet = _help_PeerColorSet_; - type _help_PeerColorOption = _help_PeerColorOption_; - type _help_PeerColors = _help_PeerColors_; - type _StoryReaction = _StoryReaction_; - type _stories_StoryReactionsList = _stories_StoryReactionsList_; - type _SavedDialog = _SavedDialog_; - type _messages_SavedDialogs = _messages_SavedDialogs_; - type _SavedReactionTag = _SavedReactionTag_; - type _messages_SavedReactionTags = _messages_SavedReactionTags_; - type _OutboxReadDate = _OutboxReadDate_; - type _smsjobs_EligibilityToJoin = _smsjobs_EligibilityToJoin_; - type _smsjobs_Status = _smsjobs_Status_; - type _SmsJob = _SmsJob_; - type _BusinessWeeklyOpen = _BusinessWeeklyOpen_; - type _BusinessWorkHours = _BusinessWorkHours_; - type _BusinessLocation = _BusinessLocation_; - type _InputBusinessRecipients = _InputBusinessRecipients_; - type _BusinessRecipients = _BusinessRecipients_; - type _BusinessAwayMessageSchedule = _BusinessAwayMessageSchedule_; - type _InputBusinessGreetingMessage = _InputBusinessGreetingMessage_; - type _BusinessGreetingMessage = _BusinessGreetingMessage_; - type _InputBusinessAwayMessage = _InputBusinessAwayMessage_; - type _BusinessAwayMessage = _BusinessAwayMessage_; - type _Timezone = _Timezone_; - type _help_TimezonesList = _help_TimezonesList_; - type _QuickReply = _QuickReply_; - type _InputQuickReplyShortcut = _InputQuickReplyShortcut_; - type _messages_QuickReplies = _messages_QuickReplies_; - type _ConnectedBot = _ConnectedBot_; - type _account_ConnectedBots = _account_ConnectedBots_; - type _messages_DialogFilters = _messages_DialogFilters_; - type _Birthday = _Birthday_; - type _BotBusinessConnection = _BotBusinessConnection_; - type _InputBusinessIntro = _InputBusinessIntro_; - type _BusinessIntro = _BusinessIntro_; - type _messages_MyStickers = _messages_MyStickers_; - type _InputCollectible = _InputCollectible_; - type _fragment_CollectibleInfo = _fragment_CollectibleInfo_; - type _InputBusinessBotRecipients = _InputBusinessBotRecipients_; - type _BusinessBotRecipients = _BusinessBotRecipients_; - type _ContactBirthday = _ContactBirthday_; - type _contacts_ContactBirthdays = _contacts_ContactBirthdays_; - type _MissingInvitee = _MissingInvitee_; - type _messages_InvitedUsers = _messages_InvitedUsers_; - type _InputBusinessChatLink = _InputBusinessChatLink_; - type _BusinessChatLink = _BusinessChatLink_; - type _account_BusinessChatLinks = _account_BusinessChatLinks_; - type _account_ResolvedBusinessChatLinks = _account_ResolvedBusinessChatLinks_; - type _RequestedPeer = _RequestedPeer_; - type _SponsoredMessageReportOption = _SponsoredMessageReportOption_; - type _channels_SponsoredMessageReportResult = _channels_SponsoredMessageReportResult_; - type _stats_BroadcastRevenueStats = _stats_BroadcastRevenueStats_; - type _stats_BroadcastRevenueWithdrawalUrl = _stats_BroadcastRevenueWithdrawalUrl_; - type _BroadcastRevenueTransaction = _BroadcastRevenueTransaction_; - type _stats_BroadcastRevenueTransactions = _stats_BroadcastRevenueTransactions_; - type ResPQ = ResPQ_; - type P_q_inner_data_dc = P_q_inner_data_dc_; - type P_q_inner_data_temp_dc = P_q_inner_data_temp_dc_; - type Server_DH_params_ok = Server_DH_params_ok_; - type Server_DH_inner_data = Server_DH_inner_data_; - type Client_DH_inner_data = Client_DH_inner_data_; - type Dh_gen_ok = Dh_gen_ok_; - type Dh_gen_retry = Dh_gen_retry_; - type Dh_gen_fail = Dh_gen_fail_; - type Bind_auth_key_inner = Bind_auth_key_inner_; - type Rpc_error = Rpc_error_; - type Rpc_answer_unknown = Rpc_answer_unknown_; - type Rpc_answer_dropped_running = Rpc_answer_dropped_running_; - type Rpc_answer_dropped = Rpc_answer_dropped_; - type Future_salt = Future_salt_; - type Future_salts = Future_salts_; - type Pong = Pong_; - type Destroy_session_ok = Destroy_session_ok_; - type Destroy_session_none = Destroy_session_none_; - type New_session_created = New_session_created_; - type Gzip_packed = Gzip_packed_; - type Msgs_ack = Msgs_ack_; - type Bad_msg_notification = Bad_msg_notification_; - type Bad_server_salt = Bad_server_salt_; - type Msg_resend_req = Msg_resend_req_; - type Msgs_state_req = Msgs_state_req_; - type Msgs_state_info = Msgs_state_info_; - type Msgs_all_info = Msgs_all_info_; - type Msg_detailed_info = Msg_detailed_info_; - type Msg_new_detailed_info = Msg_new_detailed_info_; - type Destroy_auth_key_ok = Destroy_auth_key_ok_; - type Destroy_auth_key_none = Destroy_auth_key_none_; - type Destroy_auth_key_fail = Destroy_auth_key_fail_; - type Http_wait = Http_wait_; - type True = True_; - type Error = Error_; - type IpPort = IpPort_; - type IpPortSecret = IpPortSecret_; - type AccessPointRule = AccessPointRule_; - type InputPeerPhotoFileLocationLegacy = InputPeerPhotoFileLocationLegacy_; - type InputStickerSetThumbLegacy = InputStickerSetThumbLegacy_; - type InputPeerEmpty = InputPeerEmpty_; - type InputPeerSelf = InputPeerSelf_; - type InputPeerChat = InputPeerChat_; - type InputPeerUser = InputPeerUser_; - type InputPeerChannel = InputPeerChannel_; - type InputPeerUserFromMessage = InputPeerUserFromMessage_; - type InputPeerChannelFromMessage = InputPeerChannelFromMessage_; - type InputUserEmpty = InputUserEmpty_; - type InputUserSelf = InputUserSelf_; - type InputUser = InputUser_; - type InputUserFromMessage = InputUserFromMessage_; - type InputPhoneContact = InputPhoneContact_; - type InputFile = InputFile_; - type InputFileBig = InputFileBig_; - type InputMediaEmpty = InputMediaEmpty_; - type InputMediaUploadedPhoto = InputMediaUploadedPhoto_; - type InputMediaPhoto = InputMediaPhoto_; - type InputMediaGeoPoint = InputMediaGeoPoint_; - type InputMediaContact = InputMediaContact_; - type InputMediaUploadedDocument = InputMediaUploadedDocument_; - type InputMediaDocument = InputMediaDocument_; - type InputMediaVenue = InputMediaVenue_; - type InputMediaPhotoExternal = InputMediaPhotoExternal_; - type InputMediaDocumentExternal = InputMediaDocumentExternal_; - type InputMediaGame = InputMediaGame_; - type InputMediaInvoice = InputMediaInvoice_; - type InputMediaGeoLive = InputMediaGeoLive_; - type InputMediaPoll = InputMediaPoll_; - type InputMediaDice = InputMediaDice_; - type InputMediaStory = InputMediaStory_; - type InputMediaWebPage = InputMediaWebPage_; - type InputChatPhotoEmpty = InputChatPhotoEmpty_; - type InputChatUploadedPhoto = InputChatUploadedPhoto_; - type InputChatPhoto = InputChatPhoto_; - type InputGeoPointEmpty = InputGeoPointEmpty_; - type InputGeoPoint = InputGeoPoint_; - type InputPhotoEmpty = InputPhotoEmpty_; - type InputPhoto = InputPhoto_; - type InputFileLocation = InputFileLocation_; - type InputEncryptedFileLocation = InputEncryptedFileLocation_; - type InputDocumentFileLocation = InputDocumentFileLocation_; - type InputSecureFileLocation = InputSecureFileLocation_; - type InputTakeoutFileLocation = InputTakeoutFileLocation_; - type InputPhotoFileLocation = InputPhotoFileLocation_; - type InputPhotoLegacyFileLocation = InputPhotoLegacyFileLocation_; - type InputPeerPhotoFileLocation = InputPeerPhotoFileLocation_; - type InputStickerSetThumb = InputStickerSetThumb_; - type InputGroupCallStream = InputGroupCallStream_; - type PeerUser = PeerUser_; - type PeerChat = PeerChat_; - type PeerChannel = PeerChannel_; - type UserEmpty = UserEmpty_; - type User = User_; - type UserProfilePhotoEmpty = UserProfilePhotoEmpty_; - type UserProfilePhoto = UserProfilePhoto_; - type UserStatusEmpty = UserStatusEmpty_; - type UserStatusOnline = UserStatusOnline_; - type UserStatusOffline = UserStatusOffline_; - type UserStatusRecently = UserStatusRecently_; - type UserStatusLastWeek = UserStatusLastWeek_; - type UserStatusLastMonth = UserStatusLastMonth_; - type ChatEmpty = ChatEmpty_; - type Chat = Chat_; - type ChatForbidden = ChatForbidden_; - type Channel = Channel_; - type ChannelForbidden = ChannelForbidden_; - type ChatFull = ChatFull_; - type ChannelFull = ChannelFull_; - type ChatParticipant = ChatParticipant_; - type ChatParticipantCreator = ChatParticipantCreator_; - type ChatParticipantAdmin = ChatParticipantAdmin_; - type ChatParticipantsForbidden = ChatParticipantsForbidden_; - type ChatParticipants = ChatParticipants_; - type ChatPhotoEmpty = ChatPhotoEmpty_; - type ChatPhoto = ChatPhoto_; - type MessageEmpty = MessageEmpty_; - type Message = Message_; - type MessageService = MessageService_; - type MessageMediaEmpty = MessageMediaEmpty_; - type MessageMediaPhoto = MessageMediaPhoto_; - type MessageMediaGeo = MessageMediaGeo_; - type MessageMediaContact = MessageMediaContact_; - type MessageMediaUnsupported = MessageMediaUnsupported_; - type MessageMediaDocument = MessageMediaDocument_; - type MessageMediaWebPage = MessageMediaWebPage_; - type MessageMediaVenue = MessageMediaVenue_; - type MessageMediaGame = MessageMediaGame_; - type MessageMediaInvoice = MessageMediaInvoice_; - type MessageMediaGeoLive = MessageMediaGeoLive_; - type MessageMediaPoll = MessageMediaPoll_; - type MessageMediaDice = MessageMediaDice_; - type MessageMediaStory = MessageMediaStory_; - type MessageMediaGiveaway = MessageMediaGiveaway_; - type MessageMediaGiveawayResults = MessageMediaGiveawayResults_; - type MessageActionEmpty = MessageActionEmpty_; - type MessageActionChatCreate = MessageActionChatCreate_; - type MessageActionChatEditTitle = MessageActionChatEditTitle_; - type MessageActionChatEditPhoto = MessageActionChatEditPhoto_; - type MessageActionChatDeletePhoto = MessageActionChatDeletePhoto_; - type MessageActionChatAddUser = MessageActionChatAddUser_; - type MessageActionChatDeleteUser = MessageActionChatDeleteUser_; - type MessageActionChatJoinedByLink = MessageActionChatJoinedByLink_; - type MessageActionChannelCreate = MessageActionChannelCreate_; - type MessageActionChatMigrateTo = MessageActionChatMigrateTo_; - type MessageActionChannelMigrateFrom = MessageActionChannelMigrateFrom_; - type MessageActionPinMessage = MessageActionPinMessage_; - type MessageActionHistoryClear = MessageActionHistoryClear_; - type MessageActionGameScore = MessageActionGameScore_; - type MessageActionPaymentSentMe = MessageActionPaymentSentMe_; - type MessageActionPaymentSent = MessageActionPaymentSent_; - type MessageActionPhoneCall = MessageActionPhoneCall_; - type MessageActionScreenshotTaken = MessageActionScreenshotTaken_; - type MessageActionCustomAction = MessageActionCustomAction_; - type MessageActionBotAllowed = MessageActionBotAllowed_; - type MessageActionSecureValuesSentMe = MessageActionSecureValuesSentMe_; - type MessageActionSecureValuesSent = MessageActionSecureValuesSent_; - type MessageActionContactSignUp = MessageActionContactSignUp_; - type MessageActionGeoProximityReached = MessageActionGeoProximityReached_; - type MessageActionGroupCall = MessageActionGroupCall_; - type MessageActionInviteToGroupCall = MessageActionInviteToGroupCall_; - type MessageActionSetMessagesTTL = MessageActionSetMessagesTTL_; - type MessageActionGroupCallScheduled = MessageActionGroupCallScheduled_; - type MessageActionSetChatTheme = MessageActionSetChatTheme_; - type MessageActionChatJoinedByRequest = MessageActionChatJoinedByRequest_; - type MessageActionWebViewDataSentMe = MessageActionWebViewDataSentMe_; - type MessageActionWebViewDataSent = MessageActionWebViewDataSent_; - type MessageActionGiftPremium = MessageActionGiftPremium_; - type MessageActionTopicCreate = MessageActionTopicCreate_; - type MessageActionTopicEdit = MessageActionTopicEdit_; - type MessageActionSuggestProfilePhoto = MessageActionSuggestProfilePhoto_; - type MessageActionRequestedPeer = MessageActionRequestedPeer_; - type MessageActionSetChatWallPaper = MessageActionSetChatWallPaper_; - type MessageActionGiftCode = MessageActionGiftCode_; - type MessageActionGiveawayLaunch = MessageActionGiveawayLaunch_; - type MessageActionGiveawayResults = MessageActionGiveawayResults_; - type MessageActionBoostApply = MessageActionBoostApply_; - type MessageActionRequestedPeerSentMe = MessageActionRequestedPeerSentMe_; - type Dialog = Dialog_; - type DialogFolder = DialogFolder_; - type PhotoEmpty = PhotoEmpty_; - type Photo = Photo_; - type PhotoSizeEmpty = PhotoSizeEmpty_; - type PhotoSize = PhotoSize_; - type PhotoCachedSize = PhotoCachedSize_; - type PhotoStrippedSize = PhotoStrippedSize_; - type PhotoSizeProgressive = PhotoSizeProgressive_; - type PhotoPathSize = PhotoPathSize_; - type GeoPointEmpty = GeoPointEmpty_; - type GeoPoint = GeoPoint_; - type InputNotifyPeer = InputNotifyPeer_; - type InputNotifyUsers = InputNotifyUsers_; - type InputNotifyChats = InputNotifyChats_; - type InputNotifyBroadcasts = InputNotifyBroadcasts_; - type InputNotifyForumTopic = InputNotifyForumTopic_; - type InputPeerNotifySettings = InputPeerNotifySettings_; - type PeerNotifySettings = PeerNotifySettings_; - type PeerSettings = PeerSettings_; - type WallPaper = WallPaper_; - type WallPaperNoFile = WallPaperNoFile_; - type InputReportReasonSpam = InputReportReasonSpam_; - type InputReportReasonViolence = InputReportReasonViolence_; - type InputReportReasonPornography = InputReportReasonPornography_; - type InputReportReasonChildAbuse = InputReportReasonChildAbuse_; - type InputReportReasonOther = InputReportReasonOther_; - type InputReportReasonCopyright = InputReportReasonCopyright_; - type InputReportReasonGeoIrrelevant = InputReportReasonGeoIrrelevant_; - type InputReportReasonFake = InputReportReasonFake_; - type InputReportReasonIllegalDrugs = InputReportReasonIllegalDrugs_; - type InputReportReasonPersonalDetails = InputReportReasonPersonalDetails_; - type UserFull = UserFull_; - type Contact = Contact_; - type ImportedContact = ImportedContact_; - type ContactStatus = ContactStatus_; - type InputMessagesFilterEmpty = InputMessagesFilterEmpty_; - type InputMessagesFilterPhotos = InputMessagesFilterPhotos_; - type InputMessagesFilterVideo = InputMessagesFilterVideo_; - type InputMessagesFilterPhotoVideo = InputMessagesFilterPhotoVideo_; - type InputMessagesFilterDocument = InputMessagesFilterDocument_; - type InputMessagesFilterUrl = InputMessagesFilterUrl_; - type InputMessagesFilterGif = InputMessagesFilterGif_; - type InputMessagesFilterVoice = InputMessagesFilterVoice_; - type InputMessagesFilterMusic = InputMessagesFilterMusic_; - type InputMessagesFilterChatPhotos = InputMessagesFilterChatPhotos_; - type InputMessagesFilterPhoneCalls = InputMessagesFilterPhoneCalls_; - type InputMessagesFilterRoundVoice = InputMessagesFilterRoundVoice_; - type InputMessagesFilterRoundVideo = InputMessagesFilterRoundVideo_; - type InputMessagesFilterMyMentions = InputMessagesFilterMyMentions_; - type InputMessagesFilterGeo = InputMessagesFilterGeo_; - type InputMessagesFilterContacts = InputMessagesFilterContacts_; - type InputMessagesFilterPinned = InputMessagesFilterPinned_; - type UpdateNewMessage = UpdateNewMessage_; - type UpdateMessageID = UpdateMessageID_; - type UpdateDeleteMessages = UpdateDeleteMessages_; - type UpdateUserTyping = UpdateUserTyping_; - type UpdateChatUserTyping = UpdateChatUserTyping_; - type UpdateChatParticipants = UpdateChatParticipants_; - type UpdateUserStatus = UpdateUserStatus_; - type UpdateUserName = UpdateUserName_; - type UpdateNewAuthorization = UpdateNewAuthorization_; - type UpdateNewEncryptedMessage = UpdateNewEncryptedMessage_; - type UpdateEncryptedChatTyping = UpdateEncryptedChatTyping_; - type UpdateEncryption = UpdateEncryption_; - type UpdateEncryptedMessagesRead = UpdateEncryptedMessagesRead_; - type UpdateChatParticipantAdd = UpdateChatParticipantAdd_; - type UpdateChatParticipantDelete = UpdateChatParticipantDelete_; - type UpdateDcOptions = UpdateDcOptions_; - type UpdateNotifySettings = UpdateNotifySettings_; - type UpdateServiceNotification = UpdateServiceNotification_; - type UpdatePrivacy = UpdatePrivacy_; - type UpdateUserPhone = UpdateUserPhone_; - type UpdateReadHistoryInbox = UpdateReadHistoryInbox_; - type UpdateReadHistoryOutbox = UpdateReadHistoryOutbox_; - type UpdateWebPage = UpdateWebPage_; - type UpdateReadMessagesContents = UpdateReadMessagesContents_; - type UpdateChannelTooLong = UpdateChannelTooLong_; - type UpdateChannel = UpdateChannel_; - type UpdateNewChannelMessage = UpdateNewChannelMessage_; - type UpdateReadChannelInbox = UpdateReadChannelInbox_; - type UpdateDeleteChannelMessages = UpdateDeleteChannelMessages_; - type UpdateChannelMessageViews = UpdateChannelMessageViews_; - type UpdateChatParticipantAdmin = UpdateChatParticipantAdmin_; - type UpdateNewStickerSet = UpdateNewStickerSet_; - type UpdateStickerSetsOrder = UpdateStickerSetsOrder_; - type UpdateStickerSets = UpdateStickerSets_; - type UpdateSavedGifs = UpdateSavedGifs_; - type UpdateBotInlineQuery = UpdateBotInlineQuery_; - type UpdateBotInlineSend = UpdateBotInlineSend_; - type UpdateEditChannelMessage = UpdateEditChannelMessage_; - type UpdateBotCallbackQuery = UpdateBotCallbackQuery_; - type UpdateEditMessage = UpdateEditMessage_; - type UpdateInlineBotCallbackQuery = UpdateInlineBotCallbackQuery_; - type UpdateReadChannelOutbox = UpdateReadChannelOutbox_; - type UpdateDraftMessage = UpdateDraftMessage_; - type UpdateReadFeaturedStickers = UpdateReadFeaturedStickers_; - type UpdateRecentStickers = UpdateRecentStickers_; - type UpdateConfig = UpdateConfig_; - type UpdatePtsChanged = UpdatePtsChanged_; - type UpdateChannelWebPage = UpdateChannelWebPage_; - type UpdateDialogPinned = UpdateDialogPinned_; - type UpdatePinnedDialogs = UpdatePinnedDialogs_; - type UpdateBotWebhookJSON = UpdateBotWebhookJSON_; - type UpdateBotWebhookJSONQuery = UpdateBotWebhookJSONQuery_; - type UpdateBotShippingQuery = UpdateBotShippingQuery_; - type UpdateBotPrecheckoutQuery = UpdateBotPrecheckoutQuery_; - type UpdatePhoneCall = UpdatePhoneCall_; - type UpdateLangPackTooLong = UpdateLangPackTooLong_; - type UpdateLangPack = UpdateLangPack_; - type UpdateFavedStickers = UpdateFavedStickers_; - type UpdateChannelReadMessagesContents = UpdateChannelReadMessagesContents_; - type UpdateContactsReset = UpdateContactsReset_; - type UpdateChannelAvailableMessages = UpdateChannelAvailableMessages_; - type UpdateDialogUnreadMark = UpdateDialogUnreadMark_; - type UpdateMessagePoll = UpdateMessagePoll_; - type UpdateChatDefaultBannedRights = UpdateChatDefaultBannedRights_; - type UpdateFolderPeers = UpdateFolderPeers_; - type UpdatePeerSettings = UpdatePeerSettings_; - type UpdatePeerLocated = UpdatePeerLocated_; - type UpdateNewScheduledMessage = UpdateNewScheduledMessage_; - type UpdateDeleteScheduledMessages = UpdateDeleteScheduledMessages_; - type UpdateTheme = UpdateTheme_; - type UpdateGeoLiveViewed = UpdateGeoLiveViewed_; - type UpdateLoginToken = UpdateLoginToken_; - type UpdateMessagePollVote = UpdateMessagePollVote_; - type UpdateDialogFilter = UpdateDialogFilter_; - type UpdateDialogFilterOrder = UpdateDialogFilterOrder_; - type UpdateDialogFilters = UpdateDialogFilters_; - type UpdatePhoneCallSignalingData = UpdatePhoneCallSignalingData_; - type UpdateChannelMessageForwards = UpdateChannelMessageForwards_; - type UpdateReadChannelDiscussionInbox = UpdateReadChannelDiscussionInbox_; - type UpdateReadChannelDiscussionOutbox = UpdateReadChannelDiscussionOutbox_; - type UpdatePeerBlocked = UpdatePeerBlocked_; - type UpdateChannelUserTyping = UpdateChannelUserTyping_; - type UpdatePinnedMessages = UpdatePinnedMessages_; - type UpdatePinnedChannelMessages = UpdatePinnedChannelMessages_; - type UpdateChat = UpdateChat_; - type UpdateGroupCallParticipants = UpdateGroupCallParticipants_; - type UpdateGroupCall = UpdateGroupCall_; - type UpdatePeerHistoryTTL = UpdatePeerHistoryTTL_; - type UpdateChatParticipant = UpdateChatParticipant_; - type UpdateChannelParticipant = UpdateChannelParticipant_; - type UpdateBotStopped = UpdateBotStopped_; - type UpdateGroupCallConnection = UpdateGroupCallConnection_; - type UpdateBotCommands = UpdateBotCommands_; - type UpdatePendingJoinRequests = UpdatePendingJoinRequests_; - type UpdateBotChatInviteRequester = UpdateBotChatInviteRequester_; - type UpdateMessageReactions = UpdateMessageReactions_; - type UpdateAttachMenuBots = UpdateAttachMenuBots_; - type UpdateWebViewResultSent = UpdateWebViewResultSent_; - type UpdateBotMenuButton = UpdateBotMenuButton_; - type UpdateSavedRingtones = UpdateSavedRingtones_; - type UpdateTranscribedAudio = UpdateTranscribedAudio_; - type UpdateReadFeaturedEmojiStickers = UpdateReadFeaturedEmojiStickers_; - type UpdateUserEmojiStatus = UpdateUserEmojiStatus_; - type UpdateRecentEmojiStatuses = UpdateRecentEmojiStatuses_; - type UpdateRecentReactions = UpdateRecentReactions_; - type UpdateMoveStickerSetToTop = UpdateMoveStickerSetToTop_; - type UpdateMessageExtendedMedia = UpdateMessageExtendedMedia_; - type UpdateChannelPinnedTopic = UpdateChannelPinnedTopic_; - type UpdateChannelPinnedTopics = UpdateChannelPinnedTopics_; - type UpdateUser = UpdateUser_; - type UpdateAutoSaveSettings = UpdateAutoSaveSettings_; - type UpdateStory = UpdateStory_; - type UpdateReadStories = UpdateReadStories_; - type UpdateStoryID = UpdateStoryID_; - type UpdateStoriesStealthMode = UpdateStoriesStealthMode_; - type UpdateSentStoryReaction = UpdateSentStoryReaction_; - type UpdateBotChatBoost = UpdateBotChatBoost_; - type UpdateChannelViewForumAsMessages = UpdateChannelViewForumAsMessages_; - type UpdatePeerWallpaper = UpdatePeerWallpaper_; - type UpdateBotMessageReaction = UpdateBotMessageReaction_; - type UpdateBotMessageReactions = UpdateBotMessageReactions_; - type UpdateSavedDialogPinned = UpdateSavedDialogPinned_; - type UpdatePinnedSavedDialogs = UpdatePinnedSavedDialogs_; - type UpdateSavedReactionTags = UpdateSavedReactionTags_; - type UpdateSmsJob = UpdateSmsJob_; - type UpdateQuickReplies = UpdateQuickReplies_; - type UpdateNewQuickReply = UpdateNewQuickReply_; - type UpdateDeleteQuickReply = UpdateDeleteQuickReply_; - type UpdateQuickReplyMessage = UpdateQuickReplyMessage_; - type UpdateDeleteQuickReplyMessages = UpdateDeleteQuickReplyMessages_; - type UpdateBotBusinessConnect = UpdateBotBusinessConnect_; - type UpdateBotNewBusinessMessage = UpdateBotNewBusinessMessage_; - type UpdateBotEditBusinessMessage = UpdateBotEditBusinessMessage_; - type UpdateBotDeleteBusinessMessage = UpdateBotDeleteBusinessMessage_; - type UpdatesTooLong = UpdatesTooLong_; - type UpdateShortMessage = UpdateShortMessage_; - type UpdateShortChatMessage = UpdateShortChatMessage_; - type UpdateShort = UpdateShort_; - type UpdatesCombined = UpdatesCombined_; - type Updates = Updates_; - type UpdateShortSentMessage = UpdateShortSentMessage_; - type DcOption = DcOption_; - type Config = Config_; - type NearestDc = NearestDc_; - type EncryptedChatEmpty = EncryptedChatEmpty_; - type EncryptedChatWaiting = EncryptedChatWaiting_; - type EncryptedChatRequested = EncryptedChatRequested_; - type EncryptedChat = EncryptedChat_; - type EncryptedChatDiscarded = EncryptedChatDiscarded_; - type InputEncryptedChat = InputEncryptedChat_; - type EncryptedFileEmpty = EncryptedFileEmpty_; - type EncryptedFile = EncryptedFile_; - type InputEncryptedFileEmpty = InputEncryptedFileEmpty_; - type InputEncryptedFileUploaded = InputEncryptedFileUploaded_; - type InputEncryptedFile = InputEncryptedFile_; - type InputEncryptedFileBigUploaded = InputEncryptedFileBigUploaded_; - type EncryptedMessage = EncryptedMessage_; - type EncryptedMessageService = EncryptedMessageService_; - type InputDocumentEmpty = InputDocumentEmpty_; - type InputDocument = InputDocument_; - type DocumentEmpty = DocumentEmpty_; - type Document = Document_; - type NotifyPeer = NotifyPeer_; - type NotifyUsers = NotifyUsers_; - type NotifyChats = NotifyChats_; - type NotifyBroadcasts = NotifyBroadcasts_; - type NotifyForumTopic = NotifyForumTopic_; - type SendMessageTypingAction = SendMessageTypingAction_; - type SendMessageCancelAction = SendMessageCancelAction_; - type SendMessageRecordVideoAction = SendMessageRecordVideoAction_; - type SendMessageUploadVideoAction = SendMessageUploadVideoAction_; - type SendMessageRecordAudioAction = SendMessageRecordAudioAction_; - type SendMessageUploadAudioAction = SendMessageUploadAudioAction_; - type SendMessageUploadPhotoAction = SendMessageUploadPhotoAction_; - type SendMessageUploadDocumentAction = SendMessageUploadDocumentAction_; - type SendMessageGeoLocationAction = SendMessageGeoLocationAction_; - type SendMessageChooseContactAction = SendMessageChooseContactAction_; - type SendMessageGamePlayAction = SendMessageGamePlayAction_; - type SendMessageRecordRoundAction = SendMessageRecordRoundAction_; - type SendMessageUploadRoundAction = SendMessageUploadRoundAction_; - type SpeakingInGroupCallAction = SpeakingInGroupCallAction_; - type SendMessageHistoryImportAction = SendMessageHistoryImportAction_; - type SendMessageChooseStickerAction = SendMessageChooseStickerAction_; - type SendMessageEmojiInteraction = SendMessageEmojiInteraction_; - type SendMessageEmojiInteractionSeen = SendMessageEmojiInteractionSeen_; - type InputPrivacyKeyStatusTimestamp = InputPrivacyKeyStatusTimestamp_; - type InputPrivacyKeyChatInvite = InputPrivacyKeyChatInvite_; - type InputPrivacyKeyPhoneCall = InputPrivacyKeyPhoneCall_; - type InputPrivacyKeyPhoneP2P = InputPrivacyKeyPhoneP2P_; - type InputPrivacyKeyForwards = InputPrivacyKeyForwards_; - type InputPrivacyKeyProfilePhoto = InputPrivacyKeyProfilePhoto_; - type InputPrivacyKeyPhoneNumber = InputPrivacyKeyPhoneNumber_; - type InputPrivacyKeyAddedByPhone = InputPrivacyKeyAddedByPhone_; - type InputPrivacyKeyVoiceMessages = InputPrivacyKeyVoiceMessages_; - type InputPrivacyKeyAbout = InputPrivacyKeyAbout_; - type InputPrivacyKeyBirthday = InputPrivacyKeyBirthday_; - type PrivacyKeyStatusTimestamp = PrivacyKeyStatusTimestamp_; - type PrivacyKeyChatInvite = PrivacyKeyChatInvite_; - type PrivacyKeyPhoneCall = PrivacyKeyPhoneCall_; - type PrivacyKeyPhoneP2P = PrivacyKeyPhoneP2P_; - type PrivacyKeyForwards = PrivacyKeyForwards_; - type PrivacyKeyProfilePhoto = PrivacyKeyProfilePhoto_; - type PrivacyKeyPhoneNumber = PrivacyKeyPhoneNumber_; - type PrivacyKeyAddedByPhone = PrivacyKeyAddedByPhone_; - type PrivacyKeyVoiceMessages = PrivacyKeyVoiceMessages_; - type PrivacyKeyAbout = PrivacyKeyAbout_; - type PrivacyKeyBirthday = PrivacyKeyBirthday_; - type InputPrivacyValueAllowContacts = InputPrivacyValueAllowContacts_; - type InputPrivacyValueAllowAll = InputPrivacyValueAllowAll_; - type InputPrivacyValueAllowUsers = InputPrivacyValueAllowUsers_; - type InputPrivacyValueDisallowContacts = InputPrivacyValueDisallowContacts_; - type InputPrivacyValueDisallowAll = InputPrivacyValueDisallowAll_; - type InputPrivacyValueDisallowUsers = InputPrivacyValueDisallowUsers_; - type InputPrivacyValueAllowChatParticipants = InputPrivacyValueAllowChatParticipants_; - type InputPrivacyValueDisallowChatParticipants = InputPrivacyValueDisallowChatParticipants_; - type InputPrivacyValueAllowCloseFriends = InputPrivacyValueAllowCloseFriends_; - type InputPrivacyValueAllowPremium = InputPrivacyValueAllowPremium_; - type PrivacyValueAllowContacts = PrivacyValueAllowContacts_; - type PrivacyValueAllowAll = PrivacyValueAllowAll_; - type PrivacyValueAllowUsers = PrivacyValueAllowUsers_; - type PrivacyValueDisallowContacts = PrivacyValueDisallowContacts_; - type PrivacyValueDisallowAll = PrivacyValueDisallowAll_; - type PrivacyValueDisallowUsers = PrivacyValueDisallowUsers_; - type PrivacyValueAllowChatParticipants = PrivacyValueAllowChatParticipants_; - type PrivacyValueDisallowChatParticipants = PrivacyValueDisallowChatParticipants_; - type PrivacyValueAllowCloseFriends = PrivacyValueAllowCloseFriends_; - type PrivacyValueAllowPremium = PrivacyValueAllowPremium_; - type AccountDaysTTL = AccountDaysTTL_; - type DocumentAttributeImageSize = DocumentAttributeImageSize_; - type DocumentAttributeAnimated = DocumentAttributeAnimated_; - type DocumentAttributeSticker = DocumentAttributeSticker_; - type DocumentAttributeVideo = DocumentAttributeVideo_; - type DocumentAttributeAudio = DocumentAttributeAudio_; - type DocumentAttributeFilename = DocumentAttributeFilename_; - type DocumentAttributeHasStickers = DocumentAttributeHasStickers_; - type DocumentAttributeCustomEmoji = DocumentAttributeCustomEmoji_; - type StickerPack = StickerPack_; - type WebPageEmpty = WebPageEmpty_; - type WebPagePending = WebPagePending_; - type WebPage = WebPage_; - type WebPageNotModified = WebPageNotModified_; - type Authorization = Authorization_; - type ReceivedNotifyMessage = ReceivedNotifyMessage_; - type ChatInviteExported = ChatInviteExported_; - type ChatInvitePublicJoinRequests = ChatInvitePublicJoinRequests_; - type ChatInviteAlready = ChatInviteAlready_; - type ChatInvite = ChatInvite_; - type ChatInvitePeek = ChatInvitePeek_; - type InputStickerSetEmpty = InputStickerSetEmpty_; - type InputStickerSetID = InputStickerSetID_; - type InputStickerSetShortName = InputStickerSetShortName_; - type InputStickerSetAnimatedEmoji = InputStickerSetAnimatedEmoji_; - type InputStickerSetDice = InputStickerSetDice_; - type InputStickerSetAnimatedEmojiAnimations = InputStickerSetAnimatedEmojiAnimations_; - type InputStickerSetPremiumGifts = InputStickerSetPremiumGifts_; - type InputStickerSetEmojiGenericAnimations = InputStickerSetEmojiGenericAnimations_; - type InputStickerSetEmojiDefaultStatuses = InputStickerSetEmojiDefaultStatuses_; - type InputStickerSetEmojiDefaultTopicIcons = InputStickerSetEmojiDefaultTopicIcons_; - type InputStickerSetEmojiChannelDefaultStatuses = InputStickerSetEmojiChannelDefaultStatuses_; - type StickerSet = StickerSet_; - type BotCommand = BotCommand_; - type BotInfo = BotInfo_; - type KeyboardButton = KeyboardButton_; - type KeyboardButtonUrl = KeyboardButtonUrl_; - type KeyboardButtonCallback = KeyboardButtonCallback_; - type KeyboardButtonRequestPhone = KeyboardButtonRequestPhone_; - type KeyboardButtonRequestGeoLocation = KeyboardButtonRequestGeoLocation_; - type KeyboardButtonSwitchInline = KeyboardButtonSwitchInline_; - type KeyboardButtonGame = KeyboardButtonGame_; - type KeyboardButtonBuy = KeyboardButtonBuy_; - type KeyboardButtonUrlAuth = KeyboardButtonUrlAuth_; - type InputKeyboardButtonUrlAuth = InputKeyboardButtonUrlAuth_; - type KeyboardButtonRequestPoll = KeyboardButtonRequestPoll_; - type InputKeyboardButtonUserProfile = InputKeyboardButtonUserProfile_; - type KeyboardButtonUserProfile = KeyboardButtonUserProfile_; - type KeyboardButtonWebView = KeyboardButtonWebView_; - type KeyboardButtonSimpleWebView = KeyboardButtonSimpleWebView_; - type KeyboardButtonRequestPeer = KeyboardButtonRequestPeer_; - type InputKeyboardButtonRequestPeer = InputKeyboardButtonRequestPeer_; - type KeyboardButtonRow = KeyboardButtonRow_; - type ReplyKeyboardHide = ReplyKeyboardHide_; - type ReplyKeyboardForceReply = ReplyKeyboardForceReply_; - type ReplyKeyboardMarkup = ReplyKeyboardMarkup_; - type ReplyInlineMarkup = ReplyInlineMarkup_; - type MessageEntityUnknown = MessageEntityUnknown_; - type MessageEntityMention = MessageEntityMention_; - type MessageEntityHashtag = MessageEntityHashtag_; - type MessageEntityBotCommand = MessageEntityBotCommand_; - type MessageEntityUrl = MessageEntityUrl_; - type MessageEntityEmail = MessageEntityEmail_; - type MessageEntityBold = MessageEntityBold_; - type MessageEntityItalic = MessageEntityItalic_; - type MessageEntityCode = MessageEntityCode_; - type MessageEntityPre = MessageEntityPre_; - type MessageEntityTextUrl = MessageEntityTextUrl_; - type MessageEntityMentionName = MessageEntityMentionName_; - type InputMessageEntityMentionName = InputMessageEntityMentionName_; - type MessageEntityPhone = MessageEntityPhone_; - type MessageEntityCashtag = MessageEntityCashtag_; - type MessageEntityUnderline = MessageEntityUnderline_; - type MessageEntityStrike = MessageEntityStrike_; - type MessageEntityBankCard = MessageEntityBankCard_; - type MessageEntitySpoiler = MessageEntitySpoiler_; - type MessageEntityCustomEmoji = MessageEntityCustomEmoji_; - type MessageEntityBlockquote = MessageEntityBlockquote_; - type InputChannelEmpty = InputChannelEmpty_; - type InputChannel = InputChannel_; - type InputChannelFromMessage = InputChannelFromMessage_; - type MessageRange = MessageRange_; - type ChannelMessagesFilterEmpty = ChannelMessagesFilterEmpty_; - type ChannelMessagesFilter = ChannelMessagesFilter_; - type ChannelParticipant = ChannelParticipant_; - type ChannelParticipantSelf = ChannelParticipantSelf_; - type ChannelParticipantCreator = ChannelParticipantCreator_; - type ChannelParticipantAdmin = ChannelParticipantAdmin_; - type ChannelParticipantBanned = ChannelParticipantBanned_; - type ChannelParticipantLeft = ChannelParticipantLeft_; - type ChannelParticipantsRecent = ChannelParticipantsRecent_; - type ChannelParticipantsAdmins = ChannelParticipantsAdmins_; - type ChannelParticipantsKicked = ChannelParticipantsKicked_; - type ChannelParticipantsBots = ChannelParticipantsBots_; - type ChannelParticipantsBanned = ChannelParticipantsBanned_; - type ChannelParticipantsSearch = ChannelParticipantsSearch_; - type ChannelParticipantsContacts = ChannelParticipantsContacts_; - type ChannelParticipantsMentions = ChannelParticipantsMentions_; - type InputBotInlineMessageMediaAuto = InputBotInlineMessageMediaAuto_; - type InputBotInlineMessageText = InputBotInlineMessageText_; - type InputBotInlineMessageMediaGeo = InputBotInlineMessageMediaGeo_; - type InputBotInlineMessageMediaVenue = InputBotInlineMessageMediaVenue_; - type InputBotInlineMessageMediaContact = InputBotInlineMessageMediaContact_; - type InputBotInlineMessageGame = InputBotInlineMessageGame_; - type InputBotInlineMessageMediaInvoice = InputBotInlineMessageMediaInvoice_; - type InputBotInlineMessageMediaWebPage = InputBotInlineMessageMediaWebPage_; - type InputBotInlineResult = InputBotInlineResult_; - type InputBotInlineResultPhoto = InputBotInlineResultPhoto_; - type InputBotInlineResultDocument = InputBotInlineResultDocument_; - type InputBotInlineResultGame = InputBotInlineResultGame_; - type BotInlineMessageMediaAuto = BotInlineMessageMediaAuto_; - type BotInlineMessageText = BotInlineMessageText_; - type BotInlineMessageMediaGeo = BotInlineMessageMediaGeo_; - type BotInlineMessageMediaVenue = BotInlineMessageMediaVenue_; - type BotInlineMessageMediaContact = BotInlineMessageMediaContact_; - type BotInlineMessageMediaInvoice = BotInlineMessageMediaInvoice_; - type BotInlineMessageMediaWebPage = BotInlineMessageMediaWebPage_; - type BotInlineResult = BotInlineResult_; - type BotInlineMediaResult = BotInlineMediaResult_; - type ExportedMessageLink = ExportedMessageLink_; - type MessageFwdHeader = MessageFwdHeader_; - type InputBotInlineMessageID = InputBotInlineMessageID_; - type InputBotInlineMessageID64 = InputBotInlineMessageID64_; - type InlineBotSwitchPM = InlineBotSwitchPM_; - type TopPeer = TopPeer_; - type TopPeerCategoryBotsPM = TopPeerCategoryBotsPM_; - type TopPeerCategoryBotsInline = TopPeerCategoryBotsInline_; - type TopPeerCategoryCorrespondents = TopPeerCategoryCorrespondents_; - type TopPeerCategoryGroups = TopPeerCategoryGroups_; - type TopPeerCategoryChannels = TopPeerCategoryChannels_; - type TopPeerCategoryPhoneCalls = TopPeerCategoryPhoneCalls_; - type TopPeerCategoryForwardUsers = TopPeerCategoryForwardUsers_; - type TopPeerCategoryForwardChats = TopPeerCategoryForwardChats_; - type TopPeerCategoryPeers = TopPeerCategoryPeers_; - type DraftMessageEmpty = DraftMessageEmpty_; - type DraftMessage = DraftMessage_; - type StickerSetCovered = StickerSetCovered_; - type StickerSetMultiCovered = StickerSetMultiCovered_; - type StickerSetFullCovered = StickerSetFullCovered_; - type StickerSetNoCovered = StickerSetNoCovered_; - type MaskCoords = MaskCoords_; - type InputStickeredMediaPhoto = InputStickeredMediaPhoto_; - type InputStickeredMediaDocument = InputStickeredMediaDocument_; - type Game = Game_; - type InputGameID = InputGameID_; - type InputGameShortName = InputGameShortName_; - type HighScore = HighScore_; - type TextEmpty = TextEmpty_; - type TextPlain = TextPlain_; - type TextBold = TextBold_; - type TextItalic = TextItalic_; - type TextUnderline = TextUnderline_; - type TextStrike = TextStrike_; - type TextFixed = TextFixed_; - type TextUrl = TextUrl_; - type TextEmail = TextEmail_; - type TextConcat = TextConcat_; - type TextSubscript = TextSubscript_; - type TextSuperscript = TextSuperscript_; - type TextMarked = TextMarked_; - type TextPhone = TextPhone_; - type TextImage = TextImage_; - type TextAnchor = TextAnchor_; - type PageBlockUnsupported = PageBlockUnsupported_; - type PageBlockTitle = PageBlockTitle_; - type PageBlockSubtitle = PageBlockSubtitle_; - type PageBlockAuthorDate = PageBlockAuthorDate_; - type PageBlockHeader = PageBlockHeader_; - type PageBlockSubheader = PageBlockSubheader_; - type PageBlockParagraph = PageBlockParagraph_; - type PageBlockPreformatted = PageBlockPreformatted_; - type PageBlockFooter = PageBlockFooter_; - type PageBlockDivider = PageBlockDivider_; - type PageBlockAnchor = PageBlockAnchor_; - type PageBlockList = PageBlockList_; - type PageBlockBlockquote = PageBlockBlockquote_; - type PageBlockPullquote = PageBlockPullquote_; - type PageBlockPhoto = PageBlockPhoto_; - type PageBlockVideo = PageBlockVideo_; - type PageBlockCover = PageBlockCover_; - type PageBlockEmbed = PageBlockEmbed_; - type PageBlockEmbedPost = PageBlockEmbedPost_; - type PageBlockCollage = PageBlockCollage_; - type PageBlockSlideshow = PageBlockSlideshow_; - type PageBlockChannel = PageBlockChannel_; - type PageBlockAudio = PageBlockAudio_; - type PageBlockKicker = PageBlockKicker_; - type PageBlockTable = PageBlockTable_; - type PageBlockOrderedList = PageBlockOrderedList_; - type PageBlockDetails = PageBlockDetails_; - type PageBlockRelatedArticles = PageBlockRelatedArticles_; - type PageBlockMap = PageBlockMap_; - type PhoneCallDiscardReasonMissed = PhoneCallDiscardReasonMissed_; - type PhoneCallDiscardReasonDisconnect = PhoneCallDiscardReasonDisconnect_; - type PhoneCallDiscardReasonHangup = PhoneCallDiscardReasonHangup_; - type PhoneCallDiscardReasonBusy = PhoneCallDiscardReasonBusy_; - type DataJSON = DataJSON_; - type LabeledPrice = LabeledPrice_; - type Invoice = Invoice_; - type PaymentCharge = PaymentCharge_; - type PostAddress = PostAddress_; - type PaymentRequestedInfo = PaymentRequestedInfo_; - type PaymentSavedCredentialsCard = PaymentSavedCredentialsCard_; - type WebDocument = WebDocument_; - type WebDocumentNoProxy = WebDocumentNoProxy_; - type InputWebDocument = InputWebDocument_; - type InputWebFileLocation = InputWebFileLocation_; - type InputWebFileGeoPointLocation = InputWebFileGeoPointLocation_; - type InputWebFileAudioAlbumThumbLocation = InputWebFileAudioAlbumThumbLocation_; - type InputPaymentCredentialsSaved = InputPaymentCredentialsSaved_; - type InputPaymentCredentials = InputPaymentCredentials_; - type InputPaymentCredentialsApplePay = InputPaymentCredentialsApplePay_; - type InputPaymentCredentialsGooglePay = InputPaymentCredentialsGooglePay_; - type ShippingOption = ShippingOption_; - type InputStickerSetItem = InputStickerSetItem_; - type InputPhoneCall = InputPhoneCall_; - type PhoneCallEmpty = PhoneCallEmpty_; - type PhoneCallWaiting = PhoneCallWaiting_; - type PhoneCallRequested = PhoneCallRequested_; - type PhoneCallAccepted = PhoneCallAccepted_; - type PhoneCall = PhoneCall_; - type PhoneCallDiscarded = PhoneCallDiscarded_; - type PhoneConnection = PhoneConnection_; - type PhoneConnectionWebrtc = PhoneConnectionWebrtc_; - type PhoneCallProtocol = PhoneCallProtocol_; - type CdnPublicKey = CdnPublicKey_; - type CdnConfig = CdnConfig_; - type LangPackString = LangPackString_; - type LangPackStringPluralized = LangPackStringPluralized_; - type LangPackStringDeleted = LangPackStringDeleted_; - type LangPackDifference = LangPackDifference_; - type LangPackLanguage = LangPackLanguage_; - type ChannelAdminLogEventActionChangeTitle = ChannelAdminLogEventActionChangeTitle_; - type ChannelAdminLogEventActionChangeAbout = ChannelAdminLogEventActionChangeAbout_; - type ChannelAdminLogEventActionChangeUsername = ChannelAdminLogEventActionChangeUsername_; - type ChannelAdminLogEventActionChangePhoto = ChannelAdminLogEventActionChangePhoto_; - type ChannelAdminLogEventActionToggleInvites = ChannelAdminLogEventActionToggleInvites_; - type ChannelAdminLogEventActionToggleSignatures = ChannelAdminLogEventActionToggleSignatures_; - type ChannelAdminLogEventActionUpdatePinned = ChannelAdminLogEventActionUpdatePinned_; - type ChannelAdminLogEventActionEditMessage = ChannelAdminLogEventActionEditMessage_; - type ChannelAdminLogEventActionDeleteMessage = ChannelAdminLogEventActionDeleteMessage_; - type ChannelAdminLogEventActionParticipantJoin = ChannelAdminLogEventActionParticipantJoin_; - type ChannelAdminLogEventActionParticipantLeave = ChannelAdminLogEventActionParticipantLeave_; - type ChannelAdminLogEventActionParticipantInvite = ChannelAdminLogEventActionParticipantInvite_; - type ChannelAdminLogEventActionParticipantToggleBan = ChannelAdminLogEventActionParticipantToggleBan_; - type ChannelAdminLogEventActionParticipantToggleAdmin = ChannelAdminLogEventActionParticipantToggleAdmin_; - type ChannelAdminLogEventActionChangeStickerSet = ChannelAdminLogEventActionChangeStickerSet_; - type ChannelAdminLogEventActionTogglePreHistoryHidden = ChannelAdminLogEventActionTogglePreHistoryHidden_; - type ChannelAdminLogEventActionDefaultBannedRights = ChannelAdminLogEventActionDefaultBannedRights_; - type ChannelAdminLogEventActionStopPoll = ChannelAdminLogEventActionStopPoll_; - type ChannelAdminLogEventActionChangeLinkedChat = ChannelAdminLogEventActionChangeLinkedChat_; - type ChannelAdminLogEventActionChangeLocation = ChannelAdminLogEventActionChangeLocation_; - type ChannelAdminLogEventActionToggleSlowMode = ChannelAdminLogEventActionToggleSlowMode_; - type ChannelAdminLogEventActionStartGroupCall = ChannelAdminLogEventActionStartGroupCall_; - type ChannelAdminLogEventActionDiscardGroupCall = ChannelAdminLogEventActionDiscardGroupCall_; - type ChannelAdminLogEventActionParticipantMute = ChannelAdminLogEventActionParticipantMute_; - type ChannelAdminLogEventActionParticipantUnmute = ChannelAdminLogEventActionParticipantUnmute_; - type ChannelAdminLogEventActionToggleGroupCallSetting = ChannelAdminLogEventActionToggleGroupCallSetting_; - type ChannelAdminLogEventActionParticipantJoinByInvite = ChannelAdminLogEventActionParticipantJoinByInvite_; - type ChannelAdminLogEventActionExportedInviteDelete = ChannelAdminLogEventActionExportedInviteDelete_; - type ChannelAdminLogEventActionExportedInviteRevoke = ChannelAdminLogEventActionExportedInviteRevoke_; - type ChannelAdminLogEventActionExportedInviteEdit = ChannelAdminLogEventActionExportedInviteEdit_; - type ChannelAdminLogEventActionParticipantVolume = ChannelAdminLogEventActionParticipantVolume_; - type ChannelAdminLogEventActionChangeHistoryTTL = ChannelAdminLogEventActionChangeHistoryTTL_; - type ChannelAdminLogEventActionParticipantJoinByRequest = ChannelAdminLogEventActionParticipantJoinByRequest_; - type ChannelAdminLogEventActionToggleNoForwards = ChannelAdminLogEventActionToggleNoForwards_; - type ChannelAdminLogEventActionSendMessage = ChannelAdminLogEventActionSendMessage_; - type ChannelAdminLogEventActionChangeAvailableReactions = ChannelAdminLogEventActionChangeAvailableReactions_; - type ChannelAdminLogEventActionChangeUsernames = ChannelAdminLogEventActionChangeUsernames_; - type ChannelAdminLogEventActionToggleForum = ChannelAdminLogEventActionToggleForum_; - type ChannelAdminLogEventActionCreateTopic = ChannelAdminLogEventActionCreateTopic_; - type ChannelAdminLogEventActionEditTopic = ChannelAdminLogEventActionEditTopic_; - type ChannelAdminLogEventActionDeleteTopic = ChannelAdminLogEventActionDeleteTopic_; - type ChannelAdminLogEventActionPinTopic = ChannelAdminLogEventActionPinTopic_; - type ChannelAdminLogEventActionToggleAntiSpam = ChannelAdminLogEventActionToggleAntiSpam_; - type ChannelAdminLogEventActionChangePeerColor = ChannelAdminLogEventActionChangePeerColor_; - type ChannelAdminLogEventActionChangeProfilePeerColor = ChannelAdminLogEventActionChangeProfilePeerColor_; - type ChannelAdminLogEventActionChangeWallpaper = ChannelAdminLogEventActionChangeWallpaper_; - type ChannelAdminLogEventActionChangeEmojiStatus = ChannelAdminLogEventActionChangeEmojiStatus_; - type ChannelAdminLogEventActionChangeEmojiStickerSet = ChannelAdminLogEventActionChangeEmojiStickerSet_; - type ChannelAdminLogEvent = ChannelAdminLogEvent_; - type ChannelAdminLogEventsFilter = ChannelAdminLogEventsFilter_; - type PopularContact = PopularContact_; - type RecentMeUrlUnknown = RecentMeUrlUnknown_; - type RecentMeUrlUser = RecentMeUrlUser_; - type RecentMeUrlChat = RecentMeUrlChat_; - type RecentMeUrlChatInvite = RecentMeUrlChatInvite_; - type RecentMeUrlStickerSet = RecentMeUrlStickerSet_; - type InputSingleMedia = InputSingleMedia_; - type WebAuthorization = WebAuthorization_; - type InputMessageID = InputMessageID_; - type InputMessageReplyTo = InputMessageReplyTo_; - type InputMessagePinned = InputMessagePinned_; - type InputMessageCallbackQuery = InputMessageCallbackQuery_; - type InputDialogPeer = InputDialogPeer_; - type InputDialogPeerFolder = InputDialogPeerFolder_; - type DialogPeer = DialogPeer_; - type DialogPeerFolder = DialogPeerFolder_; - type FileHash = FileHash_; - type InputClientProxy = InputClientProxy_; - type InputSecureFileUploaded = InputSecureFileUploaded_; - type InputSecureFile = InputSecureFile_; - type SecureFileEmpty = SecureFileEmpty_; - type SecureFile = SecureFile_; - type SecureData = SecureData_; - type SecurePlainPhone = SecurePlainPhone_; - type SecurePlainEmail = SecurePlainEmail_; - type SecureValueTypePersonalDetails = SecureValueTypePersonalDetails_; - type SecureValueTypePassport = SecureValueTypePassport_; - type SecureValueTypeDriverLicense = SecureValueTypeDriverLicense_; - type SecureValueTypeIdentityCard = SecureValueTypeIdentityCard_; - type SecureValueTypeInternalPassport = SecureValueTypeInternalPassport_; - type SecureValueTypeAddress = SecureValueTypeAddress_; - type SecureValueTypeUtilityBill = SecureValueTypeUtilityBill_; - type SecureValueTypeBankStatement = SecureValueTypeBankStatement_; - type SecureValueTypeRentalAgreement = SecureValueTypeRentalAgreement_; - type SecureValueTypePassportRegistration = SecureValueTypePassportRegistration_; - type SecureValueTypeTemporaryRegistration = SecureValueTypeTemporaryRegistration_; - type SecureValueTypePhone = SecureValueTypePhone_; - type SecureValueTypeEmail = SecureValueTypeEmail_; - type SecureValue = SecureValue_; - type InputSecureValue = InputSecureValue_; - type SecureValueHash = SecureValueHash_; - type SecureValueErrorData = SecureValueErrorData_; - type SecureValueErrorFrontSide = SecureValueErrorFrontSide_; - type SecureValueErrorReverseSide = SecureValueErrorReverseSide_; - type SecureValueErrorSelfie = SecureValueErrorSelfie_; - type SecureValueErrorFile = SecureValueErrorFile_; - type SecureValueErrorFiles = SecureValueErrorFiles_; - type SecureValueError = SecureValueError_; - type SecureValueErrorTranslationFile = SecureValueErrorTranslationFile_; - type SecureValueErrorTranslationFiles = SecureValueErrorTranslationFiles_; - type SecureCredentialsEncrypted = SecureCredentialsEncrypted_; - type SavedPhoneContact = SavedPhoneContact_; - type PasswordKdfAlgoUnknown = PasswordKdfAlgoUnknown_; - type PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow = PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_; - type SecurePasswordKdfAlgoUnknown = SecurePasswordKdfAlgoUnknown_; - type SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 = SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000_; - type SecurePasswordKdfAlgoSHA512 = SecurePasswordKdfAlgoSHA512_; - type SecureSecretSettings = SecureSecretSettings_; - type InputCheckPasswordEmpty = InputCheckPasswordEmpty_; - type InputCheckPasswordSRP = InputCheckPasswordSRP_; - type SecureRequiredType = SecureRequiredType_; - type SecureRequiredTypeOneOf = SecureRequiredTypeOneOf_; - type InputAppEvent = InputAppEvent_; - type JsonObjectValue = JsonObjectValue_; - type JsonNull = JsonNull_; - type JsonBool = JsonBool_; - type JsonNumber = JsonNumber_; - type JsonString = JsonString_; - type JsonArray = JsonArray_; - type JsonObject = JsonObject_; - type PageTableCell = PageTableCell_; - type PageTableRow = PageTableRow_; - type PageCaption = PageCaption_; - type PageListItemText = PageListItemText_; - type PageListItemBlocks = PageListItemBlocks_; - type PageListOrderedItemText = PageListOrderedItemText_; - type PageListOrderedItemBlocks = PageListOrderedItemBlocks_; - type PageRelatedArticle = PageRelatedArticle_; - type Page = Page_; - type PollAnswer = PollAnswer_; - type Poll = Poll_; - type PollAnswerVoters = PollAnswerVoters_; - type PollResults = PollResults_; - type ChatOnlines = ChatOnlines_; - type StatsURL = StatsURL_; - type ChatAdminRights = ChatAdminRights_; - type ChatBannedRights = ChatBannedRights_; - type InputWallPaper = InputWallPaper_; - type InputWallPaperSlug = InputWallPaperSlug_; - type InputWallPaperNoFile = InputWallPaperNoFile_; - type CodeSettings = CodeSettings_; - type WallPaperSettings = WallPaperSettings_; - type AutoDownloadSettings = AutoDownloadSettings_; - type EmojiKeyword = EmojiKeyword_; - type EmojiKeywordDeleted = EmojiKeywordDeleted_; - type EmojiKeywordsDifference = EmojiKeywordsDifference_; - type EmojiURL = EmojiURL_; - type EmojiLanguage = EmojiLanguage_; - type Folder = Folder_; - type InputFolderPeer = InputFolderPeer_; - type FolderPeer = FolderPeer_; - type UrlAuthResultRequest = UrlAuthResultRequest_; - type UrlAuthResultAccepted = UrlAuthResultAccepted_; - type UrlAuthResultDefault = UrlAuthResultDefault_; - type ChannelLocationEmpty = ChannelLocationEmpty_; - type ChannelLocation = ChannelLocation_; - type PeerLocated = PeerLocated_; - type PeerSelfLocated = PeerSelfLocated_; - type RestrictionReason = RestrictionReason_; - type InputTheme = InputTheme_; - type InputThemeSlug = InputThemeSlug_; - type Theme = Theme_; - type BaseThemeClassic = BaseThemeClassic_; - type BaseThemeDay = BaseThemeDay_; - type BaseThemeNight = BaseThemeNight_; - type BaseThemeTinted = BaseThemeTinted_; - type BaseThemeArctic = BaseThemeArctic_; - type InputThemeSettings = InputThemeSettings_; - type ThemeSettings = ThemeSettings_; - type WebPageAttributeTheme = WebPageAttributeTheme_; - type WebPageAttributeStory = WebPageAttributeStory_; - type BankCardOpenUrl = BankCardOpenUrl_; - type DialogFilter = DialogFilter_; - type DialogFilterDefault = DialogFilterDefault_; - type DialogFilterChatlist = DialogFilterChatlist_; - type DialogFilterSuggested = DialogFilterSuggested_; - type StatsDateRangeDays = StatsDateRangeDays_; - type StatsAbsValueAndPrev = StatsAbsValueAndPrev_; - type StatsPercentValue = StatsPercentValue_; - type StatsGraphAsync = StatsGraphAsync_; - type StatsGraphError = StatsGraphError_; - type StatsGraph = StatsGraph_; - type VideoSize = VideoSize_; - type VideoSizeEmojiMarkup = VideoSizeEmojiMarkup_; - type VideoSizeStickerMarkup = VideoSizeStickerMarkup_; - type StatsGroupTopPoster = StatsGroupTopPoster_; - type StatsGroupTopAdmin = StatsGroupTopAdmin_; - type StatsGroupTopInviter = StatsGroupTopInviter_; - type GlobalPrivacySettings = GlobalPrivacySettings_; - type MessageViews = MessageViews_; - type MessageReplyHeader = MessageReplyHeader_; - type MessageReplyStoryHeader = MessageReplyStoryHeader_; - type MessageReplies = MessageReplies_; - type PeerBlocked = PeerBlocked_; - type GroupCallDiscarded = GroupCallDiscarded_; - type GroupCall = GroupCall_; - type InputGroupCall = InputGroupCall_; - type GroupCallParticipant = GroupCallParticipant_; - type InlineQueryPeerTypeSameBotPM = InlineQueryPeerTypeSameBotPM_; - type InlineQueryPeerTypePM = InlineQueryPeerTypePM_; - type InlineQueryPeerTypeChat = InlineQueryPeerTypeChat_; - type InlineQueryPeerTypeMegagroup = InlineQueryPeerTypeMegagroup_; - type InlineQueryPeerTypeBroadcast = InlineQueryPeerTypeBroadcast_; - type InlineQueryPeerTypeBotPM = InlineQueryPeerTypeBotPM_; - type ChatInviteImporter = ChatInviteImporter_; - type ChatAdminWithInvites = ChatAdminWithInvites_; - type GroupCallParticipantVideoSourceGroup = GroupCallParticipantVideoSourceGroup_; - type GroupCallParticipantVideo = GroupCallParticipantVideo_; - type BotCommandScopeDefault = BotCommandScopeDefault_; - type BotCommandScopeUsers = BotCommandScopeUsers_; - type BotCommandScopeChats = BotCommandScopeChats_; - type BotCommandScopeChatAdmins = BotCommandScopeChatAdmins_; - type BotCommandScopePeer = BotCommandScopePeer_; - type BotCommandScopePeerAdmins = BotCommandScopePeerAdmins_; - type BotCommandScopePeerUser = BotCommandScopePeerUser_; - type SponsoredMessage = SponsoredMessage_; - type SearchResultsCalendarPeriod = SearchResultsCalendarPeriod_; - type SearchResultPosition = SearchResultPosition_; - type ReactionCount = ReactionCount_; - type MessageReactions = MessageReactions_; - type AvailableReaction = AvailableReaction_; - type MessagePeerReaction = MessagePeerReaction_; - type GroupCallStreamChannel = GroupCallStreamChannel_; - type AttachMenuBotIconColor = AttachMenuBotIconColor_; - type AttachMenuBotIcon = AttachMenuBotIcon_; - type AttachMenuBot = AttachMenuBot_; - type AttachMenuBotsNotModified = AttachMenuBotsNotModified_; - type AttachMenuBots = AttachMenuBots_; - type AttachMenuBotsBot = AttachMenuBotsBot_; - type WebViewResultUrl = WebViewResultUrl_; - type SimpleWebViewResultUrl = SimpleWebViewResultUrl_; - type WebViewMessageSent = WebViewMessageSent_; - type BotMenuButtonDefault = BotMenuButtonDefault_; - type BotMenuButtonCommands = BotMenuButtonCommands_; - type BotMenuButton = BotMenuButton_; - type NotificationSoundDefault = NotificationSoundDefault_; - type NotificationSoundNone = NotificationSoundNone_; - type NotificationSoundLocal = NotificationSoundLocal_; - type NotificationSoundRingtone = NotificationSoundRingtone_; - type AttachMenuPeerTypeSameBotPM = AttachMenuPeerTypeSameBotPM_; - type AttachMenuPeerTypeBotPM = AttachMenuPeerTypeBotPM_; - type AttachMenuPeerTypePM = AttachMenuPeerTypePM_; - type AttachMenuPeerTypeChat = AttachMenuPeerTypeChat_; - type AttachMenuPeerTypeBroadcast = AttachMenuPeerTypeBroadcast_; - type InputInvoiceMessage = InputInvoiceMessage_; - type InputInvoiceSlug = InputInvoiceSlug_; - type InputInvoicePremiumGiftCode = InputInvoicePremiumGiftCode_; - type InputStorePaymentPremiumSubscription = InputStorePaymentPremiumSubscription_; - type InputStorePaymentGiftPremium = InputStorePaymentGiftPremium_; - type InputStorePaymentPremiumGiftCode = InputStorePaymentPremiumGiftCode_; - type InputStorePaymentPremiumGiveaway = InputStorePaymentPremiumGiveaway_; - type PremiumGiftOption = PremiumGiftOption_; - type PaymentFormMethod = PaymentFormMethod_; - type EmojiStatusEmpty = EmojiStatusEmpty_; - type EmojiStatus = EmojiStatus_; - type EmojiStatusUntil = EmojiStatusUntil_; - type ReactionEmpty = ReactionEmpty_; - type ReactionEmoji = ReactionEmoji_; - type ReactionCustomEmoji = ReactionCustomEmoji_; - type ChatReactionsNone = ChatReactionsNone_; - type ChatReactionsAll = ChatReactionsAll_; - type ChatReactionsSome = ChatReactionsSome_; - type EmailVerifyPurposeLoginSetup = EmailVerifyPurposeLoginSetup_; - type EmailVerifyPurposeLoginChange = EmailVerifyPurposeLoginChange_; - type EmailVerifyPurposePassport = EmailVerifyPurposePassport_; - type EmailVerificationCode = EmailVerificationCode_; - type EmailVerificationGoogle = EmailVerificationGoogle_; - type EmailVerificationApple = EmailVerificationApple_; - type PremiumSubscriptionOption = PremiumSubscriptionOption_; - type SendAsPeer = SendAsPeer_; - type MessageExtendedMediaPreview = MessageExtendedMediaPreview_; - type MessageExtendedMedia = MessageExtendedMedia_; - type StickerKeyword = StickerKeyword_; - type Username = Username_; - type ForumTopicDeleted = ForumTopicDeleted_; - type ForumTopic = ForumTopic_; - type DefaultHistoryTTL = DefaultHistoryTTL_; - type ExportedContactToken = ExportedContactToken_; - type RequestPeerTypeUser = RequestPeerTypeUser_; - type RequestPeerTypeChat = RequestPeerTypeChat_; - type RequestPeerTypeBroadcast = RequestPeerTypeBroadcast_; - type EmojiListNotModified = EmojiListNotModified_; - type EmojiList = EmojiList_; - type EmojiGroup = EmojiGroup_; - type TextWithEntities = TextWithEntities_; - type AutoSaveSettings = AutoSaveSettings_; - type AutoSaveException = AutoSaveException_; - type InputBotAppID = InputBotAppID_; - type InputBotAppShortName = InputBotAppShortName_; - type BotAppNotModified = BotAppNotModified_; - type BotApp = BotApp_; - type AppWebViewResultUrl = AppWebViewResultUrl_; - type InlineBotWebView = InlineBotWebView_; - type ReadParticipantDate = ReadParticipantDate_; - type InputChatlistDialogFilter = InputChatlistDialogFilter_; - type ExportedChatlistInvite = ExportedChatlistInvite_; - type MessagePeerVote = MessagePeerVote_; - type MessagePeerVoteInputOption = MessagePeerVoteInputOption_; - type MessagePeerVoteMultiple = MessagePeerVoteMultiple_; - type SponsoredWebPage = SponsoredWebPage_; - type StoryViews = StoryViews_; - type StoryItemDeleted = StoryItemDeleted_; - type StoryItemSkipped = StoryItemSkipped_; - type StoryItem = StoryItem_; - type StoryView = StoryView_; - type StoryViewPublicForward = StoryViewPublicForward_; - type StoryViewPublicRepost = StoryViewPublicRepost_; - type InputReplyToMessage = InputReplyToMessage_; - type InputReplyToStory = InputReplyToStory_; - type ExportedStoryLink = ExportedStoryLink_; - type StoriesStealthMode = StoriesStealthMode_; - type MediaAreaCoordinates = MediaAreaCoordinates_; - type MediaAreaVenue = MediaAreaVenue_; - type InputMediaAreaVenue = InputMediaAreaVenue_; - type MediaAreaGeoPoint = MediaAreaGeoPoint_; - type MediaAreaSuggestedReaction = MediaAreaSuggestedReaction_; - type MediaAreaChannelPost = MediaAreaChannelPost_; - type InputMediaAreaChannelPost = InputMediaAreaChannelPost_; - type PeerStories = PeerStories_; - type PremiumGiftCodeOption = PremiumGiftCodeOption_; - type PrepaidGiveaway = PrepaidGiveaway_; - type Boost = Boost_; - type MyBoost = MyBoost_; - type StoryFwdHeader = StoryFwdHeader_; - type PostInteractionCountersMessage = PostInteractionCountersMessage_; - type PostInteractionCountersStory = PostInteractionCountersStory_; - type PublicForwardMessage = PublicForwardMessage_; - type PublicForwardStory = PublicForwardStory_; - type PeerColor = PeerColor_; - type StoryReaction = StoryReaction_; - type StoryReactionPublicForward = StoryReactionPublicForward_; - type StoryReactionPublicRepost = StoryReactionPublicRepost_; - type SavedDialog = SavedDialog_; - type SavedReactionTag = SavedReactionTag_; - type OutboxReadDate = OutboxReadDate_; - type SmsJob = SmsJob_; - type BusinessWeeklyOpen = BusinessWeeklyOpen_; - type BusinessWorkHours = BusinessWorkHours_; - type BusinessLocation = BusinessLocation_; - type InputBusinessRecipients = InputBusinessRecipients_; - type BusinessRecipients = BusinessRecipients_; - type BusinessAwayMessageScheduleAlways = BusinessAwayMessageScheduleAlways_; - type BusinessAwayMessageScheduleOutsideWorkHours = BusinessAwayMessageScheduleOutsideWorkHours_; - type BusinessAwayMessageScheduleCustom = BusinessAwayMessageScheduleCustom_; - type InputBusinessGreetingMessage = InputBusinessGreetingMessage_; - type BusinessGreetingMessage = BusinessGreetingMessage_; - type InputBusinessAwayMessage = InputBusinessAwayMessage_; - type BusinessAwayMessage = BusinessAwayMessage_; - type Timezone = Timezone_; - type QuickReply = QuickReply_; - type InputQuickReplyShortcut = InputQuickReplyShortcut_; - type InputQuickReplyShortcutId = InputQuickReplyShortcutId_; - type ConnectedBot = ConnectedBot_; - type Birthday = Birthday_; - type BotBusinessConnection = BotBusinessConnection_; - type InputBusinessIntro = InputBusinessIntro_; - type BusinessIntro = BusinessIntro_; - type InputCollectibleUsername = InputCollectibleUsername_; - type InputCollectiblePhone = InputCollectiblePhone_; - type InputBusinessBotRecipients = InputBusinessBotRecipients_; - type BusinessBotRecipients = BusinessBotRecipients_; - type ContactBirthday = ContactBirthday_; - type MissingInvitee = MissingInvitee_; - type InputBusinessChatLink = InputBusinessChatLink_; - type BusinessChatLink = BusinessChatLink_; - type RequestedPeerUser = RequestedPeerUser_; - type RequestedPeerChat = RequestedPeerChat_; - type RequestedPeerChannel = RequestedPeerChannel_; - type SponsoredMessageReportOption = SponsoredMessageReportOption_; - type BroadcastRevenueTransactionProceeds = BroadcastRevenueTransactionProceeds_; - type BroadcastRevenueTransactionWithdrawal = BroadcastRevenueTransactionWithdrawal_; - type BroadcastRevenueTransactionRefund = BroadcastRevenueTransactionRefund_; - namespace help { - type ConfigSimple = help_ConfigSimple_; - type AppUpdate = help_AppUpdate_; - type NoAppUpdate = help_NoAppUpdate_; - type InviteText = help_InviteText_; - type Support = help_Support_; - type TermsOfService = help_TermsOfService_; - type RecentMeUrls = help_RecentMeUrls_; - type TermsOfServiceUpdateEmpty = help_TermsOfServiceUpdateEmpty_; - type TermsOfServiceUpdate = help_TermsOfServiceUpdate_; - type DeepLinkInfoEmpty = help_DeepLinkInfoEmpty_; - type DeepLinkInfo = help_DeepLinkInfo_; - type PassportConfigNotModified = help_PassportConfigNotModified_; - type PassportConfig = help_PassportConfig_; - type SupportName = help_SupportName_; - type UserInfoEmpty = help_UserInfoEmpty_; - type UserInfo = help_UserInfo_; - type PromoDataEmpty = help_PromoDataEmpty_; - type PromoData = help_PromoData_; - type CountryCode = help_CountryCode_; - type Country = help_Country_; - type CountriesListNotModified = help_CountriesListNotModified_; - type CountriesList = help_CountriesList_; - type PremiumPromo = help_PremiumPromo_; - type AppConfigNotModified = help_AppConfigNotModified_; - type AppConfig = help_AppConfig_; - type PeerColorSet = help_PeerColorSet_; - type PeerColorProfileSet = help_PeerColorProfileSet_; - type PeerColorOption = help_PeerColorOption_; - type PeerColorsNotModified = help_PeerColorsNotModified_; - type PeerColors = help_PeerColors_; - type TimezonesListNotModified = help_TimezonesListNotModified_; - type TimezonesList = help_TimezonesList_; - } - namespace storage { - type FileUnknown = storage_FileUnknown_; - type FilePartial = storage_FilePartial_; - type FileJpeg = storage_FileJpeg_; - type FileGif = storage_FileGif_; - type FilePng = storage_FilePng_; - type FilePdf = storage_FilePdf_; - type FileMp3 = storage_FileMp3_; - type FileMov = storage_FileMov_; - type FileMp4 = storage_FileMp4_; - type FileWebp = storage_FileWebp_; - } - namespace auth { - type SentCode = auth_SentCode_; - type SentCodeSuccess = auth_SentCodeSuccess_; - type Authorization = auth_Authorization_; - type AuthorizationSignUpRequired = auth_AuthorizationSignUpRequired_; - type ExportedAuthorization = auth_ExportedAuthorization_; - type PasswordRecovery = auth_PasswordRecovery_; - type CodeTypeSms = auth_CodeTypeSms_; - type CodeTypeCall = auth_CodeTypeCall_; - type CodeTypeFlashCall = auth_CodeTypeFlashCall_; - type CodeTypeMissedCall = auth_CodeTypeMissedCall_; - type CodeTypeFragmentSms = auth_CodeTypeFragmentSms_; - type SentCodeTypeApp = auth_SentCodeTypeApp_; - type SentCodeTypeSms = auth_SentCodeTypeSms_; - type SentCodeTypeCall = auth_SentCodeTypeCall_; - type SentCodeTypeFlashCall = auth_SentCodeTypeFlashCall_; - type SentCodeTypeMissedCall = auth_SentCodeTypeMissedCall_; - type SentCodeTypeEmailCode = auth_SentCodeTypeEmailCode_; - type SentCodeTypeSetUpEmailRequired = auth_SentCodeTypeSetUpEmailRequired_; - type SentCodeTypeFragmentSms = auth_SentCodeTypeFragmentSms_; - type SentCodeTypeFirebaseSms = auth_SentCodeTypeFirebaseSms_; - type LoginToken = auth_LoginToken_; - type LoginTokenMigrateTo = auth_LoginTokenMigrateTo_; - type LoginTokenSuccess = auth_LoginTokenSuccess_; - type LoggedOut = auth_LoggedOut_; - } - namespace contacts { - type ContactsNotModified = contacts_ContactsNotModified_; - type Contacts = contacts_Contacts_; - type ImportedContacts = contacts_ImportedContacts_; - type Blocked = contacts_Blocked_; - type BlockedSlice = contacts_BlockedSlice_; - type Found = contacts_Found_; - type ResolvedPeer = contacts_ResolvedPeer_; - type TopPeersNotModified = contacts_TopPeersNotModified_; - type TopPeers = contacts_TopPeers_; - type TopPeersDisabled = contacts_TopPeersDisabled_; - type ContactBirthdays = contacts_ContactBirthdays_; - } - namespace messages { - type Dialogs = messages_Dialogs_; - type DialogsSlice = messages_DialogsSlice_; - type DialogsNotModified = messages_DialogsNotModified_; - type Messages = messages_Messages_; - type MessagesSlice = messages_MessagesSlice_; - type ChannelMessages = messages_ChannelMessages_; - type MessagesNotModified = messages_MessagesNotModified_; - type Chats = messages_Chats_; - type ChatsSlice = messages_ChatsSlice_; - type ChatFull = messages_ChatFull_; - type AffectedHistory = messages_AffectedHistory_; - type DhConfigNotModified = messages_DhConfigNotModified_; - type DhConfig = messages_DhConfig_; - type SentEncryptedMessage = messages_SentEncryptedMessage_; - type SentEncryptedFile = messages_SentEncryptedFile_; - type StickersNotModified = messages_StickersNotModified_; - type Stickers = messages_Stickers_; - type AllStickersNotModified = messages_AllStickersNotModified_; - type AllStickers = messages_AllStickers_; - type AffectedMessages = messages_AffectedMessages_; - type StickerSet = messages_StickerSet_; - type StickerSetNotModified = messages_StickerSetNotModified_; - type SavedGifsNotModified = messages_SavedGifsNotModified_; - type SavedGifs = messages_SavedGifs_; - type BotResults = messages_BotResults_; - type BotCallbackAnswer = messages_BotCallbackAnswer_; - type MessageEditData = messages_MessageEditData_; - type PeerDialogs = messages_PeerDialogs_; - type FeaturedStickersNotModified = messages_FeaturedStickersNotModified_; - type FeaturedStickers = messages_FeaturedStickers_; - type RecentStickersNotModified = messages_RecentStickersNotModified_; - type RecentStickers = messages_RecentStickers_; - type ArchivedStickers = messages_ArchivedStickers_; - type StickerSetInstallResultSuccess = messages_StickerSetInstallResultSuccess_; - type StickerSetInstallResultArchive = messages_StickerSetInstallResultArchive_; - type HighScores = messages_HighScores_; - type FavedStickersNotModified = messages_FavedStickersNotModified_; - type FavedStickers = messages_FavedStickers_; - type FoundStickerSetsNotModified = messages_FoundStickerSetsNotModified_; - type FoundStickerSets = messages_FoundStickerSets_; - type SearchCounter = messages_SearchCounter_; - type InactiveChats = messages_InactiveChats_; - type VotesList = messages_VotesList_; - type MessageViews = messages_MessageViews_; - type DiscussionMessage = messages_DiscussionMessage_; - type HistoryImport = messages_HistoryImport_; - type HistoryImportParsed = messages_HistoryImportParsed_; - type AffectedFoundMessages = messages_AffectedFoundMessages_; - type ExportedChatInvites = messages_ExportedChatInvites_; - type ExportedChatInvite = messages_ExportedChatInvite_; - type ExportedChatInviteReplaced = messages_ExportedChatInviteReplaced_; - type ChatInviteImporters = messages_ChatInviteImporters_; - type ChatAdminsWithInvites = messages_ChatAdminsWithInvites_; - type CheckedHistoryImportPeer = messages_CheckedHistoryImportPeer_; - type SponsoredMessages = messages_SponsoredMessages_; - type SponsoredMessagesEmpty = messages_SponsoredMessagesEmpty_; - type SearchResultsCalendar = messages_SearchResultsCalendar_; - type SearchResultsPositions = messages_SearchResultsPositions_; - type PeerSettings = messages_PeerSettings_; - type MessageReactionsList = messages_MessageReactionsList_; - type AvailableReactionsNotModified = messages_AvailableReactionsNotModified_; - type AvailableReactions = messages_AvailableReactions_; - type TranscribedAudio = messages_TranscribedAudio_; - type ReactionsNotModified = messages_ReactionsNotModified_; - type Reactions = messages_Reactions_; - type ForumTopics = messages_ForumTopics_; - type EmojiGroupsNotModified = messages_EmojiGroupsNotModified_; - type EmojiGroups = messages_EmojiGroups_; - type TranslateResult = messages_TranslateResult_; - type BotApp = messages_BotApp_; - type WebPage = messages_WebPage_; - type SavedDialogs = messages_SavedDialogs_; - type SavedDialogsSlice = messages_SavedDialogsSlice_; - type SavedDialogsNotModified = messages_SavedDialogsNotModified_; - type SavedReactionTagsNotModified = messages_SavedReactionTagsNotModified_; - type SavedReactionTags = messages_SavedReactionTags_; - type QuickReplies = messages_QuickReplies_; - type QuickRepliesNotModified = messages_QuickRepliesNotModified_; - type DialogFilters = messages_DialogFilters_; - type MyStickers = messages_MyStickers_; - type InvitedUsers = messages_InvitedUsers_; - } - namespace updates { - type State = updates_State_; - type DifferenceEmpty = updates_DifferenceEmpty_; - type Difference = updates_Difference_; - type DifferenceSlice = updates_DifferenceSlice_; - type DifferenceTooLong = updates_DifferenceTooLong_; - type ChannelDifferenceEmpty = updates_ChannelDifferenceEmpty_; - type ChannelDifferenceTooLong = updates_ChannelDifferenceTooLong_; - type ChannelDifference = updates_ChannelDifference_; - } - namespace photos { - type Photos = photos_Photos_; - type PhotosSlice = photos_PhotosSlice_; - type Photo = photos_Photo_; - } - namespace upload { - type File = upload_File_; - type FileCdnRedirect = upload_FileCdnRedirect_; - type WebFile = upload_WebFile_; - type CdnFileReuploadNeeded = upload_CdnFileReuploadNeeded_; - type CdnFile = upload_CdnFile_; - } - namespace account { - type PrivacyRules = account_PrivacyRules_; - type Authorizations = account_Authorizations_; - type Password = account_Password_; - type PasswordSettings = account_PasswordSettings_; - type PasswordInputSettings = account_PasswordInputSettings_; - type TmpPassword = account_TmpPassword_; - type WebAuthorizations = account_WebAuthorizations_; - type AuthorizationForm = account_AuthorizationForm_; - type SentEmailCode = account_SentEmailCode_; - type Takeout = account_Takeout_; - type WallPapersNotModified = account_WallPapersNotModified_; - type WallPapers = account_WallPapers_; - type AutoDownloadSettings = account_AutoDownloadSettings_; - type ThemesNotModified = account_ThemesNotModified_; - type Themes = account_Themes_; - type ContentSettings = account_ContentSettings_; - type ResetPasswordFailedWait = account_ResetPasswordFailedWait_; - type ResetPasswordRequestedWait = account_ResetPasswordRequestedWait_; - type ResetPasswordOk = account_ResetPasswordOk_; - type SavedRingtonesNotModified = account_SavedRingtonesNotModified_; - type SavedRingtones = account_SavedRingtones_; - type SavedRingtone = account_SavedRingtone_; - type SavedRingtoneConverted = account_SavedRingtoneConverted_; - type EmojiStatusesNotModified = account_EmojiStatusesNotModified_; - type EmojiStatuses = account_EmojiStatuses_; - type EmailVerified = account_EmailVerified_; - type EmailVerifiedLogin = account_EmailVerifiedLogin_; - type AutoSaveSettings = account_AutoSaveSettings_; - type ConnectedBots = account_ConnectedBots_; - type BusinessChatLinks = account_BusinessChatLinks_; - type ResolvedBusinessChatLinks = account_ResolvedBusinessChatLinks_; - } - namespace channels { - type ChannelParticipants = channels_ChannelParticipants_; - type ChannelParticipantsNotModified = channels_ChannelParticipantsNotModified_; - type ChannelParticipant = channels_ChannelParticipant_; - type AdminLogResults = channels_AdminLogResults_; - type SendAsPeers = channels_SendAsPeers_; - type SponsoredMessageReportResultChooseOption = channels_SponsoredMessageReportResultChooseOption_; - type SponsoredMessageReportResultAdsHidden = channels_SponsoredMessageReportResultAdsHidden_; - type SponsoredMessageReportResultReported = channels_SponsoredMessageReportResultReported_; - } - namespace payments { - type PaymentForm = payments_PaymentForm_; - type ValidatedRequestedInfo = payments_ValidatedRequestedInfo_; - type PaymentResult = payments_PaymentResult_; - type PaymentVerificationNeeded = payments_PaymentVerificationNeeded_; - type PaymentReceipt = payments_PaymentReceipt_; - type SavedInfo = payments_SavedInfo_; - type BankCardData = payments_BankCardData_; - type ExportedInvoice = payments_ExportedInvoice_; - type CheckedGiftCode = payments_CheckedGiftCode_; - type GiveawayInfo = payments_GiveawayInfo_; - type GiveawayInfoResults = payments_GiveawayInfoResults_; - } - namespace phone { - type PhoneCall = phone_PhoneCall_; - type GroupCall = phone_GroupCall_; - type GroupParticipants = phone_GroupParticipants_; - type JoinAsPeers = phone_JoinAsPeers_; - type ExportedGroupCallInvite = phone_ExportedGroupCallInvite_; - type GroupCallStreamChannels = phone_GroupCallStreamChannels_; - type GroupCallStreamRtmpUrl = phone_GroupCallStreamRtmpUrl_; - } - namespace stats { - type BroadcastStats = stats_BroadcastStats_; - type MegagroupStats = stats_MegagroupStats_; - type MessageStats = stats_MessageStats_; - type StoryStats = stats_StoryStats_; - type PublicForwards = stats_PublicForwards_; - type BroadcastRevenueStats = stats_BroadcastRevenueStats_; - type BroadcastRevenueWithdrawalUrl = stats_BroadcastRevenueWithdrawalUrl_; - type BroadcastRevenueTransactions = stats_BroadcastRevenueTransactions_; - } - namespace stickers { - type SuggestedShortName = stickers_SuggestedShortName_; - } - namespace users { - type UserFull = users_UserFull_; - } - namespace chatlists { - type ExportedChatlistInvite = chatlists_ExportedChatlistInvite_; - type ExportedInvites = chatlists_ExportedInvites_; - type ChatlistInviteAlready = chatlists_ChatlistInviteAlready_; - type ChatlistInvite = chatlists_ChatlistInvite_; - type ChatlistUpdates = chatlists_ChatlistUpdates_; - } - namespace bots { - type BotInfo = bots_BotInfo_; - } - namespace stories { - type AllStoriesNotModified = stories_AllStoriesNotModified_; - type AllStories = stories_AllStories_; - type Stories = stories_Stories_; - type StoryViewsList = stories_StoryViewsList_; - type StoryViews = stories_StoryViews_; - type PeerStories = stories_PeerStories_; - type StoryReactionsList = stories_StoryReactionsList_; - } - namespace premium { - type BoostsList = premium_BoostsList_; - type MyBoosts = premium_MyBoosts_; - type BoostsStatus = premium_BoostsStatus_; - } - namespace smsjobs { - type EligibleToJoin = smsjobs_EligibleToJoin_; - type Status = smsjobs_Status_; - } - namespace fragment { - type CollectibleInfo = fragment_CollectibleInfo_; - } -} -export const map = new Map([ - [0x05162463, ResPQ_], - [0xA9F55F95, P_q_inner_data_dc_], - [0x56FDDF88, P_q_inner_data_temp_dc_], - [0xD0E8075C, Server_DH_params_ok_], - [0xB5890DBA, Server_DH_inner_data_], - [0x6643B654, Client_DH_inner_data_], - [0x3BCBF734, Dh_gen_ok_], - [0x46DC1FB9, Dh_gen_retry_], - [0xA69DAE02, Dh_gen_fail_], - [0x75A3F765, Bind_auth_key_inner_], - [0x2144CA19, Rpc_error_], - [0x5E2AD36E, Rpc_answer_unknown_], - [0xCD78E586, Rpc_answer_dropped_running_], - [0xA43AD8B7, Rpc_answer_dropped_], - [0x0949D9DC, Future_salt_], - [0xAE500895, Future_salts_], - [0x347773C5, Pong_], - [0xE22045FC, Destroy_session_ok_], - [0x62D350C9, Destroy_session_none_], - [0x9EC20908, New_session_created_], - [0x3072CFA1, Gzip_packed_], - [0x62D6B459, Msgs_ack_], - [0xA7EFF811, Bad_msg_notification_], - [0xEDAB447B, Bad_server_salt_], - [0x7D861A08, Msg_resend_req_], - [0xDA69FB52, Msgs_state_req_], - [0x04DEB57D, Msgs_state_info_], - [0x8CC0D131, Msgs_all_info_], - [0x276D3EC6, Msg_detailed_info_], - [0x809DB6DF, Msg_new_detailed_info_], - [0xF660E1D4, Destroy_auth_key_ok_], - [0x0A9F2259, Destroy_auth_key_none_], - [0xEA109B13, Destroy_auth_key_fail_], - [0x9299359F, Http_wait_], - [0x3FEDD339, True_], - [0xC4B9F9BB, Error_], - [0xD433AD73, IpPort_], - [0x37982646, IpPortSecret_], - [0x4679B65F, AccessPointRule_], - [0x5A592A6C, help_ConfigSimple_], - [0x27D69997, InputPeerPhotoFileLocationLegacy_], - [0x0DBAEAE9, InputStickerSetThumbLegacy_], - [0x7F3B18EA, InputPeerEmpty_], - [0x7DA07EC9, InputPeerSelf_], - [0x35A95CB9, InputPeerChat_], - [0xDDE8A54C, InputPeerUser_], - [0x27BCBBFC, InputPeerChannel_], - [0xA87B0A1C, InputPeerUserFromMessage_], - [0xBD2A0840, InputPeerChannelFromMessage_], - [0xB98886CF, InputUserEmpty_], - [0xF7C1B13F, InputUserSelf_], - [0xF21158C6, InputUser_], - [0x1DA448E2, InputUserFromMessage_], - [0xF392B7F4, InputPhoneContact_], - [0xF52FF27F, InputFile_], - [0xFA4F0BB5, InputFileBig_], - [0x9664F57F, InputMediaEmpty_], - [0x1E287D04, InputMediaUploadedPhoto_], - [0xB3BA0635, InputMediaPhoto_], - [0xF9C44144, InputMediaGeoPoint_], - [0xF8AB7DFB, InputMediaContact_], - [0x5B38C6C1, InputMediaUploadedDocument_], - [0x33473058, InputMediaDocument_], - [0xC13D1C11, InputMediaVenue_], - [0xE5BBFE1A, InputMediaPhotoExternal_], - [0xFB52DC99, InputMediaDocumentExternal_], - [0xD33F43F3, InputMediaGame_], - [0x8EB5A6D5, InputMediaInvoice_], - [0x971FA843, InputMediaGeoLive_], - [0x0F94E5F1, InputMediaPoll_], - [0xE66FBF7B, InputMediaDice_], - [0x89FDD778, InputMediaStory_], - [0xC21B8849, InputMediaWebPage_], - [0x1CA48F57, InputChatPhotoEmpty_], - [0xBDCDAEC0, InputChatUploadedPhoto_], - [0x8953AD37, InputChatPhoto_], - [0xE4C123D6, InputGeoPointEmpty_], - [0x48222FAF, InputGeoPoint_], - [0x1CD7BF0D, InputPhotoEmpty_], - [0x3BB3B94A, InputPhoto_], - [0xDFDAABE1, InputFileLocation_], - [0xF5235D55, InputEncryptedFileLocation_], - [0xBAD07584, InputDocumentFileLocation_], - [0xCBC7EE28, InputSecureFileLocation_], - [0x29BE5899, InputTakeoutFileLocation_], - [0x40181FFE, InputPhotoFileLocation_], - [0xD83466F3, InputPhotoLegacyFileLocation_], - [0x37257E99, InputPeerPhotoFileLocation_], - [0x9D84F3DB, InputStickerSetThumb_], - [0x0598A92A, InputGroupCallStream_], - [0x59511722, PeerUser_], - [0x36C6019A, PeerChat_], - [0xA2A5371E, PeerChannel_], - [0xAA963B05, storage_FileUnknown_], - [0x40BC6F52, storage_FilePartial_], - [0x007EFE0E, storage_FileJpeg_], - [0xCAE1AADF, storage_FileGif_], - [0x0A4F63C0, storage_FilePng_], - [0xAE1E508D, storage_FilePdf_], - [0x528A0677, storage_FileMp3_], - [0x4B09EBBC, storage_FileMov_], - [0xB3CEA0E4, storage_FileMp4_], - [0x1081464C, storage_FileWebp_], - [0xD3BC4B7A, UserEmpty_], - [0x215C4438, User_], - [0x4F11BAE1, UserProfilePhotoEmpty_], - [0x82D1F706, UserProfilePhoto_], - [0x09D05049, UserStatusEmpty_], - [0xEDB93949, UserStatusOnline_], - [0x008C703F, UserStatusOffline_], - [0x7B197DC8, UserStatusRecently_], - [0x541A1D1A, UserStatusLastWeek_], - [0x65899777, UserStatusLastMonth_], - [0x29562865, ChatEmpty_], - [0x41CBF256, Chat_], - [0x6592A1A7, ChatForbidden_], - [0x0AADFC8F, Channel_], - [0x17D493D5, ChannelForbidden_], - [0xC9D31138, ChatFull_], - [0x44C054A7, ChannelFull_], - [0xC02D4007, ChatParticipant_], - [0xE46BCEE4, ChatParticipantCreator_], - [0xA0933F5B, ChatParticipantAdmin_], - [0x8763D3E1, ChatParticipantsForbidden_], - [0x3CBC93F8, ChatParticipants_], - [0x37C1011C, ChatPhotoEmpty_], - [0x1C6E1C11, ChatPhoto_], - [0x90A6CA84, MessageEmpty_], - [0x2357BF25, Message_], - [0x2B085862, MessageService_], - [0x3DED6320, MessageMediaEmpty_], - [0x695150D7, MessageMediaPhoto_], - [0x56E0D474, MessageMediaGeo_], - [0x70322949, MessageMediaContact_], - [0x9F84F49E, MessageMediaUnsupported_], - [0x4CF4D72D, MessageMediaDocument_], - [0xDDF10C3B, MessageMediaWebPage_], - [0x2EC0533F, MessageMediaVenue_], - [0xFDB19008, MessageMediaGame_], - [0xF6A548D3, MessageMediaInvoice_], - [0xB940C666, MessageMediaGeoLive_], - [0x4BD6E798, MessageMediaPoll_], - [0x3F7EE58B, MessageMediaDice_], - [0x68CB6283, MessageMediaStory_], - [0xDAAD85B0, MessageMediaGiveaway_], - [0xC6991068, MessageMediaGiveawayResults_], - [0xB6AEF7B0, MessageActionEmpty_], - [0xBD47CBAD, MessageActionChatCreate_], - [0xB5A1CE5A, MessageActionChatEditTitle_], - [0x7FCB13A8, MessageActionChatEditPhoto_], - [0x95E3FBEF, MessageActionChatDeletePhoto_], - [0x15CEFD00, MessageActionChatAddUser_], - [0xA43F30CC, MessageActionChatDeleteUser_], - [0x031224C3, MessageActionChatJoinedByLink_], - [0x95D2AC92, MessageActionChannelCreate_], - [0xE1037F92, MessageActionChatMigrateTo_], - [0xEA3948E9, MessageActionChannelMigrateFrom_], - [0x94BD38ED, MessageActionPinMessage_], - [0x9FBAB604, MessageActionHistoryClear_], - [0x92A72876, MessageActionGameScore_], - [0x8F31B327, MessageActionPaymentSentMe_], - [0x96163F56, MessageActionPaymentSent_], - [0x80E11A7F, MessageActionPhoneCall_], - [0x4792929B, MessageActionScreenshotTaken_], - [0xFAE69F56, MessageActionCustomAction_], - [0xC516D679, MessageActionBotAllowed_], - [0x1B287353, MessageActionSecureValuesSentMe_], - [0xD95C6154, MessageActionSecureValuesSent_], - [0xF3F25F76, MessageActionContactSignUp_], - [0x98E0D697, MessageActionGeoProximityReached_], - [0x7A0D7F42, MessageActionGroupCall_], - [0x502F92F7, MessageActionInviteToGroupCall_], - [0x3C134D7B, MessageActionSetMessagesTTL_], - [0xB3A07661, MessageActionGroupCallScheduled_], - [0xAA786345, MessageActionSetChatTheme_], - [0xEBBCA3CB, MessageActionChatJoinedByRequest_], - [0x47DD8079, MessageActionWebViewDataSentMe_], - [0xB4C38CB5, MessageActionWebViewDataSent_], - [0xC83D6AEC, MessageActionGiftPremium_], - [0x0D999256, MessageActionTopicCreate_], - [0xC0944820, MessageActionTopicEdit_], - [0x57DE635E, MessageActionSuggestProfilePhoto_], - [0x31518E9B, MessageActionRequestedPeer_], - [0x5060A3F4, MessageActionSetChatWallPaper_], - [0x678C2E09, MessageActionGiftCode_], - [0x332BA9ED, MessageActionGiveawayLaunch_], - [0x2A9FADC5, MessageActionGiveawayResults_], - [0xCC02AA6D, MessageActionBoostApply_], - [0x93B31848, MessageActionRequestedPeerSentMe_], - [0xD58A08C6, Dialog_], - [0x71BD134C, DialogFolder_], - [0x2331B22D, PhotoEmpty_], - [0xFB197A65, Photo_], - [0x0E17E23C, PhotoSizeEmpty_], - [0x75C78E60, PhotoSize_], - [0x021E1AD6, PhotoCachedSize_], - [0xE0B0BC2E, PhotoStrippedSize_], - [0xFA3EFB95, PhotoSizeProgressive_], - [0xD8214D41, PhotoPathSize_], - [0x1117DD5F, GeoPointEmpty_], - [0xB2A2F663, GeoPoint_], - [0x5E002502, auth_SentCode_], - [0x2390FE44, auth_SentCodeSuccess_], - [0x2EA2C0D4, auth_Authorization_], - [0x44747E9A, auth_AuthorizationSignUpRequired_], - [0xB434E2B8, auth_ExportedAuthorization_], - [0xB8BC5B0C, InputNotifyPeer_], - [0x193B4417, InputNotifyUsers_], - [0x4A95E84E, InputNotifyChats_], - [0xB1DB7C7E, InputNotifyBroadcasts_], - [0x5C467992, InputNotifyForumTopic_], - [0xCACB6AE2, InputPeerNotifySettings_], - [0x99622C0C, PeerNotifySettings_], - [0xACD66C5E, PeerSettings_], - [0xA437C3ED, WallPaper_], - [0xE0804116, WallPaperNoFile_], - [0x58DBCAB8, InputReportReasonSpam_], - [0x1E22C78D, InputReportReasonViolence_], - [0x2E59D922, InputReportReasonPornography_], - [0xADF44EE3, InputReportReasonChildAbuse_], - [0xC1E4A2B1, InputReportReasonOther_], - [0x9B89F93A, InputReportReasonCopyright_], - [0xDBD4FEED, InputReportReasonGeoIrrelevant_], - [0xF5DDD6E7, InputReportReasonFake_], - [0x0A8EB2BE, InputReportReasonIllegalDrugs_], - [0x9EC7863D, InputReportReasonPersonalDetails_], - [0xCC997720, UserFull_], - [0x145ADE0B, Contact_], - [0xC13E3C50, ImportedContact_], - [0x16D9703B, ContactStatus_], - [0xB74BA9D2, contacts_ContactsNotModified_], - [0xEAE87E42, contacts_Contacts_], - [0x77D01C3B, contacts_ImportedContacts_], - [0x0ADE1591, contacts_Blocked_], - [0xE1664194, contacts_BlockedSlice_], - [0x15BA6C40, messages_Dialogs_], - [0x71E094F3, messages_DialogsSlice_], - [0xF0E3E596, messages_DialogsNotModified_], - [0x8C718E87, messages_Messages_], - [0x3A54685E, messages_MessagesSlice_], - [0xC776BA4E, messages_ChannelMessages_], - [0x74535F21, messages_MessagesNotModified_], - [0x64FF9FD5, messages_Chats_], - [0x9CD81144, messages_ChatsSlice_], - [0xE5D7D19C, messages_ChatFull_], - [0xB45C69D1, messages_AffectedHistory_], - [0x57E2F66C, InputMessagesFilterEmpty_], - [0x9609A51C, InputMessagesFilterPhotos_], - [0x9FC00E65, InputMessagesFilterVideo_], - [0x56E9F0E4, InputMessagesFilterPhotoVideo_], - [0x9EDDF188, InputMessagesFilterDocument_], - [0x7EF0DD87, InputMessagesFilterUrl_], - [0xFFC86587, InputMessagesFilterGif_], - [0x50F5C392, InputMessagesFilterVoice_], - [0x3751B49E, InputMessagesFilterMusic_], - [0x3A20ECB8, InputMessagesFilterChatPhotos_], - [0x80C99768, InputMessagesFilterPhoneCalls_], - [0x7A7C17A4, InputMessagesFilterRoundVoice_], - [0xB549DA53, InputMessagesFilterRoundVideo_], - [0xC1F8E69A, InputMessagesFilterMyMentions_], - [0xE7026D0D, InputMessagesFilterGeo_], - [0xE062DB83, InputMessagesFilterContacts_], - [0x1BB00451, InputMessagesFilterPinned_], - [0x1F2B0AFD, UpdateNewMessage_], - [0x4E90BFD6, UpdateMessageID_], - [0xA20DB0E5, UpdateDeleteMessages_], - [0xC01E857F, UpdateUserTyping_], - [0x83487AF0, UpdateChatUserTyping_], - [0x07761198, UpdateChatParticipants_], - [0xE5BDF8DE, UpdateUserStatus_], - [0xA7848924, UpdateUserName_], - [0x8951ABEF, UpdateNewAuthorization_], - [0x12BCBD9A, UpdateNewEncryptedMessage_], - [0x1710F156, UpdateEncryptedChatTyping_], - [0xB4A2E88D, UpdateEncryption_], - [0x38FE25B7, UpdateEncryptedMessagesRead_], - [0x3DDA5451, UpdateChatParticipantAdd_], - [0xE32F3D77, UpdateChatParticipantDelete_], - [0x8E5E9873, UpdateDcOptions_], - [0xBEC268EF, UpdateNotifySettings_], - [0xEBE46819, UpdateServiceNotification_], - [0xEE3B272A, UpdatePrivacy_], - [0x05492A13, UpdateUserPhone_], - [0x9C974FDF, UpdateReadHistoryInbox_], - [0x2F2F21BF, UpdateReadHistoryOutbox_], - [0x7F891213, UpdateWebPage_], - [0xF8227181, UpdateReadMessagesContents_], - [0x108D941F, UpdateChannelTooLong_], - [0x635B4C09, UpdateChannel_], - [0x62BA04D9, UpdateNewChannelMessage_], - [0x922E6E10, UpdateReadChannelInbox_], - [0xC32D5B12, UpdateDeleteChannelMessages_], - [0xF226AC08, UpdateChannelMessageViews_], - [0xD7CA61A2, UpdateChatParticipantAdmin_], - [0x688A30AA, UpdateNewStickerSet_], - [0x0BB2D201, UpdateStickerSetsOrder_], - [0x31C24808, UpdateStickerSets_], - [0x9375341E, UpdateSavedGifs_], - [0x496F379C, UpdateBotInlineQuery_], - [0x12F12A07, UpdateBotInlineSend_], - [0x1B3F4DF7, UpdateEditChannelMessage_], - [0xB9CFC48D, UpdateBotCallbackQuery_], - [0xE40370A3, UpdateEditMessage_], - [0x691E9052, UpdateInlineBotCallbackQuery_], - [0xB75F99A9, UpdateReadChannelOutbox_], - [0x1B49EC6D, UpdateDraftMessage_], - [0x571D2742, UpdateReadFeaturedStickers_], - [0x9A422C20, UpdateRecentStickers_], - [0xA229DD06, UpdateConfig_], - [0x3354678F, UpdatePtsChanged_], - [0x2F2BA99F, UpdateChannelWebPage_], - [0x6E6FE51C, UpdateDialogPinned_], - [0xFA0F3CA2, UpdatePinnedDialogs_], - [0x8317C0C3, UpdateBotWebhookJSON_], - [0x9B9240A6, UpdateBotWebhookJSONQuery_], - [0xB5AEFD7D, UpdateBotShippingQuery_], - [0x8CAA9A96, UpdateBotPrecheckoutQuery_], - [0xAB0F6B1E, UpdatePhoneCall_], - [0x46560264, UpdateLangPackTooLong_], - [0x56022F4D, UpdateLangPack_], - [0xE511996D, UpdateFavedStickers_], - [0xEA29055D, UpdateChannelReadMessagesContents_], - [0x7084A7BE, UpdateContactsReset_], - [0xB23FC698, UpdateChannelAvailableMessages_], - [0xE16459C3, UpdateDialogUnreadMark_], - [0xACA1657B, UpdateMessagePoll_], - [0x54C01850, UpdateChatDefaultBannedRights_], - [0x19360DC0, UpdateFolderPeers_], - [0x6A7E7366, UpdatePeerSettings_], - [0xB4AFCFB0, UpdatePeerLocated_], - [0x39A51DFB, UpdateNewScheduledMessage_], - [0x90866CEE, UpdateDeleteScheduledMessages_], - [0x8216FBA3, UpdateTheme_], - [0x871FB939, UpdateGeoLiveViewed_], - [0x564FE691, UpdateLoginToken_], - [0x24F40E77, UpdateMessagePollVote_], - [0x26FFDE7D, UpdateDialogFilter_], - [0xA5D72105, UpdateDialogFilterOrder_], - [0x3504914F, UpdateDialogFilters_], - [0x2661BF09, UpdatePhoneCallSignalingData_], - [0xD29A27F4, UpdateChannelMessageForwards_], - [0xD6B19546, UpdateReadChannelDiscussionInbox_], - [0x695C9E7C, UpdateReadChannelDiscussionOutbox_], - [0xEBE07752, UpdatePeerBlocked_], - [0x8C88C923, UpdateChannelUserTyping_], - [0xED85EAB5, UpdatePinnedMessages_], - [0x5BB98608, UpdatePinnedChannelMessages_], - [0xF89A6A4E, UpdateChat_], - [0xF2EBDB4E, UpdateGroupCallParticipants_], - [0x14B24500, UpdateGroupCall_], - [0xBB9BB9A5, UpdatePeerHistoryTTL_], - [0xD087663A, UpdateChatParticipant_], - [0x985D3ABB, UpdateChannelParticipant_], - [0xC4870A49, UpdateBotStopped_], - [0x0B783982, UpdateGroupCallConnection_], - [0x4D712F2E, UpdateBotCommands_], - [0x7063C3DB, UpdatePendingJoinRequests_], - [0x11DFA986, UpdateBotChatInviteRequester_], - [0x5E1B3CB8, UpdateMessageReactions_], - [0x17B7A20B, UpdateAttachMenuBots_], - [0x1592B79D, UpdateWebViewResultSent_], - [0x14B85813, UpdateBotMenuButton_], - [0x74D8BE99, UpdateSavedRingtones_], - [0x0084CD5A, UpdateTranscribedAudio_], - [0xFB4C496C, UpdateReadFeaturedEmojiStickers_], - [0x28373599, UpdateUserEmojiStatus_], - [0x30F443DB, UpdateRecentEmojiStatuses_], - [0x6F7863F4, UpdateRecentReactions_], - [0x86FCCF85, UpdateMoveStickerSetToTop_], - [0x5A73A98C, UpdateMessageExtendedMedia_], - [0x192EFBE3, UpdateChannelPinnedTopic_], - [0xFE198602, UpdateChannelPinnedTopics_], - [0x20529438, UpdateUser_], - [0xEC05B097, UpdateAutoSaveSettings_], - [0x75B3B798, UpdateStory_], - [0xF74E932B, UpdateReadStories_], - [0x1BF335B9, UpdateStoryID_], - [0x2C084DC1, UpdateStoriesStealthMode_], - [0x7D627683, UpdateSentStoryReaction_], - [0x904DD49C, UpdateBotChatBoost_], - [0x07B68920, UpdateChannelViewForumAsMessages_], - [0xAE3F101D, UpdatePeerWallpaper_], - [0xAC21D3CE, UpdateBotMessageReaction_], - [0x09CB7759, UpdateBotMessageReactions_], - [0xAEAF9E74, UpdateSavedDialogPinned_], - [0x686C85A6, UpdatePinnedSavedDialogs_], - [0x39C67432, UpdateSavedReactionTags_], - [0xF16269D4, UpdateSmsJob_], - [0xF9470AB2, UpdateQuickReplies_], - [0xF53DA717, UpdateNewQuickReply_], - [0x53E6F1EC, UpdateDeleteQuickReply_], - [0x3E050D0F, UpdateQuickReplyMessage_], - [0x566FE7CD, UpdateDeleteQuickReplyMessages_], - [0x8AE5C97A, UpdateBotBusinessConnect_], - [0x9DDB347C, UpdateBotNewBusinessMessage_], - [0x07DF587C, UpdateBotEditBusinessMessage_], - [0xA02A982E, UpdateBotDeleteBusinessMessage_], - [0xA56C2A3E, updates_State_], - [0x5D75A138, updates_DifferenceEmpty_], - [0x00F49CA0, updates_Difference_], - [0xA8FB1981, updates_DifferenceSlice_], - [0x4AFE8F6D, updates_DifferenceTooLong_], - [0xE317AF7E, UpdatesTooLong_], - [0x313BC7F8, UpdateShortMessage_], - [0x4D6DEEA5, UpdateShortChatMessage_], - [0x78D4DEC1, UpdateShort_], - [0x725B04C3, UpdatesCombined_], - [0x74AE4240, Updates_], - [0x9015E101, UpdateShortSentMessage_], - [0x8DCA6AA5, photos_Photos_], - [0x15051F54, photos_PhotosSlice_], - [0x20212CA8, photos_Photo_], - [0x096A18D5, upload_File_], - [0xF18CDA44, upload_FileCdnRedirect_], - [0x18B7A10D, DcOption_], - [0xCC1A241E, Config_], - [0x8E1A1775, NearestDc_], - [0xCCBBCE30, help_AppUpdate_], - [0xC45A6536, help_NoAppUpdate_], - [0x18CB9F78, help_InviteText_], - [0xAB7EC0A0, EncryptedChatEmpty_], - [0x66B25953, EncryptedChatWaiting_], - [0x48F1D94C, EncryptedChatRequested_], - [0x61F0D4C7, EncryptedChat_], - [0x1E1C7C45, EncryptedChatDiscarded_], - [0xF141B5E1, InputEncryptedChat_], - [0xC21F497E, EncryptedFileEmpty_], - [0xA8008CD8, EncryptedFile_], - [0x1837C364, InputEncryptedFileEmpty_], - [0x64BD0306, InputEncryptedFileUploaded_], - [0x5A17B5E5, InputEncryptedFile_], - [0x2DC173C8, InputEncryptedFileBigUploaded_], - [0xED18C118, EncryptedMessage_], - [0x23734B06, EncryptedMessageService_], - [0xC0E24635, messages_DhConfigNotModified_], - [0x2C221EDD, messages_DhConfig_], - [0x560F8935, messages_SentEncryptedMessage_], - [0x9493FF32, messages_SentEncryptedFile_], - [0x72F0EAAE, InputDocumentEmpty_], - [0x1ABFB575, InputDocument_], - [0x36F8C871, DocumentEmpty_], - [0x8FD4C4D8, Document_], - [0x17C6B5F6, help_Support_], - [0x9FD40BD8, NotifyPeer_], - [0xB4C83B4C, NotifyUsers_], - [0xC007CEC3, NotifyChats_], - [0xD612E8EF, NotifyBroadcasts_], - [0x226E6308, NotifyForumTopic_], - [0x16BF744E, SendMessageTypingAction_], - [0xFD5EC8F5, SendMessageCancelAction_], - [0xA187D66F, SendMessageRecordVideoAction_], - [0xE9763AEC, SendMessageUploadVideoAction_], - [0xD52F73F7, SendMessageRecordAudioAction_], - [0xF351D7AB, SendMessageUploadAudioAction_], - [0xD1D34A26, SendMessageUploadPhotoAction_], - [0xAA0CD9E4, SendMessageUploadDocumentAction_], - [0x176F8BA1, SendMessageGeoLocationAction_], - [0x628CBC6F, SendMessageChooseContactAction_], - [0xDD6A8F48, SendMessageGamePlayAction_], - [0x88F27FBC, SendMessageRecordRoundAction_], - [0x243E1C66, SendMessageUploadRoundAction_], - [0xD92C2285, SpeakingInGroupCallAction_], - [0xDBDA9246, SendMessageHistoryImportAction_], - [0xB05AC6B1, SendMessageChooseStickerAction_], - [0x25972BCB, SendMessageEmojiInteraction_], - [0xB665902E, SendMessageEmojiInteractionSeen_], - [0xB3134D9D, contacts_Found_], - [0x4F96CB18, InputPrivacyKeyStatusTimestamp_], - [0xBDFB0426, InputPrivacyKeyChatInvite_], - [0xFABADC5F, InputPrivacyKeyPhoneCall_], - [0xDB9E70D2, InputPrivacyKeyPhoneP2P_], - [0xA4DD4C08, InputPrivacyKeyForwards_], - [0x5719BACC, InputPrivacyKeyProfilePhoto_], - [0x0352DAFA, InputPrivacyKeyPhoneNumber_], - [0xD1219BDD, InputPrivacyKeyAddedByPhone_], - [0xAEE69D68, InputPrivacyKeyVoiceMessages_], - [0x3823CC40, InputPrivacyKeyAbout_], - [0xD65A11CC, InputPrivacyKeyBirthday_], - [0xBC2EAB30, PrivacyKeyStatusTimestamp_], - [0x500E6DFA, PrivacyKeyChatInvite_], - [0x3D662B7B, PrivacyKeyPhoneCall_], - [0x39491CC8, PrivacyKeyPhoneP2P_], - [0x69EC56A3, PrivacyKeyForwards_], - [0x96151FED, PrivacyKeyProfilePhoto_], - [0xD19AE46D, PrivacyKeyPhoneNumber_], - [0x42FFD42B, PrivacyKeyAddedByPhone_], - [0x0697F414, PrivacyKeyVoiceMessages_], - [0xA486B761, PrivacyKeyAbout_], - [0x2000A518, PrivacyKeyBirthday_], - [0x0D09E07B, InputPrivacyValueAllowContacts_], - [0x184B35CE, InputPrivacyValueAllowAll_], - [0x131CC67F, InputPrivacyValueAllowUsers_], - [0x0BA52007, InputPrivacyValueDisallowContacts_], - [0xD66B66C9, InputPrivacyValueDisallowAll_], - [0x90110467, InputPrivacyValueDisallowUsers_], - [0x840649CF, InputPrivacyValueAllowChatParticipants_], - [0xE94F0F86, InputPrivacyValueDisallowChatParticipants_], - [0x2F453E49, InputPrivacyValueAllowCloseFriends_], - [0x77CDC9F1, InputPrivacyValueAllowPremium_], - [0xFFFE1BAC, PrivacyValueAllowContacts_], - [0x65427B82, PrivacyValueAllowAll_], - [0xB8905FB2, PrivacyValueAllowUsers_], - [0xF888FA1A, PrivacyValueDisallowContacts_], - [0x8B73E763, PrivacyValueDisallowAll_], - [0xE4621141, PrivacyValueDisallowUsers_], - [0x6B134E8E, PrivacyValueAllowChatParticipants_], - [0x41C87565, PrivacyValueDisallowChatParticipants_], - [0xF7E8D89B, PrivacyValueAllowCloseFriends_], - [0xECE9814B, PrivacyValueAllowPremium_], - [0x50A04E45, account_PrivacyRules_], - [0xB8D0AFDF, AccountDaysTTL_], - [0x6C37C15C, DocumentAttributeImageSize_], - [0x11B58939, DocumentAttributeAnimated_], - [0x6319D612, DocumentAttributeSticker_], - [0xD38FF1C2, DocumentAttributeVideo_], - [0x9852F9C6, DocumentAttributeAudio_], - [0x15590068, DocumentAttributeFilename_], - [0x9801D2F7, DocumentAttributeHasStickers_], - [0xFD149899, DocumentAttributeCustomEmoji_], - [0xF1749A22, messages_StickersNotModified_], - [0x30A6EC7E, messages_Stickers_], - [0x12B299D4, StickerPack_], - [0xE86602C3, messages_AllStickersNotModified_], - [0xCDBBCEBB, messages_AllStickers_], - [0x84D19185, messages_AffectedMessages_], - [0x211A1788, WebPageEmpty_], - [0xB0D13E47, WebPagePending_], - [0xE89C45B2, WebPage_], - [0x7311CA11, WebPageNotModified_], - [0xAD01D61D, Authorization_], - [0x4BFF8EA0, account_Authorizations_], - [0x957B50FB, account_Password_], - [0x9A5C33E5, account_PasswordSettings_], - [0xC23727C9, account_PasswordInputSettings_], - [0x137948A5, auth_PasswordRecovery_], - [0xA384B779, ReceivedNotifyMessage_], - [0x0AB4A819, ChatInviteExported_], - [0xED107AB7, ChatInvitePublicJoinRequests_], - [0x5A686D7C, ChatInviteAlready_], - [0xCDE0EC40, ChatInvite_], - [0x61695CB0, ChatInvitePeek_], - [0xFFB62B95, InputStickerSetEmpty_], - [0x9DE7A269, InputStickerSetID_], - [0x861CC8A0, InputStickerSetShortName_], - [0x028703C8, InputStickerSetAnimatedEmoji_], - [0xE67F520E, InputStickerSetDice_], - [0x0CDE3739, InputStickerSetAnimatedEmojiAnimations_], - [0xC88B3B02, InputStickerSetPremiumGifts_], - [0x04C4D4CE, InputStickerSetEmojiGenericAnimations_], - [0x29D0F5EE, InputStickerSetEmojiDefaultStatuses_], - [0x44C1F8E9, InputStickerSetEmojiDefaultTopicIcons_], - [0x49748553, InputStickerSetEmojiChannelDefaultStatuses_], - [0x2DD14EDC, StickerSet_], - [0x6E153F16, messages_StickerSet_], - [0xD3F924EB, messages_StickerSetNotModified_], - [0xC27AC8C7, BotCommand_], - [0x8F300B57, BotInfo_], - [0xA2FA4880, KeyboardButton_], - [0x258AFF05, KeyboardButtonUrl_], - [0x35BBDB6B, KeyboardButtonCallback_], - [0xB16A6C29, KeyboardButtonRequestPhone_], - [0xFC796B3F, KeyboardButtonRequestGeoLocation_], - [0x93B9FBB5, KeyboardButtonSwitchInline_], - [0x50F41CCF, KeyboardButtonGame_], - [0xAFD93FBB, KeyboardButtonBuy_], - [0x10B78D29, KeyboardButtonUrlAuth_], - [0xD02E7FD4, InputKeyboardButtonUrlAuth_], - [0xBBC7515D, KeyboardButtonRequestPoll_], - [0xE988037B, InputKeyboardButtonUserProfile_], - [0x308660C1, KeyboardButtonUserProfile_], - [0x13767230, KeyboardButtonWebView_], - [0xA0C0505C, KeyboardButtonSimpleWebView_], - [0x53D7BFD8, KeyboardButtonRequestPeer_], - [0xC9662D05, InputKeyboardButtonRequestPeer_], - [0x77608B83, KeyboardButtonRow_], - [0xA03E5B85, ReplyKeyboardHide_], - [0x86B40B08, ReplyKeyboardForceReply_], - [0x85DD99D1, ReplyKeyboardMarkup_], - [0x48A30254, ReplyInlineMarkup_], - [0xBB92BA95, MessageEntityUnknown_], - [0xFA04579D, MessageEntityMention_], - [0x6F635B0D, MessageEntityHashtag_], - [0x6CEF8AC7, MessageEntityBotCommand_], - [0x6ED02538, MessageEntityUrl_], - [0x64E475C2, MessageEntityEmail_], - [0xBD610BC9, MessageEntityBold_], - [0x826F8B60, MessageEntityItalic_], - [0x28A20571, MessageEntityCode_], - [0x73924BE0, MessageEntityPre_], - [0x76A6D327, MessageEntityTextUrl_], - [0xDC7B1140, MessageEntityMentionName_], - [0x208E68C9, InputMessageEntityMentionName_], - [0x9B69E34B, MessageEntityPhone_], - [0x4C4E743F, MessageEntityCashtag_], - [0x9C4E7E8B, MessageEntityUnderline_], - [0xBF0693D4, MessageEntityStrike_], - [0x761E6AF4, MessageEntityBankCard_], - [0x32CA960F, MessageEntitySpoiler_], - [0xC8CF05F8, MessageEntityCustomEmoji_], - [0x020DF5D0, MessageEntityBlockquote_], - [0xEE8C1E86, InputChannelEmpty_], - [0xF35AEC28, InputChannel_], - [0x5B934F9D, InputChannelFromMessage_], - [0x7F077AD9, contacts_ResolvedPeer_], - [0x0AE30253, MessageRange_], - [0x3E11AFFB, updates_ChannelDifferenceEmpty_], - [0xA4BCC6FE, updates_ChannelDifferenceTooLong_], - [0x2064674E, updates_ChannelDifference_], - [0x94D42EE7, ChannelMessagesFilterEmpty_], - [0xCD77D957, ChannelMessagesFilter_], - [0xC00C07C0, ChannelParticipant_], - [0x35A8BFA7, ChannelParticipantSelf_], - [0x2FE601D3, ChannelParticipantCreator_], - [0x34C3BB53, ChannelParticipantAdmin_], - [0x6DF8014E, ChannelParticipantBanned_], - [0x1B03F006, ChannelParticipantLeft_], - [0xDE3F3C79, ChannelParticipantsRecent_], - [0xB4608969, ChannelParticipantsAdmins_], - [0xA3B54985, ChannelParticipantsKicked_], - [0xB0D1865B, ChannelParticipantsBots_], - [0x1427A5E1, ChannelParticipantsBanned_], - [0x0656AC4B, ChannelParticipantsSearch_], - [0xBB6AE88D, ChannelParticipantsContacts_], - [0xE04B5CEB, ChannelParticipantsMentions_], - [0x9AB0FEAF, channels_ChannelParticipants_], - [0xF0173FE9, channels_ChannelParticipantsNotModified_], - [0xDFB80317, channels_ChannelParticipant_], - [0x780A0310, help_TermsOfService_], - [0xE8025CA2, messages_SavedGifsNotModified_], - [0x84A02A0D, messages_SavedGifs_], - [0x3380C786, InputBotInlineMessageMediaAuto_], - [0x3DCD7A87, InputBotInlineMessageText_], - [0x96929A85, InputBotInlineMessageMediaGeo_], - [0x417BBF11, InputBotInlineMessageMediaVenue_], - [0xA6EDBFFD, InputBotInlineMessageMediaContact_], - [0x4B425864, InputBotInlineMessageGame_], - [0xD7E78225, InputBotInlineMessageMediaInvoice_], - [0xBDDCC510, InputBotInlineMessageMediaWebPage_], - [0x88BF9319, InputBotInlineResult_], - [0xA8D864A7, InputBotInlineResultPhoto_], - [0xFFF8FDC4, InputBotInlineResultDocument_], - [0x4FA417F2, InputBotInlineResultGame_], - [0x764CF810, BotInlineMessageMediaAuto_], - [0x8C7F65E2, BotInlineMessageText_], - [0x051846FD, BotInlineMessageMediaGeo_], - [0x8A86659C, BotInlineMessageMediaVenue_], - [0x18D1CDC2, BotInlineMessageMediaContact_], - [0x354A9B09, BotInlineMessageMediaInvoice_], - [0x809AD9A6, BotInlineMessageMediaWebPage_], - [0x11965F3A, BotInlineResult_], - [0x17DB940B, BotInlineMediaResult_], - [0xE021F2F6, messages_BotResults_], - [0x5DAB1AF4, ExportedMessageLink_], - [0x4E4DF4BB, MessageFwdHeader_], - [0x72A3158C, auth_CodeTypeSms_], - [0x741CD3E3, auth_CodeTypeCall_], - [0x226CCEFB, auth_CodeTypeFlashCall_], - [0xD61AD6EE, auth_CodeTypeMissedCall_], - [0x06ED998C, auth_CodeTypeFragmentSms_], - [0x3DBB5986, auth_SentCodeTypeApp_], - [0xC000BBA2, auth_SentCodeTypeSms_], - [0x5353E5A7, auth_SentCodeTypeCall_], - [0xAB03C6D9, auth_SentCodeTypeFlashCall_], - [0x82006484, auth_SentCodeTypeMissedCall_], - [0xF450F59B, auth_SentCodeTypeEmailCode_], - [0xA5491DEA, auth_SentCodeTypeSetUpEmailRequired_], - [0xD9565C39, auth_SentCodeTypeFragmentSms_], - [0xE57B1432, auth_SentCodeTypeFirebaseSms_], - [0x36585EA4, messages_BotCallbackAnswer_], - [0x26B5DDE6, messages_MessageEditData_], - [0x890C3D89, InputBotInlineMessageID_], - [0xB6D915D7, InputBotInlineMessageID64_], - [0x3C20629F, InlineBotSwitchPM_], - [0x3371C354, messages_PeerDialogs_], - [0xEDCDC05B, TopPeer_], - [0xAB661B5B, TopPeerCategoryBotsPM_], - [0x148677E2, TopPeerCategoryBotsInline_], - [0x0637B7ED, TopPeerCategoryCorrespondents_], - [0xBD17A14A, TopPeerCategoryGroups_], - [0x161D9628, TopPeerCategoryChannels_], - [0x1E76A78C, TopPeerCategoryPhoneCalls_], - [0xA8406CA9, TopPeerCategoryForwardUsers_], - [0xFBEEC0F0, TopPeerCategoryForwardChats_], - [0xFB834291, TopPeerCategoryPeers_], - [0xDE266EF5, contacts_TopPeersNotModified_], - [0x70B772A8, contacts_TopPeers_], - [0xB52C939D, contacts_TopPeersDisabled_], - [0x1B0C841A, DraftMessageEmpty_], - [0x3FCCF7EF, DraftMessage_], - [0xC6DC0C66, messages_FeaturedStickersNotModified_], - [0xBE382906, messages_FeaturedStickers_], - [0x0B17F890, messages_RecentStickersNotModified_], - [0x88D37C56, messages_RecentStickers_], - [0x4FCBA9C8, messages_ArchivedStickers_], - [0x38641628, messages_StickerSetInstallResultSuccess_], - [0x35E410A8, messages_StickerSetInstallResultArchive_], - [0x6410A5D2, StickerSetCovered_], - [0x3407E51B, StickerSetMultiCovered_], - [0x40D13C0E, StickerSetFullCovered_], - [0x77B15D1C, StickerSetNoCovered_], - [0xAED6DBB2, MaskCoords_], - [0x4A992157, InputStickeredMediaPhoto_], - [0x0438865B, InputStickeredMediaDocument_], - [0xBDF9653B, Game_], - [0x032C3E77, InputGameID_], - [0xC331E80A, InputGameShortName_], - [0x73A379EB, HighScore_], - [0x9A3BFD99, messages_HighScores_], - [0xDC3D824F, TextEmpty_], - [0x744694E0, TextPlain_], - [0x6724ABC4, TextBold_], - [0xD912A59C, TextItalic_], - [0xC12622C4, TextUnderline_], - [0x9BF8BB95, TextStrike_], - [0x6C3F19B9, TextFixed_], - [0x3C2884C1, TextUrl_], - [0xDE5A0DD6, TextEmail_], - [0x7E6260D7, TextConcat_], - [0xED6A8504, TextSubscript_], - [0xC7FB5E01, TextSuperscript_], - [0x034B8621, TextMarked_], - [0x1CCB966A, TextPhone_], - [0x081CCF4F, TextImage_], - [0x35553762, TextAnchor_], - [0x13567E8A, PageBlockUnsupported_], - [0x70ABC3FD, PageBlockTitle_], - [0x8FFA9A1F, PageBlockSubtitle_], - [0xBAAFE5E0, PageBlockAuthorDate_], - [0xBFD064EC, PageBlockHeader_], - [0xF12BB6E1, PageBlockSubheader_], - [0x467A0766, PageBlockParagraph_], - [0xC070D93E, PageBlockPreformatted_], - [0x48870999, PageBlockFooter_], - [0xDB20B188, PageBlockDivider_], - [0xCE0D37B0, PageBlockAnchor_], - [0xE4E88011, PageBlockList_], - [0x263D7C26, PageBlockBlockquote_], - [0x4F4456D3, PageBlockPullquote_], - [0x1759C560, PageBlockPhoto_], - [0x7C8FE7B6, PageBlockVideo_], - [0x39F23300, PageBlockCover_], - [0xA8718DC5, PageBlockEmbed_], - [0xF259A80B, PageBlockEmbedPost_], - [0x65A0FA4D, PageBlockCollage_], - [0x031F9590, PageBlockSlideshow_], - [0xEF1751B5, PageBlockChannel_], - [0x804361EA, PageBlockAudio_], - [0x1E148390, PageBlockKicker_], - [0xBF4DEA82, PageBlockTable_], - [0x9A8AE1E1, PageBlockOrderedList_], - [0x76768BED, PageBlockDetails_], - [0x16115A96, PageBlockRelatedArticles_], - [0xA44F3EF6, PageBlockMap_], - [0x85E42301, PhoneCallDiscardReasonMissed_], - [0xE095C1A0, PhoneCallDiscardReasonDisconnect_], - [0x57ADC690, PhoneCallDiscardReasonHangup_], - [0xFAF7E8C9, PhoneCallDiscardReasonBusy_], - [0x7D748D04, DataJSON_], - [0xCB296BF8, LabeledPrice_], - [0x5DB95A15, Invoice_], - [0xEA02C27E, PaymentCharge_], - [0x1E8CAAEB, PostAddress_], - [0x909C3F94, PaymentRequestedInfo_], - [0xCDC27A1F, PaymentSavedCredentialsCard_], - [0x1C570ED1, WebDocument_], - [0xF9C8BCC6, WebDocumentNoProxy_], - [0x9BED434D, InputWebDocument_], - [0xC239D686, InputWebFileLocation_], - [0x9F2221C9, InputWebFileGeoPointLocation_], - [0xF46FE924, InputWebFileAudioAlbumThumbLocation_], - [0x21E753BC, upload_WebFile_], - [0xA0058751, payments_PaymentForm_], - [0xD1451883, payments_ValidatedRequestedInfo_], - [0x4E5F810D, payments_PaymentResult_], - [0xD8411139, payments_PaymentVerificationNeeded_], - [0x70C4FE03, payments_PaymentReceipt_], - [0xFB8FE43C, payments_SavedInfo_], - [0xC10EB2CF, InputPaymentCredentialsSaved_], - [0x3417D728, InputPaymentCredentials_], - [0x0AA1C39F, InputPaymentCredentialsApplePay_], - [0x8AC32801, InputPaymentCredentialsGooglePay_], - [0xDB64FD34, account_TmpPassword_], - [0xB6213CDF, ShippingOption_], - [0x32DA9E9C, InputStickerSetItem_], - [0x1E36FDED, InputPhoneCall_], - [0x5366C915, PhoneCallEmpty_], - [0xC5226F17, PhoneCallWaiting_], - [0x14B0ED0C, PhoneCallRequested_], - [0x3660C311, PhoneCallAccepted_], - [0x30535AF5, PhoneCall_], - [0x50CA4DE1, PhoneCallDiscarded_], - [0x9CC123C7, PhoneConnection_], - [0x635FE375, PhoneConnectionWebrtc_], - [0xFC878FC8, PhoneCallProtocol_], - [0xEC82E140, phone_PhoneCall_], - [0xEEA8E46E, upload_CdnFileReuploadNeeded_], - [0xA99FCA4F, upload_CdnFile_], - [0xC982EABA, CdnPublicKey_], - [0x5725E40A, CdnConfig_], - [0xCAD181F6, LangPackString_], - [0x6C47AC9F, LangPackStringPluralized_], - [0x2979EEB2, LangPackStringDeleted_], - [0xF385C1F6, LangPackDifference_], - [0xEECA5CE3, LangPackLanguage_], - [0xE6DFB825, ChannelAdminLogEventActionChangeTitle_], - [0x55188A2E, ChannelAdminLogEventActionChangeAbout_], - [0x6A4AFC38, ChannelAdminLogEventActionChangeUsername_], - [0x434BD2AF, ChannelAdminLogEventActionChangePhoto_], - [0x1B7907AE, ChannelAdminLogEventActionToggleInvites_], - [0x26AE0971, ChannelAdminLogEventActionToggleSignatures_], - [0xE9E82C18, ChannelAdminLogEventActionUpdatePinned_], - [0x709B2405, ChannelAdminLogEventActionEditMessage_], - [0x42E047BB, ChannelAdminLogEventActionDeleteMessage_], - [0x183040D3, ChannelAdminLogEventActionParticipantJoin_], - [0xF89777F2, ChannelAdminLogEventActionParticipantLeave_], - [0xE31C34D8, ChannelAdminLogEventActionParticipantInvite_], - [0xE6D83D7E, ChannelAdminLogEventActionParticipantToggleBan_], - [0xD5676710, ChannelAdminLogEventActionParticipantToggleAdmin_], - [0xB1C3CAA7, ChannelAdminLogEventActionChangeStickerSet_], - [0x5F5C95F1, ChannelAdminLogEventActionTogglePreHistoryHidden_], - [0x2DF5FC0A, ChannelAdminLogEventActionDefaultBannedRights_], - [0x8F079643, ChannelAdminLogEventActionStopPoll_], - [0x050C7AC8, ChannelAdminLogEventActionChangeLinkedChat_], - [0x0E6B76AE, ChannelAdminLogEventActionChangeLocation_], - [0x53909779, ChannelAdminLogEventActionToggleSlowMode_], - [0x23209745, ChannelAdminLogEventActionStartGroupCall_], - [0xDB9F9140, ChannelAdminLogEventActionDiscardGroupCall_], - [0xF92424D2, ChannelAdminLogEventActionParticipantMute_], - [0xE64429C0, ChannelAdminLogEventActionParticipantUnmute_], - [0x56D6A247, ChannelAdminLogEventActionToggleGroupCallSetting_], - [0xFE9FC158, ChannelAdminLogEventActionParticipantJoinByInvite_], - [0x5A50FCA4, ChannelAdminLogEventActionExportedInviteDelete_], - [0x410A134E, ChannelAdminLogEventActionExportedInviteRevoke_], - [0xE90EBB59, ChannelAdminLogEventActionExportedInviteEdit_], - [0x3E7F6847, ChannelAdminLogEventActionParticipantVolume_], - [0x6E941A38, ChannelAdminLogEventActionChangeHistoryTTL_], - [0xAFB6144A, ChannelAdminLogEventActionParticipantJoinByRequest_], - [0xCB2AC766, ChannelAdminLogEventActionToggleNoForwards_], - [0x278F2868, ChannelAdminLogEventActionSendMessage_], - [0xBE4E0EF8, ChannelAdminLogEventActionChangeAvailableReactions_], - [0xF04FB3A9, ChannelAdminLogEventActionChangeUsernames_], - [0x02CC6383, ChannelAdminLogEventActionToggleForum_], - [0x58707D28, ChannelAdminLogEventActionCreateTopic_], - [0xF06FE208, ChannelAdminLogEventActionEditTopic_], - [0xAE168909, ChannelAdminLogEventActionDeleteTopic_], - [0x5D8D353B, ChannelAdminLogEventActionPinTopic_], - [0x64F36DFC, ChannelAdminLogEventActionToggleAntiSpam_], - [0x5796E780, ChannelAdminLogEventActionChangePeerColor_], - [0x5E477B25, ChannelAdminLogEventActionChangeProfilePeerColor_], - [0x31BB5D52, ChannelAdminLogEventActionChangeWallpaper_], - [0x3EA9FEB1, ChannelAdminLogEventActionChangeEmojiStatus_], - [0x46D840AB, ChannelAdminLogEventActionChangeEmojiStickerSet_], - [0x1FAD68CD, ChannelAdminLogEvent_], - [0xED8AF74D, channels_AdminLogResults_], - [0xEA107AE4, ChannelAdminLogEventsFilter_], - [0x5CE14175, PopularContact_], - [0x9E8FA6D3, messages_FavedStickersNotModified_], - [0x2CB51097, messages_FavedStickers_], - [0x46E1D13D, RecentMeUrlUnknown_], - [0xB92C09E2, RecentMeUrlUser_], - [0xB2DA71D2, RecentMeUrlChat_], - [0xEB49081D, RecentMeUrlChatInvite_], - [0xBC0A57DC, RecentMeUrlStickerSet_], - [0x0E0310D7, help_RecentMeUrls_], - [0x1CC6E91F, InputSingleMedia_], - [0xA6F8F452, WebAuthorization_], - [0xED56C9FC, account_WebAuthorizations_], - [0xA676A322, InputMessageID_], - [0xBAD88395, InputMessageReplyTo_], - [0x86872538, InputMessagePinned_], - [0xACFA1A7E, InputMessageCallbackQuery_], - [0xFCAAFEB7, InputDialogPeer_], - [0x64600527, InputDialogPeerFolder_], - [0xE56DBF05, DialogPeer_], - [0x514519E2, DialogPeerFolder_], - [0x0D54B65D, messages_FoundStickerSetsNotModified_], - [0x8AF09DD2, messages_FoundStickerSets_], - [0xF39B035C, FileHash_], - [0x75588B3F, InputClientProxy_], - [0xE3309F7F, help_TermsOfServiceUpdateEmpty_], - [0x28ECF961, help_TermsOfServiceUpdate_], - [0x3334B0F0, InputSecureFileUploaded_], - [0x5367E5BE, InputSecureFile_], - [0x64199744, SecureFileEmpty_], - [0x7D09C27E, SecureFile_], - [0x8AEABEC3, SecureData_], - [0x7D6099DD, SecurePlainPhone_], - [0x21EC5A5F, SecurePlainEmail_], - [0x9D2A81E3, SecureValueTypePersonalDetails_], - [0x3DAC6A00, SecureValueTypePassport_], - [0x06E425C4, SecureValueTypeDriverLicense_], - [0xA0D0744B, SecureValueTypeIdentityCard_], - [0x99A48F23, SecureValueTypeInternalPassport_], - [0xCBE31E26, SecureValueTypeAddress_], - [0xFC36954E, SecureValueTypeUtilityBill_], - [0x89137C0D, SecureValueTypeBankStatement_], - [0x8B883488, SecureValueTypeRentalAgreement_], - [0x99E3806A, SecureValueTypePassportRegistration_], - [0xEA02EC33, SecureValueTypeTemporaryRegistration_], - [0xB320AADB, SecureValueTypePhone_], - [0x8E3CA7EE, SecureValueTypeEmail_], - [0x187FA0CA, SecureValue_], - [0xDB21D0A7, InputSecureValue_], - [0xED1ECDB0, SecureValueHash_], - [0xE8A40BD9, SecureValueErrorData_], - [0x00BE3DFA, SecureValueErrorFrontSide_], - [0x868A2AA5, SecureValueErrorReverseSide_], - [0xE537CED6, SecureValueErrorSelfie_], - [0x7A700873, SecureValueErrorFile_], - [0x666220E9, SecureValueErrorFiles_], - [0x869D758F, SecureValueError_], - [0xA1144770, SecureValueErrorTranslationFile_], - [0x34636DD8, SecureValueErrorTranslationFiles_], - [0x33F0EA47, SecureCredentialsEncrypted_], - [0xAD2E1CD8, account_AuthorizationForm_], - [0x811F854F, account_SentEmailCode_], - [0x66AFA166, help_DeepLinkInfoEmpty_], - [0x6A4EE832, help_DeepLinkInfo_], - [0x1142BD56, SavedPhoneContact_], - [0x4DBA4501, account_Takeout_], - [0xD45AB096, PasswordKdfAlgoUnknown_], - [0x3A912D4A, PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_], - [0x004A8537, SecurePasswordKdfAlgoUnknown_], - [0xBBF2DDA0, SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000_], - [0x86471D92, SecurePasswordKdfAlgoSHA512_], - [0x1527BCAC, SecureSecretSettings_], - [0x9880F658, InputCheckPasswordEmpty_], - [0xD27FF082, InputCheckPasswordSRP_], - [0x829D99DA, SecureRequiredType_], - [0x027477B4, SecureRequiredTypeOneOf_], - [0xBFB9F457, help_PassportConfigNotModified_], - [0xA098D6AF, help_PassportConfig_], - [0x1D1B1245, InputAppEvent_], - [0xC0DE1BD9, JsonObjectValue_], - [0x3F6D7B68, JsonNull_], - [0xC7345E6A, JsonBool_], - [0x2BE0DFA4, JsonNumber_], - [0xB71E767A, JsonString_], - [0xF7444763, JsonArray_], - [0x99C1D49D, JsonObject_], - [0x34566B6A, PageTableCell_], - [0xE0C0C5E5, PageTableRow_], - [0x6F747657, PageCaption_], - [0xB92FB6CD, PageListItemText_], - [0x25E073FC, PageListItemBlocks_], - [0x5E068047, PageListOrderedItemText_], - [0x98DD8936, PageListOrderedItemBlocks_], - [0xB390DC08, PageRelatedArticle_], - [0x98657F0D, Page_], - [0x8C05F1C9, help_SupportName_], - [0xF3AE2EED, help_UserInfoEmpty_], - [0x01EB3758, help_UserInfo_], - [0x6CA9C2E9, PollAnswer_], - [0x86E18161, Poll_], - [0x3B6DDAD2, PollAnswerVoters_], - [0x7ADF2420, PollResults_], - [0xF041E250, ChatOnlines_], - [0x47A971E0, StatsURL_], - [0x5FB224D5, ChatAdminRights_], - [0x9F120418, ChatBannedRights_], - [0xE630B979, InputWallPaper_], - [0x72091C80, InputWallPaperSlug_], - [0x967A462E, InputWallPaperNoFile_], - [0x1C199183, account_WallPapersNotModified_], - [0xCDC3858C, account_WallPapers_], - [0xAD253D78, CodeSettings_], - [0x372EFCD0, WallPaperSettings_], - [0xBAA57628, AutoDownloadSettings_], - [0x63CACF26, account_AutoDownloadSettings_], - [0xD5B3B9F9, EmojiKeyword_], - [0x236DF622, EmojiKeywordDeleted_], - [0x5CC761BD, EmojiKeywordsDifference_], - [0xA575739D, EmojiURL_], - [0xB3FB5361, EmojiLanguage_], - [0xFF544E65, Folder_], - [0xFBD2C296, InputFolderPeer_], - [0xE9BAA668, FolderPeer_], - [0xE844EBFF, messages_SearchCounter_], - [0x92D33A0E, UrlAuthResultRequest_], - [0x8F8C0E4E, UrlAuthResultAccepted_], - [0xA9D6DB1F, UrlAuthResultDefault_], - [0xBFB5AD8B, ChannelLocationEmpty_], - [0x209B82DB, ChannelLocation_], - [0xCA461B5D, PeerLocated_], - [0xF8EC284B, PeerSelfLocated_], - [0xD072ACB4, RestrictionReason_], - [0x3C5693E9, InputTheme_], - [0xF5890DF1, InputThemeSlug_], - [0xA00E67D6, Theme_], - [0xF41EB622, account_ThemesNotModified_], - [0x9A3D8C6D, account_Themes_], - [0x629F1980, auth_LoginToken_], - [0x068E9916, auth_LoginTokenMigrateTo_], - [0x390D5C5E, auth_LoginTokenSuccess_], - [0x57E28221, account_ContentSettings_], - [0xA927FEC5, messages_InactiveChats_], - [0xC3A12462, BaseThemeClassic_], - [0xFBD81688, BaseThemeDay_], - [0xB7B31EA8, BaseThemeNight_], - [0x6D5F77EE, BaseThemeTinted_], - [0x5B11125A, BaseThemeArctic_], - [0x8FDE504F, InputThemeSettings_], - [0xFA58B6D4, ThemeSettings_], - [0x54B56617, WebPageAttributeTheme_], - [0x2E94C3E7, WebPageAttributeStory_], - [0x4899484E, messages_VotesList_], - [0xF568028A, BankCardOpenUrl_], - [0x3E24E573, payments_BankCardData_], - [0x5FB5523B, DialogFilter_], - [0x363293AE, DialogFilterDefault_], - [0x9FE28EA4, DialogFilterChatlist_], - [0x77744D4A, DialogFilterSuggested_], - [0xB637EDAF, StatsDateRangeDays_], - [0xCB43ACDE, StatsAbsValueAndPrev_], - [0xCBCE2FE0, StatsPercentValue_], - [0x4A27EB2D, StatsGraphAsync_], - [0xBEDC9822, StatsGraphError_], - [0x8EA464B6, StatsGraph_], - [0x396CA5FC, stats_BroadcastStats_], - [0x98F6AC75, help_PromoDataEmpty_], - [0x8C39793F, help_PromoData_], - [0xDE33B094, VideoSize_], - [0xF85C413C, VideoSizeEmojiMarkup_], - [0x0DA082FE, VideoSizeStickerMarkup_], - [0x9D04AF9B, StatsGroupTopPoster_], - [0xD7584C87, StatsGroupTopAdmin_], - [0x535F779D, StatsGroupTopInviter_], - [0xEF7FF916, stats_MegagroupStats_], - [0x734C4CCB, GlobalPrivacySettings_], - [0x4203C5EF, help_CountryCode_], - [0xC3878E23, help_Country_], - [0x93CC1F32, help_CountriesListNotModified_], - [0x87D0759E, help_CountriesList_], - [0x455B853D, MessageViews_], - [0xB6C4F543, messages_MessageViews_], - [0xA6341782, messages_DiscussionMessage_], - [0xAFBC09DB, MessageReplyHeader_], - [0x0E5AF939, MessageReplyStoryHeader_], - [0x83D60FC2, MessageReplies_], - [0xE8FD8014, PeerBlocked_], - [0x7FE91C14, stats_MessageStats_], - [0x7780BCB4, GroupCallDiscarded_], - [0xD597650C, GroupCall_], - [0xD8AA840F, InputGroupCall_], - [0xEBA636FE, GroupCallParticipant_], - [0x9E727AAD, phone_GroupCall_], - [0xF47751B6, phone_GroupParticipants_], - [0x3081ED9D, InlineQueryPeerTypeSameBotPM_], - [0x833C0FAC, InlineQueryPeerTypePM_], - [0xD766C50A, InlineQueryPeerTypeChat_], - [0x5EC4BE43, InlineQueryPeerTypeMegagroup_], - [0x6334EE9A, InlineQueryPeerTypeBroadcast_], - [0x0E3B2D0C, InlineQueryPeerTypeBotPM_], - [0x1662AF0B, messages_HistoryImport_], - [0x5E0FB7B9, messages_HistoryImportParsed_], - [0xEF8D3E6C, messages_AffectedFoundMessages_], - [0x8C5ADFD9, ChatInviteImporter_], - [0xBDC62DCC, messages_ExportedChatInvites_], - [0x1871BE50, messages_ExportedChatInvite_], - [0x222600EF, messages_ExportedChatInviteReplaced_], - [0x81B6B00A, messages_ChatInviteImporters_], - [0xF2ECEF23, ChatAdminWithInvites_], - [0xB69B72D7, messages_ChatAdminsWithInvites_], - [0xA24DE717, messages_CheckedHistoryImportPeer_], - [0xAFE5623F, phone_JoinAsPeers_], - [0x204BD158, phone_ExportedGroupCallInvite_], - [0xDCB118B7, GroupCallParticipantVideoSourceGroup_], - [0x67753AC8, GroupCallParticipantVideo_], - [0x85FEA03F, stickers_SuggestedShortName_], - [0x2F6CB2AB, BotCommandScopeDefault_], - [0x3C4F04D8, BotCommandScopeUsers_], - [0x6FE1A881, BotCommandScopeChats_], - [0xB9AA606A, BotCommandScopeChatAdmins_], - [0xDB9D897D, BotCommandScopePeer_], - [0x3FD863D1, BotCommandScopePeerAdmins_], - [0x0A1321F3, BotCommandScopePeerUser_], - [0xE3779861, account_ResetPasswordFailedWait_], - [0xE9EFFC7D, account_ResetPasswordRequestedWait_], - [0xE926D63E, account_ResetPasswordOk_], - [0xED5383F7, SponsoredMessage_], - [0xC9EE1D87, messages_SponsoredMessages_], - [0x1839490F, messages_SponsoredMessagesEmpty_], - [0xC9B0539F, SearchResultsCalendarPeriod_], - [0x147EE23C, messages_SearchResultsCalendar_], - [0x7F648B67, SearchResultPosition_], - [0x53B22BAF, messages_SearchResultsPositions_], - [0xF496B0C6, channels_SendAsPeers_], - [0x3B6D152E, users_UserFull_], - [0x6880B94D, messages_PeerSettings_], - [0xC3A2835F, auth_LoggedOut_], - [0xA3D1CB80, ReactionCount_], - [0x4F2B9479, MessageReactions_], - [0x31BD492D, messages_MessageReactionsList_], - [0xC077EC01, AvailableReaction_], - [0x9F071957, messages_AvailableReactionsNotModified_], - [0x768E3AAD, messages_AvailableReactions_], - [0x8C79B63C, MessagePeerReaction_], - [0x80EB48AF, GroupCallStreamChannel_], - [0xD0E482B2, phone_GroupCallStreamChannels_], - [0x2DBF3432, phone_GroupCallStreamRtmpUrl_], - [0x4576F3F0, AttachMenuBotIconColor_], - [0xB2A7386B, AttachMenuBotIcon_], - [0xD90D8DFE, AttachMenuBot_], - [0xF1D88A5C, AttachMenuBotsNotModified_], - [0x3C4301C0, AttachMenuBots_], - [0x93BF667F, AttachMenuBotsBot_], - [0x0C14557C, WebViewResultUrl_], - [0x882F76BB, SimpleWebViewResultUrl_], - [0x0C94511C, WebViewMessageSent_], - [0x7533A588, BotMenuButtonDefault_], - [0x4258C205, BotMenuButtonCommands_], - [0xC7B57CE6, BotMenuButton_], - [0xFBF6E8B1, account_SavedRingtonesNotModified_], - [0xC1E92CC5, account_SavedRingtones_], - [0x97E8BEBE, NotificationSoundDefault_], - [0x6F0C34DF, NotificationSoundNone_], - [0x830B9AE4, NotificationSoundLocal_], - [0xFF6C8049, NotificationSoundRingtone_], - [0xB7263F6D, account_SavedRingtone_], - [0x1F307EB7, account_SavedRingtoneConverted_], - [0x7D6BE90E, AttachMenuPeerTypeSameBotPM_], - [0xC32BFA1A, AttachMenuPeerTypeBotPM_], - [0xF146D31F, AttachMenuPeerTypePM_], - [0x0509113F, AttachMenuPeerTypeChat_], - [0x7BFBDEFC, AttachMenuPeerTypeBroadcast_], - [0xC5B56859, InputInvoiceMessage_], - [0xC326CAEF, InputInvoiceSlug_], - [0x98986C0D, InputInvoicePremiumGiftCode_], - [0xAED0CBD9, payments_ExportedInvoice_], - [0xCFB9D957, messages_TranscribedAudio_], - [0x5334759C, help_PremiumPromo_], - [0xA6751E66, InputStorePaymentPremiumSubscription_], - [0x616F7FE8, InputStorePaymentGiftPremium_], - [0xA3805F3F, InputStorePaymentPremiumGiftCode_], - [0x160544CA, InputStorePaymentPremiumGiveaway_], - [0x74C34319, PremiumGiftOption_], - [0x88F8F21B, PaymentFormMethod_], - [0x2DE11AAE, EmojiStatusEmpty_], - [0x929B619D, EmojiStatus_], - [0xFA30A8C7, EmojiStatusUntil_], - [0xD08CE645, account_EmojiStatusesNotModified_], - [0x90C467D1, account_EmojiStatuses_], - [0x79F5D419, ReactionEmpty_], - [0x1B2286B8, ReactionEmoji_], - [0x8935FC73, ReactionCustomEmoji_], - [0xEAFC32BC, ChatReactionsNone_], - [0x52928BCA, ChatReactionsAll_], - [0x661D4037, ChatReactionsSome_], - [0xB06FDBDF, messages_ReactionsNotModified_], - [0xEAFDF716, messages_Reactions_], - [0x4345BE73, EmailVerifyPurposeLoginSetup_], - [0x527D22EB, EmailVerifyPurposeLoginChange_], - [0xBBF51685, EmailVerifyPurposePassport_], - [0x922E55A9, EmailVerificationCode_], - [0xDB909EC2, EmailVerificationGoogle_], - [0x96D074FD, EmailVerificationApple_], - [0x2B96CD1B, account_EmailVerified_], - [0xE1BB0D61, account_EmailVerifiedLogin_], - [0x5F2D1DF2, PremiumSubscriptionOption_], - [0xB81C7034, SendAsPeer_], - [0xAD628CC8, MessageExtendedMediaPreview_], - [0xEE479C64, MessageExtendedMedia_], - [0xFCFEB29C, StickerKeyword_], - [0xB4073647, Username_], - [0x023F109B, ForumTopicDeleted_], - [0x71701DA9, ForumTopic_], - [0x367617D3, messages_ForumTopics_], - [0x43B46B20, DefaultHistoryTTL_], - [0x41BF109B, ExportedContactToken_], - [0x5F3B8A00, RequestPeerTypeUser_], - [0xC9F06E1B, RequestPeerTypeChat_], - [0x339BEF6C, RequestPeerTypeBroadcast_], - [0x481EADFA, EmojiListNotModified_], - [0x7A1E11D1, EmojiList_], - [0x7A9ABDA9, EmojiGroup_], - [0x6FB4AD87, messages_EmojiGroupsNotModified_], - [0x881FB94B, messages_EmojiGroups_], - [0x751F3146, TextWithEntities_], - [0x33DB32F8, messages_TranslateResult_], - [0xC84834CE, AutoSaveSettings_], - [0x81602D47, AutoSaveException_], - [0x4C3E069D, account_AutoSaveSettings_], - [0x7CDE641D, help_AppConfigNotModified_], - [0xDD18782E, help_AppConfig_], - [0xA920BD7A, InputBotAppID_], - [0x908C0407, InputBotAppShortName_], - [0x5DA674B7, BotAppNotModified_], - [0x95FCD1D6, BotApp_], - [0xEB50ADF5, messages_BotApp_], - [0x3C1B4F0D, AppWebViewResultUrl_], - [0xB57295D5, InlineBotWebView_], - [0x4A4FF172, ReadParticipantDate_], - [0xF3E0DA33, InputChatlistDialogFilter_], - [0x0C5181AC, ExportedChatlistInvite_], - [0x10E6E3A6, chatlists_ExportedChatlistInvite_], - [0x10AB6DC7, chatlists_ExportedInvites_], - [0xFA87F659, chatlists_ChatlistInviteAlready_], - [0x1DCD839D, chatlists_ChatlistInvite_], - [0x93BD878D, chatlists_ChatlistUpdates_], - [0xE8A775B0, bots_BotInfo_], - [0xB6CC2D5C, MessagePeerVote_], - [0x74CDA504, MessagePeerVoteInputOption_], - [0x4628F6E6, MessagePeerVoteMultiple_], - [0x3DB8EC63, SponsoredWebPage_], - [0x8D595CD6, StoryViews_], - [0x51E6EE4F, StoryItemDeleted_], - [0xFFADC913, StoryItemSkipped_], - [0x79B26A24, StoryItem_], - [0x1158FE3E, stories_AllStoriesNotModified_], - [0x6EFC5E81, stories_AllStories_], - [0x5DD8C3C8, stories_Stories_], - [0xB0BDEAC5, StoryView_], - [0x9083670B, StoryViewPublicForward_], - [0xBD74CF49, StoryViewPublicRepost_], - [0x59D78FC5, stories_StoryViewsList_], - [0xDE9EED1D, stories_StoryViews_], - [0x22C0F6D5, InputReplyToMessage_], - [0x5881323A, InputReplyToStory_], - [0x3FC9053B, ExportedStoryLink_], - [0x712E27FD, StoriesStealthMode_], - [0x03D1EA4E, MediaAreaCoordinates_], - [0xBE82DB9C, MediaAreaVenue_], - [0xB282217F, InputMediaAreaVenue_], - [0xDF8B3B22, MediaAreaGeoPoint_], - [0x14455871, MediaAreaSuggestedReaction_], - [0x770416AF, MediaAreaChannelPost_], - [0x2271F2BF, InputMediaAreaChannelPost_], - [0x9A35E999, PeerStories_], - [0xCAE68768, stories_PeerStories_], - [0xFD5E12BD, messages_WebPage_], - [0x257E962B, PremiumGiftCodeOption_], - [0x284A1096, payments_CheckedGiftCode_], - [0x4367DAA0, payments_GiveawayInfo_], - [0x00CD5570, payments_GiveawayInfoResults_], - [0xB2539D54, PrepaidGiveaway_], - [0x2A1C8C71, Boost_], - [0x86F8613C, premium_BoostsList_], - [0xC448415C, MyBoost_], - [0x9AE228E2, premium_MyBoosts_], - [0x4959427A, premium_BoostsStatus_], - [0xB826E150, StoryFwdHeader_], - [0xE7058E7F, PostInteractionCountersMessage_], - [0x8A480E27, PostInteractionCountersStory_], - [0x50CD067C, stats_StoryStats_], - [0x01F2BF4A, PublicForwardMessage_], - [0xEDF3ADD0, PublicForwardStory_], - [0x93037E20, stats_PublicForwards_], - [0xB54B5ACF, PeerColor_], - [0x26219A58, help_PeerColorSet_], - [0x767D61EB, help_PeerColorProfileSet_], - [0xADEC6EBE, help_PeerColorOption_], - [0x2BA1F5CE, help_PeerColorsNotModified_], - [0x00F8ED08, help_PeerColors_], - [0x6090D6D5, StoryReaction_], - [0xBBAB2643, StoryReactionPublicForward_], - [0xCFCD0F13, StoryReactionPublicRepost_], - [0xAA5F789C, stories_StoryReactionsList_], - [0xBD87CB6C, SavedDialog_], - [0xF83AE221, messages_SavedDialogs_], - [0x44BA9DD9, messages_SavedDialogsSlice_], - [0xC01F6FE8, messages_SavedDialogsNotModified_], - [0xCB6FF828, SavedReactionTag_], - [0x889B59EF, messages_SavedReactionTagsNotModified_], - [0x3259950A, messages_SavedReactionTags_], - [0x3BB842AC, OutboxReadDate_], - [0xDC8B44CF, smsjobs_EligibleToJoin_], - [0x2AEE9191, smsjobs_Status_], - [0xE6A1EEB8, SmsJob_], - [0x120B1AB9, BusinessWeeklyOpen_], - [0x8C92B098, BusinessWorkHours_], - [0xAC5C1AF7, BusinessLocation_], - [0x6F8B32AA, InputBusinessRecipients_], - [0x21108FF7, BusinessRecipients_], - [0xC9B9E2B9, BusinessAwayMessageScheduleAlways_], - [0xC3F2F501, BusinessAwayMessageScheduleOutsideWorkHours_], - [0xCC4D9ECC, BusinessAwayMessageScheduleCustom_], - [0x0194CB3B, InputBusinessGreetingMessage_], - [0xE519ABAB, BusinessGreetingMessage_], - [0x832175E0, InputBusinessAwayMessage_], - [0xEF156A5C, BusinessAwayMessage_], - [0xFF9289F5, Timezone_], - [0x970708CC, help_TimezonesListNotModified_], - [0x7B74ED71, help_TimezonesList_], - [0x0697102B, QuickReply_], - [0x24596D41, InputQuickReplyShortcut_], - [0x01190CF1, InputQuickReplyShortcutId_], - [0xC68D6695, messages_QuickReplies_], - [0x5F91EB5B, messages_QuickRepliesNotModified_], - [0xBD068601, ConnectedBot_], - [0x17D7F87B, account_ConnectedBots_], - [0x2AD93719, messages_DialogFilters_], - [0x6C8E1E06, Birthday_], - [0x896433B4, BotBusinessConnection_], - [0x09C469CD, InputBusinessIntro_], - [0x5A0A066D, BusinessIntro_], - [0xFAFF629D, messages_MyStickers_], - [0xE39460A9, InputCollectibleUsername_], - [0xA2E214A4, InputCollectiblePhone_], - [0x6EBDFF91, fragment_CollectibleInfo_], - [0xC4E5921E, InputBusinessBotRecipients_], - [0xB88CF373, BusinessBotRecipients_], - [0x1D998733, ContactBirthday_], - [0x114FF30D, contacts_ContactBirthdays_], - [0x628C9224, MissingInvitee_], - [0x7F5DEFA6, messages_InvitedUsers_], - [0x11679FA7, InputBusinessChatLink_], - [0xB4AE666F, BusinessChatLink_], - [0xEC43A2D1, account_BusinessChatLinks_], - [0x9A23AF21, account_ResolvedBusinessChatLinks_], - [0xD62FF46A, RequestedPeerUser_], - [0x7307544F, RequestedPeerChat_], - [0x8BA403E4, RequestedPeerChannel_], - [0x430D3150, SponsoredMessageReportOption_], - [0x846F9E42, channels_SponsoredMessageReportResultChooseOption_], - [0x3E3BCF2F, channels_SponsoredMessageReportResultAdsHidden_], - [0xAD798849, channels_SponsoredMessageReportResultReported_], - [0xD07B4BAD, stats_BroadcastRevenueStats_], - [0xEC659737, stats_BroadcastRevenueWithdrawalUrl_], - [0x557E2CC4, BroadcastRevenueTransactionProceeds_], - [0x5A590978, BroadcastRevenueTransactionWithdrawal_], - [0x42D30D2E, BroadcastRevenueTransactionRefund_], - [0x87158466, stats_BroadcastRevenueTransactions_], -// deno-lint-ignore no-explicit-any -] as const as any); -export declare namespace enums { - type ResPQ = types.ResPQ; - type P_Q_inner_data = types.P_q_inner_data_dc | types.P_q_inner_data_temp_dc; - type Server_DH_Params = types.Server_DH_params_ok; - type Server_DH_inner_data = types.Server_DH_inner_data; - type Client_DH_Inner_Data = types.Client_DH_inner_data; - type Set_client_DH_params_answer = types.Dh_gen_ok | types.Dh_gen_retry | types.Dh_gen_fail; - type BindAuthKeyInner = types.Bind_auth_key_inner; - type RpcError = types.Rpc_error; - type RpcDropAnswer = types.Rpc_answer_unknown | types.Rpc_answer_dropped_running | types.Rpc_answer_dropped; - type FutureSalt = types.Future_salt; - type FutureSalts = types.Future_salts; - type Pong = types.Pong; - type DestroySessionRes = types.Destroy_session_ok | types.Destroy_session_none; - type NewSession = types.New_session_created; - type Object = types.Gzip_packed; - type MsgsAck = types.Msgs_ack; - type BadMsgNotification = types.Bad_msg_notification | types.Bad_server_salt; - type MsgResendReq = types.Msg_resend_req; - type MsgsStateReq = types.Msgs_state_req; - type MsgsStateInfo = types.Msgs_state_info; - type MsgsAllInfo = types.Msgs_all_info; - type MsgDetailedInfo = types.Msg_detailed_info | types.Msg_new_detailed_info; - type DestroyAuthKeyRes = types.Destroy_auth_key_ok | types.Destroy_auth_key_none | types.Destroy_auth_key_fail; - type HttpWait = types.Http_wait; - type True = types.True; - type Error = types.Error; - type IpPort = types.IpPort | types.IpPortSecret; - type AccessPointRule = types.AccessPointRule; - type InputFileLocation = types.InputPeerPhotoFileLocationLegacy | types.InputStickerSetThumbLegacy | types.InputFileLocation | types.InputEncryptedFileLocation | types.InputDocumentFileLocation | types.InputSecureFileLocation | types.InputTakeoutFileLocation | types.InputPhotoFileLocation | types.InputPhotoLegacyFileLocation | types.InputPeerPhotoFileLocation | types.InputStickerSetThumb | types.InputGroupCallStream; - type InputPeer = types.InputPeerEmpty | types.InputPeerSelf | types.InputPeerChat | types.InputPeerUser | types.InputPeerChannel | types.InputPeerUserFromMessage | types.InputPeerChannelFromMessage; - type InputUser = types.InputUserEmpty | types.InputUserSelf | types.InputUser | types.InputUserFromMessage; - type InputContact = types.InputPhoneContact; - type InputFile = types.InputFile | types.InputFileBig; - type InputMedia = types.InputMediaEmpty | types.InputMediaUploadedPhoto | types.InputMediaPhoto | types.InputMediaGeoPoint | types.InputMediaContact | types.InputMediaUploadedDocument | types.InputMediaDocument | types.InputMediaVenue | types.InputMediaPhotoExternal | types.InputMediaDocumentExternal | types.InputMediaGame | types.InputMediaInvoice | types.InputMediaGeoLive | types.InputMediaPoll | types.InputMediaDice | types.InputMediaStory | types.InputMediaWebPage; - type InputChatPhoto = types.InputChatPhotoEmpty | types.InputChatUploadedPhoto | types.InputChatPhoto; - type InputGeoPoint = types.InputGeoPointEmpty | types.InputGeoPoint; - type InputPhoto = types.InputPhotoEmpty | types.InputPhoto; - type Peer = types.PeerUser | types.PeerChat | types.PeerChannel; - type User = types.UserEmpty | types.User; - type UserProfilePhoto = types.UserProfilePhotoEmpty | types.UserProfilePhoto; - type UserStatus = types.UserStatusEmpty | types.UserStatusOnline | types.UserStatusOffline | types.UserStatusRecently | types.UserStatusLastWeek | types.UserStatusLastMonth; - type Chat = types.ChatEmpty | types.Chat | types.ChatForbidden | types.Channel | types.ChannelForbidden; - type ChatFull = types.ChatFull | types.ChannelFull; - type ChatParticipant = types.ChatParticipant | types.ChatParticipantCreator | types.ChatParticipantAdmin; - type ChatParticipants = types.ChatParticipantsForbidden | types.ChatParticipants; - type ChatPhoto = types.ChatPhotoEmpty | types.ChatPhoto; - type Message = types.MessageEmpty | types.Message | types.MessageService; - type MessageMedia = types.MessageMediaEmpty | types.MessageMediaPhoto | types.MessageMediaGeo | types.MessageMediaContact | types.MessageMediaUnsupported | types.MessageMediaDocument | types.MessageMediaWebPage | types.MessageMediaVenue | types.MessageMediaGame | types.MessageMediaInvoice | types.MessageMediaGeoLive | types.MessageMediaPoll | types.MessageMediaDice | types.MessageMediaStory | types.MessageMediaGiveaway | types.MessageMediaGiveawayResults; - type MessageAction = types.MessageActionEmpty | types.MessageActionChatCreate | types.MessageActionChatEditTitle | types.MessageActionChatEditPhoto | types.MessageActionChatDeletePhoto | types.MessageActionChatAddUser | types.MessageActionChatDeleteUser | types.MessageActionChatJoinedByLink | types.MessageActionChannelCreate | types.MessageActionChatMigrateTo | types.MessageActionChannelMigrateFrom | types.MessageActionPinMessage | types.MessageActionHistoryClear | types.MessageActionGameScore | types.MessageActionPaymentSentMe | types.MessageActionPaymentSent | types.MessageActionPhoneCall | types.MessageActionScreenshotTaken | types.MessageActionCustomAction | types.MessageActionBotAllowed | types.MessageActionSecureValuesSentMe | types.MessageActionSecureValuesSent | types.MessageActionContactSignUp | types.MessageActionGeoProximityReached | types.MessageActionGroupCall | types.MessageActionInviteToGroupCall | types.MessageActionSetMessagesTTL | types.MessageActionGroupCallScheduled | types.MessageActionSetChatTheme | types.MessageActionChatJoinedByRequest | types.MessageActionWebViewDataSentMe | types.MessageActionWebViewDataSent | types.MessageActionGiftPremium | types.MessageActionTopicCreate | types.MessageActionTopicEdit | types.MessageActionSuggestProfilePhoto | types.MessageActionRequestedPeer | types.MessageActionSetChatWallPaper | types.MessageActionGiftCode | types.MessageActionGiveawayLaunch | types.MessageActionGiveawayResults | types.MessageActionBoostApply | types.MessageActionRequestedPeerSentMe; - type Dialog = types.Dialog | types.DialogFolder; - type Photo = types.PhotoEmpty | types.Photo; - type PhotoSize = types.PhotoSizeEmpty | types.PhotoSize | types.PhotoCachedSize | types.PhotoStrippedSize | types.PhotoSizeProgressive | types.PhotoPathSize; - type GeoPoint = types.GeoPointEmpty | types.GeoPoint; - type InputNotifyPeer = types.InputNotifyPeer | types.InputNotifyUsers | types.InputNotifyChats | types.InputNotifyBroadcasts | types.InputNotifyForumTopic; - type InputPeerNotifySettings = types.InputPeerNotifySettings; - type PeerNotifySettings = types.PeerNotifySettings; - type PeerSettings = types.PeerSettings; - type WallPaper = types.WallPaper | types.WallPaperNoFile; - type ReportReason = types.InputReportReasonSpam | types.InputReportReasonViolence | types.InputReportReasonPornography | types.InputReportReasonChildAbuse | types.InputReportReasonOther | types.InputReportReasonCopyright | types.InputReportReasonGeoIrrelevant | types.InputReportReasonFake | types.InputReportReasonIllegalDrugs | types.InputReportReasonPersonalDetails; - type UserFull = types.UserFull; - type Contact = types.Contact; - type ImportedContact = types.ImportedContact; - type ContactStatus = types.ContactStatus; - type MessagesFilter = types.InputMessagesFilterEmpty | types.InputMessagesFilterPhotos | types.InputMessagesFilterVideo | types.InputMessagesFilterPhotoVideo | types.InputMessagesFilterDocument | types.InputMessagesFilterUrl | types.InputMessagesFilterGif | types.InputMessagesFilterVoice | types.InputMessagesFilterMusic | types.InputMessagesFilterChatPhotos | types.InputMessagesFilterPhoneCalls | types.InputMessagesFilterRoundVoice | types.InputMessagesFilterRoundVideo | types.InputMessagesFilterMyMentions | types.InputMessagesFilterGeo | types.InputMessagesFilterContacts | types.InputMessagesFilterPinned; - type Update = types.UpdateNewMessage | types.UpdateMessageID | types.UpdateDeleteMessages | types.UpdateUserTyping | types.UpdateChatUserTyping | types.UpdateChatParticipants | types.UpdateUserStatus | types.UpdateUserName | types.UpdateNewAuthorization | types.UpdateNewEncryptedMessage | types.UpdateEncryptedChatTyping | types.UpdateEncryption | types.UpdateEncryptedMessagesRead | types.UpdateChatParticipantAdd | types.UpdateChatParticipantDelete | types.UpdateDcOptions | types.UpdateNotifySettings | types.UpdateServiceNotification | types.UpdatePrivacy | types.UpdateUserPhone | types.UpdateReadHistoryInbox | types.UpdateReadHistoryOutbox | types.UpdateWebPage | types.UpdateReadMessagesContents | types.UpdateChannelTooLong | types.UpdateChannel | types.UpdateNewChannelMessage | types.UpdateReadChannelInbox | types.UpdateDeleteChannelMessages | types.UpdateChannelMessageViews | types.UpdateChatParticipantAdmin | types.UpdateNewStickerSet | types.UpdateStickerSetsOrder | types.UpdateStickerSets | types.UpdateSavedGifs | types.UpdateBotInlineQuery | types.UpdateBotInlineSend | types.UpdateEditChannelMessage | types.UpdateBotCallbackQuery | types.UpdateEditMessage | types.UpdateInlineBotCallbackQuery | types.UpdateReadChannelOutbox | types.UpdateDraftMessage | types.UpdateReadFeaturedStickers | types.UpdateRecentStickers | types.UpdateConfig | types.UpdatePtsChanged | types.UpdateChannelWebPage | types.UpdateDialogPinned | types.UpdatePinnedDialogs | types.UpdateBotWebhookJSON | types.UpdateBotWebhookJSONQuery | types.UpdateBotShippingQuery | types.UpdateBotPrecheckoutQuery | types.UpdatePhoneCall | types.UpdateLangPackTooLong | types.UpdateLangPack | types.UpdateFavedStickers | types.UpdateChannelReadMessagesContents | types.UpdateContactsReset | types.UpdateChannelAvailableMessages | types.UpdateDialogUnreadMark | types.UpdateMessagePoll | types.UpdateChatDefaultBannedRights | types.UpdateFolderPeers | types.UpdatePeerSettings | types.UpdatePeerLocated | types.UpdateNewScheduledMessage | types.UpdateDeleteScheduledMessages | types.UpdateTheme | types.UpdateGeoLiveViewed | types.UpdateLoginToken | types.UpdateMessagePollVote | types.UpdateDialogFilter | types.UpdateDialogFilterOrder | types.UpdateDialogFilters | types.UpdatePhoneCallSignalingData | types.UpdateChannelMessageForwards | types.UpdateReadChannelDiscussionInbox | types.UpdateReadChannelDiscussionOutbox | types.UpdatePeerBlocked | types.UpdateChannelUserTyping | types.UpdatePinnedMessages | types.UpdatePinnedChannelMessages | types.UpdateChat | types.UpdateGroupCallParticipants | types.UpdateGroupCall | types.UpdatePeerHistoryTTL | types.UpdateChatParticipant | types.UpdateChannelParticipant | types.UpdateBotStopped | types.UpdateGroupCallConnection | types.UpdateBotCommands | types.UpdatePendingJoinRequests | types.UpdateBotChatInviteRequester | types.UpdateMessageReactions | types.UpdateAttachMenuBots | types.UpdateWebViewResultSent | types.UpdateBotMenuButton | types.UpdateSavedRingtones | types.UpdateTranscribedAudio | types.UpdateReadFeaturedEmojiStickers | types.UpdateUserEmojiStatus | types.UpdateRecentEmojiStatuses | types.UpdateRecentReactions | types.UpdateMoveStickerSetToTop | types.UpdateMessageExtendedMedia | types.UpdateChannelPinnedTopic | types.UpdateChannelPinnedTopics | types.UpdateUser | types.UpdateAutoSaveSettings | types.UpdateStory | types.UpdateReadStories | types.UpdateStoryID | types.UpdateStoriesStealthMode | types.UpdateSentStoryReaction | types.UpdateBotChatBoost | types.UpdateChannelViewForumAsMessages | types.UpdatePeerWallpaper | types.UpdateBotMessageReaction | types.UpdateBotMessageReactions | types.UpdateSavedDialogPinned | types.UpdatePinnedSavedDialogs | types.UpdateSavedReactionTags | types.UpdateSmsJob | types.UpdateQuickReplies | types.UpdateNewQuickReply | types.UpdateDeleteQuickReply | types.UpdateQuickReplyMessage | types.UpdateDeleteQuickReplyMessages | types.UpdateBotBusinessConnect | types.UpdateBotNewBusinessMessage | types.UpdateBotEditBusinessMessage | types.UpdateBotDeleteBusinessMessage; - type Updates = types.UpdatesTooLong | types.UpdateShortMessage | types.UpdateShortChatMessage | types.UpdateShort | types.UpdatesCombined | types.Updates | types.UpdateShortSentMessage; - type DcOption = types.DcOption; - type Config = types.Config; - type NearestDc = types.NearestDc; - type EncryptedChat = types.EncryptedChatEmpty | types.EncryptedChatWaiting | types.EncryptedChatRequested | types.EncryptedChat | types.EncryptedChatDiscarded; - type InputEncryptedChat = types.InputEncryptedChat; - type EncryptedFile = types.EncryptedFileEmpty | types.EncryptedFile; - type InputEncryptedFile = types.InputEncryptedFileEmpty | types.InputEncryptedFileUploaded | types.InputEncryptedFile | types.InputEncryptedFileBigUploaded; - type EncryptedMessage = types.EncryptedMessage | types.EncryptedMessageService; - type InputDocument = types.InputDocumentEmpty | types.InputDocument; - type Document = types.DocumentEmpty | types.Document; - type NotifyPeer = types.NotifyPeer | types.NotifyUsers | types.NotifyChats | types.NotifyBroadcasts | types.NotifyForumTopic; - type SendMessageAction = types.SendMessageTypingAction | types.SendMessageCancelAction | types.SendMessageRecordVideoAction | types.SendMessageUploadVideoAction | types.SendMessageRecordAudioAction | types.SendMessageUploadAudioAction | types.SendMessageUploadPhotoAction | types.SendMessageUploadDocumentAction | types.SendMessageGeoLocationAction | types.SendMessageChooseContactAction | types.SendMessageGamePlayAction | types.SendMessageRecordRoundAction | types.SendMessageUploadRoundAction | types.SpeakingInGroupCallAction | types.SendMessageHistoryImportAction | types.SendMessageChooseStickerAction | types.SendMessageEmojiInteraction | types.SendMessageEmojiInteractionSeen; - type InputPrivacyKey = types.InputPrivacyKeyStatusTimestamp | types.InputPrivacyKeyChatInvite | types.InputPrivacyKeyPhoneCall | types.InputPrivacyKeyPhoneP2P | types.InputPrivacyKeyForwards | types.InputPrivacyKeyProfilePhoto | types.InputPrivacyKeyPhoneNumber | types.InputPrivacyKeyAddedByPhone | types.InputPrivacyKeyVoiceMessages | types.InputPrivacyKeyAbout | types.InputPrivacyKeyBirthday; - type PrivacyKey = types.PrivacyKeyStatusTimestamp | types.PrivacyKeyChatInvite | types.PrivacyKeyPhoneCall | types.PrivacyKeyPhoneP2P | types.PrivacyKeyForwards | types.PrivacyKeyProfilePhoto | types.PrivacyKeyPhoneNumber | types.PrivacyKeyAddedByPhone | types.PrivacyKeyVoiceMessages | types.PrivacyKeyAbout | types.PrivacyKeyBirthday; - type InputPrivacyRule = types.InputPrivacyValueAllowContacts | types.InputPrivacyValueAllowAll | types.InputPrivacyValueAllowUsers | types.InputPrivacyValueDisallowContacts | types.InputPrivacyValueDisallowAll | types.InputPrivacyValueDisallowUsers | types.InputPrivacyValueAllowChatParticipants | types.InputPrivacyValueDisallowChatParticipants | types.InputPrivacyValueAllowCloseFriends | types.InputPrivacyValueAllowPremium; - type PrivacyRule = types.PrivacyValueAllowContacts | types.PrivacyValueAllowAll | types.PrivacyValueAllowUsers | types.PrivacyValueDisallowContacts | types.PrivacyValueDisallowAll | types.PrivacyValueDisallowUsers | types.PrivacyValueAllowChatParticipants | types.PrivacyValueDisallowChatParticipants | types.PrivacyValueAllowCloseFriends | types.PrivacyValueAllowPremium; - type AccountDaysTTL = types.AccountDaysTTL; - type DocumentAttribute = types.DocumentAttributeImageSize | types.DocumentAttributeAnimated | types.DocumentAttributeSticker | types.DocumentAttributeVideo | types.DocumentAttributeAudio | types.DocumentAttributeFilename | types.DocumentAttributeHasStickers | types.DocumentAttributeCustomEmoji; - type StickerPack = types.StickerPack; - type WebPage = types.WebPageEmpty | types.WebPagePending | types.WebPage | types.WebPageNotModified; - type Authorization = types.Authorization; - type ReceivedNotifyMessage = types.ReceivedNotifyMessage; - type ExportedChatInvite = types.ChatInviteExported | types.ChatInvitePublicJoinRequests; - type ChatInvite = types.ChatInviteAlready | types.ChatInvite | types.ChatInvitePeek; - type InputStickerSet = types.InputStickerSetEmpty | types.InputStickerSetID | types.InputStickerSetShortName | types.InputStickerSetAnimatedEmoji | types.InputStickerSetDice | types.InputStickerSetAnimatedEmojiAnimations | types.InputStickerSetPremiumGifts | types.InputStickerSetEmojiGenericAnimations | types.InputStickerSetEmojiDefaultStatuses | types.InputStickerSetEmojiDefaultTopicIcons | types.InputStickerSetEmojiChannelDefaultStatuses; - type StickerSet = types.StickerSet; - type BotCommand = types.BotCommand; - type BotInfo = types.BotInfo; - type KeyboardButton = types.KeyboardButton | types.KeyboardButtonUrl | types.KeyboardButtonCallback | types.KeyboardButtonRequestPhone | types.KeyboardButtonRequestGeoLocation | types.KeyboardButtonSwitchInline | types.KeyboardButtonGame | types.KeyboardButtonBuy | types.KeyboardButtonUrlAuth | types.InputKeyboardButtonUrlAuth | types.KeyboardButtonRequestPoll | types.InputKeyboardButtonUserProfile | types.KeyboardButtonUserProfile | types.KeyboardButtonWebView | types.KeyboardButtonSimpleWebView | types.KeyboardButtonRequestPeer | types.InputKeyboardButtonRequestPeer; - type KeyboardButtonRow = types.KeyboardButtonRow; - type ReplyMarkup = types.ReplyKeyboardHide | types.ReplyKeyboardForceReply | types.ReplyKeyboardMarkup | types.ReplyInlineMarkup; - type MessageEntity = types.MessageEntityUnknown | types.MessageEntityMention | types.MessageEntityHashtag | types.MessageEntityBotCommand | types.MessageEntityUrl | types.MessageEntityEmail | types.MessageEntityBold | types.MessageEntityItalic | types.MessageEntityCode | types.MessageEntityPre | types.MessageEntityTextUrl | types.MessageEntityMentionName | types.InputMessageEntityMentionName | types.MessageEntityPhone | types.MessageEntityCashtag | types.MessageEntityUnderline | types.MessageEntityStrike | types.MessageEntityBankCard | types.MessageEntitySpoiler | types.MessageEntityCustomEmoji | types.MessageEntityBlockquote; - type InputChannel = types.InputChannelEmpty | types.InputChannel | types.InputChannelFromMessage; - type MessageRange = types.MessageRange; - type ChannelMessagesFilter = types.ChannelMessagesFilterEmpty | types.ChannelMessagesFilter; - type ChannelParticipant = types.ChannelParticipant | types.ChannelParticipantSelf | types.ChannelParticipantCreator | types.ChannelParticipantAdmin | types.ChannelParticipantBanned | types.ChannelParticipantLeft; - type ChannelParticipantsFilter = types.ChannelParticipantsRecent | types.ChannelParticipantsAdmins | types.ChannelParticipantsKicked | types.ChannelParticipantsBots | types.ChannelParticipantsBanned | types.ChannelParticipantsSearch | types.ChannelParticipantsContacts | types.ChannelParticipantsMentions; - type InputBotInlineMessage = types.InputBotInlineMessageMediaAuto | types.InputBotInlineMessageText | types.InputBotInlineMessageMediaGeo | types.InputBotInlineMessageMediaVenue | types.InputBotInlineMessageMediaContact | types.InputBotInlineMessageGame | types.InputBotInlineMessageMediaInvoice | types.InputBotInlineMessageMediaWebPage; - type InputBotInlineResult = types.InputBotInlineResult | types.InputBotInlineResultPhoto | types.InputBotInlineResultDocument | types.InputBotInlineResultGame; - type BotInlineMessage = types.BotInlineMessageMediaAuto | types.BotInlineMessageText | types.BotInlineMessageMediaGeo | types.BotInlineMessageMediaVenue | types.BotInlineMessageMediaContact | types.BotInlineMessageMediaInvoice | types.BotInlineMessageMediaWebPage; - type BotInlineResult = types.BotInlineResult | types.BotInlineMediaResult; - type ExportedMessageLink = types.ExportedMessageLink; - type MessageFwdHeader = types.MessageFwdHeader; - type InputBotInlineMessageID = types.InputBotInlineMessageID | types.InputBotInlineMessageID64; - type InlineBotSwitchPM = types.InlineBotSwitchPM; - type TopPeer = types.TopPeer; - type TopPeerCategory = types.TopPeerCategoryBotsPM | types.TopPeerCategoryBotsInline | types.TopPeerCategoryCorrespondents | types.TopPeerCategoryGroups | types.TopPeerCategoryChannels | types.TopPeerCategoryPhoneCalls | types.TopPeerCategoryForwardUsers | types.TopPeerCategoryForwardChats; - type TopPeerCategoryPeers = types.TopPeerCategoryPeers; - type DraftMessage = types.DraftMessageEmpty | types.DraftMessage; - type StickerSetCovered = types.StickerSetCovered | types.StickerSetMultiCovered | types.StickerSetFullCovered | types.StickerSetNoCovered; - type MaskCoords = types.MaskCoords; - type InputStickeredMedia = types.InputStickeredMediaPhoto | types.InputStickeredMediaDocument; - type Game = types.Game; - type InputGame = types.InputGameID | types.InputGameShortName; - type HighScore = types.HighScore; - type RichText = types.TextEmpty | types.TextPlain | types.TextBold | types.TextItalic | types.TextUnderline | types.TextStrike | types.TextFixed | types.TextUrl | types.TextEmail | types.TextConcat | types.TextSubscript | types.TextSuperscript | types.TextMarked | types.TextPhone | types.TextImage | types.TextAnchor; - type PageBlock = types.PageBlockUnsupported | types.PageBlockTitle | types.PageBlockSubtitle | types.PageBlockAuthorDate | types.PageBlockHeader | types.PageBlockSubheader | types.PageBlockParagraph | types.PageBlockPreformatted | types.PageBlockFooter | types.PageBlockDivider | types.PageBlockAnchor | types.PageBlockList | types.PageBlockBlockquote | types.PageBlockPullquote | types.PageBlockPhoto | types.PageBlockVideo | types.PageBlockCover | types.PageBlockEmbed | types.PageBlockEmbedPost | types.PageBlockCollage | types.PageBlockSlideshow | types.PageBlockChannel | types.PageBlockAudio | types.PageBlockKicker | types.PageBlockTable | types.PageBlockOrderedList | types.PageBlockDetails | types.PageBlockRelatedArticles | types.PageBlockMap; - type PhoneCallDiscardReason = types.PhoneCallDiscardReasonMissed | types.PhoneCallDiscardReasonDisconnect | types.PhoneCallDiscardReasonHangup | types.PhoneCallDiscardReasonBusy; - type DataJSON = types.DataJSON; - type LabeledPrice = types.LabeledPrice; - type Invoice = types.Invoice; - type PaymentCharge = types.PaymentCharge; - type PostAddress = types.PostAddress; - type PaymentRequestedInfo = types.PaymentRequestedInfo; - type PaymentSavedCredentials = types.PaymentSavedCredentialsCard; - type WebDocument = types.WebDocument | types.WebDocumentNoProxy; - type InputWebDocument = types.InputWebDocument; - type InputWebFileLocation = types.InputWebFileLocation | types.InputWebFileGeoPointLocation | types.InputWebFileAudioAlbumThumbLocation; - type InputPaymentCredentials = types.InputPaymentCredentialsSaved | types.InputPaymentCredentials | types.InputPaymentCredentialsApplePay | types.InputPaymentCredentialsGooglePay; - type ShippingOption = types.ShippingOption; - type InputStickerSetItem = types.InputStickerSetItem; - type InputPhoneCall = types.InputPhoneCall; - type PhoneCall = types.PhoneCallEmpty | types.PhoneCallWaiting | types.PhoneCallRequested | types.PhoneCallAccepted | types.PhoneCall | types.PhoneCallDiscarded; - type PhoneConnection = types.PhoneConnection | types.PhoneConnectionWebrtc; - type PhoneCallProtocol = types.PhoneCallProtocol; - type CdnPublicKey = types.CdnPublicKey; - type CdnConfig = types.CdnConfig; - type LangPackString = types.LangPackString | types.LangPackStringPluralized | types.LangPackStringDeleted; - type LangPackDifference = types.LangPackDifference; - type LangPackLanguage = types.LangPackLanguage; - type ChannelAdminLogEventAction = types.ChannelAdminLogEventActionChangeTitle | types.ChannelAdminLogEventActionChangeAbout | types.ChannelAdminLogEventActionChangeUsername | types.ChannelAdminLogEventActionChangePhoto | types.ChannelAdminLogEventActionToggleInvites | types.ChannelAdminLogEventActionToggleSignatures | types.ChannelAdminLogEventActionUpdatePinned | types.ChannelAdminLogEventActionEditMessage | types.ChannelAdminLogEventActionDeleteMessage | types.ChannelAdminLogEventActionParticipantJoin | types.ChannelAdminLogEventActionParticipantLeave | types.ChannelAdminLogEventActionParticipantInvite | types.ChannelAdminLogEventActionParticipantToggleBan | types.ChannelAdminLogEventActionParticipantToggleAdmin | types.ChannelAdminLogEventActionChangeStickerSet | types.ChannelAdminLogEventActionTogglePreHistoryHidden | types.ChannelAdminLogEventActionDefaultBannedRights | types.ChannelAdminLogEventActionStopPoll | types.ChannelAdminLogEventActionChangeLinkedChat | types.ChannelAdminLogEventActionChangeLocation | types.ChannelAdminLogEventActionToggleSlowMode | types.ChannelAdminLogEventActionStartGroupCall | types.ChannelAdminLogEventActionDiscardGroupCall | types.ChannelAdminLogEventActionParticipantMute | types.ChannelAdminLogEventActionParticipantUnmute | types.ChannelAdminLogEventActionToggleGroupCallSetting | types.ChannelAdminLogEventActionParticipantJoinByInvite | types.ChannelAdminLogEventActionExportedInviteDelete | types.ChannelAdminLogEventActionExportedInviteRevoke | types.ChannelAdminLogEventActionExportedInviteEdit | types.ChannelAdminLogEventActionParticipantVolume | types.ChannelAdminLogEventActionChangeHistoryTTL | types.ChannelAdminLogEventActionParticipantJoinByRequest | types.ChannelAdminLogEventActionToggleNoForwards | types.ChannelAdminLogEventActionSendMessage | types.ChannelAdminLogEventActionChangeAvailableReactions | types.ChannelAdminLogEventActionChangeUsernames | types.ChannelAdminLogEventActionToggleForum | types.ChannelAdminLogEventActionCreateTopic | types.ChannelAdminLogEventActionEditTopic | types.ChannelAdminLogEventActionDeleteTopic | types.ChannelAdminLogEventActionPinTopic | types.ChannelAdminLogEventActionToggleAntiSpam | types.ChannelAdminLogEventActionChangePeerColor | types.ChannelAdminLogEventActionChangeProfilePeerColor | types.ChannelAdminLogEventActionChangeWallpaper | types.ChannelAdminLogEventActionChangeEmojiStatus | types.ChannelAdminLogEventActionChangeEmojiStickerSet; - type ChannelAdminLogEvent = types.ChannelAdminLogEvent; - type ChannelAdminLogEventsFilter = types.ChannelAdminLogEventsFilter; - type PopularContact = types.PopularContact; - type RecentMeUrl = types.RecentMeUrlUnknown | types.RecentMeUrlUser | types.RecentMeUrlChat | types.RecentMeUrlChatInvite | types.RecentMeUrlStickerSet; - type InputSingleMedia = types.InputSingleMedia; - type WebAuthorization = types.WebAuthorization; - type InputMessage = types.InputMessageID | types.InputMessageReplyTo | types.InputMessagePinned | types.InputMessageCallbackQuery; - type InputDialogPeer = types.InputDialogPeer | types.InputDialogPeerFolder; - type DialogPeer = types.DialogPeer | types.DialogPeerFolder; - type FileHash = types.FileHash; - type InputClientProxy = types.InputClientProxy; - type InputSecureFile = types.InputSecureFileUploaded | types.InputSecureFile; - type SecureFile = types.SecureFileEmpty | types.SecureFile; - type SecureData = types.SecureData; - type SecurePlainData = types.SecurePlainPhone | types.SecurePlainEmail; - type SecureValueType = types.SecureValueTypePersonalDetails | types.SecureValueTypePassport | types.SecureValueTypeDriverLicense | types.SecureValueTypeIdentityCard | types.SecureValueTypeInternalPassport | types.SecureValueTypeAddress | types.SecureValueTypeUtilityBill | types.SecureValueTypeBankStatement | types.SecureValueTypeRentalAgreement | types.SecureValueTypePassportRegistration | types.SecureValueTypeTemporaryRegistration | types.SecureValueTypePhone | types.SecureValueTypeEmail; - type SecureValue = types.SecureValue; - type InputSecureValue = types.InputSecureValue; - type SecureValueHash = types.SecureValueHash; - type SecureValueError = types.SecureValueErrorData | types.SecureValueErrorFrontSide | types.SecureValueErrorReverseSide | types.SecureValueErrorSelfie | types.SecureValueErrorFile | types.SecureValueErrorFiles | types.SecureValueError | types.SecureValueErrorTranslationFile | types.SecureValueErrorTranslationFiles; - type SecureCredentialsEncrypted = types.SecureCredentialsEncrypted; - type SavedContact = types.SavedPhoneContact; - type PasswordKdfAlgo = types.PasswordKdfAlgoUnknown | types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow; - type SecurePasswordKdfAlgo = types.SecurePasswordKdfAlgoUnknown | types.SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 | types.SecurePasswordKdfAlgoSHA512; - type SecureSecretSettings = types.SecureSecretSettings; - type InputCheckPasswordSRP = types.InputCheckPasswordEmpty | types.InputCheckPasswordSRP; - type SecureRequiredType = types.SecureRequiredType | types.SecureRequiredTypeOneOf; - type InputAppEvent = types.InputAppEvent; - type JSONObjectValue = types.JsonObjectValue; - type JSONValue = types.JsonNull | types.JsonBool | types.JsonNumber | types.JsonString | types.JsonArray | types.JsonObject; - type PageTableCell = types.PageTableCell; - type PageTableRow = types.PageTableRow; - type PageCaption = types.PageCaption; - type PageListItem = types.PageListItemText | types.PageListItemBlocks; - type PageListOrderedItem = types.PageListOrderedItemText | types.PageListOrderedItemBlocks; - type PageRelatedArticle = types.PageRelatedArticle; - type Page = types.Page; - type PollAnswer = types.PollAnswer; - type Poll = types.Poll; - type PollAnswerVoters = types.PollAnswerVoters; - type PollResults = types.PollResults; - type ChatOnlines = types.ChatOnlines; - type StatsURL = types.StatsURL; - type ChatAdminRights = types.ChatAdminRights; - type ChatBannedRights = types.ChatBannedRights; - type InputWallPaper = types.InputWallPaper | types.InputWallPaperSlug | types.InputWallPaperNoFile; - type CodeSettings = types.CodeSettings; - type WallPaperSettings = types.WallPaperSettings; - type AutoDownloadSettings = types.AutoDownloadSettings; - type EmojiKeyword = types.EmojiKeyword | types.EmojiKeywordDeleted; - type EmojiKeywordsDifference = types.EmojiKeywordsDifference; - type EmojiURL = types.EmojiURL; - type EmojiLanguage = types.EmojiLanguage; - type Folder = types.Folder; - type InputFolderPeer = types.InputFolderPeer; - type FolderPeer = types.FolderPeer; - type UrlAuthResult = types.UrlAuthResultRequest | types.UrlAuthResultAccepted | types.UrlAuthResultDefault; - type ChannelLocation = types.ChannelLocationEmpty | types.ChannelLocation; - type PeerLocated = types.PeerLocated | types.PeerSelfLocated; - type RestrictionReason = types.RestrictionReason; - type InputTheme = types.InputTheme | types.InputThemeSlug; - type Theme = types.Theme; - type BaseTheme = types.BaseThemeClassic | types.BaseThemeDay | types.BaseThemeNight | types.BaseThemeTinted | types.BaseThemeArctic; - type InputThemeSettings = types.InputThemeSettings; - type ThemeSettings = types.ThemeSettings; - type WebPageAttribute = types.WebPageAttributeTheme | types.WebPageAttributeStory; - type BankCardOpenUrl = types.BankCardOpenUrl; - type DialogFilter = types.DialogFilter | types.DialogFilterDefault | types.DialogFilterChatlist; - type DialogFilterSuggested = types.DialogFilterSuggested; - type StatsDateRangeDays = types.StatsDateRangeDays; - type StatsAbsValueAndPrev = types.StatsAbsValueAndPrev; - type StatsPercentValue = types.StatsPercentValue; - type StatsGraph = types.StatsGraphAsync | types.StatsGraphError | types.StatsGraph; - type VideoSize = types.VideoSize | types.VideoSizeEmojiMarkup | types.VideoSizeStickerMarkup; - type StatsGroupTopPoster = types.StatsGroupTopPoster; - type StatsGroupTopAdmin = types.StatsGroupTopAdmin; - type StatsGroupTopInviter = types.StatsGroupTopInviter; - type GlobalPrivacySettings = types.GlobalPrivacySettings; - type MessageViews = types.MessageViews; - type MessageReplyHeader = types.MessageReplyHeader | types.MessageReplyStoryHeader; - type MessageReplies = types.MessageReplies; - type PeerBlocked = types.PeerBlocked; - type GroupCall = types.GroupCallDiscarded | types.GroupCall; - type InputGroupCall = types.InputGroupCall; - type GroupCallParticipant = types.GroupCallParticipant; - type InlineQueryPeerType = types.InlineQueryPeerTypeSameBotPM | types.InlineQueryPeerTypePM | types.InlineQueryPeerTypeChat | types.InlineQueryPeerTypeMegagroup | types.InlineQueryPeerTypeBroadcast | types.InlineQueryPeerTypeBotPM; - type ChatInviteImporter = types.ChatInviteImporter; - type ChatAdminWithInvites = types.ChatAdminWithInvites; - type GroupCallParticipantVideoSourceGroup = types.GroupCallParticipantVideoSourceGroup; - type GroupCallParticipantVideo = types.GroupCallParticipantVideo; - type BotCommandScope = types.BotCommandScopeDefault | types.BotCommandScopeUsers | types.BotCommandScopeChats | types.BotCommandScopeChatAdmins | types.BotCommandScopePeer | types.BotCommandScopePeerAdmins | types.BotCommandScopePeerUser; - type SponsoredMessage = types.SponsoredMessage; - type SearchResultsCalendarPeriod = types.SearchResultsCalendarPeriod; - type SearchResultsPosition = types.SearchResultPosition; - type ReactionCount = types.ReactionCount; - type MessageReactions = types.MessageReactions; - type AvailableReaction = types.AvailableReaction; - type MessagePeerReaction = types.MessagePeerReaction; - type GroupCallStreamChannel = types.GroupCallStreamChannel; - type AttachMenuBotIconColor = types.AttachMenuBotIconColor; - type AttachMenuBotIcon = types.AttachMenuBotIcon; - type AttachMenuBot = types.AttachMenuBot; - type AttachMenuBots = types.AttachMenuBotsNotModified | types.AttachMenuBots; - type AttachMenuBotsBot = types.AttachMenuBotsBot; - type WebViewResult = types.WebViewResultUrl; - type SimpleWebViewResult = types.SimpleWebViewResultUrl; - type WebViewMessageSent = types.WebViewMessageSent; - type BotMenuButton = types.BotMenuButtonDefault | types.BotMenuButtonCommands | types.BotMenuButton; - type NotificationSound = types.NotificationSoundDefault | types.NotificationSoundNone | types.NotificationSoundLocal | types.NotificationSoundRingtone; - type AttachMenuPeerType = types.AttachMenuPeerTypeSameBotPM | types.AttachMenuPeerTypeBotPM | types.AttachMenuPeerTypePM | types.AttachMenuPeerTypeChat | types.AttachMenuPeerTypeBroadcast; - type InputInvoice = types.InputInvoiceMessage | types.InputInvoiceSlug | types.InputInvoicePremiumGiftCode; - type InputStorePaymentPurpose = types.InputStorePaymentPremiumSubscription | types.InputStorePaymentGiftPremium | types.InputStorePaymentPremiumGiftCode | types.InputStorePaymentPremiumGiveaway; - type PremiumGiftOption = types.PremiumGiftOption; - type PaymentFormMethod = types.PaymentFormMethod; - type EmojiStatus = types.EmojiStatusEmpty | types.EmojiStatus | types.EmojiStatusUntil; - type Reaction = types.ReactionEmpty | types.ReactionEmoji | types.ReactionCustomEmoji; - type ChatReactions = types.ChatReactionsNone | types.ChatReactionsAll | types.ChatReactionsSome; - type EmailVerifyPurpose = types.EmailVerifyPurposeLoginSetup | types.EmailVerifyPurposeLoginChange | types.EmailVerifyPurposePassport; - type EmailVerification = types.EmailVerificationCode | types.EmailVerificationGoogle | types.EmailVerificationApple; - type PremiumSubscriptionOption = types.PremiumSubscriptionOption; - type SendAsPeer = types.SendAsPeer; - type MessageExtendedMedia = types.MessageExtendedMediaPreview | types.MessageExtendedMedia; - type StickerKeyword = types.StickerKeyword; - type Username = types.Username; - type ForumTopic = types.ForumTopicDeleted | types.ForumTopic; - type DefaultHistoryTTL = types.DefaultHistoryTTL; - type ExportedContactToken = types.ExportedContactToken; - type RequestPeerType = types.RequestPeerTypeUser | types.RequestPeerTypeChat | types.RequestPeerTypeBroadcast; - type EmojiList = types.EmojiListNotModified | types.EmojiList; - type EmojiGroup = types.EmojiGroup; - type TextWithEntities = types.TextWithEntities; - type AutoSaveSettings = types.AutoSaveSettings; - type AutoSaveException = types.AutoSaveException; - type InputBotApp = types.InputBotAppID | types.InputBotAppShortName; - type BotApp = types.BotAppNotModified | types.BotApp; - type AppWebViewResult = types.AppWebViewResultUrl; - type InlineBotWebView = types.InlineBotWebView; - type ReadParticipantDate = types.ReadParticipantDate; - type InputChatlist = types.InputChatlistDialogFilter; - type ExportedChatlistInvite = types.ExportedChatlistInvite; - type MessagePeerVote = types.MessagePeerVote | types.MessagePeerVoteInputOption | types.MessagePeerVoteMultiple; - type SponsoredWebPage = types.SponsoredWebPage; - type StoryViews = types.StoryViews; - type StoryItem = types.StoryItemDeleted | types.StoryItemSkipped | types.StoryItem; - type StoryView = types.StoryView | types.StoryViewPublicForward | types.StoryViewPublicRepost; - type InputReplyTo = types.InputReplyToMessage | types.InputReplyToStory; - type ExportedStoryLink = types.ExportedStoryLink; - type StoriesStealthMode = types.StoriesStealthMode; - type MediaAreaCoordinates = types.MediaAreaCoordinates; - type MediaArea = types.MediaAreaVenue | types.InputMediaAreaVenue | types.MediaAreaGeoPoint | types.MediaAreaSuggestedReaction | types.MediaAreaChannelPost | types.InputMediaAreaChannelPost; - type PeerStories = types.PeerStories; - type PremiumGiftCodeOption = types.PremiumGiftCodeOption; - type PrepaidGiveaway = types.PrepaidGiveaway; - type Boost = types.Boost; - type MyBoost = types.MyBoost; - type StoryFwdHeader = types.StoryFwdHeader; - type PostInteractionCounters = types.PostInteractionCountersMessage | types.PostInteractionCountersStory; - type PublicForward = types.PublicForwardMessage | types.PublicForwardStory; - type PeerColor = types.PeerColor; - type StoryReaction = types.StoryReaction | types.StoryReactionPublicForward | types.StoryReactionPublicRepost; - type SavedDialog = types.SavedDialog; - type SavedReactionTag = types.SavedReactionTag; - type OutboxReadDate = types.OutboxReadDate; - type SmsJob = types.SmsJob; - type BusinessWeeklyOpen = types.BusinessWeeklyOpen; - type BusinessWorkHours = types.BusinessWorkHours; - type BusinessLocation = types.BusinessLocation; - type InputBusinessRecipients = types.InputBusinessRecipients; - type BusinessRecipients = types.BusinessRecipients; - type BusinessAwayMessageSchedule = types.BusinessAwayMessageScheduleAlways | types.BusinessAwayMessageScheduleOutsideWorkHours | types.BusinessAwayMessageScheduleCustom; - type InputBusinessGreetingMessage = types.InputBusinessGreetingMessage; - type BusinessGreetingMessage = types.BusinessGreetingMessage; - type InputBusinessAwayMessage = types.InputBusinessAwayMessage; - type BusinessAwayMessage = types.BusinessAwayMessage; - type Timezone = types.Timezone; - type QuickReply = types.QuickReply; - type InputQuickReplyShortcut = types.InputQuickReplyShortcut | types.InputQuickReplyShortcutId; - type ConnectedBot = types.ConnectedBot; - type Birthday = types.Birthday; - type BotBusinessConnection = types.BotBusinessConnection; - type InputBusinessIntro = types.InputBusinessIntro; - type BusinessIntro = types.BusinessIntro; - type InputCollectible = types.InputCollectibleUsername | types.InputCollectiblePhone; - type InputBusinessBotRecipients = types.InputBusinessBotRecipients; - type BusinessBotRecipients = types.BusinessBotRecipients; - type ContactBirthday = types.ContactBirthday; - type MissingInvitee = types.MissingInvitee; - type InputBusinessChatLink = types.InputBusinessChatLink; - type BusinessChatLink = types.BusinessChatLink; - type RequestedPeer = types.RequestedPeerUser | types.RequestedPeerChat | types.RequestedPeerChannel; - type SponsoredMessageReportOption = types.SponsoredMessageReportOption; - type BroadcastRevenueTransaction = types.BroadcastRevenueTransactionProceeds | types.BroadcastRevenueTransactionWithdrawal | types.BroadcastRevenueTransactionRefund; - namespace help { - type ConfigSimple = types.help.ConfigSimple; - type AppUpdate = types.help.AppUpdate | types.help.NoAppUpdate; - type InviteText = types.help.InviteText; - type Support = types.help.Support; - type TermsOfService = types.help.TermsOfService; - type RecentMeUrls = types.help.RecentMeUrls; - type TermsOfServiceUpdate = types.help.TermsOfServiceUpdateEmpty | types.help.TermsOfServiceUpdate; - type DeepLinkInfo = types.help.DeepLinkInfoEmpty | types.help.DeepLinkInfo; - type PassportConfig = types.help.PassportConfigNotModified | types.help.PassportConfig; - type SupportName = types.help.SupportName; - type UserInfo = types.help.UserInfoEmpty | types.help.UserInfo; - type PromoData = types.help.PromoDataEmpty | types.help.PromoData; - type CountryCode = types.help.CountryCode; - type Country = types.help.Country; - type CountriesList = types.help.CountriesListNotModified | types.help.CountriesList; - type PremiumPromo = types.help.PremiumPromo; - type AppConfig = types.help.AppConfigNotModified | types.help.AppConfig; - type PeerColorSet = types.help.PeerColorSet | types.help.PeerColorProfileSet; - type PeerColorOption = types.help.PeerColorOption; - type PeerColors = types.help.PeerColorsNotModified | types.help.PeerColors; - type TimezonesList = types.help.TimezonesListNotModified | types.help.TimezonesList; - } - namespace storage { - type FileType = types.storage.FileUnknown | types.storage.FilePartial | types.storage.FileJpeg | types.storage.FileGif | types.storage.FilePng | types.storage.FilePdf | types.storage.FileMp3 | types.storage.FileMov | types.storage.FileMp4 | types.storage.FileWebp; - } - namespace auth { - type SentCode = types.auth.SentCode | types.auth.SentCodeSuccess; - type Authorization = types.auth.Authorization | types.auth.AuthorizationSignUpRequired; - type ExportedAuthorization = types.auth.ExportedAuthorization; - type PasswordRecovery = types.auth.PasswordRecovery; - type CodeType = types.auth.CodeTypeSms | types.auth.CodeTypeCall | types.auth.CodeTypeFlashCall | types.auth.CodeTypeMissedCall | types.auth.CodeTypeFragmentSms; - type SentCodeType = types.auth.SentCodeTypeApp | types.auth.SentCodeTypeSms | types.auth.SentCodeTypeCall | types.auth.SentCodeTypeFlashCall | types.auth.SentCodeTypeMissedCall | types.auth.SentCodeTypeEmailCode | types.auth.SentCodeTypeSetUpEmailRequired | types.auth.SentCodeTypeFragmentSms | types.auth.SentCodeTypeFirebaseSms; - type LoginToken = types.auth.LoginToken | types.auth.LoginTokenMigrateTo | types.auth.LoginTokenSuccess; - type LoggedOut = types.auth.LoggedOut; - } - namespace contacts { - type Contacts = types.contacts.ContactsNotModified | types.contacts.Contacts; - type ImportedContacts = types.contacts.ImportedContacts; - type Blocked = types.contacts.Blocked | types.contacts.BlockedSlice; - type Found = types.contacts.Found; - type ResolvedPeer = types.contacts.ResolvedPeer; - type TopPeers = types.contacts.TopPeersNotModified | types.contacts.TopPeers | types.contacts.TopPeersDisabled; - type ContactBirthdays = types.contacts.ContactBirthdays; - } - namespace messages { - type Dialogs = types.messages.Dialogs | types.messages.DialogsSlice | types.messages.DialogsNotModified; - type Messages = types.messages.Messages | types.messages.MessagesSlice | types.messages.ChannelMessages | types.messages.MessagesNotModified; - type Chats = types.messages.Chats | types.messages.ChatsSlice; - type ChatFull = types.messages.ChatFull; - type AffectedHistory = types.messages.AffectedHistory; - type DhConfig = types.messages.DhConfigNotModified | types.messages.DhConfig; - type SentEncryptedMessage = types.messages.SentEncryptedMessage | types.messages.SentEncryptedFile; - type Stickers = types.messages.StickersNotModified | types.messages.Stickers; - type AllStickers = types.messages.AllStickersNotModified | types.messages.AllStickers; - type AffectedMessages = types.messages.AffectedMessages; - type StickerSet = types.messages.StickerSet | types.messages.StickerSetNotModified; - type SavedGifs = types.messages.SavedGifsNotModified | types.messages.SavedGifs; - type BotResults = types.messages.BotResults; - type BotCallbackAnswer = types.messages.BotCallbackAnswer; - type MessageEditData = types.messages.MessageEditData; - type PeerDialogs = types.messages.PeerDialogs; - type FeaturedStickers = types.messages.FeaturedStickersNotModified | types.messages.FeaturedStickers; - type RecentStickers = types.messages.RecentStickersNotModified | types.messages.RecentStickers; - type ArchivedStickers = types.messages.ArchivedStickers; - type StickerSetInstallResult = types.messages.StickerSetInstallResultSuccess | types.messages.StickerSetInstallResultArchive; - type HighScores = types.messages.HighScores; - type FavedStickers = types.messages.FavedStickersNotModified | types.messages.FavedStickers; - type FoundStickerSets = types.messages.FoundStickerSetsNotModified | types.messages.FoundStickerSets; - type SearchCounter = types.messages.SearchCounter; - type InactiveChats = types.messages.InactiveChats; - type VotesList = types.messages.VotesList; - type MessageViews = types.messages.MessageViews; - type DiscussionMessage = types.messages.DiscussionMessage; - type HistoryImport = types.messages.HistoryImport; - type HistoryImportParsed = types.messages.HistoryImportParsed; - type AffectedFoundMessages = types.messages.AffectedFoundMessages; - type ExportedChatInvites = types.messages.ExportedChatInvites; - type ExportedChatInvite = types.messages.ExportedChatInvite | types.messages.ExportedChatInviteReplaced; - type ChatInviteImporters = types.messages.ChatInviteImporters; - type ChatAdminsWithInvites = types.messages.ChatAdminsWithInvites; - type CheckedHistoryImportPeer = types.messages.CheckedHistoryImportPeer; - type SponsoredMessages = types.messages.SponsoredMessages | types.messages.SponsoredMessagesEmpty; - type SearchResultsCalendar = types.messages.SearchResultsCalendar; - type SearchResultsPositions = types.messages.SearchResultsPositions; - type PeerSettings = types.messages.PeerSettings; - type MessageReactionsList = types.messages.MessageReactionsList; - type AvailableReactions = types.messages.AvailableReactionsNotModified | types.messages.AvailableReactions; - type TranscribedAudio = types.messages.TranscribedAudio; - type Reactions = types.messages.ReactionsNotModified | types.messages.Reactions; - type ForumTopics = types.messages.ForumTopics; - type EmojiGroups = types.messages.EmojiGroupsNotModified | types.messages.EmojiGroups; - type TranslatedText = types.messages.TranslateResult; - type BotApp = types.messages.BotApp; - type WebPage = types.messages.WebPage; - type SavedDialogs = types.messages.SavedDialogs | types.messages.SavedDialogsSlice | types.messages.SavedDialogsNotModified; - type SavedReactionTags = types.messages.SavedReactionTagsNotModified | types.messages.SavedReactionTags; - type QuickReplies = types.messages.QuickReplies | types.messages.QuickRepliesNotModified; - type DialogFilters = types.messages.DialogFilters; - type MyStickers = types.messages.MyStickers; - type InvitedUsers = types.messages.InvitedUsers; - } - namespace updates { - type State = types.updates.State; - type Difference = types.updates.DifferenceEmpty | types.updates.Difference | types.updates.DifferenceSlice | types.updates.DifferenceTooLong; - type ChannelDifference = types.updates.ChannelDifferenceEmpty | types.updates.ChannelDifferenceTooLong | types.updates.ChannelDifference; - } - namespace photos { - type Photos = types.photos.Photos | types.photos.PhotosSlice; - type Photo = types.photos.Photo; - } - namespace upload { - type File = types.upload.File | types.upload.FileCdnRedirect; - type WebFile = types.upload.WebFile; - type CdnFile = types.upload.CdnFileReuploadNeeded | types.upload.CdnFile; - } - namespace account { - type PrivacyRules = types.account.PrivacyRules; - type Authorizations = types.account.Authorizations; - type Password = types.account.Password; - type PasswordSettings = types.account.PasswordSettings; - type PasswordInputSettings = types.account.PasswordInputSettings; - type TmpPassword = types.account.TmpPassword; - type WebAuthorizations = types.account.WebAuthorizations; - type AuthorizationForm = types.account.AuthorizationForm; - type SentEmailCode = types.account.SentEmailCode; - type Takeout = types.account.Takeout; - type WallPapers = types.account.WallPapersNotModified | types.account.WallPapers; - type AutoDownloadSettings = types.account.AutoDownloadSettings; - type Themes = types.account.ThemesNotModified | types.account.Themes; - type ContentSettings = types.account.ContentSettings; - type ResetPasswordResult = types.account.ResetPasswordFailedWait | types.account.ResetPasswordRequestedWait | types.account.ResetPasswordOk; - type SavedRingtones = types.account.SavedRingtonesNotModified | types.account.SavedRingtones; - type SavedRingtone = types.account.SavedRingtone | types.account.SavedRingtoneConverted; - type EmojiStatuses = types.account.EmojiStatusesNotModified | types.account.EmojiStatuses; - type EmailVerified = types.account.EmailVerified | types.account.EmailVerifiedLogin; - type AutoSaveSettings = types.account.AutoSaveSettings; - type ConnectedBots = types.account.ConnectedBots; - type BusinessChatLinks = types.account.BusinessChatLinks; - type ResolvedBusinessChatLinks = types.account.ResolvedBusinessChatLinks; - } - namespace channels { - type ChannelParticipants = types.channels.ChannelParticipants | types.channels.ChannelParticipantsNotModified; - type ChannelParticipant = types.channels.ChannelParticipant; - type AdminLogResults = types.channels.AdminLogResults; - type SendAsPeers = types.channels.SendAsPeers; - type SponsoredMessageReportResult = types.channels.SponsoredMessageReportResultChooseOption | types.channels.SponsoredMessageReportResultAdsHidden | types.channels.SponsoredMessageReportResultReported; - } - namespace payments { - type PaymentForm = types.payments.PaymentForm; - type ValidatedRequestedInfo = types.payments.ValidatedRequestedInfo; - type PaymentResult = types.payments.PaymentResult | types.payments.PaymentVerificationNeeded; - type PaymentReceipt = types.payments.PaymentReceipt; - type SavedInfo = types.payments.SavedInfo; - type BankCardData = types.payments.BankCardData; - type ExportedInvoice = types.payments.ExportedInvoice; - type CheckedGiftCode = types.payments.CheckedGiftCode; - type GiveawayInfo = types.payments.GiveawayInfo | types.payments.GiveawayInfoResults; - } - namespace phone { - type PhoneCall = types.phone.PhoneCall; - type GroupCall = types.phone.GroupCall; - type GroupParticipants = types.phone.GroupParticipants; - type JoinAsPeers = types.phone.JoinAsPeers; - type ExportedGroupCallInvite = types.phone.ExportedGroupCallInvite; - type GroupCallStreamChannels = types.phone.GroupCallStreamChannels; - type GroupCallStreamRtmpUrl = types.phone.GroupCallStreamRtmpUrl; - } - namespace stats { - type BroadcastStats = types.stats.BroadcastStats; - type MegagroupStats = types.stats.MegagroupStats; - type MessageStats = types.stats.MessageStats; - type StoryStats = types.stats.StoryStats; - type PublicForwards = types.stats.PublicForwards; - type BroadcastRevenueStats = types.stats.BroadcastRevenueStats; - type BroadcastRevenueWithdrawalUrl = types.stats.BroadcastRevenueWithdrawalUrl; - type BroadcastRevenueTransactions = types.stats.BroadcastRevenueTransactions; - } - namespace stickers { - type SuggestedShortName = types.stickers.SuggestedShortName; - } - namespace users { - type UserFull = types.users.UserFull; - } - namespace chatlists { - type ExportedChatlistInvite = types.chatlists.ExportedChatlistInvite; - type ExportedInvites = types.chatlists.ExportedInvites; - type ChatlistInvite = types.chatlists.ChatlistInviteAlready | types.chatlists.ChatlistInvite; - type ChatlistUpdates = types.chatlists.ChatlistUpdates; - } - namespace bots { - type BotInfo = types.bots.BotInfo; - } - namespace stories { - type AllStories = types.stories.AllStoriesNotModified | types.stories.AllStories; - type Stories = types.stories.Stories; - type StoryViewsList = types.stories.StoryViewsList; - type StoryViews = types.stories.StoryViews; - type PeerStories = types.stories.PeerStories; - type StoryReactionsList = types.stories.StoryReactionsList; - } - namespace premium { - type BoostsList = types.premium.BoostsList; - type MyBoosts = types.premium.MyBoosts; - type BoostsStatus = types.premium.BoostsStatus; - } - namespace smsjobs { - type EligibilityToJoin = types.smsjobs.EligibleToJoin; - type Status = types.smsjobs.Status; - } - namespace fragment { - type CollectibleInfo = types.fragment.CollectibleInfo; - } -} diff --git a/tl/2_types_test.ts b/tl/2_types_test.ts deleted file mode 100644 index fbac79a0..00000000 --- a/tl/2_types_test.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import { assert } from "../0_deps.ts"; -import { TLObject } from "./1_tl_object.ts"; -import { types } from "./2_types.ts"; - -Deno.test("instanceof", () => { - const bold = new types.MessageEntityBold({ offset: 0, length: 1 }); - assert(bold instanceof TLObject); - assert(bold instanceof types.Type); - assert(bold instanceof types._MessageEntity); -}); diff --git a/tl/3_deserialize_test.ts b/tl/3_deserialize_test.ts index 9a827b6e..e1f47a80 100644 --- a/tl/3_deserialize_test.ts +++ b/tl/3_deserialize_test.ts @@ -18,11 +18,11 @@ * along with this program. If not, see . */ -import { assertEquals, assertInstanceOf } from "../0_deps.ts"; +import { assertEquals } from "../0_deps.ts"; import { TLRawReader } from "./0_tl_raw_reader.ts"; -import { paramDesc, serialize } from "./1_tl_object.ts"; -import { map, types } from "./2_types.ts"; -import { deserialize } from "./3_deserialize.ts"; +import { serialize } from "./2_serialize.ts"; +import { getType, getTypeName } from "./0_api.ts"; +import { deserialize } from "./2_deserialize.ts"; Deno.test("deserialize", () => { // deno-fmt-ignore @@ -93,10 +93,10 @@ Deno.test("deserialize", () => { const reader = new TLRawReader(buffer); const constructorId = reader.readInt32(false); - const constructor = map.get(constructorId)!; + const constructor = getTypeName(constructorId)!; - const config = deserialize(reader, constructor[paramDesc], constructor); + const config = deserialize(reader, getType(constructor)![1], constructor); - assertEquals(config[serialize](), buffer); - assertInstanceOf(config, types.Config); + assertEquals(serialize(config), buffer); + assertEquals(config._, "config"); }); diff --git a/tl/3_functions.ts b/tl/3_functions.ts deleted file mode 100644 index cd6575f7..00000000 --- a/tl/3_functions.ts +++ /dev/null @@ -1,25957 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -// deno-fmt-ignore-file -import { id, params, TLObject, Params, paramDesc, ParamDesc, flags, name } from "./1_tl_object.ts"; -import { types, enums } from "./2_types.ts"; - -export abstract class Function_ extends TLObject { - __R!: T; -} - -export class req_pq_multi_ extends Function_ { - static __F: (params: { nonce: bigint }) => enums.ResPQ; - nonce: bigint; - - protected get [id](): number { - return 0xBE7E8EF1; - } - - static get [name](): string { - return "req_pq_multi" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - ]; - } - - constructor(params: { nonce: bigint }) { - super(); - this.nonce = params.nonce; - } -} - -export class req_DH_params_ extends Function_ { - static __F: (params: { nonce: bigint; server_nonce: bigint; p: Uint8Array; q: Uint8Array; public_key_fingerprint: bigint; encrypted_data: Uint8Array }) => enums.Server_DH_Params; - nonce: bigint; - server_nonce: bigint; - p: Uint8Array; - q: Uint8Array; - public_key_fingerprint: bigint; - encrypted_data: Uint8Array; - - protected get [id](): number { - return 0xD712E4BE; - } - - static get [name](): string { - return "req_DH_params" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["p", Uint8Array, "bytes"], - ["q", Uint8Array, "bytes"], - ["public_key_fingerprint", "bigint", "long"], - ["encrypted_data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.p, Uint8Array, "bytes"], - [this.q, Uint8Array, "bytes"], - [this.public_key_fingerprint, "bigint", "long"], - [this.encrypted_data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; p: Uint8Array; q: Uint8Array; public_key_fingerprint: bigint; encrypted_data: Uint8Array }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.p = params.p; - this.q = params.q; - this.public_key_fingerprint = params.public_key_fingerprint; - this.encrypted_data = params.encrypted_data; - } -} - -export class set_client_DH_params_ extends Function_ { - static __F: (params: { nonce: bigint; server_nonce: bigint; encrypted_data: Uint8Array }) => enums.Set_client_DH_params_answer; - nonce: bigint; - server_nonce: bigint; - encrypted_data: Uint8Array; - - protected get [id](): number { - return 0xF5045F1F; - } - - static get [name](): string { - return "set_client_DH_params" - } - - static get [paramDesc](): ParamDesc { - return [ - ["nonce", "bigint", "int128"], - ["server_nonce", "bigint", "int128"], - ["encrypted_data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.nonce, "bigint", "int128"], - [this.server_nonce, "bigint", "int128"], - [this.encrypted_data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { nonce: bigint; server_nonce: bigint; encrypted_data: Uint8Array }) { - super(); - this.nonce = params.nonce; - this.server_nonce = params.server_nonce; - this.encrypted_data = params.encrypted_data; - } -} - -export class rpc_drop_answer_ extends Function_ { - static __F: (params: { req_msg_id: bigint }) => enums.RpcDropAnswer; - req_msg_id: bigint; - - protected get [id](): number { - return 0x58E4A740; - } - - static get [name](): string { - return "rpc_drop_answer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["req_msg_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.req_msg_id, "bigint", "long"], - ]; - } - - constructor(params: { req_msg_id: bigint }) { - super(); - this.req_msg_id = params.req_msg_id; - } -} - -export class get_future_salts_ extends Function_ { - static __F: (params: { num: number }) => enums.FutureSalts; - num: number; - - protected get [id](): number { - return 0xB921BD04; - } - - static get [name](): string { - return "get_future_salts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["num", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.num, "number", "int"], - ]; - } - - constructor(params: { num: number }) { - super(); - this.num = params.num; - } -} - -export class ping_ extends Function_ { - static __F: (params: { ping_id: bigint }) => enums.Pong; - ping_id: bigint; - - protected get [id](): number { - return 0x7ABE77EC; - } - - static get [name](): string { - return "ping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["ping_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.ping_id, "bigint", "long"], - ]; - } - - constructor(params: { ping_id: bigint }) { - super(); - this.ping_id = params.ping_id; - } -} - -export class ping_delay_disconnect_ extends Function_ { - static __F: (params: { ping_id: bigint; disconnect_delay: number }) => enums.Pong; - ping_id: bigint; - disconnect_delay: number; - - protected get [id](): number { - return 0xF3427B8C; - } - - static get [name](): string { - return "ping_delay_disconnect" - } - - static get [paramDesc](): ParamDesc { - return [ - ["ping_id", "bigint", "long"], - ["disconnect_delay", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.ping_id, "bigint", "long"], - [this.disconnect_delay, "number", "int"], - ]; - } - - constructor(params: { ping_id: bigint; disconnect_delay: number }) { - super(); - this.ping_id = params.ping_id; - this.disconnect_delay = params.disconnect_delay; - } -} - -export class destroy_session_ extends Function_ { - static __F: (params: { session_id: bigint }) => enums.DestroySessionRes; - session_id: bigint; - - protected get [id](): number { - return 0xE7512126; - } - - static get [name](): string { - return "destroy_session" - } - - static get [paramDesc](): ParamDesc { - return [ - ["session_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.session_id, "bigint", "long"], - ]; - } - - constructor(params: { session_id: bigint }) { - super(); - this.session_id = params.session_id; - } -} - -export class destroy_auth_key_ extends Function_ { - static __F: () => enums.DestroyAuthKeyRes; - protected get [id](): number { - return 0xD1435160; - } - - static get [name](): string { - return "destroy_auth_key" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class invokeWithBusinessConnectionPrefix_ extends Function_ { - static __F: (params: { connection_id: string }) => enums.Error; - connection_id: string; - - protected get [id](): number { - return 0xDD289F8E; - } - - static get [name](): string { - return "invokeWithBusinessConnectionPrefix" - } - - static get [paramDesc](): ParamDesc { - return [ - ["connection_id", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.connection_id, "string", "string"], - ]; - } - - constructor(params: { connection_id: string }) { - super(); - this.connection_id = params.connection_id; - } -} - -/** Invokes a query after successful completion of one of the previous queries. */ -export class invokeAfterMsg_> extends Function_ { - static __F: >(params: { msg_id: bigint; query: T }) => T["__R"]; - /** Message identifier on which a current query depends */ - msg_id: bigint; - /** The query itself */ - query: T; - - protected get [id](): number { - return 0xCB9F372D; - } - - static get [name](): string { - return "invokeAfterMsg" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_id", "bigint", "long"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_id, "bigint", "long"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { msg_id: bigint; query: T }) { - super(); - this.msg_id = params.msg_id; - this.query = params.query; - } -} - -/** Invokes a query after a successful completion of previous queries */ -export class invokeAfterMsgs_> extends Function_ { - static __F: >(params: { msg_ids: Array; query: T }) => T["__R"]; - /** List of messages on which a current query depends */ - msg_ids: Array; - /** The query itself */ - query: T; - - protected get [id](): number { - return 0x3DC4B4F0; - } - - static get [name](): string { - return "invokeAfterMsgs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["msg_ids", ["bigint"], "Vector"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.msg_ids, ["bigint"], "Vector"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { msg_ids: Array; query: T }) { - super(); - this.msg_ids = params.msg_ids; - this.query = params.query; - } -} - -/** Initialize connection */ -export class initConnection_> extends Function_ { - static __F: >(params: { api_id: number; device_model: string; system_version: string; app_version: string; system_lang_code: string; lang_pack: string; lang_code: string; proxy?: enums.InputClientProxy; params?: enums.JSONValue; query: T }) => T["__R"]; - /** Application identifier (see. [App configuration](https://core.telegram.org/myapp)) */ - api_id: number; - /** Device model */ - device_model: string; - /** Operation system version */ - system_version: string; - /** Application version */ - app_version: string; - /** Code for the language used on the device's OS, ISO 639-1 standard */ - system_lang_code: string; - /** Language pack to use */ - lang_pack: string; - /** Code for the language used on the client, ISO 639-1 standard */ - lang_code: string; - /** Info about an MTProto proxy */ - proxy?: enums.InputClientProxy; - /** Additional initConnection parameters. - For now, only the `tz_offset` field is supported, for specifying timezone offset in seconds. */ - params?: enums.JSONValue; - /** The query itself */ - query: T; - - protected get [id](): number { - return 0xC1CD5EA9; - } - - static get [name](): string { - return "initConnection" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["api_id", "number", "int"], - ["device_model", "string", "string"], - ["system_version", "string", "string"], - ["app_version", "string", "string"], - ["system_lang_code", "string", "string"], - ["lang_pack", "string", "string"], - ["lang_code", "string", "string"], - ["proxy", types._InputClientProxy, "flags.0?InputClientProxy"], - ["params", types._JSONValue, "flags.1?JSONValue"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.api_id, "number", "int"], - [this.device_model, "string", "string"], - [this.system_version, "string", "string"], - [this.app_version, "string", "string"], - [this.system_lang_code, "string", "string"], - [this.lang_pack, "string", "string"], - [this.lang_code, "string", "string"], - [this.proxy ?? null, types._InputClientProxy, "flags.0?InputClientProxy"], - [this.params ?? null, types._JSONValue, "flags.1?JSONValue"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { api_id: number; device_model: string; system_version: string; app_version: string; system_lang_code: string; lang_pack: string; lang_code: string; proxy?: enums.InputClientProxy; params?: enums.JSONValue; query: T }) { - super(); - this.api_id = params.api_id; - this.device_model = params.device_model; - this.system_version = params.system_version; - this.app_version = params.app_version; - this.system_lang_code = params.system_lang_code; - this.lang_pack = params.lang_pack; - this.lang_code = params.lang_code; - this.proxy = params.proxy; - this.params = params.params; - this.query = params.query; - } -} - -/** Invoke the specified query using the specified API [layer](https://core.telegram.org/api/invoking#layers) */ -export class invokeWithLayer_> extends Function_ { - static __F: >(params: { layer: number; query: T }) => T["__R"]; - /** The layer to use */ - layer: number; - /** The query */ - query: T; - - protected get [id](): number { - return 0xDA9B0D0D; - } - - static get [name](): string { - return "invokeWithLayer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["layer", "number", "int"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.layer, "number", "int"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { layer: number; query: T }) { - super(); - this.layer = params.layer; - this.query = params.query; - } -} - -/** Invoke a request without subscribing the used connection for [updates](https://core.telegram.org/api/updates) (this is enabled by default for [file queries](https://core.telegram.org/api/files)). */ -export class invokeWithoutUpdates_> extends Function_ { - static __F: >(params: { query: T }) => T["__R"]; - /** The query */ - query: T; - - protected get [id](): number { - return 0xBF9459B7; - } - - static get [name](): string { - return "invokeWithoutUpdates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { query: T }) { - super(); - this.query = params.query; - } -} - -/** Invoke with the given message range */ -export class invokeWithMessagesRange_> extends Function_ { - static __F: >(params: { range: enums.MessageRange; query: T }) => T["__R"]; - /** Message range */ - range: enums.MessageRange; - /** Query */ - query: T; - - protected get [id](): number { - return 0x365275F2; - } - - static get [name](): string { - return "invokeWithMessagesRange" - } - - static get [paramDesc](): ParamDesc { - return [ - ["range", types._MessageRange, "MessageRange"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.range, types._MessageRange, "MessageRange"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { range: enums.MessageRange; query: T }) { - super(); - this.range = params.range; - this.query = params.query; - } -} - -/** Invoke a method within a [takeout session, see here » for more info](https://core.telegram.org/api/takeout). */ -export class invokeWithTakeout_> extends Function_ { - static __F: >(params: { takeout_id: bigint; query: T }) => T["__R"]; - /** [Takeout session ID »](https://core.telegram.org/api/takeout) */ - takeout_id: bigint; - /** Query */ - query: T; - - protected get [id](): number { - return 0xACA9FD2E; - } - - static get [name](): string { - return "invokeWithTakeout" - } - - static get [paramDesc](): ParamDesc { - return [ - ["takeout_id", "bigint", "long"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.takeout_id, "bigint", "long"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { takeout_id: bigint; query: T }) { - super(); - this.takeout_id = params.takeout_id; - this.query = params.query; - } -} - -export class invokeWithBusinessConnection_> extends Function_ { - static __F: >(params: { connection_id: string; query: T }) => T["__R"]; - connection_id: string; - query: T; - - protected get [id](): number { - return 0xDD289F8E; - } - - static get [name](): string { - return "invokeWithBusinessConnection" - } - - static get [paramDesc](): ParamDesc { - return [ - ["connection_id", "string", "string"], - ["query", types["TypeX"], "!X"], - ]; - } - - protected get [params](): Params { - return [ - [this.connection_id, "string", "string"], - [this.query, types.TypeX, "!X"], - ]; - } - - constructor(params: { connection_id: string; query: T }) { - super(); - this.connection_id = params.connection_id; - this.query = params.query; - } -} - -/** Send the verification code for login */ -export class auth_sendCode_ extends Function_ { - static __F: (params: { phone_number: string; api_id: number; api_hash: string; settings: enums.CodeSettings }) => enums.auth.SentCode; - /** Phone number in international format */ - phone_number: string; - /** Application identifier (see [App configuration](https://core.telegram.org/myapp)) */ - api_id: number; - /** Application secret hash (see [App configuration](https://core.telegram.org/myapp)) */ - api_hash: string; - /** Settings for the code type to send */ - settings: enums.CodeSettings; - - protected get [id](): number { - return 0xA677244F; - } - - static get [name](): string { - return "auth.sendCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["api_id", "number", "int"], - ["api_hash", "string", "string"], - ["settings", types._CodeSettings, "CodeSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.api_id, "number", "int"], - [this.api_hash, "string", "string"], - [this.settings, types._CodeSettings, "CodeSettings"], - ]; - } - - constructor(params: { phone_number: string; api_id: number; api_hash: string; settings: enums.CodeSettings }) { - super(); - this.phone_number = params.phone_number; - this.api_id = params.api_id; - this.api_hash = params.api_hash; - this.settings = params.settings; - } -} - -/** Registers a validated phone number in the system. */ -export class auth_signUp_ extends Function_ { - static __F: (params: { no_joined_notifications?: true; phone_number: string; phone_code_hash: string; first_name: string; last_name: string }) => enums.auth.Authorization; - no_joined_notifications?: true; - /** Phone number in the international format */ - phone_number: string; - /** SMS-message ID */ - phone_code_hash: string; - /** New user first name */ - first_name: string; - /** New user last name */ - last_name: string; - - protected get [id](): number { - return 0xAAC7B717; - } - - static get [name](): string { - return "auth.signUp" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_joined_notifications", "true", "flags.0?true"], - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_joined_notifications ?? null, "true", "flags.0?true"], - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - ]; - } - - constructor(params: { no_joined_notifications?: true; phone_number: string; phone_code_hash: string; first_name: string; last_name: string }) { - super(); - this.no_joined_notifications = params.no_joined_notifications; - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - this.first_name = params.first_name; - this.last_name = params.last_name; - } -} - -/** Signs in a user with a validated phone number. */ -export class auth_signIn_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string; phone_code?: string; email_verification?: enums.EmailVerification }) => enums.auth.Authorization; - /** Phone number in the international format */ - phone_number: string; - /** SMS-message ID, obtained from [auth.sendCode](https://core.telegram.org/method/auth.sendCode) */ - phone_code_hash: string; - /** Valid numerical code from the SMS-message */ - phone_code?: string; - /** Email verification code or token */ - email_verification?: enums.EmailVerification; - - protected get [id](): number { - return 0x8D52A951; - } - - static get [name](): string { - return "auth.signIn" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ["phone_code", "string", "flags.0?string"], - ["email_verification", types._EmailVerification, "flags.1?EmailVerification"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - [this.phone_code ?? null, "string", "flags.0?string"], - [this.email_verification ?? null, types._EmailVerification, "flags.1?EmailVerification"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string; phone_code?: string; email_verification?: enums.EmailVerification }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - this.phone_code = params.phone_code; - this.email_verification = params.email_verification; - } -} - -/** Logs out the user. */ -export class auth_logOut_ extends Function_ { - static __F: () => enums.auth.LoggedOut; - protected get [id](): number { - return 0x3E72BA19; - } - - static get [name](): string { - return "auth.logOut" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Terminates all user's authorized sessions except for the current one. */ -export class auth_resetAuthorizations_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x9FAB0D1A; - } - - static get [name](): string { - return "auth.resetAuthorizations" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Returns data for copying authorization to another data-center. */ -export class auth_exportAuthorization_ extends Function_ { - static __F: (params: { dc_id: number }) => enums.auth.ExportedAuthorization; - /** Number of a target data-center */ - dc_id: number; - - protected get [id](): number { - return 0xE5BFFFCD; - } - - static get [name](): string { - return "auth.exportAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["dc_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.dc_id, "number", "int"], - ]; - } - - constructor(params: { dc_id: number }) { - super(); - this.dc_id = params.dc_id; - } -} - -/** Logs in a user using a key transmitted from his native data-center. */ -export class auth_importAuthorization_ extends Function_ { - static __F: (params: { id: bigint; bytes: Uint8Array }) => enums.auth.Authorization; - /** User ID */ - id: bigint; - /** Authorization key */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xA57A7DAD; - } - - static get [name](): string { - return "auth.importAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", "bigint", "long"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, "bigint", "long"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { id: bigint; bytes: Uint8Array }) { - super(); - this.id = params.id; - this.bytes = params.bytes; - } -} - -/** Binds a temporary authorization key `temp_auth_key_id` to the permanent authorization key `perm_auth_key_id`. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. */ -export class auth_bindTempAuthKey_ extends Function_ { - static __F: (params: { perm_auth_key_id: bigint; nonce: bigint; expires_at: number; encrypted_message: Uint8Array }) => boolean; - /** Permanent auth\_key\_id to bind to */ - perm_auth_key_id: bigint; - /** Random long from [Binding message contents](#binding-message-contents) */ - nonce: bigint; - /** Unix timestamp to invalidate temporary key, see [Binding message contents](#binding-message-contents) */ - expires_at: number; - /** See [Generating encrypted\_message](#generating-encrypted-message) */ - encrypted_message: Uint8Array; - - protected get [id](): number { - return 0xCDD42A05; - } - - static get [name](): string { - return "auth.bindTempAuthKey" - } - - static get [paramDesc](): ParamDesc { - return [ - ["perm_auth_key_id", "bigint", "long"], - ["nonce", "bigint", "long"], - ["expires_at", "number", "int"], - ["encrypted_message", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.perm_auth_key_id, "bigint", "long"], - [this.nonce, "bigint", "long"], - [this.expires_at, "number", "int"], - [this.encrypted_message, Uint8Array, "bytes"], - ]; - } - - constructor(params: { perm_auth_key_id: bigint; nonce: bigint; expires_at: number; encrypted_message: Uint8Array }) { - super(); - this.perm_auth_key_id = params.perm_auth_key_id; - this.nonce = params.nonce; - this.expires_at = params.expires_at; - this.encrypted_message = params.encrypted_message; - } -} - -/** Login as a bot */ -export class auth_importBotAuthorization_ extends Function_ { - static __F: (params: { flags: number; api_id: number; api_hash: string; bot_auth_token: string }) => enums.auth.Authorization; - /** Reserved for future use */ - flags: number; - /** Application identifier (see. [App configuration](https://core.telegram.org/myapp)) */ - api_id: number; - /** Application identifier hash (see. [App configuration](https://core.telegram.org/myapp)) */ - api_hash: string; - /** Bot token (see [bots](https://core.telegram.org/bots)) */ - bot_auth_token: string; - - protected get [id](): number { - return 0x67A3FF2C; - } - - static get [name](): string { - return "auth.importBotAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", "number", "int"], - ["api_id", "number", "int"], - ["api_hash", "string", "string"], - ["bot_auth_token", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.flags, "number", "int"], - [this.api_id, "number", "int"], - [this.api_hash, "string", "string"], - [this.bot_auth_token, "string", "string"], - ]; - } - - constructor(params: { flags: number; api_id: number; api_hash: string; bot_auth_token: string }) { - super(); - this.flags = params.flags; - this.api_id = params.api_id; - this.api_hash = params.api_hash; - this.bot_auth_token = params.bot_auth_token; - } -} - -/** Try logging to an account protected by a [2FA password](https://core.telegram.org/api/srp). */ -export class auth_checkPassword_ extends Function_ { - static __F: (params: { password: enums.InputCheckPasswordSRP }) => enums.auth.Authorization; - /** The account's password (see [SRP](https://core.telegram.org/api/srp)) */ - password: enums.InputCheckPasswordSRP; - - protected get [id](): number { - return 0xD18B4D16; - } - - static get [name](): string { - return "auth.checkPassword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["password", types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - protected get [params](): Params { - return [ - [this.password, types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - constructor(params: { password: enums.InputCheckPasswordSRP }) { - super(); - this.password = params.password; - } -} - -/** Request recovery code of a [2FA password](https://core.telegram.org/api/srp), only for accounts with a [recovery email configured](https://core.telegram.org/api/srp#email-verification). */ -export class auth_requestPasswordRecovery_ extends Function_ { - static __F: () => enums.auth.PasswordRecovery; - protected get [id](): number { - return 0xD897BC66; - } - - static get [name](): string { - return "auth.requestPasswordRecovery" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Reset the [2FA password](https://core.telegram.org/api/srp) using the recovery code sent using [auth.requestPasswordRecovery](https://core.telegram.org/method/auth.requestPasswordRecovery). */ -export class auth_recoverPassword_ extends Function_ { - static __F: (params: { code: string; new_settings?: enums.account.PasswordInputSettings }) => enums.auth.Authorization; - /** Code received via email */ - code: string; - /** New password */ - new_settings?: enums.account.PasswordInputSettings; - - protected get [id](): number { - return 0x37096C70; - } - - static get [name](): string { - return "auth.recoverPassword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["code", "string", "string"], - ["new_settings", types._account_PasswordInputSettings, "flags.0?account.PasswordInputSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.code, "string", "string"], - [this.new_settings ?? null, types._account_PasswordInputSettings, "flags.0?account.PasswordInputSettings"], - ]; - } - - constructor(params: { code: string; new_settings?: enums.account.PasswordInputSettings }) { - super(); - this.code = params.code; - this.new_settings = params.new_settings; - } -} - -/** Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see [login](https://core.telegram.org/api/auth) for more info. */ -export class auth_resendCode_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string }) => enums.auth.SentCode; - /** The phone number */ - phone_number: string; - /** The phone code hash obtained from [auth.sendCode](https://core.telegram.org/method/auth.sendCode) */ - phone_code_hash: string; - - protected get [id](): number { - return 0x3EF1A9BF; - } - - static get [name](): string { - return "auth.resendCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - } -} - -/** Cancel the login verification code */ -export class auth_cancelCode_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string }) => boolean; - /** Phone number */ - phone_number: string; - /** Phone code hash from [auth.sendCode](https://core.telegram.org/method/auth.sendCode) */ - phone_code_hash: string; - - protected get [id](): number { - return 0x1F040578; - } - - static get [name](): string { - return "auth.cancelCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - } -} - -/** Delete all temporary authorization keys **except for** the ones specified */ -export class auth_dropTempAuthKeys_ extends Function_ { - static __F: (params: { except_auth_keys: Array }) => boolean; - /** The auth keys that **shouldn't** be dropped. */ - except_auth_keys: Array; - - protected get [id](): number { - return 0x8E48A188; - } - - static get [name](): string { - return "auth.dropTempAuthKeys" - } - - static get [paramDesc](): ParamDesc { - return [ - ["except_auth_keys", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.except_auth_keys, ["bigint"], "Vector"], - ]; - } - - constructor(params: { except_auth_keys: Array }) { - super(); - this.except_auth_keys = params.except_auth_keys; - } -} - -/** Generate a login token, for [login via QR code](https://core.telegram.org/api/qr-login). -The generated login token should be encoded using base64url, then shown as a `tg://login?token=base64encodedtoken` [deep link »](https://core.telegram.org/api/links#qr-code-login-links) in the QR code. */ -export class auth_exportLoginToken_ extends Function_ { - static __F: (params: { api_id: number; api_hash: string; except_ids: Array }) => enums.auth.LoginToken; - /** Application identifier (see. [App configuration](https://core.telegram.org/myapp)) */ - api_id: number; - /** Application identifier hash (see. [App configuration](https://core.telegram.org/myapp)) */ - api_hash: string; - /** List of already logged-in user IDs, to prevent logging in twice with the same user */ - except_ids: Array; - - protected get [id](): number { - return 0xB7E085FE; - } - - static get [name](): string { - return "auth.exportLoginToken" - } - - static get [paramDesc](): ParamDesc { - return [ - ["api_id", "number", "int"], - ["api_hash", "string", "string"], - ["except_ids", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.api_id, "number", "int"], - [this.api_hash, "string", "string"], - [this.except_ids, ["bigint"], "Vector"], - ]; - } - - constructor(params: { api_id: number; api_hash: string; except_ids: Array }) { - super(); - this.api_id = params.api_id; - this.api_hash = params.api_hash; - this.except_ids = params.except_ids; - } -} - -/** Login using a redirected login token, generated in case of DC mismatch during [QR code login](https://core.telegram.org/api/qr-login). */ -export class auth_importLoginToken_ extends Function_ { - static __F: (params: { token: Uint8Array }) => enums.auth.LoginToken; - /** Login token */ - token: Uint8Array; - - protected get [id](): number { - return 0x95AC5CE4; - } - - static get [name](): string { - return "auth.importLoginToken" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.token, Uint8Array, "bytes"], - ]; - } - - constructor(params: { token: Uint8Array }) { - super(); - this.token = params.token; - } -} - -/** Accept QR code login token, logging in the app that generated it. */ -export class auth_acceptLoginToken_ extends Function_ { - static __F: (params: { token: Uint8Array }) => enums.Authorization; - /** Login token embedded in QR code, for more info, see [login via QR code](https://core.telegram.org/api/qr-login). */ - token: Uint8Array; - - protected get [id](): number { - return 0xE894AD4D; - } - - static get [name](): string { - return "auth.acceptLoginToken" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.token, Uint8Array, "bytes"], - ]; - } - - constructor(params: { token: Uint8Array }) { - super(); - this.token = params.token; - } -} - -/** Check if the [2FA recovery code](https://core.telegram.org/api/srp) sent using [auth.requestPasswordRecovery](https://core.telegram.org/method/auth.requestPasswordRecovery) is valid, before passing it to [auth.recoverPassword](https://core.telegram.org/method/auth.recoverPassword). */ -export class auth_checkRecoveryPassword_ extends Function_ { - static __F: (params: { code: string }) => boolean; - /** Code received via email */ - code: string; - - protected get [id](): number { - return 0x0D36BF79; - } - - static get [name](): string { - return "auth.checkRecoveryPassword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.code, "string", "string"], - ]; - } - - constructor(params: { code: string }) { - super(); - this.code = params.code; - } -} - -/** Login by importing an authorization token */ -export class auth_importWebTokenAuthorization_ extends Function_ { - static __F: (params: { api_id: number; api_hash: string; web_auth_token: string }) => enums.auth.Authorization; - /** [API ID](https://core.telegram.org/api/obtaining_api_id) */ - api_id: number; - /** [API hash](https://core.telegram.org/api/obtaining_api_id) */ - api_hash: string; - /** The authorization token */ - web_auth_token: string; - - protected get [id](): number { - return 0x2DB873A9; - } - - static get [name](): string { - return "auth.importWebTokenAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["api_id", "number", "int"], - ["api_hash", "string", "string"], - ["web_auth_token", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.api_id, "number", "int"], - [this.api_hash, "string", "string"], - [this.web_auth_token, "string", "string"], - ]; - } - - constructor(params: { api_id: number; api_hash: string; web_auth_token: string }) { - super(); - this.api_id = params.api_id; - this.api_hash = params.api_hash; - this.web_auth_token = params.web_auth_token; - } -} - -/** Request an SMS code via Firebase. */ -export class auth_requestFirebaseSms_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string; safety_net_token?: string; ios_push_secret?: string }) => boolean; - /** Phone number */ - phone_number: string; - /** Phone code hash returned by [auth.sendCode](https://core.telegram.org/method/auth.sendCode) */ - phone_code_hash: string; - /** On Android, a JWS object obtained as described in the [auth documentation »](https://core.telegram.org/api/auth) */ - safety_net_token?: string; - /** Secret token received via an apple push notification */ - ios_push_secret?: string; - - protected get [id](): number { - return 0x89464B50; - } - - static get [name](): string { - return "auth.requestFirebaseSms" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ["safety_net_token", "string", "flags.0?string"], - ["ios_push_secret", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - [this.safety_net_token ?? null, "string", "flags.0?string"], - [this.ios_push_secret ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string; safety_net_token?: string; ios_push_secret?: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - this.safety_net_token = params.safety_net_token; - this.ios_push_secret = params.ios_push_secret; - } -} - -/** Reset the [login email »](https://core.telegram.org/api/auth#email-verification). */ -export class auth_resetLoginEmail_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string }) => enums.auth.SentCode; - /** Phone number of the account */ - phone_number: string; - /** Phone code hash, obtained as described in the [documentation »](https://core.telegram.org/api/auth) */ - phone_code_hash: string; - - protected get [id](): number { - return 0x7E960193; - } - - static get [name](): string { - return "auth.resetLoginEmail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - } -} - -/** Register device to receive [PUSH notifications](https://core.telegram.org/api/push-updates) */ -export class account_registerDevice_ extends Function_ { - static __F: (params: { no_muted?: true; token_type: number; token: string; app_sandbox: boolean; secret: Uint8Array; other_uids: Array }) => boolean; - /** Avoid receiving (silent and invisible background) notifications. Useful to save battery. */ - no_muted?: true; - /** Device token type, see [PUSH updates](https://core.telegram.org/api/push-updates#subscribing-to-notifications) for the possible values. */ - token_type: number; - /** Device token, see [PUSH updates](https://core.telegram.org/api/push-updates#subscribing-to-notifications) for the possible values. */ - token: string; - /** If [(boolTrue)](https://core.telegram.org/constructor/boolTrue) is transmitted, a sandbox-certificate will be used during transmission. */ - app_sandbox: boolean; - /** For FCM and APNS VoIP, optional encryption key used to encrypt push notifications */ - secret: Uint8Array; - /** List of user identifiers of other users currently using the client */ - other_uids: Array; - - protected get [id](): number { - return 0xEC86017A; - } - - static get [name](): string { - return "account.registerDevice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_muted", "true", "flags.0?true"], - ["token_type", "number", "int"], - ["token", "string", "string"], - ["app_sandbox", "boolean", "Bool"], - ["secret", Uint8Array, "bytes"], - ["other_uids", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_muted ?? null, "true", "flags.0?true"], - [this.token_type, "number", "int"], - [this.token, "string", "string"], - [this.app_sandbox, "boolean", "Bool"], - [this.secret, Uint8Array, "bytes"], - [this.other_uids, ["bigint"], "Vector"], - ]; - } - - constructor(params: { no_muted?: true; token_type: number; token: string; app_sandbox: boolean; secret: Uint8Array; other_uids: Array }) { - super(); - this.no_muted = params.no_muted; - this.token_type = params.token_type; - this.token = params.token; - this.app_sandbox = params.app_sandbox; - this.secret = params.secret; - this.other_uids = params.other_uids; - } -} - -/** Deletes a device by its token, stops sending PUSH-notifications to it. */ -export class account_unregisterDevice_ extends Function_ { - static __F: (params: { token_type: number; token: string; other_uids: Array }) => boolean; - /** Device token type, see [PUSH updates](https://core.telegram.org/api/push-updates#subscribing-to-notifications) for the possible values. */ - token_type: number; - /** Device token, see [PUSH updates](https://core.telegram.org/api/push-updates#subscribing-to-notifications) for the possible values. */ - token: string; - /** List of user identifiers of other users currently using the client */ - other_uids: Array; - - protected get [id](): number { - return 0x6A0D3206; - } - - static get [name](): string { - return "account.unregisterDevice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token_type", "number", "int"], - ["token", "string", "string"], - ["other_uids", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.token_type, "number", "int"], - [this.token, "string", "string"], - [this.other_uids, ["bigint"], "Vector"], - ]; - } - - constructor(params: { token_type: number; token: string; other_uids: Array }) { - super(); - this.token_type = params.token_type; - this.token = params.token; - this.other_uids = params.other_uids; - } -} - -/** Edits notification settings from a given user/group, from all users/all groups. */ -export class account_updateNotifySettings_ extends Function_ { - static __F: (params: { peer: enums.InputNotifyPeer; settings: enums.InputPeerNotifySettings }) => boolean; - /** Notification source */ - peer: enums.InputNotifyPeer; - /** Notification settings */ - settings: enums.InputPeerNotifySettings; - - protected get [id](): number { - return 0x84BE5B93; - } - - static get [name](): string { - return "account.updateNotifySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputNotifyPeer, "InputNotifyPeer"], - ["settings", types._InputPeerNotifySettings, "InputPeerNotifySettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputNotifyPeer, "InputNotifyPeer"], - [this.settings, types._InputPeerNotifySettings, "InputPeerNotifySettings"], - ]; - } - - constructor(params: { peer: enums.InputNotifyPeer; settings: enums.InputPeerNotifySettings }) { - super(); - this.peer = params.peer; - this.settings = params.settings; - } -} - -/** Gets current notification settings for a given user/group, from all users/all groups. */ -export class account_getNotifySettings_ extends Function_ { - static __F: (params: { peer: enums.InputNotifyPeer }) => enums.PeerNotifySettings; - /** Notification source */ - peer: enums.InputNotifyPeer; - - protected get [id](): number { - return 0x12B3AD31; - } - - static get [name](): string { - return "account.getNotifySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputNotifyPeer, "InputNotifyPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputNotifyPeer, "InputNotifyPeer"], - ]; - } - - constructor(params: { peer: enums.InputNotifyPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Resets all notification settings from users and groups. */ -export class account_resetNotifySettings_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0xDB7E1747; - } - - static get [name](): string { - return "account.resetNotifySettings" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Updates user profile. */ -export class account_updateProfile_ extends Function_ { - static __F: (params?: { first_name?: string; last_name?: string; about?: string }) => enums.User; - /** New user first name */ - first_name?: string; - /** New user last name */ - last_name?: string; - /** New bio */ - about?: string; - - protected get [id](): number { - return 0x78515775; - } - - static get [name](): string { - return "account.updateProfile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["first_name", "string", "flags.0?string"], - ["last_name", "string", "flags.1?string"], - ["about", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.first_name ?? null, "string", "flags.0?string"], - [this.last_name ?? null, "string", "flags.1?string"], - [this.about ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params?: { first_name?: string; last_name?: string; about?: string }) { - super(); - this.first_name = params?.first_name; - this.last_name = params?.last_name; - this.about = params?.about; - } -} - -/** Updates online user status. */ -export class account_updateStatus_ extends Function_ { - static __F: (params: { offline: boolean }) => boolean; - /** If [(boolTrue)](https://core.telegram.org/constructor/boolTrue) is transmitted, user status will change to [(userStatusOffline)](https://core.telegram.org/constructor/userStatusOffline). */ - offline: boolean; - - protected get [id](): number { - return 0x6628562C; - } - - static get [name](): string { - return "account.updateStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offline", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.offline, "boolean", "Bool"], - ]; - } - - constructor(params: { offline: boolean }) { - super(); - this.offline = params.offline; - } -} - -/** Returns a list of available [wallpapers](https://core.telegram.org/api/wallpapers). */ -export class account_getWallPapers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.account.WallPapers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x07967D36; - } - - static get [name](): string { - return "account.getWallPapers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Report a peer for violation of telegram's Terms of Service */ -export class account_reportPeer_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; reason: enums.ReportReason; message: string }) => boolean; - /** The peer to report */ - peer: enums.InputPeer; - /** The reason why this peer is being reported */ - reason: enums.ReportReason; - /** Comment for report moderation */ - message: string; - - protected get [id](): number { - return 0xC5BA3D86; - } - - static get [name](): string { - return "account.reportPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["reason", types._ReportReason, "ReportReason"], - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.reason, types._ReportReason, "ReportReason"], - [this.message, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; reason: enums.ReportReason; message: string }) { - super(); - this.peer = params.peer; - this.reason = params.reason; - this.message = params.message; - } -} - -/** Validates a username and checks availability. */ -export class account_checkUsername_ extends Function_ { - static __F: (params: { username: string }) => boolean; - /** username - Accepted characters: A-z (case-insensitive), 0-9 and underscores. - Length: 5-32 characters. */ - username: string; - - protected get [id](): number { - return 0x2714D86C; - } - - static get [name](): string { - return "account.checkUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.username, "string", "string"], - ]; - } - - constructor(params: { username: string }) { - super(); - this.username = params.username; - } -} - -/** Changes username for the current user. */ -export class account_updateUsername_ extends Function_ { - static __F: (params: { username: string }) => enums.User; - /** username or empty string if username is to be removed - Accepted characters: a-z (case-insensitive), 0-9 and underscores. - Length: 5-32 characters. */ - username: string; - - protected get [id](): number { - return 0x3E0BDD7C; - } - - static get [name](): string { - return "account.updateUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.username, "string", "string"], - ]; - } - - constructor(params: { username: string }) { - super(); - this.username = params.username; - } -} - -/** Get privacy settings of current account */ -export class account_getPrivacy_ extends Function_ { - static __F: (params: { key: enums.InputPrivacyKey }) => enums.account.PrivacyRules; - /** Peer category whose privacy settings should be fetched */ - key: enums.InputPrivacyKey; - - protected get [id](): number { - return 0xDADBC950; - } - - static get [name](): string { - return "account.getPrivacy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["key", types._InputPrivacyKey, "InputPrivacyKey"], - ]; - } - - protected get [params](): Params { - return [ - [this.key, types._InputPrivacyKey, "InputPrivacyKey"], - ]; - } - - constructor(params: { key: enums.InputPrivacyKey }) { - super(); - this.key = params.key; - } -} - -/** Change privacy settings of current account */ -export class account_setPrivacy_ extends Function_ { - static __F: (params: { key: enums.InputPrivacyKey; rules: Array }) => enums.account.PrivacyRules; - /** New privacy rule */ - key: enums.InputPrivacyKey; - /** Peers to which the privacy rule will apply. */ - rules: Array; - - protected get [id](): number { - return 0xC9F81CE8; - } - - static get [name](): string { - return "account.setPrivacy" - } - - static get [paramDesc](): ParamDesc { - return [ - ["key", types._InputPrivacyKey, "InputPrivacyKey"], - ["rules", [types._InputPrivacyRule], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.key, types._InputPrivacyKey, "InputPrivacyKey"], - [this.rules, [types._InputPrivacyRule], "Vector"], - ]; - } - - constructor(params: { key: enums.InputPrivacyKey; rules: Array }) { - super(); - this.key = params.key; - this.rules = params.rules; - } -} - -/** Delete the user's account from the telegram servers. */ -export class account_deleteAccount_ extends Function_ { - static __F: (params: { reason: string; password?: enums.InputCheckPasswordSRP }) => boolean; - /** Why is the account being deleted, can be empty */ - reason: string; - /** [2FA password](https://core.telegram.org/api/srp): this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days [as specified in the docs »](https://core.telegram.org/api/account-deletion) */ - password?: enums.InputCheckPasswordSRP; - - protected get [id](): number { - return 0xA2C0CF74; - } - - static get [name](): string { - return "account.deleteAccount" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reason", "string", "string"], - ["password", types._InputCheckPasswordSRP, "flags.0?InputCheckPasswordSRP"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reason, "string", "string"], - [this.password ?? null, types._InputCheckPasswordSRP, "flags.0?InputCheckPasswordSRP"], - ]; - } - - constructor(params: { reason: string; password?: enums.InputCheckPasswordSRP }) { - super(); - this.reason = params.reason; - this.password = params.password; - } -} - -/** Get days to live of account */ -export class account_getAccountTTL_ extends Function_ { - static __F: () => enums.AccountDaysTTL; - protected get [id](): number { - return 0x08FC711D; - } - - static get [name](): string { - return "account.getAccountTTL" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Set account self-destruction period */ -export class account_setAccountTTL_ extends Function_ { - static __F: (params: { ttl: enums.AccountDaysTTL }) => boolean; - /** Time to live in days */ - ttl: enums.AccountDaysTTL; - - protected get [id](): number { - return 0x2442485E; - } - - static get [name](): string { - return "account.setAccountTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["ttl", types._AccountDaysTTL, "AccountDaysTTL"], - ]; - } - - protected get [params](): Params { - return [ - [this.ttl, types._AccountDaysTTL, "AccountDaysTTL"], - ]; - } - - constructor(params: { ttl: enums.AccountDaysTTL }) { - super(); - this.ttl = params.ttl; - } -} - -/** Verify a new phone number to associate to the current account */ -export class account_sendChangePhoneCode_ extends Function_ { - static __F: (params: { phone_number: string; settings: enums.CodeSettings }) => enums.auth.SentCode; - /** New phone number */ - phone_number: string; - /** Phone code settings */ - settings: enums.CodeSettings; - - protected get [id](): number { - return 0x82574AE5; - } - - static get [name](): string { - return "account.sendChangePhoneCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["settings", types._CodeSettings, "CodeSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.settings, types._CodeSettings, "CodeSettings"], - ]; - } - - constructor(params: { phone_number: string; settings: enums.CodeSettings }) { - super(); - this.phone_number = params.phone_number; - this.settings = params.settings; - } -} - -/** Change the phone number of the current account */ -export class account_changePhone_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string; phone_code: string }) => enums.User; - /** New phone number */ - phone_number: string; - /** Phone code hash received when calling [account.sendChangePhoneCode](https://core.telegram.org/method/account.sendChangePhoneCode) */ - phone_code_hash: string; - /** Phone code received when calling [account.sendChangePhoneCode](https://core.telegram.org/method/account.sendChangePhoneCode) */ - phone_code: string; - - protected get [id](): number { - return 0x70C32EDB; - } - - static get [name](): string { - return "account.changePhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ["phone_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - [this.phone_code, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string; phone_code: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - this.phone_code = params.phone_code; - } -} - -/** When client-side passcode lock feature is enabled, will not show message texts in incoming [PUSH notifications](https://core.telegram.org/api/push-updates). */ -export class account_updateDeviceLocked_ extends Function_ { - static __F: (params: { period: number }) => boolean; - /** Inactivity period after which to start hiding message texts in [PUSH notifications](https://core.telegram.org/api/push-updates). */ - period: number; - - protected get [id](): number { - return 0x38DF3532; - } - - static get [name](): string { - return "account.updateDeviceLocked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["period", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.period, "number", "int"], - ]; - } - - constructor(params: { period: number }) { - super(); - this.period = params.period; - } -} - -/** Get logged-in sessions */ -export class account_getAuthorizations_ extends Function_ { - static __F: () => enums.account.Authorizations; - protected get [id](): number { - return 0xE320C158; - } - - static get [name](): string { - return "account.getAuthorizations" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Log out an active [authorized session](https://core.telegram.org/api/auth) by its hash */ -export class account_resetAuthorization_ extends Function_ { - static __F: (params: { hash: bigint }) => boolean; - /** Session hash */ - hash: bigint; - - protected get [id](): number { - return 0xDF77F3BC; - } - - static get [name](): string { - return "account.resetAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Obtain configuration for two-factor authorization with password */ -export class account_getPassword_ extends Function_ { - static __F: () => enums.account.Password; - protected get [id](): number { - return 0x548A30F5; - } - - static get [name](): string { - return "account.getPassword" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get private info associated to the password info (recovery email, telegram [passport](https://core.telegram.org/passport) info & so on) */ -export class account_getPasswordSettings_ extends Function_ { - static __F: (params: { password: enums.InputCheckPasswordSRP }) => enums.account.PasswordSettings; - /** The password (see [SRP](https://core.telegram.org/api/srp)) */ - password: enums.InputCheckPasswordSRP; - - protected get [id](): number { - return 0x9CD4EAF9; - } - - static get [name](): string { - return "account.getPasswordSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["password", types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - protected get [params](): Params { - return [ - [this.password, types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - constructor(params: { password: enums.InputCheckPasswordSRP }) { - super(); - this.password = params.password; - } -} - -/** Set a new 2FA password */ -export class account_updatePasswordSettings_ extends Function_ { - static __F: (params: { password: enums.InputCheckPasswordSRP; new_settings: enums.account.PasswordInputSettings }) => boolean; - /** The old password (see [SRP](https://core.telegram.org/api/srp)) */ - password: enums.InputCheckPasswordSRP; - /** The new password (see [SRP](https://core.telegram.org/api/srp)) */ - new_settings: enums.account.PasswordInputSettings; - - protected get [id](): number { - return 0xA59B102F; - } - - static get [name](): string { - return "account.updatePasswordSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["password", types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ["new_settings", types._account_PasswordInputSettings, "account.PasswordInputSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.password, types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - [this.new_settings, types._account_PasswordInputSettings, "account.PasswordInputSettings"], - ]; - } - - constructor(params: { password: enums.InputCheckPasswordSRP; new_settings: enums.account.PasswordInputSettings }) { - super(); - this.password = params.password; - this.new_settings = params.new_settings; - } -} - -/** Send confirmation code to cancel account deletion, for more info [click here »](https://core.telegram.org/api/account-deletion) */ -export class account_sendConfirmPhoneCode_ extends Function_ { - static __F: (params: { hash: string; settings: enums.CodeSettings }) => enums.auth.SentCode; - /** The hash from the service notification, for more info [click here »](https://core.telegram.org/api/account-deletion) */ - hash: string; - /** Phone code settings */ - settings: enums.CodeSettings; - - protected get [id](): number { - return 0x1B3FAA88; - } - - static get [name](): string { - return "account.sendConfirmPhoneCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "string", "string"], - ["settings", types._CodeSettings, "CodeSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "string", "string"], - [this.settings, types._CodeSettings, "CodeSettings"], - ]; - } - - constructor(params: { hash: string; settings: enums.CodeSettings }) { - super(); - this.hash = params.hash; - this.settings = params.settings; - } -} - -/** Confirm a phone number to cancel account deletion, for more info [click here »](https://core.telegram.org/api/account-deletion) */ -export class account_confirmPhone_ extends Function_ { - static __F: (params: { phone_code_hash: string; phone_code: string }) => boolean; - /** Phone code hash, for more info [click here »](https://core.telegram.org/api/account-deletion) */ - phone_code_hash: string; - /** SMS code, for more info [click here »](https://core.telegram.org/api/account-deletion) */ - phone_code: string; - - protected get [id](): number { - return 0x5F2178C3; - } - - static get [name](): string { - return "account.confirmPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_code_hash", "string", "string"], - ["phone_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_code_hash, "string", "string"], - [this.phone_code, "string", "string"], - ]; - } - - constructor(params: { phone_code_hash: string; phone_code: string }) { - super(); - this.phone_code_hash = params.phone_code_hash; - this.phone_code = params.phone_code; - } -} - -/** Get temporary payment password */ -export class account_getTmpPassword_ extends Function_ { - static __F: (params: { password: enums.InputCheckPasswordSRP; period: number }) => enums.account.TmpPassword; - /** SRP password parameters */ - password: enums.InputCheckPasswordSRP; - /** Time during which the temporary password will be valid, in seconds; should be between 60 and 86400 */ - period: number; - - protected get [id](): number { - return 0x449E0B51; - } - - static get [name](): string { - return "account.getTmpPassword" - } - - static get [paramDesc](): ParamDesc { - return [ - ["password", types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ["period", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.password, types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - [this.period, "number", "int"], - ]; - } - - constructor(params: { password: enums.InputCheckPasswordSRP; period: number }) { - super(); - this.password = params.password; - this.period = params.period; - } -} - -/** Get web [login widget](https://core.telegram.org/widgets/login) authorizations */ -export class account_getWebAuthorizations_ extends Function_ { - static __F: () => enums.account.WebAuthorizations; - protected get [id](): number { - return 0x182E6D6F; - } - - static get [name](): string { - return "account.getWebAuthorizations" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Log out an active web [telegram login](https://core.telegram.org/widgets/login) session */ -export class account_resetWebAuthorization_ extends Function_ { - static __F: (params: { hash: bigint }) => boolean; - /** [Session](https://core.telegram.org/constructor/webAuthorization) hash */ - hash: bigint; - - protected get [id](): number { - return 0x2D01B9EF; - } - - static get [name](): string { - return "account.resetWebAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Reset all active web [telegram login](https://core.telegram.org/widgets/login) sessions */ -export class account_resetWebAuthorizations_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x682D2594; - } - - static get [name](): string { - return "account.resetWebAuthorizations" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get all saved [Telegram Passport](https://core.telegram.org/passport) documents, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ -export class account_getAllSecureValues_ extends Function_ { - static __F: () => enums.SecureValue[]; - protected get [id](): number { - return 0xB288BC7D; - } - - static get [name](): string { - return "account.getAllSecureValues" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get saved [Telegram Passport](https://core.telegram.org/passport) document, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ -export class account_getSecureValue_ extends Function_ { - static __F: (params: { types: Array }) => enums.SecureValue[]; - /** Requested value types */ - types: Array; - - protected get [id](): number { - return 0x73665BC2; - } - - static get [name](): string { - return "account.getSecureValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["types", [types._SecureValueType], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.types, [types._SecureValueType], "Vector"], - ]; - } - - constructor(params: { types: Array }) { - super(); - this.types = params.types; - } -} - -/** Securely save [Telegram Passport](https://core.telegram.org/passport) document, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ -export class account_saveSecureValue_ extends Function_ { - static __F: (params: { value: enums.InputSecureValue; secure_secret_id: bigint }) => enums.SecureValue; - /** Secure value, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ - value: enums.InputSecureValue; - /** Passport secret hash, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ - secure_secret_id: bigint; - - protected get [id](): number { - return 0x899FE31D; - } - - static get [name](): string { - return "account.saveSecureValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["value", types._InputSecureValue, "InputSecureValue"], - ["secure_secret_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.value, types._InputSecureValue, "InputSecureValue"], - [this.secure_secret_id, "bigint", "long"], - ]; - } - - constructor(params: { value: enums.InputSecureValue; secure_secret_id: bigint }) { - super(); - this.value = params.value; - this.secure_secret_id = params.secure_secret_id; - } -} - -/** Delete stored [Telegram Passport](https://core.telegram.org/passport) documents, [for more info see the passport docs »](https://core.telegram.org/passport/encryption#encryption) */ -export class account_deleteSecureValue_ extends Function_ { - static __F: (params: { types: Array }) => boolean; - /** Document types to delete */ - types: Array; - - protected get [id](): number { - return 0xB880BC4B; - } - - static get [name](): string { - return "account.deleteSecureValue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["types", [types._SecureValueType], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.types, [types._SecureValueType], "Vector"], - ]; - } - - constructor(params: { types: Array }) { - super(); - this.types = params.types; - } -} - -/** Returns a Telegram Passport authorization form for sharing data with a service */ -export class account_getAuthorizationForm_ extends Function_ { - static __F: (params: { bot_id: bigint; scope: string; public_key: string }) => enums.account.AuthorizationForm; - /** User identifier of the service's bot */ - bot_id: bigint; - /** Telegram Passport element types requested by the service */ - scope: string; - /** Service's public key */ - public_key: string; - - protected get [id](): number { - return 0xA929597A; - } - - static get [name](): string { - return "account.getAuthorizationForm" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot_id", "bigint", "long"], - ["scope", "string", "string"], - ["public_key", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot_id, "bigint", "long"], - [this.scope, "string", "string"], - [this.public_key, "string", "string"], - ]; - } - - constructor(params: { bot_id: bigint; scope: string; public_key: string }) { - super(); - this.bot_id = params.bot_id; - this.scope = params.scope; - this.public_key = params.public_key; - } -} - -/** Sends a Telegram Passport authorization form, effectively sharing data with the service */ -export class account_acceptAuthorization_ extends Function_ { - static __F: (params: { bot_id: bigint; scope: string; public_key: string; value_hashes: Array; credentials: enums.SecureCredentialsEncrypted }) => boolean; - /** Bot ID */ - bot_id: bigint; - /** Telegram Passport element types requested by the service */ - scope: string; - /** Service's public key */ - public_key: string; - /** Types of values sent and their hashes */ - value_hashes: Array; - /** Encrypted values */ - credentials: enums.SecureCredentialsEncrypted; - - protected get [id](): number { - return 0xF3ED4C73; - } - - static get [name](): string { - return "account.acceptAuthorization" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot_id", "bigint", "long"], - ["scope", "string", "string"], - ["public_key", "string", "string"], - ["value_hashes", [types._SecureValueHash], "Vector"], - ["credentials", types._SecureCredentialsEncrypted, "SecureCredentialsEncrypted"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot_id, "bigint", "long"], - [this.scope, "string", "string"], - [this.public_key, "string", "string"], - [this.value_hashes, [types._SecureValueHash], "Vector"], - [this.credentials, types._SecureCredentialsEncrypted, "SecureCredentialsEncrypted"], - ]; - } - - constructor(params: { bot_id: bigint; scope: string; public_key: string; value_hashes: Array; credentials: enums.SecureCredentialsEncrypted }) { - super(); - this.bot_id = params.bot_id; - this.scope = params.scope; - this.public_key = params.public_key; - this.value_hashes = params.value_hashes; - this.credentials = params.credentials; - } -} - -/** Send the verification phone code for telegram [passport](https://core.telegram.org/passport). */ -export class account_sendVerifyPhoneCode_ extends Function_ { - static __F: (params: { phone_number: string; settings: enums.CodeSettings }) => enums.auth.SentCode; - /** The phone number to verify */ - phone_number: string; - /** Phone code settings */ - settings: enums.CodeSettings; - - protected get [id](): number { - return 0xA5A356F9; - } - - static get [name](): string { - return "account.sendVerifyPhoneCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["settings", types._CodeSettings, "CodeSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.settings, types._CodeSettings, "CodeSettings"], - ]; - } - - constructor(params: { phone_number: string; settings: enums.CodeSettings }) { - super(); - this.phone_number = params.phone_number; - this.settings = params.settings; - } -} - -/** Verify a phone number for telegram [passport](https://core.telegram.org/passport). */ -export class account_verifyPhone_ extends Function_ { - static __F: (params: { phone_number: string; phone_code_hash: string; phone_code: string }) => boolean; - /** Phone number */ - phone_number: string; - /** Phone code hash received from the call to [account.sendVerifyPhoneCode](https://core.telegram.org/method/account.sendVerifyPhoneCode) */ - phone_code_hash: string; - /** Code received after the call to [account.sendVerifyPhoneCode](https://core.telegram.org/method/account.sendVerifyPhoneCode) */ - phone_code: string; - - protected get [id](): number { - return 0x4DD3A7F6; - } - - static get [name](): string { - return "account.verifyPhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone_number", "string", "string"], - ["phone_code_hash", "string", "string"], - ["phone_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone_number, "string", "string"], - [this.phone_code_hash, "string", "string"], - [this.phone_code, "string", "string"], - ]; - } - - constructor(params: { phone_number: string; phone_code_hash: string; phone_code: string }) { - super(); - this.phone_number = params.phone_number; - this.phone_code_hash = params.phone_code_hash; - this.phone_code = params.phone_code; - } -} - -/** Send an email verification code. */ -export class account_sendVerifyEmailCode_ extends Function_ { - static __F: (params: { purpose: enums.EmailVerifyPurpose; email: string }) => enums.account.SentEmailCode; - /** Verification purpose. */ - purpose: enums.EmailVerifyPurpose; - /** The email where to send the code. */ - email: string; - - protected get [id](): number { - return 0x98E037BB; - } - - static get [name](): string { - return "account.sendVerifyEmailCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["purpose", types._EmailVerifyPurpose, "EmailVerifyPurpose"], - ["email", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.purpose, types._EmailVerifyPurpose, "EmailVerifyPurpose"], - [this.email, "string", "string"], - ]; - } - - constructor(params: { purpose: enums.EmailVerifyPurpose; email: string }) { - super(); - this.purpose = params.purpose; - this.email = params.email; - } -} - -/** Verify an email address. */ -export class account_verifyEmail_ extends Function_ { - static __F: (params: { purpose: enums.EmailVerifyPurpose; verification: enums.EmailVerification }) => enums.account.EmailVerified; - /** Verification purpose */ - purpose: enums.EmailVerifyPurpose; - /** Email verification code or token */ - verification: enums.EmailVerification; - - protected get [id](): number { - return 0x032DA4CF; - } - - static get [name](): string { - return "account.verifyEmail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["purpose", types._EmailVerifyPurpose, "EmailVerifyPurpose"], - ["verification", types._EmailVerification, "EmailVerification"], - ]; - } - - protected get [params](): Params { - return [ - [this.purpose, types._EmailVerifyPurpose, "EmailVerifyPurpose"], - [this.verification, types._EmailVerification, "EmailVerification"], - ]; - } - - constructor(params: { purpose: enums.EmailVerifyPurpose; verification: enums.EmailVerification }) { - super(); - this.purpose = params.purpose; - this.verification = params.verification; - } -} - -/** Initialize a [takeout session, see here » for more info](https://core.telegram.org/api/takeout). */ -export class account_initTakeoutSession_ extends Function_ { - static __F: (params?: { contacts?: true; message_users?: true; message_chats?: true; message_megagroups?: true; message_channels?: true; files?: true; file_max_size?: bigint }) => enums.account.Takeout; - /** Whether to export contacts */ - contacts?: true; - /** Whether to export messages in private chats */ - message_users?: true; - /** Whether to export messages in [basic groups](https://core.telegram.org/api/channel#basic-groups) */ - message_chats?: true; - /** Whether to export messages in [supergroups](https://core.telegram.org/api/channel#supergroups) */ - message_megagroups?: true; - /** Whether to export messages in [channels](https://core.telegram.org/api/channel#channels) */ - message_channels?: true; - /** Whether to export files */ - files?: true; - /** Maximum size of files to export */ - file_max_size?: bigint; - - protected get [id](): number { - return 0x8EF3EAB0; - } - - static get [name](): string { - return "account.initTakeoutSession" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["contacts", "true", "flags.0?true"], - ["message_users", "true", "flags.1?true"], - ["message_chats", "true", "flags.2?true"], - ["message_megagroups", "true", "flags.3?true"], - ["message_channels", "true", "flags.4?true"], - ["files", "true", "flags.5?true"], - ["file_max_size", "bigint", "flags.5?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.contacts ?? null, "true", "flags.0?true"], - [this.message_users ?? null, "true", "flags.1?true"], - [this.message_chats ?? null, "true", "flags.2?true"], - [this.message_megagroups ?? null, "true", "flags.3?true"], - [this.message_channels ?? null, "true", "flags.4?true"], - [this.files ?? null, "true", "flags.5?true"], - [this.file_max_size ?? null, "bigint", "flags.5?long"], - ]; - } - - constructor(params?: { contacts?: true; message_users?: true; message_chats?: true; message_megagroups?: true; message_channels?: true; files?: true; file_max_size?: bigint }) { - super(); - this.contacts = params?.contacts; - this.message_users = params?.message_users; - this.message_chats = params?.message_chats; - this.message_megagroups = params?.message_megagroups; - this.message_channels = params?.message_channels; - this.files = params?.files; - this.file_max_size = params?.file_max_size; - } -} - -/** Terminate a [takeout session, see here » for more info](https://core.telegram.org/api/takeout). */ -export class account_finishTakeoutSession_ extends Function_ { - static __F: (params?: { success?: true }) => boolean; - /** Data exported successfully */ - success?: true; - - protected get [id](): number { - return 0x1D2652EE; - } - - static get [name](): string { - return "account.finishTakeoutSession" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["success", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.success ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { success?: true }) { - super(); - this.success = params?.success; - } -} - -/** Verify an email to use as [2FA recovery method](https://core.telegram.org/api/srp). */ -export class account_confirmPasswordEmail_ extends Function_ { - static __F: (params: { code: string }) => boolean; - /** The phone code that was received after [setting a recovery email](https://core.telegram.org/api/srp#email-verification) */ - code: string; - - protected get [id](): number { - return 0x8FDF1920; - } - - static get [name](): string { - return "account.confirmPasswordEmail" - } - - static get [paramDesc](): ParamDesc { - return [ - ["code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.code, "string", "string"], - ]; - } - - constructor(params: { code: string }) { - super(); - this.code = params.code; - } -} - -/** Resend the code to verify an email to use as [2FA recovery method](https://core.telegram.org/api/srp). */ -export class account_resendPasswordEmail_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x7A7F2A15; - } - - static get [name](): string { - return "account.resendPasswordEmail" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Cancel the code that was sent to verify an email to use as [2FA recovery method](https://core.telegram.org/api/srp). */ -export class account_cancelPasswordEmail_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0xC1CBD5B6; - } - - static get [name](): string { - return "account.cancelPasswordEmail" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Whether the user will receive notifications when contacts sign up */ -export class account_getContactSignUpNotification_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x9F07C728; - } - - static get [name](): string { - return "account.getContactSignUpNotification" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Toggle contact sign up notifications */ -export class account_setContactSignUpNotification_ extends Function_ { - static __F: (params: { silent: boolean }) => boolean; - /** Whether to disable contact sign up notifications */ - silent: boolean; - - protected get [id](): number { - return 0xCFF43F61; - } - - static get [name](): string { - return "account.setContactSignUpNotification" - } - - static get [paramDesc](): ParamDesc { - return [ - ["silent", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.silent, "boolean", "Bool"], - ]; - } - - constructor(params: { silent: boolean }) { - super(); - this.silent = params.silent; - } -} - -/** Returns list of chats with non-default notification settings */ -export class account_getNotifyExceptions_ extends Function_ { - static __F: (params?: { compare_sound?: true; compare_stories?: true; peer?: enums.InputNotifyPeer }) => enums.Updates; - /** If set, chats with non-default sound will be returned */ - compare_sound?: true; - /** If set, chats with non-default notification settings for stories will be returned */ - compare_stories?: true; - /** If specified, only chats of the specified category will be returned */ - peer?: enums.InputNotifyPeer; - - protected get [id](): number { - return 0x53577479; - } - - static get [name](): string { - return "account.getNotifyExceptions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["compare_sound", "true", "flags.1?true"], - ["compare_stories", "true", "flags.2?true"], - ["peer", types._InputNotifyPeer, "flags.0?InputNotifyPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.compare_sound ?? null, "true", "flags.1?true"], - [this.compare_stories ?? null, "true", "flags.2?true"], - [this.peer ?? null, types._InputNotifyPeer, "flags.0?InputNotifyPeer"], - ]; - } - - constructor(params?: { compare_sound?: true; compare_stories?: true; peer?: enums.InputNotifyPeer }) { - super(); - this.compare_sound = params?.compare_sound; - this.compare_stories = params?.compare_stories; - this.peer = params?.peer; - } -} - -/** Get info about a certain [wallpaper](https://core.telegram.org/api/wallpapers) */ -export class account_getWallPaper_ extends Function_ { - static __F: (params: { wallpaper: enums.InputWallPaper }) => enums.WallPaper; - /** The [wallpaper](https://core.telegram.org/api/wallpapers) to get info about */ - wallpaper: enums.InputWallPaper; - - protected get [id](): number { - return 0xFC8DDBEA; - } - - static get [name](): string { - return "account.getWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["wallpaper", types._InputWallPaper, "InputWallPaper"], - ]; - } - - protected get [params](): Params { - return [ - [this.wallpaper, types._InputWallPaper, "InputWallPaper"], - ]; - } - - constructor(params: { wallpaper: enums.InputWallPaper }) { - super(); - this.wallpaper = params.wallpaper; - } -} - -/** Create and upload a new [wallpaper](https://core.telegram.org/api/wallpapers) */ -export class account_uploadWallPaper_ extends Function_ { - static __F: (params: { for_chat?: true; file: enums.InputFile; mime_type: string; settings: enums.WallPaperSettings }) => enums.WallPaper; - /** Set this flag when uploading wallpapers to be passed to [messages.setChatWallPaper](https://core.telegram.org/method/messages.setChatWallPaper). */ - for_chat?: true; - /** The JPG/PNG wallpaper */ - file: enums.InputFile; - /** MIME type of uploaded wallpaper */ - mime_type: string; - /** Wallpaper settings */ - settings: enums.WallPaperSettings; - - protected get [id](): number { - return 0xE39A8F03; - } - - static get [name](): string { - return "account.uploadWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["for_chat", "true", "flags.0?true"], - ["file", types._InputFile, "InputFile"], - ["mime_type", "string", "string"], - ["settings", types._WallPaperSettings, "WallPaperSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.for_chat ?? null, "true", "flags.0?true"], - [this.file, types._InputFile, "InputFile"], - [this.mime_type, "string", "string"], - [this.settings, types._WallPaperSettings, "WallPaperSettings"], - ]; - } - - constructor(params: { for_chat?: true; file: enums.InputFile; mime_type: string; settings: enums.WallPaperSettings }) { - super(); - this.for_chat = params.for_chat; - this.file = params.file; - this.mime_type = params.mime_type; - this.settings = params.settings; - } -} - -/** Install/uninstall [wallpaper](https://core.telegram.org/api/wallpapers) */ -export class account_saveWallPaper_ extends Function_ { - static __F: (params: { wallpaper: enums.InputWallPaper; unsave: boolean; settings: enums.WallPaperSettings }) => boolean; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) to install or uninstall */ - wallpaper: enums.InputWallPaper; - /** Uninstall wallpaper? */ - unsave: boolean; - /** Wallpaper settings */ - settings: enums.WallPaperSettings; - - protected get [id](): number { - return 0x6C5A5B37; - } - - static get [name](): string { - return "account.saveWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["wallpaper", types._InputWallPaper, "InputWallPaper"], - ["unsave", "boolean", "Bool"], - ["settings", types._WallPaperSettings, "WallPaperSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.wallpaper, types._InputWallPaper, "InputWallPaper"], - [this.unsave, "boolean", "Bool"], - [this.settings, types._WallPaperSettings, "WallPaperSettings"], - ]; - } - - constructor(params: { wallpaper: enums.InputWallPaper; unsave: boolean; settings: enums.WallPaperSettings }) { - super(); - this.wallpaper = params.wallpaper; - this.unsave = params.unsave; - this.settings = params.settings; - } -} - -/** Install [wallpaper](https://core.telegram.org/api/wallpapers) */ -export class account_installWallPaper_ extends Function_ { - static __F: (params: { wallpaper: enums.InputWallPaper; settings: enums.WallPaperSettings }) => boolean; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) to install */ - wallpaper: enums.InputWallPaper; - /** [Wallpaper](https://core.telegram.org/api/wallpapers) settings */ - settings: enums.WallPaperSettings; - - protected get [id](): number { - return 0xFEED5769; - } - - static get [name](): string { - return "account.installWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["wallpaper", types._InputWallPaper, "InputWallPaper"], - ["settings", types._WallPaperSettings, "WallPaperSettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.wallpaper, types._InputWallPaper, "InputWallPaper"], - [this.settings, types._WallPaperSettings, "WallPaperSettings"], - ]; - } - - constructor(params: { wallpaper: enums.InputWallPaper; settings: enums.WallPaperSettings }) { - super(); - this.wallpaper = params.wallpaper; - this.settings = params.settings; - } -} - -/** Delete all installed [wallpapers](https://core.telegram.org/api/wallpapers), reverting to the default wallpaper set. */ -export class account_resetWallPapers_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0xBB3B9804; - } - - static get [name](): string { - return "account.resetWallPapers" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get media autodownload settings */ -export class account_getAutoDownloadSettings_ extends Function_ { - static __F: () => enums.account.AutoDownloadSettings; - protected get [id](): number { - return 0x56DA0B3F; - } - - static get [name](): string { - return "account.getAutoDownloadSettings" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Change media autodownload settings */ -export class account_saveAutoDownloadSettings_ extends Function_ { - static __F: (params: { low?: true; high?: true; settings: enums.AutoDownloadSettings }) => boolean; - /** Whether to save media in the low data usage preset */ - low?: true; - /** Whether to save media in the high data usage preset */ - high?: true; - /** Media autodownload settings */ - settings: enums.AutoDownloadSettings; - - protected get [id](): number { - return 0x76F36233; - } - - static get [name](): string { - return "account.saveAutoDownloadSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["low", "true", "flags.0?true"], - ["high", "true", "flags.1?true"], - ["settings", types._AutoDownloadSettings, "AutoDownloadSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.low ?? null, "true", "flags.0?true"], - [this.high ?? null, "true", "flags.1?true"], - [this.settings, types._AutoDownloadSettings, "AutoDownloadSettings"], - ]; - } - - constructor(params: { low?: true; high?: true; settings: enums.AutoDownloadSettings }) { - super(); - this.low = params.low; - this.high = params.high; - this.settings = params.settings; - } -} - -/** Upload theme */ -export class account_uploadTheme_ extends Function_ { - static __F: (params: { file: enums.InputFile; thumb?: enums.InputFile; file_name: string; mime_type: string }) => enums.Document; - /** [Previously uploaded](https://core.telegram.org/api/themes#uploading-theme-files) theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors. */ - file: enums.InputFile; - /** Thumbnail */ - thumb?: enums.InputFile; - /** File name */ - file_name: string; - /** MIME type, must be `application/x-tgtheme-{format}`, where `format` depends on the client */ - mime_type: string; - - protected get [id](): number { - return 0x1C3DB333; - } - - static get [name](): string { - return "account.uploadTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["file", types._InputFile, "InputFile"], - ["thumb", types._InputFile, "flags.0?InputFile"], - ["file_name", "string", "string"], - ["mime_type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.file, types._InputFile, "InputFile"], - [this.thumb ?? null, types._InputFile, "flags.0?InputFile"], - [this.file_name, "string", "string"], - [this.mime_type, "string", "string"], - ]; - } - - constructor(params: { file: enums.InputFile; thumb?: enums.InputFile; file_name: string; mime_type: string }) { - super(); - this.file = params.file; - this.thumb = params.thumb; - this.file_name = params.file_name; - this.mime_type = params.mime_type; - } -} - -/** Create a theme */ -export class account_createTheme_ extends Function_ { - static __F: (params: { slug: string; title: string; document?: enums.InputDocument; settings?: Array }) => enums.Theme; - /** Unique theme ID used to generate [theme deep links](https://core.telegram.org/api/links#theme-links), can be empty to autogenerate a random ID. */ - slug: string; - /** Theme name */ - title: string; - /** Theme file */ - document?: enums.InputDocument; - /** Theme settings, multiple values can be provided for the different base themes (day/night mode, etc). */ - settings?: Array; - - protected get [id](): number { - return 0x652E4400; - } - - static get [name](): string { - return "account.createTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["slug", "string", "string"], - ["title", "string", "string"], - ["document", types._InputDocument, "flags.2?InputDocument"], - ["settings", [types._InputThemeSettings], "flags.3?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.slug, "string", "string"], - [this.title, "string", "string"], - [this.document ?? null, types._InputDocument, "flags.2?InputDocument"], - [this.settings ?? null, [types._InputThemeSettings], "flags.3?Vector"], - ]; - } - - constructor(params: { slug: string; title: string; document?: enums.InputDocument; settings?: Array }) { - super(); - this.slug = params.slug; - this.title = params.title; - this.document = params.document; - this.settings = params.settings; - } -} - -/** Update theme */ -export class account_updateTheme_ extends Function_ { - static __F: (params: { format: string; theme: enums.InputTheme; slug?: string; title?: string; document?: enums.InputDocument; settings?: Array }) => enums.Theme; - /** Theme format, a string that identifies the theming engines supported by the client */ - format: string; - /** Theme to update */ - theme: enums.InputTheme; - /** Unique theme ID */ - slug?: string; - /** Theme name */ - title?: string; - /** Theme file */ - document?: enums.InputDocument; - /** Theme settings */ - settings?: Array; - - protected get [id](): number { - return 0x2BF40CCC; - } - - static get [name](): string { - return "account.updateTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["format", "string", "string"], - ["theme", types._InputTheme, "InputTheme"], - ["slug", "string", "flags.0?string"], - ["title", "string", "flags.1?string"], - ["document", types._InputDocument, "flags.2?InputDocument"], - ["settings", [types._InputThemeSettings], "flags.3?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.format, "string", "string"], - [this.theme, types._InputTheme, "InputTheme"], - [this.slug ?? null, "string", "flags.0?string"], - [this.title ?? null, "string", "flags.1?string"], - [this.document ?? null, types._InputDocument, "flags.2?InputDocument"], - [this.settings ?? null, [types._InputThemeSettings], "flags.3?Vector"], - ]; - } - - constructor(params: { format: string; theme: enums.InputTheme; slug?: string; title?: string; document?: enums.InputDocument; settings?: Array }) { - super(); - this.format = params.format; - this.theme = params.theme; - this.slug = params.slug; - this.title = params.title; - this.document = params.document; - this.settings = params.settings; - } -} - -/** Save a theme */ -export class account_saveTheme_ extends Function_ { - static __F: (params: { theme: enums.InputTheme; unsave: boolean }) => boolean; - /** Theme to save */ - theme: enums.InputTheme; - /** Unsave */ - unsave: boolean; - - protected get [id](): number { - return 0xF257106C; - } - - static get [name](): string { - return "account.saveTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["theme", types._InputTheme, "InputTheme"], - ["unsave", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.theme, types._InputTheme, "InputTheme"], - [this.unsave, "boolean", "Bool"], - ]; - } - - constructor(params: { theme: enums.InputTheme; unsave: boolean }) { - super(); - this.theme = params.theme; - this.unsave = params.unsave; - } -} - -/** Install a theme */ -export class account_installTheme_ extends Function_ { - static __F: (params?: { dark?: true; theme?: enums.InputTheme; format?: string; base_theme?: enums.BaseTheme }) => boolean; - /** Whether to install the dark version */ - dark?: true; - /** Theme to install */ - theme?: enums.InputTheme; - /** Theme format, a string that identifies the theming engines supported by the client */ - format?: string; - /** Indicates a basic theme provided by all clients */ - base_theme?: enums.BaseTheme; - - protected get [id](): number { - return 0xC727BB3B; - } - - static get [name](): string { - return "account.installTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["theme", types._InputTheme, "flags.1?InputTheme"], - ["format", "string", "flags.2?string"], - ["base_theme", types._BaseTheme, "flags.3?BaseTheme"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.theme ?? null, types._InputTheme, "flags.1?InputTheme"], - [this.format ?? null, "string", "flags.2?string"], - [this.base_theme ?? null, types._BaseTheme, "flags.3?BaseTheme"], - ]; - } - - constructor(params?: { dark?: true; theme?: enums.InputTheme; format?: string; base_theme?: enums.BaseTheme }) { - super(); - this.dark = params?.dark; - this.theme = params?.theme; - this.format = params?.format; - this.base_theme = params?.base_theme; - } -} - -/** Get theme information */ -export class account_getTheme_ extends Function_ { - static __F: (params: { format: string; theme: enums.InputTheme }) => enums.Theme; - /** Theme format, a string that identifies the theming engines supported by the client */ - format: string; - /** Theme */ - theme: enums.InputTheme; - - protected get [id](): number { - return 0x3A5869EC; - } - - static get [name](): string { - return "account.getTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["format", "string", "string"], - ["theme", types._InputTheme, "InputTheme"], - ]; - } - - protected get [params](): Params { - return [ - [this.format, "string", "string"], - [this.theme, types._InputTheme, "InputTheme"], - ]; - } - - constructor(params: { format: string; theme: enums.InputTheme }) { - super(); - this.format = params.format; - this.theme = params.theme; - } -} - -/** Get installed themes */ -export class account_getThemes_ extends Function_ { - static __F: (params: { format: string; hash: bigint }) => enums.account.Themes; - /** Theme format, a string that identifies the theming engines supported by the client */ - format: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x7206E458; - } - - static get [name](): string { - return "account.getThemes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["format", "string", "string"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.format, "string", "string"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { format: string; hash: bigint }) { - super(); - this.format = params.format; - this.hash = params.hash; - } -} - -/** Set sensitive content settings (for viewing or hiding NSFW content) */ -export class account_setContentSettings_ extends Function_ { - static __F: (params?: { sensitive_enabled?: true }) => boolean; - /** Enable NSFW content */ - sensitive_enabled?: true; - - protected get [id](): number { - return 0xB574B16B; - } - - static get [name](): string { - return "account.setContentSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["sensitive_enabled", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.sensitive_enabled ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { sensitive_enabled?: true }) { - super(); - this.sensitive_enabled = params?.sensitive_enabled; - } -} - -/** Get sensitive content settings */ -export class account_getContentSettings_ extends Function_ { - static __F: () => enums.account.ContentSettings; - protected get [id](): number { - return 0x8B9B4DAE; - } - - static get [name](): string { - return "account.getContentSettings" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get info about multiple [wallpapers](https://core.telegram.org/api/wallpapers) */ -export class account_getMultiWallPapers_ extends Function_ { - static __F: (params: { wallpapers: Array }) => enums.WallPaper[]; - /** [Wallpapers](https://core.telegram.org/api/wallpapers) to fetch info about */ - wallpapers: Array; - - protected get [id](): number { - return 0x65AD71DC; - } - - static get [name](): string { - return "account.getMultiWallPapers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["wallpapers", [types._InputWallPaper], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.wallpapers, [types._InputWallPaper], "Vector"], - ]; - } - - constructor(params: { wallpapers: Array }) { - super(); - this.wallpapers = params.wallpapers; - } -} - -/** Get global privacy settings */ -export class account_getGlobalPrivacySettings_ extends Function_ { - static __F: () => enums.GlobalPrivacySettings; - protected get [id](): number { - return 0xEB2B4CF6; - } - - static get [name](): string { - return "account.getGlobalPrivacySettings" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Set global privacy settings */ -export class account_setGlobalPrivacySettings_ extends Function_ { - static __F: (params: { settings: enums.GlobalPrivacySettings }) => enums.GlobalPrivacySettings; - /** Global privacy settings */ - settings: enums.GlobalPrivacySettings; - - protected get [id](): number { - return 0x1EDAAAC2; - } - - static get [name](): string { - return "account.setGlobalPrivacySettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["settings", types._GlobalPrivacySettings, "GlobalPrivacySettings"], - ]; - } - - protected get [params](): Params { - return [ - [this.settings, types._GlobalPrivacySettings, "GlobalPrivacySettings"], - ]; - } - - constructor(params: { settings: enums.GlobalPrivacySettings }) { - super(); - this.settings = params.settings; - } -} - -/** Report a profile photo of a dialog */ -export class account_reportProfilePhoto_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; photo_id: enums.InputPhoto; reason: enums.ReportReason; message: string }) => boolean; - /** The dialog */ - peer: enums.InputPeer; - /** Dialog photo ID */ - photo_id: enums.InputPhoto; - /** Report reason */ - reason: enums.ReportReason; - /** Comment for report moderation */ - message: string; - - protected get [id](): number { - return 0xFA8CC6F5; - } - - static get [name](): string { - return "account.reportProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["photo_id", types._InputPhoto, "InputPhoto"], - ["reason", types._ReportReason, "ReportReason"], - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.photo_id, types._InputPhoto, "InputPhoto"], - [this.reason, types._ReportReason, "ReportReason"], - [this.message, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; photo_id: enums.InputPhoto; reason: enums.ReportReason; message: string }) { - super(); - this.peer = params.peer; - this.photo_id = params.photo_id; - this.reason = params.reason; - this.message = params.message; - } -} - -/** Initiate a 2FA password reset: can only be used if the user is already logged-in, [see here for more info »](https://core.telegram.org/api/srp#password-reset) */ -export class account_resetPassword_ extends Function_ { - static __F: () => enums.account.ResetPasswordResult; - protected get [id](): number { - return 0x9308CE1B; - } - - static get [name](): string { - return "account.resetPassword" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Abort a pending 2FA password reset, [see here for more info »](https://core.telegram.org/api/srp#password-reset) */ -export class account_declinePasswordReset_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x4C9409F6; - } - - static get [name](): string { - return "account.declinePasswordReset" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get all available chat [themes »](https://core.telegram.org/api/themes). */ -export class account_getChatThemes_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.account.Themes; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xD638DE89; - } - - static get [name](): string { - return "account.getChatThemes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Set time-to-live of current session */ -export class account_setAuthorizationTTL_ extends Function_ { - static __F: (params: { authorization_ttl_days: number }) => boolean; - /** Time-to-live of current session in days */ - authorization_ttl_days: number; - - protected get [id](): number { - return 0xBF899AA0; - } - - static get [name](): string { - return "account.setAuthorizationTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["authorization_ttl_days", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.authorization_ttl_days, "number", "int"], - ]; - } - - constructor(params: { authorization_ttl_days: number }) { - super(); - this.authorization_ttl_days = params.authorization_ttl_days; - } -} - -/** Change settings related to a session. */ -export class account_changeAuthorizationSettings_ extends Function_ { - static __F: (params: { confirmed?: true; hash: bigint; encrypted_requests_disabled?: boolean; call_requests_disabled?: boolean }) => boolean; - /** If set, [confirms a newly logged in session »](https://core.telegram.org/api/auth#confirming-login). */ - confirmed?: true; - /** Session ID from the [authorization](https://core.telegram.org/constructor/authorization) constructor, fetchable using [account.getAuthorizations](https://core.telegram.org/method/account.getAuthorizations) */ - hash: bigint; - /** Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed */ - encrypted_requests_disabled?: boolean; - /** Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed */ - call_requests_disabled?: boolean; - - protected get [id](): number { - return 0x40F48462; - } - - static get [name](): string { - return "account.changeAuthorizationSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["confirmed", "true", "flags.3?true"], - ["hash", "bigint", "long"], - ["encrypted_requests_disabled", "boolean", "flags.0?Bool"], - ["call_requests_disabled", "boolean", "flags.1?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.confirmed ?? null, "true", "flags.3?true"], - [this.hash, "bigint", "long"], - [this.encrypted_requests_disabled ?? null, "boolean", "flags.0?Bool"], - [this.call_requests_disabled ?? null, "boolean", "flags.1?Bool"], - ]; - } - - constructor(params: { confirmed?: true; hash: bigint; encrypted_requests_disabled?: boolean; call_requests_disabled?: boolean }) { - super(); - this.confirmed = params.confirmed; - this.hash = params.hash; - this.encrypted_requests_disabled = params.encrypted_requests_disabled; - this.call_requests_disabled = params.call_requests_disabled; - } -} - -/** Fetch saved notification sounds */ -export class account_getSavedRingtones_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.account.SavedRingtones; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xE1902288; - } - - static get [name](): string { - return "account.getSavedRingtones" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Save or remove saved notification sound. */ -export class account_saveRingtone_ extends Function_ { - static __F: (params: { id: enums.InputDocument; unsave: boolean }) => enums.account.SavedRingtone; - /** Notification sound uploaded using [account.uploadRingtone](https://core.telegram.org/method/account.uploadRingtone) */ - id: enums.InputDocument; - /** Whether to add or delete the notification sound */ - unsave: boolean; - - protected get [id](): number { - return 0x3DEA5B03; - } - - static get [name](): string { - return "account.saveRingtone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputDocument, "InputDocument"], - ["unsave", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputDocument, "InputDocument"], - [this.unsave, "boolean", "Bool"], - ]; - } - - constructor(params: { id: enums.InputDocument; unsave: boolean }) { - super(); - this.id = params.id; - this.unsave = params.unsave; - } -} - -/** Upload notification sound, use [account.saveRingtone](https://core.telegram.org/method/account.saveRingtone) to convert it and add it to the list of saved notification sounds. */ -export class account_uploadRingtone_ extends Function_ { - static __F: (params: { file: enums.InputFile; file_name: string; mime_type: string }) => enums.Document; - /** Notification sound */ - file: enums.InputFile; - /** File name */ - file_name: string; - /** MIME type of file */ - mime_type: string; - - protected get [id](): number { - return 0x831A83A2; - } - - static get [name](): string { - return "account.uploadRingtone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file", types._InputFile, "InputFile"], - ["file_name", "string", "string"], - ["mime_type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.file, types._InputFile, "InputFile"], - [this.file_name, "string", "string"], - [this.mime_type, "string", "string"], - ]; - } - - constructor(params: { file: enums.InputFile; file_name: string; mime_type: string }) { - super(); - this.file = params.file; - this.file_name = params.file_name; - this.mime_type = params.mime_type; - } -} - -/** Set an [emoji status](https://core.telegram.org/api/emoji-status) */ -export class account_updateEmojiStatus_ extends Function_ { - static __F: (params: { emoji_status: enums.EmojiStatus }) => boolean; - /** [Emoji status](https://core.telegram.org/api/emoji-status) to set */ - emoji_status: enums.EmojiStatus; - - protected get [id](): number { - return 0xFBD3DE6B; - } - - static get [name](): string { - return "account.updateEmojiStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoji_status", types._EmojiStatus, "EmojiStatus"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoji_status, types._EmojiStatus, "EmojiStatus"], - ]; - } - - constructor(params: { emoji_status: enums.EmojiStatus }) { - super(); - this.emoji_status = params.emoji_status; - } -} - -/** Get a list of default suggested [emoji statuses](https://core.telegram.org/api/emoji-status) */ -export class account_getDefaultEmojiStatuses_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.account.EmojiStatuses; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xD6753386; - } - - static get [name](): string { - return "account.getDefaultEmojiStatuses" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Get recently used [emoji statuses](https://core.telegram.org/api/emoji-status) */ -export class account_getRecentEmojiStatuses_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.account.EmojiStatuses; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x0F578105; - } - - static get [name](): string { - return "account.getRecentEmojiStatuses" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Clears list of recently used [emoji statuses](https://core.telegram.org/api/emoji-status) */ -export class account_clearRecentEmojiStatuses_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x18201AAE; - } - - static get [name](): string { - return "account.clearRecentEmojiStatuses" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Reorder usernames associated with the currently logged-in user. */ -export class account_reorderUsernames_ extends Function_ { - static __F: (params: { order: Array }) => boolean; - /** The new order for active usernames. All active usernames must be specified. */ - order: Array; - - protected get [id](): number { - return 0xEF500EAB; - } - - static get [name](): string { - return "account.reorderUsernames" - } - - static get [paramDesc](): ParamDesc { - return [ - ["order", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.order, ["string"], "Vector"], - ]; - } - - constructor(params: { order: Array }) { - super(); - this.order = params.order; - } -} - -/** Activate or deactivate a purchased [fragment.com](https://fragment.com) username associated to the currently logged-in user. */ -export class account_toggleUsername_ extends Function_ { - static __F: (params: { username: string; active: boolean }) => boolean; - /** Username */ - username: string; - /** Whether to activate or deactivate it */ - active: boolean; - - protected get [id](): number { - return 0x58D6B376; - } - - static get [name](): string { - return "account.toggleUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["username", "string", "string"], - ["active", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.username, "string", "string"], - [this.active, "boolean", "Bool"], - ]; - } - - constructor(params: { username: string; active: boolean }) { - super(); - this.username = params.username; - this.active = params.active; - } -} - -/** Get a set of suggested [custom emoji stickers](https://core.telegram.org/api/custom-emoji) that can be [used as profile picture](https://core.telegram.org/api/files#sticker-profile-pictures) */ -export class account_getDefaultProfilePhotoEmojis_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.EmojiList; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xE2750328; - } - - static get [name](): string { - return "account.getDefaultProfilePhotoEmojis" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Get a set of suggested [custom emoji stickers](https://core.telegram.org/api/custom-emoji) that can be [used as group picture](https://core.telegram.org/api/files#sticker-profile-pictures) */ -export class account_getDefaultGroupPhotoEmojis_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.EmojiList; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x915860AE; - } - - static get [name](): string { - return "account.getDefaultGroupPhotoEmojis" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Get autosave settings */ -export class account_getAutoSaveSettings_ extends Function_ { - static __F: () => enums.account.AutoSaveSettings; - protected get [id](): number { - return 0xADCBBCDA; - } - - static get [name](): string { - return "account.getAutoSaveSettings" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Modify autosave settings */ -export class account_saveAutoSaveSettings_ extends Function_ { - static __F: (params: { users?: true; chats?: true; broadcasts?: true; peer?: enums.InputPeer; settings: enums.AutoSaveSettings }) => boolean; - /** Whether the new settings should affect all private chats */ - users?: true; - /** Whether the new settings should affect all groups */ - chats?: true; - /** Whether the new settings should affect all [channels](https://core.telegram.org/api/channel) */ - broadcasts?: true; - /** Whether the new settings should affect a specific peer */ - peer?: enums.InputPeer; - /** The new autosave settings */ - settings: enums.AutoSaveSettings; - - protected get [id](): number { - return 0xD69B8361; - } - - static get [name](): string { - return "account.saveAutoSaveSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["users", "true", "flags.0?true"], - ["chats", "true", "flags.1?true"], - ["broadcasts", "true", "flags.2?true"], - ["peer", types._InputPeer, "flags.3?InputPeer"], - ["settings", types._AutoSaveSettings, "AutoSaveSettings"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.users ?? null, "true", "flags.0?true"], - [this.chats ?? null, "true", "flags.1?true"], - [this.broadcasts ?? null, "true", "flags.2?true"], - [this.peer ?? null, types._InputPeer, "flags.3?InputPeer"], - [this.settings, types._AutoSaveSettings, "AutoSaveSettings"], - ]; - } - - constructor(params: { users?: true; chats?: true; broadcasts?: true; peer?: enums.InputPeer; settings: enums.AutoSaveSettings }) { - super(); - this.users = params.users; - this.chats = params.chats; - this.broadcasts = params.broadcasts; - this.peer = params.peer; - this.settings = params.settings; - } -} - -/** Clear all peer-specific autosave settings. */ -export class account_deleteAutoSaveExceptions_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x53BC0020; - } - - static get [name](): string { - return "account.deleteAutoSaveExceptions" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Invalidate the specified login codes, see [here »](https://core.telegram.org/api/auth#invalidating-login-codes) for more info. */ -export class account_invalidateSignInCodes_ extends Function_ { - static __F: (params: { codes: Array }) => boolean; - /** The login codes to invalidate. */ - codes: Array; - - protected get [id](): number { - return 0xCA8AE8BA; - } - - static get [name](): string { - return "account.invalidateSignInCodes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["codes", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.codes, ["string"], "Vector"], - ]; - } - - constructor(params: { codes: Array }) { - super(); - this.codes = params.codes; - } -} - -/** Update the [accent color and background custom emoji »](https://core.telegram.org/api/colors) of the current account. */ -export class account_updateColor_ extends Function_ { - static __F: (params?: { for_profile?: true; color?: number; background_emoji_id?: bigint }) => boolean; - /** Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. */ - for_profile?: true; - /** [ID of the accent color palette »](https://core.telegram.org/api/colors) to use (not RGB24, see [here »](https://core.telegram.org/api/colors) for more info). */ - color?: number; - /** Custom emoji ID used in the accent color pattern. */ - background_emoji_id?: bigint; - - protected get [id](): number { - return 0x7CEFA15D; - } - - static get [name](): string { - return "account.updateColor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["for_profile", "true", "flags.1?true"], - ["color", "number", "flags.2?int"], - ["background_emoji_id", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.for_profile ?? null, "true", "flags.1?true"], - [this.color ?? null, "number", "flags.2?int"], - [this.background_emoji_id ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params?: { for_profile?: true; color?: number; background_emoji_id?: bigint }) { - super(); - this.for_profile = params?.for_profile; - this.color = params?.color; - this.background_emoji_id = params?.background_emoji_id; - } -} - -/** Get a set of suggested [custom emoji stickers](https://core.telegram.org/api/custom-emoji) that can be used in an [accent color pattern](https://core.telegram.org/api/colors). */ -export class account_getDefaultBackgroundEmojis_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.EmojiList; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xA60AB9CE; - } - - static get [name](): string { - return "account.getDefaultBackgroundEmojis" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Get a list of default suggested [channel emoji statuses](https://core.telegram.org/api/emoji-status). */ -export class account_getChannelDefaultEmojiStatuses_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.account.EmojiStatuses; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x7727A7D5; - } - - static get [name](): string { - return "account.getChannelDefaultEmojiStatuses" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Returns fetch the full list of [custom emoji IDs »](https://core.telegram.org/api/custom-emoji) that cannot be used in [channel emoji statuses »](https://core.telegram.org/api/emoji-status). */ -export class account_getChannelRestrictedStatusEmojis_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.EmojiList; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x35A9E0D5; - } - - static get [name](): string { - return "account.getChannelRestrictedStatusEmojis" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -export class account_updateBusinessWorkHours_ extends Function_ { - static __F: (params?: { business_work_hours?: enums.BusinessWorkHours }) => boolean; - business_work_hours?: enums.BusinessWorkHours; - - protected get [id](): number { - return 0x4B00E066; - } - - static get [name](): string { - return "account.updateBusinessWorkHours" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["business_work_hours", types._BusinessWorkHours, "flags.0?BusinessWorkHours"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.business_work_hours ?? null, types._BusinessWorkHours, "flags.0?BusinessWorkHours"], - ]; - } - - constructor(params?: { business_work_hours?: enums.BusinessWorkHours }) { - super(); - this.business_work_hours = params?.business_work_hours; - } -} - -export class account_updateBusinessLocation_ extends Function_ { - static __F: (params?: { geo_point?: enums.InputGeoPoint; address?: string }) => boolean; - geo_point?: enums.InputGeoPoint; - address?: string; - - protected get [id](): number { - return 0x9E6B131A; - } - - static get [name](): string { - return "account.updateBusinessLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["geo_point", types._InputGeoPoint, "flags.1?InputGeoPoint"], - ["address", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.geo_point ?? null, types._InputGeoPoint, "flags.1?InputGeoPoint"], - [this.address ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params?: { geo_point?: enums.InputGeoPoint; address?: string }) { - super(); - this.geo_point = params?.geo_point; - this.address = params?.address; - } -} - -export class account_updateBusinessGreetingMessage_ extends Function_ { - static __F: (params?: { message?: enums.InputBusinessGreetingMessage }) => boolean; - message?: enums.InputBusinessGreetingMessage; - - protected get [id](): number { - return 0x66CDAFC4; - } - - static get [name](): string { - return "account.updateBusinessGreetingMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["message", types._InputBusinessGreetingMessage, "flags.0?InputBusinessGreetingMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.message ?? null, types._InputBusinessGreetingMessage, "flags.0?InputBusinessGreetingMessage"], - ]; - } - - constructor(params?: { message?: enums.InputBusinessGreetingMessage }) { - super(); - this.message = params?.message; - } -} - -export class account_updateBusinessAwayMessage_ extends Function_ { - static __F: (params?: { message?: enums.InputBusinessAwayMessage }) => boolean; - message?: enums.InputBusinessAwayMessage; - - protected get [id](): number { - return 0xA26A7FA5; - } - - static get [name](): string { - return "account.updateBusinessAwayMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["message", types._InputBusinessAwayMessage, "flags.0?InputBusinessAwayMessage"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.message ?? null, types._InputBusinessAwayMessage, "flags.0?InputBusinessAwayMessage"], - ]; - } - - constructor(params?: { message?: enums.InputBusinessAwayMessage }) { - super(); - this.message = params?.message; - } -} - -export class account_updateConnectedBot_ extends Function_ { - static __F: (params: { can_reply?: true; deleted?: true; bot: enums.InputUser; recipients: enums.InputBusinessBotRecipients }) => enums.Updates; - can_reply?: true; - deleted?: true; - bot: enums.InputUser; - recipients: enums.InputBusinessBotRecipients; - - protected get [id](): number { - return 0x43D8521D; - } - - static get [name](): string { - return "account.updateConnectedBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_reply", "true", "flags.0?true"], - ["deleted", "true", "flags.1?true"], - ["bot", types._InputUser, "InputUser"], - ["recipients", types._InputBusinessBotRecipients, "InputBusinessBotRecipients"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_reply ?? null, "true", "flags.0?true"], - [this.deleted ?? null, "true", "flags.1?true"], - [this.bot, types._InputUser, "InputUser"], - [this.recipients, types._InputBusinessBotRecipients, "InputBusinessBotRecipients"], - ]; - } - - constructor(params: { can_reply?: true; deleted?: true; bot: enums.InputUser; recipients: enums.InputBusinessBotRecipients }) { - super(); - this.can_reply = params.can_reply; - this.deleted = params.deleted; - this.bot = params.bot; - this.recipients = params.recipients; - } -} - -export class account_getConnectedBots_ extends Function_ { - static __F: () => enums.account.ConnectedBots; - protected get [id](): number { - return 0x4EA4C80F; - } - - static get [name](): string { - return "account.getConnectedBots" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class account_getBotBusinessConnection_ extends Function_ { - static __F: (params: { connection_id: string }) => enums.Updates; - connection_id: string; - - protected get [id](): number { - return 0x76A86270; - } - - static get [name](): string { - return "account.getBotBusinessConnection" - } - - static get [paramDesc](): ParamDesc { - return [ - ["connection_id", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.connection_id, "string", "string"], - ]; - } - - constructor(params: { connection_id: string }) { - super(); - this.connection_id = params.connection_id; - } -} - -export class account_updateBusinessIntro_ extends Function_ { - static __F: (params?: { intro?: enums.InputBusinessIntro }) => boolean; - intro?: enums.InputBusinessIntro; - - protected get [id](): number { - return 0xA614D034; - } - - static get [name](): string { - return "account.updateBusinessIntro" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["intro", types._InputBusinessIntro, "flags.0?InputBusinessIntro"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.intro ?? null, types._InputBusinessIntro, "flags.0?InputBusinessIntro"], - ]; - } - - constructor(params?: { intro?: enums.InputBusinessIntro }) { - super(); - this.intro = params?.intro; - } -} - -export class account_toggleConnectedBotPaused_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; paused: boolean }) => boolean; - peer: enums.InputPeer; - paused: boolean; - - protected get [id](): number { - return 0x646E1097; - } - - static get [name](): string { - return "account.toggleConnectedBotPaused" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["paused", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.paused, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; paused: boolean }) { - super(); - this.peer = params.peer; - this.paused = params.paused; - } -} - -export class account_disablePeerConnectedBot_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => boolean; - peer: enums.InputPeer; - - protected get [id](): number { - return 0x5E437ED9; - } - - static get [name](): string { - return "account.disablePeerConnectedBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -export class account_updateBirthday_ extends Function_ { - static __F: (params?: { birthday?: enums.Birthday }) => boolean; - birthday?: enums.Birthday; - - protected get [id](): number { - return 0xCC6E0C11; - } - - static get [name](): string { - return "account.updateBirthday" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["birthday", types._Birthday, "flags.0?Birthday"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.birthday ?? null, types._Birthday, "flags.0?Birthday"], - ]; - } - - constructor(params?: { birthday?: enums.Birthday }) { - super(); - this.birthday = params?.birthday; - } -} - -export class account_createBusinessChatLink_ extends Function_ { - static __F: (params: { link: enums.InputBusinessChatLink }) => enums.BusinessChatLink; - link: enums.InputBusinessChatLink; - - protected get [id](): number { - return 0x8851E68E; - } - - static get [name](): string { - return "account.createBusinessChatLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["link", types._InputBusinessChatLink, "InputBusinessChatLink"], - ]; - } - - protected get [params](): Params { - return [ - [this.link, types._InputBusinessChatLink, "InputBusinessChatLink"], - ]; - } - - constructor(params: { link: enums.InputBusinessChatLink }) { - super(); - this.link = params.link; - } -} - -export class account_editBusinessChatLink_ extends Function_ { - static __F: (params: { slug: string; link: enums.InputBusinessChatLink }) => enums.BusinessChatLink; - slug: string; - link: enums.InputBusinessChatLink; - - protected get [id](): number { - return 0x8C3410AF; - } - - static get [name](): string { - return "account.editBusinessChatLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ["link", types._InputBusinessChatLink, "InputBusinessChatLink"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - [this.link, types._InputBusinessChatLink, "InputBusinessChatLink"], - ]; - } - - constructor(params: { slug: string; link: enums.InputBusinessChatLink }) { - super(); - this.slug = params.slug; - this.link = params.link; - } -} - -export class account_deleteBusinessChatLink_ extends Function_ { - static __F: (params: { slug: string }) => boolean; - slug: string; - - protected get [id](): number { - return 0x60073674; - } - - static get [name](): string { - return "account.deleteBusinessChatLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -export class account_getBusinessChatLinks_ extends Function_ { - static __F: () => enums.account.BusinessChatLinks; - protected get [id](): number { - return 0x6F70DDE1; - } - - static get [name](): string { - return "account.getBusinessChatLinks" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class account_resolveBusinessChatLink_ extends Function_ { - static __F: (params: { slug: string }) => enums.account.ResolvedBusinessChatLinks; - slug: string; - - protected get [id](): number { - return 0x5492E5EE; - } - - static get [name](): string { - return "account.resolveBusinessChatLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -export class account_updatePersonalChannel_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => boolean; - channel: enums.InputChannel; - - protected get [id](): number { - return 0xD94305E0; - } - - static get [name](): string { - return "account.updatePersonalChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Returns basic user info according to their identifiers. */ -export class users_getUsers_ extends Function_ { - static __F: (params: { id: Array }) => enums.User[]; - /** List of user identifiers */ - id: Array; - - protected get [id](): number { - return 0x0D91A548; - } - - static get [name](): string { - return "users.getUsers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputUser], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputUser], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Returns extended user info by ID. */ -export class users_getFullUser_ extends Function_ { - static __F: (params: { id: enums.InputUser }) => enums.users.UserFull; - /** User ID */ - id: enums.InputUser; - - protected get [id](): number { - return 0xB60F5918; - } - - static get [name](): string { - return "users.getFullUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { id: enums.InputUser }) { - super(); - this.id = params.id; - } -} - -/** Notify the user that the sent [passport](https://core.telegram.org/passport) data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). */ -export class users_setSecureValueErrors_ extends Function_ { - static __F: (params: { id: enums.InputUser; errors: Array }) => boolean; - /** The user */ - id: enums.InputUser; - /** Errors */ - errors: Array; - - protected get [id](): number { - return 0x90C894B5; - } - - static get [name](): string { - return "users.setSecureValueErrors" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputUser, "InputUser"], - ["errors", [types._SecureValueError], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputUser, "InputUser"], - [this.errors, [types._SecureValueError], "Vector"], - ]; - } - - constructor(params: { id: enums.InputUser; errors: Array }) { - super(); - this.id = params.id; - this.errors = params.errors; - } -} - -export class users_getIsPremiumRequiredToContact_ extends Function_ { - static __F: (params: { id: Array }) => boolean[]; - id: Array; - - protected get [id](): number { - return 0xA622AA10; - } - - static get [name](): string { - return "users.getIsPremiumRequiredToContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputUser], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputUser], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Get the telegram IDs of all contacts. -Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). */ -export class contacts_getContactIDs_ extends Function_ { - static __F: (params: { hash: bigint }) => number[]; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x7ADC669D; - } - - static get [name](): string { - return "contacts.getContactIDs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Use this method to obtain the online statuses of all contacts with an accessible Telegram account. */ -export class contacts_getStatuses_ extends Function_ { - static __F: () => enums.ContactStatus[]; - protected get [id](): number { - return 0xC4A353EE; - } - - static get [name](): string { - return "contacts.getStatuses" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Returns the current user's contact list. */ -export class contacts_getContacts_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.contacts.Contacts; - /** If there already is a full contact list on the client, a [hash](https://core.telegram.org/api/offsets#hash-generation) of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, [(contacts.contactsNotModified)](https://core.telegram.org/constructor/contacts.contactsNotModified) will be returned. */ - hash: bigint; - - protected get [id](): number { - return 0x5DD69E12; - } - - static get [name](): string { - return "contacts.getContacts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info. */ -export class contacts_importContacts_ extends Function_ { - static __F: (params: { contacts: Array }) => enums.contacts.ImportedContacts; - /** List of contacts to import */ - contacts: Array; - - protected get [id](): number { - return 0x2C800BE5; - } - - static get [name](): string { - return "contacts.importContacts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["contacts", [types._InputContact], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.contacts, [types._InputContact], "Vector"], - ]; - } - - constructor(params: { contacts: Array }) { - super(); - this.contacts = params.contacts; - } -} - -/** Deletes several contacts from the list. */ -export class contacts_deleteContacts_ extends Function_ { - static __F: (params: { id: Array }) => enums.Updates; - /** User ID list */ - id: Array; - - protected get [id](): number { - return 0x096A0E00; - } - - static get [name](): string { - return "contacts.deleteContacts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputUser], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputUser], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Delete contacts by phone number */ -export class contacts_deleteByPhones_ extends Function_ { - static __F: (params: { phones: Array }) => boolean; - /** Phone numbers */ - phones: Array; - - protected get [id](): number { - return 0x1013FD9E; - } - - static get [name](): string { - return "contacts.deleteByPhones" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phones", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.phones, ["string"], "Vector"], - ]; - } - - constructor(params: { phones: Array }) { - super(); - this.phones = params.phones; - } -} - -/** Adds a peer to a blocklist, see [here »](https://core.telegram.org/api/block) for more info. */ -export class contacts_block_ extends Function_ { - static __F: (params: { my_stories_from?: true; id: enums.InputPeer }) => boolean; - /** Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see [here »](https://core.telegram.org/api/block) for more info. */ - my_stories_from?: true; - /** Peer */ - id: enums.InputPeer; - - protected get [id](): number { - return 0x2E2E8734; - } - - static get [name](): string { - return "contacts.block" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["my_stories_from", "true", "flags.0?true"], - ["id", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.my_stories_from ?? null, "true", "flags.0?true"], - [this.id, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { my_stories_from?: true; id: enums.InputPeer }) { - super(); - this.my_stories_from = params.my_stories_from; - this.id = params.id; - } -} - -/** Deletes a peer from a blocklist, see [here »](https://core.telegram.org/api/block) for more info. */ -export class contacts_unblock_ extends Function_ { - static __F: (params: { my_stories_from?: true; id: enums.InputPeer }) => boolean; - /** Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see [here »](https://core.telegram.org/api/block) for more info. */ - my_stories_from?: true; - /** Peer */ - id: enums.InputPeer; - - protected get [id](): number { - return 0xB550D328; - } - - static get [name](): string { - return "contacts.unblock" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["my_stories_from", "true", "flags.0?true"], - ["id", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.my_stories_from ?? null, "true", "flags.0?true"], - [this.id, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { my_stories_from?: true; id: enums.InputPeer }) { - super(); - this.my_stories_from = params.my_stories_from; - this.id = params.id; - } -} - -/** Returns the list of blocked users. */ -export class contacts_getBlocked_ extends Function_ { - static __F: (params: { my_stories_from?: true; offset: number; limit: number }) => enums.contacts.Blocked; - /** Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See [here »](https://core.telegram.org/api/block) for differences between the two. */ - my_stories_from?: true; - /** The number of list elements to be skipped */ - offset: number; - /** The number of list elements to be returned */ - limit: number; - - protected get [id](): number { - return 0x9A868F80; - } - - static get [name](): string { - return "contacts.getBlocked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["my_stories_from", "true", "flags.0?true"], - ["offset", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.my_stories_from ?? null, "true", "flags.0?true"], - [this.offset, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { my_stories_from?: true; offset: number; limit: number }) { - super(); - this.my_stories_from = params.my_stories_from; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Returns users found by username substring. */ -export class contacts_search_ extends Function_ { - static __F: (params: { q: string; limit: number }) => enums.contacts.Found; - /** Target substring */ - q: string; - /** Maximum number of users to be returned */ - limit: number; - - protected get [id](): number { - return 0x11F812D8; - } - - static get [name](): string { - return "contacts.search" - } - - static get [paramDesc](): ParamDesc { - return [ - ["q", "string", "string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.q, "string", "string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { q: string; limit: number }) { - super(); - this.q = params.q; - this.limit = params.limit; - } -} - -/** Resolve a @username to get peer info */ -export class contacts_resolveUsername_ extends Function_ { - static __F: (params: { username: string }) => enums.contacts.ResolvedPeer; - /** @username to resolve */ - username: string; - - protected get [id](): number { - return 0xF93CCBA3; - } - - static get [name](): string { - return "contacts.resolveUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.username, "string", "string"], - ]; - } - - constructor(params: { username: string }) { - super(); - this.username = params.username; - } -} - -/** Get most used peers */ -export class contacts_getTopPeers_ extends Function_ { - static __F: (params: { correspondents?: true; bots_pm?: true; bots_inline?: true; phone_calls?: true; forward_users?: true; forward_chats?: true; groups?: true; channels?: true; offset: number; limit: number; hash: bigint }) => enums.contacts.TopPeers; - /** Users we've chatted most frequently with */ - correspondents?: true; - /** Most used bots */ - bots_pm?: true; - /** Most used inline bots */ - bots_inline?: true; - /** Most frequently called users */ - phone_calls?: true; - /** Users to which the users often forwards messages to */ - forward_users?: true; - /** Chats to which the users often forwards messages to */ - forward_chats?: true; - /** Often-opened groups and supergroups */ - groups?: true; - /** Most frequently visited channels */ - channels?: true; - /** Offset for [pagination](https://core.telegram.org/api/offsets) */ - offset: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x973478B6; - } - - static get [name](): string { - return "contacts.getTopPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["correspondents", "true", "flags.0?true"], - ["bots_pm", "true", "flags.1?true"], - ["bots_inline", "true", "flags.2?true"], - ["phone_calls", "true", "flags.3?true"], - ["forward_users", "true", "flags.4?true"], - ["forward_chats", "true", "flags.5?true"], - ["groups", "true", "flags.10?true"], - ["channels", "true", "flags.15?true"], - ["offset", "number", "int"], - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.correspondents ?? null, "true", "flags.0?true"], - [this.bots_pm ?? null, "true", "flags.1?true"], - [this.bots_inline ?? null, "true", "flags.2?true"], - [this.phone_calls ?? null, "true", "flags.3?true"], - [this.forward_users ?? null, "true", "flags.4?true"], - [this.forward_chats ?? null, "true", "flags.5?true"], - [this.groups ?? null, "true", "flags.10?true"], - [this.channels ?? null, "true", "flags.15?true"], - [this.offset, "number", "int"], - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { correspondents?: true; bots_pm?: true; bots_inline?: true; phone_calls?: true; forward_users?: true; forward_chats?: true; groups?: true; channels?: true; offset: number; limit: number; hash: bigint }) { - super(); - this.correspondents = params.correspondents; - this.bots_pm = params.bots_pm; - this.bots_inline = params.bots_inline; - this.phone_calls = params.phone_calls; - this.forward_users = params.forward_users; - this.forward_chats = params.forward_chats; - this.groups = params.groups; - this.channels = params.channels; - this.offset = params.offset; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Reset [rating](https://core.telegram.org/api/top-rating) of top peer */ -export class contacts_resetTopPeerRating_ extends Function_ { - static __F: (params: { category: enums.TopPeerCategory; peer: enums.InputPeer }) => boolean; - /** Top peer category */ - category: enums.TopPeerCategory; - /** Peer whose rating should be reset */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x1AE373AC; - } - - static get [name](): string { - return "contacts.resetTopPeerRating" - } - - static get [paramDesc](): ParamDesc { - return [ - ["category", types._TopPeerCategory, "TopPeerCategory"], - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.category, types._TopPeerCategory, "TopPeerCategory"], - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { category: enums.TopPeerCategory; peer: enums.InputPeer }) { - super(); - this.category = params.category; - this.peer = params.peer; - } -} - -/** Removes all contacts without an associated Telegram account. */ -export class contacts_resetSaved_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x879537F1; - } - - static get [name](): string { - return "contacts.resetSaved" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get all contacts, requires a [takeout session, see here » for more info](https://core.telegram.org/api/takeout). */ -export class contacts_getSaved_ extends Function_ { - static __F: () => enums.SavedContact[]; - protected get [id](): number { - return 0x82F1E39F; - } - - static get [name](): string { - return "contacts.getSaved" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Enable/disable [top peers](https://core.telegram.org/api/top-rating) */ -export class contacts_toggleTopPeers_ extends Function_ { - static __F: (params: { enabled: boolean }) => boolean; - /** Enable/disable */ - enabled: boolean; - - protected get [id](): number { - return 0x8514BDDA; - } - - static get [name](): string { - return "contacts.toggleTopPeers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { enabled: boolean }) { - super(); - this.enabled = params.enabled; - } -} - -/** Add an existing telegram user as contact. */ -export class contacts_addContact_ extends Function_ { - static __F: (params: { add_phone_privacy_exception?: true; id: enums.InputUser; first_name: string; last_name: string; phone: string }) => enums.Updates; - /** Allow the other user to see our phone number? */ - add_phone_privacy_exception?: true; - /** Telegram ID of the other user */ - id: enums.InputUser; - /** First name */ - first_name: string; - /** Last name */ - last_name: string; - /** User's phone number, may be omitted to simply add the user to the contact list, without a phone number. */ - phone: string; - - protected get [id](): number { - return 0xE8F463D0; - } - - static get [name](): string { - return "contacts.addContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["add_phone_privacy_exception", "true", "flags.0?true"], - ["id", types._InputUser, "InputUser"], - ["first_name", "string", "string"], - ["last_name", "string", "string"], - ["phone", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.add_phone_privacy_exception ?? null, "true", "flags.0?true"], - [this.id, types._InputUser, "InputUser"], - [this.first_name, "string", "string"], - [this.last_name, "string", "string"], - [this.phone, "string", "string"], - ]; - } - - constructor(params: { add_phone_privacy_exception?: true; id: enums.InputUser; first_name: string; last_name: string; phone: string }) { - super(); - this.add_phone_privacy_exception = params.add_phone_privacy_exception; - this.id = params.id; - this.first_name = params.first_name; - this.last_name = params.last_name; - this.phone = params.phone; - } -} - -/** If the [add contact action bar is active](https://core.telegram.org/api/action-bar#add-contact), add that user as contact */ -export class contacts_acceptContact_ extends Function_ { - static __F: (params: { id: enums.InputUser }) => enums.Updates; - /** The user to add as contact */ - id: enums.InputUser; - - protected get [id](): number { - return 0xF831A20F; - } - - static get [name](): string { - return "contacts.acceptContact" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { id: enums.InputUser }) { - super(); - this.id = params.id; - } -} - -/** Get users and geochats near you, see [here »](https://core.telegram.org/api/nearby) for more info. */ -export class contacts_getLocated_ extends Function_ { - static __F: (params: { background?: true; geo_point: enums.InputGeoPoint; self_expires?: number }) => enums.Updates; - /** While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag. - Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown. */ - background?: true; - /** Geolocation */ - geo_point: enums.InputGeoPoint; - /** If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied. */ - self_expires?: number; - - protected get [id](): number { - return 0xD348BC44; - } - - static get [name](): string { - return "contacts.getLocated" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["background", "true", "flags.1?true"], - ["geo_point", types._InputGeoPoint, "InputGeoPoint"], - ["self_expires", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.background ?? null, "true", "flags.1?true"], - [this.geo_point, types._InputGeoPoint, "InputGeoPoint"], - [this.self_expires ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { background?: true; geo_point: enums.InputGeoPoint; self_expires?: number }) { - super(); - this.background = params.background; - this.geo_point = params.geo_point; - this.self_expires = params.self_expires; - } -} - -/** Stop getting notifications about [discussion replies](https://core.telegram.org/api/discussion) of a certain user in `@replies` */ -export class contacts_blockFromReplies_ extends Function_ { - static __F: (params: { delete_message?: true; delete_history?: true; report_spam?: true; msg_id: number }) => enums.Updates; - /** Whether to delete the specified message as well */ - delete_message?: true; - /** Whether to delete all `@replies` messages from this user as well */ - delete_history?: true; - /** Whether to also report this user for spam */ - report_spam?: true; - /** ID of the message in the [@replies](https://core.telegram.org/api/discussion#replies) chat */ - msg_id: number; - - protected get [id](): number { - return 0x29A8962C; - } - - static get [name](): string { - return "contacts.blockFromReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["delete_message", "true", "flags.0?true"], - ["delete_history", "true", "flags.1?true"], - ["report_spam", "true", "flags.2?true"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.delete_message ?? null, "true", "flags.0?true"], - [this.delete_history ?? null, "true", "flags.1?true"], - [this.report_spam ?? null, "true", "flags.2?true"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { delete_message?: true; delete_history?: true; report_spam?: true; msg_id: number }) { - super(); - this.delete_message = params.delete_message; - this.delete_history = params.delete_history; - this.report_spam = params.report_spam; - this.msg_id = params.msg_id; - } -} - -/** Resolve a phone number to get user info, if their privacy settings allow it. */ -export class contacts_resolvePhone_ extends Function_ { - static __F: (params: { phone: string }) => enums.contacts.ResolvedPeer; - /** Phone number in international format, possibly obtained from a [phone number deep link](https://core.telegram.org/api/links#phone-number-links). */ - phone: string; - - protected get [id](): number { - return 0x8AF94344; - } - - static get [name](): string { - return "contacts.resolvePhone" - } - - static get [paramDesc](): ParamDesc { - return [ - ["phone", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.phone, "string", "string"], - ]; - } - - constructor(params: { phone: string }) { - super(); - this.phone = params.phone; - } -} - -/** Generates a [temporary profile link](https://core.telegram.org/api/links#temporary-profile-links) for the currently logged-in user. */ -export class contacts_exportContactToken_ extends Function_ { - static __F: () => enums.ExportedContactToken; - protected get [id](): number { - return 0xF8654027; - } - - static get [name](): string { - return "contacts.exportContactToken" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Obtain user info from a [temporary profile link](https://core.telegram.org/api/links#temporary-profile-links). */ -export class contacts_importContactToken_ extends Function_ { - static __F: (params: { token: string }) => enums.User; - /** The token extracted from the [temporary profile link](https://core.telegram.org/api/links#temporary-profile-links). */ - token: string; - - protected get [id](): number { - return 0x13005788; - } - - static get [name](): string { - return "contacts.importContactToken" - } - - static get [paramDesc](): ParamDesc { - return [ - ["token", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.token, "string", "string"], - ]; - } - - constructor(params: { token: string }) { - super(); - this.token = params.token; - } -} - -/** Edit the [close friends list, see here »](https://core.telegram.org/api/privacy) for more info. */ -export class contacts_editCloseFriends_ extends Function_ { - static __F: (params: { id: Array }) => boolean; - /** Full list of user IDs of close friends, see [here](https://core.telegram.org/api/privacy) for more info. */ - id: Array; - - protected get [id](): number { - return 0xBA6705F0; - } - - static get [name](): string { - return "contacts.editCloseFriends" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, ["bigint"], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Replace the contents of an entire [blocklist, see here for more info »](https://core.telegram.org/api/block). */ -export class contacts_setBlocked_ extends Function_ { - static __F: (params: { my_stories_from?: true; id: Array; limit: number }) => boolean; - /** Whether to edit the story blocklist; if not set, will edit the main blocklist. See [here »](https://core.telegram.org/api/block) for differences between the two. */ - my_stories_from?: true; - /** Full content of the blocklist. */ - id: Array; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x94C65C76; - } - - static get [name](): string { - return "contacts.setBlocked" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["my_stories_from", "true", "flags.0?true"], - ["id", [types._InputPeer], "Vector"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.my_stories_from ?? null, "true", "flags.0?true"], - [this.id, [types._InputPeer], "Vector"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { my_stories_from?: true; id: Array; limit: number }) { - super(); - this.my_stories_from = params.my_stories_from; - this.id = params.id; - this.limit = params.limit; - } -} - -export class contacts_getBirthdays_ extends Function_ { - static __F: () => enums.contacts.ContactBirthdays; - protected get [id](): number { - return 0xDAEDA864; - } - - static get [name](): string { - return "contacts.getBirthdays" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Returns the list of messages by their IDs. */ -export class messages_getMessages_ extends Function_ { - static __F: (params: { id: Array }) => enums.messages.Messages; - /** Message ID list */ - id: Array; - - protected get [id](): number { - return 0x63C66506; - } - - static get [name](): string { - return "messages.getMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputMessage], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputMessage], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Returns the current user dialog list. */ -export class messages_getDialogs_ extends Function_ { - static __F: (params: { exclude_pinned?: true; folder_id?: number; offset_date: number; offset_id: number; offset_peer: enums.InputPeer; limit: number; hash: bigint }) => enums.messages.Dialogs; - /** Exclude pinned dialogs */ - exclude_pinned?: true; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_date: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) (`top_message` ID used for pagination) */ - offset_id: number; - /** [Offset peer for pagination](https://core.telegram.org/api/offsets) */ - offset_peer: enums.InputPeer; - /** Number of list elements to be returned */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xA0F4CB4F; - } - - static get [name](): string { - return "messages.getDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["exclude_pinned", "true", "flags.0?true"], - ["folder_id", "number", "flags.1?int"], - ["offset_date", "number", "int"], - ["offset_id", "number", "int"], - ["offset_peer", types._InputPeer, "InputPeer"], - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.exclude_pinned ?? null, "true", "flags.0?true"], - [this.folder_id ?? null, "number", "flags.1?int"], - [this.offset_date, "number", "int"], - [this.offset_id, "number", "int"], - [this.offset_peer, types._InputPeer, "InputPeer"], - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { exclude_pinned?: true; folder_id?: number; offset_date: number; offset_id: number; offset_peer: enums.InputPeer; limit: number; hash: bigint }) { - super(); - this.exclude_pinned = params.exclude_pinned; - this.folder_id = params.folder_id; - this.offset_date = params.offset_date; - this.offset_id = params.offset_id; - this.offset_peer = params.offset_peer; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Returns the conversation history with one interlocutor / within a chat */ -export class messages_getHistory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; offset_id: number; offset_date: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) => enums.messages.Messages; - /** Target peer */ - peer: enums.InputPeer; - /** Only return messages starting from the specified message ID */ - offset_id: number; - /** Only return messages sent before the specified date */ - offset_date: number; - /** Number of list elements to be skipped, negative values are also accepted. */ - add_offset: number; - /** Number of results to return */ - limit: number; - /** If a positive value was transferred, the method will return only messages with IDs less than **max\_id** */ - max_id: number; - /** If a positive value was transferred, the method will return only messages with IDs more than **min\_id** */ - min_id: number; - /** [Result hash](https://core.telegram.org/api/offsets) */ - hash: bigint; - - protected get [id](): number { - return 0x4423E6C5; - } - - static get [name](): string { - return "messages.getHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["offset_id", "number", "int"], - ["offset_date", "number", "int"], - ["add_offset", "number", "int"], - ["limit", "number", "int"], - ["max_id", "number", "int"], - ["min_id", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.offset_id, "number", "int"], - [this.offset_date, "number", "int"], - [this.add_offset, "number", "int"], - [this.limit, "number", "int"], - [this.max_id, "number", "int"], - [this.min_id, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; offset_id: number; offset_date: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) { - super(); - this.peer = params.peer; - this.offset_id = params.offset_id; - this.offset_date = params.offset_date; - this.add_offset = params.add_offset; - this.limit = params.limit; - this.max_id = params.max_id; - this.min_id = params.min_id; - this.hash = params.hash; - } -} - -/** Search for messages. */ -export class messages_search_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; q: string; from_id?: enums.InputPeer; saved_peer_id?: enums.InputPeer; saved_reaction?: Array; top_msg_id?: number; filter: enums.MessagesFilter; min_date: number; max_date: number; offset_id: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) => enums.messages.Messages; - /** User or chat, histories with which are searched, or [(inputPeerEmpty)](https://core.telegram.org/constructor/inputPeerEmpty) constructor to search in all private chats and [normal groups (not channels) »](https://core.telegram.org/api/channel). Use [messages.searchGlobal](https://core.telegram.org/method/messages.searchGlobal) to search globally in all chats, groups, supergroups and channels. */ - peer: enums.InputPeer; - /** Text search request */ - q: string; - /** Only return messages sent by the specified user ID */ - from_id?: enums.InputPeer; - /** Search within the [saved message dialog »](https://core.telegram.org/api/saved-messages) with this ID. */ - saved_peer_id?: enums.InputPeer; - saved_reaction?: Array; - /** [Thread ID](https://core.telegram.org/api/threads) */ - top_msg_id?: number; - /** Filter to return only specified message types */ - filter: enums.MessagesFilter; - /** If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned */ - min_date: number; - /** If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned */ - max_date: number; - /** Only return messages starting from the specified message ID */ - offset_id: number; - /** [Additional offset](https://core.telegram.org/api/offsets) */ - add_offset: number; - /** [Number of results to return](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Maximum message ID to return](https://core.telegram.org/api/offsets) */ - max_id: number; - /** [Minimum message ID to return](https://core.telegram.org/api/offsets) */ - min_id: number; - /** [Hash](https://core.telegram.org/api/offsets) */ - hash: bigint; - - protected get [id](): number { - return 0x29EE847A; - } - - static get [name](): string { - return "messages.search" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["q", "string", "string"], - ["from_id", types._InputPeer, "flags.0?InputPeer"], - ["saved_peer_id", types._InputPeer, "flags.2?InputPeer"], - ["saved_reaction", [types._Reaction], "flags.3?Vector"], - ["top_msg_id", "number", "flags.1?int"], - ["filter", types._MessagesFilter, "MessagesFilter"], - ["min_date", "number", "int"], - ["max_date", "number", "int"], - ["offset_id", "number", "int"], - ["add_offset", "number", "int"], - ["limit", "number", "int"], - ["max_id", "number", "int"], - ["min_id", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.q, "string", "string"], - [this.from_id ?? null, types._InputPeer, "flags.0?InputPeer"], - [this.saved_peer_id ?? null, types._InputPeer, "flags.2?InputPeer"], - [this.saved_reaction ?? null, [types._Reaction], "flags.3?Vector"], - [this.top_msg_id ?? null, "number", "flags.1?int"], - [this.filter, types._MessagesFilter, "MessagesFilter"], - [this.min_date, "number", "int"], - [this.max_date, "number", "int"], - [this.offset_id, "number", "int"], - [this.add_offset, "number", "int"], - [this.limit, "number", "int"], - [this.max_id, "number", "int"], - [this.min_id, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; q: string; from_id?: enums.InputPeer; saved_peer_id?: enums.InputPeer; saved_reaction?: Array; top_msg_id?: number; filter: enums.MessagesFilter; min_date: number; max_date: number; offset_id: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) { - super(); - this.peer = params.peer; - this.q = params.q; - this.from_id = params.from_id; - this.saved_peer_id = params.saved_peer_id; - this.saved_reaction = params.saved_reaction; - this.top_msg_id = params.top_msg_id; - this.filter = params.filter; - this.min_date = params.min_date; - this.max_date = params.max_date; - this.offset_id = params.offset_id; - this.add_offset = params.add_offset; - this.limit = params.limit; - this.max_id = params.max_id; - this.min_id = params.min_id; - this.hash = params.hash; - } -} - -/** Marks message history as read. */ -export class messages_readHistory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; max_id: number }) => enums.messages.AffectedMessages; - /** Target user or group */ - peer: enums.InputPeer; - /** If a positive value is passed, only messages with identifiers less or equal than the given one will be read */ - max_id: number; - - protected get [id](): number { - return 0x0E306D3A; - } - - static get [name](): string { - return "messages.readHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; max_id: number }) { - super(); - this.peer = params.peer; - this.max_id = params.max_id; - } -} - -/** Deletes communication history. */ -export class messages_deleteHistory_ extends Function_ { - static __F: (params: { just_clear?: true; revoke?: true; peer: enums.InputPeer; max_id: number; min_date?: number; max_date?: number }) => enums.messages.AffectedHistory; - /** Just clear history for the current user, without actually removing messages for every chat user */ - just_clear?: true; - /** Whether to delete the message history for all chat participants */ - revoke?: true; - /** User or chat, communication history of which will be deleted */ - peer: enums.InputPeer; - /** Maximum ID of message to delete */ - max_id: number; - /** Delete all messages newer than this UNIX timestamp */ - min_date?: number; - /** Delete all messages older than this UNIX timestamp */ - max_date?: number; - - protected get [id](): number { - return 0xB08F922A; - } - - static get [name](): string { - return "messages.deleteHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["just_clear", "true", "flags.0?true"], - ["revoke", "true", "flags.1?true"], - ["peer", types._InputPeer, "InputPeer"], - ["max_id", "number", "int"], - ["min_date", "number", "flags.2?int"], - ["max_date", "number", "flags.3?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.just_clear ?? null, "true", "flags.0?true"], - [this.revoke ?? null, "true", "flags.1?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.max_id, "number", "int"], - [this.min_date ?? null, "number", "flags.2?int"], - [this.max_date ?? null, "number", "flags.3?int"], - ]; - } - - constructor(params: { just_clear?: true; revoke?: true; peer: enums.InputPeer; max_id: number; min_date?: number; max_date?: number }) { - super(); - this.just_clear = params.just_clear; - this.revoke = params.revoke; - this.peer = params.peer; - this.max_id = params.max_id; - this.min_date = params.min_date; - this.max_date = params.max_date; - } -} - -/** Deletes messages by their identifiers. */ -export class messages_deleteMessages_ extends Function_ { - static __F: (params: { revoke?: true; id: Array }) => enums.messages.AffectedMessages; - /** Whether to delete messages for all participants of the chat */ - revoke?: true; - /** Message ID list */ - id: Array; - - protected get [id](): number { - return 0xE58E95D2; - } - - static get [name](): string { - return "messages.deleteMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["revoke", "true", "flags.0?true"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.revoke ?? null, "true", "flags.0?true"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { revoke?: true; id: Array }) { - super(); - this.revoke = params.revoke; - this.id = params.id; - } -} - -/** Confirms receipt of messages by a client, cancels PUSH-notification sending. */ -export class messages_receivedMessages_ extends Function_ { - static __F: (params: { max_id: number }) => enums.ReceivedNotifyMessage[]; - /** Maximum message ID available in a client. */ - max_id: number; - - protected get [id](): number { - return 0x05A954C0; - } - - static get [name](): string { - return "messages.receivedMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { max_id: number }) { - super(); - this.max_id = params.max_id; - } -} - -/** Sends a current user typing event (see [SendMessageAction](https://core.telegram.org/type/SendMessageAction) for all event types) to a conversation partner or group. */ -export class messages_setTyping_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; top_msg_id?: number; action: enums.SendMessageAction }) => boolean; - /** Target user or group */ - peer: enums.InputPeer; - /** [Topic ID](https://core.telegram.org/api/threads) */ - top_msg_id?: number; - /** Type of action */ - action: enums.SendMessageAction; - - protected get [id](): number { - return 0x58943EE2; - } - - static get [name](): string { - return "messages.setTyping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ["action", types._SendMessageAction, "SendMessageAction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.action, types._SendMessageAction, "SendMessageAction"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id?: number; action: enums.SendMessageAction }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - this.action = params.action; - } -} - -/** Sends a message to a chat */ -export class messages_sendMessage_ extends Function_ { - static __F: (params: { no_webpage?: true; silent?: true; background?: true; clear_draft?: true; noforwards?: true; update_stickersets_order?: true; invert_media?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; message: string; random_id: bigint; reply_markup?: enums.ReplyMarkup; entities?: Array; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) => enums.Updates; - /** Set this flag to disable generation of the webpage preview */ - no_webpage?: true; - /** Send this message silently (no notifications for the receivers) */ - silent?: true; - /** Send this message as background message */ - background?: true; - /** Clear the draft field */ - clear_draft?: true; - /** Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have [content protection](https://telegram.org/blog/protected-content-delete-by-date-and-more) enabled */ - noforwards?: true; - /** Whether to move used stickersets to top, [see here for more info on this flag »](https://core.telegram.org/api/stickers#recent-stickersets) */ - update_stickersets_order?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** The destination where the message will be sent */ - peer: enums.InputPeer; - /** If set, indicates that the message should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** The message */ - message: string; - /** Unique client message ID required to prevent message resending */ - random_id: bigint; - /** Reply markup for sending bot buttons */ - reply_markup?: enums.ReplyMarkup; - /** Message [entities](https://core.telegram.org/api/entities) for sending styled text */ - entities?: Array; - /** Scheduled message date for [scheduled messages](https://core.telegram.org/api/scheduled-messages) */ - schedule_date?: number; - /** Send this message as the specified peer */ - send_as?: enums.InputPeer; - quick_reply_shortcut?: enums.InputQuickReplyShortcut; - - protected get [id](): number { - return 0xDFF8042C; - } - - static get [name](): string { - return "messages.sendMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.1?true"], - ["silent", "true", "flags.5?true"], - ["background", "true", "flags.6?true"], - ["clear_draft", "true", "flags.7?true"], - ["noforwards", "true", "flags.14?true"], - ["update_stickersets_order", "true", "flags.15?true"], - ["invert_media", "true", "flags.16?true"], - ["peer", types._InputPeer, "InputPeer"], - ["reply_to", types._InputReplyTo, "flags.0?InputReplyTo"], - ["message", "string", "string"], - ["random_id", "bigint", "long"], - ["reply_markup", types._ReplyMarkup, "flags.2?ReplyMarkup"], - ["entities", [types._MessageEntity], "flags.3?Vector"], - ["schedule_date", "number", "flags.10?int"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ["quick_reply_shortcut", types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.1?true"], - [this.silent ?? null, "true", "flags.5?true"], - [this.background ?? null, "true", "flags.6?true"], - [this.clear_draft ?? null, "true", "flags.7?true"], - [this.noforwards ?? null, "true", "flags.14?true"], - [this.update_stickersets_order ?? null, "true", "flags.15?true"], - [this.invert_media ?? null, "true", "flags.16?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.reply_to ?? null, types._InputReplyTo, "flags.0?InputReplyTo"], - [this.message, "string", "string"], - [this.random_id, "bigint", "long"], - [this.reply_markup ?? null, types._ReplyMarkup, "flags.2?ReplyMarkup"], - [this.entities ?? null, [types._MessageEntity], "flags.3?Vector"], - [this.schedule_date ?? null, "number", "flags.10?int"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - [this.quick_reply_shortcut ?? null, types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - constructor(params: { no_webpage?: true; silent?: true; background?: true; clear_draft?: true; noforwards?: true; update_stickersets_order?: true; invert_media?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; message: string; random_id: bigint; reply_markup?: enums.ReplyMarkup; entities?: Array; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) { - super(); - this.no_webpage = params.no_webpage; - this.silent = params.silent; - this.background = params.background; - this.clear_draft = params.clear_draft; - this.noforwards = params.noforwards; - this.update_stickersets_order = params.update_stickersets_order; - this.invert_media = params.invert_media; - this.peer = params.peer; - this.reply_to = params.reply_to; - this.message = params.message; - this.random_id = params.random_id; - this.reply_markup = params.reply_markup; - this.entities = params.entities; - this.schedule_date = params.schedule_date; - this.send_as = params.send_as; - this.quick_reply_shortcut = params.quick_reply_shortcut; - } -} - -/** Send a media */ -export class messages_sendMedia_ extends Function_ { - static __F: (params: { silent?: true; background?: true; clear_draft?: true; noforwards?: true; update_stickersets_order?: true; invert_media?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; media: enums.InputMedia; message: string; random_id: bigint; reply_markup?: enums.ReplyMarkup; entities?: Array; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) => enums.Updates; - /** Send message silently (no notification should be triggered) */ - silent?: true; - /** Send message in background */ - background?: true; - /** Clear the draft */ - clear_draft?: true; - /** Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have [content protection](https://telegram.org/blog/protected-content-delete-by-date-and-more) enabled */ - noforwards?: true; - /** Whether to move used stickersets to top, [see here for more info on this flag »](https://core.telegram.org/api/stickers#recent-stickersets) */ - update_stickersets_order?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** Destination */ - peer: enums.InputPeer; - /** If set, indicates that the message should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** Attached media */ - media: enums.InputMedia; - /** Caption */ - message: string; - /** Random ID to avoid resending the same message */ - random_id: bigint; - /** Reply markup for bot keyboards */ - reply_markup?: enums.ReplyMarkup; - /** Message [entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - /** Scheduled message date for [scheduled messages](https://core.telegram.org/api/scheduled-messages) */ - schedule_date?: number; - /** Send this message as the specified peer */ - send_as?: enums.InputPeer; - quick_reply_shortcut?: enums.InputQuickReplyShortcut; - - protected get [id](): number { - return 0x7BD66041; - } - - static get [name](): string { - return "messages.sendMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.5?true"], - ["background", "true", "flags.6?true"], - ["clear_draft", "true", "flags.7?true"], - ["noforwards", "true", "flags.14?true"], - ["update_stickersets_order", "true", "flags.15?true"], - ["invert_media", "true", "flags.16?true"], - ["peer", types._InputPeer, "InputPeer"], - ["reply_to", types._InputReplyTo, "flags.0?InputReplyTo"], - ["media", types._InputMedia, "InputMedia"], - ["message", "string", "string"], - ["random_id", "bigint", "long"], - ["reply_markup", types._ReplyMarkup, "flags.2?ReplyMarkup"], - ["entities", [types._MessageEntity], "flags.3?Vector"], - ["schedule_date", "number", "flags.10?int"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ["quick_reply_shortcut", types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.5?true"], - [this.background ?? null, "true", "flags.6?true"], - [this.clear_draft ?? null, "true", "flags.7?true"], - [this.noforwards ?? null, "true", "flags.14?true"], - [this.update_stickersets_order ?? null, "true", "flags.15?true"], - [this.invert_media ?? null, "true", "flags.16?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.reply_to ?? null, types._InputReplyTo, "flags.0?InputReplyTo"], - [this.media, types._InputMedia, "InputMedia"], - [this.message, "string", "string"], - [this.random_id, "bigint", "long"], - [this.reply_markup ?? null, types._ReplyMarkup, "flags.2?ReplyMarkup"], - [this.entities ?? null, [types._MessageEntity], "flags.3?Vector"], - [this.schedule_date ?? null, "number", "flags.10?int"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - [this.quick_reply_shortcut ?? null, types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - constructor(params: { silent?: true; background?: true; clear_draft?: true; noforwards?: true; update_stickersets_order?: true; invert_media?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; media: enums.InputMedia; message: string; random_id: bigint; reply_markup?: enums.ReplyMarkup; entities?: Array; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) { - super(); - this.silent = params.silent; - this.background = params.background; - this.clear_draft = params.clear_draft; - this.noforwards = params.noforwards; - this.update_stickersets_order = params.update_stickersets_order; - this.invert_media = params.invert_media; - this.peer = params.peer; - this.reply_to = params.reply_to; - this.media = params.media; - this.message = params.message; - this.random_id = params.random_id; - this.reply_markup = params.reply_markup; - this.entities = params.entities; - this.schedule_date = params.schedule_date; - this.send_as = params.send_as; - this.quick_reply_shortcut = params.quick_reply_shortcut; - } -} - -/** Forwards messages by their IDs. */ -export class messages_forwardMessages_ extends Function_ { - static __F: (params: { silent?: true; background?: true; with_my_score?: true; drop_author?: true; drop_media_captions?: true; noforwards?: true; from_peer: enums.InputPeer; id: Array; random_id: Array; to_peer: enums.InputPeer; top_msg_id?: number; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) => enums.Updates; - /** Whether to send messages silently (no notification will be triggered on the destination clients) */ - silent?: true; - /** Whether to send the message in background */ - background?: true; - /** When forwarding games, whether to include your score in the game */ - with_my_score?: true; - /** Whether to forward messages without quoting the original author */ - drop_author?: true; - /** Whether to strip captions from media */ - drop_media_captions?: true; - /** Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have [content protection](https://telegram.org/blog/protected-content-delete-by-date-and-more) enabled */ - noforwards?: true; - /** Source of messages */ - from_peer: enums.InputPeer; - /** IDs of messages */ - id: Array; - /** Random ID to prevent resending of messages */ - random_id: Array; - /** Destination peer */ - to_peer: enums.InputPeer; - /** Destination [forum topic](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - /** Scheduled message date for scheduled messages */ - schedule_date?: number; - /** Forward the messages as the specified peer */ - send_as?: enums.InputPeer; - quick_reply_shortcut?: enums.InputQuickReplyShortcut; - - protected get [id](): number { - return 0xD5039208; - } - - static get [name](): string { - return "messages.forwardMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.5?true"], - ["background", "true", "flags.6?true"], - ["with_my_score", "true", "flags.8?true"], - ["drop_author", "true", "flags.11?true"], - ["drop_media_captions", "true", "flags.12?true"], - ["noforwards", "true", "flags.14?true"], - ["from_peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ["random_id", ["bigint"], "Vector"], - ["to_peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.9?int"], - ["schedule_date", "number", "flags.10?int"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ["quick_reply_shortcut", types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.5?true"], - [this.background ?? null, "true", "flags.6?true"], - [this.with_my_score ?? null, "true", "flags.8?true"], - [this.drop_author ?? null, "true", "flags.11?true"], - [this.drop_media_captions ?? null, "true", "flags.12?true"], - [this.noforwards ?? null, "true", "flags.14?true"], - [this.from_peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - [this.random_id, ["bigint"], "Vector"], - [this.to_peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.9?int"], - [this.schedule_date ?? null, "number", "flags.10?int"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - [this.quick_reply_shortcut ?? null, types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - constructor(params: { silent?: true; background?: true; with_my_score?: true; drop_author?: true; drop_media_captions?: true; noforwards?: true; from_peer: enums.InputPeer; id: Array; random_id: Array; to_peer: enums.InputPeer; top_msg_id?: number; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) { - super(); - this.silent = params.silent; - this.background = params.background; - this.with_my_score = params.with_my_score; - this.drop_author = params.drop_author; - this.drop_media_captions = params.drop_media_captions; - this.noforwards = params.noforwards; - this.from_peer = params.from_peer; - this.id = params.id; - this.random_id = params.random_id; - this.to_peer = params.to_peer; - this.top_msg_id = params.top_msg_id; - this.schedule_date = params.schedule_date; - this.send_as = params.send_as; - this.quick_reply_shortcut = params.quick_reply_shortcut; - } -} - -/** Report a new incoming chat for spam, if the [peer settings](https://core.telegram.org/constructor/peerSettings) of the chat allow us to do that */ -export class messages_reportSpam_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => boolean; - /** Peer to report */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xCF1592DB; - } - - static get [name](): string { - return "messages.reportSpam" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Get peer settings */ -export class messages_getPeerSettings_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.messages.PeerSettings; - /** The peer */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xEFD9A6A2; - } - - static get [name](): string { - return "messages.getPeerSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Report a message in a chat for violation of telegram's Terms of Service */ -export class messages_report_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array; reason: enums.ReportReason; message: string }) => boolean; - /** Peer */ - peer: enums.InputPeer; - /** IDs of messages to report */ - id: Array; - /** Why are these messages being reported */ - reason: enums.ReportReason; - /** Comment for report moderation */ - message: string; - - protected get [id](): number { - return 0x8953AB4E; - } - - static get [name](): string { - return "messages.report" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ["reason", types._ReportReason, "ReportReason"], - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - [this.reason, types._ReportReason, "ReportReason"], - [this.message, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array; reason: enums.ReportReason; message: string }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.reason = params.reason; - this.message = params.message; - } -} - -/** Returns chat basic info on their IDs. */ -export class messages_getChats_ extends Function_ { - static __F: (params: { id: Array }) => enums.messages.Chats; - /** List of chat IDs */ - id: Array; - - protected get [id](): number { - return 0x49E9528F; - } - - static get [name](): string { - return "messages.getChats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, ["bigint"], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Get full info about a [basic group](https://core.telegram.org/api/channel#basic-groups). */ -export class messages_getFullChat_ extends Function_ { - static __F: (params: { chat_id: bigint }) => enums.messages.ChatFull; - /** [Basic group](https://core.telegram.org/api/channel#basic-groups) ID. */ - chat_id: bigint; - - protected get [id](): number { - return 0xAEB00B34; - } - - static get [name](): string { - return "messages.getFullChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: bigint }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** Changes chat name and sends a service message on it. */ -export class messages_editChatTitle_ extends Function_ { - static __F: (params: { chat_id: bigint; title: string }) => enums.Updates; - /** Chat ID */ - chat_id: bigint; - /** New chat name, different from the old one */ - title: string; - - protected get [id](): number { - return 0x73783FFD; - } - - static get [name](): string { - return "messages.editChatTitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { chat_id: bigint; title: string }) { - super(); - this.chat_id = params.chat_id; - this.title = params.title; - } -} - -/** Changes chat photo and sends a service message on it */ -export class messages_editChatPhoto_ extends Function_ { - static __F: (params: { chat_id: bigint; photo: enums.InputChatPhoto }) => enums.Updates; - /** Chat ID */ - chat_id: bigint; - /** Photo to be set */ - photo: enums.InputChatPhoto; - - protected get [id](): number { - return 0x35DDD674; - } - - static get [name](): string { - return "messages.editChatPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["photo", types._InputChatPhoto, "InputChatPhoto"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.photo, types._InputChatPhoto, "InputChatPhoto"], - ]; - } - - constructor(params: { chat_id: bigint; photo: enums.InputChatPhoto }) { - super(); - this.chat_id = params.chat_id; - this.photo = params.photo; - } -} - -/** Adds a user to a chat and sends a service message on it. */ -export class messages_addChatUser_ extends Function_ { - static __F: (params: { chat_id: bigint; user_id: enums.InputUser; fwd_limit: number }) => enums.messages.InvitedUsers; - /** Chat ID */ - chat_id: bigint; - /** User ID to be added */ - user_id: enums.InputUser; - /** Number of last messages to be forwarded */ - fwd_limit: number; - - protected get [id](): number { - return 0xCBC6D107; - } - - static get [name](): string { - return "messages.addChatUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["user_id", types._InputUser, "InputUser"], - ["fwd_limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.user_id, types._InputUser, "InputUser"], - [this.fwd_limit, "number", "int"], - ]; - } - - constructor(params: { chat_id: bigint; user_id: enums.InputUser; fwd_limit: number }) { - super(); - this.chat_id = params.chat_id; - this.user_id = params.user_id; - this.fwd_limit = params.fwd_limit; - } -} - -/** Deletes a user from a chat and sends a service message on it. */ -export class messages_deleteChatUser_ extends Function_ { - static __F: (params: { revoke_history?: true; chat_id: bigint; user_id: enums.InputUser }) => enums.Updates; - /** Remove the entire chat history of the specified user in this chat. */ - revoke_history?: true; - /** Chat ID */ - chat_id: bigint; - /** User ID to be deleted */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0xA2185CAB; - } - - static get [name](): string { - return "messages.deleteChatUser" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["revoke_history", "true", "flags.0?true"], - ["chat_id", "bigint", "long"], - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.revoke_history ?? null, "true", "flags.0?true"], - [this.chat_id, "bigint", "long"], - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { revoke_history?: true; chat_id: bigint; user_id: enums.InputUser }) { - super(); - this.revoke_history = params.revoke_history; - this.chat_id = params.chat_id; - this.user_id = params.user_id; - } -} - -/** Creates a new chat. */ -export class messages_createChat_ extends Function_ { - static __F: (params: { users: Array; title: string; ttl_period?: number }) => enums.messages.InvitedUsers; - /** List of user IDs to be invited */ - users: Array; - /** Chat name */ - title: string; - /** Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use [messages.setDefaultHistoryTTL](https://core.telegram.org/method/messages.setDefaultHistoryTTL) to edit this value later. */ - ttl_period?: number; - - protected get [id](): number { - return 0x92CEDDD4; - } - - static get [name](): string { - return "messages.createChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["users", [types._InputUser], "Vector"], - ["title", "string", "string"], - ["ttl_period", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.users, [types._InputUser], "Vector"], - [this.title, "string", "string"], - [this.ttl_period ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { users: Array; title: string; ttl_period?: number }) { - super(); - this.users = params.users; - this.title = params.title; - this.ttl_period = params.ttl_period; - } -} - -/** Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length. */ -export class messages_getDhConfig_ extends Function_ { - static __F: (params: { version: number; random_length: number }) => enums.messages.DhConfig; - /** Value of the **version** parameter from [messages.dhConfig](https://core.telegram.org/constructor/messages.dhConfig), available at the client */ - version: number; - /** Length of the required random sequence */ - random_length: number; - - protected get [id](): number { - return 0x26CF8950; - } - - static get [name](): string { - return "messages.getDhConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["version", "number", "int"], - ["random_length", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.version, "number", "int"], - [this.random_length, "number", "int"], - ]; - } - - constructor(params: { version: number; random_length: number }) { - super(); - this.version = params.version; - this.random_length = params.random_length; - } -} - -/** Sends a request to start a secret chat to the user. */ -export class messages_requestEncryption_ extends Function_ { - static __F: (params: { user_id: enums.InputUser; random_id: number; g_a: Uint8Array }) => enums.EncryptedChat; - /** User ID */ - user_id: enums.InputUser; - /** Unique client request ID required to prevent resending. This also doubles as the chat ID. */ - random_id: number; - /** `A = g ^ a mod p`, see [Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) */ - g_a: Uint8Array; - - protected get [id](): number { - return 0xF64DAF43; - } - - static get [name](): string { - return "messages.requestEncryption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ["random_id", "number", "int"], - ["g_a", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - [this.random_id, "number", "int"], - [this.g_a, Uint8Array, "bytes"], - ]; - } - - constructor(params: { user_id: enums.InputUser; random_id: number; g_a: Uint8Array }) { - super(); - this.user_id = params.user_id; - this.random_id = params.random_id; - this.g_a = params.g_a; - } -} - -/** Confirms creation of a secret chat */ -export class messages_acceptEncryption_ extends Function_ { - static __F: (params: { peer: enums.InputEncryptedChat; g_b: Uint8Array; key_fingerprint: bigint }) => enums.EncryptedChat; - /** Secret chat ID */ - peer: enums.InputEncryptedChat; - /** `B = g ^ b mod p`, see [Wikipedia](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) */ - g_b: Uint8Array; - /** 64-bit fingerprint of the received key */ - key_fingerprint: bigint; - - protected get [id](): number { - return 0x3DBC0415; - } - - static get [name](): string { - return "messages.acceptEncryption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["g_b", Uint8Array, "bytes"], - ["key_fingerprint", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.g_b, Uint8Array, "bytes"], - [this.key_fingerprint, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputEncryptedChat; g_b: Uint8Array; key_fingerprint: bigint }) { - super(); - this.peer = params.peer; - this.g_b = params.g_b; - this.key_fingerprint = params.key_fingerprint; - } -} - -/** Cancels a request for creation and/or delete info on secret chat. */ -export class messages_discardEncryption_ extends Function_ { - static __F: (params: { delete_history?: true; chat_id: number }) => boolean; - /** Whether to delete the entire chat history for the other user as well */ - delete_history?: true; - /** Secret chat ID */ - chat_id: number; - - protected get [id](): number { - return 0xF393AEA0; - } - - static get [name](): string { - return "messages.discardEncryption" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["delete_history", "true", "flags.0?true"], - ["chat_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.delete_history ?? null, "true", "flags.0?true"], - [this.chat_id, "number", "int"], - ]; - } - - constructor(params: { delete_history?: true; chat_id: number }) { - super(); - this.delete_history = params.delete_history; - this.chat_id = params.chat_id; - } -} - -/** Send typing event by the current user to a secret chat. */ -export class messages_setEncryptedTyping_ extends Function_ { - static __F: (params: { peer: enums.InputEncryptedChat; typing: boolean }) => boolean; - /** Secret chat ID */ - peer: enums.InputEncryptedChat; - /** Typing. - **Possible values**: - [(boolTrue)](https://core.telegram.org/constructor/boolTrue), if the user started typing and more than **5 seconds** have passed since the last request - [(boolFalse)](https://core.telegram.org/constructor/boolFalse), if the user stopped typing */ - typing: boolean; - - protected get [id](): number { - return 0x791451ED; - } - - static get [name](): string { - return "messages.setEncryptedTyping" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["typing", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.typing, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputEncryptedChat; typing: boolean }) { - super(); - this.peer = params.peer; - this.typing = params.typing; - } -} - -/** Marks message history within a secret chat as read. */ -export class messages_readEncryptedHistory_ extends Function_ { - static __F: (params: { peer: enums.InputEncryptedChat; max_date: number }) => boolean; - /** Secret chat ID */ - peer: enums.InputEncryptedChat; - /** Maximum date value for received messages in history */ - max_date: number; - - protected get [id](): number { - return 0x7F4B690A; - } - - static get [name](): string { - return "messages.readEncryptedHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["max_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.max_date, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputEncryptedChat; max_date: number }) { - super(); - this.peer = params.peer; - this.max_date = params.max_date; - } -} - -/** Sends a text message to a secret chat. */ -export class messages_sendEncrypted_ extends Function_ { - static __F: (params: { silent?: true; peer: enums.InputEncryptedChat; random_id: bigint; data: Uint8Array }) => enums.messages.SentEncryptedMessage; - /** Send encrypted message without a notification */ - silent?: true; - /** Secret chat ID */ - peer: enums.InputEncryptedChat; - /** Unique client message ID, necessary to avoid message resending */ - random_id: bigint; - /** TL-serialization of [DecryptedMessage](https://core.telegram.org/type/DecryptedMessage) type, encrypted with a key that was created during chat initialization */ - data: Uint8Array; - - protected get [id](): number { - return 0x44FA7A15; - } - - static get [name](): string { - return "messages.sendEncrypted" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.0?true"], - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["random_id", "bigint", "long"], - ["data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.0?true"], - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.random_id, "bigint", "long"], - [this.data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { silent?: true; peer: enums.InputEncryptedChat; random_id: bigint; data: Uint8Array }) { - super(); - this.silent = params.silent; - this.peer = params.peer; - this.random_id = params.random_id; - this.data = params.data; - } -} - -/** Sends a message with a file attachment to a secret chat */ -export class messages_sendEncryptedFile_ extends Function_ { - static __F: (params: { silent?: true; peer: enums.InputEncryptedChat; random_id: bigint; data: Uint8Array; file: enums.InputEncryptedFile }) => enums.messages.SentEncryptedMessage; - /** Whether to send the file without triggering a notification */ - silent?: true; - /** Secret chat ID */ - peer: enums.InputEncryptedChat; - /** Unique client message ID necessary to prevent message resending */ - random_id: bigint; - /** TL-serialization of [DecryptedMessage](https://core.telegram.org/type/DecryptedMessage) type, encrypted with a key generated during chat initialization */ - data: Uint8Array; - /** File attachment for the secret chat */ - file: enums.InputEncryptedFile; - - protected get [id](): number { - return 0x5559481D; - } - - static get [name](): string { - return "messages.sendEncryptedFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.0?true"], - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["random_id", "bigint", "long"], - ["data", Uint8Array, "bytes"], - ["file", types._InputEncryptedFile, "InputEncryptedFile"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.0?true"], - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.random_id, "bigint", "long"], - [this.data, Uint8Array, "bytes"], - [this.file, types._InputEncryptedFile, "InputEncryptedFile"], - ]; - } - - constructor(params: { silent?: true; peer: enums.InputEncryptedChat; random_id: bigint; data: Uint8Array; file: enums.InputEncryptedFile }) { - super(); - this.silent = params.silent; - this.peer = params.peer; - this.random_id = params.random_id; - this.data = params.data; - this.file = params.file; - } -} - -/** Sends a service message to a secret chat. */ -export class messages_sendEncryptedService_ extends Function_ { - static __F: (params: { peer: enums.InputEncryptedChat; random_id: bigint; data: Uint8Array }) => enums.messages.SentEncryptedMessage; - /** Secret chat ID */ - peer: enums.InputEncryptedChat; - /** Unique client message ID required to prevent message resending */ - random_id: bigint; - /** TL-serialization of [DecryptedMessage](https://core.telegram.org/type/DecryptedMessage) type, encrypted with a key generated during chat initialization */ - data: Uint8Array; - - protected get [id](): number { - return 0x32D439A4; - } - - static get [name](): string { - return "messages.sendEncryptedService" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["random_id", "bigint", "long"], - ["data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.random_id, "bigint", "long"], - [this.data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { peer: enums.InputEncryptedChat; random_id: bigint; data: Uint8Array }) { - super(); - this.peer = params.peer; - this.random_id = params.random_id; - this.data = params.data; - } -} - -/** Confirms receipt of messages in a secret chat by client, cancels push notifications. -The method returns a list of **random\_id**s of messages for which push notifications were cancelled. */ -export class messages_receivedQueue_ extends Function_ { - static __F: (params: { max_qts: number }) => bigint[]; - /** Maximum qts value available at the client */ - max_qts: number; - - protected get [id](): number { - return 0x55A5BB66; - } - - static get [name](): string { - return "messages.receivedQueue" - } - - static get [paramDesc](): ParamDesc { - return [ - ["max_qts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.max_qts, "number", "int"], - ]; - } - - constructor(params: { max_qts: number }) { - super(); - this.max_qts = params.max_qts; - } -} - -/** Report a secret chat for spam */ -export class messages_reportEncryptedSpam_ extends Function_ { - static __F: (params: { peer: enums.InputEncryptedChat }) => boolean; - /** The secret chat to report */ - peer: enums.InputEncryptedChat; - - protected get [id](): number { - return 0x4B0C8C0F; - } - - static get [name](): string { - return "messages.reportEncryptedSpam" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - ]; - } - - constructor(params: { peer: enums.InputEncryptedChat }) { - super(); - this.peer = params.peer; - } -} - -/** Notifies the sender about the recipient having listened a voice message or watched a video. */ -export class messages_readMessageContents_ extends Function_ { - static __F: (params: { id: Array }) => enums.messages.AffectedMessages; - /** Message ID list */ - id: Array; - - protected get [id](): number { - return 0x36A73F77; - } - - static get [name](): string { - return "messages.readMessageContents" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Get stickers by emoji */ -export class messages_getStickers_ extends Function_ { - static __F: (params: { emoticon: string; hash: bigint }) => enums.messages.Stickers; - /** The emoji */ - emoticon: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xD5A5D3A1; - } - - static get [name](): string { - return "messages.getStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { emoticon: string; hash: bigint }) { - super(); - this.emoticon = params.emoticon; - this.hash = params.hash; - } -} - -/** Get all installed stickers */ -export class messages_getAllStickers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.AllStickers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xB8A0A1A8; - } - - static get [name](): string { - return "messages.getAllStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Get preview of webpage */ -export class messages_getWebPagePreview_ extends Function_ { - static __F: (params: { message: string; entities?: Array }) => enums.MessageMedia; - /** Message from which to extract the preview */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - - protected get [id](): number { - return 0x8B68B0CC; - } - - static get [name](): string { - return "messages.getWebPagePreview" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["message", "string", "string"], - ["entities", [types._MessageEntity], "flags.3?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.message, "string", "string"], - [this.entities ?? null, [types._MessageEntity], "flags.3?Vector"], - ]; - } - - constructor(params: { message: string; entities?: Array }) { - super(); - this.message = params.message; - this.entities = params.entities; - } -} - -/** Export an invite link for a chat */ -export class messages_exportChatInvite_ extends Function_ { - static __F: (params: { legacy_revoke_permanent?: true; request_needed?: true; peer: enums.InputPeer; expire_date?: number; usage_limit?: number; title?: string }) => enums.ExportedChatInvite; - /** Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients. */ - legacy_revoke_permanent?: true; - /** Whether admin confirmation is required before admitting each separate user into the chat */ - request_needed?: true; - /** Chat */ - peer: enums.InputPeer; - /** Expiration date */ - expire_date?: number; - /** Maximum number of users that can join using this link */ - usage_limit?: number; - /** Description of the invite link, visible only to administrators */ - title?: string; - - protected get [id](): number { - return 0xA02CE5D5; - } - - static get [name](): string { - return "messages.exportChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["legacy_revoke_permanent", "true", "flags.2?true"], - ["request_needed", "true", "flags.3?true"], - ["peer", types._InputPeer, "InputPeer"], - ["expire_date", "number", "flags.0?int"], - ["usage_limit", "number", "flags.1?int"], - ["title", "string", "flags.4?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.legacy_revoke_permanent ?? null, "true", "flags.2?true"], - [this.request_needed ?? null, "true", "flags.3?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.expire_date ?? null, "number", "flags.0?int"], - [this.usage_limit ?? null, "number", "flags.1?int"], - [this.title ?? null, "string", "flags.4?string"], - ]; - } - - constructor(params: { legacy_revoke_permanent?: true; request_needed?: true; peer: enums.InputPeer; expire_date?: number; usage_limit?: number; title?: string }) { - super(); - this.legacy_revoke_permanent = params.legacy_revoke_permanent; - this.request_needed = params.request_needed; - this.peer = params.peer; - this.expire_date = params.expire_date; - this.usage_limit = params.usage_limit; - this.title = params.title; - } -} - -/** Check the validity of a chat invite link and get basic info about it */ -export class messages_checkChatInvite_ extends Function_ { - static __F: (params: { hash: string }) => enums.ChatInvite; - /** Invite hash from [chat invite deep link »](https://core.telegram.org/api/links#chat-invite-links). */ - hash: string; - - protected get [id](): number { - return 0x3EADB1BB; - } - - static get [name](): string { - return "messages.checkChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "string", "string"], - ]; - } - - constructor(params: { hash: string }) { - super(); - this.hash = params.hash; - } -} - -/** Import a chat invite and join a private chat/supergroup/channel */ -export class messages_importChatInvite_ extends Function_ { - static __F: (params: { hash: string }) => enums.Updates; - /** `hash` from a [chat invite deep link](https://core.telegram.org/api/links#chat-invite-links) */ - hash: string; - - protected get [id](): number { - return 0x6C50051C; - } - - static get [name](): string { - return "messages.importChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "string", "string"], - ]; - } - - constructor(params: { hash: string }) { - super(); - this.hash = params.hash; - } -} - -/** Get info about a stickerset */ -export class messages_getStickerSet_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet; hash: number }) => enums.messages.StickerSet; - /** Stickerset */ - stickerset: enums.InputStickerSet; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0xC8A0EC74; - } - - static get [name](): string { - return "messages.getStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - [this.hash, "number", "int"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; hash: number }) { - super(); - this.stickerset = params.stickerset; - this.hash = params.hash; - } -} - -/** Install a stickerset */ -export class messages_installStickerSet_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet; archived: boolean }) => enums.messages.StickerSetInstallResult; - /** Stickerset to install */ - stickerset: enums.InputStickerSet; - /** Whether to archive stickerset */ - archived: boolean; - - protected get [id](): number { - return 0xC78FE460; - } - - static get [name](): string { - return "messages.installStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ["archived", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - [this.archived, "boolean", "Bool"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; archived: boolean }) { - super(); - this.stickerset = params.stickerset; - this.archived = params.archived; - } -} - -/** Uninstall a stickerset */ -export class messages_uninstallStickerSet_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet }) => boolean; - /** The stickerset to uninstall */ - stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0xF96E55DE; - } - - static get [name](): string { - return "messages.uninstallStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet }) { - super(); - this.stickerset = params.stickerset; - } -} - -/** Start a conversation with a bot using a [deep linking parameter](https://core.telegram.org/api/links#bot-links) */ -export class messages_startBot_ extends Function_ { - static __F: (params: { bot: enums.InputUser; peer: enums.InputPeer; random_id: bigint; start_param: string }) => enums.Updates; - /** The bot */ - bot: enums.InputUser; - /** The chat where to start the bot, can be the bot's private chat or a group */ - peer: enums.InputPeer; - /** Random ID to avoid resending the same message */ - random_id: bigint; - /** [Deep linking parameter](https://core.telegram.org/api/links#bot-links) */ - start_param: string; - - protected get [id](): number { - return 0xE6DF7378; - } - - static get [name](): string { - return "messages.startBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ["peer", types._InputPeer, "InputPeer"], - ["random_id", "bigint", "long"], - ["start_param", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - [this.peer, types._InputPeer, "InputPeer"], - [this.random_id, "bigint", "long"], - [this.start_param, "string", "string"], - ]; - } - - constructor(params: { bot: enums.InputUser; peer: enums.InputPeer; random_id: bigint; start_param: string }) { - super(); - this.bot = params.bot; - this.peer = params.peer; - this.random_id = params.random_id; - this.start_param = params.start_param; - } -} - -/** Get and increase the view counter of a message sent or forwarded from a [channel](https://core.telegram.org/api/channel) */ -export class messages_getMessagesViews_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array; increment: boolean }) => enums.messages.MessageViews; - /** Peer where the message was found */ - peer: enums.InputPeer; - /** ID of message */ - id: Array; - /** Whether to mark the message as viewed and increment the view counter */ - increment: boolean; - - protected get [id](): number { - return 0x5784D3E1; - } - - static get [name](): string { - return "messages.getMessagesViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ["increment", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - [this.increment, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array; increment: boolean }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.increment = params.increment; - } -} - -/** Make a user admin in a [basic group](https://core.telegram.org/api/channel#basic-groups). */ -export class messages_editChatAdmin_ extends Function_ { - static __F: (params: { chat_id: bigint; user_id: enums.InputUser; is_admin: boolean }) => boolean; - /** The ID of the group */ - chat_id: bigint; - /** The user to make admin */ - user_id: enums.InputUser; - /** Whether to make them admin */ - is_admin: boolean; - - protected get [id](): number { - return 0xA85BD1C2; - } - - static get [name](): string { - return "messages.editChatAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ["user_id", types._InputUser, "InputUser"], - ["is_admin", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - [this.user_id, types._InputUser, "InputUser"], - [this.is_admin, "boolean", "Bool"], - ]; - } - - constructor(params: { chat_id: bigint; user_id: enums.InputUser; is_admin: boolean }) { - super(); - this.chat_id = params.chat_id; - this.user_id = params.user_id; - this.is_admin = params.is_admin; - } -} - -/** Turn a [basic group into a supergroup](https://core.telegram.org/api/channel#migration) */ -export class messages_migrateChat_ extends Function_ { - static __F: (params: { chat_id: bigint }) => enums.Updates; - /** [Basic group](https://core.telegram.org/api/channel#basic-groups) to migrate */ - chat_id: bigint; - - protected get [id](): number { - return 0xA2875319; - } - - static get [name](): string { - return "messages.migrateChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: bigint }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** Search for messages and peers globally */ -export class messages_searchGlobal_ extends Function_ { - static __F: (params: { folder_id?: number; q: string; filter: enums.MessagesFilter; min_date: number; max_date: number; offset_rate: number; offset_peer: enums.InputPeer; offset_id: number; limit: number }) => enums.messages.Messages; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id?: number; - /** Query */ - q: string; - /** Global search filter */ - filter: enums.MessagesFilter; - /** If a positive value was specified, the method will return only messages with date bigger than min\_date */ - min_date: number; - /** If a positive value was transferred, the method will return only messages with date smaller than max\_date */ - max_date: number; - /** Initially 0, then set to the [`next_rate` parameter of messages.messagesSlice](https://core.telegram.org/constructor/messages.messagesSlice) */ - offset_rate: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_peer: enums.InputPeer; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x4BC6589A; - } - - static get [name](): string { - return "messages.searchGlobal" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["folder_id", "number", "flags.0?int"], - ["q", "string", "string"], - ["filter", types._MessagesFilter, "MessagesFilter"], - ["min_date", "number", "int"], - ["max_date", "number", "int"], - ["offset_rate", "number", "int"], - ["offset_peer", types._InputPeer, "InputPeer"], - ["offset_id", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.folder_id ?? null, "number", "flags.0?int"], - [this.q, "string", "string"], - [this.filter, types._MessagesFilter, "MessagesFilter"], - [this.min_date, "number", "int"], - [this.max_date, "number", "int"], - [this.offset_rate, "number", "int"], - [this.offset_peer, types._InputPeer, "InputPeer"], - [this.offset_id, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { folder_id?: number; q: string; filter: enums.MessagesFilter; min_date: number; max_date: number; offset_rate: number; offset_peer: enums.InputPeer; offset_id: number; limit: number }) { - super(); - this.folder_id = params.folder_id; - this.q = params.q; - this.filter = params.filter; - this.min_date = params.min_date; - this.max_date = params.max_date; - this.offset_rate = params.offset_rate; - this.offset_peer = params.offset_peer; - this.offset_id = params.offset_id; - this.limit = params.limit; - } -} - -/** Reorder installed stickersets */ -export class messages_reorderStickerSets_ extends Function_ { - static __F: (params: { masks?: true; emojis?: true; order: Array }) => boolean; - /** Reorder mask stickersets */ - masks?: true; - /** Reorder [custom emoji stickersets](https://core.telegram.org/api/custom-emoji) */ - emojis?: true; - /** New stickerset order by stickerset IDs */ - order: Array; - - protected get [id](): number { - return 0x78337739; - } - - static get [name](): string { - return "messages.reorderStickerSets" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["masks", "true", "flags.0?true"], - ["emojis", "true", "flags.1?true"], - ["order", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.masks ?? null, "true", "flags.0?true"], - [this.emojis ?? null, "true", "flags.1?true"], - [this.order, ["bigint"], "Vector"], - ]; - } - - constructor(params: { masks?: true; emojis?: true; order: Array }) { - super(); - this.masks = params.masks; - this.emojis = params.emojis; - this.order = params.order; - } -} - -/** Get a document by its SHA256 hash, mainly used for gifs */ -export class messages_getDocumentByHash_ extends Function_ { - static __F: (params: { sha256: Uint8Array; size: bigint; mime_type: string }) => enums.Document; - /** SHA256 of file */ - sha256: Uint8Array; - /** Size of the file in bytes */ - size: bigint; - /** Mime type */ - mime_type: string; - - protected get [id](): number { - return 0xB1F2061F; - } - - static get [name](): string { - return "messages.getDocumentByHash" - } - - static get [paramDesc](): ParamDesc { - return [ - ["sha256", Uint8Array, "bytes"], - ["size", "bigint", "long"], - ["mime_type", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.sha256, Uint8Array, "bytes"], - [this.size, "bigint", "long"], - [this.mime_type, "string", "string"], - ]; - } - - constructor(params: { sha256: Uint8Array; size: bigint; mime_type: string }) { - super(); - this.sha256 = params.sha256; - this.size = params.size; - this.mime_type = params.mime_type; - } -} - -/** Get saved GIFs */ -export class messages_getSavedGifs_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.SavedGifs; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x5CF09635; - } - - static get [name](): string { - return "messages.getSavedGifs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Add GIF to saved gifs list */ -export class messages_saveGif_ extends Function_ { - static __F: (params: { id: enums.InputDocument; unsave: boolean }) => boolean; - /** GIF to save */ - id: enums.InputDocument; - /** Whether to remove GIF from saved gifs list */ - unsave: boolean; - - protected get [id](): number { - return 0x327A30CB; - } - - static get [name](): string { - return "messages.saveGif" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputDocument, "InputDocument"], - ["unsave", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputDocument, "InputDocument"], - [this.unsave, "boolean", "Bool"], - ]; - } - - constructor(params: { id: enums.InputDocument; unsave: boolean }) { - super(); - this.id = params.id; - this.unsave = params.unsave; - } -} - -/** Query an inline bot */ -export class messages_getInlineBotResults_ extends Function_ { - static __F: (params: { bot: enums.InputUser; peer: enums.InputPeer; geo_point?: enums.InputGeoPoint; query: string; offset: string }) => enums.messages.BotResults; - /** The bot to query */ - bot: enums.InputUser; - /** The currently opened chat */ - peer: enums.InputPeer; - /** The geolocation, if requested */ - geo_point?: enums.InputGeoPoint; - /** The query */ - query: string; - /** The offset within the results, will be passed directly as-is to the bot. */ - offset: string; - - protected get [id](): number { - return 0x514E999D; - } - - static get [name](): string { - return "messages.getInlineBotResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["bot", types._InputUser, "InputUser"], - ["peer", types._InputPeer, "InputPeer"], - ["geo_point", types._InputGeoPoint, "flags.0?InputGeoPoint"], - ["query", "string", "string"], - ["offset", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.bot, types._InputUser, "InputUser"], - [this.peer, types._InputPeer, "InputPeer"], - [this.geo_point ?? null, types._InputGeoPoint, "flags.0?InputGeoPoint"], - [this.query, "string", "string"], - [this.offset, "string", "string"], - ]; - } - - constructor(params: { bot: enums.InputUser; peer: enums.InputPeer; geo_point?: enums.InputGeoPoint; query: string; offset: string }) { - super(); - this.bot = params.bot; - this.peer = params.peer; - this.geo_point = params.geo_point; - this.query = params.query; - this.offset = params.offset; - } -} - -/** Answer an inline query, for bots only */ -export class messages_setInlineBotResults_ extends Function_ { - static __F: (params: { gallery?: true; private?: true; query_id: bigint; results: Array; cache_time: number; next_offset?: string; switch_pm?: enums.InlineBotSwitchPM; switch_webview?: enums.InlineBotWebView }) => boolean; - /** Set this flag if the results are composed of media files */ - gallery?: true; - /** Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query */ - private?: true; - /** Unique identifier for the answered query */ - query_id: bigint; - /** Vector of results for the inline query */ - results: Array; - /** The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. */ - cache_time: number; - /** Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. */ - next_offset?: string; - /** If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter. */ - switch_pm?: enums.InlineBotSwitchPM; - /** If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified [inline mode mini app](https://core.telegram.org/api/bots/webapps#inline-mode-mini-apps). */ - switch_webview?: enums.InlineBotWebView; - - protected get [id](): number { - return 0xBB12A419; - } - - static get [name](): string { - return "messages.setInlineBotResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["gallery", "true", "flags.0?true"], - ["private", "true", "flags.1?true"], - ["query_id", "bigint", "long"], - ["results", [types._InputBotInlineResult], "Vector"], - ["cache_time", "number", "int"], - ["next_offset", "string", "flags.2?string"], - ["switch_pm", types._InlineBotSwitchPM, "flags.3?InlineBotSwitchPM"], - ["switch_webview", types._InlineBotWebView, "flags.4?InlineBotWebView"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.gallery ?? null, "true", "flags.0?true"], - [this.private ?? null, "true", "flags.1?true"], - [this.query_id, "bigint", "long"], - [this.results, [types._InputBotInlineResult], "Vector"], - [this.cache_time, "number", "int"], - [this.next_offset ?? null, "string", "flags.2?string"], - [this.switch_pm ?? null, types._InlineBotSwitchPM, "flags.3?InlineBotSwitchPM"], - [this.switch_webview ?? null, types._InlineBotWebView, "flags.4?InlineBotWebView"], - ]; - } - - constructor(params: { gallery?: true; private?: true; query_id: bigint; results: Array; cache_time: number; next_offset?: string; switch_pm?: enums.InlineBotSwitchPM; switch_webview?: enums.InlineBotWebView }) { - super(); - this.gallery = params.gallery; - this.private = params.private; - this.query_id = params.query_id; - this.results = params.results; - this.cache_time = params.cache_time; - this.next_offset = params.next_offset; - this.switch_pm = params.switch_pm; - this.switch_webview = params.switch_webview; - } -} - -/** Send a result obtained using [messages.getInlineBotResults](https://core.telegram.org/method/messages.getInlineBotResults). */ -export class messages_sendInlineBotResult_ extends Function_ { - static __F: (params: { silent?: true; background?: true; clear_draft?: true; hide_via?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; random_id: bigint; query_id: bigint; id: string; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) => enums.Updates; - /** Whether to send the message silently (no notification will be triggered on the other client) */ - silent?: true; - /** Whether to send the message in background */ - background?: true; - /** Whether to clear the [draft](https://core.telegram.org/api/drafts) */ - clear_draft?: true; - /** Whether to hide the `via @botname` in the resulting message (only for bot usernames encountered in the [config](https://core.telegram.org/constructor/config)) */ - hide_via?: true; - /** Destination */ - peer: enums.InputPeer; - /** If set, indicates that the message should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** Random ID to avoid resending the same query */ - random_id: bigint; - /** Query ID from [messages.getInlineBotResults](https://core.telegram.org/method/messages.getInlineBotResults) */ - query_id: bigint; - /** Result ID from [messages.getInlineBotResults](https://core.telegram.org/method/messages.getInlineBotResults) */ - id: string; - /** Scheduled message date for scheduled messages */ - schedule_date?: number; - /** Send this message as the specified peer */ - send_as?: enums.InputPeer; - quick_reply_shortcut?: enums.InputQuickReplyShortcut; - - protected get [id](): number { - return 0x3EBEE86A; - } - - static get [name](): string { - return "messages.sendInlineBotResult" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.5?true"], - ["background", "true", "flags.6?true"], - ["clear_draft", "true", "flags.7?true"], - ["hide_via", "true", "flags.11?true"], - ["peer", types._InputPeer, "InputPeer"], - ["reply_to", types._InputReplyTo, "flags.0?InputReplyTo"], - ["random_id", "bigint", "long"], - ["query_id", "bigint", "long"], - ["id", "string", "string"], - ["schedule_date", "number", "flags.10?int"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ["quick_reply_shortcut", types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.5?true"], - [this.background ?? null, "true", "flags.6?true"], - [this.clear_draft ?? null, "true", "flags.7?true"], - [this.hide_via ?? null, "true", "flags.11?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.reply_to ?? null, types._InputReplyTo, "flags.0?InputReplyTo"], - [this.random_id, "bigint", "long"], - [this.query_id, "bigint", "long"], - [this.id, "string", "string"], - [this.schedule_date ?? null, "number", "flags.10?int"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - [this.quick_reply_shortcut ?? null, types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - constructor(params: { silent?: true; background?: true; clear_draft?: true; hide_via?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; random_id: bigint; query_id: bigint; id: string; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) { - super(); - this.silent = params.silent; - this.background = params.background; - this.clear_draft = params.clear_draft; - this.hide_via = params.hide_via; - this.peer = params.peer; - this.reply_to = params.reply_to; - this.random_id = params.random_id; - this.query_id = params.query_id; - this.id = params.id; - this.schedule_date = params.schedule_date; - this.send_as = params.send_as; - this.quick_reply_shortcut = params.quick_reply_shortcut; - } -} - -/** Find out if a media message's caption can be edited */ -export class messages_getMessageEditData_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number }) => enums.messages.MessageEditData; - /** Peer where the media was sent */ - peer: enums.InputPeer; - /** ID of message */ - id: number; - - protected get [id](): number { - return 0xFDA68D36; - } - - static get [name](): string { - return "messages.getMessageEditData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Edit message */ -export class messages_editMessage_ extends Function_ { - static __F: (params: { no_webpage?: true; invert_media?: true; peer: enums.InputPeer; id: number; message?: string; media?: enums.InputMedia; reply_markup?: enums.ReplyMarkup; entities?: Array; schedule_date?: number; quick_reply_shortcut_id?: number }) => enums.Updates; - /** Disable webpage preview */ - no_webpage?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** Where was the message sent */ - peer: enums.InputPeer; - /** ID of the message to edit */ - id: number; - /** New message */ - message?: string; - /** New attached media */ - media?: enums.InputMedia; - /** Reply markup for inline keyboards */ - reply_markup?: enums.ReplyMarkup; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - /** Scheduled message date for [scheduled messages](https://core.telegram.org/api/scheduled-messages) */ - schedule_date?: number; - quick_reply_shortcut_id?: number; - - protected get [id](): number { - return 0xDFD14005; - } - - static get [name](): string { - return "messages.editMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.1?true"], - ["invert_media", "true", "flags.16?true"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["message", "string", "flags.11?string"], - ["media", types._InputMedia, "flags.14?InputMedia"], - ["reply_markup", types._ReplyMarkup, "flags.2?ReplyMarkup"], - ["entities", [types._MessageEntity], "flags.3?Vector"], - ["schedule_date", "number", "flags.15?int"], - ["quick_reply_shortcut_id", "number", "flags.17?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.1?true"], - [this.invert_media ?? null, "true", "flags.16?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.message ?? null, "string", "flags.11?string"], - [this.media ?? null, types._InputMedia, "flags.14?InputMedia"], - [this.reply_markup ?? null, types._ReplyMarkup, "flags.2?ReplyMarkup"], - [this.entities ?? null, [types._MessageEntity], "flags.3?Vector"], - [this.schedule_date ?? null, "number", "flags.15?int"], - [this.quick_reply_shortcut_id ?? null, "number", "flags.17?int"], - ]; - } - - constructor(params: { no_webpage?: true; invert_media?: true; peer: enums.InputPeer; id: number; message?: string; media?: enums.InputMedia; reply_markup?: enums.ReplyMarkup; entities?: Array; schedule_date?: number; quick_reply_shortcut_id?: number }) { - super(); - this.no_webpage = params.no_webpage; - this.invert_media = params.invert_media; - this.peer = params.peer; - this.id = params.id; - this.message = params.message; - this.media = params.media; - this.reply_markup = params.reply_markup; - this.entities = params.entities; - this.schedule_date = params.schedule_date; - this.quick_reply_shortcut_id = params.quick_reply_shortcut_id; - } -} - -/** Edit an inline bot message */ -export class messages_editInlineBotMessage_ extends Function_ { - static __F: (params: { no_webpage?: true; invert_media?: true; id: enums.InputBotInlineMessageID; message?: string; media?: enums.InputMedia; reply_markup?: enums.ReplyMarkup; entities?: Array }) => boolean; - /** Disable webpage preview */ - no_webpage?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** Sent inline message ID */ - id: enums.InputBotInlineMessageID; - /** Message */ - message?: string; - /** Media */ - media?: enums.InputMedia; - /** Reply markup for inline keyboards */ - reply_markup?: enums.ReplyMarkup; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities?: Array; - - protected get [id](): number { - return 0x83557DBA; - } - - static get [name](): string { - return "messages.editInlineBotMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.1?true"], - ["invert_media", "true", "flags.16?true"], - ["id", types._InputBotInlineMessageID, "InputBotInlineMessageID"], - ["message", "string", "flags.11?string"], - ["media", types._InputMedia, "flags.14?InputMedia"], - ["reply_markup", types._ReplyMarkup, "flags.2?ReplyMarkup"], - ["entities", [types._MessageEntity], "flags.3?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.1?true"], - [this.invert_media ?? null, "true", "flags.16?true"], - [this.id, types._InputBotInlineMessageID, "InputBotInlineMessageID"], - [this.message ?? null, "string", "flags.11?string"], - [this.media ?? null, types._InputMedia, "flags.14?InputMedia"], - [this.reply_markup ?? null, types._ReplyMarkup, "flags.2?ReplyMarkup"], - [this.entities ?? null, [types._MessageEntity], "flags.3?Vector"], - ]; - } - - constructor(params: { no_webpage?: true; invert_media?: true; id: enums.InputBotInlineMessageID; message?: string; media?: enums.InputMedia; reply_markup?: enums.ReplyMarkup; entities?: Array }) { - super(); - this.no_webpage = params.no_webpage; - this.invert_media = params.invert_media; - this.id = params.id; - this.message = params.message; - this.media = params.media; - this.reply_markup = params.reply_markup; - this.entities = params.entities; - } -} - -/** Press an inline callback button and get a callback answer from the bot */ -export class messages_getBotCallbackAnswer_ extends Function_ { - static __F: (params: { game?: true; peer: enums.InputPeer; msg_id: number; data?: Uint8Array; password?: enums.InputCheckPasswordSRP }) => enums.messages.BotCallbackAnswer; - /** Whether this is a "play game" button */ - game?: true; - /** Where was the inline keyboard sent */ - peer: enums.InputPeer; - /** ID of the Message with the inline keyboard */ - msg_id: number; - /** Callback data */ - data?: Uint8Array; - /** For buttons [requiring you to verify your identity with your 2FA password](https://core.telegram.org/constructor/keyboardButtonCallback), the SRP payload generated using [SRP](https://core.telegram.org/api/srp). */ - password?: enums.InputCheckPasswordSRP; - - protected get [id](): number { - return 0x9342CA07; - } - - static get [name](): string { - return "messages.getBotCallbackAnswer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["game", "true", "flags.1?true"], - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["data", Uint8Array, "flags.0?bytes"], - ["password", types._InputCheckPasswordSRP, "flags.2?InputCheckPasswordSRP"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.game ?? null, "true", "flags.1?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.data ?? null, Uint8Array, "flags.0?bytes"], - [this.password ?? null, types._InputCheckPasswordSRP, "flags.2?InputCheckPasswordSRP"], - ]; - } - - constructor(params: { game?: true; peer: enums.InputPeer; msg_id: number; data?: Uint8Array; password?: enums.InputCheckPasswordSRP }) { - super(); - this.game = params.game; - this.peer = params.peer; - this.msg_id = params.msg_id; - this.data = params.data; - this.password = params.password; - } -} - -/** Set the callback answer to a user button press (bots only) */ -export class messages_setBotCallbackAnswer_ extends Function_ { - static __F: (params: { alert?: true; query_id: bigint; message?: string; url?: string; cache_time: number }) => boolean; - /** Whether to show the message as a popup instead of a toast notification */ - alert?: true; - /** Query ID */ - query_id: bigint; - /** Popup to show */ - message?: string; - /** URL to open */ - url?: string; - /** Cache validity */ - cache_time: number; - - protected get [id](): number { - return 0xD58F130A; - } - - static get [name](): string { - return "messages.setBotCallbackAnswer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["alert", "true", "flags.1?true"], - ["query_id", "bigint", "long"], - ["message", "string", "flags.0?string"], - ["url", "string", "flags.2?string"], - ["cache_time", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.alert ?? null, "true", "flags.1?true"], - [this.query_id, "bigint", "long"], - [this.message ?? null, "string", "flags.0?string"], - [this.url ?? null, "string", "flags.2?string"], - [this.cache_time, "number", "int"], - ]; - } - - constructor(params: { alert?: true; query_id: bigint; message?: string; url?: string; cache_time: number }) { - super(); - this.alert = params.alert; - this.query_id = params.query_id; - this.message = params.message; - this.url = params.url; - this.cache_time = params.cache_time; - } -} - -/** Get dialog info of specified peers */ -export class messages_getPeerDialogs_ extends Function_ { - static __F: (params: { peers: Array }) => enums.messages.PeerDialogs; - /** Peers */ - peers: Array; - - protected get [id](): number { - return 0xE470BCFD; - } - - static get [name](): string { - return "messages.getPeerDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peers", [types._InputDialogPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peers, [types._InputDialogPeer], "Vector"], - ]; - } - - constructor(params: { peers: Array }) { - super(); - this.peers = params.peers; - } -} - -/** Save a message [draft](https://core.telegram.org/api/drafts) associated to a chat. */ -export class messages_saveDraft_ extends Function_ { - static __F: (params: { no_webpage?: true; invert_media?: true; reply_to?: enums.InputReplyTo; peer: enums.InputPeer; message: string; entities?: Array; media?: enums.InputMedia }) => boolean; - /** Disable generation of the webpage preview */ - no_webpage?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** If set, indicates that the message should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** Destination of the message that should be sent */ - peer: enums.InputPeer; - /** The draft */ - message: string; - /** Message [entities](https://core.telegram.org/api/entities) for styled text */ - entities?: Array; - /** Attached media */ - media?: enums.InputMedia; - - protected get [id](): number { - return 0x7FF3B806; - } - - static get [name](): string { - return "messages.saveDraft" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["no_webpage", "true", "flags.1?true"], - ["invert_media", "true", "flags.6?true"], - ["reply_to", types._InputReplyTo, "flags.4?InputReplyTo"], - ["peer", types._InputPeer, "InputPeer"], - ["message", "string", "string"], - ["entities", [types._MessageEntity], "flags.3?Vector"], - ["media", types._InputMedia, "flags.5?InputMedia"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.no_webpage ?? null, "true", "flags.1?true"], - [this.invert_media ?? null, "true", "flags.6?true"], - [this.reply_to ?? null, types._InputReplyTo, "flags.4?InputReplyTo"], - [this.peer, types._InputPeer, "InputPeer"], - [this.message, "string", "string"], - [this.entities ?? null, [types._MessageEntity], "flags.3?Vector"], - [this.media ?? null, types._InputMedia, "flags.5?InputMedia"], - ]; - } - - constructor(params: { no_webpage?: true; invert_media?: true; reply_to?: enums.InputReplyTo; peer: enums.InputPeer; message: string; entities?: Array; media?: enums.InputMedia }) { - super(); - this.no_webpage = params.no_webpage; - this.invert_media = params.invert_media; - this.reply_to = params.reply_to; - this.peer = params.peer; - this.message = params.message; - this.entities = params.entities; - this.media = params.media; - } -} - -/** Return all message [drafts](https://core.telegram.org/api/drafts). -Returns all the latest [updateDraftMessage](https://core.telegram.org/constructor/updateDraftMessage) updates related to all chats with drafts. */ -export class messages_getAllDrafts_ extends Function_ { - static __F: () => enums.Updates; - protected get [id](): number { - return 0x6A3F8D65; - } - - static get [name](): string { - return "messages.getAllDrafts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get featured stickers */ -export class messages_getFeaturedStickers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.FeaturedStickers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x64780B14; - } - - static get [name](): string { - return "messages.getFeaturedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Mark new featured stickers as read */ -export class messages_readFeaturedStickers_ extends Function_ { - static __F: (params: { id: Array }) => boolean; - /** IDs of stickersets to mark as read */ - id: Array; - - protected get [id](): number { - return 0x5B118126; - } - - static get [name](): string { - return "messages.readFeaturedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, ["bigint"], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Get recent stickers */ -export class messages_getRecentStickers_ extends Function_ { - static __F: (params: { attached?: true; hash: bigint }) => enums.messages.RecentStickers; - /** Get stickers recently attached to photo or video files */ - attached?: true; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x9DA9403B; - } - - static get [name](): string { - return "messages.getRecentStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["attached", "true", "flags.0?true"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.attached ?? null, "true", "flags.0?true"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { attached?: true; hash: bigint }) { - super(); - this.attached = params.attached; - this.hash = params.hash; - } -} - -/** Add/remove sticker from recent stickers list */ -export class messages_saveRecentSticker_ extends Function_ { - static __F: (params: { attached?: true; id: enums.InputDocument; unsave: boolean }) => boolean; - /** Whether to add/remove stickers recently attached to photo or video files */ - attached?: true; - /** Sticker */ - id: enums.InputDocument; - /** Whether to save or unsave the sticker */ - unsave: boolean; - - protected get [id](): number { - return 0x392718F8; - } - - static get [name](): string { - return "messages.saveRecentSticker" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["attached", "true", "flags.0?true"], - ["id", types._InputDocument, "InputDocument"], - ["unsave", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.attached ?? null, "true", "flags.0?true"], - [this.id, types._InputDocument, "InputDocument"], - [this.unsave, "boolean", "Bool"], - ]; - } - - constructor(params: { attached?: true; id: enums.InputDocument; unsave: boolean }) { - super(); - this.attached = params.attached; - this.id = params.id; - this.unsave = params.unsave; - } -} - -/** Clear recent stickers */ -export class messages_clearRecentStickers_ extends Function_ { - static __F: (params?: { attached?: true }) => boolean; - /** Set this flag to clear the list of stickers recently attached to photo or video files */ - attached?: true; - - protected get [id](): number { - return 0x8999602D; - } - - static get [name](): string { - return "messages.clearRecentStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["attached", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.attached ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { attached?: true }) { - super(); - this.attached = params?.attached; - } -} - -/** Get all archived stickers */ -export class messages_getArchivedStickers_ extends Function_ { - static __F: (params: { masks?: true; emojis?: true; offset_id: bigint; limit: number }) => enums.messages.ArchivedStickers; - /** Get [mask stickers](https://core.telegram.org/api/stickers#mask-stickers) */ - masks?: true; - /** Get [custom emoji stickers](https://core.telegram.org/api/custom-emoji) */ - emojis?: true; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: bigint; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x57F17692; - } - - static get [name](): string { - return "messages.getArchivedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["masks", "true", "flags.0?true"], - ["emojis", "true", "flags.1?true"], - ["offset_id", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.masks ?? null, "true", "flags.0?true"], - [this.emojis ?? null, "true", "flags.1?true"], - [this.offset_id, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { masks?: true; emojis?: true; offset_id: bigint; limit: number }) { - super(); - this.masks = params.masks; - this.emojis = params.emojis; - this.offset_id = params.offset_id; - this.limit = params.limit; - } -} - -/** Get installed mask stickers */ -export class messages_getMaskStickers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.AllStickers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x640F82B8; - } - - static get [name](): string { - return "messages.getMaskStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Get stickers attached to a photo or video */ -export class messages_getAttachedStickers_ extends Function_ { - static __F: (params: { media: enums.InputStickeredMedia }) => enums.StickerSetCovered[]; - /** Stickered media */ - media: enums.InputStickeredMedia; - - protected get [id](): number { - return 0xCC5B67CC; - } - - static get [name](): string { - return "messages.getAttachedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["media", types._InputStickeredMedia, "InputStickeredMedia"], - ]; - } - - protected get [params](): Params { - return [ - [this.media, types._InputStickeredMedia, "InputStickeredMedia"], - ]; - } - - constructor(params: { media: enums.InputStickeredMedia }) { - super(); - this.media = params.media; - } -} - -/** Use this method to set the score of the specified user in a game sent as a normal message (bots only). */ -export class messages_setGameScore_ extends Function_ { - static __F: (params: { edit_message?: true; force?: true; peer: enums.InputPeer; id: number; user_id: enums.InputUser; score: number }) => enums.Updates; - /** Set this flag if the game message should be automatically edited to include the current scoreboard */ - edit_message?: true; - /** Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters */ - force?: true; - /** Unique identifier of target chat */ - peer: enums.InputPeer; - /** Identifier of the sent message */ - id: number; - /** User identifier */ - user_id: enums.InputUser; - /** New score */ - score: number; - - protected get [id](): number { - return 0x8EF8ECC0; - } - - static get [name](): string { - return "messages.setGameScore" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["edit_message", "true", "flags.0?true"], - ["force", "true", "flags.1?true"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["user_id", types._InputUser, "InputUser"], - ["score", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.edit_message ?? null, "true", "flags.0?true"], - [this.force ?? null, "true", "flags.1?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.user_id, types._InputUser, "InputUser"], - [this.score, "number", "int"], - ]; - } - - constructor(params: { edit_message?: true; force?: true; peer: enums.InputPeer; id: number; user_id: enums.InputUser; score: number }) { - super(); - this.edit_message = params.edit_message; - this.force = params.force; - this.peer = params.peer; - this.id = params.id; - this.user_id = params.user_id; - this.score = params.score; - } -} - -/** Use this method to set the score of the specified user in a game sent as an inline message (bots only). */ -export class messages_setInlineGameScore_ extends Function_ { - static __F: (params: { edit_message?: true; force?: true; id: enums.InputBotInlineMessageID; user_id: enums.InputUser; score: number }) => boolean; - /** Set this flag if the game message should be automatically edited to include the current scoreboard */ - edit_message?: true; - /** Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters */ - force?: true; - /** ID of the inline message */ - id: enums.InputBotInlineMessageID; - /** User identifier */ - user_id: enums.InputUser; - /** New score */ - score: number; - - protected get [id](): number { - return 0x15AD9F64; - } - - static get [name](): string { - return "messages.setInlineGameScore" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["edit_message", "true", "flags.0?true"], - ["force", "true", "flags.1?true"], - ["id", types._InputBotInlineMessageID, "InputBotInlineMessageID"], - ["user_id", types._InputUser, "InputUser"], - ["score", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.edit_message ?? null, "true", "flags.0?true"], - [this.force ?? null, "true", "flags.1?true"], - [this.id, types._InputBotInlineMessageID, "InputBotInlineMessageID"], - [this.user_id, types._InputUser, "InputUser"], - [this.score, "number", "int"], - ]; - } - - constructor(params: { edit_message?: true; force?: true; id: enums.InputBotInlineMessageID; user_id: enums.InputUser; score: number }) { - super(); - this.edit_message = params.edit_message; - this.force = params.force; - this.id = params.id; - this.user_id = params.user_id; - this.score = params.score; - } -} - -/** Get highscores of a game */ -export class messages_getGameHighScores_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number; user_id: enums.InputUser }) => enums.messages.HighScores; - /** Where was the game sent */ - peer: enums.InputPeer; - /** ID of message with game media attachment */ - id: number; - /** Get high scores made by a certain user */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0xE822649D; - } - - static get [name](): string { - return "messages.getGameHighScores" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number; user_id: enums.InputUser }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.user_id = params.user_id; - } -} - -/** Get highscores of a game sent using an inline bot */ -export class messages_getInlineGameHighScores_ extends Function_ { - static __F: (params: { id: enums.InputBotInlineMessageID; user_id: enums.InputUser }) => enums.messages.HighScores; - /** ID of inline message */ - id: enums.InputBotInlineMessageID; - /** Get high scores of a certain user */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x0F635E1B; - } - - static get [name](): string { - return "messages.getInlineGameHighScores" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputBotInlineMessageID, "InputBotInlineMessageID"], - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputBotInlineMessageID, "InputBotInlineMessageID"], - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { id: enums.InputBotInlineMessageID; user_id: enums.InputUser }) { - super(); - this.id = params.id; - this.user_id = params.user_id; - } -} - -/** Get chats in common with a user */ -export class messages_getCommonChats_ extends Function_ { - static __F: (params: { user_id: enums.InputUser; max_id: bigint; limit: number }) => enums.messages.Chats; - /** User ID */ - user_id: enums.InputUser; - /** Maximum ID of chat to return (see [pagination](https://core.telegram.org/api/offsets)) */ - max_id: bigint; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xE40CA104; - } - - static get [name](): string { - return "messages.getCommonChats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ["max_id", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - [this.max_id, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { user_id: enums.InputUser; max_id: bigint; limit: number }) { - super(); - this.user_id = params.user_id; - this.max_id = params.max_id; - this.limit = params.limit; - } -} - -/** Get [instant view](https://instantview.telegram.org) page */ -export class messages_getWebPage_ extends Function_ { - static __F: (params: { url: string; hash: number }) => enums.messages.WebPage; - /** URL of IV page to fetch */ - url: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x8D9692A3; - } - - static get [name](): string { - return "messages.getWebPage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["url", "string", "string"], - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.url, "string", "string"], - [this.hash, "number", "int"], - ]; - } - - constructor(params: { url: string; hash: number }) { - super(); - this.url = params.url; - this.hash = params.hash; - } -} - -/** Pin/unpin a dialog */ -export class messages_toggleDialogPin_ extends Function_ { - static __F: (params: { pinned?: true; peer: enums.InputDialogPeer }) => boolean; - /** Whether to pin or unpin the dialog */ - pinned?: true; - /** The dialog to pin */ - peer: enums.InputDialogPeer; - - protected get [id](): number { - return 0xA731E257; - } - - static get [name](): string { - return "messages.toggleDialogPin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["peer", types._InputDialogPeer, "InputDialogPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.peer, types._InputDialogPeer, "InputDialogPeer"], - ]; - } - - constructor(params: { pinned?: true; peer: enums.InputDialogPeer }) { - super(); - this.pinned = params.pinned; - this.peer = params.peer; - } -} - -/** Reorder pinned dialogs */ -export class messages_reorderPinnedDialogs_ extends Function_ { - static __F: (params: { force?: true; folder_id: number; order: Array }) => boolean; - /** If set, dialogs pinned server-side but not present in the `order` field will be unpinned. */ - force?: true; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id: number; - /** New dialog order */ - order: Array; - - protected get [id](): number { - return 0x3B1ADF37; - } - - static get [name](): string { - return "messages.reorderPinnedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["force", "true", "flags.0?true"], - ["folder_id", "number", "int"], - ["order", [types._InputDialogPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.force ?? null, "true", "flags.0?true"], - [this.folder_id, "number", "int"], - [this.order, [types._InputDialogPeer], "Vector"], - ]; - } - - constructor(params: { force?: true; folder_id: number; order: Array }) { - super(); - this.force = params.force; - this.folder_id = params.folder_id; - this.order = params.order; - } -} - -/** Get pinned dialogs */ -export class messages_getPinnedDialogs_ extends Function_ { - static __F: (params: { folder_id: number }) => enums.messages.PeerDialogs; - /** [Peer folder ID, for more info click here](https://core.telegram.org/api/folders#peer-folders) */ - folder_id: number; - - protected get [id](): number { - return 0xD6B94DF2; - } - - static get [name](): string { - return "messages.getPinnedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["folder_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.folder_id, "number", "int"], - ]; - } - - constructor(params: { folder_id: number }) { - super(); - this.folder_id = params.folder_id; - } -} - -/** If you sent an invoice requesting a shipping address and the parameter is\_flexible was specified, the bot will receive an [updateBotShippingQuery](https://core.telegram.org/constructor/updateBotShippingQuery) update. Use this method to reply to shipping queries. */ -export class messages_setBotShippingResults_ extends Function_ { - static __F: (params: { query_id: bigint; error?: string; shipping_options?: Array }) => boolean; - /** Unique identifier for the query to be answered */ - query_id: bigint; - /** Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable"). Telegram will display this message to the user. */ - error?: string; - /** A vector of available shipping options. */ - shipping_options?: Array; - - protected get [id](): number { - return 0xE5F672FA; - } - - static get [name](): string { - return "messages.setBotShippingResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["query_id", "bigint", "long"], - ["error", "string", "flags.0?string"], - ["shipping_options", [types._ShippingOption], "flags.1?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.query_id, "bigint", "long"], - [this.error ?? null, "string", "flags.0?string"], - [this.shipping_options ?? null, [types._ShippingOption], "flags.1?Vector"], - ]; - } - - constructor(params: { query_id: bigint; error?: string; shipping_options?: Array }) { - super(); - this.query_id = params.query_id; - this.error = params.error; - this.shipping_options = params.shipping_options; - } -} - -/** Once the user has confirmed their payment and shipping details, the bot receives an [updateBotPrecheckoutQuery](https://core.telegram.org/constructor/updateBotPrecheckoutQuery) update. -Use this method to respond to such pre-checkout queries. -**Note**: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. */ -export class messages_setBotPrecheckoutResults_ extends Function_ { - static __F: (params: { success?: true; query_id: bigint; error?: string }) => boolean; - /** Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the `error` field, instead */ - success?: true; - /** Unique identifier for the query to be answered */ - query_id: bigint; - /** Required if the `success` isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. */ - error?: string; - - protected get [id](): number { - return 0x09C2DD95; - } - - static get [name](): string { - return "messages.setBotPrecheckoutResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["success", "true", "flags.1?true"], - ["query_id", "bigint", "long"], - ["error", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.success ?? null, "true", "flags.1?true"], - [this.query_id, "bigint", "long"], - [this.error ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { success?: true; query_id: bigint; error?: string }) { - super(); - this.success = params.success; - this.query_id = params.query_id; - this.error = params.error; - } -} - -/** Upload a file and associate it to a chat (without actually sending it to the chat) */ -export class messages_uploadMedia_ extends Function_ { - static __F: (params: { business_connection_id?: string; peer: enums.InputPeer; media: enums.InputMedia }) => enums.MessageMedia; - business_connection_id?: string; - /** The chat, can be [inputPeerEmpty](https://core.telegram.org/constructor/inputPeerEmpty) for bots and [inputPeerSelf](https://core.telegram.org/constructor/inputPeerSelf) for users. */ - peer: enums.InputPeer; - /** File uploaded in chunks as described in [files »](https://core.telegram.org/api/files) */ - media: enums.InputMedia; - - protected get [id](): number { - return 0x14967978; - } - - static get [name](): string { - return "messages.uploadMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["business_connection_id", "string", "flags.0?string"], - ["peer", types._InputPeer, "InputPeer"], - ["media", types._InputMedia, "InputMedia"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.business_connection_id ?? null, "string", "flags.0?string"], - [this.peer, types._InputPeer, "InputPeer"], - [this.media, types._InputMedia, "InputMedia"], - ]; - } - - constructor(params: { business_connection_id?: string; peer: enums.InputPeer; media: enums.InputMedia }) { - super(); - this.business_connection_id = params.business_connection_id; - this.peer = params.peer; - this.media = params.media; - } -} - -/** Notify the other user in a private chat that a screenshot of the chat was taken */ -export class messages_sendScreenshotNotification_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; reply_to: enums.InputReplyTo; random_id: bigint }) => enums.Updates; - /** Other user */ - peer: enums.InputPeer; - /** Indicates the message that was screenshotted (the specified message ID can also be `0` to avoid indicating any specific message). */ - reply_to: enums.InputReplyTo; - /** Random ID to avoid message resending */ - random_id: bigint; - - protected get [id](): number { - return 0xA1405817; - } - - static get [name](): string { - return "messages.sendScreenshotNotification" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["reply_to", types._InputReplyTo, "InputReplyTo"], - ["random_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.reply_to, types._InputReplyTo, "InputReplyTo"], - [this.random_id, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; reply_to: enums.InputReplyTo; random_id: bigint }) { - super(); - this.peer = params.peer; - this.reply_to = params.reply_to; - this.random_id = params.random_id; - } -} - -/** Get faved stickers */ -export class messages_getFavedStickers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.FavedStickers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x04F1AAA9; - } - - static get [name](): string { - return "messages.getFavedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Mark or unmark a sticker as favorite */ -export class messages_faveSticker_ extends Function_ { - static __F: (params: { id: enums.InputDocument; unfave: boolean }) => boolean; - /** Sticker in question */ - id: enums.InputDocument; - /** Whether to add or remove a sticker from favorites */ - unfave: boolean; - - protected get [id](): number { - return 0xB9FFC55B; - } - - static get [name](): string { - return "messages.faveSticker" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._InputDocument, "InputDocument"], - ["unfave", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._InputDocument, "InputDocument"], - [this.unfave, "boolean", "Bool"], - ]; - } - - constructor(params: { id: enums.InputDocument; unfave: boolean }) { - super(); - this.id = params.id; - this.unfave = params.unfave; - } -} - -/** Get unread messages where we were mentioned */ -export class messages_getUnreadMentions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; top_msg_id?: number; offset_id: number; add_offset: number; limit: number; max_id: number; min_id: number }) => enums.messages.Messages; - /** Peer where to look for mentions */ - peer: enums.InputPeer; - /** If set, considers only messages within the specified [forum topic](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - add_offset: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** Maximum message ID to return, [see pagination](https://core.telegram.org/api/offsets) */ - max_id: number; - /** Minimum message ID to return, [see pagination](https://core.telegram.org/api/offsets) */ - min_id: number; - - protected get [id](): number { - return 0xF107E790; - } - - static get [name](): string { - return "messages.getUnreadMentions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ["offset_id", "number", "int"], - ["add_offset", "number", "int"], - ["limit", "number", "int"], - ["max_id", "number", "int"], - ["min_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.offset_id, "number", "int"], - [this.add_offset, "number", "int"], - [this.limit, "number", "int"], - [this.max_id, "number", "int"], - [this.min_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id?: number; offset_id: number; add_offset: number; limit: number; max_id: number; min_id: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - this.offset_id = params.offset_id; - this.add_offset = params.add_offset; - this.limit = params.limit; - this.max_id = params.max_id; - this.min_id = params.min_id; - } -} - -/** Mark mentions as read */ -export class messages_readMentions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; top_msg_id?: number }) => enums.messages.AffectedHistory; - /** Dialog */ - peer: enums.InputPeer; - /** Mark as read only mentions within the specified [forum topic](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - - protected get [id](): number { - return 0x36E5BF4D; - } - - static get [name](): string { - return "messages.readMentions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id?: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - } -} - -/** Get live location history of a certain user */ -export class messages_getRecentLocations_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; limit: number; hash: bigint }) => enums.messages.Messages; - /** User */ - peer: enums.InputPeer; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x702A40E0; - } - - static get [name](): string { - return "messages.getRecentLocations" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; limit: number; hash: bigint }) { - super(); - this.peer = params.peer; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Send an [album or grouped media](https://core.telegram.org/api/files#albums-grouped-media) */ -export class messages_sendMultiMedia_ extends Function_ { - static __F: (params: { silent?: true; background?: true; clear_draft?: true; noforwards?: true; update_stickersets_order?: true; invert_media?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; multi_media: Array; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) => enums.Updates; - /** Whether to send the album silently (no notification triggered) */ - silent?: true; - /** Send in background? */ - background?: true; - /** Whether to clear [drafts](https://core.telegram.org/api/drafts) */ - clear_draft?: true; - /** Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have [content protection](https://telegram.org/blog/protected-content-delete-by-date-and-more) enabled */ - noforwards?: true; - /** Whether to move used stickersets to top, [see here for more info on this flag »](https://core.telegram.org/api/stickers#recent-stickersets) */ - update_stickersets_order?: true; - /** If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. */ - invert_media?: true; - /** The destination chat */ - peer: enums.InputPeer; - /** If set, indicates that the message should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** The medias to send: note that they must be separately uploaded using [messages.uploadMedia](https://core.telegram.org/method/messages.uploadMedia) first, using raw `inputMediaUploaded*` constructors is not supported. */ - multi_media: Array; - /** Scheduled message date for scheduled messages */ - schedule_date?: number; - /** Send this message as the specified peer */ - send_as?: enums.InputPeer; - quick_reply_shortcut?: enums.InputQuickReplyShortcut; - - protected get [id](): number { - return 0x0C964709; - } - - static get [name](): string { - return "messages.sendMultiMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.5?true"], - ["background", "true", "flags.6?true"], - ["clear_draft", "true", "flags.7?true"], - ["noforwards", "true", "flags.14?true"], - ["update_stickersets_order", "true", "flags.15?true"], - ["invert_media", "true", "flags.16?true"], - ["peer", types._InputPeer, "InputPeer"], - ["reply_to", types._InputReplyTo, "flags.0?InputReplyTo"], - ["multi_media", [types._InputSingleMedia], "Vector"], - ["schedule_date", "number", "flags.10?int"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ["quick_reply_shortcut", types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.5?true"], - [this.background ?? null, "true", "flags.6?true"], - [this.clear_draft ?? null, "true", "flags.7?true"], - [this.noforwards ?? null, "true", "flags.14?true"], - [this.update_stickersets_order ?? null, "true", "flags.15?true"], - [this.invert_media ?? null, "true", "flags.16?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.reply_to ?? null, types._InputReplyTo, "flags.0?InputReplyTo"], - [this.multi_media, [types._InputSingleMedia], "Vector"], - [this.schedule_date ?? null, "number", "flags.10?int"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - [this.quick_reply_shortcut ?? null, types._InputQuickReplyShortcut, "flags.17?InputQuickReplyShortcut"], - ]; - } - - constructor(params: { silent?: true; background?: true; clear_draft?: true; noforwards?: true; update_stickersets_order?: true; invert_media?: true; peer: enums.InputPeer; reply_to?: enums.InputReplyTo; multi_media: Array; schedule_date?: number; send_as?: enums.InputPeer; quick_reply_shortcut?: enums.InputQuickReplyShortcut }) { - super(); - this.silent = params.silent; - this.background = params.background; - this.clear_draft = params.clear_draft; - this.noforwards = params.noforwards; - this.update_stickersets_order = params.update_stickersets_order; - this.invert_media = params.invert_media; - this.peer = params.peer; - this.reply_to = params.reply_to; - this.multi_media = params.multi_media; - this.schedule_date = params.schedule_date; - this.send_as = params.send_as; - this.quick_reply_shortcut = params.quick_reply_shortcut; - } -} - -/** Upload encrypted file and associate it to a secret chat */ -export class messages_uploadEncryptedFile_ extends Function_ { - static __F: (params: { peer: enums.InputEncryptedChat; file: enums.InputEncryptedFile }) => enums.EncryptedFile; - /** The secret chat to associate the file to */ - peer: enums.InputEncryptedChat; - /** The file */ - file: enums.InputEncryptedFile; - - protected get [id](): number { - return 0x5057C497; - } - - static get [name](): string { - return "messages.uploadEncryptedFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputEncryptedChat, "InputEncryptedChat"], - ["file", types._InputEncryptedFile, "InputEncryptedFile"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputEncryptedChat, "InputEncryptedChat"], - [this.file, types._InputEncryptedFile, "InputEncryptedFile"], - ]; - } - - constructor(params: { peer: enums.InputEncryptedChat; file: enums.InputEncryptedFile }) { - super(); - this.peer = params.peer; - this.file = params.file; - } -} - -/** Search for stickersets */ -export class messages_searchStickerSets_ extends Function_ { - static __F: (params: { exclude_featured?: true; q: string; hash: bigint }) => enums.messages.FoundStickerSets; - /** Exclude featured stickersets from results */ - exclude_featured?: true; - /** Query string */ - q: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x35705B8A; - } - - static get [name](): string { - return "messages.searchStickerSets" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["exclude_featured", "true", "flags.0?true"], - ["q", "string", "string"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.exclude_featured ?? null, "true", "flags.0?true"], - [this.q, "string", "string"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { exclude_featured?: true; q: string; hash: bigint }) { - super(); - this.exclude_featured = params.exclude_featured; - this.q = params.q; - this.hash = params.hash; - } -} - -/** Get message ranges for saving the user's chat history */ -export class messages_getSplitRanges_ extends Function_ { - static __F: () => enums.MessageRange[]; - protected get [id](): number { - return 0x1CFF7E08; - } - - static get [name](): string { - return "messages.getSplitRanges" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Manually mark dialog as unread */ -export class messages_markDialogUnread_ extends Function_ { - static __F: (params: { unread?: true; peer: enums.InputDialogPeer }) => boolean; - /** Mark as unread/read */ - unread?: true; - /** Dialog */ - peer: enums.InputDialogPeer; - - protected get [id](): number { - return 0xC286D98F; - } - - static get [name](): string { - return "messages.markDialogUnread" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["unread", "true", "flags.0?true"], - ["peer", types._InputDialogPeer, "InputDialogPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.unread ?? null, "true", "flags.0?true"], - [this.peer, types._InputDialogPeer, "InputDialogPeer"], - ]; - } - - constructor(params: { unread?: true; peer: enums.InputDialogPeer }) { - super(); - this.unread = params.unread; - this.peer = params.peer; - } -} - -/** Get dialogs manually marked as unread */ -export class messages_getDialogUnreadMarks_ extends Function_ { - static __F: () => enums.DialogPeer[]; - protected get [id](): number { - return 0x22E24E22; - } - - static get [name](): string { - return "messages.getDialogUnreadMarks" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Clear all [drafts](https://core.telegram.org/api/drafts). */ -export class messages_clearAllDrafts_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x7E58EE9C; - } - - static get [name](): string { - return "messages.clearAllDrafts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Pin a message */ -export class messages_updatePinnedMessage_ extends Function_ { - static __F: (params: { silent?: true; unpin?: true; pm_oneside?: true; peer: enums.InputPeer; id: number }) => enums.Updates; - /** Pin the message silently, without triggering a notification */ - silent?: true; - /** Whether the message should unpinned or pinned */ - unpin?: true; - /** Whether the message should only be pinned on the local side of a one-to-one chat */ - pm_oneside?: true; - /** The peer where to pin the message */ - peer: enums.InputPeer; - /** The message to pin or unpin */ - id: number; - - protected get [id](): number { - return 0xD2AAF7EC; - } - - static get [name](): string { - return "messages.updatePinnedMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.0?true"], - ["unpin", "true", "flags.1?true"], - ["pm_oneside", "true", "flags.2?true"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.0?true"], - [this.unpin ?? null, "true", "flags.1?true"], - [this.pm_oneside ?? null, "true", "flags.2?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { silent?: true; unpin?: true; pm_oneside?: true; peer: enums.InputPeer; id: number }) { - super(); - this.silent = params.silent; - this.unpin = params.unpin; - this.pm_oneside = params.pm_oneside; - this.peer = params.peer; - this.id = params.id; - } -} - -/** Vote in a [poll](https://core.telegram.org/constructor/poll) */ -export class messages_sendVote_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number; options: Array }) => enums.Updates; - /** The chat where the poll was sent */ - peer: enums.InputPeer; - /** The message ID of the poll */ - msg_id: number; - /** The options that were chosen */ - options: Array; - - protected get [id](): number { - return 0x10EA6184; - } - - static get [name](): string { - return "messages.sendVote" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["options", [Uint8Array], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.options, [Uint8Array], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; options: Array }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.options = params.options; - } -} - -/** Get poll results */ -export class messages_getPollResults_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.Updates; - /** Peer where the poll was found */ - peer: enums.InputPeer; - /** Message ID of poll message */ - msg_id: number; - - protected get [id](): number { - return 0x73BB643B; - } - - static get [name](): string { - return "messages.getPollResults" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** Get count of online users in a chat */ -export class messages_getOnlines_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.ChatOnlines; - /** The chat */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x6E2BE050; - } - - static get [name](): string { - return "messages.getOnlines" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Edit the description of a [group/supergroup/channel](https://core.telegram.org/api/channel). */ -export class messages_editChatAbout_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; about: string }) => boolean; - /** The [group/supergroup/channel](https://core.telegram.org/api/channel). */ - peer: enums.InputPeer; - /** The new description */ - about: string; - - protected get [id](): number { - return 0xDEF60797; - } - - static get [name](): string { - return "messages.editChatAbout" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["about", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.about, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; about: string }) { - super(); - this.peer = params.peer; - this.about = params.about; - } -} - -/** Edit the default banned rights of a [channel/supergroup/group](https://core.telegram.org/api/channel). */ -export class messages_editChatDefaultBannedRights_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; banned_rights: enums.ChatBannedRights }) => enums.Updates; - /** The peer */ - peer: enums.InputPeer; - /** The new global rights */ - banned_rights: enums.ChatBannedRights; - - protected get [id](): number { - return 0xA5866B41; - } - - static get [name](): string { - return "messages.editChatDefaultBannedRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["banned_rights", types._ChatBannedRights, "ChatBannedRights"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.banned_rights, types._ChatBannedRights, "ChatBannedRights"], - ]; - } - - constructor(params: { peer: enums.InputPeer; banned_rights: enums.ChatBannedRights }) { - super(); - this.peer = params.peer; - this.banned_rights = params.banned_rights; - } -} - -/** Get localized [emoji keywords »](https://core.telegram.org/api/custom-emoji#emoji-keywords). */ -export class messages_getEmojiKeywords_ extends Function_ { - static __F: (params: { lang_code: string }) => enums.EmojiKeywordsDifference; - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0x35A0E062; - } - - static get [name](): string { - return "messages.getEmojiKeywords" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { lang_code: string }) { - super(); - this.lang_code = params.lang_code; - } -} - -/** Get changed [emoji keywords »](https://core.telegram.org/api/custom-emoji#emoji-keywords). */ -export class messages_getEmojiKeywordsDifference_ extends Function_ { - static __F: (params: { lang_code: string; from_version: number }) => enums.EmojiKeywordsDifference; - /** Language code */ - lang_code: string; - /** Previous stored emoji keyword list `version` */ - from_version: number; - - protected get [id](): number { - return 0x1508B6AF; - } - - static get [name](): string { - return "messages.getEmojiKeywordsDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ["from_version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - [this.from_version, "number", "int"], - ]; - } - - constructor(params: { lang_code: string; from_version: number }) { - super(); - this.lang_code = params.lang_code; - this.from_version = params.from_version; - } -} - -/** Obtain a list of related languages that must be used when fetching [emoji keyword lists »](https://core.telegram.org/api/custom-emoji#emoji-keywords). */ -export class messages_getEmojiKeywordsLanguages_ extends Function_ { - static __F: (params: { lang_codes: Array }) => enums.EmojiLanguage[]; - /** The user's language codes */ - lang_codes: Array; - - protected get [id](): number { - return 0x4E9963B2; - } - - static get [name](): string { - return "messages.getEmojiKeywordsLanguages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_codes", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_codes, ["string"], "Vector"], - ]; - } - - constructor(params: { lang_codes: Array }) { - super(); - this.lang_codes = params.lang_codes; - } -} - -/** Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new [emoji keywords »](https://core.telegram.org/api/custom-emoji#emoji-keywords). The URL will be valid for 30 seconds after generation. */ -export class messages_getEmojiURL_ extends Function_ { - static __F: (params: { lang_code: string }) => enums.EmojiURL; - /** Language code for which the emoji keywords will be suggested */ - lang_code: string; - - protected get [id](): number { - return 0xD5B10C26; - } - - static get [name](): string { - return "messages.getEmojiURL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { lang_code: string }) { - super(); - this.lang_code = params.lang_code; - } -} - -/** Get the number of results that would be found by a [messages.search](https://core.telegram.org/method/messages.search) call with the same parameters */ -export class messages_getSearchCounters_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; saved_peer_id?: enums.InputPeer; top_msg_id?: number; filters: Array }) => enums.messages.SearchCounter[]; - /** Peer where to search */ - peer: enums.InputPeer; - /** Search within the [saved message dialog »](https://core.telegram.org/api/saved-messages) with this ID. */ - saved_peer_id?: enums.InputPeer; - /** If set, consider only messages within the specified [forum topic](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - /** Search filters */ - filters: Array; - - protected get [id](): number { - return 0x1BBCF300; - } - - static get [name](): string { - return "messages.getSearchCounters" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["saved_peer_id", types._InputPeer, "flags.2?InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ["filters", [types._MessagesFilter], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.saved_peer_id ?? null, types._InputPeer, "flags.2?InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.filters, [types._MessagesFilter], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; saved_peer_id?: enums.InputPeer; top_msg_id?: number; filters: Array }) { - super(); - this.peer = params.peer; - this.saved_peer_id = params.saved_peer_id; - this.top_msg_id = params.top_msg_id; - this.filters = params.filters; - } -} - -/** Get more info about a Seamless Telegram Login authorization request, for more info [click here »](https://core.telegram.org/api/url-authorization) */ -export class messages_requestUrlAuth_ extends Function_ { - static __F: (params?: { peer?: enums.InputPeer; msg_id?: number; button_id?: number; url?: string }) => enums.UrlAuthResult; - /** Peer where the message is located */ - peer?: enums.InputPeer; - /** The message */ - msg_id?: number; - /** The ID of the button with the authorization request */ - button_id?: number; - /** URL used for [link URL authorization, click here for more info »](https://core.telegram.org/api/url-authorization#link-url-authorization) */ - url?: string; - - protected get [id](): number { - return 0x198FB446; - } - - static get [name](): string { - return "messages.requestUrlAuth" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "flags.1?InputPeer"], - ["msg_id", "number", "flags.1?int"], - ["button_id", "number", "flags.1?int"], - ["url", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer ?? null, types._InputPeer, "flags.1?InputPeer"], - [this.msg_id ?? null, "number", "flags.1?int"], - [this.button_id ?? null, "number", "flags.1?int"], - [this.url ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params?: { peer?: enums.InputPeer; msg_id?: number; button_id?: number; url?: string }) { - super(); - this.peer = params?.peer; - this.msg_id = params?.msg_id; - this.button_id = params?.button_id; - this.url = params?.url; - } -} - -/** Use this to accept a Seamless Telegram Login authorization request, for more info [click here »](https://core.telegram.org/api/url-authorization) */ -export class messages_acceptUrlAuth_ extends Function_ { - static __F: (params?: { write_allowed?: true; peer?: enums.InputPeer; msg_id?: number; button_id?: number; url?: string }) => enums.UrlAuthResult; - /** Set this flag to allow the bot to send messages to you (if requested) */ - write_allowed?: true; - /** The location of the message */ - peer?: enums.InputPeer; - /** Message ID of the message with the login button */ - msg_id?: number; - /** ID of the login button */ - button_id?: number; - /** URL used for [link URL authorization, click here for more info »](https://core.telegram.org/api/url-authorization#link-url-authorization) */ - url?: string; - - protected get [id](): number { - return 0xB12C7125; - } - - static get [name](): string { - return "messages.acceptUrlAuth" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["write_allowed", "true", "flags.0?true"], - ["peer", types._InputPeer, "flags.1?InputPeer"], - ["msg_id", "number", "flags.1?int"], - ["button_id", "number", "flags.1?int"], - ["url", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.write_allowed ?? null, "true", "flags.0?true"], - [this.peer ?? null, types._InputPeer, "flags.1?InputPeer"], - [this.msg_id ?? null, "number", "flags.1?int"], - [this.button_id ?? null, "number", "flags.1?int"], - [this.url ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params?: { write_allowed?: true; peer?: enums.InputPeer; msg_id?: number; button_id?: number; url?: string }) { - super(); - this.write_allowed = params?.write_allowed; - this.peer = params?.peer; - this.msg_id = params?.msg_id; - this.button_id = params?.button_id; - this.url = params?.url; - } -} - -/** Should be called after the user hides the [report spam/add as contact bar](https://core.telegram.org/api/action-bar) of a new chat, effectively prevents the user from executing the actions specified in the [action bar »](https://core.telegram.org/api/action-bar). */ -export class messages_hidePeerSettingsBar_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => boolean; - /** Peer */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x4FACB138; - } - - static get [name](): string { - return "messages.hidePeerSettingsBar" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Get scheduled messages */ -export class messages_getScheduledHistory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; hash: bigint }) => enums.messages.Messages; - /** Peer */ - peer: enums.InputPeer; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xF516760B; - } - - static get [name](): string { - return "messages.getScheduledHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; hash: bigint }) { - super(); - this.peer = params.peer; - this.hash = params.hash; - } -} - -/** Get scheduled messages */ -export class messages_getScheduledMessages_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.messages.Messages; - /** Peer */ - peer: enums.InputPeer; - /** IDs of scheduled messages */ - id: Array; - - protected get [id](): number { - return 0xBDBB0464; - } - - static get [name](): string { - return "messages.getScheduledMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Send scheduled messages right away */ -export class messages_sendScheduledMessages_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.Updates; - /** Peer */ - peer: enums.InputPeer; - /** Scheduled message IDs */ - id: Array; - - protected get [id](): number { - return 0xBD38850A; - } - - static get [name](): string { - return "messages.sendScheduledMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Delete scheduled messages */ -export class messages_deleteScheduledMessages_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.Updates; - /** Peer */ - peer: enums.InputPeer; - /** Scheduled message IDs */ - id: Array; - - protected get [id](): number { - return 0x59AE2B16; - } - - static get [name](): string { - return "messages.deleteScheduledMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Get poll results for non-anonymous polls */ -export class messages_getPollVotes_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number; option?: Uint8Array; offset?: string; limit: number }) => enums.messages.VotesList; - /** Chat where the poll was sent */ - peer: enums.InputPeer; - /** Message ID */ - id: number; - /** Get only results for the specified poll `option` */ - option?: Uint8Array; - /** Offset for results, taken from the `next_offset` field of [messages.votesList](https://core.telegram.org/constructor/messages.votesList), initially an empty string. - Note: if no more results are available, the method call will return an empty `next_offset`; thus, avoid providing the `next_offset` returned in [messages.votesList](https://core.telegram.org/constructor/messages.votesList) if it is empty, to avoid an infinite loop. */ - offset?: string; - /** Number of results to return */ - limit: number; - - protected get [id](): number { - return 0xB86E380E; - } - - static get [name](): string { - return "messages.getPollVotes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["option", Uint8Array, "flags.0?bytes"], - ["offset", "string", "flags.1?string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.option ?? null, Uint8Array, "flags.0?bytes"], - [this.offset ?? null, "string", "flags.1?string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number; option?: Uint8Array; offset?: string; limit: number }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.option = params.option; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Apply changes to multiple stickersets */ -export class messages_toggleStickerSets_ extends Function_ { - static __F: (params: { uninstall?: true; archive?: true; unarchive?: true; stickersets: Array }) => boolean; - /** Uninstall the specified stickersets */ - uninstall?: true; - /** Archive the specified stickersets */ - archive?: true; - /** Unarchive the specified stickersets */ - unarchive?: true; - /** Stickersets to act upon */ - stickersets: Array; - - protected get [id](): number { - return 0xB5052FEA; - } - - static get [name](): string { - return "messages.toggleStickerSets" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["uninstall", "true", "flags.0?true"], - ["archive", "true", "flags.1?true"], - ["unarchive", "true", "flags.2?true"], - ["stickersets", [types._InputStickerSet], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.uninstall ?? null, "true", "flags.0?true"], - [this.archive ?? null, "true", "flags.1?true"], - [this.unarchive ?? null, "true", "flags.2?true"], - [this.stickersets, [types._InputStickerSet], "Vector"], - ]; - } - - constructor(params: { uninstall?: true; archive?: true; unarchive?: true; stickersets: Array }) { - super(); - this.uninstall = params.uninstall; - this.archive = params.archive; - this.unarchive = params.unarchive; - this.stickersets = params.stickersets; - } -} - -/** Get [folders](https://core.telegram.org/api/folders) */ -export class messages_getDialogFilters_ extends Function_ { - static __F: () => enums.messages.DialogFilters; - protected get [id](): number { - return 0xEFD48C89; - } - - static get [name](): string { - return "messages.getDialogFilters" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get [suggested folders](https://core.telegram.org/api/folders) */ -export class messages_getSuggestedDialogFilters_ extends Function_ { - static __F: () => enums.DialogFilterSuggested[]; - protected get [id](): number { - return 0xA29CD42C; - } - - static get [name](): string { - return "messages.getSuggestedDialogFilters" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Update [folder](https://core.telegram.org/api/folders) */ -export class messages_updateDialogFilter_ extends Function_ { - static __F: (params: { id: number; filter?: enums.DialogFilter }) => boolean; - /** [Folder](https://core.telegram.org/api/folders) ID */ - id: number; - /** [Folder](https://core.telegram.org/api/folders) info */ - filter?: enums.DialogFilter; - - protected get [id](): number { - return 0x1AD4A04A; - } - - static get [name](): string { - return "messages.updateDialogFilter" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["id", "number", "int"], - ["filter", types._DialogFilter, "flags.0?DialogFilter"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.id, "number", "int"], - [this.filter ?? null, types._DialogFilter, "flags.0?DialogFilter"], - ]; - } - - constructor(params: { id: number; filter?: enums.DialogFilter }) { - super(); - this.id = params.id; - this.filter = params.filter; - } -} - -/** Reorder [folders](https://core.telegram.org/api/folders) */ -export class messages_updateDialogFiltersOrder_ extends Function_ { - static __F: (params: { order: Array }) => boolean; - /** New [folder](https://core.telegram.org/api/folders) order */ - order: Array; - - protected get [id](): number { - return 0xC563C1E4; - } - - static get [name](): string { - return "messages.updateDialogFiltersOrder" - } - - static get [paramDesc](): ParamDesc { - return [ - ["order", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.order, ["number"], "Vector"], - ]; - } - - constructor(params: { order: Array }) { - super(); - this.order = params.order; - } -} - -/** Method for fetching previously featured stickers */ -export class messages_getOldFeaturedStickers_ extends Function_ { - static __F: (params: { offset: number; limit: number; hash: bigint }) => enums.messages.FeaturedStickers; - /** Offset */ - offset: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x7ED094A1; - } - - static get [name](): string { - return "messages.getOldFeaturedStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { offset: number; limit: number; hash: bigint }) { - super(); - this.offset = params.offset; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Get messages in a reply thread */ -export class messages_getReplies_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number; offset_id: number; offset_date: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) => enums.messages.Messages; - /** Peer */ - peer: enums.InputPeer; - /** Message ID */ - msg_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_date: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - add_offset: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** If a positive value was transferred, the method will return only messages with ID smaller than max\_id */ - max_id: number; - /** If a positive value was transferred, the method will return only messages with ID bigger than min\_id */ - min_id: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x22DDD30C; - } - - static get [name](): string { - return "messages.getReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["offset_id", "number", "int"], - ["offset_date", "number", "int"], - ["add_offset", "number", "int"], - ["limit", "number", "int"], - ["max_id", "number", "int"], - ["min_id", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.offset_id, "number", "int"], - [this.offset_date, "number", "int"], - [this.add_offset, "number", "int"], - [this.limit, "number", "int"], - [this.max_id, "number", "int"], - [this.min_id, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; offset_id: number; offset_date: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.offset_id = params.offset_id; - this.offset_date = params.offset_date; - this.add_offset = params.add_offset; - this.limit = params.limit; - this.max_id = params.max_id; - this.min_id = params.min_id; - this.hash = params.hash; - } -} - -/** Get [discussion message](https://core.telegram.org/api/threads) from the [associated discussion group](https://core.telegram.org/api/discussion) of a channel to show it on top of the comment section, without actually joining the group */ -export class messages_getDiscussionMessage_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.messages.DiscussionMessage; - /** [Channel ID](https://core.telegram.org/api/channel) */ - peer: enums.InputPeer; - /** Message ID */ - msg_id: number; - - protected get [id](): number { - return 0x446972FD; - } - - static get [name](): string { - return "messages.getDiscussionMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** Mark a [thread](https://core.telegram.org/api/threads) as read */ -export class messages_readDiscussion_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number; read_max_id: number }) => boolean; - /** Group ID */ - peer: enums.InputPeer; - /** ID of message that started the thread */ - msg_id: number; - /** ID up to which thread messages were read */ - read_max_id: number; - - protected get [id](): number { - return 0xF731A9F4; - } - - static get [name](): string { - return "messages.readDiscussion" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["read_max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.read_max_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; read_max_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.read_max_id = params.read_max_id; - } -} - -/** [Unpin](https://core.telegram.org/api/pin) all pinned messages */ -export class messages_unpinAllMessages_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; top_msg_id?: number }) => enums.messages.AffectedHistory; - /** Chat where to unpin */ - peer: enums.InputPeer; - /** [Forum topic](https://core.telegram.org/api/forum#forum-topics) where to unpin */ - top_msg_id?: number; - - protected get [id](): number { - return 0xEE22B9A8; - } - - static get [name](): string { - return "messages.unpinAllMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id?: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - } -} - -/** Delete a [chat](https://core.telegram.org/api/channel) */ -export class messages_deleteChat_ extends Function_ { - static __F: (params: { chat_id: bigint }) => boolean; - /** Chat ID */ - chat_id: bigint; - - protected get [id](): number { - return 0x5BD0EE50; - } - - static get [name](): string { - return "messages.deleteChat" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chat_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.chat_id, "bigint", "long"], - ]; - } - - constructor(params: { chat_id: bigint }) { - super(); - this.chat_id = params.chat_id; - } -} - -/** Delete the entire phone call history. */ -export class messages_deletePhoneCallHistory_ extends Function_ { - static __F: (params?: { revoke?: true }) => enums.messages.AffectedFoundMessages; - /** Whether to remove phone call history for participants as well */ - revoke?: true; - - protected get [id](): number { - return 0xF9CBE409; - } - - static get [name](): string { - return "messages.deletePhoneCallHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["revoke", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.revoke ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { revoke?: true }) { - super(); - this.revoke = params?.revoke; - } -} - -/** Obtains information about a chat export file, generated by a foreign chat app, [click here for more info about imported chats »](https://core.telegram.org/api/import). */ -export class messages_checkHistoryImport_ extends Function_ { - static __F: (params: { import_head: string }) => enums.messages.HistoryImportParsed; - /** Beginning of the message file; up to 100 lines. */ - import_head: string; - - protected get [id](): number { - return 0x43FE19F3; - } - - static get [name](): string { - return "messages.checkHistoryImport" - } - - static get [paramDesc](): ParamDesc { - return [ - ["import_head", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.import_head, "string", "string"], - ]; - } - - constructor(params: { import_head: string }) { - super(); - this.import_head = params.import_head; - } -} - -/** Import chat history from a foreign chat app into a specific Telegram chat, [click here for more info about imported chats »](https://core.telegram.org/api/import). */ -export class messages_initHistoryImport_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; file: enums.InputFile; media_count: number }) => enums.messages.HistoryImport; - /** The Telegram chat where the [history should be imported](https://core.telegram.org/api/import). */ - peer: enums.InputPeer; - /** File with messages to import. */ - file: enums.InputFile; - /** Number of media files associated with the chat that will be uploaded using [messages.uploadImportedMedia](https://core.telegram.org/method/messages.uploadImportedMedia). */ - media_count: number; - - protected get [id](): number { - return 0x34090C3B; - } - - static get [name](): string { - return "messages.initHistoryImport" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["file", types._InputFile, "InputFile"], - ["media_count", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.file, types._InputFile, "InputFile"], - [this.media_count, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; file: enums.InputFile; media_count: number }) { - super(); - this.peer = params.peer; - this.file = params.file; - this.media_count = params.media_count; - } -} - -/** Upload a media file associated with an [imported chat, click here for more info »](https://core.telegram.org/api/import). */ -export class messages_uploadImportedMedia_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; import_id: bigint; file_name: string; media: enums.InputMedia }) => enums.MessageMedia; - /** The Telegram chat where the media will be imported */ - peer: enums.InputPeer; - /** Identifier of a [history import session](https://core.telegram.org/api/import), returned by [messages.initHistoryImport](https://core.telegram.org/method/messages.initHistoryImport) */ - import_id: bigint; - /** File name */ - file_name: string; - /** Media metadata */ - media: enums.InputMedia; - - protected get [id](): number { - return 0x2A862092; - } - - static get [name](): string { - return "messages.uploadImportedMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["import_id", "bigint", "long"], - ["file_name", "string", "string"], - ["media", types._InputMedia, "InputMedia"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.import_id, "bigint", "long"], - [this.file_name, "string", "string"], - [this.media, types._InputMedia, "InputMedia"], - ]; - } - - constructor(params: { peer: enums.InputPeer; import_id: bigint; file_name: string; media: enums.InputMedia }) { - super(); - this.peer = params.peer; - this.import_id = params.import_id; - this.file_name = params.file_name; - this.media = params.media; - } -} - -/** Complete the [history import process](https://core.telegram.org/api/import), importing all messages into the chat. -To be called only after initializing the import with [messages.initHistoryImport](https://core.telegram.org/method/messages.initHistoryImport) and uploading all files using [messages.uploadImportedMedia](https://core.telegram.org/method/messages.uploadImportedMedia). */ -export class messages_startHistoryImport_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; import_id: bigint }) => boolean; - /** The Telegram chat where the messages should be [imported, click here for more info »](https://core.telegram.org/api/import) */ - peer: enums.InputPeer; - /** Identifier of a history import session, returned by [messages.initHistoryImport](https://core.telegram.org/method/messages.initHistoryImport). */ - import_id: bigint; - - protected get [id](): number { - return 0xB43DF344; - } - - static get [name](): string { - return "messages.startHistoryImport" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["import_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.import_id, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; import_id: bigint }) { - super(); - this.peer = params.peer; - this.import_id = params.import_id; - } -} - -/** Get info about the chat invites of a specific chat */ -export class messages_getExportedChatInvites_ extends Function_ { - static __F: (params: { revoked?: true; peer: enums.InputPeer; admin_id: enums.InputUser; offset_date?: number; offset_link?: string; limit: number }) => enums.messages.ExportedChatInvites; - /** Whether to fetch revoked chat invites */ - revoked?: true; - /** Chat */ - peer: enums.InputPeer; - /** Whether to only fetch chat invites from this admin */ - admin_id: enums.InputUser; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_date?: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_link?: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xA2B5A3F6; - } - - static get [name](): string { - return "messages.getExportedChatInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["revoked", "true", "flags.3?true"], - ["peer", types._InputPeer, "InputPeer"], - ["admin_id", types._InputUser, "InputUser"], - ["offset_date", "number", "flags.2?int"], - ["offset_link", "string", "flags.2?string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.revoked ?? null, "true", "flags.3?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.admin_id, types._InputUser, "InputUser"], - [this.offset_date ?? null, "number", "flags.2?int"], - [this.offset_link ?? null, "string", "flags.2?string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { revoked?: true; peer: enums.InputPeer; admin_id: enums.InputUser; offset_date?: number; offset_link?: string; limit: number }) { - super(); - this.revoked = params.revoked; - this.peer = params.peer; - this.admin_id = params.admin_id; - this.offset_date = params.offset_date; - this.offset_link = params.offset_link; - this.limit = params.limit; - } -} - -/** Get info about a chat invite */ -export class messages_getExportedChatInvite_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; link: string }) => enums.messages.ExportedChatInvite; - /** Chat */ - peer: enums.InputPeer; - /** Invite link */ - link: string; - - protected get [id](): number { - return 0x73746F5C; - } - - static get [name](): string { - return "messages.getExportedChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["link", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.link, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; link: string }) { - super(); - this.peer = params.peer; - this.link = params.link; - } -} - -/** Edit an exported chat invite */ -export class messages_editExportedChatInvite_ extends Function_ { - static __F: (params: { revoked?: true; peer: enums.InputPeer; link: string; expire_date?: number; usage_limit?: number; request_needed?: boolean; title?: string }) => enums.messages.ExportedChatInvite; - /** Whether to revoke the chat invite */ - revoked?: true; - /** Chat */ - peer: enums.InputPeer; - /** Invite link */ - link: string; - /** New expiration date */ - expire_date?: number; - /** Maximum number of users that can join using this link */ - usage_limit?: number; - /** Whether admin confirmation is required before admitting each separate user into the chat */ - request_needed?: boolean; - /** Description of the invite link, visible only to administrators */ - title?: string; - - protected get [id](): number { - return 0xBDCA2F75; - } - - static get [name](): string { - return "messages.editExportedChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["revoked", "true", "flags.2?true"], - ["peer", types._InputPeer, "InputPeer"], - ["link", "string", "string"], - ["expire_date", "number", "flags.0?int"], - ["usage_limit", "number", "flags.1?int"], - ["request_needed", "boolean", "flags.3?Bool"], - ["title", "string", "flags.4?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.revoked ?? null, "true", "flags.2?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.link, "string", "string"], - [this.expire_date ?? null, "number", "flags.0?int"], - [this.usage_limit ?? null, "number", "flags.1?int"], - [this.request_needed ?? null, "boolean", "flags.3?Bool"], - [this.title ?? null, "string", "flags.4?string"], - ]; - } - - constructor(params: { revoked?: true; peer: enums.InputPeer; link: string; expire_date?: number; usage_limit?: number; request_needed?: boolean; title?: string }) { - super(); - this.revoked = params.revoked; - this.peer = params.peer; - this.link = params.link; - this.expire_date = params.expire_date; - this.usage_limit = params.usage_limit; - this.request_needed = params.request_needed; - this.title = params.title; - } -} - -/** Delete all revoked chat invites */ -export class messages_deleteRevokedExportedChatInvites_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; admin_id: enums.InputUser }) => boolean; - /** Chat */ - peer: enums.InputPeer; - /** ID of the admin that originally generated the revoked chat invites */ - admin_id: enums.InputUser; - - protected get [id](): number { - return 0x56987BD5; - } - - static get [name](): string { - return "messages.deleteRevokedExportedChatInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["admin_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.admin_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { peer: enums.InputPeer; admin_id: enums.InputUser }) { - super(); - this.peer = params.peer; - this.admin_id = params.admin_id; - } -} - -/** Delete a chat invite */ -export class messages_deleteExportedChatInvite_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; link: string }) => boolean; - /** Peer */ - peer: enums.InputPeer; - /** Invite link */ - link: string; - - protected get [id](): number { - return 0xD464A42B; - } - - static get [name](): string { - return "messages.deleteExportedChatInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["link", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.link, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; link: string }) { - super(); - this.peer = params.peer; - this.link = params.link; - } -} - -/** Get info about chat invites generated by admins. */ -export class messages_getAdminsWithInvites_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.messages.ChatAdminsWithInvites; - /** Chat */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x3920E6EF; - } - - static get [name](): string { - return "messages.getAdminsWithInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Get info about the users that joined the chat using a specific chat invite */ -export class messages_getChatInviteImporters_ extends Function_ { - static __F: (params: { requested?: true; peer: enums.InputPeer; link?: string; q?: string; offset_date: number; offset_user: enums.InputUser; limit: number }) => enums.messages.ChatInviteImporters; - /** If set, only returns info about users with pending [join requests »](https://core.telegram.org/api/invites#join-requests) */ - requested?: true; - /** Chat */ - peer: enums.InputPeer; - /** Invite link */ - link?: string; - /** Search for a user in the pending [join requests »](https://core.telegram.org/api/invites#join-requests) list: only available when the `requested` flag is set, cannot be used together with a specific `link`. */ - q?: string; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_date: number; - /** User ID for [pagination](https://core.telegram.org/api/offsets): if set, `offset_date` must also be set. */ - offset_user: enums.InputUser; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xDF04DD4E; - } - - static get [name](): string { - return "messages.getChatInviteImporters" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["requested", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["link", "string", "flags.1?string"], - ["q", "string", "flags.2?string"], - ["offset_date", "number", "int"], - ["offset_user", types._InputUser, "InputUser"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.requested ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.link ?? null, "string", "flags.1?string"], - [this.q ?? null, "string", "flags.2?string"], - [this.offset_date, "number", "int"], - [this.offset_user, types._InputUser, "InputUser"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { requested?: true; peer: enums.InputPeer; link?: string; q?: string; offset_date: number; offset_user: enums.InputUser; limit: number }) { - super(); - this.requested = params.requested; - this.peer = params.peer; - this.link = params.link; - this.q = params.q; - this.offset_date = params.offset_date; - this.offset_user = params.offset_user; - this.limit = params.limit; - } -} - -/** Set maximum Time-To-Live of all messages in the specified chat */ -export class messages_setHistoryTTL_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; period: number }) => enums.Updates; - /** The dialog */ - peer: enums.InputPeer; - /** Automatically delete all messages sent in the chat after this many seconds */ - period: number; - - protected get [id](): number { - return 0xB80E5FE4; - } - - static get [name](): string { - return "messages.setHistoryTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["period", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.period, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; period: number }) { - super(); - this.peer = params.peer; - this.period = params.period; - } -} - -/** Check whether chat history exported from another chat app can be [imported into a specific Telegram chat, click here for more info »](https://core.telegram.org/api/import). */ -export class messages_checkHistoryImportPeer_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.messages.CheckedHistoryImportPeer; - /** The chat where we want to [import history »](https://core.telegram.org/api/import). */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x5DC60F03; - } - - static get [name](): string { - return "messages.checkHistoryImportPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Change the chat theme of a certain chat */ -export class messages_setChatTheme_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; emoticon: string }) => enums.Updates; - /** Private chat where to change theme */ - peer: enums.InputPeer; - /** Emoji, identifying a specific chat theme; a list of chat themes can be fetched using [account.getChatThemes](https://core.telegram.org/method/account.getChatThemes) */ - emoticon: string; - - protected get [id](): number { - return 0xE63BE13F; - } - - static get [name](): string { - return "messages.setChatTheme" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["emoticon", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.emoticon, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; emoticon: string }) { - super(); - this.peer = params.peer; - this.emoticon = params.emoticon; - } -} - -/** Get which users read a specific message: only available for groups and supergroups with less than [`chat_read_mark_size_threshold` members](https://core.telegram.org/api/config#chat-read-mark-size-threshold), read receipts will be stored for [`chat_read_mark_expire_period` seconds after the message was sent](https://core.telegram.org/api/config#chat-read-mark-expire-period), see [client configuration for more info »](https://core.telegram.org/api/config#client-configuration). */ -export class messages_getMessageReadParticipants_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.ReadParticipantDate[]; - /** Dialog */ - peer: enums.InputPeer; - /** Message ID */ - msg_id: number; - - protected get [id](): number { - return 0x31C1C44F; - } - - static get [name](): string { - return "messages.getMessageReadParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** Returns information about the next messages of the specified type in the chat split by days. */ -export class messages_getSearchResultsCalendar_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; saved_peer_id?: enums.InputPeer; filter: enums.MessagesFilter; offset_id: number; offset_date: number }) => enums.messages.SearchResultsCalendar; - /** Peer where to search */ - peer: enums.InputPeer; - /** Search within the [saved message dialog »](https://core.telegram.org/api/saved-messages) with this ID. */ - saved_peer_id?: enums.InputPeer; - /** Message filter, [inputMessagesFilterEmpty](https://core.telegram.org/constructor/inputMessagesFilterEmpty), [inputMessagesFilterMyMentions](https://core.telegram.org/constructor/inputMessagesFilterMyMentions) filters are not supported by this method. */ - filter: enums.MessagesFilter; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_date: number; - - protected get [id](): number { - return 0x6AA3F6BD; - } - - static get [name](): string { - return "messages.getSearchResultsCalendar" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["saved_peer_id", types._InputPeer, "flags.2?InputPeer"], - ["filter", types._MessagesFilter, "MessagesFilter"], - ["offset_id", "number", "int"], - ["offset_date", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.saved_peer_id ?? null, types._InputPeer, "flags.2?InputPeer"], - [this.filter, types._MessagesFilter, "MessagesFilter"], - [this.offset_id, "number", "int"], - [this.offset_date, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; saved_peer_id?: enums.InputPeer; filter: enums.MessagesFilter; offset_id: number; offset_date: number }) { - super(); - this.peer = params.peer; - this.saved_peer_id = params.saved_peer_id; - this.filter = params.filter; - this.offset_id = params.offset_id; - this.offset_date = params.offset_date; - } -} - -/** Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. */ -export class messages_getSearchResultsPositions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; saved_peer_id?: enums.InputPeer; filter: enums.MessagesFilter; offset_id: number; limit: number }) => enums.messages.SearchResultsPositions; - /** Peer where to search */ - peer: enums.InputPeer; - /** Search within the [saved message dialog »](https://core.telegram.org/api/saved-messages) with this ID. */ - saved_peer_id?: enums.InputPeer; - /** Message filter, [inputMessagesFilterEmpty](https://core.telegram.org/constructor/inputMessagesFilterEmpty), [inputMessagesFilterMyMentions](https://core.telegram.org/constructor/inputMessagesFilterMyMentions) filters are not supported by this method. */ - filter: enums.MessagesFilter; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x9C7F2F10; - } - - static get [name](): string { - return "messages.getSearchResultsPositions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["saved_peer_id", types._InputPeer, "flags.2?InputPeer"], - ["filter", types._MessagesFilter, "MessagesFilter"], - ["offset_id", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.saved_peer_id ?? null, types._InputPeer, "flags.2?InputPeer"], - [this.filter, types._MessagesFilter, "MessagesFilter"], - [this.offset_id, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; saved_peer_id?: enums.InputPeer; filter: enums.MessagesFilter; offset_id: number; limit: number }) { - super(); - this.peer = params.peer; - this.saved_peer_id = params.saved_peer_id; - this.filter = params.filter; - this.offset_id = params.offset_id; - this.limit = params.limit; - } -} - -/** Dismiss or approve a chat [join request](https://core.telegram.org/api/invites#join-requests) related to a specific chat or channel. */ -export class messages_hideChatJoinRequest_ extends Function_ { - static __F: (params: { approved?: true; peer: enums.InputPeer; user_id: enums.InputUser }) => enums.Updates; - /** Whether to dismiss or approve the chat [join request »](https://core.telegram.org/api/invites#join-requests) */ - approved?: true; - /** The chat or channel */ - peer: enums.InputPeer; - /** The user whose [join request »](https://core.telegram.org/api/invites#join-requests) should be dismissed or approved */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x7FE7E815; - } - - static get [name](): string { - return "messages.hideChatJoinRequest" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["approved", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.approved ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { approved?: true; peer: enums.InputPeer; user_id: enums.InputUser }) { - super(); - this.approved = params.approved; - this.peer = params.peer; - this.user_id = params.user_id; - } -} - -/** Dismiss or approve all [join requests](https://core.telegram.org/api/invites#join-requests) related to a specific chat or channel. */ -export class messages_hideAllChatJoinRequests_ extends Function_ { - static __F: (params: { approved?: true; peer: enums.InputPeer; link?: string }) => enums.Updates; - /** Whether to dismiss or approve all chat [join requests »](https://core.telegram.org/api/invites#join-requests) */ - approved?: true; - /** The chat or channel */ - peer: enums.InputPeer; - /** Only dismiss or approve [join requests »](https://core.telegram.org/api/invites#join-requests) initiated using this invite link */ - link?: string; - - protected get [id](): number { - return 0xE085F4EA; - } - - static get [name](): string { - return "messages.hideAllChatJoinRequests" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["approved", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["link", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.approved ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.link ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { approved?: true; peer: enums.InputPeer; link?: string }) { - super(); - this.approved = params.approved; - this.peer = params.peer; - this.link = params.link; - } -} - -/** Enable or disable [content protection](https://telegram.org/blog/protected-content-delete-by-date-and-more) on a channel or chat */ -export class messages_toggleNoForwards_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; enabled: boolean }) => enums.Updates; - /** The chat or channel */ - peer: enums.InputPeer; - /** Enable or disable content protection */ - enabled: boolean; - - protected get [id](): number { - return 0xB11EAFA2; - } - - static get [name](): string { - return "messages.toggleNoForwards" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; enabled: boolean }) { - super(); - this.peer = params.peer; - this.enabled = params.enabled; - } -} - -/** Change the default peer that should be used when sending messages, reactions, poll votes to a specific group */ -export class messages_saveDefaultSendAs_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; send_as: enums.InputPeer }) => boolean; - /** Group */ - peer: enums.InputPeer; - /** The default peer that should be used when sending messages to the group */ - send_as: enums.InputPeer; - - protected get [id](): number { - return 0xCCFDDF96; - } - - static get [name](): string { - return "messages.saveDefaultSendAs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["send_as", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.send_as, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer; send_as: enums.InputPeer }) { - super(); - this.peer = params.peer; - this.send_as = params.send_as; - } -} - -/** React to message. */ -export class messages_sendReaction_ extends Function_ { - static __F: (params: { big?: true; add_to_recent?: true; peer: enums.InputPeer; msg_id: number; reaction?: Array }) => enums.Updates; - /** Whether a bigger and longer reaction should be shown */ - big?: true; - /** Whether to add this reaction to the [recent reactions list »](https://core.telegram.org/api/reactions#recent-reactions). */ - add_to_recent?: true; - /** Peer */ - peer: enums.InputPeer; - /** Message ID to react to */ - msg_id: number; - /** A list of reactions */ - reaction?: Array; - - protected get [id](): number { - return 0xD30D78D4; - } - - static get [name](): string { - return "messages.sendReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["big", "true", "flags.1?true"], - ["add_to_recent", "true", "flags.2?true"], - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["reaction", [types._Reaction], "flags.0?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.big ?? null, "true", "flags.1?true"], - [this.add_to_recent ?? null, "true", "flags.2?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.reaction ?? null, [types._Reaction], "flags.0?Vector"], - ]; - } - - constructor(params: { big?: true; add_to_recent?: true; peer: enums.InputPeer; msg_id: number; reaction?: Array }) { - super(); - this.big = params.big; - this.add_to_recent = params.add_to_recent; - this.peer = params.peer; - this.msg_id = params.msg_id; - this.reaction = params.reaction; - } -} - -/** Get [message reactions »](https://core.telegram.org/api/reactions) */ -export class messages_getMessagesReactions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.Updates; - /** Peer */ - peer: enums.InputPeer; - /** Message IDs */ - id: Array; - - protected get [id](): number { - return 0x8BBA90E6; - } - - static get [name](): string { - return "messages.getMessagesReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Get [message reaction](https://core.telegram.org/api/reactions) list, along with the sender of each reaction. */ -export class messages_getMessageReactionsList_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number; reaction?: enums.Reaction; offset?: string; limit: number }) => enums.messages.MessageReactionsList; - /** Peer */ - peer: enums.InputPeer; - /** Message ID */ - id: number; - /** Get only reactions of this type */ - reaction?: enums.Reaction; - /** Offset for pagination (taken from the `next_offset` field of the returned [messages.MessageReactionsList](https://core.telegram.org/type/messages.MessageReactionsList)); empty in the first request. */ - offset?: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x461B3F48; - } - - static get [name](): string { - return "messages.getMessageReactionsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["reaction", types._Reaction, "flags.0?Reaction"], - ["offset", "string", "flags.1?string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.reaction ?? null, types._Reaction, "flags.0?Reaction"], - [this.offset ?? null, "string", "flags.1?string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number; reaction?: enums.Reaction; offset?: string; limit: number }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.reaction = params.reaction; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Change the set of [message reactions »](https://core.telegram.org/api/reactions) that can be used in a certain group, supergroup or channel */ -export class messages_setChatAvailableReactions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; available_reactions: enums.ChatReactions }) => enums.Updates; - /** Group where to apply changes */ - peer: enums.InputPeer; - /** Allowed reaction emojis */ - available_reactions: enums.ChatReactions; - - protected get [id](): number { - return 0xFEB16771; - } - - static get [name](): string { - return "messages.setChatAvailableReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["available_reactions", types._ChatReactions, "ChatReactions"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.available_reactions, types._ChatReactions, "ChatReactions"], - ]; - } - - constructor(params: { peer: enums.InputPeer; available_reactions: enums.ChatReactions }) { - super(); - this.peer = params.peer; - this.available_reactions = params.available_reactions; - } -} - -/** Obtain available [message reactions »](https://core.telegram.org/api/reactions) */ -export class messages_getAvailableReactions_ extends Function_ { - static __F: (params: { hash: number }) => enums.messages.AvailableReactions; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x18DEA0AC; - } - - static get [name](): string { - return "messages.getAvailableReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using [help.getConfig, `reactions_default` field](https://core.telegram.org/method/help.getConfig). */ -export class messages_setDefaultReaction_ extends Function_ { - static __F: (params: { reaction: enums.Reaction }) => boolean; - /** New emoji reaction */ - reaction: enums.Reaction; - - protected get [id](): number { - return 0x4F47A016; - } - - static get [name](): string { - return "messages.setDefaultReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["reaction", types._Reaction, "Reaction"], - ]; - } - - protected get [params](): Params { - return [ - [this.reaction, types._Reaction, "Reaction"], - ]; - } - - constructor(params: { reaction: enums.Reaction }) { - super(); - this.reaction = params.reaction; - } -} - -/** Translate a given text. */ -export class messages_translateText_ extends Function_ { - static __F: (params: { peer?: enums.InputPeer; id?: Array; text?: Array; to_lang: string }) => enums.messages.TranslatedText; - /** If the text is a chat message, the peer ID */ - peer?: enums.InputPeer; - /** A list of message IDs to translate */ - id?: Array; - /** A list of styled messages to translate */ - text?: Array; - /** Two-letter ISO 639-1 language code of the language to which the message is translated */ - to_lang: string; - - protected get [id](): number { - return 0x63183030; - } - - static get [name](): string { - return "messages.translateText" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "flags.0?InputPeer"], - ["id", ["number"], "flags.0?Vector"], - ["text", [types._TextWithEntities], "flags.1?Vector"], - ["to_lang", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer ?? null, types._InputPeer, "flags.0?InputPeer"], - [this.id ?? null, ["number"], "flags.0?Vector"], - [this.text ?? null, [types._TextWithEntities], "flags.1?Vector"], - [this.to_lang, "string", "string"], - ]; - } - - constructor(params: { peer?: enums.InputPeer; id?: Array; text?: Array; to_lang: string }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.text = params.text; - this.to_lang = params.to_lang; - } -} - -/** Get unread reactions to messages you sent */ -export class messages_getUnreadReactions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; top_msg_id?: number; offset_id: number; add_offset: number; limit: number; max_id: number; min_id: number }) => enums.messages.Messages; - /** Peer */ - peer: enums.InputPeer; - /** If set, considers only reactions to messages within the specified [forum topic](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - add_offset: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** Only return reactions for messages up until this message ID */ - max_id: number; - /** Only return reactions for messages starting from this message ID */ - min_id: number; - - protected get [id](): number { - return 0x3223495B; - } - - static get [name](): string { - return "messages.getUnreadReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ["offset_id", "number", "int"], - ["add_offset", "number", "int"], - ["limit", "number", "int"], - ["max_id", "number", "int"], - ["min_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - [this.offset_id, "number", "int"], - [this.add_offset, "number", "int"], - [this.limit, "number", "int"], - [this.max_id, "number", "int"], - [this.min_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id?: number; offset_id: number; add_offset: number; limit: number; max_id: number; min_id: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - this.offset_id = params.offset_id; - this.add_offset = params.add_offset; - this.limit = params.limit; - this.max_id = params.max_id; - this.min_id = params.min_id; - } -} - -/** Mark [message reactions »](https://core.telegram.org/api/reactions) as read */ -export class messages_readReactions_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; top_msg_id?: number }) => enums.messages.AffectedHistory; - /** Peer */ - peer: enums.InputPeer; - /** Mark as read only reactions to messages within the specified [forum topic](https://core.telegram.org/api/forum#forum-topics) */ - top_msg_id?: number; - - protected get [id](): number { - return 0x54AA7F8E; - } - - static get [name](): string { - return "messages.readReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["top_msg_id", "number", "flags.0?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.top_msg_id ?? null, "number", "flags.0?int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; top_msg_id?: number }) { - super(); - this.peer = params.peer; - this.top_msg_id = params.top_msg_id; - } -} - -/** View and search recently sent media. -This method does not support pagination. */ -export class messages_searchSentMedia_ extends Function_ { - static __F: (params: { q: string; filter: enums.MessagesFilter; limit: number }) => enums.messages.Messages; - /** Optional search query */ - q: string; - /** Message filter */ - filter: enums.MessagesFilter; - /** Maximum number of results to return (max 100). */ - limit: number; - - protected get [id](): number { - return 0x107E31A0; - } - - static get [name](): string { - return "messages.searchSentMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["q", "string", "string"], - ["filter", types._MessagesFilter, "MessagesFilter"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.q, "string", "string"], - [this.filter, types._MessagesFilter, "MessagesFilter"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { q: string; filter: enums.MessagesFilter; limit: number }) { - super(); - this.q = params.q; - this.filter = params.filter; - this.limit = params.limit; - } -} - -/** Returns installed attachment menu [bot mini apps »](https://core.telegram.org/api/bots/attach) */ -export class messages_getAttachMenuBots_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.AttachMenuBots; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x16FCC2CB; - } - - static get [name](): string { - return "messages.getAttachMenuBots" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Returns attachment menu entry for a [bot mini app that can be launched from the attachment menu »](https://core.telegram.org/api/bots/attach) */ -export class messages_getAttachMenuBot_ extends Function_ { - static __F: (params: { bot: enums.InputUser }) => enums.AttachMenuBotsBot; - /** Bot ID */ - bot: enums.InputUser; - - protected get [id](): number { - return 0x77216192; - } - - static get [name](): string { - return "messages.getAttachMenuBot" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { bot: enums.InputUser }) { - super(); - this.bot = params.bot; - } -} - -/** Enable or disable [web bot attachment menu »](https://core.telegram.org/api/bots/attach) */ -export class messages_toggleBotInAttachMenu_ extends Function_ { - static __F: (params: { write_allowed?: true; bot: enums.InputUser; enabled: boolean }) => boolean; - /** Whether the user authorizes the bot to write messages to them, if requested by [attachMenuBot](https://core.telegram.org/constructor/attachMenuBot).`request_write_access` */ - write_allowed?: true; - /** Bot ID */ - bot: enums.InputUser; - /** Toggle */ - enabled: boolean; - - protected get [id](): number { - return 0x69F59D69; - } - - static get [name](): string { - return "messages.toggleBotInAttachMenu" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["write_allowed", "true", "flags.0?true"], - ["bot", types._InputUser, "InputUser"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.write_allowed ?? null, "true", "flags.0?true"], - [this.bot, types._InputUser, "InputUser"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { write_allowed?: true; bot: enums.InputUser; enabled: boolean }) { - super(); - this.write_allowed = params.write_allowed; - this.bot = params.bot; - this.enabled = params.enabled; - } -} - -/** Open a [bot mini app](https://core.telegram.org/bots/webapps), sending over user information after user confirmation. */ -export class messages_requestWebView_ extends Function_ { - static __F: (params: { from_bot_menu?: true; silent?: true; peer: enums.InputPeer; bot: enums.InputUser; url?: string; start_param?: string; theme_params?: enums.DataJSON; platform: string; reply_to?: enums.InputReplyTo; send_as?: enums.InputPeer }) => enums.WebViewResult; - /** Whether the webview was opened by clicking on the bot's [menu button »](https://core.telegram.org/api/bots/menu). */ - from_bot_menu?: true; - /** Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is [terminated](https://core.telegram.org/method/messages.sendWebViewResultMessage) should be sent silently (no notifications for the receivers). */ - silent?: true; - /** Dialog where the web app is being opened, and where the resulting message will be sent (see the [docs for more info »](https://core.telegram.org/api/bots/webapps)). */ - peer: enums.InputPeer; - /** Bot that owns the [web app](https://core.telegram.org/api/bots/webapps) */ - bot: enums.InputUser; - /** [Web app URL](https://core.telegram.org/api/bots/webapps) */ - url?: string; - /** If the web app was opened from the attachment menu using a [attachment menu deep link](https://core.telegram.org/api/links#bot-attachment-or-side-menu-links), `start_param` should contain the `data` from the `startattach` parameter. */ - start_param?: string; - /** [Theme parameters »](https://core.telegram.org/api/bots/webapps#theme-parameters) */ - theme_params?: enums.DataJSON; - /** Short name of the application; 0-64 English letters, digits, and underscores */ - platform: string; - /** If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is [terminated](https://core.telegram.org/method/messages.sendWebViewResultMessage) should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** Open the web app as the specified peer, sending the resulting the message as the specified peer. */ - send_as?: enums.InputPeer; - - protected get [id](): number { - return 0x269DC2C1; - } - - static get [name](): string { - return "messages.requestWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["from_bot_menu", "true", "flags.4?true"], - ["silent", "true", "flags.5?true"], - ["peer", types._InputPeer, "InputPeer"], - ["bot", types._InputUser, "InputUser"], - ["url", "string", "flags.1?string"], - ["start_param", "string", "flags.3?string"], - ["theme_params", types._DataJSON, "flags.2?DataJSON"], - ["platform", "string", "string"], - ["reply_to", types._InputReplyTo, "flags.0?InputReplyTo"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.from_bot_menu ?? null, "true", "flags.4?true"], - [this.silent ?? null, "true", "flags.5?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.bot, types._InputUser, "InputUser"], - [this.url ?? null, "string", "flags.1?string"], - [this.start_param ?? null, "string", "flags.3?string"], - [this.theme_params ?? null, types._DataJSON, "flags.2?DataJSON"], - [this.platform, "string", "string"], - [this.reply_to ?? null, types._InputReplyTo, "flags.0?InputReplyTo"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - ]; - } - - constructor(params: { from_bot_menu?: true; silent?: true; peer: enums.InputPeer; bot: enums.InputUser; url?: string; start_param?: string; theme_params?: enums.DataJSON; platform: string; reply_to?: enums.InputReplyTo; send_as?: enums.InputPeer }) { - super(); - this.from_bot_menu = params.from_bot_menu; - this.silent = params.silent; - this.peer = params.peer; - this.bot = params.bot; - this.url = params.url; - this.start_param = params.start_param; - this.theme_params = params.theme_params; - this.platform = params.platform; - this.reply_to = params.reply_to; - this.send_as = params.send_as; - } -} - -/** Indicate to the server (from the user side) that the user is still using a web app. */ -export class messages_prolongWebView_ extends Function_ { - static __F: (params: { silent?: true; peer: enums.InputPeer; bot: enums.InputUser; query_id: bigint; reply_to?: enums.InputReplyTo; send_as?: enums.InputPeer }) => boolean; - /** Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is [terminated](https://core.telegram.org/method/messages.sendWebViewResultMessage) should be sent silently (no notifications for the receivers). */ - silent?: true; - /** Dialog where the web app was opened. */ - peer: enums.InputPeer; - /** Bot that owns the [web app](https://core.telegram.org/api/bots/webapps) */ - bot: enums.InputUser; - /** Web app interaction ID obtained from [messages.requestWebView](https://core.telegram.org/method/messages.requestWebView) */ - query_id: bigint; - /** If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is [terminated](https://core.telegram.org/method/messages.sendWebViewResultMessage) should be sent in reply to the specified message or story. */ - reply_to?: enums.InputReplyTo; - /** Open the web app as the specified peer */ - send_as?: enums.InputPeer; - - protected get [id](): number { - return 0xB0D81A83; - } - - static get [name](): string { - return "messages.prolongWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["silent", "true", "flags.5?true"], - ["peer", types._InputPeer, "InputPeer"], - ["bot", types._InputUser, "InputUser"], - ["query_id", "bigint", "long"], - ["reply_to", types._InputReplyTo, "flags.0?InputReplyTo"], - ["send_as", types._InputPeer, "flags.13?InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.silent ?? null, "true", "flags.5?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.bot, types._InputUser, "InputUser"], - [this.query_id, "bigint", "long"], - [this.reply_to ?? null, types._InputReplyTo, "flags.0?InputReplyTo"], - [this.send_as ?? null, types._InputPeer, "flags.13?InputPeer"], - ]; - } - - constructor(params: { silent?: true; peer: enums.InputPeer; bot: enums.InputUser; query_id: bigint; reply_to?: enums.InputReplyTo; send_as?: enums.InputPeer }) { - super(); - this.silent = params.silent; - this.peer = params.peer; - this.bot = params.bot; - this.query_id = params.query_id; - this.reply_to = params.reply_to; - this.send_as = params.send_as; - } -} - -/** Open a [bot mini app](https://core.telegram.org/api/bots/webapps). */ -export class messages_requestSimpleWebView_ extends Function_ { - static __F: (params: { from_switch_webview?: true; from_side_menu?: true; bot: enums.InputUser; url?: string; start_param?: string; theme_params?: enums.DataJSON; platform: string }) => enums.SimpleWebViewResult; - /** Whether the webapp was opened by clicking on the `switch_webview` button shown on top of the inline results list returned by [messages.getInlineBotResults](https://core.telegram.org/method/messages.getInlineBotResults). */ - from_switch_webview?: true; - /** Set this flag if opening the Mini App from the installed [side menu entry »](https://core.telegram.org/api/bots/attach) or from a [Mini App link »](https://core.telegram.org/api/links#mini-app-links). */ - from_side_menu?: true; - /** Bot that owns the mini app */ - bot: enums.InputUser; - /** Web app URL, if opening from a keyboard button or inline result */ - url?: string; - /** Start parameter, if opening from a [Mini App link »](https://core.telegram.org/api/links#mini-app-links). */ - start_param?: string; - /** [Theme parameters »](https://core.telegram.org/api/bots/webapps#theme-parameters) */ - theme_params?: enums.DataJSON; - /** Short name of the application; 0-64 English letters, digits, and underscores */ - platform: string; - - protected get [id](): number { - return 0x1A46500A; - } - - static get [name](): string { - return "messages.requestSimpleWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["from_switch_webview", "true", "flags.1?true"], - ["from_side_menu", "true", "flags.2?true"], - ["bot", types._InputUser, "InputUser"], - ["url", "string", "flags.3?string"], - ["start_param", "string", "flags.4?string"], - ["theme_params", types._DataJSON, "flags.0?DataJSON"], - ["platform", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.from_switch_webview ?? null, "true", "flags.1?true"], - [this.from_side_menu ?? null, "true", "flags.2?true"], - [this.bot, types._InputUser, "InputUser"], - [this.url ?? null, "string", "flags.3?string"], - [this.start_param ?? null, "string", "flags.4?string"], - [this.theme_params ?? null, types._DataJSON, "flags.0?DataJSON"], - [this.platform, "string", "string"], - ]; - } - - constructor(params: { from_switch_webview?: true; from_side_menu?: true; bot: enums.InputUser; url?: string; start_param?: string; theme_params?: enums.DataJSON; platform: string }) { - super(); - this.from_switch_webview = params.from_switch_webview; - this.from_side_menu = params.from_side_menu; - this.bot = params.bot; - this.url = params.url; - this.start_param = params.start_param; - this.theme_params = params.theme_params; - this.platform = params.platform; - } -} - -/** Terminate webview interaction started with [messages.requestWebView](https://core.telegram.org/method/messages.requestWebView), sending the specified message to the chat on behalf of the user. */ -export class messages_sendWebViewResultMessage_ extends Function_ { - static __F: (params: { bot_query_id: string; result: enums.InputBotInlineResult }) => enums.WebViewMessageSent; - /** Webview interaction ID obtained from [messages.requestWebView](https://core.telegram.org/method/messages.requestWebView) */ - bot_query_id: string; - /** Message to send */ - result: enums.InputBotInlineResult; - - protected get [id](): number { - return 0x0A4314F5; - } - - static get [name](): string { - return "messages.sendWebViewResultMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot_query_id", "string", "string"], - ["result", types._InputBotInlineResult, "InputBotInlineResult"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot_query_id, "string", "string"], - [this.result, types._InputBotInlineResult, "InputBotInlineResult"], - ]; - } - - constructor(params: { bot_query_id: string; result: enums.InputBotInlineResult }) { - super(); - this.bot_query_id = params.bot_query_id; - this.result = params.result; - } -} - -/** Used by the user to relay data from an opened [reply keyboard bot mini app](https://core.telegram.org/api/bots/webapps) to the bot that owns it. */ -export class messages_sendWebViewData_ extends Function_ { - static __F: (params: { bot: enums.InputUser; random_id: bigint; button_text: string; data: string }) => enums.Updates; - /** Bot that owns the web app */ - bot: enums.InputUser; - /** Unique client message ID to prevent duplicate sending of the same event */ - random_id: bigint; - /** Text of the [keyboardButtonSimpleWebView](https://core.telegram.org/constructor/keyboardButtonSimpleWebView) that was pressed to open the web app. */ - button_text: string; - /** Data to relay to the bot, obtained from a [`web_app_data_send` JS event](https://core.telegram.org/api/web-events#web-app-data-send). */ - data: string; - - protected get [id](): number { - return 0xDC0242C8; - } - - static get [name](): string { - return "messages.sendWebViewData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ["random_id", "bigint", "long"], - ["button_text", "string", "string"], - ["data", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - [this.random_id, "bigint", "long"], - [this.button_text, "string", "string"], - [this.data, "string", "string"], - ]; - } - - constructor(params: { bot: enums.InputUser; random_id: bigint; button_text: string; data: string }) { - super(); - this.bot = params.bot; - this.random_id = params.random_id; - this.button_text = params.button_text; - this.data = params.data; - } -} - -/** [Transcribe voice message](https://core.telegram.org/api/transcribe) */ -export class messages_transcribeAudio_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.messages.TranscribedAudio; - /** Peer ID where the voice message was sent */ - peer: enums.InputPeer; - /** Voice message ID */ - msg_id: number; - - protected get [id](): number { - return 0x269E9A49; - } - - static get [name](): string { - return "messages.transcribeAudio" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** Rate [transcribed voice message](https://core.telegram.org/api/transcribe) */ -export class messages_rateTranscribedAudio_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number; transcription_id: bigint; good: boolean }) => boolean; - /** Peer where the voice message was sent */ - peer: enums.InputPeer; - /** Message ID */ - msg_id: number; - /** Transcription ID */ - transcription_id: bigint; - /** Whether the transcription was correct */ - good: boolean; - - protected get [id](): number { - return 0x7F1D072F; - } - - static get [name](): string { - return "messages.rateTranscribedAudio" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["transcription_id", "bigint", "long"], - ["good", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.transcription_id, "bigint", "long"], - [this.good, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; transcription_id: bigint; good: boolean }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.transcription_id = params.transcription_id; - this.good = params.good; - } -} - -/** Fetch [custom emoji stickers »](https://core.telegram.org/api/custom-emoji). */ -export class messages_getCustomEmojiDocuments_ extends Function_ { - static __F: (params: { document_id: Array }) => enums.Document[]; - /** [Custom emoji](https://core.telegram.org/api/custom-emoji) IDs from a [messageEntityCustomEmoji](https://core.telegram.org/constructor/messageEntityCustomEmoji). */ - document_id: Array; - - protected get [id](): number { - return 0xD9AB0F54; - } - - static get [name](): string { - return "messages.getCustomEmojiDocuments" - } - - static get [paramDesc](): ParamDesc { - return [ - ["document_id", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.document_id, ["bigint"], "Vector"], - ]; - } - - constructor(params: { document_id: Array }) { - super(); - this.document_id = params.document_id; - } -} - -/** Gets the list of currently installed [custom emoji stickersets](https://core.telegram.org/api/custom-emoji). */ -export class messages_getEmojiStickers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.AllStickers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xFBFCA18F; - } - - static get [name](): string { - return "messages.getEmojiStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Gets featured custom emoji stickersets. */ -export class messages_getFeaturedEmojiStickers_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.FeaturedStickers; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x0ECF6736; - } - - static get [name](): string { - return "messages.getFeaturedEmojiStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -/** Report a [message reaction](https://core.telegram.org/api/reactions) */ -export class messages_reportReaction_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number; reaction_peer: enums.InputPeer }) => boolean; - /** Peer where the message was sent */ - peer: enums.InputPeer; - /** Message ID */ - id: number; - /** Peer that sent the reaction */ - reaction_peer: enums.InputPeer; - - protected get [id](): number { - return 0x3F64C076; - } - - static get [name](): string { - return "messages.reportReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["reaction_peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.reaction_peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number; reaction_peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.reaction_peer = params.reaction_peer; - } -} - -/** Got popular [message reactions](https://core.telegram.org/api/reactions) */ -export class messages_getTopReactions_ extends Function_ { - static __F: (params: { limit: number; hash: bigint }) => enums.messages.Reactions; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0xBB8125BA; - } - - static get [name](): string { - return "messages.getTopReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { limit: number; hash: bigint }) { - super(); - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Get recently used [message reactions](https://core.telegram.org/api/reactions) */ -export class messages_getRecentReactions_ extends Function_ { - static __F: (params: { limit: number; hash: bigint }) => enums.messages.Reactions; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x39461DB2; - } - - static get [name](): string { - return "messages.getRecentReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { limit: number; hash: bigint }) { - super(); - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Clear recently used [message reactions](https://core.telegram.org/api/reactions) */ -export class messages_clearRecentReactions_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x9DFEEFB4; - } - - static get [name](): string { - return "messages.clearRecentReactions" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get information about extended media */ -export class messages_getExtendedMedia_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.Updates; - /** Peer */ - peer: enums.InputPeer; - /** Message IDs */ - id: Array; - - protected get [id](): number { - return 0x84F80814; - } - - static get [name](): string { - return "messages.getExtendedMedia" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Changes the default value of the Time-To-Live setting, applied to all new chats. */ -export class messages_setDefaultHistoryTTL_ extends Function_ { - static __F: (params: { period: number }) => boolean; - /** The new default Time-To-Live of all messages sent in new chats. */ - period: number; - - protected get [id](): number { - return 0x9EB51445; - } - - static get [name](): string { - return "messages.setDefaultHistoryTTL" - } - - static get [paramDesc](): ParamDesc { - return [ - ["period", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.period, "number", "int"], - ]; - } - - constructor(params: { period: number }) { - super(); - this.period = params.period; - } -} - -/** Gets the default value of the Time-To-Live setting, applied to all new chats. */ -export class messages_getDefaultHistoryTTL_ extends Function_ { - static __F: () => enums.DefaultHistoryTTL; - protected get [id](): number { - return 0x658B7188; - } - - static get [name](): string { - return "messages.getDefaultHistoryTTL" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Send one or more chosen peers, as requested by a [keyboardButtonRequestPeer](https://core.telegram.org/constructor/keyboardButtonRequestPeer) button. */ -export class messages_sendBotRequestedPeer_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number; button_id: number; requested_peers: Array }) => enums.Updates; - /** The bot that sent the [keyboardButtonRequestPeer](https://core.telegram.org/constructor/keyboardButtonRequestPeer) button. */ - peer: enums.InputPeer; - /** ID of the message that contained the reply keyboard with the [keyboardButtonRequestPeer](https://core.telegram.org/constructor/keyboardButtonRequestPeer) button. */ - msg_id: number; - /** The `button_id` field from the [keyboardButtonRequestPeer](https://core.telegram.org/constructor/keyboardButtonRequestPeer) constructor. */ - button_id: number; - /** The chosen peers. */ - requested_peers: Array; - - protected get [id](): number { - return 0x91B2D060; - } - - static get [name](): string { - return "messages.sendBotRequestedPeer" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ["button_id", "number", "int"], - ["requested_peers", [types._InputPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - [this.button_id, "number", "int"], - [this.requested_peers, [types._InputPeer], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number; button_id: number; requested_peers: Array }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - this.button_id = params.button_id; - this.requested_peers = params.requested_peers; - } -} - -/** Represents a list of [emoji categories](https://core.telegram.org/api/custom-emoji#emoji-categories), to be used when selecting [custom emojis](https://core.telegram.org/api/custom-emoji). */ -export class messages_getEmojiGroups_ extends Function_ { - static __F: (params: { hash: number }) => enums.messages.EmojiGroups; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x7488CE5B; - } - - static get [name](): string { - return "messages.getEmojiGroups" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Represents a list of [emoji categories](https://core.telegram.org/api/custom-emoji#emoji-categories), to be used when selecting custom emojis to set as [custom emoji status](https://core.telegram.org/api). */ -export class messages_getEmojiStatusGroups_ extends Function_ { - static __F: (params: { hash: number }) => enums.messages.EmojiGroups; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x2ECD56CD; - } - - static get [name](): string { - return "messages.getEmojiStatusGroups" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Represents a list of [emoji categories](https://core.telegram.org/api/custom-emoji#emoji-categories), to be used when selecting custom emojis to set as [profile picture](https://core.telegram.org/api/files#sticker-profile-pictures). */ -export class messages_getEmojiProfilePhotoGroups_ extends Function_ { - static __F: (params: { hash: number }) => enums.messages.EmojiGroups; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x21A548F3; - } - - static get [name](): string { - return "messages.getEmojiProfilePhotoGroups" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Look for [custom emojis](https://core.telegram.org/api/custom-emoji) associated to a UTF8 emoji */ -export class messages_searchCustomEmoji_ extends Function_ { - static __F: (params: { emoticon: string; hash: bigint }) => enums.EmojiList; - /** The emoji */ - emoticon: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x2C11C0D7; - } - - static get [name](): string { - return "messages.searchCustomEmoji" - } - - static get [paramDesc](): ParamDesc { - return [ - ["emoticon", "string", "string"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.emoticon, "string", "string"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { emoticon: string; hash: bigint }) { - super(); - this.emoticon = params.emoticon; - this.hash = params.hash; - } -} - -/** Show or hide the [real-time chat translation popup](https://core.telegram.org/api/translation) for a certain chat */ -export class messages_togglePeerTranslations_ extends Function_ { - static __F: (params: { disabled?: true; peer: enums.InputPeer }) => boolean; - /** Whether to disable or enable the real-time chat translation popup */ - disabled?: true; - /** The peer */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xE47CB579; - } - - static get [name](): string { - return "messages.togglePeerTranslations" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["disabled", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.disabled ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { disabled?: true; peer: enums.InputPeer }) { - super(); - this.disabled = params.disabled; - this.peer = params.peer; - } -} - -/** Obtain information about a [direct link Mini App](https://core.telegram.org/api/bots/webapps#direct-link-mini-apps) */ -export class messages_getBotApp_ extends Function_ { - static __F: (params: { app: enums.InputBotApp; hash: bigint }) => enums.messages.BotApp; - /** Bot app information obtained from a [Direct Mini App deep link »](https://core.telegram.org/api/links#direct-mini-app-links). */ - app: enums.InputBotApp; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x34FDC5C3; - } - - static get [name](): string { - return "messages.getBotApp" - } - - static get [paramDesc](): ParamDesc { - return [ - ["app", types._InputBotApp, "InputBotApp"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.app, types._InputBotApp, "InputBotApp"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { app: enums.InputBotApp; hash: bigint }) { - super(); - this.app = params.app; - this.hash = params.hash; - } -} - -/** Open a [bot mini app](https://core.telegram.org/bots/webapps) from a [direct Mini App deep link](https://core.telegram.org/api/links#direct-mini-app-links), sending over user information after user confirmation. */ -export class messages_requestAppWebView_ extends Function_ { - static __F: (params: { write_allowed?: true; peer: enums.InputPeer; app: enums.InputBotApp; start_param?: string; theme_params?: enums.DataJSON; platform: string }) => enums.AppWebViewResult; - /** Set this flag if the bot is asking permission to send messages to the user as specified in the [direct Mini App deep link](https://core.telegram.org/api/links#direct-mini-app-links) docs, and the user agreed. */ - write_allowed?: true; - /** If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead. */ - peer: enums.InputPeer; - /** The app obtained by invoking [messages.getBotApp](https://core.telegram.org/method/messages.getBotApp) as specified in the [direct Mini App deep link](https://core.telegram.org/api/links#direct-mini-app-links) docs. */ - app: enums.InputBotApp; - /** If the `startapp` query string parameter is present in the [direct Mini App deep link](https://core.telegram.org/api/links#direct-mini-app-links), pass it to `start_param`. */ - start_param?: string; - /** [Theme parameters »](https://core.telegram.org/api/bots/webapps#theme-parameters) */ - theme_params?: enums.DataJSON; - /** Short name of the application; 0-64 English letters, digits, and underscores */ - platform: string; - - protected get [id](): number { - return 0x8C5A3B3C; - } - - static get [name](): string { - return "messages.requestAppWebView" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["write_allowed", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["app", types._InputBotApp, "InputBotApp"], - ["start_param", "string", "flags.1?string"], - ["theme_params", types._DataJSON, "flags.2?DataJSON"], - ["platform", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.write_allowed ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.app, types._InputBotApp, "InputBotApp"], - [this.start_param ?? null, "string", "flags.1?string"], - [this.theme_params ?? null, types._DataJSON, "flags.2?DataJSON"], - [this.platform, "string", "string"], - ]; - } - - constructor(params: { write_allowed?: true; peer: enums.InputPeer; app: enums.InputBotApp; start_param?: string; theme_params?: enums.DataJSON; platform: string }) { - super(); - this.write_allowed = params.write_allowed; - this.peer = params.peer; - this.app = params.app; - this.start_param = params.start_param; - this.theme_params = params.theme_params; - this.platform = params.platform; - } -} - -/** Set a custom [wallpaper »](https://core.telegram.org/api/wallpapers) in a specific private chat with another user. */ -export class messages_setChatWallPaper_ extends Function_ { - static __F: (params: { for_both?: true; revert?: true; peer: enums.InputPeer; wallpaper?: enums.InputWallPaper; settings?: enums.WallPaperSettings; id?: number }) => enums.Updates; - /** Only for [Premium](https://core.telegram.org/api/premium) users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. */ - for_both?: true; - /** If we don't like the new wallpaper the other user of the chat has chosen for us using the `for_both` flag, we can re-set our previous wallpaper just on our side using this flag. */ - revert?: true; - /** The private chat where the wallpaper will be set */ - peer: enums.InputPeer; - /** The [wallpaper »](https://core.telegram.org/api/wallpapers), obtained as described in the [wallpaper documentation »](https://core.telegram.org/api/wallpapers#uploading-wallpapers); must **not** be provided when installing a wallpaper obtained from a [messageActionSetChatWallPaper](https://core.telegram.org/constructor/messageActionSetChatWallPaper) service message (`id` must be provided, instead). */ - wallpaper?: enums.InputWallPaper; - /** Wallpaper settings, obtained as described in the [wallpaper documentation »](https://core.telegram.org/api/wallpapers#uploading-wallpapers) or from [messageActionSetChatWallPaper](https://core.telegram.org/constructor/messageActionSetChatWallPaper).`wallpaper`.`settings`. */ - settings?: enums.WallPaperSettings; - /** If the wallpaper was obtained from a [messageActionSetChatWallPaper](https://core.telegram.org/constructor/messageActionSetChatWallPaper) service message, must contain the ID of that message. */ - id?: number; - - protected get [id](): number { - return 0x8FFACAE1; - } - - static get [name](): string { - return "messages.setChatWallPaper" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["for_both", "true", "flags.3?true"], - ["revert", "true", "flags.4?true"], - ["peer", types._InputPeer, "InputPeer"], - ["wallpaper", types._InputWallPaper, "flags.0?InputWallPaper"], - ["settings", types._WallPaperSettings, "flags.2?WallPaperSettings"], - ["id", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.for_both ?? null, "true", "flags.3?true"], - [this.revert ?? null, "true", "flags.4?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.wallpaper ?? null, types._InputWallPaper, "flags.0?InputWallPaper"], - [this.settings ?? null, types._WallPaperSettings, "flags.2?WallPaperSettings"], - [this.id ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { for_both?: true; revert?: true; peer: enums.InputPeer; wallpaper?: enums.InputWallPaper; settings?: enums.WallPaperSettings; id?: number }) { - super(); - this.for_both = params.for_both; - this.revert = params.revert; - this.peer = params.peer; - this.wallpaper = params.wallpaper; - this.settings = params.settings; - this.id = params.id; - } -} - -/** Search for [custom emoji stickersets »](https://core.telegram.org/api/custom-emoji) */ -export class messages_searchEmojiStickerSets_ extends Function_ { - static __F: (params: { exclude_featured?: true; q: string; hash: bigint }) => enums.messages.FoundStickerSets; - /** Exclude featured stickersets from results */ - exclude_featured?: true; - /** Query string */ - q: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x92B4494C; - } - - static get [name](): string { - return "messages.searchEmojiStickerSets" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["exclude_featured", "true", "flags.0?true"], - ["q", "string", "string"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.exclude_featured ?? null, "true", "flags.0?true"], - [this.q, "string", "string"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { exclude_featured?: true; q: string; hash: bigint }) { - super(); - this.exclude_featured = params.exclude_featured; - this.q = params.q; - this.hash = params.hash; - } -} - -/** Returns the current saved dialog list, see [here »](https://core.telegram.org/api/saved-messages) for more info. */ -export class messages_getSavedDialogs_ extends Function_ { - static __F: (params: { exclude_pinned?: true; offset_date: number; offset_id: number; offset_peer: enums.InputPeer; limit: number; hash: bigint }) => enums.messages.SavedDialogs; - /** Exclude pinned dialogs */ - exclude_pinned?: true; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_date: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) (`top_message` ID used for pagination) */ - offset_id: number; - /** [Offset peer for pagination](https://core.telegram.org/api/offsets) */ - offset_peer: enums.InputPeer; - /** Number of list elements to be returned */ - limit: number; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: bigint; - - protected get [id](): number { - return 0x5381D21A; - } - - static get [name](): string { - return "messages.getSavedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["exclude_pinned", "true", "flags.0?true"], - ["offset_date", "number", "int"], - ["offset_id", "number", "int"], - ["offset_peer", types._InputPeer, "InputPeer"], - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.exclude_pinned ?? null, "true", "flags.0?true"], - [this.offset_date, "number", "int"], - [this.offset_id, "number", "int"], - [this.offset_peer, types._InputPeer, "InputPeer"], - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { exclude_pinned?: true; offset_date: number; offset_id: number; offset_peer: enums.InputPeer; limit: number; hash: bigint }) { - super(); - this.exclude_pinned = params.exclude_pinned; - this.offset_date = params.offset_date; - this.offset_id = params.offset_id; - this.offset_peer = params.offset_peer; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Returns [saved messages »](https://core.telegram.org/api/saved-messages) forwarded from a specific peer */ -export class messages_getSavedHistory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; offset_id: number; offset_date: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) => enums.messages.Messages; - /** Target peer */ - peer: enums.InputPeer; - /** Only return messages starting from the specified message ID */ - offset_id: number; - /** Only return messages sent before the specified date */ - offset_date: number; - /** Number of list elements to be skipped, negative values are also accepted. */ - add_offset: number; - /** Number of results to return */ - limit: number; - /** If a positive value was transferred, the method will return only messages with IDs less than **max\_id** */ - max_id: number; - /** If a positive value was transferred, the method will return only messages with IDs more than **min\_id** */ - min_id: number; - /** [Result hash](https://core.telegram.org/api/offsets) */ - hash: bigint; - - protected get [id](): number { - return 0x3D9A414D; - } - - static get [name](): string { - return "messages.getSavedHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["offset_id", "number", "int"], - ["offset_date", "number", "int"], - ["add_offset", "number", "int"], - ["limit", "number", "int"], - ["max_id", "number", "int"], - ["min_id", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.offset_id, "number", "int"], - [this.offset_date, "number", "int"], - [this.add_offset, "number", "int"], - [this.limit, "number", "int"], - [this.max_id, "number", "int"], - [this.min_id, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer: enums.InputPeer; offset_id: number; offset_date: number; add_offset: number; limit: number; max_id: number; min_id: number; hash: bigint }) { - super(); - this.peer = params.peer; - this.offset_id = params.offset_id; - this.offset_date = params.offset_date; - this.add_offset = params.add_offset; - this.limit = params.limit; - this.max_id = params.max_id; - this.min_id = params.min_id; - this.hash = params.hash; - } -} - -/** Deletes messages forwarded from a specific peer to [saved messages »](https://core.telegram.org/api/saved-messages). */ -export class messages_deleteSavedHistory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; max_id: number; min_date?: number; max_date?: number }) => enums.messages.AffectedHistory; - /** Peer, whose messages will be deleted from [saved messages »](https://core.telegram.org/api/saved-messages) */ - peer: enums.InputPeer; - /** Maximum ID of message to delete */ - max_id: number; - /** Delete all messages newer than this UNIX timestamp */ - min_date?: number; - /** Delete all messages older than this UNIX timestamp */ - max_date?: number; - - protected get [id](): number { - return 0x6E98102B; - } - - static get [name](): string { - return "messages.deleteSavedHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["max_id", "number", "int"], - ["min_date", "number", "flags.2?int"], - ["max_date", "number", "flags.3?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.max_id, "number", "int"], - [this.min_date ?? null, "number", "flags.2?int"], - [this.max_date ?? null, "number", "flags.3?int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; max_id: number; min_date?: number; max_date?: number }) { - super(); - this.peer = params.peer; - this.max_id = params.max_id; - this.min_date = params.min_date; - this.max_date = params.max_date; - } -} - -/** Get pinned [saved dialogs, see here »](https://core.telegram.org/api/saved-messages) for more info. */ -export class messages_getPinnedSavedDialogs_ extends Function_ { - static __F: () => enums.messages.SavedDialogs; - protected get [id](): number { - return 0xD63D94E0; - } - - static get [name](): string { - return "messages.getPinnedSavedDialogs" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Pin or unpin a [saved message dialog »](https://core.telegram.org/api/saved-messages). */ -export class messages_toggleSavedDialogPin_ extends Function_ { - static __F: (params: { pinned?: true; peer: enums.InputDialogPeer }) => boolean; - /** Whether to pin or unpin the dialog */ - pinned?: true; - /** The dialog to pin */ - peer: enums.InputDialogPeer; - - protected get [id](): number { - return 0xAC81BBDE; - } - - static get [name](): string { - return "messages.toggleSavedDialogPin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.0?true"], - ["peer", types._InputDialogPeer, "InputDialogPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.0?true"], - [this.peer, types._InputDialogPeer, "InputDialogPeer"], - ]; - } - - constructor(params: { pinned?: true; peer: enums.InputDialogPeer }) { - super(); - this.pinned = params.pinned; - this.peer = params.peer; - } -} - -/** Reorder pinned [saved message dialogs »](https://core.telegram.org/api/saved-messages). */ -export class messages_reorderPinnedSavedDialogs_ extends Function_ { - static __F: (params: { force?: true; order: Array }) => boolean; - /** If set, dialogs pinned server-side but not present in the `order` field will be unpinned. */ - force?: true; - /** New dialog order */ - order: Array; - - protected get [id](): number { - return 0x8B716587; - } - - static get [name](): string { - return "messages.reorderPinnedSavedDialogs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["force", "true", "flags.0?true"], - ["order", [types._InputDialogPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.force ?? null, "true", "flags.0?true"], - [this.order, [types._InputDialogPeer], "Vector"], - ]; - } - - constructor(params: { force?: true; order: Array }) { - super(); - this.force = params.force; - this.order = params.order; - } -} - -export class messages_getSavedReactionTags_ extends Function_ { - static __F: (params: { peer?: enums.InputPeer; hash: bigint }) => enums.messages.SavedReactionTags; - peer?: enums.InputPeer; - hash: bigint; - - protected get [id](): number { - return 0x3637E05B; - } - - static get [name](): string { - return "messages.getSavedReactionTags" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "flags.0?InputPeer"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer ?? null, types._InputPeer, "flags.0?InputPeer"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { peer?: enums.InputPeer; hash: bigint }) { - super(); - this.peer = params.peer; - this.hash = params.hash; - } -} - -export class messages_updateSavedReactionTag_ extends Function_ { - static __F: (params: { reaction: enums.Reaction; title?: string }) => boolean; - reaction: enums.Reaction; - title?: string; - - protected get [id](): number { - return 0x60297DEC; - } - - static get [name](): string { - return "messages.updateSavedReactionTag" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reaction", types._Reaction, "Reaction"], - ["title", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reaction, types._Reaction, "Reaction"], - [this.title ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { reaction: enums.Reaction; title?: string }) { - super(); - this.reaction = params.reaction; - this.title = params.title; - } -} - -export class messages_getDefaultTagReactions_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.Reactions; - hash: bigint; - - protected get [id](): number { - return 0xBDF93428; - } - - static get [name](): string { - return "messages.getDefaultTagReactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -export class messages_getOutboxReadDate_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.OutboxReadDate; - peer: enums.InputPeer; - msg_id: number; - - protected get [id](): number { - return 0x8C4BFE5D; - } - - static get [name](): string { - return "messages.getOutboxReadDate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -export class messages_getQuickReplies_ extends Function_ { - static __F: (params: { hash: bigint }) => enums.messages.QuickReplies; - hash: bigint; - - protected get [id](): number { - return 0xD483F2A8; - } - - static get [name](): string { - return "messages.getQuickReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { hash: bigint }) { - super(); - this.hash = params.hash; - } -} - -export class messages_reorderQuickReplies_ extends Function_ { - static __F: (params: { order: Array }) => boolean; - order: Array; - - protected get [id](): number { - return 0x60331907; - } - - static get [name](): string { - return "messages.reorderQuickReplies" - } - - static get [paramDesc](): ParamDesc { - return [ - ["order", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.order, ["number"], "Vector"], - ]; - } - - constructor(params: { order: Array }) { - super(); - this.order = params.order; - } -} - -export class messages_checkQuickReplyShortcut_ extends Function_ { - static __F: (params: { shortcut: string }) => boolean; - shortcut: string; - - protected get [id](): number { - return 0xF1D0FBD3; - } - - static get [name](): string { - return "messages.checkQuickReplyShortcut" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut, "string", "string"], - ]; - } - - constructor(params: { shortcut: string }) { - super(); - this.shortcut = params.shortcut; - } -} - -export class messages_editQuickReplyShortcut_ extends Function_ { - static __F: (params: { shortcut_id: number; shortcut: string }) => boolean; - shortcut_id: number; - shortcut: string; - - protected get [id](): number { - return 0x5C003CEF; - } - - static get [name](): string { - return "messages.editQuickReplyShortcut" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ["shortcut", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - [this.shortcut, "string", "string"], - ]; - } - - constructor(params: { shortcut_id: number; shortcut: string }) { - super(); - this.shortcut_id = params.shortcut_id; - this.shortcut = params.shortcut; - } -} - -export class messages_deleteQuickReplyShortcut_ extends Function_ { - static __F: (params: { shortcut_id: number }) => boolean; - shortcut_id: number; - - protected get [id](): number { - return 0x3CC04740; - } - - static get [name](): string { - return "messages.deleteQuickReplyShortcut" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - ]; - } - - constructor(params: { shortcut_id: number }) { - super(); - this.shortcut_id = params.shortcut_id; - } -} - -export class messages_getQuickReplyMessages_ extends Function_ { - static __F: (params: { shortcut_id: number; id?: Array; hash: bigint }) => enums.messages.Messages; - shortcut_id: number; - id?: Array; - hash: bigint; - - protected get [id](): number { - return 0x94A495C3; - } - - static get [name](): string { - return "messages.getQuickReplyMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["shortcut_id", "number", "int"], - ["id", ["number"], "flags.0?Vector"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.shortcut_id, "number", "int"], - [this.id ?? null, ["number"], "flags.0?Vector"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { shortcut_id: number; id?: Array; hash: bigint }) { - super(); - this.shortcut_id = params.shortcut_id; - this.id = params.id; - this.hash = params.hash; - } -} - -export class messages_sendQuickReplyMessages_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; shortcut_id: number; id: Array; random_id: Array }) => enums.Updates; - peer: enums.InputPeer; - shortcut_id: number; - id: Array; - random_id: Array; - - protected get [id](): number { - return 0x6C750DE1; - } - - static get [name](): string { - return "messages.sendQuickReplyMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["shortcut_id", "number", "int"], - ["id", ["number"], "Vector"], - ["random_id", ["bigint"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.shortcut_id, "number", "int"], - [this.id, ["number"], "Vector"], - [this.random_id, ["bigint"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; shortcut_id: number; id: Array; random_id: Array }) { - super(); - this.peer = params.peer; - this.shortcut_id = params.shortcut_id; - this.id = params.id; - this.random_id = params.random_id; - } -} - -export class messages_deleteQuickReplyMessages_ extends Function_ { - static __F: (params: { shortcut_id: number; id: Array }) => enums.Updates; - shortcut_id: number; - id: Array; - - protected get [id](): number { - return 0xE105E910; - } - - static get [name](): string { - return "messages.deleteQuickReplyMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["shortcut_id", "number", "int"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.shortcut_id, "number", "int"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { shortcut_id: number; id: Array }) { - super(); - this.shortcut_id = params.shortcut_id; - this.id = params.id; - } -} - -export class messages_toggleDialogFilterTags_ extends Function_ { - static __F: (params: { enabled: boolean }) => boolean; - enabled: boolean; - - protected get [id](): number { - return 0xFD2DDA49; - } - - static get [name](): string { - return "messages.toggleDialogFilterTags" - } - - static get [paramDesc](): ParamDesc { - return [ - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { enabled: boolean }) { - super(); - this.enabled = params.enabled; - } -} - -export class messages_getMyStickers_ extends Function_ { - static __F: (params: { offset_id: bigint; limit: number }) => enums.messages.MyStickers; - offset_id: bigint; - limit: number; - - protected get [id](): number { - return 0xD0B5E1FC; - } - - static get [name](): string { - return "messages.getMyStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset_id", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset_id, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { offset_id: bigint; limit: number }) { - super(); - this.offset_id = params.offset_id; - this.limit = params.limit; - } -} - -/** Returns a current state of updates. */ -export class updates_getState_ extends Function_ { - static __F: () => enums.updates.State; - protected get [id](): number { - return 0xEDD4882A; - } - - static get [name](): string { - return "updates.getState" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get new [updates](https://core.telegram.org/api/updates). */ -export class updates_getDifference_ extends Function_ { - static __F: (params: { pts: number; pts_limit?: number; pts_total_limit?: number; date: number; qts: number; qts_limit?: number }) => enums.updates.Difference; - /** PTS, see [updates](https://core.telegram.org/api/updates). */ - pts: number; - /** PTS limit */ - pts_limit?: number; - /** For fast updating: if provided and `pts + pts_total_limit < remote pts`, [updates.differenceTooLong](https://core.telegram.org/constructor/updates.differenceTooLong) will be returned. - Simply tells the server to not return the difference if it is bigger than `pts_total_limit` - If the remote pts is too big (> ~4000000), this field will default to 1000000 */ - pts_total_limit?: number; - /** date, see [updates](https://core.telegram.org/api/updates). */ - date: number; - /** QTS, see [updates](https://core.telegram.org/api/updates). */ - qts: number; - /** QTS limit */ - qts_limit?: number; - - protected get [id](): number { - return 0x19C2F763; - } - - static get [name](): string { - return "updates.getDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pts", "number", "int"], - ["pts_limit", "number", "flags.1?int"], - ["pts_total_limit", "number", "flags.0?int"], - ["date", "number", "int"], - ["qts", "number", "int"], - ["qts_limit", "number", "flags.2?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pts, "number", "int"], - [this.pts_limit ?? null, "number", "flags.1?int"], - [this.pts_total_limit ?? null, "number", "flags.0?int"], - [this.date, "number", "int"], - [this.qts, "number", "int"], - [this.qts_limit ?? null, "number", "flags.2?int"], - ]; - } - - constructor(params: { pts: number; pts_limit?: number; pts_total_limit?: number; date: number; qts: number; qts_limit?: number }) { - super(); - this.pts = params.pts; - this.pts_limit = params.pts_limit; - this.pts_total_limit = params.pts_total_limit; - this.date = params.date; - this.qts = params.qts; - this.qts_limit = params.qts_limit; - } -} - -/** Returns the difference between the current state of updates of a certain channel and transmitted. */ -export class updates_getChannelDifference_ extends Function_ { - static __F: (params: { force?: true; channel: enums.InputChannel; filter: enums.ChannelMessagesFilter; pts: number; limit: number }) => enums.updates.ChannelDifference; - /** Set to true to skip some possibly unneeded updates and reduce server-side load */ - force?: true; - /** The channel */ - channel: enums.InputChannel; - /** Messsage filter */ - filter: enums.ChannelMessagesFilter; - /** Persistent timestamp (see [updates](https://core.telegram.org/api/updates)) */ - pts: number; - /** How many updates to fetch, max `100000` - Ordinary (non-bot) users are supposed to pass `10-100` */ - limit: number; - - protected get [id](): number { - return 0x03173D78; - } - - static get [name](): string { - return "updates.getChannelDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["force", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ["filter", types._ChannelMessagesFilter, "ChannelMessagesFilter"], - ["pts", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.force ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - [this.filter, types._ChannelMessagesFilter, "ChannelMessagesFilter"], - [this.pts, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { force?: true; channel: enums.InputChannel; filter: enums.ChannelMessagesFilter; pts: number; limit: number }) { - super(); - this.force = params.force; - this.channel = params.channel; - this.filter = params.filter; - this.pts = params.pts; - this.limit = params.limit; - } -} - -/** Installs a previously uploaded photo as a profile photo. */ -export class photos_updateProfilePhoto_ extends Function_ { - static __F: (params: { fallback?: true; bot?: enums.InputUser; id: enums.InputPhoto }) => enums.photos.Photo; - /** If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings. */ - fallback?: true; - /** Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. */ - bot?: enums.InputUser; - /** Input photo */ - id: enums.InputPhoto; - - protected get [id](): number { - return 0x09E82039; - } - - static get [name](): string { - return "photos.updateProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["fallback", "true", "flags.0?true"], - ["bot", types._InputUser, "flags.1?InputUser"], - ["id", types._InputPhoto, "InputPhoto"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.fallback ?? null, "true", "flags.0?true"], - [this.bot ?? null, types._InputUser, "flags.1?InputUser"], - [this.id, types._InputPhoto, "InputPhoto"], - ]; - } - - constructor(params: { fallback?: true; bot?: enums.InputUser; id: enums.InputPhoto }) { - super(); - this.fallback = params.fallback; - this.bot = params.bot; - this.id = params.id; - } -} - -/** Updates current user profile photo. */ -export class photos_uploadProfilePhoto_ extends Function_ { - static __F: (params?: { fallback?: true; bot?: enums.InputUser; file?: enums.InputFile; video?: enums.InputFile; video_start_ts?: number; video_emoji_markup?: enums.VideoSize }) => enums.photos.Photo; - /** If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings. */ - fallback?: true; - /** Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. */ - bot?: enums.InputUser; - /** Profile photo */ - file?: enums.InputFile; - /** [Animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) video */ - video?: enums.InputFile; - /** Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if `video` or `video_emoji_markup` is set. */ - video_start_ts?: number; - /** Animated sticker profile picture, must contain either a [videoSizeEmojiMarkup](https://core.telegram.org/constructor/videoSizeEmojiMarkup) or a [videoSizeStickerMarkup](https://core.telegram.org/constructor/videoSizeStickerMarkup) constructor. */ - video_emoji_markup?: enums.VideoSize; - - protected get [id](): number { - return 0x0388A3B5; - } - - static get [name](): string { - return "photos.uploadProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["fallback", "true", "flags.3?true"], - ["bot", types._InputUser, "flags.5?InputUser"], - ["file", types._InputFile, "flags.0?InputFile"], - ["video", types._InputFile, "flags.1?InputFile"], - ["video_start_ts", "number", "flags.2?double"], - ["video_emoji_markup", types._VideoSize, "flags.4?VideoSize"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.fallback ?? null, "true", "flags.3?true"], - [this.bot ?? null, types._InputUser, "flags.5?InputUser"], - [this.file ?? null, types._InputFile, "flags.0?InputFile"], - [this.video ?? null, types._InputFile, "flags.1?InputFile"], - [this.video_start_ts ?? null, "number", "flags.2?double"], - [this.video_emoji_markup ?? null, types._VideoSize, "flags.4?VideoSize"], - ]; - } - - constructor(params?: { fallback?: true; bot?: enums.InputUser; file?: enums.InputFile; video?: enums.InputFile; video_start_ts?: number; video_emoji_markup?: enums.VideoSize }) { - super(); - this.fallback = params?.fallback; - this.bot = params?.bot; - this.file = params?.file; - this.video = params?.video; - this.video_start_ts = params?.video_start_ts; - this.video_emoji_markup = params?.video_emoji_markup; - } -} - -/** Deletes profile photos. The method returns a list of successfully deleted photo IDs. */ -export class photos_deletePhotos_ extends Function_ { - static __F: (params: { id: Array }) => bigint[]; - /** Input photos to delete */ - id: Array; - - protected get [id](): number { - return 0x87CF7F2F; - } - - static get [name](): string { - return "photos.deletePhotos" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputPhoto], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputPhoto], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Returns the list of user photos. */ -export class photos_getUserPhotos_ extends Function_ { - static __F: (params: { user_id: enums.InputUser; offset: number; max_id: bigint; limit: number }) => enums.photos.Photos; - /** User ID */ - user_id: enums.InputUser; - /** Number of list elements to be skipped */ - offset: number; - /** If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when [refetching file references »](https://core.telegram.org/api/file_reference), as in conjuction with `limit=1` and `offset=-1` the [photo](https://core.telegram.org/constructor/photo) object with the `id` specified in `max_id` can be fetched. */ - max_id: bigint; - /** Number of list elements to be returned */ - limit: number; - - protected get [id](): number { - return 0x91CD32A8; - } - - static get [name](): string { - return "photos.getUserPhotos" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ["offset", "number", "int"], - ["max_id", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - [this.offset, "number", "int"], - [this.max_id, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { user_id: enums.InputUser; offset: number; max_id: bigint; limit: number }) { - super(); - this.user_id = params.user_id; - this.offset = params.offset; - this.max_id = params.max_id; - this.limit = params.limit; - } -} - -/** Upload a custom profile picture for a contact, or suggest a new profile picture to a contact. */ -export class photos_uploadContactProfilePhoto_ extends Function_ { - static __F: (params: { suggest?: true; save?: true; user_id: enums.InputUser; file?: enums.InputFile; video?: enums.InputFile; video_start_ts?: number; video_emoji_markup?: enums.VideoSize }) => enums.photos.Photo; - /** If set, will send a [messageActionSuggestProfilePhoto](https://core.telegram.org/constructor/messageActionSuggestProfilePhoto) service message to `user_id`, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user). */ - suggest?: true; - /** If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the [messageActionSuggestProfilePhoto](https://core.telegram.org/constructor/messageActionSuggestProfilePhoto) service message with [messages.deleteMessages](https://core.telegram.org/method/messages.deleteMessages)). */ - save?: true; - /** The contact */ - user_id: enums.InputUser; - /** Profile photo */ - file?: enums.InputFile; - /** [Animated profile picture](https://core.telegram.org/api/files#animated-profile-pictures) video */ - video?: enums.InputFile; - /** Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if `video` or `video_emoji_markup` is set. */ - video_start_ts?: number; - /** Animated sticker profile picture, must contain either a [videoSizeEmojiMarkup](https://core.telegram.org/constructor/videoSizeEmojiMarkup) or a [videoSizeStickerMarkup](https://core.telegram.org/constructor/videoSizeStickerMarkup) constructor. */ - video_emoji_markup?: enums.VideoSize; - - protected get [id](): number { - return 0xE14C4A71; - } - - static get [name](): string { - return "photos.uploadContactProfilePhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["suggest", "true", "flags.3?true"], - ["save", "true", "flags.4?true"], - ["user_id", types._InputUser, "InputUser"], - ["file", types._InputFile, "flags.0?InputFile"], - ["video", types._InputFile, "flags.1?InputFile"], - ["video_start_ts", "number", "flags.2?double"], - ["video_emoji_markup", types._VideoSize, "flags.5?VideoSize"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.suggest ?? null, "true", "flags.3?true"], - [this.save ?? null, "true", "flags.4?true"], - [this.user_id, types._InputUser, "InputUser"], - [this.file ?? null, types._InputFile, "flags.0?InputFile"], - [this.video ?? null, types._InputFile, "flags.1?InputFile"], - [this.video_start_ts ?? null, "number", "flags.2?double"], - [this.video_emoji_markup ?? null, types._VideoSize, "flags.5?VideoSize"], - ]; - } - - constructor(params: { suggest?: true; save?: true; user_id: enums.InputUser; file?: enums.InputFile; video?: enums.InputFile; video_start_ts?: number; video_emoji_markup?: enums.VideoSize }) { - super(); - this.suggest = params.suggest; - this.save = params.save; - this.user_id = params.user_id; - this.file = params.file; - this.video = params.video; - this.video_start_ts = params.video_start_ts; - this.video_emoji_markup = params.video_emoji_markup; - } -} - -/** Saves a part of file for further sending to one of the methods. */ -export class upload_saveFilePart_ extends Function_ { - static __F: (params: { file_id: bigint; file_part: number; bytes: Uint8Array }) => boolean; - /** Random file identifier created by the client */ - file_id: bigint; - /** Numerical order of a part */ - file_part: number; - /** Binary data, content of a part */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xB304A621; - } - - static get [name](): string { - return "upload.saveFilePart" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file_id", "bigint", "long"], - ["file_part", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.file_id, "bigint", "long"], - [this.file_part, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { file_id: bigint; file_part: number; bytes: Uint8Array }) { - super(); - this.file_id = params.file_id; - this.file_part = params.file_part; - this.bytes = params.bytes; - } -} - -/** Returns content of a whole file or its part. */ -export class upload_getFile_ extends Function_ { - static __F: (params: { precise?: true; cdn_supported?: true; location: enums.InputFileLocation; offset: bigint; limit: number }) => enums.upload.File; - /** Disable some checks on limit and offset values, useful for example to stream videos by keyframes */ - precise?: true; - /** Whether the current client supports [CDN downloads](https://core.telegram.org/cdn) */ - cdn_supported?: true; - /** File location */ - location: enums.InputFileLocation; - /** Number of bytes to be skipped */ - offset: bigint; - /** Number of bytes to be returned */ - limit: number; - - protected get [id](): number { - return 0xBE5335BE; - } - - static get [name](): string { - return "upload.getFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["precise", "true", "flags.0?true"], - ["cdn_supported", "true", "flags.1?true"], - ["location", types._InputFileLocation, "InputFileLocation"], - ["offset", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.precise ?? null, "true", "flags.0?true"], - [this.cdn_supported ?? null, "true", "flags.1?true"], - [this.location, types._InputFileLocation, "InputFileLocation"], - [this.offset, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { precise?: true; cdn_supported?: true; location: enums.InputFileLocation; offset: bigint; limit: number }) { - super(); - this.precise = params.precise; - this.cdn_supported = params.cdn_supported; - this.location = params.location; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods. */ -export class upload_saveBigFilePart_ extends Function_ { - static __F: (params: { file_id: bigint; file_part: number; file_total_parts: number; bytes: Uint8Array }) => boolean; - /** Random file id, created by the client */ - file_id: bigint; - /** Part sequence number */ - file_part: number; - /** Total number of parts */ - file_total_parts: number; - /** Binary data, part contents */ - bytes: Uint8Array; - - protected get [id](): number { - return 0xDE7B673D; - } - - static get [name](): string { - return "upload.saveBigFilePart" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file_id", "bigint", "long"], - ["file_part", "number", "int"], - ["file_total_parts", "number", "int"], - ["bytes", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.file_id, "bigint", "long"], - [this.file_part, "number", "int"], - [this.file_total_parts, "number", "int"], - [this.bytes, Uint8Array, "bytes"], - ]; - } - - constructor(params: { file_id: bigint; file_part: number; file_total_parts: number; bytes: Uint8Array }) { - super(); - this.file_id = params.file_id; - this.file_part = params.file_part; - this.file_total_parts = params.file_total_parts; - this.bytes = params.bytes; - } -} - -/** Returns content of a web file, by proxying the request through telegram, see the [webfile docs for more info](https://core.telegram.org/api/files#downloading-webfiles). */ -export class upload_getWebFile_ extends Function_ { - static __F: (params: { location: enums.InputWebFileLocation; offset: number; limit: number }) => enums.upload.WebFile; - /** The file to download */ - location: enums.InputWebFileLocation; - /** Number of bytes to be skipped */ - offset: number; - /** Number of bytes to be returned */ - limit: number; - - protected get [id](): number { - return 0x24E6818D; - } - - static get [name](): string { - return "upload.getWebFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["location", types._InputWebFileLocation, "InputWebFileLocation"], - ["offset", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.location, types._InputWebFileLocation, "InputWebFileLocation"], - [this.offset, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { location: enums.InputWebFileLocation; offset: number; limit: number }) { - super(); - this.location = params.location; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Download a [CDN](https://core.telegram.org/cdn) file. */ -export class upload_getCdnFile_ extends Function_ { - static __F: (params: { file_token: Uint8Array; offset: bigint; limit: number }) => enums.upload.CdnFile; - /** File token */ - file_token: Uint8Array; - /** Offset of chunk to download */ - offset: bigint; - /** Length of chunk to download */ - limit: number; - - protected get [id](): number { - return 0x395F69DA; - } - - static get [name](): string { - return "upload.getCdnFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file_token", Uint8Array, "bytes"], - ["offset", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.file_token, Uint8Array, "bytes"], - [this.offset, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { file_token: Uint8Array; offset: bigint; limit: number }) { - super(); - this.file_token = params.file_token; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Request a reupload of a certain file to a [CDN DC](https://core.telegram.org/cdn). */ -export class upload_reuploadCdnFile_ extends Function_ { - static __F: (params: { file_token: Uint8Array; request_token: Uint8Array }) => enums.FileHash[]; - /** File token */ - file_token: Uint8Array; - /** Request token */ - request_token: Uint8Array; - - protected get [id](): number { - return 0x9B2754A8; - } - - static get [name](): string { - return "upload.reuploadCdnFile" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file_token", Uint8Array, "bytes"], - ["request_token", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.file_token, Uint8Array, "bytes"], - [this.request_token, Uint8Array, "bytes"], - ]; - } - - constructor(params: { file_token: Uint8Array; request_token: Uint8Array }) { - super(); - this.file_token = params.file_token; - this.request_token = params.request_token; - } -} - -/** Get SHA256 hashes for verifying downloaded [CDN](https://core.telegram.org/cdn) files */ -export class upload_getCdnFileHashes_ extends Function_ { - static __F: (params: { file_token: Uint8Array; offset: bigint }) => enums.FileHash[]; - /** File */ - file_token: Uint8Array; - /** Offset from which to start getting hashes */ - offset: bigint; - - protected get [id](): number { - return 0x91DC3F31; - } - - static get [name](): string { - return "upload.getCdnFileHashes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["file_token", Uint8Array, "bytes"], - ["offset", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.file_token, Uint8Array, "bytes"], - [this.offset, "bigint", "long"], - ]; - } - - constructor(params: { file_token: Uint8Array; offset: bigint }) { - super(); - this.file_token = params.file_token; - this.offset = params.offset; - } -} - -/** Get SHA256 hashes for verifying downloaded files */ -export class upload_getFileHashes_ extends Function_ { - static __F: (params: { location: enums.InputFileLocation; offset: bigint }) => enums.FileHash[]; - /** File */ - location: enums.InputFileLocation; - /** Offset from which to get file hashes */ - offset: bigint; - - protected get [id](): number { - return 0x9156982A; - } - - static get [name](): string { - return "upload.getFileHashes" - } - - static get [paramDesc](): ParamDesc { - return [ - ["location", types._InputFileLocation, "InputFileLocation"], - ["offset", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.location, types._InputFileLocation, "InputFileLocation"], - [this.offset, "bigint", "long"], - ]; - } - - constructor(params: { location: enums.InputFileLocation; offset: bigint }) { - super(); - this.location = params.location; - this.offset = params.offset; - } -} - -/** Returns current configuration, including data center configuration. */ -export class help_getConfig_ extends Function_ { - static __F: () => enums.Config; - protected get [id](): number { - return 0xC4F9186B; - } - - static get [name](): string { - return "help.getConfig" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Returns info on data center nearest to the user. */ -export class help_getNearestDc_ extends Function_ { - static __F: () => enums.NearestDc; - protected get [id](): number { - return 0x1FB33026; - } - - static get [name](): string { - return "help.getNearestDc" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Returns information on update availability for the current application. */ -export class help_getAppUpdate_ extends Function_ { - static __F: (params: { source: string }) => enums.help.AppUpdate; - /** Source */ - source: string; - - protected get [id](): number { - return 0x522D5A7D; - } - - static get [name](): string { - return "help.getAppUpdate" - } - - static get [paramDesc](): ParamDesc { - return [ - ["source", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.source, "string", "string"], - ]; - } - - constructor(params: { source: string }) { - super(); - this.source = params.source; - } -} - -/** Returns localized text of a text message with an invitation. */ -export class help_getInviteText_ extends Function_ { - static __F: () => enums.help.InviteText; - protected get [id](): number { - return 0x4D392343; - } - - static get [name](): string { - return "help.getInviteText" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Returns the support user for the "ask a question" feature. */ -export class help_getSupport_ extends Function_ { - static __F: () => enums.help.Support; - protected get [id](): number { - return 0x9CDF08CD; - } - - static get [name](): string { - return "help.getSupport" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only */ -export class help_setBotUpdatesStatus_ extends Function_ { - static __F: (params: { pending_updates_count: number; message: string }) => boolean; - /** Number of pending updates */ - pending_updates_count: number; - /** Error message, if present */ - message: string; - - protected get [id](): number { - return 0xEC22CFCD; - } - - static get [name](): string { - return "help.setBotUpdatesStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["pending_updates_count", "number", "int"], - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.pending_updates_count, "number", "int"], - [this.message, "string", "string"], - ]; - } - - constructor(params: { pending_updates_count: number; message: string }) { - super(); - this.pending_updates_count = params.pending_updates_count; - this.message = params.message; - } -} - -/** Get configuration for [CDN](https://core.telegram.org/cdn) file downloads. */ -export class help_getCdnConfig_ extends Function_ { - static __F: () => enums.CdnConfig; - protected get [id](): number { - return 0x52029342; - } - - static get [name](): string { - return "help.getCdnConfig" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get recently used `t.me` links. */ -export class help_getRecentMeUrls_ extends Function_ { - static __F: (params: { referer: string }) => enums.help.RecentMeUrls; - /** Referrer */ - referer: string; - - protected get [id](): number { - return 0x3DC0F114; - } - - static get [name](): string { - return "help.getRecentMeUrls" - } - - static get [paramDesc](): ParamDesc { - return [ - ["referer", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.referer, "string", "string"], - ]; - } - - constructor(params: { referer: string }) { - super(); - this.referer = params.referer; - } -} - -/** Look for updates of telegram's terms of service */ -export class help_getTermsOfServiceUpdate_ extends Function_ { - static __F: () => enums.help.TermsOfServiceUpdate; - protected get [id](): number { - return 0x2CA51FD1; - } - - static get [name](): string { - return "help.getTermsOfServiceUpdate" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Accept the new terms of service */ -export class help_acceptTermsOfService_ extends Function_ { - static __F: (params: { id: enums.DataJSON }) => boolean; - /** ID of terms of service */ - id: enums.DataJSON; - - protected get [id](): number { - return 0xEE72F79A; - } - - static get [name](): string { - return "help.acceptTermsOfService" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { id: enums.DataJSON }) { - super(); - this.id = params.id; - } -} - -/** Get info about an unsupported deep link, see [here for more info »](https://core.telegram.org/api/links#unsupported-links). */ -export class help_getDeepLinkInfo_ extends Function_ { - static __F: (params: { path: string }) => enums.help.DeepLinkInfo; - /** Path component of a `tg:` link */ - path: string; - - protected get [id](): number { - return 0x3FEDC75F; - } - - static get [name](): string { - return "help.getDeepLinkInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["path", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.path, "string", "string"], - ]; - } - - constructor(params: { path: string }) { - super(); - this.path = params.path; - } -} - -/** Get app-specific configuration, see [client configuration](https://core.telegram.org/api/config#client-configuration) for more info on the result. */ -export class help_getAppConfig_ extends Function_ { - static __F: (params: { hash: number }) => enums.help.AppConfig; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x61E3F854; - } - - static get [name](): string { - return "help.getAppConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Saves logs of application on the server. */ -export class help_saveAppLog_ extends Function_ { - static __F: (params: { events: Array }) => boolean; - /** List of input events */ - events: Array; - - protected get [id](): number { - return 0x6F02F748; - } - - static get [name](): string { - return "help.saveAppLog" - } - - static get [paramDesc](): ParamDesc { - return [ - ["events", [types._InputAppEvent], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.events, [types._InputAppEvent], "Vector"], - ]; - } - - constructor(params: { events: Array }) { - super(); - this.events = params.events; - } -} - -/** Get [passport](https://core.telegram.org/passport) configuration */ -export class help_getPassportConfig_ extends Function_ { - static __F: (params: { hash: number }) => enums.help.PassportConfig; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0xC661AD08; - } - - static get [name](): string { - return "help.getPassportConfig" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Get localized name of the telegram support user */ -export class help_getSupportName_ extends Function_ { - static __F: () => enums.help.SupportName; - protected get [id](): number { - return 0xD360E72C; - } - - static get [name](): string { - return "help.getSupportName" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Can only be used by TSF members to obtain internal information. */ -export class help_getUserInfo_ extends Function_ { - static __F: (params: { user_id: enums.InputUser }) => enums.help.UserInfo; - /** User ID */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x038A08D3; - } - - static get [name](): string { - return "help.getUserInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { user_id: enums.InputUser }) { - super(); - this.user_id = params.user_id; - } -} - -/** Internal use */ -export class help_editUserInfo_ extends Function_ { - static __F: (params: { user_id: enums.InputUser; message: string; entities: Array }) => enums.help.UserInfo; - /** User */ - user_id: enums.InputUser; - /** Message */ - message: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities) */ - entities: Array; - - protected get [id](): number { - return 0x66B91B70; - } - - static get [name](): string { - return "help.editUserInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ["message", "string", "string"], - ["entities", [types._MessageEntity], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - [this.message, "string", "string"], - [this.entities, [types._MessageEntity], "Vector"], - ]; - } - - constructor(params: { user_id: enums.InputUser; message: string; entities: Array }) { - super(); - this.user_id = params.user_id; - this.message = params.message; - this.entities = params.entities; - } -} - -/** Get MTProxy/Public Service Announcement information */ -export class help_getPromoData_ extends Function_ { - static __F: () => enums.help.PromoData; - protected get [id](): number { - return 0xC0977421; - } - - static get [name](): string { - return "help.getPromoData" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Hide MTProxy/Public Service Announcement information */ -export class help_hidePromoData_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => boolean; - /** Peer to hide */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x1E251C95; - } - - static get [name](): string { - return "help.hidePromoData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Dismiss a [suggestion, see here for more info »](https://core.telegram.org/api/config#suggestions). */ -export class help_dismissSuggestion_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; suggestion: string }) => boolean; - /** In the case of pending suggestions in [channels](https://core.telegram.org/constructor/channelFull), the channel ID. */ - peer: enums.InputPeer; - /** [Suggestion, see here for more info »](https://core.telegram.org/api/config#suggestions). */ - suggestion: string; - - protected get [id](): number { - return 0xF50DBAA1; - } - - static get [name](): string { - return "help.dismissSuggestion" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["suggestion", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.suggestion, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; suggestion: string }) { - super(); - this.peer = params.peer; - this.suggestion = params.suggestion; - } -} - -/** Get name, ISO code, localized name and phone codes/patterns of all available countries */ -export class help_getCountriesList_ extends Function_ { - static __F: (params: { lang_code: string; hash: number }) => enums.help.CountriesList; - /** Language code of the current user */ - lang_code: string; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0x735787A8; - } - - static get [name](): string { - return "help.getCountriesList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_code", "string", "string"], - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_code, "string", "string"], - [this.hash, "number", "int"], - ]; - } - - constructor(params: { lang_code: string; hash: number }) { - super(); - this.lang_code = params.lang_code; - this.hash = params.hash; - } -} - -/** Get Telegram Premium promotion information */ -export class help_getPremiumPromo_ extends Function_ { - static __F: () => enums.help.PremiumPromo; - protected get [id](): number { - return 0xB81B93D4; - } - - static get [name](): string { - return "help.getPremiumPromo" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get the set of [accent color palettes »](https://core.telegram.org/api/colors) that can be used for message accents. */ -export class help_getPeerColors_ extends Function_ { - static __F: (params: { hash: number }) => enums.help.PeerColors; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0xDA80F42F; - } - - static get [name](): string { - return "help.getPeerColors" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Get the set of [accent color palettes »](https://core.telegram.org/api/colors) that can be used in profile page backgrounds. */ -export class help_getPeerProfileColors_ extends Function_ { - static __F: (params: { hash: number }) => enums.help.PeerColors; - /** [Hash for pagination, for more info click here](https://core.telegram.org/api/offsets#hash-generation) */ - hash: number; - - protected get [id](): number { - return 0xABCFA9FD; - } - - static get [name](): string { - return "help.getPeerProfileColors" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -export class help_getTimezonesList_ extends Function_ { - static __F: (params: { hash: number }) => enums.help.TimezonesList; - hash: number; - - protected get [id](): number { - return 0x49B30240; - } - - static get [name](): string { - return "help.getTimezonesList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hash", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.hash, "number", "int"], - ]; - } - - constructor(params: { hash: number }) { - super(); - this.hash = params.hash; - } -} - -/** Mark [channel/supergroup](https://core.telegram.org/api/channel) history as read */ -export class channels_readHistory_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; max_id: number }) => boolean; - /** [Channel/supergroup](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - /** ID of message up to which messages should be marked as read */ - max_id: number; - - protected get [id](): number { - return 0xCC104937; - } - - static get [name](): string { - return "channels.readHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; max_id: number }) { - super(); - this.channel = params.channel; - this.max_id = params.max_id; - } -} - -/** Delete messages in a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_deleteMessages_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; id: Array }) => enums.messages.AffectedMessages; - /** [Channel/supergroup](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - /** IDs of messages to delete */ - id: Array; - - protected get [id](): number { - return 0x84C1FD4E; - } - - static get [name](): string { - return "channels.deleteMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; id: Array }) { - super(); - this.channel = params.channel; - this.id = params.id; - } -} - -/** Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup */ -export class channels_reportSpam_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; participant: enums.InputPeer; id: Array }) => boolean; - /** Supergroup */ - channel: enums.InputChannel; - /** Participant whose messages should be reported */ - participant: enums.InputPeer; - /** IDs of spam messages */ - id: Array; - - protected get [id](): number { - return 0xF44A8315; - } - - static get [name](): string { - return "channels.reportSpam" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["participant", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.participant, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; participant: enums.InputPeer; id: Array }) { - super(); - this.channel = params.channel; - this.participant = params.participant; - this.id = params.id; - } -} - -/** Get [channel/supergroup](https://core.telegram.org/api/channel) messages */ -export class channels_getMessages_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; id: Array }) => enums.messages.Messages; - /** Channel/supergroup */ - channel: enums.InputChannel; - /** IDs of messages to get */ - id: Array; - - protected get [id](): number { - return 0xAD8C9A23; - } - - static get [name](): string { - return "channels.getMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["id", [types._InputMessage], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.id, [types._InputMessage], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; id: Array }) { - super(); - this.channel = params.channel; - this.id = params.id; - } -} - -/** Get the participants of a [supergroup/channel](https://core.telegram.org/api/channel) */ -export class channels_getParticipants_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; filter: enums.ChannelParticipantsFilter; offset: number; limit: number; hash: bigint }) => enums.channels.ChannelParticipants; - /** Channel */ - channel: enums.InputChannel; - /** Which participant types to fetch */ - filter: enums.ChannelParticipantsFilter; - /** [Offset](https://core.telegram.org/api/offsets) */ - offset: number; - /** [Limit](https://core.telegram.org/api/offsets) */ - limit: number; - /** [Hash](https://core.telegram.org/api/offsets) */ - hash: bigint; - - protected get [id](): number { - return 0x77CED9D0; - } - - static get [name](): string { - return "channels.getParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["filter", types._ChannelParticipantsFilter, "ChannelParticipantsFilter"], - ["offset", "number", "int"], - ["limit", "number", "int"], - ["hash", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.filter, types._ChannelParticipantsFilter, "ChannelParticipantsFilter"], - [this.offset, "number", "int"], - [this.limit, "number", "int"], - [this.hash, "bigint", "long"], - ]; - } - - constructor(params: { channel: enums.InputChannel; filter: enums.ChannelParticipantsFilter; offset: number; limit: number; hash: bigint }) { - super(); - this.channel = params.channel; - this.filter = params.filter; - this.offset = params.offset; - this.limit = params.limit; - this.hash = params.hash; - } -} - -/** Get info about a [channel/supergroup](https://core.telegram.org/api/channel) participant */ -export class channels_getParticipant_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; participant: enums.InputPeer }) => enums.channels.ChannelParticipant; - /** Channel/supergroup */ - channel: enums.InputChannel; - /** Participant to get info about */ - participant: enums.InputPeer; - - protected get [id](): number { - return 0xA0AB6CC6; - } - - static get [name](): string { - return "channels.getParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["participant", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.participant, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { channel: enums.InputChannel; participant: enums.InputPeer }) { - super(); - this.channel = params.channel; - this.participant = params.participant; - } -} - -/** Get info about [channels/supergroups](https://core.telegram.org/api/channel) */ -export class channels_getChannels_ extends Function_ { - static __F: (params: { id: Array }) => enums.messages.Chats; - /** IDs of channels/supergroups to get info about */ - id: Array; - - protected get [id](): number { - return 0x0A7F6BBB; - } - - static get [name](): string { - return "channels.getChannels" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputChannel], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputChannel], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Get full info about a [supergroup](https://core.telegram.org/api/channel#supergroups), [gigagroup](https://core.telegram.org/api/channel#gigagroups) or [channel](https://core.telegram.org/api/channel#channels) */ -export class channels_getFullChannel_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.messages.ChatFull; - /** The [channel](https://core.telegram.org/api/channel#channels), [supergroup](https://core.telegram.org/api/channel#supergroups) or [gigagroup](https://core.telegram.org/api/channel#gigagroups) to get info about */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0x08736A09; - } - - static get [name](): string { - return "channels.getFullChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Create a [supergroup/channel](https://core.telegram.org/api/channel). */ -export class channels_createChannel_ extends Function_ { - static __F: (params: { broadcast?: true; megagroup?: true; for_import?: true; forum?: true; title: string; about: string; geo_point?: enums.InputGeoPoint; address?: string; ttl_period?: number }) => enums.Updates; - /** Whether to create a [channel](https://core.telegram.org/api/channel) */ - broadcast?: true; - /** Whether to create a [supergroup](https://core.telegram.org/api/channel) */ - megagroup?: true; - /** Whether the supergroup is being created to import messages from a foreign chat service using [messages.initHistoryImport](https://core.telegram.org/method/messages.initHistoryImport) */ - for_import?: true; - /** Whether to create a [forum](https://core.telegram.org/api/forum) */ - forum?: true; - /** Channel title */ - title: string; - /** Channel description */ - about: string; - /** Geogroup location, see [here »](https://core.telegram.org/api/nearby) for more info on geogroups. */ - geo_point?: enums.InputGeoPoint; - /** Geogroup address, see [here »](https://core.telegram.org/api/nearby) for more info on geogroups. */ - address?: string; - /** Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl\_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use [messages.setDefaultHistoryTTL](https://core.telegram.org/method/messages.setDefaultHistoryTTL) to edit this value later. */ - ttl_period?: number; - - protected get [id](): number { - return 0x91006707; - } - - static get [name](): string { - return "channels.createChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["broadcast", "true", "flags.0?true"], - ["megagroup", "true", "flags.1?true"], - ["for_import", "true", "flags.3?true"], - ["forum", "true", "flags.5?true"], - ["title", "string", "string"], - ["about", "string", "string"], - ["geo_point", types._InputGeoPoint, "flags.2?InputGeoPoint"], - ["address", "string", "flags.2?string"], - ["ttl_period", "number", "flags.4?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.broadcast ?? null, "true", "flags.0?true"], - [this.megagroup ?? null, "true", "flags.1?true"], - [this.for_import ?? null, "true", "flags.3?true"], - [this.forum ?? null, "true", "flags.5?true"], - [this.title, "string", "string"], - [this.about, "string", "string"], - [this.geo_point ?? null, types._InputGeoPoint, "flags.2?InputGeoPoint"], - [this.address ?? null, "string", "flags.2?string"], - [this.ttl_period ?? null, "number", "flags.4?int"], - ]; - } - - constructor(params: { broadcast?: true; megagroup?: true; for_import?: true; forum?: true; title: string; about: string; geo_point?: enums.InputGeoPoint; address?: string; ttl_period?: number }) { - super(); - this.broadcast = params.broadcast; - this.megagroup = params.megagroup; - this.for_import = params.for_import; - this.forum = params.forum; - this.title = params.title; - this.about = params.about; - this.geo_point = params.geo_point; - this.address = params.address; - this.ttl_period = params.ttl_period; - } -} - -/** Modify the admin rights of a user in a [supergroup/channel](https://core.telegram.org/api/channel). */ -export class channels_editAdmin_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; user_id: enums.InputUser; admin_rights: enums.ChatAdminRights; rank: string }) => enums.Updates; - /** The [supergroup/channel](https://core.telegram.org/api/channel). */ - channel: enums.InputChannel; - /** The ID of the user whose admin rights should be modified */ - user_id: enums.InputUser; - /** The admin rights */ - admin_rights: enums.ChatAdminRights; - /** Indicates the role (rank) of the admin in the group: just an arbitrary string */ - rank: string; - - protected get [id](): number { - return 0xD33C8902; - } - - static get [name](): string { - return "channels.editAdmin" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["user_id", types._InputUser, "InputUser"], - ["admin_rights", types._ChatAdminRights, "ChatAdminRights"], - ["rank", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.user_id, types._InputUser, "InputUser"], - [this.admin_rights, types._ChatAdminRights, "ChatAdminRights"], - [this.rank, "string", "string"], - ]; - } - - constructor(params: { channel: enums.InputChannel; user_id: enums.InputUser; admin_rights: enums.ChatAdminRights; rank: string }) { - super(); - this.channel = params.channel; - this.user_id = params.user_id; - this.admin_rights = params.admin_rights; - this.rank = params.rank; - } -} - -/** Edit the name of a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_editTitle_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; title: string }) => enums.Updates; - /** Channel/supergroup */ - channel: enums.InputChannel; - /** New name */ - title: string; - - protected get [id](): number { - return 0x566DECD0; - } - - static get [name](): string { - return "channels.editTitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { channel: enums.InputChannel; title: string }) { - super(); - this.channel = params.channel; - this.title = params.title; - } -} - -/** Change the photo of a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_editPhoto_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; photo: enums.InputChatPhoto }) => enums.Updates; - /** Channel/supergroup whose photo should be edited */ - channel: enums.InputChannel; - /** New photo */ - photo: enums.InputChatPhoto; - - protected get [id](): number { - return 0xF12E57C9; - } - - static get [name](): string { - return "channels.editPhoto" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["photo", types._InputChatPhoto, "InputChatPhoto"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.photo, types._InputChatPhoto, "InputChatPhoto"], - ]; - } - - constructor(params: { channel: enums.InputChannel; photo: enums.InputChatPhoto }) { - super(); - this.channel = params.channel; - this.photo = params.photo; - } -} - -/** Check if a username is free and can be assigned to a channel/supergroup */ -export class channels_checkUsername_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; username: string }) => boolean; - /** The [channel/supergroup](https://core.telegram.org/api/channel) that will assigned the specified username */ - channel: enums.InputChannel; - /** The username to check */ - username: string; - - protected get [id](): number { - return 0x10E6BD2C; - } - - static get [name](): string { - return "channels.checkUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.username, "string", "string"], - ]; - } - - constructor(params: { channel: enums.InputChannel; username: string }) { - super(); - this.channel = params.channel; - this.username = params.username; - } -} - -/** Change or remove the username of a supergroup/channel */ -export class channels_updateUsername_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; username: string }) => boolean; - /** Channel */ - channel: enums.InputChannel; - /** New username, pass an empty string to remove the username */ - username: string; - - protected get [id](): number { - return 0x3514B3DE; - } - - static get [name](): string { - return "channels.updateUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["username", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.username, "string", "string"], - ]; - } - - constructor(params: { channel: enums.InputChannel; username: string }) { - super(); - this.channel = params.channel; - this.username = params.username; - } -} - -/** Join a channel/supergroup */ -export class channels_joinChannel_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.Updates; - /** Channel/supergroup to join */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0x24B524C5; - } - - static get [name](): string { - return "channels.joinChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Leave a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_leaveChannel_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.Updates; - /** [Channel/supergroup](https://core.telegram.org/api/channel) to leave */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0xF836AA95; - } - - static get [name](): string { - return "channels.leaveChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Invite users to a channel/supergroup */ -export class channels_inviteToChannel_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; users: Array }) => enums.messages.InvitedUsers; - /** Channel/supergroup */ - channel: enums.InputChannel; - /** Users to invite */ - users: Array; - - protected get [id](): number { - return 0xC9E33D54; - } - - static get [name](): string { - return "channels.inviteToChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["users", [types._InputUser], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.users, [types._InputUser], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; users: Array }) { - super(); - this.channel = params.channel; - this.users = params.users; - } -} - -/** Delete a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_deleteChannel_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.Updates; - /** [Channel/supergroup](https://core.telegram.org/api/channel) to delete */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0xC0111FE3; - } - - static get [name](): string { - return "channels.deleteChannel" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Get link and embed info of a message in a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_exportMessageLink_ extends Function_ { - static __F: (params: { grouped?: true; thread?: true; channel: enums.InputChannel; id: number }) => enums.ExportedMessageLink; - /** Whether to include other grouped media (for albums) */ - grouped?: true; - /** Whether to also include a thread ID, if available, inside of the link */ - thread?: true; - /** Channel */ - channel: enums.InputChannel; - /** Message ID */ - id: number; - - protected get [id](): number { - return 0xE63FADEB; - } - - static get [name](): string { - return "channels.exportMessageLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["grouped", "true", "flags.0?true"], - ["thread", "true", "flags.1?true"], - ["channel", types._InputChannel, "InputChannel"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.grouped ?? null, "true", "flags.0?true"], - [this.thread ?? null, "true", "flags.1?true"], - [this.channel, types._InputChannel, "InputChannel"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { grouped?: true; thread?: true; channel: enums.InputChannel; id: number }) { - super(); - this.grouped = params.grouped; - this.thread = params.thread; - this.channel = params.channel; - this.id = params.id; - } -} - -/** Enable/disable message signatures in channels */ -export class channels_toggleSignatures_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Channel */ - channel: enums.InputChannel; - /** Value */ - enabled: boolean; - - protected get [id](): number { - return 0x1F69B606; - } - - static get [name](): string { - return "channels.toggleSignatures" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Get [channels/supergroups/geogroups](https://core.telegram.org/api/channel) we're admin in. Usually called when the user exceeds the [limit](https://core.telegram.org/constructor/config) for owned public [channels/supergroups/geogroups](https://core.telegram.org/api/channel), and the user is given the choice to remove one of his channels/supergroups/geogroups. */ -export class channels_getAdminedPublicChannels_ extends Function_ { - static __F: (params?: { by_location?: true; check_limit?: true; for_personal?: true }) => enums.messages.Chats; - /** Get geogroups */ - by_location?: true; - /** If set and the user has reached the limit of owned public [channels/supergroups/geogroups](https://core.telegram.org/api/channel), instead of returning the channel list one of the specified [errors](#possible-errors) will be returned. - Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in [channels.checkUsername](https://core.telegram.org/method/channels.checkUsername)/[channels.updateUsername](https://core.telegram.org/method/channels.updateUsername). */ - check_limit?: true; - for_personal?: true; - - protected get [id](): number { - return 0xF8B036AF; - } - - static get [name](): string { - return "channels.getAdminedPublicChannels" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["by_location", "true", "flags.0?true"], - ["check_limit", "true", "flags.1?true"], - ["for_personal", "true", "flags.2?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.by_location ?? null, "true", "flags.0?true"], - [this.check_limit ?? null, "true", "flags.1?true"], - [this.for_personal ?? null, "true", "flags.2?true"], - ]; - } - - constructor(params?: { by_location?: true; check_limit?: true; for_personal?: true }) { - super(); - this.by_location = params?.by_location; - this.check_limit = params?.check_limit; - this.for_personal = params?.for_personal; - } -} - -/** Ban/unban/kick a user in a [supergroup/channel](https://core.telegram.org/api/channel). */ -export class channels_editBanned_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; participant: enums.InputPeer; banned_rights: enums.ChatBannedRights }) => enums.Updates; - /** The [supergroup/channel](https://core.telegram.org/api/channel). */ - channel: enums.InputChannel; - /** Participant to ban */ - participant: enums.InputPeer; - /** The banned rights */ - banned_rights: enums.ChatBannedRights; - - protected get [id](): number { - return 0x96E6CD81; - } - - static get [name](): string { - return "channels.editBanned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["participant", types._InputPeer, "InputPeer"], - ["banned_rights", types._ChatBannedRights, "ChatBannedRights"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.participant, types._InputPeer, "InputPeer"], - [this.banned_rights, types._ChatBannedRights, "ChatBannedRights"], - ]; - } - - constructor(params: { channel: enums.InputChannel; participant: enums.InputPeer; banned_rights: enums.ChatBannedRights }) { - super(); - this.channel = params.channel; - this.participant = params.participant; - this.banned_rights = params.banned_rights; - } -} - -/** Get the admin log of a [channel/supergroup](https://core.telegram.org/api/channel) */ -export class channels_getAdminLog_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; q: string; events_filter?: enums.ChannelAdminLogEventsFilter; admins?: Array; max_id: bigint; min_id: bigint; limit: number }) => enums.channels.AdminLogResults; - /** Channel */ - channel: enums.InputChannel; - /** Search query, can be empty */ - q: string; - /** Event filter */ - events_filter?: enums.ChannelAdminLogEventsFilter; - /** Only show events from these admins */ - admins?: Array; - /** Maximum ID of message to return (see [pagination](https://core.telegram.org/api/offsets)) */ - max_id: bigint; - /** Minimum ID of message to return (see [pagination](https://core.telegram.org/api/offsets)) */ - min_id: bigint; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x33DDF480; - } - - static get [name](): string { - return "channels.getAdminLog" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel", types._InputChannel, "InputChannel"], - ["q", "string", "string"], - ["events_filter", types._ChannelAdminLogEventsFilter, "flags.0?ChannelAdminLogEventsFilter"], - ["admins", [types._InputUser], "flags.1?Vector"], - ["max_id", "bigint", "long"], - ["min_id", "bigint", "long"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel, types._InputChannel, "InputChannel"], - [this.q, "string", "string"], - [this.events_filter ?? null, types._ChannelAdminLogEventsFilter, "flags.0?ChannelAdminLogEventsFilter"], - [this.admins ?? null, [types._InputUser], "flags.1?Vector"], - [this.max_id, "bigint", "long"], - [this.min_id, "bigint", "long"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; q: string; events_filter?: enums.ChannelAdminLogEventsFilter; admins?: Array; max_id: bigint; min_id: bigint; limit: number }) { - super(); - this.channel = params.channel; - this.q = params.q; - this.events_filter = params.events_filter; - this.admins = params.admins; - this.max_id = params.max_id; - this.min_id = params.min_id; - this.limit = params.limit; - } -} - -/** Associate a stickerset to the supergroup */ -export class channels_setStickers_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; stickerset: enums.InputStickerSet }) => boolean; - /** Supergroup */ - channel: enums.InputChannel; - /** The stickerset to associate */ - stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0xEA8CA4F9; - } - - static get [name](): string { - return "channels.setStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - ]; - } - - constructor(params: { channel: enums.InputChannel; stickerset: enums.InputStickerSet }) { - super(); - this.channel = params.channel; - this.stickerset = params.stickerset; - } -} - -/** Mark [channel/supergroup](https://core.telegram.org/api/channel) message contents as read */ -export class channels_readMessageContents_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; id: Array }) => boolean; - /** [Channel/supergroup](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - /** IDs of messages whose contents should be marked as read */ - id: Array; - - protected get [id](): number { - return 0xEAB5DC38; - } - - static get [name](): string { - return "channels.readMessageContents" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; id: Array }) { - super(); - this.channel = params.channel; - this.id = params.id; - } -} - -/** Delete the history of a [supergroup](https://core.telegram.org/api/channel) */ -export class channels_deleteHistory_ extends Function_ { - static __F: (params: { for_everyone?: true; channel: enums.InputChannel; max_id: number }) => enums.Updates; - /** Whether the history should be deleted for everyone */ - for_everyone?: true; - /** [Supergroup](https://core.telegram.org/api/channel) whose history must be deleted */ - channel: enums.InputChannel; - /** ID of message **up to which** the history must be deleted */ - max_id: number; - - protected get [id](): number { - return 0x9BAA9647; - } - - static get [name](): string { - return "channels.deleteHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["for_everyone", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.for_everyone ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { for_everyone?: true; channel: enums.InputChannel; max_id: number }) { - super(); - this.for_everyone = params.for_everyone; - this.channel = params.channel; - this.max_id = params.max_id; - } -} - -/** Hide/unhide message history for new channel/supergroup users */ -export class channels_togglePreHistoryHidden_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Channel/supergroup */ - channel: enums.InputChannel; - /** Hide/unhide */ - enabled: boolean; - - protected get [id](): number { - return 0xEABBB94C; - } - - static get [name](): string { - return "channels.togglePreHistoryHidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Get a list of [channels/supergroups](https://core.telegram.org/api/channel) we left, requires a [takeout session, see here » for more info](https://core.telegram.org/api/takeout). */ -export class channels_getLeftChannels_ extends Function_ { - static __F: (params: { offset: number }) => enums.messages.Chats; - /** Offset for [pagination](https://core.telegram.org/api/offsets) */ - offset: number; - - protected get [id](): number { - return 0x8341ECC0; - } - - static get [name](): string { - return "channels.getLeftChannels" - } - - static get [paramDesc](): ParamDesc { - return [ - ["offset", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.offset, "number", "int"], - ]; - } - - constructor(params: { offset: number }) { - super(); - this.offset = params.offset; - } -} - -/** Get all groups that can be used as [discussion groups](https://core.telegram.org/api/discussion). */ -export class channels_getGroupsForDiscussion_ extends Function_ { - static __F: () => enums.messages.Chats; - protected get [id](): number { - return 0xF5DAD378; - } - - static get [name](): string { - return "channels.getGroupsForDiscussion" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Associate a group to a channel as [discussion group](https://core.telegram.org/api/discussion) for that channel */ -export class channels_setDiscussionGroup_ extends Function_ { - static __F: (params: { broadcast: enums.InputChannel; group: enums.InputChannel }) => boolean; - /** Channel */ - broadcast: enums.InputChannel; - /** [Discussion group](https://core.telegram.org/api/discussion) to associate to the channel */ - group: enums.InputChannel; - - protected get [id](): number { - return 0x40582BB2; - } - - static get [name](): string { - return "channels.setDiscussionGroup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["broadcast", types._InputChannel, "InputChannel"], - ["group", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.broadcast, types._InputChannel, "InputChannel"], - [this.group, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { broadcast: enums.InputChannel; group: enums.InputChannel }) { - super(); - this.broadcast = params.broadcast; - this.group = params.group; - } -} - -/** Transfer channel ownership */ -export class channels_editCreator_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; user_id: enums.InputUser; password: enums.InputCheckPasswordSRP }) => enums.Updates; - /** Channel */ - channel: enums.InputChannel; - /** New channel owner */ - user_id: enums.InputUser; - /** [2FA password](https://core.telegram.org/api/srp) of account */ - password: enums.InputCheckPasswordSRP; - - protected get [id](): number { - return 0x8F38CD1F; - } - - static get [name](): string { - return "channels.editCreator" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["user_id", types._InputUser, "InputUser"], - ["password", types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.user_id, types._InputUser, "InputUser"], - [this.password, types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - constructor(params: { channel: enums.InputChannel; user_id: enums.InputUser; password: enums.InputCheckPasswordSRP }) { - super(); - this.channel = params.channel; - this.user_id = params.user_id; - this.password = params.password; - } -} - -/** Edit location of geogroup, see [here »](https://core.telegram.org/api/nearby) for more info on geogroups. */ -export class channels_editLocation_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; geo_point: enums.InputGeoPoint; address: string }) => boolean; - /** [Geogroup](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - /** New geolocation */ - geo_point: enums.InputGeoPoint; - /** Address string */ - address: string; - - protected get [id](): number { - return 0x58E63F6D; - } - - static get [name](): string { - return "channels.editLocation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["geo_point", types._InputGeoPoint, "InputGeoPoint"], - ["address", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.geo_point, types._InputGeoPoint, "InputGeoPoint"], - [this.address, "string", "string"], - ]; - } - - constructor(params: { channel: enums.InputChannel; geo_point: enums.InputGeoPoint; address: string }) { - super(); - this.channel = params.channel; - this.geo_point = params.geo_point; - this.address = params.address; - } -} - -/** Toggle supergroup slow mode: if enabled, users will only be able to send one message every `seconds` seconds */ -export class channels_toggleSlowMode_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; seconds: number }) => enums.Updates; - /** The [supergroup](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - /** Users will only be able to send one message every `seconds` seconds, `0` to disable the limitation */ - seconds: number; - - protected get [id](): number { - return 0xEDD49EF0; - } - - static get [name](): string { - return "channels.toggleSlowMode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["seconds", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.seconds, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; seconds: number }) { - super(); - this.channel = params.channel; - this.seconds = params.seconds; - } -} - -/** Get inactive channels and supergroups */ -export class channels_getInactiveChannels_ extends Function_ { - static __F: () => enums.messages.InactiveChats; - protected get [id](): number { - return 0x11E831EE; - } - - static get [name](): string { - return "channels.getInactiveChannels" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Convert a [supergroup](https://core.telegram.org/api/channel) to a [gigagroup](https://core.telegram.org/api/channel), when requested by [channel suggestions](https://core.telegram.org/api/config#channel-suggestions). */ -export class channels_convertToGigagroup_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.Updates; - /** The [supergroup](https://core.telegram.org/api/channel) to convert */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0x0B290C69; - } - - static get [name](): string { - return "channels.convertToGigagroup" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Mark a specific sponsored message as read */ -export class channels_viewSponsoredMessage_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; random_id: Uint8Array }) => boolean; - /** Peer */ - channel: enums.InputChannel; - /** Message ID */ - random_id: Uint8Array; - - protected get [id](): number { - return 0xBEAEDB94; - } - - static get [name](): string { - return "channels.viewSponsoredMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["random_id", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.random_id, Uint8Array, "bytes"], - ]; - } - - constructor(params: { channel: enums.InputChannel; random_id: Uint8Array }) { - super(); - this.channel = params.channel; - this.random_id = params.random_id; - } -} - -/** Get a list of sponsored messages */ -export class channels_getSponsoredMessages_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.messages.SponsoredMessages; - /** Peer */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0xEC210FBF; - } - - static get [name](): string { - return "channels.getSponsoredMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Obtains a list of peers that can be used to send messages in a specific group */ -export class channels_getSendAs_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.channels.SendAsPeers; - /** The group where we intend to send messages */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x0DC770EE; - } - - static get [name](): string { - return "channels.getSendAs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Delete all messages sent by a specific participant of a given supergroup */ -export class channels_deleteParticipantHistory_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; participant: enums.InputPeer }) => enums.messages.AffectedHistory; - /** Supergroup */ - channel: enums.InputChannel; - /** The participant whose messages should be deleted */ - participant: enums.InputPeer; - - protected get [id](): number { - return 0x367544DB; - } - - static get [name](): string { - return "channels.deleteParticipantHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["participant", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.participant, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { channel: enums.InputChannel; participant: enums.InputPeer }) { - super(); - this.channel = params.channel; - this.participant = params.participant; - } -} - -/** Set whether all users [should join a discussion group in order to comment on a post »](https://core.telegram.org/api/discussion#requiring-users-to-join-the-group) */ -export class channels_toggleJoinToSend_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Discussion group */ - channel: enums.InputChannel; - /** Toggle */ - enabled: boolean; - - protected get [id](): number { - return 0xE4CB9580; - } - - static get [name](): string { - return "channels.toggleJoinToSend" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Set whether all users should [request admin approval to join the group »](https://core.telegram.org/api/invites#join-requests). */ -export class channels_toggleJoinRequest_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Group */ - channel: enums.InputChannel; - /** Toggle */ - enabled: boolean; - - protected get [id](): number { - return 0x4C2985B6; - } - - static get [name](): string { - return "channels.toggleJoinRequest" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Reorder active usernames */ -export class channels_reorderUsernames_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; order: Array }) => boolean; - /** The supergroup or channel */ - channel: enums.InputChannel; - /** The new order for active usernames. All active usernames must be specified. */ - order: Array; - - protected get [id](): number { - return 0xB45CED1D; - } - - static get [name](): string { - return "channels.reorderUsernames" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["order", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.order, ["string"], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; order: Array }) { - super(); - this.channel = params.channel; - this.order = params.order; - } -} - -/** Activate or deactivate a purchased [fragment.com](https://fragment.com) username associated to a [supergroup or channel](https://core.telegram.org/api/channel) we own. */ -export class channels_toggleUsername_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; username: string; active: boolean }) => boolean; - /** [Supergroup or channel](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - /** Username */ - username: string; - /** Whether to activate or deactivate the username */ - active: boolean; - - protected get [id](): number { - return 0x50F24105; - } - - static get [name](): string { - return "channels.toggleUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["username", "string", "string"], - ["active", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.username, "string", "string"], - [this.active, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; username: string; active: boolean }) { - super(); - this.channel = params.channel; - this.username = params.username; - this.active = params.active; - } -} - -/** Disable all purchased usernames of a supergroup or channel */ -export class channels_deactivateAllUsernames_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => boolean; - /** Supergroup or channel */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0x0A245DD3; - } - - static get [name](): string { - return "channels.deactivateAllUsernames" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Enable or disable [forum functionality](https://core.telegram.org/api/forum) in a supergroup. */ -export class channels_toggleForum_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Supergroup ID */ - channel: enums.InputChannel; - /** Enable or disable forum functionality */ - enabled: boolean; - - protected get [id](): number { - return 0xA4298B29; - } - - static get [name](): string { - return "channels.toggleForum" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Create a [forum topic](https://core.telegram.org/api/forum); requires [`manage_topics` rights](https://core.telegram.org/api/rights). */ -export class channels_createForumTopic_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; title: string; icon_color?: number; icon_emoji_id?: bigint; random_id: bigint; send_as?: enums.InputPeer }) => enums.Updates; - /** [The forum](https://core.telegram.org/api/forum) */ - channel: enums.InputChannel; - /** Topic title (maximum UTF-8 length: 128) */ - title: string; - /** If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of `0x6FB9F0`, `0xFFD67E`, `0xCB86DB`, `0x8EEE98`, `0xFF93B2`, or `0xFB6F5F`. */ - icon_color?: number; - /** ID of the [custom emoji](https://core.telegram.org/api/custom-emoji) used as topic icon. [Telegram Premium](https://core.telegram.org/api/premium) users can use any custom emoji, other users can only use the custom emojis contained in the [inputStickerSetEmojiDefaultTopicIcons](https://core.telegram.org/constructor/inputStickerSetEmojiDefaultTopicIcons) emoji pack. */ - icon_emoji_id?: bigint; - /** Unique client message ID to prevent duplicate sending of the same event */ - random_id: bigint; - /** Create the topic as the specified peer */ - send_as?: enums.InputPeer; - - protected get [id](): number { - return 0xF40C0224; - } - - static get [name](): string { - return "channels.createForumTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel", types._InputChannel, "InputChannel"], - ["title", "string", "string"], - ["icon_color", "number", "flags.0?int"], - ["icon_emoji_id", "bigint", "flags.3?long"], - ["random_id", "bigint", "long"], - ["send_as", types._InputPeer, "flags.2?InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel, types._InputChannel, "InputChannel"], - [this.title, "string", "string"], - [this.icon_color ?? null, "number", "flags.0?int"], - [this.icon_emoji_id ?? null, "bigint", "flags.3?long"], - [this.random_id, "bigint", "long"], - [this.send_as ?? null, types._InputPeer, "flags.2?InputPeer"], - ]; - } - - constructor(params: { channel: enums.InputChannel; title: string; icon_color?: number; icon_emoji_id?: bigint; random_id: bigint; send_as?: enums.InputPeer }) { - super(); - this.channel = params.channel; - this.title = params.title; - this.icon_color = params.icon_color; - this.icon_emoji_id = params.icon_emoji_id; - this.random_id = params.random_id; - this.send_as = params.send_as; - } -} - -/** Get [topics of a forum](https://core.telegram.org/api/forum) */ -export class channels_getForumTopics_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; q?: string; offset_date: number; offset_id: number; offset_topic: number; limit: number }) => enums.messages.ForumTopics; - /** Supergroup */ - channel: enums.InputChannel; - /** Search query */ - q?: string; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets), date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic. */ - offset_date: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets), ID of the last message of the last found topic (or initially `0`). */ - offset_id: number; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets), ID of the last found topic (or initially `0`). */ - offset_topic: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets). For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit. */ - limit: number; - - protected get [id](): number { - return 0x0DE560D1; - } - - static get [name](): string { - return "channels.getForumTopics" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel", types._InputChannel, "InputChannel"], - ["q", "string", "flags.0?string"], - ["offset_date", "number", "int"], - ["offset_id", "number", "int"], - ["offset_topic", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel, types._InputChannel, "InputChannel"], - [this.q ?? null, "string", "flags.0?string"], - [this.offset_date, "number", "int"], - [this.offset_id, "number", "int"], - [this.offset_topic, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; q?: string; offset_date: number; offset_id: number; offset_topic: number; limit: number }) { - super(); - this.channel = params.channel; - this.q = params.q; - this.offset_date = params.offset_date; - this.offset_id = params.offset_id; - this.offset_topic = params.offset_topic; - this.limit = params.limit; - } -} - -/** Get forum topics by their ID */ -export class channels_getForumTopicsByID_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; topics: Array }) => enums.messages.ForumTopics; - /** Forum */ - channel: enums.InputChannel; - /** Topic IDs */ - topics: Array; - - protected get [id](): number { - return 0xB0831EB9; - } - - static get [name](): string { - return "channels.getForumTopicsByID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["topics", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.topics, ["number"], "Vector"], - ]; - } - - constructor(params: { channel: enums.InputChannel; topics: Array }) { - super(); - this.channel = params.channel; - this.topics = params.topics; - } -} - -/** Edit [forum topic](https://core.telegram.org/api/forum); requires [`manage_topics` rights](https://core.telegram.org/api/rights). */ -export class channels_editForumTopic_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; topic_id: number; title?: string; icon_emoji_id?: bigint; closed?: boolean; hidden?: boolean }) => enums.Updates; - /** Supergroup */ - channel: enums.InputChannel; - /** Topic ID */ - topic_id: number; - /** If present, will update the topic title (maximum UTF-8 length: 128). */ - title?: string; - /** If present, updates the [custom emoji](https://core.telegram.org/api/custom-emoji) used as topic icon. [Telegram Premium](https://core.telegram.org/api/premium) users can use any custom emoji, other users can only use the custom emojis contained in the [inputStickerSetEmojiDefaultTopicIcons](https://core.telegram.org/constructor/inputStickerSetEmojiDefaultTopicIcons) emoji pack. Pass 0 to switch to the fallback topic icon. */ - icon_emoji_id?: bigint; - /** If present, will update the open/closed status of the topic. */ - closed?: boolean; - /** If present, will hide/unhide the topic (only valid for the "General" topic, `id=1`). */ - hidden?: boolean; - - protected get [id](): number { - return 0xF4DFA185; - } - - static get [name](): string { - return "channels.editForumTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["channel", types._InputChannel, "InputChannel"], - ["topic_id", "number", "int"], - ["title", "string", "flags.0?string"], - ["icon_emoji_id", "bigint", "flags.1?long"], - ["closed", "boolean", "flags.2?Bool"], - ["hidden", "boolean", "flags.3?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.channel, types._InputChannel, "InputChannel"], - [this.topic_id, "number", "int"], - [this.title ?? null, "string", "flags.0?string"], - [this.icon_emoji_id ?? null, "bigint", "flags.1?long"], - [this.closed ?? null, "boolean", "flags.2?Bool"], - [this.hidden ?? null, "boolean", "flags.3?Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; topic_id: number; title?: string; icon_emoji_id?: bigint; closed?: boolean; hidden?: boolean }) { - super(); - this.channel = params.channel; - this.topic_id = params.topic_id; - this.title = params.title; - this.icon_emoji_id = params.icon_emoji_id; - this.closed = params.closed; - this.hidden = params.hidden; - } -} - -/** Pin or unpin [forum topics](https://core.telegram.org/api/forum) */ -export class channels_updatePinnedForumTopic_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; topic_id: number; pinned: boolean }) => enums.Updates; - /** Supergroup ID */ - channel: enums.InputChannel; - /** [Forum topic ID](https://core.telegram.org/api/forum) */ - topic_id: number; - /** Whether to pin or unpin the topic */ - pinned: boolean; - - protected get [id](): number { - return 0x6C2D9026; - } - - static get [name](): string { - return "channels.updatePinnedForumTopic" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["topic_id", "number", "int"], - ["pinned", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.topic_id, "number", "int"], - [this.pinned, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; topic_id: number; pinned: boolean }) { - super(); - this.channel = params.channel; - this.topic_id = params.topic_id; - this.pinned = params.pinned; - } -} - -/** Delete message history of a [forum topic](https://core.telegram.org/api/forum) */ -export class channels_deleteTopicHistory_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; top_msg_id: number }) => enums.messages.AffectedHistory; - /** Forum */ - channel: enums.InputChannel; - /** Topic ID */ - top_msg_id: number; - - protected get [id](): number { - return 0x34435F2D; - } - - static get [name](): string { - return "channels.deleteTopicHistory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["top_msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.top_msg_id, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; top_msg_id: number }) { - super(); - this.channel = params.channel; - this.top_msg_id = params.top_msg_id; - } -} - -/** Reorder pinned forum topics */ -export class channels_reorderPinnedForumTopics_ extends Function_ { - static __F: (params: { force?: true; channel: enums.InputChannel; order: Array }) => enums.Updates; - /** If not set, the order of only the topics present both server-side and in `order` will be changed (i.e. mentioning topics not pinned server-side in `order` will not pin them, and not mentioning topics pinned server-side will not unpin them). - If set, the entire server-side pinned topic list will be replaced with `order` (i.e. mentioning topics not pinned server-side in `order` will pin them, and not mentioning topics pinned server-side will unpin them) */ - force?: true; - /** Supergroup ID */ - channel: enums.InputChannel; - /** [Topic IDs »](https://core.telegram.org/api/forum) */ - order: Array; - - protected get [id](): number { - return 0x2950A18F; - } - - static get [name](): string { - return "channels.reorderPinnedForumTopics" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["force", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ["order", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.force ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - [this.order, ["number"], "Vector"], - ]; - } - - constructor(params: { force?: true; channel: enums.InputChannel; order: Array }) { - super(); - this.force = params.force; - this.channel = params.channel; - this.order = params.order; - } -} - -/** Enable or disable the [native antispam system](https://core.telegram.org/api/antispam). */ -export class channels_toggleAntiSpam_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Supergroup ID. The specified supergroup must have at least `telegram_antispam_group_size_min` members to enable antispam functionality, as specified by the [client configuration parameters](https://core.telegram.org/api/config#client-configuration). */ - channel: enums.InputChannel; - /** Enable or disable the native antispam system. */ - enabled: boolean; - - protected get [id](): number { - return 0x68F3E4EB; - } - - static get [name](): string { - return "channels.toggleAntiSpam" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Report a [native antispam](https://core.telegram.org/api/antispam) false positive */ -export class channels_reportAntiSpamFalsePositive_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; msg_id: number }) => boolean; - /** Supergroup ID */ - channel: enums.InputChannel; - /** Message ID that was mistakenly deleted by the [native antispam](https://core.telegram.org/api/antispam) system, taken from the [admin log](https://core.telegram.org/api/recent-actions) */ - msg_id: number; - - protected get [id](): number { - return 0xA850A693; - } - - static get [name](): string { - return "channels.reportAntiSpamFalsePositive" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; msg_id: number }) { - super(); - this.channel = params.channel; - this.msg_id = params.msg_id; - } -} - -/** Hide or display the participants list in a [supergroup](https://core.telegram.org/api/channel). */ -export class channels_toggleParticipantsHidden_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** Supergroup ID */ - channel: enums.InputChannel; - /** If true, will hide the participants list; otherwise will unhide it. */ - enabled: boolean; - - protected get [id](): number { - return 0x6A6E7854; - } - - static get [name](): string { - return "channels.toggleParticipantsHidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Informs the server that the user has either: */ -export class channels_clickSponsoredMessage_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; random_id: Uint8Array }) => boolean; - /** Channel where the sponsored message was posted */ - channel: enums.InputChannel; - /** Message ID */ - random_id: Uint8Array; - - protected get [id](): number { - return 0x18AFBC93; - } - - static get [name](): string { - return "channels.clickSponsoredMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["random_id", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.random_id, Uint8Array, "bytes"], - ]; - } - - constructor(params: { channel: enums.InputChannel; random_id: Uint8Array }) { - super(); - this.channel = params.channel; - this.random_id = params.random_id; - } -} - -/** Update the [accent color and background custom emoji »](https://core.telegram.org/api/colors) of a channel. */ -export class channels_updateColor_ extends Function_ { - static __F: (params: { for_profile?: true; channel: enums.InputChannel; color?: number; background_emoji_id?: bigint }) => enums.Updates; - /** Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. */ - for_profile?: true; - /** Channel whose accent color should be changed. */ - channel: enums.InputChannel; - /** [ID of the accent color palette »](https://core.telegram.org/api/colors) to use (not RGB24, see [here »](https://core.telegram.org/api/colors) for more info); if not set, the default palette is used. */ - color?: number; - /** Custom emoji ID used in the accent color pattern. */ - background_emoji_id?: bigint; - - protected get [id](): number { - return 0xD8AA3671; - } - - static get [name](): string { - return "channels.updateColor" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["for_profile", "true", "flags.1?true"], - ["channel", types._InputChannel, "InputChannel"], - ["color", "number", "flags.2?int"], - ["background_emoji_id", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.for_profile ?? null, "true", "flags.1?true"], - [this.channel, types._InputChannel, "InputChannel"], - [this.color ?? null, "number", "flags.2?int"], - [this.background_emoji_id ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params: { for_profile?: true; channel: enums.InputChannel; color?: number; background_emoji_id?: bigint }) { - super(); - this.for_profile = params.for_profile; - this.channel = params.channel; - this.color = params.color; - this.background_emoji_id = params.background_emoji_id; - } -} - -/** Users may also choose to display messages from all topics of a [forum](https://core.telegram.org/api/forum) as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method. */ -export class channels_toggleViewForumAsMessages_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; enabled: boolean }) => enums.Updates; - /** The forum */ - channel: enums.InputChannel; - /** The new value of the `view_forum_as_messages` flag. */ - enabled: boolean; - - protected get [id](): number { - return 0x9738BB15; - } - - static get [name](): string { - return "channels.toggleViewForumAsMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["enabled", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.enabled, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; enabled: boolean }) { - super(); - this.channel = params.channel; - this.enabled = params.enabled; - } -} - -/** Obtain a list of similarly themed public channels, selected based on similarities in their **subscriber bases**. */ -export class channels_getChannelRecommendations_ extends Function_ { - static __F: (params: { channel: enums.InputChannel }) => enums.messages.Chats; - /** The method will return channels related to the passed `channel`. */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0x83B70D97; - } - - static get [name](): string { - return "channels.getChannelRecommendations" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { channel: enums.InputChannel }) { - super(); - this.channel = params.channel; - } -} - -/** Set an [emoji status](https://core.telegram.org/api/emoji-status) for a channel. */ -export class channels_updateEmojiStatus_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; emoji_status: enums.EmojiStatus }) => enums.Updates; - /** The channel, must have at least [`channel_emoji_status_level_min` boosts](https://core.telegram.org/api/config#channel-emoji-status-level-min). */ - channel: enums.InputChannel; - /** [Emoji status](https://core.telegram.org/api/emoji-status) to set */ - emoji_status: enums.EmojiStatus; - - protected get [id](): number { - return 0xF0D3E6A8; - } - - static get [name](): string { - return "channels.updateEmojiStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["emoji_status", types._EmojiStatus, "EmojiStatus"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.emoji_status, types._EmojiStatus, "EmojiStatus"], - ]; - } - - constructor(params: { channel: enums.InputChannel; emoji_status: enums.EmojiStatus }) { - super(); - this.channel = params.channel; - this.emoji_status = params.emoji_status; - } -} - -export class channels_setBoostsToUnblockRestrictions_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; boosts: number }) => enums.Updates; - channel: enums.InputChannel; - boosts: number; - - protected get [id](): number { - return 0xAD399CEE; - } - - static get [name](): string { - return "channels.setBoostsToUnblockRestrictions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["boosts", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.boosts, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; boosts: number }) { - super(); - this.channel = params.channel; - this.boosts = params.boosts; - } -} - -export class channels_setEmojiStickers_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; stickerset: enums.InputStickerSet }) => boolean; - channel: enums.InputChannel; - stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0x3CD930B7; - } - - static get [name](): string { - return "channels.setEmojiStickers" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - ]; - } - - constructor(params: { channel: enums.InputChannel; stickerset: enums.InputStickerSet }) { - super(); - this.channel = params.channel; - this.stickerset = params.stickerset; - } -} - -export class channels_reportSponsoredMessage_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; random_id: Uint8Array; option: Uint8Array }) => enums.channels.SponsoredMessageReportResult; - channel: enums.InputChannel; - random_id: Uint8Array; - option: Uint8Array; - - protected get [id](): number { - return 0xAF8FF6B9; - } - - static get [name](): string { - return "channels.reportSponsoredMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["random_id", Uint8Array, "bytes"], - ["option", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.random_id, Uint8Array, "bytes"], - [this.option, Uint8Array, "bytes"], - ]; - } - - constructor(params: { channel: enums.InputChannel; random_id: Uint8Array; option: Uint8Array }) { - super(); - this.channel = params.channel; - this.random_id = params.random_id; - this.option = params.option; - } -} - -export class channels_restrictSponsoredMessages_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; restricted: boolean }) => enums.Updates; - channel: enums.InputChannel; - restricted: boolean; - - protected get [id](): number { - return 0x9AE91519; - } - - static get [name](): string { - return "channels.restrictSponsoredMessages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["restricted", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.restricted, "boolean", "Bool"], - ]; - } - - constructor(params: { channel: enums.InputChannel; restricted: boolean }) { - super(); - this.channel = params.channel; - this.restricted = params.restricted; - } -} - -/** Sends a custom request; for bots only */ -export class bots_sendCustomRequest_ extends Function_ { - static __F: (params: { custom_method: string; params: enums.DataJSON }) => enums.DataJSON; - /** The method name */ - custom_method: string; - /** JSON-serialized method parameters */ - params: enums.DataJSON; - - protected get [id](): number { - return 0xAA2769ED; - } - - static get [name](): string { - return "bots.sendCustomRequest" - } - - static get [paramDesc](): ParamDesc { - return [ - ["custom_method", "string", "string"], - ["params", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.custom_method, "string", "string"], - [this.params, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { custom_method: string; params: enums.DataJSON }) { - super(); - this.custom_method = params.custom_method; - this.params = params.params; - } -} - -/** Answers a custom query; for bots only */ -export class bots_answerWebhookJSONQuery_ extends Function_ { - static __F: (params: { query_id: bigint; data: enums.DataJSON }) => boolean; - /** Identifier of a custom query */ - query_id: bigint; - /** JSON-serialized answer to the query */ - data: enums.DataJSON; - - protected get [id](): number { - return 0xE6213F4D; - } - - static get [name](): string { - return "bots.answerWebhookJSONQuery" - } - - static get [paramDesc](): ParamDesc { - return [ - ["query_id", "bigint", "long"], - ["data", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.query_id, "bigint", "long"], - [this.data, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { query_id: bigint; data: enums.DataJSON }) { - super(); - this.query_id = params.query_id; - this.data = params.data; - } -} - -/** Set bot command list */ -export class bots_setBotCommands_ extends Function_ { - static __F: (params: { scope: enums.BotCommandScope; lang_code: string; commands: Array }) => boolean; - /** Command scope */ - scope: enums.BotCommandScope; - /** Language code */ - lang_code: string; - /** Bot commands */ - commands: Array; - - protected get [id](): number { - return 0x0517165A; - } - - static get [name](): string { - return "bots.setBotCommands" - } - - static get [paramDesc](): ParamDesc { - return [ - ["scope", types._BotCommandScope, "BotCommandScope"], - ["lang_code", "string", "string"], - ["commands", [types._BotCommand], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.scope, types._BotCommandScope, "BotCommandScope"], - [this.lang_code, "string", "string"], - [this.commands, [types._BotCommand], "Vector"], - ]; - } - - constructor(params: { scope: enums.BotCommandScope; lang_code: string; commands: Array }) { - super(); - this.scope = params.scope; - this.lang_code = params.lang_code; - this.commands = params.commands; - } -} - -/** Clear bot commands for the specified bot scope and language code */ -export class bots_resetBotCommands_ extends Function_ { - static __F: (params: { scope: enums.BotCommandScope; lang_code: string }) => boolean; - /** Command scope */ - scope: enums.BotCommandScope; - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0x3D8DE0F9; - } - - static get [name](): string { - return "bots.resetBotCommands" - } - - static get [paramDesc](): ParamDesc { - return [ - ["scope", types._BotCommandScope, "BotCommandScope"], - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.scope, types._BotCommandScope, "BotCommandScope"], - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { scope: enums.BotCommandScope; lang_code: string }) { - super(); - this.scope = params.scope; - this.lang_code = params.lang_code; - } -} - -/** Obtain a list of bot commands for the specified bot scope and language code */ -export class bots_getBotCommands_ extends Function_ { - static __F: (params: { scope: enums.BotCommandScope; lang_code: string }) => enums.BotCommand[]; - /** Command scope */ - scope: enums.BotCommandScope; - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0xE34C0DD6; - } - - static get [name](): string { - return "bots.getBotCommands" - } - - static get [paramDesc](): ParamDesc { - return [ - ["scope", types._BotCommandScope, "BotCommandScope"], - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.scope, types._BotCommandScope, "BotCommandScope"], - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { scope: enums.BotCommandScope; lang_code: string }) { - super(); - this.scope = params.scope; - this.lang_code = params.lang_code; - } -} - -/** Sets the [menu button action »](https://core.telegram.org/api/bots/menu) for a given user or for all users */ -export class bots_setBotMenuButton_ extends Function_ { - static __F: (params: { user_id: enums.InputUser; button: enums.BotMenuButton }) => boolean; - /** User ID */ - user_id: enums.InputUser; - /** Bot menu button action */ - button: enums.BotMenuButton; - - protected get [id](): number { - return 0x4504D54F; - } - - static get [name](): string { - return "bots.setBotMenuButton" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ["button", types._BotMenuButton, "BotMenuButton"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - [this.button, types._BotMenuButton, "BotMenuButton"], - ]; - } - - constructor(params: { user_id: enums.InputUser; button: enums.BotMenuButton }) { - super(); - this.user_id = params.user_id; - this.button = params.button; - } -} - -/** Gets the menu button action for a given user or for all users, previously set using [bots.setBotMenuButton](https://core.telegram.org/method/bots.setBotMenuButton); users can see this information in the [botInfo](https://core.telegram.org/constructor/botInfo) constructor. */ -export class bots_getBotMenuButton_ extends Function_ { - static __F: (params: { user_id: enums.InputUser }) => enums.BotMenuButton; - /** User ID or empty for the default menu button. */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x9C60EB28; - } - - static get [name](): string { - return "bots.getBotMenuButton" - } - - static get [paramDesc](): ParamDesc { - return [ - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { user_id: enums.InputUser }) { - super(); - this.user_id = params.user_id; - } -} - -/** Set the default [suggested admin rights](https://core.telegram.org/api/rights#suggested-bot-rights) for bots being added as admins to channels, see [here for more info on how to handle them »](https://core.telegram.org/api/rights#suggested-bot-rights). */ -export class bots_setBotBroadcastDefaultAdminRights_ extends Function_ { - static __F: (params: { admin_rights: enums.ChatAdminRights }) => boolean; - /** Admin rights */ - admin_rights: enums.ChatAdminRights; - - protected get [id](): number { - return 0x788464E1; - } - - static get [name](): string { - return "bots.setBotBroadcastDefaultAdminRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["admin_rights", types._ChatAdminRights, "ChatAdminRights"], - ]; - } - - protected get [params](): Params { - return [ - [this.admin_rights, types._ChatAdminRights, "ChatAdminRights"], - ]; - } - - constructor(params: { admin_rights: enums.ChatAdminRights }) { - super(); - this.admin_rights = params.admin_rights; - } -} - -/** Set the default [suggested admin rights](https://core.telegram.org/api/rights#suggested-bot-rights) for bots being added as admins to groups, see [here for more info on how to handle them »](https://core.telegram.org/api/rights#suggested-bot-rights). */ -export class bots_setBotGroupDefaultAdminRights_ extends Function_ { - static __F: (params: { admin_rights: enums.ChatAdminRights }) => boolean; - /** Admin rights */ - admin_rights: enums.ChatAdminRights; - - protected get [id](): number { - return 0x925EC9EA; - } - - static get [name](): string { - return "bots.setBotGroupDefaultAdminRights" - } - - static get [paramDesc](): ParamDesc { - return [ - ["admin_rights", types._ChatAdminRights, "ChatAdminRights"], - ]; - } - - protected get [params](): Params { - return [ - [this.admin_rights, types._ChatAdminRights, "ChatAdminRights"], - ]; - } - - constructor(params: { admin_rights: enums.ChatAdminRights }) { - super(); - this.admin_rights = params.admin_rights; - } -} - -/** Set localized name, about text and description of a bot (or of the current account, if called by a bot). */ -export class bots_setBotInfo_ extends Function_ { - static __F: (params: { bot?: enums.InputUser; lang_code: string; name?: string; about?: string; description?: string }) => boolean; - /** If called by a user, **must** contain the peer of a bot we own. */ - bot?: enums.InputUser; - /** Language code, if left empty update the fallback about text and description */ - lang_code: string; - /** New bot name */ - name?: string; - /** New about text */ - about?: string; - /** New description */ - description?: string; - - protected get [id](): number { - return 0x10CF3123; - } - - static get [name](): string { - return "bots.setBotInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["bot", types._InputUser, "flags.2?InputUser"], - ["lang_code", "string", "string"], - ["name", "string", "flags.3?string"], - ["about", "string", "flags.0?string"], - ["description", "string", "flags.1?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.bot ?? null, types._InputUser, "flags.2?InputUser"], - [this.lang_code, "string", "string"], - [this.name ?? null, "string", "flags.3?string"], - [this.about ?? null, "string", "flags.0?string"], - [this.description ?? null, "string", "flags.1?string"], - ]; - } - - constructor(params: { bot?: enums.InputUser; lang_code: string; name?: string; about?: string; description?: string }) { - super(); - this.bot = params.bot; - this.lang_code = params.lang_code; - this.name = params.name; - this.about = params.about; - this.description = params.description; - } -} - -/** Get localized name, about text and description of a bot (or of the current account, if called by a bot). */ -export class bots_getBotInfo_ extends Function_ { - static __F: (params: { bot?: enums.InputUser; lang_code: string }) => enums.bots.BotInfo; - /** If called by a user, **must** contain the peer of a bot we own. */ - bot?: enums.InputUser; - /** Language code, if left empty this method will return the fallback about text and description. */ - lang_code: string; - - protected get [id](): number { - return 0xDCD914FD; - } - - static get [name](): string { - return "bots.getBotInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["bot", types._InputUser, "flags.0?InputUser"], - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.bot ?? null, types._InputUser, "flags.0?InputUser"], - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { bot?: enums.InputUser; lang_code: string }) { - super(); - this.bot = params.bot; - this.lang_code = params.lang_code; - } -} - -/** Reorder usernames associated to a bot we own. */ -export class bots_reorderUsernames_ extends Function_ { - static __F: (params: { bot: enums.InputUser; order: Array }) => boolean; - /** The bot */ - bot: enums.InputUser; - /** The new order for active usernames. All active usernames must be specified. */ - order: Array; - - protected get [id](): number { - return 0x9709B1C2; - } - - static get [name](): string { - return "bots.reorderUsernames" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ["order", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - [this.order, ["string"], "Vector"], - ]; - } - - constructor(params: { bot: enums.InputUser; order: Array }) { - super(); - this.bot = params.bot; - this.order = params.order; - } -} - -/** Activate or deactivate a purchased [fragment.com](https://fragment.com) username associated to a bot we own. */ -export class bots_toggleUsername_ extends Function_ { - static __F: (params: { bot: enums.InputUser; username: string; active: boolean }) => boolean; - /** The bot */ - bot: enums.InputUser; - /** Username */ - username: string; - /** Whether to activate or deactivate it */ - active: boolean; - - protected get [id](): number { - return 0x053CA973; - } - - static get [name](): string { - return "bots.toggleUsername" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ["username", "string", "string"], - ["active", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - [this.username, "string", "string"], - [this.active, "boolean", "Bool"], - ]; - } - - constructor(params: { bot: enums.InputUser; username: string; active: boolean }) { - super(); - this.bot = params.bot; - this.username = params.username; - this.active = params.active; - } -} - -/** Check whether the specified bot can send us messages */ -export class bots_canSendMessage_ extends Function_ { - static __F: (params: { bot: enums.InputUser }) => boolean; - /** The bot */ - bot: enums.InputUser; - - protected get [id](): number { - return 0x1359F4E6; - } - - static get [name](): string { - return "bots.canSendMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { bot: enums.InputUser }) { - super(); - this.bot = params.bot; - } -} - -/** Allow the specified bot to send us messages */ -export class bots_allowSendMessage_ extends Function_ { - static __F: (params: { bot: enums.InputUser }) => enums.Updates; - /** The bot */ - bot: enums.InputUser; - - protected get [id](): number { - return 0xF132E3EF; - } - - static get [name](): string { - return "bots.allowSendMessage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { bot: enums.InputUser }) { - super(); - this.bot = params.bot; - } -} - -/** Send a custom request from a [mini bot app](https://core.telegram.org/api/bots/webapps), triggered by a [web\_app\_invoke\_custom\_method event »](https://core.telegram.org/api/web-events#web-app-invoke-custom-method). */ -export class bots_invokeWebViewCustomMethod_ extends Function_ { - static __F: (params: { bot: enums.InputUser; custom_method: string; params: enums.DataJSON }) => enums.DataJSON; - /** Identifier of the bot associated to the [mini bot app](https://core.telegram.org/api/bots/webapps) */ - bot: enums.InputUser; - /** Identifier of the custom method to invoke */ - custom_method: string; - /** Method parameters */ - params: enums.DataJSON; - - protected get [id](): number { - return 0x087FC5E7; - } - - static get [name](): string { - return "bots.invokeWebViewCustomMethod" - } - - static get [paramDesc](): ParamDesc { - return [ - ["bot", types._InputUser, "InputUser"], - ["custom_method", "string", "string"], - ["params", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.bot, types._InputUser, "InputUser"], - [this.custom_method, "string", "string"], - [this.params, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { bot: enums.InputUser; custom_method: string; params: enums.DataJSON }) { - super(); - this.bot = params.bot; - this.custom_method = params.custom_method; - this.params = params.params; - } -} - -/** Get a payment form */ -export class payments_getPaymentForm_ extends Function_ { - static __F: (params: { invoice: enums.InputInvoice; theme_params?: enums.DataJSON }) => enums.payments.PaymentForm; - /** Invoice */ - invoice: enums.InputInvoice; - /** A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages: - `bg_color` - Background color - `text_color` - Text color - `hint_color` - Hint text color - `link_color` - Link color - `button_color` - Button color - `button_text_color` - Button text color */ - theme_params?: enums.DataJSON; - - protected get [id](): number { - return 0x37148DBB; - } - - static get [name](): string { - return "payments.getPaymentForm" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["invoice", types._InputInvoice, "InputInvoice"], - ["theme_params", types._DataJSON, "flags.0?DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.invoice, types._InputInvoice, "InputInvoice"], - [this.theme_params ?? null, types._DataJSON, "flags.0?DataJSON"], - ]; - } - - constructor(params: { invoice: enums.InputInvoice; theme_params?: enums.DataJSON }) { - super(); - this.invoice = params.invoice; - this.theme_params = params.theme_params; - } -} - -/** Get payment receipt */ -export class payments_getPaymentReceipt_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.payments.PaymentReceipt; - /** The peer where the payment receipt was sent */ - peer: enums.InputPeer; - /** Message ID of receipt */ - msg_id: number; - - protected get [id](): number { - return 0x2478D1CC; - } - - static get [name](): string { - return "payments.getPaymentReceipt" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** Submit requested order information for validation */ -export class payments_validateRequestedInfo_ extends Function_ { - static __F: (params: { save?: true; invoice: enums.InputInvoice; info: enums.PaymentRequestedInfo }) => enums.payments.ValidatedRequestedInfo; - /** Save order information to re-use it for future orders */ - save?: true; - /** Invoice */ - invoice: enums.InputInvoice; - /** Requested order information */ - info: enums.PaymentRequestedInfo; - - protected get [id](): number { - return 0xB6C8F12B; - } - - static get [name](): string { - return "payments.validateRequestedInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["save", "true", "flags.0?true"], - ["invoice", types._InputInvoice, "InputInvoice"], - ["info", types._PaymentRequestedInfo, "PaymentRequestedInfo"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.save ?? null, "true", "flags.0?true"], - [this.invoice, types._InputInvoice, "InputInvoice"], - [this.info, types._PaymentRequestedInfo, "PaymentRequestedInfo"], - ]; - } - - constructor(params: { save?: true; invoice: enums.InputInvoice; info: enums.PaymentRequestedInfo }) { - super(); - this.save = params.save; - this.invoice = params.invoice; - this.info = params.info; - } -} - -/** Send compiled payment form */ -export class payments_sendPaymentForm_ extends Function_ { - static __F: (params: { form_id: bigint; invoice: enums.InputInvoice; requested_info_id?: string; shipping_option_id?: string; credentials: enums.InputPaymentCredentials; tip_amount?: bigint }) => enums.payments.PaymentResult; - /** Form ID */ - form_id: bigint; - /** Invoice */ - invoice: enums.InputInvoice; - /** ID of saved and validated [order info](https://core.telegram.org/constructor/payments.validatedRequestedInfo) */ - requested_info_id?: string; - /** Chosen shipping option ID */ - shipping_option_id?: string; - /** Payment credentials */ - credentials: enums.InputPaymentCredentials; - /** Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the exp parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */ - tip_amount?: bigint; - - protected get [id](): number { - return 0x2D03522F; - } - - static get [name](): string { - return "payments.sendPaymentForm" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["form_id", "bigint", "long"], - ["invoice", types._InputInvoice, "InputInvoice"], - ["requested_info_id", "string", "flags.0?string"], - ["shipping_option_id", "string", "flags.1?string"], - ["credentials", types._InputPaymentCredentials, "InputPaymentCredentials"], - ["tip_amount", "bigint", "flags.2?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.form_id, "bigint", "long"], - [this.invoice, types._InputInvoice, "InputInvoice"], - [this.requested_info_id ?? null, "string", "flags.0?string"], - [this.shipping_option_id ?? null, "string", "flags.1?string"], - [this.credentials, types._InputPaymentCredentials, "InputPaymentCredentials"], - [this.tip_amount ?? null, "bigint", "flags.2?long"], - ]; - } - - constructor(params: { form_id: bigint; invoice: enums.InputInvoice; requested_info_id?: string; shipping_option_id?: string; credentials: enums.InputPaymentCredentials; tip_amount?: bigint }) { - super(); - this.form_id = params.form_id; - this.invoice = params.invoice; - this.requested_info_id = params.requested_info_id; - this.shipping_option_id = params.shipping_option_id; - this.credentials = params.credentials; - this.tip_amount = params.tip_amount; - } -} - -/** Get saved payment information */ -export class payments_getSavedInfo_ extends Function_ { - static __F: () => enums.payments.SavedInfo; - protected get [id](): number { - return 0x227D824B; - } - - static get [name](): string { - return "payments.getSavedInfo" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Clear saved payment information */ -export class payments_clearSavedInfo_ extends Function_ { - static __F: (params?: { credentials?: true; info?: true }) => boolean; - /** Remove saved payment credentials */ - credentials?: true; - /** Clear the last order settings saved by the user */ - info?: true; - - protected get [id](): number { - return 0xD83D70C1; - } - - static get [name](): string { - return "payments.clearSavedInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["credentials", "true", "flags.0?true"], - ["info", "true", "flags.1?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.credentials ?? null, "true", "flags.0?true"], - [this.info ?? null, "true", "flags.1?true"], - ]; - } - - constructor(params?: { credentials?: true; info?: true }) { - super(); - this.credentials = params?.credentials; - this.info = params?.info; - } -} - -/** Get info about a credit card */ -export class payments_getBankCardData_ extends Function_ { - static __F: (params: { number: string }) => enums.payments.BankCardData; - /** Credit card number */ - number: string; - - protected get [id](): number { - return 0x2E79D779; - } - - static get [name](): string { - return "payments.getBankCardData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["number", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.number, "string", "string"], - ]; - } - - constructor(params: { number: string }) { - super(); - this.number = params.number; - } -} - -/** Generate an [invoice deep link](https://core.telegram.org/api/links#invoice-links) */ -export class payments_exportInvoice_ extends Function_ { - static __F: (params: { invoice_media: enums.InputMedia }) => enums.payments.ExportedInvoice; - /** Invoice */ - invoice_media: enums.InputMedia; - - protected get [id](): number { - return 0x0F91B065; - } - - static get [name](): string { - return "payments.exportInvoice" - } - - static get [paramDesc](): ParamDesc { - return [ - ["invoice_media", types._InputMedia, "InputMedia"], - ]; - } - - protected get [params](): Params { - return [ - [this.invoice_media, types._InputMedia, "InputMedia"], - ]; - } - - constructor(params: { invoice_media: enums.InputMedia }) { - super(); - this.invoice_media = params.invoice_media; - } -} - -/** Informs server about a purchase made through the App Store: for official applications only. */ -export class payments_assignAppStoreTransaction_ extends Function_ { - static __F: (params: { receipt: Uint8Array; purpose: enums.InputStorePaymentPurpose }) => enums.Updates; - /** Receipt */ - receipt: Uint8Array; - /** Payment purpose */ - purpose: enums.InputStorePaymentPurpose; - - protected get [id](): number { - return 0x80ED747D; - } - - static get [name](): string { - return "payments.assignAppStoreTransaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["receipt", Uint8Array, "bytes"], - ["purpose", types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - protected get [params](): Params { - return [ - [this.receipt, Uint8Array, "bytes"], - [this.purpose, types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - constructor(params: { receipt: Uint8Array; purpose: enums.InputStorePaymentPurpose }) { - super(); - this.receipt = params.receipt; - this.purpose = params.purpose; - } -} - -/** Informs server about a purchase made through the Play Store: for official applications only. */ -export class payments_assignPlayMarketTransaction_ extends Function_ { - static __F: (params: { receipt: enums.DataJSON; purpose: enums.InputStorePaymentPurpose }) => enums.Updates; - /** Receipt */ - receipt: enums.DataJSON; - /** Payment purpose */ - purpose: enums.InputStorePaymentPurpose; - - protected get [id](): number { - return 0xDFFD50D3; - } - - static get [name](): string { - return "payments.assignPlayMarketTransaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["receipt", types._DataJSON, "DataJSON"], - ["purpose", types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - protected get [params](): Params { - return [ - [this.receipt, types._DataJSON, "DataJSON"], - [this.purpose, types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - constructor(params: { receipt: enums.DataJSON; purpose: enums.InputStorePaymentPurpose }) { - super(); - this.receipt = params.receipt; - this.purpose = params.purpose; - } -} - -/** Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only. */ -export class payments_canPurchasePremium_ extends Function_ { - static __F: (params: { purpose: enums.InputStorePaymentPurpose }) => boolean; - /** Payment purpose */ - purpose: enums.InputStorePaymentPurpose; - - protected get [id](): number { - return 0x9FC19EB6; - } - - static get [name](): string { - return "payments.canPurchasePremium" - } - - static get [paramDesc](): ParamDesc { - return [ - ["purpose", types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - protected get [params](): Params { - return [ - [this.purpose, types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - constructor(params: { purpose: enums.InputStorePaymentPurpose }) { - super(); - this.purpose = params.purpose; - } -} - -/** Obtain a list of Telegram Premium [giveaway/gift code »](https://core.telegram.org/api/giveaways) options. */ -export class payments_getPremiumGiftCodeOptions_ extends Function_ { - static __F: (params?: { boost_peer?: enums.InputPeer }) => enums.PremiumGiftCodeOption[]; - /** The channel that will start the giveaway */ - boost_peer?: enums.InputPeer; - - protected get [id](): number { - return 0x2757BA54; - } - - static get [name](): string { - return "payments.getPremiumGiftCodeOptions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["boost_peer", types._InputPeer, "flags.0?InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.boost_peer ?? null, types._InputPeer, "flags.0?InputPeer"], - ]; - } - - constructor(params?: { boost_peer?: enums.InputPeer }) { - super(); - this.boost_peer = params?.boost_peer; - } -} - -/** Obtain information about a [Telegram Premium giftcode »](https://core.telegram.org/api/giveaways) */ -export class payments_checkGiftCode_ extends Function_ { - static __F: (params: { slug: string }) => enums.payments.CheckedGiftCode; - /** The giftcode to check */ - slug: string; - - protected get [id](): number { - return 0x8E51B4C1; - } - - static get [name](): string { - return "payments.checkGiftCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -/** Apply a [Telegram Premium giftcode »](https://core.telegram.org/api/giveaways) */ -export class payments_applyGiftCode_ extends Function_ { - static __F: (params: { slug: string }) => enums.Updates; - /** The code to apply */ - slug: string; - - protected get [id](): number { - return 0xF6E26854; - } - - static get [name](): string { - return "payments.applyGiftCode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -/** Obtain information about a [Telegram Premium giveaway »](https://core.telegram.org/api/giveaways). */ -export class payments_getGiveawayInfo_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; msg_id: number }) => enums.payments.GiveawayInfo; - /** The peer where the giveaway was posted. */ - peer: enums.InputPeer; - /** Message ID of the [messageActionGiveawayLaunch](https://core.telegram.org/constructor/messageActionGiveawayLaunch) service message */ - msg_id: number; - - protected get [id](): number { - return 0xF4239425; - } - - static get [name](): string { - return "payments.getGiveawayInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; msg_id: number }) { - super(); - this.peer = params.peer; - this.msg_id = params.msg_id; - } -} - -/** Launch a [prepaid giveaway »](https://core.telegram.org/api/giveaways). */ -export class payments_launchPrepaidGiveaway_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; giveaway_id: bigint; purpose: enums.InputStorePaymentPurpose }) => enums.Updates; - /** The peer where to launch the giveaway. */ - peer: enums.InputPeer; - /** The prepaid giveaway ID. */ - giveaway_id: bigint; - /** Giveway parameters */ - purpose: enums.InputStorePaymentPurpose; - - protected get [id](): number { - return 0x5FF58F20; - } - - static get [name](): string { - return "payments.launchPrepaidGiveaway" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["giveaway_id", "bigint", "long"], - ["purpose", types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.giveaway_id, "bigint", "long"], - [this.purpose, types._InputStorePaymentPurpose, "InputStorePaymentPurpose"], - ]; - } - - constructor(params: { peer: enums.InputPeer; giveaway_id: bigint; purpose: enums.InputStorePaymentPurpose }) { - super(); - this.peer = params.peer; - this.giveaway_id = params.giveaway_id; - this.purpose = params.purpose; - } -} - -/** Create a stickerset, bots only. */ -export class stickers_createStickerSet_ extends Function_ { - static __F: (params: { masks?: true; emojis?: true; text_color?: true; user_id: enums.InputUser; title: string; short_name: string; thumb?: enums.InputDocument; stickers: Array; software?: string }) => enums.messages.StickerSet; - /** Whether this is a mask stickerset */ - masks?: true; - /** Whether this is a [custom emoji](https://core.telegram.org/api/custom-emoji) stickerset. */ - emojis?: true; - /** Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only. */ - text_color?: true; - /** Stickerset owner */ - user_id: enums.InputUser; - /** Stickerset name, `1-64` chars */ - title: string; - /** Short name of sticker set, to be used in [sticker deep links »](https://core.telegram.org/api/links#stickerset-links). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, **if called by a bot**, must end in `"_by_"`. `` is case insensitive. 1-64 characters. */ - short_name: string; - /** Thumbnail */ - thumb?: enums.InputDocument; - /** Stickers */ - stickers: Array; - /** Used when [importing stickers using the sticker import SDKs](https://core.telegram.org/import-stickers), specifies the name of the software that created the stickers */ - software?: string; - - protected get [id](): number { - return 0x9021AB67; - } - - static get [name](): string { - return "stickers.createStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["masks", "true", "flags.0?true"], - ["emojis", "true", "flags.5?true"], - ["text_color", "true", "flags.6?true"], - ["user_id", types._InputUser, "InputUser"], - ["title", "string", "string"], - ["short_name", "string", "string"], - ["thumb", types._InputDocument, "flags.2?InputDocument"], - ["stickers", [types._InputStickerSetItem], "Vector"], - ["software", "string", "flags.3?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.masks ?? null, "true", "flags.0?true"], - [this.emojis ?? null, "true", "flags.5?true"], - [this.text_color ?? null, "true", "flags.6?true"], - [this.user_id, types._InputUser, "InputUser"], - [this.title, "string", "string"], - [this.short_name, "string", "string"], - [this.thumb ?? null, types._InputDocument, "flags.2?InputDocument"], - [this.stickers, [types._InputStickerSetItem], "Vector"], - [this.software ?? null, "string", "flags.3?string"], - ]; - } - - constructor(params: { masks?: true; emojis?: true; text_color?: true; user_id: enums.InputUser; title: string; short_name: string; thumb?: enums.InputDocument; stickers: Array; software?: string }) { - super(); - this.masks = params.masks; - this.emojis = params.emojis; - this.text_color = params.text_color; - this.user_id = params.user_id; - this.title = params.title; - this.short_name = params.short_name; - this.thumb = params.thumb; - this.stickers = params.stickers; - this.software = params.software; - } -} - -/** Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot. */ -export class stickers_removeStickerFromSet_ extends Function_ { - static __F: (params: { sticker: enums.InputDocument }) => enums.messages.StickerSet; - /** The sticker to remove */ - sticker: enums.InputDocument; - - protected get [id](): number { - return 0xF7760F51; - } - - static get [name](): string { - return "stickers.removeStickerFromSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["sticker", types._InputDocument, "InputDocument"], - ]; - } - - protected get [params](): Params { - return [ - [this.sticker, types._InputDocument, "InputDocument"], - ]; - } - - constructor(params: { sticker: enums.InputDocument }) { - super(); - this.sticker = params.sticker; - } -} - -/** Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot */ -export class stickers_changeStickerPosition_ extends Function_ { - static __F: (params: { sticker: enums.InputDocument; position: number }) => enums.messages.StickerSet; - /** The sticker */ - sticker: enums.InputDocument; - /** The new position of the sticker, zero-based */ - position: number; - - protected get [id](): number { - return 0xFFB6D4CA; - } - - static get [name](): string { - return "stickers.changeStickerPosition" - } - - static get [paramDesc](): ParamDesc { - return [ - ["sticker", types._InputDocument, "InputDocument"], - ["position", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.sticker, types._InputDocument, "InputDocument"], - [this.position, "number", "int"], - ]; - } - - constructor(params: { sticker: enums.InputDocument; position: number }) { - super(); - this.sticker = params.sticker; - this.position = params.position; - } -} - -/** Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. */ -export class stickers_addStickerToSet_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet; sticker: enums.InputStickerSetItem }) => enums.messages.StickerSet; - /** The stickerset */ - stickerset: enums.InputStickerSet; - /** The sticker */ - sticker: enums.InputStickerSetItem; - - protected get [id](): number { - return 0x8653FEBE; - } - - static get [name](): string { - return "stickers.addStickerToSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ["sticker", types._InputStickerSetItem, "InputStickerSetItem"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - [this.sticker, types._InputStickerSetItem, "InputStickerSetItem"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; sticker: enums.InputStickerSetItem }) { - super(); - this.stickerset = params.stickerset; - this.sticker = params.sticker; - } -} - -/** Set stickerset thumbnail */ -export class stickers_setStickerSetThumb_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet; thumb?: enums.InputDocument; thumb_document_id?: bigint }) => enums.messages.StickerSet; - /** Stickerset */ - stickerset: enums.InputStickerSet; - /** Thumbnail (only for normal stickersets, not custom emoji stickersets). */ - thumb?: enums.InputDocument; - /** Only for [custom emoji stickersets](https://core.telegram.org/api/custom-emoji), ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set. */ - thumb_document_id?: bigint; - - protected get [id](): number { - return 0xA76A5392; - } - - static get [name](): string { - return "stickers.setStickerSetThumb" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ["thumb", types._InputDocument, "flags.0?InputDocument"], - ["thumb_document_id", "bigint", "flags.1?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - [this.thumb ?? null, types._InputDocument, "flags.0?InputDocument"], - [this.thumb_document_id ?? null, "bigint", "flags.1?long"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; thumb?: enums.InputDocument; thumb_document_id?: bigint }) { - super(); - this.stickerset = params.stickerset; - this.thumb = params.thumb; - this.thumb_document_id = params.thumb_document_id; - } -} - -/** Check whether the given short name is available */ -export class stickers_checkShortName_ extends Function_ { - static __F: (params: { short_name: string }) => boolean; - /** Short name */ - short_name: string; - - protected get [id](): number { - return 0x284B3639; - } - - static get [name](): string { - return "stickers.checkShortName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["short_name", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.short_name, "string", "string"], - ]; - } - - constructor(params: { short_name: string }) { - super(); - this.short_name = params.short_name; - } -} - -/** Suggests a short name for a given stickerpack name */ -export class stickers_suggestShortName_ extends Function_ { - static __F: (params: { title: string }) => enums.stickers.SuggestedShortName; - /** Sticker pack name */ - title: string; - - protected get [id](): number { - return 0x4DAFC503; - } - - static get [name](): string { - return "stickers.suggestShortName" - } - - static get [paramDesc](): ParamDesc { - return [ - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.title, "string", "string"], - ]; - } - - constructor(params: { title: string }) { - super(); - this.title = params.title; - } -} - -/** Update the keywords, emojis or [mask coordinates](https://core.telegram.org/api/stickers#mask-stickers) of a sticker, bots only. */ -export class stickers_changeSticker_ extends Function_ { - static __F: (params: { sticker: enums.InputDocument; emoji?: string; mask_coords?: enums.MaskCoords; keywords?: string }) => enums.messages.StickerSet; - /** The sticker */ - sticker: enums.InputDocument; - /** If set, updates the emoji list associated to the sticker */ - emoji?: string; - /** If set, updates the [mask coordinates](https://core.telegram.org/api/stickers#mask-stickers) */ - mask_coords?: enums.MaskCoords; - /** If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers. */ - keywords?: string; - - protected get [id](): number { - return 0xF5537EBC; - } - - static get [name](): string { - return "stickers.changeSticker" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["sticker", types._InputDocument, "InputDocument"], - ["emoji", "string", "flags.0?string"], - ["mask_coords", types._MaskCoords, "flags.1?MaskCoords"], - ["keywords", "string", "flags.2?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.sticker, types._InputDocument, "InputDocument"], - [this.emoji ?? null, "string", "flags.0?string"], - [this.mask_coords ?? null, types._MaskCoords, "flags.1?MaskCoords"], - [this.keywords ?? null, "string", "flags.2?string"], - ]; - } - - constructor(params: { sticker: enums.InputDocument; emoji?: string; mask_coords?: enums.MaskCoords; keywords?: string }) { - super(); - this.sticker = params.sticker; - this.emoji = params.emoji; - this.mask_coords = params.mask_coords; - this.keywords = params.keywords; - } -} - -/** Renames a stickerset, bots only. */ -export class stickers_renameStickerSet_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet; title: string }) => enums.messages.StickerSet; - /** Stickerset to rename */ - stickerset: enums.InputStickerSet; - /** New stickerset title */ - title: string; - - protected get [id](): number { - return 0x124B1C00; - } - - static get [name](): string { - return "stickers.renameStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet; title: string }) { - super(); - this.stickerset = params.stickerset; - this.title = params.title; - } -} - -/** Deletes a stickerset we created, bots only. */ -export class stickers_deleteStickerSet_ extends Function_ { - static __F: (params: { stickerset: enums.InputStickerSet }) => boolean; - /** Stickerset to delete */ - stickerset: enums.InputStickerSet; - - protected get [id](): number { - return 0x87704394; - } - - static get [name](): string { - return "stickers.deleteStickerSet" - } - - static get [paramDesc](): ParamDesc { - return [ - ["stickerset", types._InputStickerSet, "InputStickerSet"], - ]; - } - - protected get [params](): Params { - return [ - [this.stickerset, types._InputStickerSet, "InputStickerSet"], - ]; - } - - constructor(params: { stickerset: enums.InputStickerSet }) { - super(); - this.stickerset = params.stickerset; - } -} - -export class stickers_replaceSticker_ extends Function_ { - static __F: (params: { sticker: enums.InputDocument; new_sticker: enums.InputStickerSetItem }) => enums.messages.StickerSet; - sticker: enums.InputDocument; - new_sticker: enums.InputStickerSetItem; - - protected get [id](): number { - return 0x4696459A; - } - - static get [name](): string { - return "stickers.replaceSticker" - } - - static get [paramDesc](): ParamDesc { - return [ - ["sticker", types._InputDocument, "InputDocument"], - ["new_sticker", types._InputStickerSetItem, "InputStickerSetItem"], - ]; - } - - protected get [params](): Params { - return [ - [this.sticker, types._InputDocument, "InputDocument"], - [this.new_sticker, types._InputStickerSetItem, "InputStickerSetItem"], - ]; - } - - constructor(params: { sticker: enums.InputDocument; new_sticker: enums.InputStickerSetItem }) { - super(); - this.sticker = params.sticker; - this.new_sticker = params.new_sticker; - } -} - -/** Get phone call configuration to be passed to libtgvoip's shared config */ -export class phone_getCallConfig_ extends Function_ { - static __F: () => enums.DataJSON; - protected get [id](): number { - return 0x55451FA9; - } - - static get [name](): string { - return "phone.getCallConfig" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Start a telegram phone call */ -export class phone_requestCall_ extends Function_ { - static __F: (params: { video?: true; user_id: enums.InputUser; random_id: number; g_a_hash: Uint8Array; protocol: enums.PhoneCallProtocol }) => enums.phone.PhoneCall; - /** Whether to start a video call */ - video?: true; - /** Destination of the phone call */ - user_id: enums.InputUser; - /** Random ID to avoid resending the same object */ - random_id: number; - /** [Parameter for E2E encryption key exchange »](https://core.telegram.org/api/end-to-end/voice-calls) */ - g_a_hash: Uint8Array; - /** Phone call settings */ - protocol: enums.PhoneCallProtocol; - - protected get [id](): number { - return 0x42FF96ED; - } - - static get [name](): string { - return "phone.requestCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["video", "true", "flags.0?true"], - ["user_id", types._InputUser, "InputUser"], - ["random_id", "number", "int"], - ["g_a_hash", Uint8Array, "bytes"], - ["protocol", types._PhoneCallProtocol, "PhoneCallProtocol"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.video ?? null, "true", "flags.0?true"], - [this.user_id, types._InputUser, "InputUser"], - [this.random_id, "number", "int"], - [this.g_a_hash, Uint8Array, "bytes"], - [this.protocol, types._PhoneCallProtocol, "PhoneCallProtocol"], - ]; - } - - constructor(params: { video?: true; user_id: enums.InputUser; random_id: number; g_a_hash: Uint8Array; protocol: enums.PhoneCallProtocol }) { - super(); - this.video = params.video; - this.user_id = params.user_id; - this.random_id = params.random_id; - this.g_a_hash = params.g_a_hash; - this.protocol = params.protocol; - } -} - -/** Accept incoming call */ -export class phone_acceptCall_ extends Function_ { - static __F: (params: { peer: enums.InputPhoneCall; g_b: Uint8Array; protocol: enums.PhoneCallProtocol }) => enums.phone.PhoneCall; - /** The call to accept */ - peer: enums.InputPhoneCall; - /** [Parameter for E2E encryption key exchange »](https://core.telegram.org/api/end-to-end/voice-calls) */ - g_b: Uint8Array; - /** Phone call settings */ - protocol: enums.PhoneCallProtocol; - - protected get [id](): number { - return 0x3BD2B4A0; - } - - static get [name](): string { - return "phone.acceptCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["g_b", Uint8Array, "bytes"], - ["protocol", types._PhoneCallProtocol, "PhoneCallProtocol"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.g_b, Uint8Array, "bytes"], - [this.protocol, types._PhoneCallProtocol, "PhoneCallProtocol"], - ]; - } - - constructor(params: { peer: enums.InputPhoneCall; g_b: Uint8Array; protocol: enums.PhoneCallProtocol }) { - super(); - this.peer = params.peer; - this.g_b = params.g_b; - this.protocol = params.protocol; - } -} - -/** [Complete phone call E2E encryption key exchange »](https://core.telegram.org/api/end-to-end/voice-calls) */ -export class phone_confirmCall_ extends Function_ { - static __F: (params: { peer: enums.InputPhoneCall; g_a: Uint8Array; key_fingerprint: bigint; protocol: enums.PhoneCallProtocol }) => enums.phone.PhoneCall; - /** The phone call */ - peer: enums.InputPhoneCall; - /** [Parameter for E2E encryption key exchange »](https://core.telegram.org/api/end-to-end/voice-calls) */ - g_a: Uint8Array; - /** Key fingerprint */ - key_fingerprint: bigint; - /** Phone call settings */ - protocol: enums.PhoneCallProtocol; - - protected get [id](): number { - return 0x2EFE1722; - } - - static get [name](): string { - return "phone.confirmCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["g_a", Uint8Array, "bytes"], - ["key_fingerprint", "bigint", "long"], - ["protocol", types._PhoneCallProtocol, "PhoneCallProtocol"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.g_a, Uint8Array, "bytes"], - [this.key_fingerprint, "bigint", "long"], - [this.protocol, types._PhoneCallProtocol, "PhoneCallProtocol"], - ]; - } - - constructor(params: { peer: enums.InputPhoneCall; g_a: Uint8Array; key_fingerprint: bigint; protocol: enums.PhoneCallProtocol }) { - super(); - this.peer = params.peer; - this.g_a = params.g_a; - this.key_fingerprint = params.key_fingerprint; - this.protocol = params.protocol; - } -} - -/** Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended. */ -export class phone_receivedCall_ extends Function_ { - static __F: (params: { peer: enums.InputPhoneCall }) => boolean; - /** The phone call we're currently in */ - peer: enums.InputPhoneCall; - - protected get [id](): number { - return 0x17D54F61; - } - - static get [name](): string { - return "phone.receivedCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - ]; - } - - constructor(params: { peer: enums.InputPhoneCall }) { - super(); - this.peer = params.peer; - } -} - -/** Refuse or end running call */ -export class phone_discardCall_ extends Function_ { - static __F: (params: { video?: true; peer: enums.InputPhoneCall; duration: number; reason: enums.PhoneCallDiscardReason; connection_id: bigint }) => enums.Updates; - /** Whether this is a video call */ - video?: true; - /** The phone call */ - peer: enums.InputPhoneCall; - /** Call duration */ - duration: number; - /** Why was the call discarded */ - reason: enums.PhoneCallDiscardReason; - /** Preferred libtgvoip relay ID */ - connection_id: bigint; - - protected get [id](): number { - return 0xB2CBC1C0; - } - - static get [name](): string { - return "phone.discardCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["video", "true", "flags.0?true"], - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["duration", "number", "int"], - ["reason", types._PhoneCallDiscardReason, "PhoneCallDiscardReason"], - ["connection_id", "bigint", "long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.video ?? null, "true", "flags.0?true"], - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.duration, "number", "int"], - [this.reason, types._PhoneCallDiscardReason, "PhoneCallDiscardReason"], - [this.connection_id, "bigint", "long"], - ]; - } - - constructor(params: { video?: true; peer: enums.InputPhoneCall; duration: number; reason: enums.PhoneCallDiscardReason; connection_id: bigint }) { - super(); - this.video = params.video; - this.peer = params.peer; - this.duration = params.duration; - this.reason = params.reason; - this.connection_id = params.connection_id; - } -} - -/** Rate a call, returns info about the rating message sent to the official VoIP bot. */ -export class phone_setCallRating_ extends Function_ { - static __F: (params: { user_initiative?: true; peer: enums.InputPhoneCall; rating: number; comment: string }) => enums.Updates; - /** Whether the user decided on their own initiative to rate the call */ - user_initiative?: true; - /** The call to rate */ - peer: enums.InputPhoneCall; - /** Rating in `1-5` stars */ - rating: number; - /** An additional comment */ - comment: string; - - protected get [id](): number { - return 0x59EAD627; - } - - static get [name](): string { - return "phone.setCallRating" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["user_initiative", "true", "flags.0?true"], - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["rating", "number", "int"], - ["comment", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.user_initiative ?? null, "true", "flags.0?true"], - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.rating, "number", "int"], - [this.comment, "string", "string"], - ]; - } - - constructor(params: { user_initiative?: true; peer: enums.InputPhoneCall; rating: number; comment: string }) { - super(); - this.user_initiative = params.user_initiative; - this.peer = params.peer; - this.rating = params.rating; - this.comment = params.comment; - } -} - -/** Send phone call debug data to server */ -export class phone_saveCallDebug_ extends Function_ { - static __F: (params: { peer: enums.InputPhoneCall; debug: enums.DataJSON }) => boolean; - /** Phone call */ - peer: enums.InputPhoneCall; - /** Debug statistics obtained from libtgvoip */ - debug: enums.DataJSON; - - protected get [id](): number { - return 0x277ADD7E; - } - - static get [name](): string { - return "phone.saveCallDebug" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["debug", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.debug, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { peer: enums.InputPhoneCall; debug: enums.DataJSON }) { - super(); - this.peer = params.peer; - this.debug = params.debug; - } -} - -/** Send VoIP signaling data */ -export class phone_sendSignalingData_ extends Function_ { - static __F: (params: { peer: enums.InputPhoneCall; data: Uint8Array }) => boolean; - /** Phone call */ - peer: enums.InputPhoneCall; - /** Signaling payload */ - data: Uint8Array; - - protected get [id](): number { - return 0xFF7A9383; - } - - static get [name](): string { - return "phone.sendSignalingData" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["data", Uint8Array, "bytes"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.data, Uint8Array, "bytes"], - ]; - } - - constructor(params: { peer: enums.InputPhoneCall; data: Uint8Array }) { - super(); - this.peer = params.peer; - this.data = params.data; - } -} - -/** Create a group call or livestream */ -export class phone_createGroupCall_ extends Function_ { - static __F: (params: { rtmp_stream?: true; peer: enums.InputPeer; random_id: number; title?: string; schedule_date?: number }) => enums.Updates; - /** Whether RTMP stream support should be enabled: only the [group/supergroup/channel](https://core.telegram.org/api/channel) owner can use this flag. */ - rtmp_stream?: true; - /** Associate the group call or livestream to the provided [group/supergroup/channel](https://core.telegram.org/api/channel) */ - peer: enums.InputPeer; - /** Unique client message ID required to prevent creation of duplicate group calls */ - random_id: number; - /** Call title */ - title?: string; - /** For scheduled group call or livestreams, the absolute date when the group call will start */ - schedule_date?: number; - - protected get [id](): number { - return 0x48CDC6D8; - } - - static get [name](): string { - return "phone.createGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["rtmp_stream", "true", "flags.2?true"], - ["peer", types._InputPeer, "InputPeer"], - ["random_id", "number", "int"], - ["title", "string", "flags.0?string"], - ["schedule_date", "number", "flags.1?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.rtmp_stream ?? null, "true", "flags.2?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.random_id, "number", "int"], - [this.title ?? null, "string", "flags.0?string"], - [this.schedule_date ?? null, "number", "flags.1?int"], - ]; - } - - constructor(params: { rtmp_stream?: true; peer: enums.InputPeer; random_id: number; title?: string; schedule_date?: number }) { - super(); - this.rtmp_stream = params.rtmp_stream; - this.peer = params.peer; - this.random_id = params.random_id; - this.title = params.title; - this.schedule_date = params.schedule_date; - } -} - -/** Join a group call */ -export class phone_joinGroupCall_ extends Function_ { - static __F: (params: { muted?: true; video_stopped?: true; call: enums.InputGroupCall; join_as: enums.InputPeer; invite_hash?: string; params: enums.DataJSON }) => enums.Updates; - /** If set, the user will be muted by default upon joining. */ - muted?: true; - /** If set, the user's video will be disabled by default upon joining. */ - video_stopped?: true; - /** The group call */ - call: enums.InputGroupCall; - /** Join the group call, presenting yourself as the specified user/channel */ - join_as: enums.InputPeer; - /** The invitation hash from the [invite link »](https://core.telegram.org/api/links#video-chat-livestream-links), if provided allows speaking in a livestream or muted group chat. */ - invite_hash?: string; - /** WebRTC parameters */ - params: enums.DataJSON; - - protected get [id](): number { - return 0xB132FF7B; - } - - static get [name](): string { - return "phone.joinGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["muted", "true", "flags.0?true"], - ["video_stopped", "true", "flags.2?true"], - ["call", types._InputGroupCall, "InputGroupCall"], - ["join_as", types._InputPeer, "InputPeer"], - ["invite_hash", "string", "flags.1?string"], - ["params", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.muted ?? null, "true", "flags.0?true"], - [this.video_stopped ?? null, "true", "flags.2?true"], - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.join_as, types._InputPeer, "InputPeer"], - [this.invite_hash ?? null, "string", "flags.1?string"], - [this.params, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { muted?: true; video_stopped?: true; call: enums.InputGroupCall; join_as: enums.InputPeer; invite_hash?: string; params: enums.DataJSON }) { - super(); - this.muted = params.muted; - this.video_stopped = params.video_stopped; - this.call = params.call; - this.join_as = params.join_as; - this.invite_hash = params.invite_hash; - this.params = params.params; - } -} - -/** Leave a group call */ -export class phone_leaveGroupCall_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; source: number }) => enums.Updates; - /** The group call */ - call: enums.InputGroupCall; - /** Your source ID */ - source: number; - - protected get [id](): number { - return 0x500377F9; - } - - static get [name](): string { - return "phone.leaveGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["source", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.source, "number", "int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; source: number }) { - super(); - this.call = params.call; - this.source = params.source; - } -} - -/** Invite a set of users to a group call. */ -export class phone_inviteToGroupCall_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; users: Array }) => enums.Updates; - /** The group call */ - call: enums.InputGroupCall; - /** The users to invite. */ - users: Array; - - protected get [id](): number { - return 0x7B393160; - } - - static get [name](): string { - return "phone.inviteToGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["users", [types._InputUser], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.users, [types._InputUser], "Vector"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; users: Array }) { - super(); - this.call = params.call; - this.users = params.users; - } -} - -/** Terminate a group call */ -export class phone_discardGroupCall_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall }) => enums.Updates; - /** The group call to terminate */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0x7A777135; - } - - static get [name](): string { - return "phone.discardGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - ]; - } - - constructor(params: { call: enums.InputGroupCall }) { - super(); - this.call = params.call; - } -} - -/** Change group call settings */ -export class phone_toggleGroupCallSettings_ extends Function_ { - static __F: (params: { reset_invite_hash?: true; call: enums.InputGroupCall; join_muted?: boolean }) => enums.Updates; - /** Invalidate existing invite links */ - reset_invite_hash?: true; - /** Group call */ - call: enums.InputGroupCall; - /** Whether all users will that join this group call are muted by default upon joining the group call */ - join_muted?: boolean; - - protected get [id](): number { - return 0x74BBB43D; - } - - static get [name](): string { - return "phone.toggleGroupCallSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["reset_invite_hash", "true", "flags.1?true"], - ["call", types._InputGroupCall, "InputGroupCall"], - ["join_muted", "boolean", "flags.0?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.reset_invite_hash ?? null, "true", "flags.1?true"], - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.join_muted ?? null, "boolean", "flags.0?Bool"], - ]; - } - - constructor(params: { reset_invite_hash?: true; call: enums.InputGroupCall; join_muted?: boolean }) { - super(); - this.reset_invite_hash = params.reset_invite_hash; - this.call = params.call; - this.join_muted = params.join_muted; - } -} - -/** Get info about a group call */ -export class phone_getGroupCall_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; limit: number }) => enums.phone.GroupCall; - /** The group call */ - call: enums.InputGroupCall; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x041845DB; - } - - static get [name](): string { - return "phone.getGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; limit: number }) { - super(); - this.call = params.call; - this.limit = params.limit; - } -} - -/** Get group call participants */ -export class phone_getGroupParticipants_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; ids: Array; sources: Array; offset: string; limit: number }) => enums.phone.GroupParticipants; - /** Group call */ - call: enums.InputGroupCall; - /** If specified, will fetch group participant info about the specified peers */ - ids: Array; - /** If specified, will fetch group participant info about the specified WebRTC source IDs */ - sources: Array; - /** Offset for results, taken from the `next_offset` field of [phone.groupParticipants](https://core.telegram.org/constructor/phone.groupParticipants), initially an empty string. - Note: if no more results are available, the method call will return an empty `next_offset`; thus, avoid providing the `next_offset` returned in [phone.groupParticipants](https://core.telegram.org/constructor/phone.groupParticipants) if it is empty, to avoid an infinite loop. */ - offset: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xC558D8AB; - } - - static get [name](): string { - return "phone.getGroupParticipants" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["ids", [types._InputPeer], "Vector"], - ["sources", ["number"], "Vector"], - ["offset", "string", "string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.ids, [types._InputPeer], "Vector"], - [this.sources, ["number"], "Vector"], - [this.offset, "string", "string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; ids: Array; sources: Array; offset: string; limit: number }) { - super(); - this.call = params.call; - this.ids = params.ids; - this.sources = params.sources; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs. -Returns an intersection of the source IDs specified in `sources`, and the source IDs currently being forwarded by the SFU. */ -export class phone_checkGroupCall_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; sources: Array }) => number[]; - /** Group call */ - call: enums.InputGroupCall; - /** Source IDs */ - sources: Array; - - protected get [id](): number { - return 0xB59CF977; - } - - static get [name](): string { - return "phone.checkGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["sources", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.sources, ["number"], "Vector"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; sources: Array }) { - super(); - this.call = params.call; - this.sources = params.sources; - } -} - -/** Start or stop recording a group call: the recorded audio and video streams will be automatically sent to `Saved messages` (the chat with ourselves). */ -export class phone_toggleGroupCallRecord_ extends Function_ { - static __F: (params: { start?: true; video?: true; call: enums.InputGroupCall; title?: string; video_portrait?: boolean }) => enums.Updates; - /** Whether to start or stop recording */ - start?: true; - /** Whether to also record video streams */ - video?: true; - /** The group call or livestream */ - call: enums.InputGroupCall; - /** Recording title */ - title?: string; - /** If video stream recording is enabled, whether to record in portrait or landscape mode */ - video_portrait?: boolean; - - protected get [id](): number { - return 0xF128C708; - } - - static get [name](): string { - return "phone.toggleGroupCallRecord" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["start", "true", "flags.0?true"], - ["video", "true", "flags.2?true"], - ["call", types._InputGroupCall, "InputGroupCall"], - ["title", "string", "flags.1?string"], - ["video_portrait", "boolean", "flags.2?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.start ?? null, "true", "flags.0?true"], - [this.video ?? null, "true", "flags.2?true"], - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.title ?? null, "string", "flags.1?string"], - [this.video_portrait ?? null, "boolean", "flags.2?Bool"], - ]; - } - - constructor(params: { start?: true; video?: true; call: enums.InputGroupCall; title?: string; video_portrait?: boolean }) { - super(); - this.start = params.start; - this.video = params.video; - this.call = params.call; - this.title = params.title; - this.video_portrait = params.video_portrait; - } -} - -/** Edit information about a given group call participant */ -export class phone_editGroupCallParticipant_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; participant: enums.InputPeer; muted?: boolean; volume?: number; raise_hand?: boolean; video_stopped?: boolean; video_paused?: boolean; presentation_paused?: boolean }) => enums.Updates; - /** The group call */ - call: enums.InputGroupCall; - /** The group call participant (can also be the user itself) */ - participant: enums.InputPeer; - /** Whether to mute or unmute the specified participant */ - muted?: boolean; - /** New volume */ - volume?: number; - /** Raise or lower hand */ - raise_hand?: boolean; - /** Start or stop the video stream */ - video_stopped?: boolean; - /** Pause or resume the video stream */ - video_paused?: boolean; - /** Pause or resume the screen sharing stream */ - presentation_paused?: boolean; - - protected get [id](): number { - return 0xA5273ABF; - } - - static get [name](): string { - return "phone.editGroupCallParticipant" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["call", types._InputGroupCall, "InputGroupCall"], - ["participant", types._InputPeer, "InputPeer"], - ["muted", "boolean", "flags.0?Bool"], - ["volume", "number", "flags.1?int"], - ["raise_hand", "boolean", "flags.2?Bool"], - ["video_stopped", "boolean", "flags.3?Bool"], - ["video_paused", "boolean", "flags.4?Bool"], - ["presentation_paused", "boolean", "flags.5?Bool"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.participant, types._InputPeer, "InputPeer"], - [this.muted ?? null, "boolean", "flags.0?Bool"], - [this.volume ?? null, "number", "flags.1?int"], - [this.raise_hand ?? null, "boolean", "flags.2?Bool"], - [this.video_stopped ?? null, "boolean", "flags.3?Bool"], - [this.video_paused ?? null, "boolean", "flags.4?Bool"], - [this.presentation_paused ?? null, "boolean", "flags.5?Bool"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; participant: enums.InputPeer; muted?: boolean; volume?: number; raise_hand?: boolean; video_stopped?: boolean; video_paused?: boolean; presentation_paused?: boolean }) { - super(); - this.call = params.call; - this.participant = params.participant; - this.muted = params.muted; - this.volume = params.volume; - this.raise_hand = params.raise_hand; - this.video_stopped = params.video_stopped; - this.video_paused = params.video_paused; - this.presentation_paused = params.presentation_paused; - } -} - -/** Edit the title of a group call or livestream */ -export class phone_editGroupCallTitle_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; title: string }) => enums.Updates; - /** Group call */ - call: enums.InputGroupCall; - /** New title */ - title: string; - - protected get [id](): number { - return 0x1CA6AC0A; - } - - static get [name](): string { - return "phone.editGroupCallTitle" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["title", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.title, "string", "string"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; title: string }) { - super(); - this.call = params.call; - this.title = params.title; - } -} - -/** Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel. */ -export class phone_getGroupCallJoinAs_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.phone.JoinAsPeers; - /** The dialog whose group call or livestream we're trying to join */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xEF7C213A; - } - - static get [name](): string { - return "phone.getGroupCallJoinAs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Get an [invite link](https://core.telegram.org/api/links#video-chat-livestream-links) for a group call or livestream */ -export class phone_exportGroupCallInvite_ extends Function_ { - static __F: (params: { can_self_unmute?: true; call: enums.InputGroupCall }) => enums.phone.ExportedGroupCallInvite; - /** For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand). */ - can_self_unmute?: true; - /** The group call */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0xE6AA647F; - } - - static get [name](): string { - return "phone.exportGroupCallInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["can_self_unmute", "true", "flags.0?true"], - ["call", types._InputGroupCall, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.can_self_unmute ?? null, "true", "flags.0?true"], - [this.call, types._InputGroupCall, "InputGroupCall"], - ]; - } - - constructor(params: { can_self_unmute?: true; call: enums.InputGroupCall }) { - super(); - this.can_self_unmute = params.can_self_unmute; - this.call = params.call; - } -} - -/** Subscribe or unsubscribe to a scheduled group call */ -export class phone_toggleGroupCallStartSubscription_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; subscribed: boolean }) => enums.Updates; - /** Scheduled group call */ - call: enums.InputGroupCall; - /** Enable or disable subscription */ - subscribed: boolean; - - protected get [id](): number { - return 0x219C34E6; - } - - static get [name](): string { - return "phone.toggleGroupCallStartSubscription" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["subscribed", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.subscribed, "boolean", "Bool"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; subscribed: boolean }) { - super(); - this.call = params.call; - this.subscribed = params.subscribed; - } -} - -/** Start a scheduled group call. */ -export class phone_startScheduledGroupCall_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall }) => enums.Updates; - /** The scheduled group call */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0x5680E342; - } - - static get [name](): string { - return "phone.startScheduledGroupCall" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - ]; - } - - constructor(params: { call: enums.InputGroupCall }) { - super(); - this.call = params.call; - } -} - -/** Set the default peer that will be used to join a group call in a specific dialog. */ -export class phone_saveDefaultGroupCallJoinAs_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; join_as: enums.InputPeer }) => boolean; - /** The dialog */ - peer: enums.InputPeer; - /** The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel. */ - join_as: enums.InputPeer; - - protected get [id](): number { - return 0x575E1F8C; - } - - static get [name](): string { - return "phone.saveDefaultGroupCallJoinAs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["join_as", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.join_as, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer; join_as: enums.InputPeer }) { - super(); - this.peer = params.peer; - this.join_as = params.join_as; - } -} - -/** Start screen sharing in a call */ -export class phone_joinGroupCallPresentation_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall; params: enums.DataJSON }) => enums.Updates; - /** The group call */ - call: enums.InputGroupCall; - /** WebRTC parameters */ - params: enums.DataJSON; - - protected get [id](): number { - return 0xCBEA6BC4; - } - - static get [name](): string { - return "phone.joinGroupCallPresentation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ["params", types._DataJSON, "DataJSON"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - [this.params, types._DataJSON, "DataJSON"], - ]; - } - - constructor(params: { call: enums.InputGroupCall; params: enums.DataJSON }) { - super(); - this.call = params.call; - this.params = params.params; - } -} - -/** Stop screen sharing in a group call */ -export class phone_leaveGroupCallPresentation_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall }) => enums.Updates; - /** The group call */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0x1C50D144; - } - - static get [name](): string { - return "phone.leaveGroupCallPresentation" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - ]; - } - - constructor(params: { call: enums.InputGroupCall }) { - super(); - this.call = params.call; - } -} - -/** Get info about RTMP streams in a group call or livestream. -This method should be invoked to the same group/channel-related DC used for [downloading livestream chunks](https://core.telegram.org/api/files#downloading-files). -As usual, the media DC is preferred, if available. */ -export class phone_getGroupCallStreamChannels_ extends Function_ { - static __F: (params: { call: enums.InputGroupCall }) => enums.phone.GroupCallStreamChannels; - /** Group call or livestream */ - call: enums.InputGroupCall; - - protected get [id](): number { - return 0x1AB21940; - } - - static get [name](): string { - return "phone.getGroupCallStreamChannels" - } - - static get [paramDesc](): ParamDesc { - return [ - ["call", types._InputGroupCall, "InputGroupCall"], - ]; - } - - protected get [params](): Params { - return [ - [this.call, types._InputGroupCall, "InputGroupCall"], - ]; - } - - constructor(params: { call: enums.InputGroupCall }) { - super(); - this.call = params.call; - } -} - -/** Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with [phone.createGroupCall](https://core.telegram.org/method/phone.createGroupCall) (the `rtmp_stream` flag must be set). */ -export class phone_getGroupCallStreamRtmpUrl_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; revoke: boolean }) => enums.phone.GroupCallStreamRtmpUrl; - /** Peer to livestream into */ - peer: enums.InputPeer; - /** Whether to revoke the previous stream key or simply return the existing one */ - revoke: boolean; - - protected get [id](): number { - return 0xDEB3ABBF; - } - - static get [name](): string { - return "phone.getGroupCallStreamRtmpUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["revoke", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.revoke, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; revoke: boolean }) { - super(); - this.peer = params.peer; - this.revoke = params.revoke; - } -} - -/** Save phone call debug information */ -export class phone_saveCallLog_ extends Function_ { - static __F: (params: { peer: enums.InputPhoneCall; file: enums.InputFile }) => boolean; - /** Phone call */ - peer: enums.InputPhoneCall; - /** Logs */ - file: enums.InputFile; - - protected get [id](): number { - return 0x41248786; - } - - static get [name](): string { - return "phone.saveCallLog" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPhoneCall, "InputPhoneCall"], - ["file", types._InputFile, "InputFile"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPhoneCall, "InputPhoneCall"], - [this.file, types._InputFile, "InputFile"], - ]; - } - - constructor(params: { peer: enums.InputPhoneCall; file: enums.InputFile }) { - super(); - this.peer = params.peer; - this.file = params.file; - } -} - -/** Get localization pack strings */ -export class langpack_getLangPack_ extends Function_ { - static __F: (params: { lang_pack: string; lang_code: string }) => enums.LangPackDifference; - /** Language pack name, usually obtained from a [language pack link](https://core.telegram.org/api/links#language-pack-links) */ - lang_pack: string; - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0xF2F2330A; - } - - static get [name](): string { - return "langpack.getLangPack" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_pack", "string", "string"], - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_pack, "string", "string"], - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { lang_pack: string; lang_code: string }) { - super(); - this.lang_pack = params.lang_pack; - this.lang_code = params.lang_code; - } -} - -/** Get strings from a language pack */ -export class langpack_getStrings_ extends Function_ { - static __F: (params: { lang_pack: string; lang_code: string; keys: Array }) => enums.LangPackString[]; - /** Language pack name, usually obtained from a [language pack link](https://core.telegram.org/api/links#language-pack-links) */ - lang_pack: string; - /** Language code */ - lang_code: string; - /** Strings to get */ - keys: Array; - - protected get [id](): number { - return 0xEFEA3803; - } - - static get [name](): string { - return "langpack.getStrings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_pack", "string", "string"], - ["lang_code", "string", "string"], - ["keys", ["string"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_pack, "string", "string"], - [this.lang_code, "string", "string"], - [this.keys, ["string"], "Vector"], - ]; - } - - constructor(params: { lang_pack: string; lang_code: string; keys: Array }) { - super(); - this.lang_pack = params.lang_pack; - this.lang_code = params.lang_code; - this.keys = params.keys; - } -} - -/** Get new strings in language pack */ -export class langpack_getDifference_ extends Function_ { - static __F: (params: { lang_pack: string; lang_code: string; from_version: number }) => enums.LangPackDifference; - /** Language pack */ - lang_pack: string; - /** Language code */ - lang_code: string; - /** Previous localization pack version */ - from_version: number; - - protected get [id](): number { - return 0xCD984AA5; - } - - static get [name](): string { - return "langpack.getDifference" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_pack", "string", "string"], - ["lang_code", "string", "string"], - ["from_version", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_pack, "string", "string"], - [this.lang_code, "string", "string"], - [this.from_version, "number", "int"], - ]; - } - - constructor(params: { lang_pack: string; lang_code: string; from_version: number }) { - super(); - this.lang_pack = params.lang_pack; - this.lang_code = params.lang_code; - this.from_version = params.from_version; - } -} - -/** Get information about all languages in a localization pack */ -export class langpack_getLanguages_ extends Function_ { - static __F: (params: { lang_pack: string }) => enums.LangPackLanguage[]; - /** Language pack */ - lang_pack: string; - - protected get [id](): number { - return 0x42C6978F; - } - - static get [name](): string { - return "langpack.getLanguages" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_pack", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_pack, "string", "string"], - ]; - } - - constructor(params: { lang_pack: string }) { - super(); - this.lang_pack = params.lang_pack; - } -} - -/** Get information about a language in a localization pack */ -export class langpack_getLanguage_ extends Function_ { - static __F: (params: { lang_pack: string; lang_code: string }) => enums.LangPackLanguage; - /** Language pack name, usually obtained from a [language pack link](https://core.telegram.org/api/links#language-pack-links) */ - lang_pack: string; - /** Language code */ - lang_code: string; - - protected get [id](): number { - return 0x6A596502; - } - - static get [name](): string { - return "langpack.getLanguage" - } - - static get [paramDesc](): ParamDesc { - return [ - ["lang_pack", "string", "string"], - ["lang_code", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.lang_pack, "string", "string"], - [this.lang_code, "string", "string"], - ]; - } - - constructor(params: { lang_pack: string; lang_code: string }) { - super(); - this.lang_pack = params.lang_pack; - this.lang_code = params.lang_code; - } -} - -/** Edit peers in [peer folder](https://core.telegram.org/api/folders#peer-folders) */ -export class folders_editPeerFolders_ extends Function_ { - static __F: (params: { folder_peers: Array }) => enums.Updates; - /** New peer list */ - folder_peers: Array; - - protected get [id](): number { - return 0x6847D0AB; - } - - static get [name](): string { - return "folders.editPeerFolders" - } - - static get [paramDesc](): ParamDesc { - return [ - ["folder_peers", [types._InputFolderPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.folder_peers, [types._InputFolderPeer], "Vector"], - ]; - } - - constructor(params: { folder_peers: Array }) { - super(); - this.folder_peers = params.folder_peers; - } -} - -/** Get [channel statistics](https://core.telegram.org/api/stats) */ -export class stats_getBroadcastStats_ extends Function_ { - static __F: (params: { dark?: true; channel: enums.InputChannel }) => enums.stats.BroadcastStats; - /** Whether to enable dark theme for graph colors */ - dark?: true; - /** The channel */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0xAB42441A; - } - - static get [name](): string { - return "stats.getBroadcastStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { dark?: true; channel: enums.InputChannel }) { - super(); - this.dark = params.dark; - this.channel = params.channel; - } -} - -/** Load [channel statistics graph](https://core.telegram.org/api/stats) asynchronously */ -export class stats_loadAsyncGraph_ extends Function_ { - static __F: (params: { token: string; x?: bigint }) => enums.StatsGraph; - /** Graph token from [statsGraphAsync](https://core.telegram.org/constructor/statsGraphAsync) constructor */ - token: string; - /** Zoom value, if required */ - x?: bigint; - - protected get [id](): number { - return 0x621D5FA0; - } - - static get [name](): string { - return "stats.loadAsyncGraph" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["token", "string", "string"], - ["x", "bigint", "flags.0?long"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.token, "string", "string"], - [this.x ?? null, "bigint", "flags.0?long"], - ]; - } - - constructor(params: { token: string; x?: bigint }) { - super(); - this.token = params.token; - this.x = params.x; - } -} - -/** Get [supergroup statistics](https://core.telegram.org/api/stats) */ -export class stats_getMegagroupStats_ extends Function_ { - static __F: (params: { dark?: true; channel: enums.InputChannel }) => enums.stats.MegagroupStats; - /** Whether to enable dark theme for graph colors */ - dark?: true; - /** [Supergroup ID](https://core.telegram.org/api/channel) */ - channel: enums.InputChannel; - - protected get [id](): number { - return 0xDCDF8607; - } - - static get [name](): string { - return "stats.getMegagroupStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { dark?: true; channel: enums.InputChannel }) { - super(); - this.dark = params.dark; - this.channel = params.channel; - } -} - -/** Obtains a list of messages, indicating to which other public channels was a channel message forwarded. -Will return a list of [messages](https://core.telegram.org/constructor/message) with `peer_id` equal to the public channel to which this message was forwarded. */ -export class stats_getMessagePublicForwards_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; msg_id: number; offset: string; limit: number }) => enums.stats.PublicForwards; - /** Source channel */ - channel: enums.InputChannel; - /** Source message ID */ - msg_id: number; - /** Offset for [pagination](https://core.telegram.org/api/offsets), empty string on first call, then use the `next_offset` field of the returned constructor (if present, otherwise no more results are available). */ - offset: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x5F150144; - } - - static get [name](): string { - return "stats.getMessagePublicForwards" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["msg_id", "number", "int"], - ["offset", "string", "string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.msg_id, "number", "int"], - [this.offset, "string", "string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; msg_id: number; offset: string; limit: number }) { - super(); - this.channel = params.channel; - this.msg_id = params.msg_id; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Get [message statistics](https://core.telegram.org/api/stats) */ -export class stats_getMessageStats_ extends Function_ { - static __F: (params: { dark?: true; channel: enums.InputChannel; msg_id: number }) => enums.stats.MessageStats; - /** Whether to enable dark theme for graph colors */ - dark?: true; - /** Channel ID */ - channel: enums.InputChannel; - /** Message ID */ - msg_id: number; - - protected get [id](): number { - return 0xB6E0A3F5; - } - - static get [name](): string { - return "stats.getMessageStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ["msg_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - [this.msg_id, "number", "int"], - ]; - } - - constructor(params: { dark?: true; channel: enums.InputChannel; msg_id: number }) { - super(); - this.dark = params.dark; - this.channel = params.channel; - this.msg_id = params.msg_id; - } -} - -/** Get [statistics](https://core.telegram.org/api/stats) for a certain [story](https://core.telegram.org/api/stories). */ -export class stats_getStoryStats_ extends Function_ { - static __F: (params: { dark?: true; peer: enums.InputPeer; id: number }) => enums.stats.StoryStats; - /** Whether to enable the dark theme for graph colors */ - dark?: true; - /** The peer that posted the story */ - peer: enums.InputPeer; - /** Story ID */ - id: number; - - protected get [id](): number { - return 0x374FEF40; - } - - static get [name](): string { - return "stats.getStoryStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { dark?: true; peer: enums.InputPeer; id: number }) { - super(); - this.dark = params.dark; - this.peer = params.peer; - this.id = params.id; - } -} - -/** Obtain forwards of a [story](https://core.telegram.org/api/stories) as a message to public chats and reposts by public channels. */ -export class stats_getStoryPublicForwards_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number; offset: string; limit: number }) => enums.stats.PublicForwards; - /** Peer where the story was originally posted */ - peer: enums.InputPeer; - /** [Story](https://core.telegram.org/api/stories) ID */ - id: number; - /** Offset for pagination, from [stats.PublicForwards](https://core.telegram.org/constructor/stats.publicForwards).`next_offset`. */ - offset: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xA6437EF6; - } - - static get [name](): string { - return "stats.getStoryPublicForwards" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["offset", "string", "string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.offset, "string", "string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number; offset: string; limit: number }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.offset = params.offset; - this.limit = params.limit; - } -} - -export class stats_getBroadcastRevenueStats_ extends Function_ { - static __F: (params: { dark?: true; channel: enums.InputChannel }) => enums.stats.BroadcastRevenueStats; - dark?: true; - channel: enums.InputChannel; - - protected get [id](): number { - return 0x75DFB671; - } - - static get [name](): string { - return "stats.getBroadcastRevenueStats" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["dark", "true", "flags.0?true"], - ["channel", types._InputChannel, "InputChannel"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.dark ?? null, "true", "flags.0?true"], - [this.channel, types._InputChannel, "InputChannel"], - ]; - } - - constructor(params: { dark?: true; channel: enums.InputChannel }) { - super(); - this.dark = params.dark; - this.channel = params.channel; - } -} - -export class stats_getBroadcastRevenueWithdrawalUrl_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; password: enums.InputCheckPasswordSRP }) => enums.stats.BroadcastRevenueWithdrawalUrl; - channel: enums.InputChannel; - password: enums.InputCheckPasswordSRP; - - protected get [id](): number { - return 0x2A65EF73; - } - - static get [name](): string { - return "stats.getBroadcastRevenueWithdrawalUrl" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["password", types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.password, types._InputCheckPasswordSRP, "InputCheckPasswordSRP"], - ]; - } - - constructor(params: { channel: enums.InputChannel; password: enums.InputCheckPasswordSRP }) { - super(); - this.channel = params.channel; - this.password = params.password; - } -} - -export class stats_getBroadcastRevenueTransactions_ extends Function_ { - static __F: (params: { channel: enums.InputChannel; offset: number; limit: number }) => enums.stats.BroadcastRevenueTransactions; - channel: enums.InputChannel; - offset: number; - limit: number; - - protected get [id](): number { - return 0x0069280F; - } - - static get [name](): string { - return "stats.getBroadcastRevenueTransactions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["channel", types._InputChannel, "InputChannel"], - ["offset", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.channel, types._InputChannel, "InputChannel"], - [this.offset, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { channel: enums.InputChannel; offset: number; limit: number }) { - super(); - this.channel = params.channel; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Export a [folder »](https://core.telegram.org/api/folders), creating a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_exportChatlistInvite_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist; title: string; peers: Array }) => enums.chatlists.ExportedChatlistInvite; - /** The folder to export */ - chatlist: enums.InputChatlist; - /** An optional name for the link */ - title: string; - /** The list of channels, group and supergroups to share with the link. Basic groups will automatically be [converted to supergroups](https://core.telegram.org/api/channel#migration) when invoking the method. */ - peers: Array; - - protected get [id](): number { - return 0x8472478E; - } - - static get [name](): string { - return "chatlists.exportChatlistInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ["title", "string", "string"], - ["peers", [types._InputPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - [this.title, "string", "string"], - [this.peers, [types._InputPeer], "Vector"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist; title: string; peers: Array }) { - super(); - this.chatlist = params.chatlist; - this.title = params.title; - this.peers = params.peers; - } -} - -/** Delete a previously created [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_deleteExportedInvite_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist; slug: string }) => boolean; - /** The related folder */ - chatlist: enums.InputChatlist; - /** `slug` obtained from the [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - slug: string; - - protected get [id](): number { - return 0x719C5C5E; - } - - static get [name](): string { - return "chatlists.deleteExportedInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - [this.slug, "string", "string"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist; slug: string }) { - super(); - this.chatlist = params.chatlist; - this.slug = params.slug; - } -} - -/** Edit a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_editExportedInvite_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist; slug: string; title?: string; peers?: Array }) => enums.ExportedChatlistInvite; - /** Folder ID */ - chatlist: enums.InputChatlist; - /** `slug` obtained from the [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - slug: string; - /** If set, sets a new name for the link */ - title?: string; - /** If set, changes the list of peers shared with the link */ - peers?: Array; - - protected get [id](): number { - return 0x653DB63D; - } - - static get [name](): string { - return "chatlists.editExportedInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["chatlist", types._InputChatlist, "InputChatlist"], - ["slug", "string", "string"], - ["title", "string", "flags.1?string"], - ["peers", [types._InputPeer], "flags.2?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.chatlist, types._InputChatlist, "InputChatlist"], - [this.slug, "string", "string"], - [this.title ?? null, "string", "flags.1?string"], - [this.peers ?? null, [types._InputPeer], "flags.2?Vector"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist; slug: string; title?: string; peers?: Array }) { - super(); - this.chatlist = params.chatlist; - this.slug = params.slug; - this.title = params.title; - this.peers = params.peers; - } -} - -/** List all [chat folder deep links »](https://core.telegram.org/api/links#chat-folder-links) associated to a folder */ -export class chatlists_getExportedInvites_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist }) => enums.chatlists.ExportedInvites; - /** The folder */ - chatlist: enums.InputChatlist; - - protected get [id](): number { - return 0xCE03DA83; - } - - static get [name](): string { - return "chatlists.getExportedInvites" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist }) { - super(); - this.chatlist = params.chatlist; - } -} - -/** Obtain information about a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_checkChatlistInvite_ extends Function_ { - static __F: (params: { slug: string }) => enums.chatlists.ChatlistInvite; - /** `slug` obtained from the [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links) */ - slug: string; - - protected get [id](): number { - return 0x41C10FFF; - } - - static get [name](): string { - return "chatlists.checkChatlistInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - ]; - } - - constructor(params: { slug: string }) { - super(); - this.slug = params.slug; - } -} - -/** Import a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links), joining some or all the chats in the folder. */ -export class chatlists_joinChatlistInvite_ extends Function_ { - static __F: (params: { slug: string; peers: Array }) => enums.Updates; - /** `slug` obtained from a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ - slug: string; - /** List of new chats to join, fetched using [chatlists.checkChatlistInvite](https://core.telegram.org/method/chatlists.checkChatlistInvite) and filtered as specified in the [documentation »](https://core.telegram.org/api/folders#shared-folders). */ - peers: Array; - - protected get [id](): number { - return 0xA6B1E39A; - } - - static get [name](): string { - return "chatlists.joinChatlistInvite" - } - - static get [paramDesc](): ParamDesc { - return [ - ["slug", "string", "string"], - ["peers", [types._InputPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.slug, "string", "string"], - [this.peers, [types._InputPeer], "Vector"], - ]; - } - - constructor(params: { slug: string; peers: Array }) { - super(); - this.slug = params.slug; - this.peers = params.peers; - } -} - -/** Fetch new chats associated with an imported [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). Must be invoked at most every `chatlist_update_period` seconds (as per the related [client configuration parameter »](https://core.telegram.org/api/config#chatlist-update-period)). */ -export class chatlists_getChatlistUpdates_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist }) => enums.chatlists.ChatlistUpdates; - /** The folder */ - chatlist: enums.InputChatlist; - - protected get [id](): number { - return 0x89419521; - } - - static get [name](): string { - return "chatlists.getChatlistUpdates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist }) { - super(); - this.chatlist = params.chatlist; - } -} - -/** Join channels and supergroups recently added to a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_joinChatlistUpdates_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist; peers: Array }) => enums.Updates; - /** The folder */ - chatlist: enums.InputChatlist; - /** List of new chats to join, fetched using [chatlists.getChatlistUpdates](https://core.telegram.org/method/chatlists.getChatlistUpdates) and filtered as specified in the [documentation »](https://core.telegram.org/api/folders#shared-folders). */ - peers: Array; - - protected get [id](): number { - return 0xE089F8F5; - } - - static get [name](): string { - return "chatlists.joinChatlistUpdates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ["peers", [types._InputPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - [this.peers, [types._InputPeer], "Vector"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist; peers: Array }) { - super(); - this.chatlist = params.chatlist; - this.peers = params.peers; - } -} - -/** Dismiss new pending peers recently added to a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links). */ -export class chatlists_hideChatlistUpdates_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist }) => boolean; - /** The folder */ - chatlist: enums.InputChatlist; - - protected get [id](): number { - return 0x66E486FB; - } - - static get [name](): string { - return "chatlists.hideChatlistUpdates" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist }) { - super(); - this.chatlist = params.chatlist; - } -} - -/** Returns identifiers of pinned or always included chats from a chat folder imported using a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links), which are suggested to be left when the chat folder is deleted. */ -export class chatlists_getLeaveChatlistSuggestions_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist }) => enums.Peer[]; - /** Folder ID */ - chatlist: enums.InputChatlist; - - protected get [id](): number { - return 0xFDBCD714; - } - - static get [name](): string { - return "chatlists.getLeaveChatlistSuggestions" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist }) { - super(); - this.chatlist = params.chatlist; - } -} - -/** Delete a folder imported using a [chat folder deep link »](https://core.telegram.org/api/links#chat-folder-links) */ -export class chatlists_leaveChatlist_ extends Function_ { - static __F: (params: { chatlist: enums.InputChatlist; peers: Array }) => enums.Updates; - /** Folder ID */ - chatlist: enums.InputChatlist; - /** Also leave the specified channels and groups */ - peers: Array; - - protected get [id](): number { - return 0x74FAE13A; - } - - static get [name](): string { - return "chatlists.leaveChatlist" - } - - static get [paramDesc](): ParamDesc { - return [ - ["chatlist", types._InputChatlist, "InputChatlist"], - ["peers", [types._InputPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.chatlist, types._InputChatlist, "InputChatlist"], - [this.peers, [types._InputPeer], "Vector"], - ]; - } - - constructor(params: { chatlist: enums.InputChatlist; peers: Array }) { - super(); - this.chatlist = params.chatlist; - this.peers = params.peers; - } -} - -/** Check whether we can post stories as the specified peer. */ -export class stories_canSendStory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => boolean; - /** The peer from which we wish to post stories. */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0xC7DFDFDD; - } - - static get [name](): string { - return "stories.canSendStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Uploads a [Telegram Story](https://core.telegram.org/api/stories). */ -export class stories_sendStory_ extends Function_ { - static __F: (params: { pinned?: true; noforwards?: true; fwd_modified?: true; peer: enums.InputPeer; media: enums.InputMedia; media_areas?: Array; caption?: string; entities?: Array; privacy_rules: Array; random_id: bigint; period?: number; fwd_from_id?: enums.InputPeer; fwd_from_story?: number }) => enums.Updates; - /** Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see [here »](https://core.telegram.org/api/stories) for more info. */ - pinned?: true; - /** If set, disables forwards, screenshots, and downloads. */ - noforwards?: true; - /** Set this flag when reposting stories with `fwd_from_id`+`fwd_from_id`, if the `media` was modified before reposting. */ - fwd_modified?: true; - /** The peer to send the story as. */ - peer: enums.InputPeer; - /** The story media. */ - media: enums.InputMedia; - /** [Media areas](https://core.telegram.org/api/stories#media-areas) associated to the story, see [here »](https://core.telegram.org/api/stories#media-areas) for more info. */ - media_areas?: Array; - /** Story caption. */ - caption?: string; - /** [Message entities for styled text](https://core.telegram.org/api/entities), if allowed by the [`stories_entities` client configuration parameter »](https://core.telegram.org/api/config#stories-entities). */ - entities?: Array; - /** [Privacy rules](https://core.telegram.org/api/privacy) for the story, indicating who can or can't view the story. */ - privacy_rules: Array; - /** Unique client message ID required to prevent message resending. */ - random_id: bigint; - /** Period after which the story is moved to archive (and to the profile if `pinned` is set), in seconds; must be one of `6 * 3600`, `12 * 3600`, `86400`, or `2 * 86400` for Telegram Premium users, and `86400` otherwise. */ - period?: number; - /** If set, indicates that this story is a repost of story with ID `fwd_from_story` posted by the peer in `fwd_from_id`. */ - fwd_from_id?: enums.InputPeer; - /** If set, indicates that this story is a repost of story with ID `fwd_from_story` posted by the peer in `fwd_from_id`. */ - fwd_from_story?: number; - - protected get [id](): number { - return 0xE4E6694B; - } - - static get [name](): string { - return "stories.sendStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["pinned", "true", "flags.2?true"], - ["noforwards", "true", "flags.4?true"], - ["fwd_modified", "true", "flags.7?true"], - ["peer", types._InputPeer, "InputPeer"], - ["media", types._InputMedia, "InputMedia"], - ["media_areas", [types._MediaArea], "flags.5?Vector"], - ["caption", "string", "flags.0?string"], - ["entities", [types._MessageEntity], "flags.1?Vector"], - ["privacy_rules", [types._InputPrivacyRule], "Vector"], - ["random_id", "bigint", "long"], - ["period", "number", "flags.3?int"], - ["fwd_from_id", types._InputPeer, "flags.6?InputPeer"], - ["fwd_from_story", "number", "flags.6?int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.pinned ?? null, "true", "flags.2?true"], - [this.noforwards ?? null, "true", "flags.4?true"], - [this.fwd_modified ?? null, "true", "flags.7?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.media, types._InputMedia, "InputMedia"], - [this.media_areas ?? null, [types._MediaArea], "flags.5?Vector"], - [this.caption ?? null, "string", "flags.0?string"], - [this.entities ?? null, [types._MessageEntity], "flags.1?Vector"], - [this.privacy_rules, [types._InputPrivacyRule], "Vector"], - [this.random_id, "bigint", "long"], - [this.period ?? null, "number", "flags.3?int"], - [this.fwd_from_id ?? null, types._InputPeer, "flags.6?InputPeer"], - [this.fwd_from_story ?? null, "number", "flags.6?int"], - ]; - } - - constructor(params: { pinned?: true; noforwards?: true; fwd_modified?: true; peer: enums.InputPeer; media: enums.InputMedia; media_areas?: Array; caption?: string; entities?: Array; privacy_rules: Array; random_id: bigint; period?: number; fwd_from_id?: enums.InputPeer; fwd_from_story?: number }) { - super(); - this.pinned = params.pinned; - this.noforwards = params.noforwards; - this.fwd_modified = params.fwd_modified; - this.peer = params.peer; - this.media = params.media; - this.media_areas = params.media_areas; - this.caption = params.caption; - this.entities = params.entities; - this.privacy_rules = params.privacy_rules; - this.random_id = params.random_id; - this.period = params.period; - this.fwd_from_id = params.fwd_from_id; - this.fwd_from_story = params.fwd_from_story; - } -} - -/** Edit an uploaded [story](https://core.telegram.org/api/stories) */ -export class stories_editStory_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number; media?: enums.InputMedia; media_areas?: Array; caption?: string; entities?: Array; privacy_rules?: Array }) => enums.Updates; - /** Peer where the story was posted. */ - peer: enums.InputPeer; - /** ID of story to edit. */ - id: number; - /** If specified, replaces the story media. */ - media?: enums.InputMedia; - /** [Media areas](https://core.telegram.org/api/stories#media-areas) associated to the story, see [here »](https://core.telegram.org/api/stories#media-areas) for more info. */ - media_areas?: Array; - /** If specified, replaces the story caption. */ - caption?: string; - /** [Message entities for styled text in the caption](https://core.telegram.org/api/entities), if allowed by the [`stories_entities` client configuration parameter »](https://core.telegram.org/api/config#stories-entities). */ - entities?: Array; - /** If specified, alters the [privacy settings »](https://core.telegram.org/api/privacy) of the story, changing who can or can't view the story. */ - privacy_rules?: Array; - - protected get [id](): number { - return 0xB583BA46; - } - - static get [name](): string { - return "stories.editStory" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["media", types._InputMedia, "flags.0?InputMedia"], - ["media_areas", [types._MediaArea], "flags.3?Vector"], - ["caption", "string", "flags.1?string"], - ["entities", [types._MessageEntity], "flags.1?Vector"], - ["privacy_rules", [types._InputPrivacyRule], "flags.2?Vector"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.media ?? null, types._InputMedia, "flags.0?InputMedia"], - [this.media_areas ?? null, [types._MediaArea], "flags.3?Vector"], - [this.caption ?? null, "string", "flags.1?string"], - [this.entities ?? null, [types._MessageEntity], "flags.1?Vector"], - [this.privacy_rules ?? null, [types._InputPrivacyRule], "flags.2?Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number; media?: enums.InputMedia; media_areas?: Array; caption?: string; entities?: Array; privacy_rules?: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.media = params.media; - this.media_areas = params.media_areas; - this.caption = params.caption; - this.entities = params.entities; - this.privacy_rules = params.privacy_rules; - } -} - -/** Deletes some posted [stories](https://core.telegram.org/api/stories). */ -export class stories_deleteStories_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => number[]; - /** Channel/user from where to delete stories. */ - peer: enums.InputPeer; - /** IDs of stories to delete. */ - id: Array; - - protected get [id](): number { - return 0xAE59DB5F; - } - - static get [name](): string { - return "stories.deleteStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Pin or unpin one or more stories */ -export class stories_togglePinned_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array; pinned: boolean }) => number[]; - /** Peer where to pin or unpin stories */ - peer: enums.InputPeer; - /** IDs of stories to pin or unpin */ - id: Array; - /** Whether to pin or unpin the stories */ - pinned: boolean; - - protected get [id](): number { - return 0x9A75A1EF; - } - - static get [name](): string { - return "stories.togglePinned" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ["pinned", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - [this.pinned, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array; pinned: boolean }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.pinned = params.pinned; - } -} - -/** Fetch the List of active (or active and hidden) stories, see [here »](https://core.telegram.org/api/stories#watching-stories) for more info on watching stories. */ -export class stories_getAllStories_ extends Function_ { - static __F: (params?: { next?: true; hidden?: true; state?: string }) => enums.stories.AllStories; - /** If `next` and `state` are both set, uses the passed `state` to paginate to the next results; if neither `state` nor `next` are set, fetches the initial page; if `state` is set and `next` is not set, check for changes in the active/hidden peerset, see [here »](https://core.telegram.org/api/stories#watching-stories) for more info on the full flow. */ - next?: true; - /** If set, fetches the hidden active story list, otherwise fetches the active story list, see [here »](https://core.telegram.org/api/stories#watching-stories) for more info on the full flow. */ - hidden?: true; - /** If `next` and `state` are both set, uses the passed `state` to paginate to the next results; if neither `state` nor `next` are set, fetches the initial page; if `state` is set and `next` is not set, check for changes in the active/hidden peerset, see [here »](https://core.telegram.org/api/stories#watching-stories) for more info on the full flow. */ - state?: string; - - protected get [id](): number { - return 0xEEB0D625; - } - - static get [name](): string { - return "stories.getAllStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["next", "true", "flags.1?true"], - ["hidden", "true", "flags.2?true"], - ["state", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.next ?? null, "true", "flags.1?true"], - [this.hidden ?? null, "true", "flags.2?true"], - [this.state ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params?: { next?: true; hidden?: true; state?: string }) { - super(); - this.next = params?.next; - this.hidden = params?.hidden; - this.state = params?.state; - } -} - -/** Fetch the [stories](https://core.telegram.org/api/stories#pinned-or-archived-stories) pinned on a peer's profile. */ -export class stories_getPinnedStories_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; offset_id: number; limit: number }) => enums.stories.Stories; - /** Peer whose pinned stories should be fetched */ - peer: enums.InputPeer; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x5821A5DC; - } - - static get [name](): string { - return "stories.getPinnedStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["offset_id", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.offset_id, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; offset_id: number; limit: number }) { - super(); - this.peer = params.peer; - this.offset_id = params.offset_id; - this.limit = params.limit; - } -} - -/** Fetch the [story archive »](https://core.telegram.org/api/stories#pinned-or-archived-stories) of a peer we control. */ -export class stories_getStoriesArchive_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; offset_id: number; limit: number }) => enums.stories.Stories; - /** Peer whose archived stories should be fetched */ - peer: enums.InputPeer; - /** [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets) */ - offset_id: number; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xB4352016; - } - - static get [name](): string { - return "stories.getStoriesArchive" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["offset_id", "number", "int"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.offset_id, "number", "int"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; offset_id: number; limit: number }) { - super(); - this.peer = params.peer; - this.offset_id = params.offset_id; - this.limit = params.limit; - } -} - -/** Obtain full info about a set of [stories](https://core.telegram.org/api/stories) by their IDs. */ -export class stories_getStoriesByID_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.stories.Stories; - /** Peer where the stories were posted */ - peer: enums.InputPeer; - /** Story IDs */ - id: Array; - - protected get [id](): number { - return 0x5774CA74; - } - - static get [name](): string { - return "stories.getStoriesByID" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen. */ -export class stories_toggleAllStoriesHidden_ extends Function_ { - static __F: (params: { hidden: boolean }) => boolean; - /** Whether to hide or unhide all active stories of the peer */ - hidden: boolean; - - protected get [id](): number { - return 0x7C2557C4; - } - - static get [name](): string { - return "stories.toggleAllStoriesHidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["hidden", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.hidden, "boolean", "Bool"], - ]; - } - - constructor(params: { hidden: boolean }) { - super(); - this.hidden = params.hidden; - } -} - -/** Mark all stories up to a certain ID as read, for a given peer; will emit an [updateReadStories](https://core.telegram.org/constructor/updateReadStories) update to all logged-in sessions. */ -export class stories_readStories_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; max_id: number }) => number[]; - /** The peer whose stories should be marked as read. */ - peer: enums.InputPeer; - /** Mark all stories up to and including this ID as read */ - max_id: number; - - protected get [id](): number { - return 0xA556DAC8; - } - - static get [name](): string { - return "stories.readStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["max_id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.max_id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; max_id: number }) { - super(); - this.peer = params.peer; - this.max_id = params.max_id; - } -} - -/** Increment the view counter of one or more stories. */ -export class stories_incrementStoryViews_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => boolean; - /** Peer where the stories were posted. */ - peer: enums.InputPeer; - /** IDs of the stories (maximum 200 at a time). */ - id: Array; - - protected get [id](): number { - return 0xB2028AFB; - } - - static get [name](): string { - return "stories.incrementStoryViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Obtain the list of users that have viewed a specific [story we posted](https://core.telegram.org/api/stories) */ -export class stories_getStoryViewsList_ extends Function_ { - static __F: (params: { just_contacts?: true; reactions_first?: true; forwards_first?: true; peer: enums.InputPeer; q?: string; id: number; offset: string; limit: number }) => enums.stories.StoryViewsList; - /** Whether to only fetch view reaction/views made by our [contacts](https://core.telegram.org/api/contacts) */ - just_contacts?: true; - /** Whether to return [storyView](https://core.telegram.org/constructor/storyView) info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting [storyView](https://core.telegram.org/constructor/storyView)s with an associated reaction first in the list). Ignored if `forwards_first` is set. */ - reactions_first?: true; - /** If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. */ - forwards_first?: true; - /** Peer where the story was posted */ - peer: enums.InputPeer; - /** Search for specific peers */ - q?: string; - /** Story ID */ - id: number; - /** Offset for pagination, obtained from [stories.storyViewsList](https://core.telegram.org/constructor/stories.storyViewsList).`next_offset` */ - offset: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x7ED23C57; - } - - static get [name](): string { - return "stories.getStoryViewsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["just_contacts", "true", "flags.0?true"], - ["reactions_first", "true", "flags.2?true"], - ["forwards_first", "true", "flags.3?true"], - ["peer", types._InputPeer, "InputPeer"], - ["q", "string", "flags.1?string"], - ["id", "number", "int"], - ["offset", "string", "string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.just_contacts ?? null, "true", "flags.0?true"], - [this.reactions_first ?? null, "true", "flags.2?true"], - [this.forwards_first ?? null, "true", "flags.3?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.q ?? null, "string", "flags.1?string"], - [this.id, "number", "int"], - [this.offset, "string", "string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { just_contacts?: true; reactions_first?: true; forwards_first?: true; peer: enums.InputPeer; q?: string; id: number; offset: string; limit: number }) { - super(); - this.just_contacts = params.just_contacts; - this.reactions_first = params.reactions_first; - this.forwards_first = params.forwards_first; - this.peer = params.peer; - this.q = params.q; - this.id = params.id; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Obtain info about the view count, forward count, reactions and recent viewers of one or more [stories](https://core.telegram.org/api/stories). */ -export class stories_getStoriesViews_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array }) => enums.stories.StoryViews; - /** Peer whose stories should be fetched */ - peer: enums.InputPeer; - /** Story IDs */ - id: Array; - - protected get [id](): number { - return 0x28E16CC8; - } - - static get [name](): string { - return "stories.getStoriesViews" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Generate a [story deep link](https://core.telegram.org/api/links#story-links) for a specific story */ -export class stories_exportStoryLink_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: number }) => enums.ExportedStoryLink; - /** Peer where the story was posted */ - peer: enums.InputPeer; - /** Story ID */ - id: number; - - protected get [id](): number { - return 0x7B8DEF20; - } - - static get [name](): string { - return "stories.exportStoryLink" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: number }) { - super(); - this.peer = params.peer; - this.id = params.id; - } -} - -/** Report a story. */ -export class stories_report_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; id: Array; reason: enums.ReportReason; message: string }) => boolean; - /** The peer that uploaded the story. */ - peer: enums.InputPeer; - /** IDs of the stories to report. */ - id: Array; - /** Why are these storeis being reported. */ - reason: enums.ReportReason; - /** Comment for report moderation */ - message: string; - - protected get [id](): number { - return 0x1923FA8C; - } - - static get [name](): string { - return "stories.report" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["id", ["number"], "Vector"], - ["reason", types._ReportReason, "ReportReason"], - ["message", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.id, ["number"], "Vector"], - [this.reason, types._ReportReason, "ReportReason"], - [this.message, "string", "string"], - ]; - } - - constructor(params: { peer: enums.InputPeer; id: Array; reason: enums.ReportReason; message: string }) { - super(); - this.peer = params.peer; - this.id = params.id; - this.reason = params.reason; - this.message = params.message; - } -} - -/** Activates [stories stealth mode](https://core.telegram.org/api/stories#stealth-mode), see [here »](https://core.telegram.org/api/stories#stealth-mode) for more info. */ -export class stories_activateStealthMode_ extends Function_ { - static __F: (params?: { past?: true; future?: true }) => enums.Updates; - /** Whether to erase views from any stories opened in the past [`stories_stealth_past_period` seconds »](https://core.telegram.org/api/config#stories-stealth-past-period), as specified by the [client configuration](https://core.telegram.org/api/config#client-configuration). */ - past?: true; - /** Whether to hide future story views for the next [`stories_stealth_future_period` seconds »](https://core.telegram.org/api/config#stories-stealth-future-period), as specified by the [client configuration](https://core.telegram.org/api/config#client-configuration). */ - future?: true; - - protected get [id](): number { - return 0x57BBD166; - } - - static get [name](): string { - return "stories.activateStealthMode" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["past", "true", "flags.0?true"], - ["future", "true", "flags.1?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.past ?? null, "true", "flags.0?true"], - [this.future ?? null, "true", "flags.1?true"], - ]; - } - - constructor(params?: { past?: true; future?: true }) { - super(); - this.past = params?.past; - this.future = params?.future; - } -} - -/** React to a story. */ -export class stories_sendReaction_ extends Function_ { - static __F: (params: { add_to_recent?: true; peer: enums.InputPeer; story_id: number; reaction: enums.Reaction }) => enums.Updates; - /** Whether to add this reaction to the [recent reactions list »](https://core.telegram.org/api/reactions#recent-reactions). */ - add_to_recent?: true; - /** The peer that sent the story */ - peer: enums.InputPeer; - /** ID of the story to react to */ - story_id: number; - /** Reaction */ - reaction: enums.Reaction; - - protected get [id](): number { - return 0x7FD736B2; - } - - static get [name](): string { - return "stories.sendReaction" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["add_to_recent", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["story_id", "number", "int"], - ["reaction", types._Reaction, "Reaction"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.add_to_recent ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.story_id, "number", "int"], - [this.reaction, types._Reaction, "Reaction"], - ]; - } - - constructor(params: { add_to_recent?: true; peer: enums.InputPeer; story_id: number; reaction: enums.Reaction }) { - super(); - this.add_to_recent = params.add_to_recent; - this.peer = params.peer; - this.story_id = params.story_id; - this.reaction = params.reaction; - } -} - -/** Fetch the full active [story list](https://core.telegram.org/api/stories#watching-stories) of a specific peer. */ -export class stories_getPeerStories_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.stories.PeerStories; - /** Peer whose stories should be fetched */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x2C4ADA50; - } - - static get [name](): string { - return "stories.getPeerStories" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Obtain the latest read story ID for all peers when first logging in, returned as a list of [updateReadStories](https://core.telegram.org/constructor/updateReadStories) updates, see [here »](https://core.telegram.org/api/stories#watching-stories) for more info. */ -export class stories_getAllReadPeerStories_ extends Function_ { - static __F: () => enums.Updates; - protected get [id](): number { - return 0x9B5AE7F9; - } - - static get [name](): string { - return "stories.getAllReadPeerStories" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Get the IDs of the maximum read stories for a set of peers. */ -export class stories_getPeerMaxIDs_ extends Function_ { - static __F: (params: { id: Array }) => number[]; - /** Peers */ - id: Array; - - protected get [id](): number { - return 0x535983C3; - } - - static get [name](): string { - return "stories.getPeerMaxIDs" - } - - static get [paramDesc](): ParamDesc { - return [ - ["id", [types._InputPeer], "Vector"], - ]; - } - - protected get [params](): Params { - return [ - [this.id, [types._InputPeer], "Vector"], - ]; - } - - constructor(params: { id: Array }) { - super(); - this.id = params.id; - } -} - -/** Obtain a list of channels where the user can post [stories](https://core.telegram.org/api/stories) */ -export class stories_getChatsToSend_ extends Function_ { - static __F: () => enums.messages.Chats; - protected get [id](): number { - return 0xA56A8B60; - } - - static get [name](): string { - return "stories.getChatsToSend" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see [here »](https://core.telegram.org/api/stories#hiding-stories-of-other-users) for more info. */ -export class stories_togglePeerStoriesHidden_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; hidden: boolean }) => boolean; - /** Peer whose stories should be (un)hidden. */ - peer: enums.InputPeer; - /** Whether to hide or unhide stories. */ - hidden: boolean; - - protected get [id](): number { - return 0xBD0415C4; - } - - static get [name](): string { - return "stories.togglePeerStoriesHidden" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["hidden", "boolean", "Bool"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.hidden, "boolean", "Bool"], - ]; - } - - constructor(params: { peer: enums.InputPeer; hidden: boolean }) { - super(); - this.peer = params.peer; - this.hidden = params.hidden; - } -} - -/** Get the [reaction](https://core.telegram.org/api/reactions) and interaction list of a [story](https://core.telegram.org/api/stories) posted to a channel, along with the sender of each reaction. */ -export class stories_getStoryReactionsList_ extends Function_ { - static __F: (params: { forwards_first?: true; peer: enums.InputPeer; id: number; reaction?: enums.Reaction; offset?: string; limit: number }) => enums.stories.StoryReactionsList; - /** If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. */ - forwards_first?: true; - /** Channel */ - peer: enums.InputPeer; - /** [Story](https://core.telegram.org/api/stories) ID */ - id: number; - /** Get only reactions of this type */ - reaction?: enums.Reaction; - /** Offset for pagination (taken from the `next_offset` field of the returned [stories.StoryReactionsList](https://core.telegram.org/type/stories.StoryReactionsList)); empty in the first request. */ - offset?: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0xB9B2881F; - } - - static get [name](): string { - return "stories.getStoryReactionsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["forwards_first", "true", "flags.2?true"], - ["peer", types._InputPeer, "InputPeer"], - ["id", "number", "int"], - ["reaction", types._Reaction, "flags.0?Reaction"], - ["offset", "string", "flags.1?string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.forwards_first ?? null, "true", "flags.2?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.id, "number", "int"], - [this.reaction ?? null, types._Reaction, "flags.0?Reaction"], - [this.offset ?? null, "string", "flags.1?string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { forwards_first?: true; peer: enums.InputPeer; id: number; reaction?: enums.Reaction; offset?: string; limit: number }) { - super(); - this.forwards_first = params.forwards_first; - this.peer = params.peer; - this.id = params.id; - this.reaction = params.reaction; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Obtains info about the boosts that were applied to a certain channel (admins only) */ -export class premium_getBoostsList_ extends Function_ { - static __F: (params: { gifts?: true; peer: enums.InputPeer; offset: string; limit: number }) => enums.premium.BoostsList; - /** Whether to return only info about boosts received from [gift codes and giveaways created by the channel »](https://core.telegram.org/api/giveaways) */ - gifts?: true; - /** The channel */ - peer: enums.InputPeer; - /** Offset for pagination, obtained from [premium.boostsList](https://core.telegram.org/constructor/premium.boostsList).`next_offset` */ - offset: string; - /** Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets) */ - limit: number; - - protected get [id](): number { - return 0x60F67660; - } - - static get [name](): string { - return "premium.getBoostsList" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["gifts", "true", "flags.0?true"], - ["peer", types._InputPeer, "InputPeer"], - ["offset", "string", "string"], - ["limit", "number", "int"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.gifts ?? null, "true", "flags.0?true"], - [this.peer, types._InputPeer, "InputPeer"], - [this.offset, "string", "string"], - [this.limit, "number", "int"], - ]; - } - - constructor(params: { gifts?: true; peer: enums.InputPeer; offset: string; limit: number }) { - super(); - this.gifts = params.gifts; - this.peer = params.peer; - this.offset = params.offset; - this.limit = params.limit; - } -} - -/** Obtain which peers are we currently [boosting](https://core.telegram.org/api/boost), and how many [boost slots](https://core.telegram.org/api/boost) we have left. */ -export class premium_getMyBoosts_ extends Function_ { - static __F: () => enums.premium.MyBoosts; - protected get [id](): number { - return 0x0BE77B4A; - } - - static get [name](): string { - return "premium.getMyBoosts" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -/** Apply one or more [boosts »](https://core.telegram.org/api/boost) to a peer. */ -export class premium_applyBoost_ extends Function_ { - static __F: (params: { slots?: Array; peer: enums.InputPeer }) => enums.premium.MyBoosts; - /** Which [boost slots](https://core.telegram.org/api/boost) to assign to this peer. */ - slots?: Array; - /** The peer to boost. */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x6B7DA746; - } - - static get [name](): string { - return "premium.applyBoost" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["slots", ["number"], "flags.0?Vector"], - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.slots ?? null, ["number"], "flags.0?Vector"], - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { slots?: Array; peer: enums.InputPeer }) { - super(); - this.slots = params.slots; - this.peer = params.peer; - } -} - -/** Gets the current [number of boosts](https://core.telegram.org/api/boost) of a channel. */ -export class premium_getBoostsStatus_ extends Function_ { - static __F: (params: { peer: enums.InputPeer }) => enums.premium.BoostsStatus; - /** The peer. */ - peer: enums.InputPeer; - - protected get [id](): number { - return 0x042F1F61; - } - - static get [name](): string { - return "premium.getBoostsStatus" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - ]; - } - - constructor(params: { peer: enums.InputPeer }) { - super(); - this.peer = params.peer; - } -} - -/** Returns the lists of boost that were applied to a channel by a specific user (admins only) */ -export class premium_getUserBoosts_ extends Function_ { - static __F: (params: { peer: enums.InputPeer; user_id: enums.InputUser }) => enums.premium.BoostsList; - /** The channel */ - peer: enums.InputPeer; - /** The user */ - user_id: enums.InputUser; - - protected get [id](): number { - return 0x39854D1F; - } - - static get [name](): string { - return "premium.getUserBoosts" - } - - static get [paramDesc](): ParamDesc { - return [ - ["peer", types._InputPeer, "InputPeer"], - ["user_id", types._InputUser, "InputUser"], - ]; - } - - protected get [params](): Params { - return [ - [this.peer, types._InputPeer, "InputPeer"], - [this.user_id, types._InputUser, "InputUser"], - ]; - } - - constructor(params: { peer: enums.InputPeer; user_id: enums.InputUser }) { - super(); - this.peer = params.peer; - this.user_id = params.user_id; - } -} - -export class smsjobs_isEligibleToJoin_ extends Function_ { - static __F: () => enums.smsjobs.EligibilityToJoin; - protected get [id](): number { - return 0x0EDC39D0; - } - - static get [name](): string { - return "smsjobs.isEligibleToJoin" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class smsjobs_join_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0xA74ECE2D; - } - - static get [name](): string { - return "smsjobs.join" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class smsjobs_leave_ extends Function_ { - static __F: () => boolean; - protected get [id](): number { - return 0x9898AD73; - } - - static get [name](): string { - return "smsjobs.leave" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class smsjobs_updateSettings_ extends Function_ { - static __F: (params?: { allow_international?: true }) => boolean; - allow_international?: true; - - protected get [id](): number { - return 0x093FA0BF; - } - - static get [name](): string { - return "smsjobs.updateSettings" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["allow_international", "true", "flags.0?true"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.allow_international ?? null, "true", "flags.0?true"], - ]; - } - - constructor(params?: { allow_international?: true }) { - super(); - this.allow_international = params?.allow_international; - } -} - -export class smsjobs_getStatus_ extends Function_ { - static __F: () => enums.smsjobs.Status; - protected get [id](): number { - return 0x10A698E8; - } - - static get [name](): string { - return "smsjobs.getStatus" - } - - static get [paramDesc](): ParamDesc { - return []; - } - - protected get [params](): Params { - return []; - } - - constructor() { - super(); - } -} - -export class smsjobs_getSmsJob_ extends Function_ { - static __F: (params: { job_id: string }) => enums.SmsJob; - job_id: string; - - protected get [id](): number { - return 0x778D902F; - } - - static get [name](): string { - return "smsjobs.getSmsJob" - } - - static get [paramDesc](): ParamDesc { - return [ - ["job_id", "string", "string"], - ]; - } - - protected get [params](): Params { - return [ - [this.job_id, "string", "string"], - ]; - } - - constructor(params: { job_id: string }) { - super(); - this.job_id = params.job_id; - } -} - -export class smsjobs_finishJob_ extends Function_ { - static __F: (params: { job_id: string; error?: string }) => boolean; - job_id: string; - error?: string; - - protected get [id](): number { - return 0x4F1EBF24; - } - - static get [name](): string { - return "smsjobs.finishJob" - } - - static get [paramDesc](): ParamDesc { - return [ - ["flags", flags, "#"], - ["job_id", "string", "string"], - ["error", "string", "flags.0?string"], - ]; - } - - protected get [params](): Params { - return [ - ["flags", flags, "#"], - [this.job_id, "string", "string"], - [this.error ?? null, "string", "flags.0?string"], - ]; - } - - constructor(params: { job_id: string; error?: string }) { - super(); - this.job_id = params.job_id; - this.error = params.error; - } -} - -export class fragment_getCollectibleInfo_ extends Function_ { - static __F: (params: { collectible: enums.InputCollectible }) => enums.fragment.CollectibleInfo; - collectible: enums.InputCollectible; - - protected get [id](): number { - return 0xBE1E85BA; - } - - static get [name](): string { - return "fragment.getCollectibleInfo" - } - - static get [paramDesc](): ParamDesc { - return [ - ["collectible", types._InputCollectible, "InputCollectible"], - ]; - } - - protected get [params](): Params { - return [ - [this.collectible, types._InputCollectible, "InputCollectible"], - ]; - } - - constructor(params: { collectible: enums.InputCollectible }) { - super(); - this.collectible = params.collectible; - } -} - -export const functions = { - Function: Function_, - req_pq_multi: req_pq_multi_, - req_DH_params: req_DH_params_, - set_client_DH_params: set_client_DH_params_, - rpc_drop_answer: rpc_drop_answer_, - get_future_salts: get_future_salts_, - ping: ping_, - ping_delay_disconnect: ping_delay_disconnect_, - destroy_session: destroy_session_, - destroy_auth_key: destroy_auth_key_, - invokeWithBusinessConnectionPrefix: invokeWithBusinessConnectionPrefix_, - invokeAfterMsg: invokeAfterMsg_, - invokeAfterMsgs: invokeAfterMsgs_, - initConnection: initConnection_, - invokeWithLayer: invokeWithLayer_, - invokeWithoutUpdates: invokeWithoutUpdates_, - invokeWithMessagesRange: invokeWithMessagesRange_, - invokeWithTakeout: invokeWithTakeout_, - invokeWithBusinessConnection: invokeWithBusinessConnection_, - auth: { - sendCode: auth_sendCode_, - signUp: auth_signUp_, - signIn: auth_signIn_, - logOut: auth_logOut_, - resetAuthorizations: auth_resetAuthorizations_, - exportAuthorization: auth_exportAuthorization_, - importAuthorization: auth_importAuthorization_, - bindTempAuthKey: auth_bindTempAuthKey_, - importBotAuthorization: auth_importBotAuthorization_, - checkPassword: auth_checkPassword_, - requestPasswordRecovery: auth_requestPasswordRecovery_, - recoverPassword: auth_recoverPassword_, - resendCode: auth_resendCode_, - cancelCode: auth_cancelCode_, - dropTempAuthKeys: auth_dropTempAuthKeys_, - exportLoginToken: auth_exportLoginToken_, - importLoginToken: auth_importLoginToken_, - acceptLoginToken: auth_acceptLoginToken_, - checkRecoveryPassword: auth_checkRecoveryPassword_, - importWebTokenAuthorization: auth_importWebTokenAuthorization_, - requestFirebaseSms: auth_requestFirebaseSms_, - resetLoginEmail: auth_resetLoginEmail_, - }, - account: { - registerDevice: account_registerDevice_, - unregisterDevice: account_unregisterDevice_, - updateNotifySettings: account_updateNotifySettings_, - getNotifySettings: account_getNotifySettings_, - resetNotifySettings: account_resetNotifySettings_, - updateProfile: account_updateProfile_, - updateStatus: account_updateStatus_, - getWallPapers: account_getWallPapers_, - reportPeer: account_reportPeer_, - checkUsername: account_checkUsername_, - updateUsername: account_updateUsername_, - getPrivacy: account_getPrivacy_, - setPrivacy: account_setPrivacy_, - deleteAccount: account_deleteAccount_, - getAccountTTL: account_getAccountTTL_, - setAccountTTL: account_setAccountTTL_, - sendChangePhoneCode: account_sendChangePhoneCode_, - changePhone: account_changePhone_, - updateDeviceLocked: account_updateDeviceLocked_, - getAuthorizations: account_getAuthorizations_, - resetAuthorization: account_resetAuthorization_, - getPassword: account_getPassword_, - getPasswordSettings: account_getPasswordSettings_, - updatePasswordSettings: account_updatePasswordSettings_, - sendConfirmPhoneCode: account_sendConfirmPhoneCode_, - confirmPhone: account_confirmPhone_, - getTmpPassword: account_getTmpPassword_, - getWebAuthorizations: account_getWebAuthorizations_, - resetWebAuthorization: account_resetWebAuthorization_, - resetWebAuthorizations: account_resetWebAuthorizations_, - getAllSecureValues: account_getAllSecureValues_, - getSecureValue: account_getSecureValue_, - saveSecureValue: account_saveSecureValue_, - deleteSecureValue: account_deleteSecureValue_, - getAuthorizationForm: account_getAuthorizationForm_, - acceptAuthorization: account_acceptAuthorization_, - sendVerifyPhoneCode: account_sendVerifyPhoneCode_, - verifyPhone: account_verifyPhone_, - sendVerifyEmailCode: account_sendVerifyEmailCode_, - verifyEmail: account_verifyEmail_, - initTakeoutSession: account_initTakeoutSession_, - finishTakeoutSession: account_finishTakeoutSession_, - confirmPasswordEmail: account_confirmPasswordEmail_, - resendPasswordEmail: account_resendPasswordEmail_, - cancelPasswordEmail: account_cancelPasswordEmail_, - getContactSignUpNotification: account_getContactSignUpNotification_, - setContactSignUpNotification: account_setContactSignUpNotification_, - getNotifyExceptions: account_getNotifyExceptions_, - getWallPaper: account_getWallPaper_, - uploadWallPaper: account_uploadWallPaper_, - saveWallPaper: account_saveWallPaper_, - installWallPaper: account_installWallPaper_, - resetWallPapers: account_resetWallPapers_, - getAutoDownloadSettings: account_getAutoDownloadSettings_, - saveAutoDownloadSettings: account_saveAutoDownloadSettings_, - uploadTheme: account_uploadTheme_, - createTheme: account_createTheme_, - updateTheme: account_updateTheme_, - saveTheme: account_saveTheme_, - installTheme: account_installTheme_, - getTheme: account_getTheme_, - getThemes: account_getThemes_, - setContentSettings: account_setContentSettings_, - getContentSettings: account_getContentSettings_, - getMultiWallPapers: account_getMultiWallPapers_, - getGlobalPrivacySettings: account_getGlobalPrivacySettings_, - setGlobalPrivacySettings: account_setGlobalPrivacySettings_, - reportProfilePhoto: account_reportProfilePhoto_, - resetPassword: account_resetPassword_, - declinePasswordReset: account_declinePasswordReset_, - getChatThemes: account_getChatThemes_, - setAuthorizationTTL: account_setAuthorizationTTL_, - changeAuthorizationSettings: account_changeAuthorizationSettings_, - getSavedRingtones: account_getSavedRingtones_, - saveRingtone: account_saveRingtone_, - uploadRingtone: account_uploadRingtone_, - updateEmojiStatus: account_updateEmojiStatus_, - getDefaultEmojiStatuses: account_getDefaultEmojiStatuses_, - getRecentEmojiStatuses: account_getRecentEmojiStatuses_, - clearRecentEmojiStatuses: account_clearRecentEmojiStatuses_, - reorderUsernames: account_reorderUsernames_, - toggleUsername: account_toggleUsername_, - getDefaultProfilePhotoEmojis: account_getDefaultProfilePhotoEmojis_, - getDefaultGroupPhotoEmojis: account_getDefaultGroupPhotoEmojis_, - getAutoSaveSettings: account_getAutoSaveSettings_, - saveAutoSaveSettings: account_saveAutoSaveSettings_, - deleteAutoSaveExceptions: account_deleteAutoSaveExceptions_, - invalidateSignInCodes: account_invalidateSignInCodes_, - updateColor: account_updateColor_, - getDefaultBackgroundEmojis: account_getDefaultBackgroundEmojis_, - getChannelDefaultEmojiStatuses: account_getChannelDefaultEmojiStatuses_, - getChannelRestrictedStatusEmojis: account_getChannelRestrictedStatusEmojis_, - updateBusinessWorkHours: account_updateBusinessWorkHours_, - updateBusinessLocation: account_updateBusinessLocation_, - updateBusinessGreetingMessage: account_updateBusinessGreetingMessage_, - updateBusinessAwayMessage: account_updateBusinessAwayMessage_, - updateConnectedBot: account_updateConnectedBot_, - getConnectedBots: account_getConnectedBots_, - getBotBusinessConnection: account_getBotBusinessConnection_, - updateBusinessIntro: account_updateBusinessIntro_, - toggleConnectedBotPaused: account_toggleConnectedBotPaused_, - disablePeerConnectedBot: account_disablePeerConnectedBot_, - updateBirthday: account_updateBirthday_, - createBusinessChatLink: account_createBusinessChatLink_, - editBusinessChatLink: account_editBusinessChatLink_, - deleteBusinessChatLink: account_deleteBusinessChatLink_, - getBusinessChatLinks: account_getBusinessChatLinks_, - resolveBusinessChatLink: account_resolveBusinessChatLink_, - updatePersonalChannel: account_updatePersonalChannel_, - }, - users: { - getUsers: users_getUsers_, - getFullUser: users_getFullUser_, - setSecureValueErrors: users_setSecureValueErrors_, - getIsPremiumRequiredToContact: users_getIsPremiumRequiredToContact_, - }, - contacts: { - getContactIDs: contacts_getContactIDs_, - getStatuses: contacts_getStatuses_, - getContacts: contacts_getContacts_, - importContacts: contacts_importContacts_, - deleteContacts: contacts_deleteContacts_, - deleteByPhones: contacts_deleteByPhones_, - block: contacts_block_, - unblock: contacts_unblock_, - getBlocked: contacts_getBlocked_, - search: contacts_search_, - resolveUsername: contacts_resolveUsername_, - getTopPeers: contacts_getTopPeers_, - resetTopPeerRating: contacts_resetTopPeerRating_, - resetSaved: contacts_resetSaved_, - getSaved: contacts_getSaved_, - toggleTopPeers: contacts_toggleTopPeers_, - addContact: contacts_addContact_, - acceptContact: contacts_acceptContact_, - getLocated: contacts_getLocated_, - blockFromReplies: contacts_blockFromReplies_, - resolvePhone: contacts_resolvePhone_, - exportContactToken: contacts_exportContactToken_, - importContactToken: contacts_importContactToken_, - editCloseFriends: contacts_editCloseFriends_, - setBlocked: contacts_setBlocked_, - getBirthdays: contacts_getBirthdays_, - }, - messages: { - getMessages: messages_getMessages_, - getDialogs: messages_getDialogs_, - getHistory: messages_getHistory_, - search: messages_search_, - readHistory: messages_readHistory_, - deleteHistory: messages_deleteHistory_, - deleteMessages: messages_deleteMessages_, - receivedMessages: messages_receivedMessages_, - setTyping: messages_setTyping_, - sendMessage: messages_sendMessage_, - sendMedia: messages_sendMedia_, - forwardMessages: messages_forwardMessages_, - reportSpam: messages_reportSpam_, - getPeerSettings: messages_getPeerSettings_, - report: messages_report_, - getChats: messages_getChats_, - getFullChat: messages_getFullChat_, - editChatTitle: messages_editChatTitle_, - editChatPhoto: messages_editChatPhoto_, - addChatUser: messages_addChatUser_, - deleteChatUser: messages_deleteChatUser_, - createChat: messages_createChat_, - getDhConfig: messages_getDhConfig_, - requestEncryption: messages_requestEncryption_, - acceptEncryption: messages_acceptEncryption_, - discardEncryption: messages_discardEncryption_, - setEncryptedTyping: messages_setEncryptedTyping_, - readEncryptedHistory: messages_readEncryptedHistory_, - sendEncrypted: messages_sendEncrypted_, - sendEncryptedFile: messages_sendEncryptedFile_, - sendEncryptedService: messages_sendEncryptedService_, - receivedQueue: messages_receivedQueue_, - reportEncryptedSpam: messages_reportEncryptedSpam_, - readMessageContents: messages_readMessageContents_, - getStickers: messages_getStickers_, - getAllStickers: messages_getAllStickers_, - getWebPagePreview: messages_getWebPagePreview_, - exportChatInvite: messages_exportChatInvite_, - checkChatInvite: messages_checkChatInvite_, - importChatInvite: messages_importChatInvite_, - getStickerSet: messages_getStickerSet_, - installStickerSet: messages_installStickerSet_, - uninstallStickerSet: messages_uninstallStickerSet_, - startBot: messages_startBot_, - getMessagesViews: messages_getMessagesViews_, - editChatAdmin: messages_editChatAdmin_, - migrateChat: messages_migrateChat_, - searchGlobal: messages_searchGlobal_, - reorderStickerSets: messages_reorderStickerSets_, - getDocumentByHash: messages_getDocumentByHash_, - getSavedGifs: messages_getSavedGifs_, - saveGif: messages_saveGif_, - getInlineBotResults: messages_getInlineBotResults_, - setInlineBotResults: messages_setInlineBotResults_, - sendInlineBotResult: messages_sendInlineBotResult_, - getMessageEditData: messages_getMessageEditData_, - editMessage: messages_editMessage_, - editInlineBotMessage: messages_editInlineBotMessage_, - getBotCallbackAnswer: messages_getBotCallbackAnswer_, - setBotCallbackAnswer: messages_setBotCallbackAnswer_, - getPeerDialogs: messages_getPeerDialogs_, - saveDraft: messages_saveDraft_, - getAllDrafts: messages_getAllDrafts_, - getFeaturedStickers: messages_getFeaturedStickers_, - readFeaturedStickers: messages_readFeaturedStickers_, - getRecentStickers: messages_getRecentStickers_, - saveRecentSticker: messages_saveRecentSticker_, - clearRecentStickers: messages_clearRecentStickers_, - getArchivedStickers: messages_getArchivedStickers_, - getMaskStickers: messages_getMaskStickers_, - getAttachedStickers: messages_getAttachedStickers_, - setGameScore: messages_setGameScore_, - setInlineGameScore: messages_setInlineGameScore_, - getGameHighScores: messages_getGameHighScores_, - getInlineGameHighScores: messages_getInlineGameHighScores_, - getCommonChats: messages_getCommonChats_, - getWebPage: messages_getWebPage_, - toggleDialogPin: messages_toggleDialogPin_, - reorderPinnedDialogs: messages_reorderPinnedDialogs_, - getPinnedDialogs: messages_getPinnedDialogs_, - setBotShippingResults: messages_setBotShippingResults_, - setBotPrecheckoutResults: messages_setBotPrecheckoutResults_, - uploadMedia: messages_uploadMedia_, - sendScreenshotNotification: messages_sendScreenshotNotification_, - getFavedStickers: messages_getFavedStickers_, - faveSticker: messages_faveSticker_, - getUnreadMentions: messages_getUnreadMentions_, - readMentions: messages_readMentions_, - getRecentLocations: messages_getRecentLocations_, - sendMultiMedia: messages_sendMultiMedia_, - uploadEncryptedFile: messages_uploadEncryptedFile_, - searchStickerSets: messages_searchStickerSets_, - getSplitRanges: messages_getSplitRanges_, - markDialogUnread: messages_markDialogUnread_, - getDialogUnreadMarks: messages_getDialogUnreadMarks_, - clearAllDrafts: messages_clearAllDrafts_, - updatePinnedMessage: messages_updatePinnedMessage_, - sendVote: messages_sendVote_, - getPollResults: messages_getPollResults_, - getOnlines: messages_getOnlines_, - editChatAbout: messages_editChatAbout_, - editChatDefaultBannedRights: messages_editChatDefaultBannedRights_, - getEmojiKeywords: messages_getEmojiKeywords_, - getEmojiKeywordsDifference: messages_getEmojiKeywordsDifference_, - getEmojiKeywordsLanguages: messages_getEmojiKeywordsLanguages_, - getEmojiURL: messages_getEmojiURL_, - getSearchCounters: messages_getSearchCounters_, - requestUrlAuth: messages_requestUrlAuth_, - acceptUrlAuth: messages_acceptUrlAuth_, - hidePeerSettingsBar: messages_hidePeerSettingsBar_, - getScheduledHistory: messages_getScheduledHistory_, - getScheduledMessages: messages_getScheduledMessages_, - sendScheduledMessages: messages_sendScheduledMessages_, - deleteScheduledMessages: messages_deleteScheduledMessages_, - getPollVotes: messages_getPollVotes_, - toggleStickerSets: messages_toggleStickerSets_, - getDialogFilters: messages_getDialogFilters_, - getSuggestedDialogFilters: messages_getSuggestedDialogFilters_, - updateDialogFilter: messages_updateDialogFilter_, - updateDialogFiltersOrder: messages_updateDialogFiltersOrder_, - getOldFeaturedStickers: messages_getOldFeaturedStickers_, - getReplies: messages_getReplies_, - getDiscussionMessage: messages_getDiscussionMessage_, - readDiscussion: messages_readDiscussion_, - unpinAllMessages: messages_unpinAllMessages_, - deleteChat: messages_deleteChat_, - deletePhoneCallHistory: messages_deletePhoneCallHistory_, - checkHistoryImport: messages_checkHistoryImport_, - initHistoryImport: messages_initHistoryImport_, - uploadImportedMedia: messages_uploadImportedMedia_, - startHistoryImport: messages_startHistoryImport_, - getExportedChatInvites: messages_getExportedChatInvites_, - getExportedChatInvite: messages_getExportedChatInvite_, - editExportedChatInvite: messages_editExportedChatInvite_, - deleteRevokedExportedChatInvites: messages_deleteRevokedExportedChatInvites_, - deleteExportedChatInvite: messages_deleteExportedChatInvite_, - getAdminsWithInvites: messages_getAdminsWithInvites_, - getChatInviteImporters: messages_getChatInviteImporters_, - setHistoryTTL: messages_setHistoryTTL_, - checkHistoryImportPeer: messages_checkHistoryImportPeer_, - setChatTheme: messages_setChatTheme_, - getMessageReadParticipants: messages_getMessageReadParticipants_, - getSearchResultsCalendar: messages_getSearchResultsCalendar_, - getSearchResultsPositions: messages_getSearchResultsPositions_, - hideChatJoinRequest: messages_hideChatJoinRequest_, - hideAllChatJoinRequests: messages_hideAllChatJoinRequests_, - toggleNoForwards: messages_toggleNoForwards_, - saveDefaultSendAs: messages_saveDefaultSendAs_, - sendReaction: messages_sendReaction_, - getMessagesReactions: messages_getMessagesReactions_, - getMessageReactionsList: messages_getMessageReactionsList_, - setChatAvailableReactions: messages_setChatAvailableReactions_, - getAvailableReactions: messages_getAvailableReactions_, - setDefaultReaction: messages_setDefaultReaction_, - translateText: messages_translateText_, - getUnreadReactions: messages_getUnreadReactions_, - readReactions: messages_readReactions_, - searchSentMedia: messages_searchSentMedia_, - getAttachMenuBots: messages_getAttachMenuBots_, - getAttachMenuBot: messages_getAttachMenuBot_, - toggleBotInAttachMenu: messages_toggleBotInAttachMenu_, - requestWebView: messages_requestWebView_, - prolongWebView: messages_prolongWebView_, - requestSimpleWebView: messages_requestSimpleWebView_, - sendWebViewResultMessage: messages_sendWebViewResultMessage_, - sendWebViewData: messages_sendWebViewData_, - transcribeAudio: messages_transcribeAudio_, - rateTranscribedAudio: messages_rateTranscribedAudio_, - getCustomEmojiDocuments: messages_getCustomEmojiDocuments_, - getEmojiStickers: messages_getEmojiStickers_, - getFeaturedEmojiStickers: messages_getFeaturedEmojiStickers_, - reportReaction: messages_reportReaction_, - getTopReactions: messages_getTopReactions_, - getRecentReactions: messages_getRecentReactions_, - clearRecentReactions: messages_clearRecentReactions_, - getExtendedMedia: messages_getExtendedMedia_, - setDefaultHistoryTTL: messages_setDefaultHistoryTTL_, - getDefaultHistoryTTL: messages_getDefaultHistoryTTL_, - sendBotRequestedPeer: messages_sendBotRequestedPeer_, - getEmojiGroups: messages_getEmojiGroups_, - getEmojiStatusGroups: messages_getEmojiStatusGroups_, - getEmojiProfilePhotoGroups: messages_getEmojiProfilePhotoGroups_, - searchCustomEmoji: messages_searchCustomEmoji_, - togglePeerTranslations: messages_togglePeerTranslations_, - getBotApp: messages_getBotApp_, - requestAppWebView: messages_requestAppWebView_, - setChatWallPaper: messages_setChatWallPaper_, - searchEmojiStickerSets: messages_searchEmojiStickerSets_, - getSavedDialogs: messages_getSavedDialogs_, - getSavedHistory: messages_getSavedHistory_, - deleteSavedHistory: messages_deleteSavedHistory_, - getPinnedSavedDialogs: messages_getPinnedSavedDialogs_, - toggleSavedDialogPin: messages_toggleSavedDialogPin_, - reorderPinnedSavedDialogs: messages_reorderPinnedSavedDialogs_, - getSavedReactionTags: messages_getSavedReactionTags_, - updateSavedReactionTag: messages_updateSavedReactionTag_, - getDefaultTagReactions: messages_getDefaultTagReactions_, - getOutboxReadDate: messages_getOutboxReadDate_, - getQuickReplies: messages_getQuickReplies_, - reorderQuickReplies: messages_reorderQuickReplies_, - checkQuickReplyShortcut: messages_checkQuickReplyShortcut_, - editQuickReplyShortcut: messages_editQuickReplyShortcut_, - deleteQuickReplyShortcut: messages_deleteQuickReplyShortcut_, - getQuickReplyMessages: messages_getQuickReplyMessages_, - sendQuickReplyMessages: messages_sendQuickReplyMessages_, - deleteQuickReplyMessages: messages_deleteQuickReplyMessages_, - toggleDialogFilterTags: messages_toggleDialogFilterTags_, - getMyStickers: messages_getMyStickers_, - }, - updates: { - getState: updates_getState_, - getDifference: updates_getDifference_, - getChannelDifference: updates_getChannelDifference_, - }, - photos: { - updateProfilePhoto: photos_updateProfilePhoto_, - uploadProfilePhoto: photos_uploadProfilePhoto_, - deletePhotos: photos_deletePhotos_, - getUserPhotos: photos_getUserPhotos_, - uploadContactProfilePhoto: photos_uploadContactProfilePhoto_, - }, - upload: { - saveFilePart: upload_saveFilePart_, - getFile: upload_getFile_, - saveBigFilePart: upload_saveBigFilePart_, - getWebFile: upload_getWebFile_, - getCdnFile: upload_getCdnFile_, - reuploadCdnFile: upload_reuploadCdnFile_, - getCdnFileHashes: upload_getCdnFileHashes_, - getFileHashes: upload_getFileHashes_, - }, - help: { - getConfig: help_getConfig_, - getNearestDc: help_getNearestDc_, - getAppUpdate: help_getAppUpdate_, - getInviteText: help_getInviteText_, - getSupport: help_getSupport_, - setBotUpdatesStatus: help_setBotUpdatesStatus_, - getCdnConfig: help_getCdnConfig_, - getRecentMeUrls: help_getRecentMeUrls_, - getTermsOfServiceUpdate: help_getTermsOfServiceUpdate_, - acceptTermsOfService: help_acceptTermsOfService_, - getDeepLinkInfo: help_getDeepLinkInfo_, - getAppConfig: help_getAppConfig_, - saveAppLog: help_saveAppLog_, - getPassportConfig: help_getPassportConfig_, - getSupportName: help_getSupportName_, - getUserInfo: help_getUserInfo_, - editUserInfo: help_editUserInfo_, - getPromoData: help_getPromoData_, - hidePromoData: help_hidePromoData_, - dismissSuggestion: help_dismissSuggestion_, - getCountriesList: help_getCountriesList_, - getPremiumPromo: help_getPremiumPromo_, - getPeerColors: help_getPeerColors_, - getPeerProfileColors: help_getPeerProfileColors_, - getTimezonesList: help_getTimezonesList_, - }, - channels: { - readHistory: channels_readHistory_, - deleteMessages: channels_deleteMessages_, - reportSpam: channels_reportSpam_, - getMessages: channels_getMessages_, - getParticipants: channels_getParticipants_, - getParticipant: channels_getParticipant_, - getChannels: channels_getChannels_, - getFullChannel: channels_getFullChannel_, - createChannel: channels_createChannel_, - editAdmin: channels_editAdmin_, - editTitle: channels_editTitle_, - editPhoto: channels_editPhoto_, - checkUsername: channels_checkUsername_, - updateUsername: channels_updateUsername_, - joinChannel: channels_joinChannel_, - leaveChannel: channels_leaveChannel_, - inviteToChannel: channels_inviteToChannel_, - deleteChannel: channels_deleteChannel_, - exportMessageLink: channels_exportMessageLink_, - toggleSignatures: channels_toggleSignatures_, - getAdminedPublicChannels: channels_getAdminedPublicChannels_, - editBanned: channels_editBanned_, - getAdminLog: channels_getAdminLog_, - setStickers: channels_setStickers_, - readMessageContents: channels_readMessageContents_, - deleteHistory: channels_deleteHistory_, - togglePreHistoryHidden: channels_togglePreHistoryHidden_, - getLeftChannels: channels_getLeftChannels_, - getGroupsForDiscussion: channels_getGroupsForDiscussion_, - setDiscussionGroup: channels_setDiscussionGroup_, - editCreator: channels_editCreator_, - editLocation: channels_editLocation_, - toggleSlowMode: channels_toggleSlowMode_, - getInactiveChannels: channels_getInactiveChannels_, - convertToGigagroup: channels_convertToGigagroup_, - viewSponsoredMessage: channels_viewSponsoredMessage_, - getSponsoredMessages: channels_getSponsoredMessages_, - getSendAs: channels_getSendAs_, - deleteParticipantHistory: channels_deleteParticipantHistory_, - toggleJoinToSend: channels_toggleJoinToSend_, - toggleJoinRequest: channels_toggleJoinRequest_, - reorderUsernames: channels_reorderUsernames_, - toggleUsername: channels_toggleUsername_, - deactivateAllUsernames: channels_deactivateAllUsernames_, - toggleForum: channels_toggleForum_, - createForumTopic: channels_createForumTopic_, - getForumTopics: channels_getForumTopics_, - getForumTopicsByID: channels_getForumTopicsByID_, - editForumTopic: channels_editForumTopic_, - updatePinnedForumTopic: channels_updatePinnedForumTopic_, - deleteTopicHistory: channels_deleteTopicHistory_, - reorderPinnedForumTopics: channels_reorderPinnedForumTopics_, - toggleAntiSpam: channels_toggleAntiSpam_, - reportAntiSpamFalsePositive: channels_reportAntiSpamFalsePositive_, - toggleParticipantsHidden: channels_toggleParticipantsHidden_, - clickSponsoredMessage: channels_clickSponsoredMessage_, - updateColor: channels_updateColor_, - toggleViewForumAsMessages: channels_toggleViewForumAsMessages_, - getChannelRecommendations: channels_getChannelRecommendations_, - updateEmojiStatus: channels_updateEmojiStatus_, - setBoostsToUnblockRestrictions: channels_setBoostsToUnblockRestrictions_, - setEmojiStickers: channels_setEmojiStickers_, - reportSponsoredMessage: channels_reportSponsoredMessage_, - restrictSponsoredMessages: channels_restrictSponsoredMessages_, - }, - bots: { - sendCustomRequest: bots_sendCustomRequest_, - answerWebhookJSONQuery: bots_answerWebhookJSONQuery_, - setBotCommands: bots_setBotCommands_, - resetBotCommands: bots_resetBotCommands_, - getBotCommands: bots_getBotCommands_, - setBotMenuButton: bots_setBotMenuButton_, - getBotMenuButton: bots_getBotMenuButton_, - setBotBroadcastDefaultAdminRights: bots_setBotBroadcastDefaultAdminRights_, - setBotGroupDefaultAdminRights: bots_setBotGroupDefaultAdminRights_, - setBotInfo: bots_setBotInfo_, - getBotInfo: bots_getBotInfo_, - reorderUsernames: bots_reorderUsernames_, - toggleUsername: bots_toggleUsername_, - canSendMessage: bots_canSendMessage_, - allowSendMessage: bots_allowSendMessage_, - invokeWebViewCustomMethod: bots_invokeWebViewCustomMethod_, - }, - payments: { - getPaymentForm: payments_getPaymentForm_, - getPaymentReceipt: payments_getPaymentReceipt_, - validateRequestedInfo: payments_validateRequestedInfo_, - sendPaymentForm: payments_sendPaymentForm_, - getSavedInfo: payments_getSavedInfo_, - clearSavedInfo: payments_clearSavedInfo_, - getBankCardData: payments_getBankCardData_, - exportInvoice: payments_exportInvoice_, - assignAppStoreTransaction: payments_assignAppStoreTransaction_, - assignPlayMarketTransaction: payments_assignPlayMarketTransaction_, - canPurchasePremium: payments_canPurchasePremium_, - getPremiumGiftCodeOptions: payments_getPremiumGiftCodeOptions_, - checkGiftCode: payments_checkGiftCode_, - applyGiftCode: payments_applyGiftCode_, - getGiveawayInfo: payments_getGiveawayInfo_, - launchPrepaidGiveaway: payments_launchPrepaidGiveaway_, - }, - stickers: { - createStickerSet: stickers_createStickerSet_, - removeStickerFromSet: stickers_removeStickerFromSet_, - changeStickerPosition: stickers_changeStickerPosition_, - addStickerToSet: stickers_addStickerToSet_, - setStickerSetThumb: stickers_setStickerSetThumb_, - checkShortName: stickers_checkShortName_, - suggestShortName: stickers_suggestShortName_, - changeSticker: stickers_changeSticker_, - renameStickerSet: stickers_renameStickerSet_, - deleteStickerSet: stickers_deleteStickerSet_, - replaceSticker: stickers_replaceSticker_, - }, - phone: { - getCallConfig: phone_getCallConfig_, - requestCall: phone_requestCall_, - acceptCall: phone_acceptCall_, - confirmCall: phone_confirmCall_, - receivedCall: phone_receivedCall_, - discardCall: phone_discardCall_, - setCallRating: phone_setCallRating_, - saveCallDebug: phone_saveCallDebug_, - sendSignalingData: phone_sendSignalingData_, - createGroupCall: phone_createGroupCall_, - joinGroupCall: phone_joinGroupCall_, - leaveGroupCall: phone_leaveGroupCall_, - inviteToGroupCall: phone_inviteToGroupCall_, - discardGroupCall: phone_discardGroupCall_, - toggleGroupCallSettings: phone_toggleGroupCallSettings_, - getGroupCall: phone_getGroupCall_, - getGroupParticipants: phone_getGroupParticipants_, - checkGroupCall: phone_checkGroupCall_, - toggleGroupCallRecord: phone_toggleGroupCallRecord_, - editGroupCallParticipant: phone_editGroupCallParticipant_, - editGroupCallTitle: phone_editGroupCallTitle_, - getGroupCallJoinAs: phone_getGroupCallJoinAs_, - exportGroupCallInvite: phone_exportGroupCallInvite_, - toggleGroupCallStartSubscription: phone_toggleGroupCallStartSubscription_, - startScheduledGroupCall: phone_startScheduledGroupCall_, - saveDefaultGroupCallJoinAs: phone_saveDefaultGroupCallJoinAs_, - joinGroupCallPresentation: phone_joinGroupCallPresentation_, - leaveGroupCallPresentation: phone_leaveGroupCallPresentation_, - getGroupCallStreamChannels: phone_getGroupCallStreamChannels_, - getGroupCallStreamRtmpUrl: phone_getGroupCallStreamRtmpUrl_, - saveCallLog: phone_saveCallLog_, - }, - langpack: { - getLangPack: langpack_getLangPack_, - getStrings: langpack_getStrings_, - getDifference: langpack_getDifference_, - getLanguages: langpack_getLanguages_, - getLanguage: langpack_getLanguage_, - }, - folders: { - editPeerFolders: folders_editPeerFolders_, - }, - stats: { - getBroadcastStats: stats_getBroadcastStats_, - loadAsyncGraph: stats_loadAsyncGraph_, - getMegagroupStats: stats_getMegagroupStats_, - getMessagePublicForwards: stats_getMessagePublicForwards_, - getMessageStats: stats_getMessageStats_, - getStoryStats: stats_getStoryStats_, - getStoryPublicForwards: stats_getStoryPublicForwards_, - getBroadcastRevenueStats: stats_getBroadcastRevenueStats_, - getBroadcastRevenueWithdrawalUrl: stats_getBroadcastRevenueWithdrawalUrl_, - getBroadcastRevenueTransactions: stats_getBroadcastRevenueTransactions_, - }, - chatlists: { - exportChatlistInvite: chatlists_exportChatlistInvite_, - deleteExportedInvite: chatlists_deleteExportedInvite_, - editExportedInvite: chatlists_editExportedInvite_, - getExportedInvites: chatlists_getExportedInvites_, - checkChatlistInvite: chatlists_checkChatlistInvite_, - joinChatlistInvite: chatlists_joinChatlistInvite_, - getChatlistUpdates: chatlists_getChatlistUpdates_, - joinChatlistUpdates: chatlists_joinChatlistUpdates_, - hideChatlistUpdates: chatlists_hideChatlistUpdates_, - getLeaveChatlistSuggestions: chatlists_getLeaveChatlistSuggestions_, - leaveChatlist: chatlists_leaveChatlist_, - }, - stories: { - canSendStory: stories_canSendStory_, - sendStory: stories_sendStory_, - editStory: stories_editStory_, - deleteStories: stories_deleteStories_, - togglePinned: stories_togglePinned_, - getAllStories: stories_getAllStories_, - getPinnedStories: stories_getPinnedStories_, - getStoriesArchive: stories_getStoriesArchive_, - getStoriesByID: stories_getStoriesByID_, - toggleAllStoriesHidden: stories_toggleAllStoriesHidden_, - readStories: stories_readStories_, - incrementStoryViews: stories_incrementStoryViews_, - getStoryViewsList: stories_getStoryViewsList_, - getStoriesViews: stories_getStoriesViews_, - exportStoryLink: stories_exportStoryLink_, - report: stories_report_, - activateStealthMode: stories_activateStealthMode_, - sendReaction: stories_sendReaction_, - getPeerStories: stories_getPeerStories_, - getAllReadPeerStories: stories_getAllReadPeerStories_, - getPeerMaxIDs: stories_getPeerMaxIDs_, - getChatsToSend: stories_getChatsToSend_, - togglePeerStoriesHidden: stories_togglePeerStoriesHidden_, - getStoryReactionsList: stories_getStoryReactionsList_, - }, - premium: { - getBoostsList: premium_getBoostsList_, - getMyBoosts: premium_getMyBoosts_, - applyBoost: premium_applyBoost_, - getBoostsStatus: premium_getBoostsStatus_, - getUserBoosts: premium_getUserBoosts_, - }, - smsjobs: { - isEligibleToJoin: smsjobs_isEligibleToJoin_, - join: smsjobs_join_, - leave: smsjobs_leave_, - updateSettings: smsjobs_updateSettings_, - getStatus: smsjobs_getStatus_, - getSmsJob: smsjobs_getSmsJob_, - finishJob: smsjobs_finishJob_, - }, - fragment: { - getCollectibleInfo: fragment_getCollectibleInfo_, - }, -}; -export declare namespace functions { - type Function = Function_; - type req_pq_multi = req_pq_multi_; - type req_DH_params = req_DH_params_; - type set_client_DH_params = set_client_DH_params_; - type rpc_drop_answer = rpc_drop_answer_; - type get_future_salts = get_future_salts_; - type ping = ping_; - type ping_delay_disconnect = ping_delay_disconnect_; - type destroy_session = destroy_session_; - type destroy_auth_key = destroy_auth_key_; - type invokeWithBusinessConnectionPrefix = invokeWithBusinessConnectionPrefix_; - type invokeAfterMsg> = invokeAfterMsg_; - type invokeAfterMsgs> = invokeAfterMsgs_; - type initConnection> = initConnection_; - type invokeWithLayer> = invokeWithLayer_; - type invokeWithoutUpdates> = invokeWithoutUpdates_; - type invokeWithMessagesRange> = invokeWithMessagesRange_; - type invokeWithTakeout> = invokeWithTakeout_; - type invokeWithBusinessConnection> = invokeWithBusinessConnection_; - namespace auth { - type sendCode = auth_sendCode_; - type signUp = auth_signUp_; - type signIn = auth_signIn_; - type logOut = auth_logOut_; - type resetAuthorizations = auth_resetAuthorizations_; - type exportAuthorization = auth_exportAuthorization_; - type importAuthorization = auth_importAuthorization_; - type bindTempAuthKey = auth_bindTempAuthKey_; - type importBotAuthorization = auth_importBotAuthorization_; - type checkPassword = auth_checkPassword_; - type requestPasswordRecovery = auth_requestPasswordRecovery_; - type recoverPassword = auth_recoverPassword_; - type resendCode = auth_resendCode_; - type cancelCode = auth_cancelCode_; - type dropTempAuthKeys = auth_dropTempAuthKeys_; - type exportLoginToken = auth_exportLoginToken_; - type importLoginToken = auth_importLoginToken_; - type acceptLoginToken = auth_acceptLoginToken_; - type checkRecoveryPassword = auth_checkRecoveryPassword_; - type importWebTokenAuthorization = auth_importWebTokenAuthorization_; - type requestFirebaseSms = auth_requestFirebaseSms_; - type resetLoginEmail = auth_resetLoginEmail_; - } - namespace account { - type registerDevice = account_registerDevice_; - type unregisterDevice = account_unregisterDevice_; - type updateNotifySettings = account_updateNotifySettings_; - type getNotifySettings = account_getNotifySettings_; - type resetNotifySettings = account_resetNotifySettings_; - type updateProfile = account_updateProfile_; - type updateStatus = account_updateStatus_; - type getWallPapers = account_getWallPapers_; - type reportPeer = account_reportPeer_; - type checkUsername = account_checkUsername_; - type updateUsername = account_updateUsername_; - type getPrivacy = account_getPrivacy_; - type setPrivacy = account_setPrivacy_; - type deleteAccount = account_deleteAccount_; - type getAccountTTL = account_getAccountTTL_; - type setAccountTTL = account_setAccountTTL_; - type sendChangePhoneCode = account_sendChangePhoneCode_; - type changePhone = account_changePhone_; - type updateDeviceLocked = account_updateDeviceLocked_; - type getAuthorizations = account_getAuthorizations_; - type resetAuthorization = account_resetAuthorization_; - type getPassword = account_getPassword_; - type getPasswordSettings = account_getPasswordSettings_; - type updatePasswordSettings = account_updatePasswordSettings_; - type sendConfirmPhoneCode = account_sendConfirmPhoneCode_; - type confirmPhone = account_confirmPhone_; - type getTmpPassword = account_getTmpPassword_; - type getWebAuthorizations = account_getWebAuthorizations_; - type resetWebAuthorization = account_resetWebAuthorization_; - type resetWebAuthorizations = account_resetWebAuthorizations_; - type getAllSecureValues = account_getAllSecureValues_; - type getSecureValue = account_getSecureValue_; - type saveSecureValue = account_saveSecureValue_; - type deleteSecureValue = account_deleteSecureValue_; - type getAuthorizationForm = account_getAuthorizationForm_; - type acceptAuthorization = account_acceptAuthorization_; - type sendVerifyPhoneCode = account_sendVerifyPhoneCode_; - type verifyPhone = account_verifyPhone_; - type sendVerifyEmailCode = account_sendVerifyEmailCode_; - type verifyEmail = account_verifyEmail_; - type initTakeoutSession = account_initTakeoutSession_; - type finishTakeoutSession = account_finishTakeoutSession_; - type confirmPasswordEmail = account_confirmPasswordEmail_; - type resendPasswordEmail = account_resendPasswordEmail_; - type cancelPasswordEmail = account_cancelPasswordEmail_; - type getContactSignUpNotification = account_getContactSignUpNotification_; - type setContactSignUpNotification = account_setContactSignUpNotification_; - type getNotifyExceptions = account_getNotifyExceptions_; - type getWallPaper = account_getWallPaper_; - type uploadWallPaper = account_uploadWallPaper_; - type saveWallPaper = account_saveWallPaper_; - type installWallPaper = account_installWallPaper_; - type resetWallPapers = account_resetWallPapers_; - type getAutoDownloadSettings = account_getAutoDownloadSettings_; - type saveAutoDownloadSettings = account_saveAutoDownloadSettings_; - type uploadTheme = account_uploadTheme_; - type createTheme = account_createTheme_; - type updateTheme = account_updateTheme_; - type saveTheme = account_saveTheme_; - type installTheme = account_installTheme_; - type getTheme = account_getTheme_; - type getThemes = account_getThemes_; - type setContentSettings = account_setContentSettings_; - type getContentSettings = account_getContentSettings_; - type getMultiWallPapers = account_getMultiWallPapers_; - type getGlobalPrivacySettings = account_getGlobalPrivacySettings_; - type setGlobalPrivacySettings = account_setGlobalPrivacySettings_; - type reportProfilePhoto = account_reportProfilePhoto_; - type resetPassword = account_resetPassword_; - type declinePasswordReset = account_declinePasswordReset_; - type getChatThemes = account_getChatThemes_; - type setAuthorizationTTL = account_setAuthorizationTTL_; - type changeAuthorizationSettings = account_changeAuthorizationSettings_; - type getSavedRingtones = account_getSavedRingtones_; - type saveRingtone = account_saveRingtone_; - type uploadRingtone = account_uploadRingtone_; - type updateEmojiStatus = account_updateEmojiStatus_; - type getDefaultEmojiStatuses = account_getDefaultEmojiStatuses_; - type getRecentEmojiStatuses = account_getRecentEmojiStatuses_; - type clearRecentEmojiStatuses = account_clearRecentEmojiStatuses_; - type reorderUsernames = account_reorderUsernames_; - type toggleUsername = account_toggleUsername_; - type getDefaultProfilePhotoEmojis = account_getDefaultProfilePhotoEmojis_; - type getDefaultGroupPhotoEmojis = account_getDefaultGroupPhotoEmojis_; - type getAutoSaveSettings = account_getAutoSaveSettings_; - type saveAutoSaveSettings = account_saveAutoSaveSettings_; - type deleteAutoSaveExceptions = account_deleteAutoSaveExceptions_; - type invalidateSignInCodes = account_invalidateSignInCodes_; - type updateColor = account_updateColor_; - type getDefaultBackgroundEmojis = account_getDefaultBackgroundEmojis_; - type getChannelDefaultEmojiStatuses = account_getChannelDefaultEmojiStatuses_; - type getChannelRestrictedStatusEmojis = account_getChannelRestrictedStatusEmojis_; - type updateBusinessWorkHours = account_updateBusinessWorkHours_; - type updateBusinessLocation = account_updateBusinessLocation_; - type updateBusinessGreetingMessage = account_updateBusinessGreetingMessage_; - type updateBusinessAwayMessage = account_updateBusinessAwayMessage_; - type updateConnectedBot = account_updateConnectedBot_; - type getConnectedBots = account_getConnectedBots_; - type getBotBusinessConnection = account_getBotBusinessConnection_; - type updateBusinessIntro = account_updateBusinessIntro_; - type toggleConnectedBotPaused = account_toggleConnectedBotPaused_; - type disablePeerConnectedBot = account_disablePeerConnectedBot_; - type updateBirthday = account_updateBirthday_; - type createBusinessChatLink = account_createBusinessChatLink_; - type editBusinessChatLink = account_editBusinessChatLink_; - type deleteBusinessChatLink = account_deleteBusinessChatLink_; - type getBusinessChatLinks = account_getBusinessChatLinks_; - type resolveBusinessChatLink = account_resolveBusinessChatLink_; - type updatePersonalChannel = account_updatePersonalChannel_; - } - namespace users { - type getUsers = users_getUsers_; - type getFullUser = users_getFullUser_; - type setSecureValueErrors = users_setSecureValueErrors_; - type getIsPremiumRequiredToContact = users_getIsPremiumRequiredToContact_; - } - namespace contacts { - type getContactIDs = contacts_getContactIDs_; - type getStatuses = contacts_getStatuses_; - type getContacts = contacts_getContacts_; - type importContacts = contacts_importContacts_; - type deleteContacts = contacts_deleteContacts_; - type deleteByPhones = contacts_deleteByPhones_; - type block = contacts_block_; - type unblock = contacts_unblock_; - type getBlocked = contacts_getBlocked_; - type search = contacts_search_; - type resolveUsername = contacts_resolveUsername_; - type getTopPeers = contacts_getTopPeers_; - type resetTopPeerRating = contacts_resetTopPeerRating_; - type resetSaved = contacts_resetSaved_; - type getSaved = contacts_getSaved_; - type toggleTopPeers = contacts_toggleTopPeers_; - type addContact = contacts_addContact_; - type acceptContact = contacts_acceptContact_; - type getLocated = contacts_getLocated_; - type blockFromReplies = contacts_blockFromReplies_; - type resolvePhone = contacts_resolvePhone_; - type exportContactToken = contacts_exportContactToken_; - type importContactToken = contacts_importContactToken_; - type editCloseFriends = contacts_editCloseFriends_; - type setBlocked = contacts_setBlocked_; - type getBirthdays = contacts_getBirthdays_; - } - namespace messages { - type getMessages = messages_getMessages_; - type getDialogs = messages_getDialogs_; - type getHistory = messages_getHistory_; - type search = messages_search_; - type readHistory = messages_readHistory_; - type deleteHistory = messages_deleteHistory_; - type deleteMessages = messages_deleteMessages_; - type receivedMessages = messages_receivedMessages_; - type setTyping = messages_setTyping_; - type sendMessage = messages_sendMessage_; - type sendMedia = messages_sendMedia_; - type forwardMessages = messages_forwardMessages_; - type reportSpam = messages_reportSpam_; - type getPeerSettings = messages_getPeerSettings_; - type report = messages_report_; - type getChats = messages_getChats_; - type getFullChat = messages_getFullChat_; - type editChatTitle = messages_editChatTitle_; - type editChatPhoto = messages_editChatPhoto_; - type addChatUser = messages_addChatUser_; - type deleteChatUser = messages_deleteChatUser_; - type createChat = messages_createChat_; - type getDhConfig = messages_getDhConfig_; - type requestEncryption = messages_requestEncryption_; - type acceptEncryption = messages_acceptEncryption_; - type discardEncryption = messages_discardEncryption_; - type setEncryptedTyping = messages_setEncryptedTyping_; - type readEncryptedHistory = messages_readEncryptedHistory_; - type sendEncrypted = messages_sendEncrypted_; - type sendEncryptedFile = messages_sendEncryptedFile_; - type sendEncryptedService = messages_sendEncryptedService_; - type receivedQueue = messages_receivedQueue_; - type reportEncryptedSpam = messages_reportEncryptedSpam_; - type readMessageContents = messages_readMessageContents_; - type getStickers = messages_getStickers_; - type getAllStickers = messages_getAllStickers_; - type getWebPagePreview = messages_getWebPagePreview_; - type exportChatInvite = messages_exportChatInvite_; - type checkChatInvite = messages_checkChatInvite_; - type importChatInvite = messages_importChatInvite_; - type getStickerSet = messages_getStickerSet_; - type installStickerSet = messages_installStickerSet_; - type uninstallStickerSet = messages_uninstallStickerSet_; - type startBot = messages_startBot_; - type getMessagesViews = messages_getMessagesViews_; - type editChatAdmin = messages_editChatAdmin_; - type migrateChat = messages_migrateChat_; - type searchGlobal = messages_searchGlobal_; - type reorderStickerSets = messages_reorderStickerSets_; - type getDocumentByHash = messages_getDocumentByHash_; - type getSavedGifs = messages_getSavedGifs_; - type saveGif = messages_saveGif_; - type getInlineBotResults = messages_getInlineBotResults_; - type setInlineBotResults = messages_setInlineBotResults_; - type sendInlineBotResult = messages_sendInlineBotResult_; - type getMessageEditData = messages_getMessageEditData_; - type editMessage = messages_editMessage_; - type editInlineBotMessage = messages_editInlineBotMessage_; - type getBotCallbackAnswer = messages_getBotCallbackAnswer_; - type setBotCallbackAnswer = messages_setBotCallbackAnswer_; - type getPeerDialogs = messages_getPeerDialogs_; - type saveDraft = messages_saveDraft_; - type getAllDrafts = messages_getAllDrafts_; - type getFeaturedStickers = messages_getFeaturedStickers_; - type readFeaturedStickers = messages_readFeaturedStickers_; - type getRecentStickers = messages_getRecentStickers_; - type saveRecentSticker = messages_saveRecentSticker_; - type clearRecentStickers = messages_clearRecentStickers_; - type getArchivedStickers = messages_getArchivedStickers_; - type getMaskStickers = messages_getMaskStickers_; - type getAttachedStickers = messages_getAttachedStickers_; - type setGameScore = messages_setGameScore_; - type setInlineGameScore = messages_setInlineGameScore_; - type getGameHighScores = messages_getGameHighScores_; - type getInlineGameHighScores = messages_getInlineGameHighScores_; - type getCommonChats = messages_getCommonChats_; - type getWebPage = messages_getWebPage_; - type toggleDialogPin = messages_toggleDialogPin_; - type reorderPinnedDialogs = messages_reorderPinnedDialogs_; - type getPinnedDialogs = messages_getPinnedDialogs_; - type setBotShippingResults = messages_setBotShippingResults_; - type setBotPrecheckoutResults = messages_setBotPrecheckoutResults_; - type uploadMedia = messages_uploadMedia_; - type sendScreenshotNotification = messages_sendScreenshotNotification_; - type getFavedStickers = messages_getFavedStickers_; - type faveSticker = messages_faveSticker_; - type getUnreadMentions = messages_getUnreadMentions_; - type readMentions = messages_readMentions_; - type getRecentLocations = messages_getRecentLocations_; - type sendMultiMedia = messages_sendMultiMedia_; - type uploadEncryptedFile = messages_uploadEncryptedFile_; - type searchStickerSets = messages_searchStickerSets_; - type getSplitRanges = messages_getSplitRanges_; - type markDialogUnread = messages_markDialogUnread_; - type getDialogUnreadMarks = messages_getDialogUnreadMarks_; - type clearAllDrafts = messages_clearAllDrafts_; - type updatePinnedMessage = messages_updatePinnedMessage_; - type sendVote = messages_sendVote_; - type getPollResults = messages_getPollResults_; - type getOnlines = messages_getOnlines_; - type editChatAbout = messages_editChatAbout_; - type editChatDefaultBannedRights = messages_editChatDefaultBannedRights_; - type getEmojiKeywords = messages_getEmojiKeywords_; - type getEmojiKeywordsDifference = messages_getEmojiKeywordsDifference_; - type getEmojiKeywordsLanguages = messages_getEmojiKeywordsLanguages_; - type getEmojiURL = messages_getEmojiURL_; - type getSearchCounters = messages_getSearchCounters_; - type requestUrlAuth = messages_requestUrlAuth_; - type acceptUrlAuth = messages_acceptUrlAuth_; - type hidePeerSettingsBar = messages_hidePeerSettingsBar_; - type getScheduledHistory = messages_getScheduledHistory_; - type getScheduledMessages = messages_getScheduledMessages_; - type sendScheduledMessages = messages_sendScheduledMessages_; - type deleteScheduledMessages = messages_deleteScheduledMessages_; - type getPollVotes = messages_getPollVotes_; - type toggleStickerSets = messages_toggleStickerSets_; - type getDialogFilters = messages_getDialogFilters_; - type getSuggestedDialogFilters = messages_getSuggestedDialogFilters_; - type updateDialogFilter = messages_updateDialogFilter_; - type updateDialogFiltersOrder = messages_updateDialogFiltersOrder_; - type getOldFeaturedStickers = messages_getOldFeaturedStickers_; - type getReplies = messages_getReplies_; - type getDiscussionMessage = messages_getDiscussionMessage_; - type readDiscussion = messages_readDiscussion_; - type unpinAllMessages = messages_unpinAllMessages_; - type deleteChat = messages_deleteChat_; - type deletePhoneCallHistory = messages_deletePhoneCallHistory_; - type checkHistoryImport = messages_checkHistoryImport_; - type initHistoryImport = messages_initHistoryImport_; - type uploadImportedMedia = messages_uploadImportedMedia_; - type startHistoryImport = messages_startHistoryImport_; - type getExportedChatInvites = messages_getExportedChatInvites_; - type getExportedChatInvite = messages_getExportedChatInvite_; - type editExportedChatInvite = messages_editExportedChatInvite_; - type deleteRevokedExportedChatInvites = messages_deleteRevokedExportedChatInvites_; - type deleteExportedChatInvite = messages_deleteExportedChatInvite_; - type getAdminsWithInvites = messages_getAdminsWithInvites_; - type getChatInviteImporters = messages_getChatInviteImporters_; - type setHistoryTTL = messages_setHistoryTTL_; - type checkHistoryImportPeer = messages_checkHistoryImportPeer_; - type setChatTheme = messages_setChatTheme_; - type getMessageReadParticipants = messages_getMessageReadParticipants_; - type getSearchResultsCalendar = messages_getSearchResultsCalendar_; - type getSearchResultsPositions = messages_getSearchResultsPositions_; - type hideChatJoinRequest = messages_hideChatJoinRequest_; - type hideAllChatJoinRequests = messages_hideAllChatJoinRequests_; - type toggleNoForwards = messages_toggleNoForwards_; - type saveDefaultSendAs = messages_saveDefaultSendAs_; - type sendReaction = messages_sendReaction_; - type getMessagesReactions = messages_getMessagesReactions_; - type getMessageReactionsList = messages_getMessageReactionsList_; - type setChatAvailableReactions = messages_setChatAvailableReactions_; - type getAvailableReactions = messages_getAvailableReactions_; - type setDefaultReaction = messages_setDefaultReaction_; - type translateText = messages_translateText_; - type getUnreadReactions = messages_getUnreadReactions_; - type readReactions = messages_readReactions_; - type searchSentMedia = messages_searchSentMedia_; - type getAttachMenuBots = messages_getAttachMenuBots_; - type getAttachMenuBot = messages_getAttachMenuBot_; - type toggleBotInAttachMenu = messages_toggleBotInAttachMenu_; - type requestWebView = messages_requestWebView_; - type prolongWebView = messages_prolongWebView_; - type requestSimpleWebView = messages_requestSimpleWebView_; - type sendWebViewResultMessage = messages_sendWebViewResultMessage_; - type sendWebViewData = messages_sendWebViewData_; - type transcribeAudio = messages_transcribeAudio_; - type rateTranscribedAudio = messages_rateTranscribedAudio_; - type getCustomEmojiDocuments = messages_getCustomEmojiDocuments_; - type getEmojiStickers = messages_getEmojiStickers_; - type getFeaturedEmojiStickers = messages_getFeaturedEmojiStickers_; - type reportReaction = messages_reportReaction_; - type getTopReactions = messages_getTopReactions_; - type getRecentReactions = messages_getRecentReactions_; - type clearRecentReactions = messages_clearRecentReactions_; - type getExtendedMedia = messages_getExtendedMedia_; - type setDefaultHistoryTTL = messages_setDefaultHistoryTTL_; - type getDefaultHistoryTTL = messages_getDefaultHistoryTTL_; - type sendBotRequestedPeer = messages_sendBotRequestedPeer_; - type getEmojiGroups = messages_getEmojiGroups_; - type getEmojiStatusGroups = messages_getEmojiStatusGroups_; - type getEmojiProfilePhotoGroups = messages_getEmojiProfilePhotoGroups_; - type searchCustomEmoji = messages_searchCustomEmoji_; - type togglePeerTranslations = messages_togglePeerTranslations_; - type getBotApp = messages_getBotApp_; - type requestAppWebView = messages_requestAppWebView_; - type setChatWallPaper = messages_setChatWallPaper_; - type searchEmojiStickerSets = messages_searchEmojiStickerSets_; - type getSavedDialogs = messages_getSavedDialogs_; - type getSavedHistory = messages_getSavedHistory_; - type deleteSavedHistory = messages_deleteSavedHistory_; - type getPinnedSavedDialogs = messages_getPinnedSavedDialogs_; - type toggleSavedDialogPin = messages_toggleSavedDialogPin_; - type reorderPinnedSavedDialogs = messages_reorderPinnedSavedDialogs_; - type getSavedReactionTags = messages_getSavedReactionTags_; - type updateSavedReactionTag = messages_updateSavedReactionTag_; - type getDefaultTagReactions = messages_getDefaultTagReactions_; - type getOutboxReadDate = messages_getOutboxReadDate_; - type getQuickReplies = messages_getQuickReplies_; - type reorderQuickReplies = messages_reorderQuickReplies_; - type checkQuickReplyShortcut = messages_checkQuickReplyShortcut_; - type editQuickReplyShortcut = messages_editQuickReplyShortcut_; - type deleteQuickReplyShortcut = messages_deleteQuickReplyShortcut_; - type getQuickReplyMessages = messages_getQuickReplyMessages_; - type sendQuickReplyMessages = messages_sendQuickReplyMessages_; - type deleteQuickReplyMessages = messages_deleteQuickReplyMessages_; - type toggleDialogFilterTags = messages_toggleDialogFilterTags_; - type getMyStickers = messages_getMyStickers_; - } - namespace updates { - type getState = updates_getState_; - type getDifference = updates_getDifference_; - type getChannelDifference = updates_getChannelDifference_; - } - namespace photos { - type updateProfilePhoto = photos_updateProfilePhoto_; - type uploadProfilePhoto = photos_uploadProfilePhoto_; - type deletePhotos = photos_deletePhotos_; - type getUserPhotos = photos_getUserPhotos_; - type uploadContactProfilePhoto = photos_uploadContactProfilePhoto_; - } - namespace upload { - type saveFilePart = upload_saveFilePart_; - type getFile = upload_getFile_; - type saveBigFilePart = upload_saveBigFilePart_; - type getWebFile = upload_getWebFile_; - type getCdnFile = upload_getCdnFile_; - type reuploadCdnFile = upload_reuploadCdnFile_; - type getCdnFileHashes = upload_getCdnFileHashes_; - type getFileHashes = upload_getFileHashes_; - } - namespace help { - type getConfig = help_getConfig_; - type getNearestDc = help_getNearestDc_; - type getAppUpdate = help_getAppUpdate_; - type getInviteText = help_getInviteText_; - type getSupport = help_getSupport_; - type setBotUpdatesStatus = help_setBotUpdatesStatus_; - type getCdnConfig = help_getCdnConfig_; - type getRecentMeUrls = help_getRecentMeUrls_; - type getTermsOfServiceUpdate = help_getTermsOfServiceUpdate_; - type acceptTermsOfService = help_acceptTermsOfService_; - type getDeepLinkInfo = help_getDeepLinkInfo_; - type getAppConfig = help_getAppConfig_; - type saveAppLog = help_saveAppLog_; - type getPassportConfig = help_getPassportConfig_; - type getSupportName = help_getSupportName_; - type getUserInfo = help_getUserInfo_; - type editUserInfo = help_editUserInfo_; - type getPromoData = help_getPromoData_; - type hidePromoData = help_hidePromoData_; - type dismissSuggestion = help_dismissSuggestion_; - type getCountriesList = help_getCountriesList_; - type getPremiumPromo = help_getPremiumPromo_; - type getPeerColors = help_getPeerColors_; - type getPeerProfileColors = help_getPeerProfileColors_; - type getTimezonesList = help_getTimezonesList_; - } - namespace channels { - type readHistory = channels_readHistory_; - type deleteMessages = channels_deleteMessages_; - type reportSpam = channels_reportSpam_; - type getMessages = channels_getMessages_; - type getParticipants = channels_getParticipants_; - type getParticipant = channels_getParticipant_; - type getChannels = channels_getChannels_; - type getFullChannel = channels_getFullChannel_; - type createChannel = channels_createChannel_; - type editAdmin = channels_editAdmin_; - type editTitle = channels_editTitle_; - type editPhoto = channels_editPhoto_; - type checkUsername = channels_checkUsername_; - type updateUsername = channels_updateUsername_; - type joinChannel = channels_joinChannel_; - type leaveChannel = channels_leaveChannel_; - type inviteToChannel = channels_inviteToChannel_; - type deleteChannel = channels_deleteChannel_; - type exportMessageLink = channels_exportMessageLink_; - type toggleSignatures = channels_toggleSignatures_; - type getAdminedPublicChannels = channels_getAdminedPublicChannels_; - type editBanned = channels_editBanned_; - type getAdminLog = channels_getAdminLog_; - type setStickers = channels_setStickers_; - type readMessageContents = channels_readMessageContents_; - type deleteHistory = channels_deleteHistory_; - type togglePreHistoryHidden = channels_togglePreHistoryHidden_; - type getLeftChannels = channels_getLeftChannels_; - type getGroupsForDiscussion = channels_getGroupsForDiscussion_; - type setDiscussionGroup = channels_setDiscussionGroup_; - type editCreator = channels_editCreator_; - type editLocation = channels_editLocation_; - type toggleSlowMode = channels_toggleSlowMode_; - type getInactiveChannels = channels_getInactiveChannels_; - type convertToGigagroup = channels_convertToGigagroup_; - type viewSponsoredMessage = channels_viewSponsoredMessage_; - type getSponsoredMessages = channels_getSponsoredMessages_; - type getSendAs = channels_getSendAs_; - type deleteParticipantHistory = channels_deleteParticipantHistory_; - type toggleJoinToSend = channels_toggleJoinToSend_; - type toggleJoinRequest = channels_toggleJoinRequest_; - type reorderUsernames = channels_reorderUsernames_; - type toggleUsername = channels_toggleUsername_; - type deactivateAllUsernames = channels_deactivateAllUsernames_; - type toggleForum = channels_toggleForum_; - type createForumTopic = channels_createForumTopic_; - type getForumTopics = channels_getForumTopics_; - type getForumTopicsByID = channels_getForumTopicsByID_; - type editForumTopic = channels_editForumTopic_; - type updatePinnedForumTopic = channels_updatePinnedForumTopic_; - type deleteTopicHistory = channels_deleteTopicHistory_; - type reorderPinnedForumTopics = channels_reorderPinnedForumTopics_; - type toggleAntiSpam = channels_toggleAntiSpam_; - type reportAntiSpamFalsePositive = channels_reportAntiSpamFalsePositive_; - type toggleParticipantsHidden = channels_toggleParticipantsHidden_; - type clickSponsoredMessage = channels_clickSponsoredMessage_; - type updateColor = channels_updateColor_; - type toggleViewForumAsMessages = channels_toggleViewForumAsMessages_; - type getChannelRecommendations = channels_getChannelRecommendations_; - type updateEmojiStatus = channels_updateEmojiStatus_; - type setBoostsToUnblockRestrictions = channels_setBoostsToUnblockRestrictions_; - type setEmojiStickers = channels_setEmojiStickers_; - type reportSponsoredMessage = channels_reportSponsoredMessage_; - type restrictSponsoredMessages = channels_restrictSponsoredMessages_; - } - namespace bots { - type sendCustomRequest = bots_sendCustomRequest_; - type answerWebhookJSONQuery = bots_answerWebhookJSONQuery_; - type setBotCommands = bots_setBotCommands_; - type resetBotCommands = bots_resetBotCommands_; - type getBotCommands = bots_getBotCommands_; - type setBotMenuButton = bots_setBotMenuButton_; - type getBotMenuButton = bots_getBotMenuButton_; - type setBotBroadcastDefaultAdminRights = bots_setBotBroadcastDefaultAdminRights_; - type setBotGroupDefaultAdminRights = bots_setBotGroupDefaultAdminRights_; - type setBotInfo = bots_setBotInfo_; - type getBotInfo = bots_getBotInfo_; - type reorderUsernames = bots_reorderUsernames_; - type toggleUsername = bots_toggleUsername_; - type canSendMessage = bots_canSendMessage_; - type allowSendMessage = bots_allowSendMessage_; - type invokeWebViewCustomMethod = bots_invokeWebViewCustomMethod_; - } - namespace payments { - type getPaymentForm = payments_getPaymentForm_; - type getPaymentReceipt = payments_getPaymentReceipt_; - type validateRequestedInfo = payments_validateRequestedInfo_; - type sendPaymentForm = payments_sendPaymentForm_; - type getSavedInfo = payments_getSavedInfo_; - type clearSavedInfo = payments_clearSavedInfo_; - type getBankCardData = payments_getBankCardData_; - type exportInvoice = payments_exportInvoice_; - type assignAppStoreTransaction = payments_assignAppStoreTransaction_; - type assignPlayMarketTransaction = payments_assignPlayMarketTransaction_; - type canPurchasePremium = payments_canPurchasePremium_; - type getPremiumGiftCodeOptions = payments_getPremiumGiftCodeOptions_; - type checkGiftCode = payments_checkGiftCode_; - type applyGiftCode = payments_applyGiftCode_; - type getGiveawayInfo = payments_getGiveawayInfo_; - type launchPrepaidGiveaway = payments_launchPrepaidGiveaway_; - } - namespace stickers { - type createStickerSet = stickers_createStickerSet_; - type removeStickerFromSet = stickers_removeStickerFromSet_; - type changeStickerPosition = stickers_changeStickerPosition_; - type addStickerToSet = stickers_addStickerToSet_; - type setStickerSetThumb = stickers_setStickerSetThumb_; - type checkShortName = stickers_checkShortName_; - type suggestShortName = stickers_suggestShortName_; - type changeSticker = stickers_changeSticker_; - type renameStickerSet = stickers_renameStickerSet_; - type deleteStickerSet = stickers_deleteStickerSet_; - type replaceSticker = stickers_replaceSticker_; - } - namespace phone { - type getCallConfig = phone_getCallConfig_; - type requestCall = phone_requestCall_; - type acceptCall = phone_acceptCall_; - type confirmCall = phone_confirmCall_; - type receivedCall = phone_receivedCall_; - type discardCall = phone_discardCall_; - type setCallRating = phone_setCallRating_; - type saveCallDebug = phone_saveCallDebug_; - type sendSignalingData = phone_sendSignalingData_; - type createGroupCall = phone_createGroupCall_; - type joinGroupCall = phone_joinGroupCall_; - type leaveGroupCall = phone_leaveGroupCall_; - type inviteToGroupCall = phone_inviteToGroupCall_; - type discardGroupCall = phone_discardGroupCall_; - type toggleGroupCallSettings = phone_toggleGroupCallSettings_; - type getGroupCall = phone_getGroupCall_; - type getGroupParticipants = phone_getGroupParticipants_; - type checkGroupCall = phone_checkGroupCall_; - type toggleGroupCallRecord = phone_toggleGroupCallRecord_; - type editGroupCallParticipant = phone_editGroupCallParticipant_; - type editGroupCallTitle = phone_editGroupCallTitle_; - type getGroupCallJoinAs = phone_getGroupCallJoinAs_; - type exportGroupCallInvite = phone_exportGroupCallInvite_; - type toggleGroupCallStartSubscription = phone_toggleGroupCallStartSubscription_; - type startScheduledGroupCall = phone_startScheduledGroupCall_; - type saveDefaultGroupCallJoinAs = phone_saveDefaultGroupCallJoinAs_; - type joinGroupCallPresentation = phone_joinGroupCallPresentation_; - type leaveGroupCallPresentation = phone_leaveGroupCallPresentation_; - type getGroupCallStreamChannels = phone_getGroupCallStreamChannels_; - type getGroupCallStreamRtmpUrl = phone_getGroupCallStreamRtmpUrl_; - type saveCallLog = phone_saveCallLog_; - } - namespace langpack { - type getLangPack = langpack_getLangPack_; - type getStrings = langpack_getStrings_; - type getDifference = langpack_getDifference_; - type getLanguages = langpack_getLanguages_; - type getLanguage = langpack_getLanguage_; - } - namespace folders { - type editPeerFolders = folders_editPeerFolders_; - } - namespace stats { - type getBroadcastStats = stats_getBroadcastStats_; - type loadAsyncGraph = stats_loadAsyncGraph_; - type getMegagroupStats = stats_getMegagroupStats_; - type getMessagePublicForwards = stats_getMessagePublicForwards_; - type getMessageStats = stats_getMessageStats_; - type getStoryStats = stats_getStoryStats_; - type getStoryPublicForwards = stats_getStoryPublicForwards_; - type getBroadcastRevenueStats = stats_getBroadcastRevenueStats_; - type getBroadcastRevenueWithdrawalUrl = stats_getBroadcastRevenueWithdrawalUrl_; - type getBroadcastRevenueTransactions = stats_getBroadcastRevenueTransactions_; - } - namespace chatlists { - type exportChatlistInvite = chatlists_exportChatlistInvite_; - type deleteExportedInvite = chatlists_deleteExportedInvite_; - type editExportedInvite = chatlists_editExportedInvite_; - type getExportedInvites = chatlists_getExportedInvites_; - type checkChatlistInvite = chatlists_checkChatlistInvite_; - type joinChatlistInvite = chatlists_joinChatlistInvite_; - type getChatlistUpdates = chatlists_getChatlistUpdates_; - type joinChatlistUpdates = chatlists_joinChatlistUpdates_; - type hideChatlistUpdates = chatlists_hideChatlistUpdates_; - type getLeaveChatlistSuggestions = chatlists_getLeaveChatlistSuggestions_; - type leaveChatlist = chatlists_leaveChatlist_; - } - namespace stories { - type canSendStory = stories_canSendStory_; - type sendStory = stories_sendStory_; - type editStory = stories_editStory_; - type deleteStories = stories_deleteStories_; - type togglePinned = stories_togglePinned_; - type getAllStories = stories_getAllStories_; - type getPinnedStories = stories_getPinnedStories_; - type getStoriesArchive = stories_getStoriesArchive_; - type getStoriesByID = stories_getStoriesByID_; - type toggleAllStoriesHidden = stories_toggleAllStoriesHidden_; - type readStories = stories_readStories_; - type incrementStoryViews = stories_incrementStoryViews_; - type getStoryViewsList = stories_getStoryViewsList_; - type getStoriesViews = stories_getStoriesViews_; - type exportStoryLink = stories_exportStoryLink_; - type report = stories_report_; - type activateStealthMode = stories_activateStealthMode_; - type sendReaction = stories_sendReaction_; - type getPeerStories = stories_getPeerStories_; - type getAllReadPeerStories = stories_getAllReadPeerStories_; - type getPeerMaxIDs = stories_getPeerMaxIDs_; - type getChatsToSend = stories_getChatsToSend_; - type togglePeerStoriesHidden = stories_togglePeerStoriesHidden_; - type getStoryReactionsList = stories_getStoryReactionsList_; - } - namespace premium { - type getBoostsList = premium_getBoostsList_; - type getMyBoosts = premium_getMyBoosts_; - type applyBoost = premium_applyBoost_; - type getBoostsStatus = premium_getBoostsStatus_; - type getUserBoosts = premium_getUserBoosts_; - } - namespace smsjobs { - type isEligibleToJoin = smsjobs_isEligibleToJoin_; - type join = smsjobs_join_; - type leave = smsjobs_leave_; - type updateSettings = smsjobs_updateSettings_; - type getStatus = smsjobs_getStatus_; - type getSmsJob = smsjobs_getSmsJob_; - type finishJob = smsjobs_finishJob_; - } - namespace fragment { - type getCollectibleInfo = fragment_getCollectibleInfo_; - } -} diff --git a/tl/4_tl_reader.ts b/tl/3_tl_reader.ts similarity index 79% rename from tl/4_tl_reader.ts rename to tl/3_tl_reader.ts index 997f9e17..4b6b9a46 100644 --- a/tl/4_tl_reader.ts +++ b/tl/3_tl_reader.ts @@ -17,13 +17,13 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ +// deno-lint-ignore-file no-explicit-any import { TLError, TLRawReader } from "./0_tl_raw_reader.ts"; -import { paramDesc, TLObject } from "./1_tl_object.ts"; -import { map } from "./2_types.ts"; -import { deserialize } from "./3_deserialize.ts"; +import { AnyObject, getType, getTypeName } from "./0_api.ts"; +import { deserialize } from "./2_deserialize.ts"; -export type ReadObject = boolean | TLObject | Array; +export type ReadObject = boolean | AnyObject | Array; export class TLReader extends TLRawReader { readObject(id?: number): ReadObject { @@ -32,7 +32,7 @@ export class TLReader extends TLRawReader { } if (id == 0x1CB5C415) { const count = this.readInt32(); - const items = new Array(); + const items = new Array(); for (let i = 0; i < count; i++) { items.push(this.readObject()); } @@ -42,9 +42,9 @@ export class TLReader extends TLRawReader { } else if (id == 0xbc799737) { return false; } - const constructor = map.get(id); + const constructor = getTypeName(id); if (constructor) { - return deserialize(this, constructor[paramDesc], constructor); + return deserialize(this, getType(constructor)![1], constructor); } throw new TLError(`Unknown constructor ${id.toString(16)}`); } diff --git a/tl/3_utilities.ts b/tl/3_utilities.ts index 56f62091..8e8cf179 100644 --- a/tl/3_utilities.ts +++ b/tl/3_utilities.ts @@ -20,34 +20,34 @@ import { unreachable } from "../0_deps.ts"; import { ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { enums, types } from "./2_types.ts"; +import * as Api from "./0_api.ts"; export function getChannelChatId(channelId: bigint): number { return ZERO_CHANNEL_ID + -Number(channelId); } // convenience types -export type AnyEntity = types.User | types.Channel | types.ChannelForbidden | types.Chat | types.ChatForbidden; +export type AnyEntity = Api.user | Api.channel | Api.channelForbidden | Api.chat | Api.chatForbidden; -export function peerToChatId(peer: enums.Peer | enums.InputPeer | AnyEntity | types.ChannelFull | types.UserFull | types.ChatFull | { channel_id: bigint } | { user_id: bigint } | { chat_id: bigint }): number { - if (peer instanceof types.PeerUser || peer instanceof types.InputPeerUser || peer instanceof types.User || peer instanceof types.UserFull || "user_id" in peer) { +export function peerToChatId(peer: Api.Peer | Api.InputPeer | AnyEntity | Api.channelFull | Api.UserFull | Api.chatFull | { channel_id: bigint } | { user_id: bigint } | { chat_id: bigint }): number { + if (("_" in peer && (peer._ == "peerUser" || peer._ == "inputPeerUser" || peer._ == "user" || peer._ == "userFull")) || "user_id" in peer) { return Number("id" in peer ? peer.id : peer.user_id); - } else if (peer instanceof types.PeerChat || peer instanceof types.InputPeerChat || peer instanceof types.Chat || peer instanceof types.ChatForbidden || peer instanceof types.ChatFull || "chat_id" in peer) { + } else if (("_" in peer && (peer._ == "peerChat" || peer._ == "inputPeerChat" || peer._ == "chat" || peer._ == "chatForbidden" || peer._ == "chatFull")) || "chat_id" in peer) { return -Number("id" in peer ? peer.id : peer.chat_id); - } else if (peer instanceof types.PeerChannel || peer instanceof types.InputPeerChannel || peer instanceof types.Channel || peer instanceof types.ChannelForbidden || peer instanceof types.ChannelFull || "channel_id" in peer) { + } else if (("_" in peer && (peer._ == "peerChannel" || peer._ == "inputPeerChannel" || peer._ == "channel" || peer._ == "channelForbidden" || peer._ == "channelFull")) || "channel_id" in peer) { return getChannelChatId("id" in peer ? peer.id : peer.channel_id); } else { unreachable(); } } -export function chatIdToPeer(chatId: number): enums.Peer { +export function chatIdToPeer(chatId: number): Api.Peer { if (chatId > 0) { - return new types.PeerUser({ user_id: BigInt(chatId) }); + return { _: "peerUser", user_id: BigInt(chatId) }; } else if (chatId > ZERO_CHANNEL_ID) { - return new types.PeerChat({ chat_id: BigInt(Math.abs(chatId)) }); + return { _: "peerChat", chat_id: BigInt(Math.abs(chatId)) }; } else { - return new types.PeerChannel({ channel_id: BigInt(ZERO_CHANNEL_ID - chatId) }); + return { _: "peerChannel", channel_id: BigInt(ZERO_CHANNEL_ID - chatId) }; } } @@ -74,13 +74,13 @@ export function getChatIdPeerType(chatId: number): "user" | "chat" | "channel" { } } -export function inputPeerToPeer(inputPeer: enums.InputPeer): enums.Peer { +export function inputPeerToPeer(inputPeer: Api.InputPeer): Api.Peer { if ("user_id" in inputPeer) { - return new types.PeerUser(inputPeer); + return { ...inputPeer, _: "peerUser" }; } else if ("chat_id" in inputPeer) { - return new types.PeerChat(inputPeer); + return { ...inputPeer, _: "peerChat" }; } else if ("channel_id" in inputPeer) { - return new types.PeerChannel(inputPeer); + return { ...inputPeer, _: "peerChannel" }; } else { unreachable(); } diff --git a/tl/3_functions_test.ts b/tl/4_rpc_result.ts similarity index 61% rename from tl/3_functions_test.ts rename to tl/4_rpc_result.ts index 77ccacaa..42613a11 100644 --- a/tl/3_functions_test.ts +++ b/tl/4_rpc_result.ts @@ -18,12 +18,22 @@ * along with this program. If not, see . */ -import { assert } from "../0_deps.ts"; -import { TLObject } from "./1_tl_object.ts"; -import { functions } from "./3_functions.ts"; +import { TLReader } from "./3_tl_reader.ts"; -Deno.test("instanceof", () => { - const ping = new functions.ping({ ping_id: 0xFFn }); - assert(ping instanceof TLObject); - assert(ping instanceof functions.Function); -}); +// rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult; + +export const RPC_RESULT_ID = 0xF35C6D01; + +export interface rpc_result { + _: "rpc_result"; + req_msg_id: bigint; + // deno-lint-ignore no-explicit-any + result: any; +} + +export function deserializeRpcResult(buffer: Uint8Array): rpc_result { + const reader = new TLReader(buffer); + const messageId = reader.readInt64(); + const result = reader.readObject(); + return { _: "rpc_result", req_msg_id: messageId, result }; +} diff --git a/tl/5_tl_writer.ts b/tl/4_tl_writer.ts similarity index 86% rename from tl/5_tl_writer.ts rename to tl/4_tl_writer.ts index f7e159fc..014c0562 100644 --- a/tl/5_tl_writer.ts +++ b/tl/4_tl_writer.ts @@ -20,8 +20,8 @@ import { VECTOR_CONSTRUCTOR } from "../1_utilities.ts"; import { TLRawWriter } from "./0_tl_raw_writer.ts"; -import { serialize } from "./1_tl_object.ts"; -import { ReadObject } from "./4_tl_reader.ts"; +import { serialize } from "./2_serialize.ts"; +import { ReadObject } from "./3_tl_reader.ts"; export class TLWriter extends TLRawWriter { writeObject(object: ReadObject): typeof this { @@ -33,12 +33,12 @@ export class TLWriter extends TLRawWriter { } } else if (typeof object === "boolean") { if (object) { - this.writeInt32(0x997275b5, false); + this.writeInt32(0x997275B5, false); } else { - this.writeInt32(0xbc799737, false); + this.writeInt32(0xBC799737, false); } } else { - this.write(object[serialize]()); + this.write(serialize(object)); } return this; } diff --git a/tl/5_message.ts b/tl/5_message.ts new file mode 100644 index 00000000..78aae85b --- /dev/null +++ b/tl/5_message.ts @@ -0,0 +1,116 @@ +/** + * MTKruto - Cross-runtime JavaScript library for building Telegram clients + * Copyright (C) 2023-2024 Roj + * + * This file is part of MTKruto. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import { TLReader } from "./3_tl_reader.ts"; +import { TLWriter } from "./4_tl_writer.ts"; +import { deserializeRpcResult, rpc_result, RPC_RESULT_ID } from "./4_rpc_result.ts"; +import { serialize } from "./2_serialize.ts"; +import { AnyObject } from "./0_api.ts"; + +// message msg_id:long seqno:int bytes:int body:Object = Message; + +export interface message { + _: "message"; + msg_id: bigint; + seqno: number; + body: AnyObject | msg_container | rpc_result; +} + +export function calculateLength(object: Exclude): number { + let length = 0; + if (Array.isArray(object)) { + length += 32 / 8; // vector constructor + length += 32 / 8; // number of items + for (const item of object) { + length += calculateLength(item); + } + } else if (typeof object === "boolean") { + length += 32 / 8; // constructor + } else if (object._ == "msg_container") { + length += serializeMsgContainer(object).length; + } else { + length += serialize(object).length; + } + return length; +} + +export function serializeMessage(message: message): Uint8Array { + if (message.body._ == "rpc_result") { + throw new Error("Not applicable"); + } + const writer = new TLWriter() + .writeInt64(message.msg_id) + .writeInt32(message.seqno) + .writeInt32(calculateLength(message.body)); + if (message.body._ == "msg_container") { + writer.write(serializeMsgContainer(message.body)); + } else { + writer.writeObject(message.body); + } + return writer.buffer; +} + +export function deserializeMessage(reader: TLReader): message { + const id_ = reader.readInt64(); + const seqno = reader.readInt32(); + const length = reader.readInt32(); + reader = new TLReader(reader.read(length)); + const cid = reader.readInt32(false); + let body: message["body"]; + { + if (cid == RPC_RESULT_ID) { + body = deserializeRpcResult(reader.buffer); + } else if (cid == MSG_CONTAINER_ID) { + body = deserializeMsgContainer(reader.buffer); + } else { + body = reader.readObject(cid) as AnyObject; + } + } + return { _: "message", msg_id: id_, seqno, body }; +} + +// msg_container#73f1f8dc messages:vector<%Message> = MessageContainer; + +export interface msg_container { + _: "msg_container"; + messages: message[]; +} + +export const MSG_CONTAINER_ID = 0x73F1F8DC; + +export function serializeMsgContainer(msgContainer: msg_container): Uint8Array { + const writer = new TLWriter(); + writer.writeInt32(MSG_CONTAINER_ID, false); + writer.writeInt32(msgContainer.messages.length); + for (const message of msgContainer.messages) { + writer.write(serializeMessage(message)); + } + return writer.buffer; +} + +export function deserializeMsgContainer(buffer: Uint8Array): msg_container { + const reader = new TLReader(buffer); + const length = reader.readInt32(); + const messages = new Array(); + for (let i = 0; i < length; i++) { + messages.push(deserializeMessage(reader)); + } + return { _: "msg_container", messages }; +} diff --git a/tl/7_message_test.ts b/tl/5_message_test.ts similarity index 79% rename from tl/7_message_test.ts rename to tl/5_message_test.ts index b5aa93a6..b2bce751 100644 --- a/tl/7_message_test.ts +++ b/tl/5_message_test.ts @@ -19,11 +19,12 @@ */ import { assertEquals } from "../0_deps.ts"; -import { types } from "../2_tl.ts"; -import { calculateLength } from "./7_message.ts"; +import { Api } from "../2_tl.ts"; +import { calculateLength } from "./5_message.ts"; Deno.test("calculateLength", () => { - const resPq = new types.ResPQ({ // 4 cid + const resPq: Api.resPQ = { + _: "resPQ", // 4 cid nonce: 1n, // 16 long server_nonce: 2n, // 16 long pq: new Uint8Array(1024), // 4 len, 1024 bytes @@ -32,17 +33,16 @@ Deno.test("calculateLength", () => { 2n, // 8 long 3n, // 8 long ], - }); - const user = new types.User( // 4 cid - { id: 0n }, // 8 long - ); // 4 flags, 4 flags2 - const vector = [resPq, user]; + }; + const user: Api.user = { + _: "user", // 4 cid + id: 0n, // 8 long + // 4 flags, 4 flags2 + }; const resPqExpectedLength = 1096; const userExpectedLength = 20; - const vectorExpectedLength = 1124; assertEquals(calculateLength(resPq), resPqExpectedLength); assertEquals(calculateLength(user), userExpectedLength); - assertEquals(calculateLength(vector), vectorExpectedLength); }); diff --git a/tl/6_rpc_result.ts b/tl/6_rpc_result.ts deleted file mode 100644 index ba0d1f47..00000000 --- a/tl/6_rpc_result.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import { id, name } from "./1_tl_object.ts"; -import { ReadObject, TLReader } from "./4_tl_reader.ts"; - -export class RPCResult { - static get [id](): number { - return 0xF35C6D01; - } - - get [name](): string { - return "rpc_result"; - } - - constructor( - public readonly messageId: bigint, - public readonly result: ReadObject, - ) { - } - - static deserialize(buffer: Uint8Array): RPCResult { - const reader = new TLReader(buffer); - const messageId = reader.readInt64(); - const result = reader.readObject(); - return new RPCResult(messageId, result); - } -} diff --git a/tl/7_message.ts b/tl/7_message.ts deleted file mode 100644 index 9d4c739c..00000000 --- a/tl/7_message.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import { id, serialize } from "./1_tl_object.ts"; -import { ReadObject, TLReader } from "./4_tl_reader.ts"; -import { TLWriter } from "./5_tl_writer.ts"; -import { RPCResult } from "./6_rpc_result.ts"; - -export function calculateLength(object: Message_ | ReadObject): number { - let length = 0; - if (Array.isArray(object)) { - length += 32 / 8; // vector constructor - length += 32 / 8; // number of items - for (const item of object) { - length += calculateLength(item); - } - } else if (typeof object === "boolean") { - length += 32 / 8; // constructor - } else { - length += object[serialize]().length; - } - return length; -} - -export class Message_ { - constructor( - public readonly id: bigint, - public readonly seqNo: number, - public readonly body: ReadObject | RPCResult, - ) { - } - - [serialize](): Uint8Array { - if (this.body instanceof RPCResult) { - throw new Error("Not applicable"); - } - return new TLWriter() - .writeInt64(this.id) - .writeInt32(this.seqNo) - .writeInt32(calculateLength(this.body)) - .writeObject(this.body) - .buffer; - } - - static deserialize(reader: TLReader): Message_ { - const id_ = reader.readInt64(); - const seqNo = reader.readInt32(); - const length = reader.readInt32(); - reader = new TLReader(reader.read(length)); - const cid = reader.readInt32(false); - let body: ReadObject | RPCResult; - { - if (cid == RPCResult[id]) { - body = RPCResult.deserialize(reader.buffer); - } else { - body = reader.readObject(cid); - } - } - return new Message_(id_, seqNo, body); - } -} diff --git a/tl/8_message_container.ts b/tl/8_message_container.ts deleted file mode 100644 index c98aded2..00000000 --- a/tl/8_message_container.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * MTKruto - Cross-runtime JavaScript library for building Telegram clients - * Copyright (C) 2023-2024 Roj - * - * This file is part of MTKruto. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -import { id, name, serialize } from "./1_tl_object.ts"; -import { TLReader } from "./4_tl_reader.ts"; -import { TLWriter } from "./5_tl_writer.ts"; -import { calculateLength, Message_ } from "./7_message.ts"; - -export class MessageContainer { - static get [id](): number { - return 0x73F1F8DC; - } - - get [name](): string { - return "msg_container"; - } - - constructor(public readonly id: bigint, public readonly seqNo: number, public messages: Message_[]) { - } - - [serialize](): Uint8Array { - const writer = new TLWriter(); - writer.writeInt64(this.id); - writer.writeInt32(this.seqNo); - writer.writeInt32(8 + this.messages.map(calculateLength).reduce((a, b) => a + b)); - writer.writeInt32(MessageContainer[id], false); - writer.writeInt32(this.messages.length); - for (const message of this.messages) { - writer.write(message[serialize]()); - } - return writer.buffer; - } - - static deserialize(buffer: Uint8Array): Message_[] { - const reader = new TLReader(buffer); - const length = reader.readInt32(); - const messages = new Array(); - for (let i = 0; i < length; i++) { - messages.push(Message_.deserialize(reader)); - } - return messages; - } -} diff --git a/types/0_birthday.ts b/types/0_birthday.ts index 7b16330b..c7752a21 100644 --- a/types/0_birthday.ts +++ b/types/0_birthday.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A user's birthday. */ export interface Birthday { @@ -27,7 +27,7 @@ export interface Birthday { year?: number; } -export function constructBirthday(birthday: types.Birthday): Birthday { +export function constructBirthday(birthday: Api.birthday): Birthday { return { day: birthday.day, month: birthday.month, diff --git a/types/0_callback_query_answer.ts b/types/0_callback_query_answer.ts index ad72cb91..9d2b3931 100644 --- a/types/0_callback_query_answer.ts +++ b/types/0_callback_query_answer.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** An answer to a callback query. */ export interface CallbackQueryAnswer { @@ -30,7 +30,7 @@ export interface CallbackQueryAnswer { url: string; } -export function constructCallbackQueryAnswer(answer: types.messages.BotCallbackAnswer): CallbackQueryAnswer { +export function constructCallbackQueryAnswer(answer: Api.messages_botCallbackAnswer): CallbackQueryAnswer { return { alert: !!answer.alert, text: answer.message ?? "", diff --git a/types/0_chat_administrator_rights.ts b/types/0_chat_administrator_rights.ts index 310c3c43..39fe05b9 100644 --- a/types/0_chat_administrator_rights.ts +++ b/types/0_chat_administrator_rights.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { enums, types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** The rights of a chat administrator. */ export interface ChatAdministratorRights { @@ -48,7 +48,7 @@ export interface ChatAdministratorRights { canManageTopics?: boolean; } -export function constructChatAdministratorRights(rights_: enums.ChatAdminRights): ChatAdministratorRights { +export function constructChatAdministratorRights(rights_: Api.ChatAdminRights): ChatAdministratorRights { const rights: ChatAdministratorRights = { isAnonymous: rights_.anonymous || false, canManageChat: rights_.other || false, @@ -76,15 +76,6 @@ export function constructChatAdministratorRights(rights_: enums.ChatAdminRights) return rights; } -export function chatAdministratorRightsToTlObject(rights: ChatAdministratorRights): types.ChatAdminRights { - return new types.ChatAdminRights({ - anonymous: rights.isAnonymous || undefined, - other: rights.canManageChat || undefined, - delete_messages: rights.canDeleteMessages || undefined, - manage_call: rights.canManageChat || undefined, - ban_users: rights.canRestrictMembers || undefined, - add_admins: rights.canPromoteMembers || undefined, - change_info: rights.canChangeInfo || undefined, - invite_users: rights.canInviteUsers || undefined, - }); +export function chatAdministratorRightsToTlObject(rights: ChatAdministratorRights): Api.chatAdminRights { + return { _: "chatAdminRights", anonymous: rights.isAnonymous || undefined, other: rights.canManageChat || undefined, delete_messages: rights.canDeleteMessages || undefined, manage_call: rights.canManageChat || undefined, ban_users: rights.canRestrictMembers || undefined, add_admins: rights.canPromoteMembers || undefined, change_info: rights.canChangeInfo || undefined, invite_users: rights.canInviteUsers || undefined }; } diff --git a/types/0_chat_member_rights.ts b/types/0_chat_member_rights.ts index 12d77b97..874915aa 100644 --- a/types/0_chat_member_rights.ts +++ b/types/0_chat_member_rights.ts @@ -19,7 +19,7 @@ */ import { toUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** The rights of a chat member. */ export interface ChatMemberRights { @@ -59,7 +59,7 @@ export interface ChatMemberRights { canManageTopics?: boolean; } -export function constructChatMemberRights(rights: types.ChatBannedRights): ChatMemberRights { +export function constructChatMemberRights(rights: Api.chatBannedRights): ChatMemberRights { return { canSendMessages: rights.send_messages ? true : false, canSendAudio: rights.send_audios ? true : false, @@ -81,8 +81,9 @@ export function constructChatMemberRights(rights: types.ChatBannedRights): ChatM }; } -export function chatMemberRightsToTlObject(rights?: ChatMemberRights, untilDate?: Date): types.ChatBannedRights { - return new types.ChatBannedRights({ +export function chatMemberRightsToTlObject(rights?: ChatMemberRights, untilDate?: Date): Api.chatBannedRights { + return { + _: "chatBannedRights", until_date: untilDate ? toUnixTimestamp(untilDate) : 0, send_messages: rights?.canSendMessages ? true : undefined, send_audios: rights?.canSendAudio ? true : undefined, @@ -101,5 +102,5 @@ export function chatMemberRightsToTlObject(rights?: ChatMemberRights, untilDate? invite_users: rights?.canInviteUsers ? true : undefined, pin_messages: rights?.canPinMessages ? true : undefined, manage_topics: rights?.canManageTopics ? true : undefined, - }); + }; } diff --git a/types/0_chat_photo.ts b/types/0_chat_photo.ts index 531fbc45..cff7af1d 100644 --- a/types/0_chat_photo.ts +++ b/types/0_chat_photo.ts @@ -19,7 +19,7 @@ */ import { cleanObject } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { FileId, FileType, PhotoSourceType, serializeFileId, toUniqueFileId } from "./_file_id.ts"; /** A chat photo. */ @@ -38,7 +38,7 @@ export interface ChatPhoto { personal: boolean; } -export function constructChatPhoto(photo: types.UserProfilePhoto | types.ChatPhoto, chatId: number, chatAccessHash: bigint): ChatPhoto { +export function constructChatPhoto(photo: Api.userProfilePhoto | Api.chatPhoto, chatId: number, chatAccessHash: bigint): ChatPhoto { const smallFileId_: FileId = { type: FileType.ProfilePhoto, dcId: photo.dc_id, @@ -55,7 +55,7 @@ export function constructChatPhoto(photo: types.UserProfilePhoto | types.ChatPho const bigFileId = serializeFileId(bigFileId_); const bigFileUniqueId = toUniqueFileId(bigFileId_); - if (photo instanceof types.ChatPhoto) { + if (is("chatPhoto", photo)) { return cleanObject({ smallFileId, smallFileUniqueId, diff --git a/types/0_contact.ts b/types/0_contact.ts index 758fa2d9..f5228df6 100644 --- a/types/0_contact.ts +++ b/types/0_contact.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A shared contact. */ export interface Contact { @@ -34,7 +34,7 @@ export interface Contact { vcard?: string; } -export function constructContact(contact: types.MessageMediaContact): Contact { +export function constructContact(contact: Api.messageMediaContact): Contact { return { phoneNumber: contact.phone_number, firstName: contact.first_name, diff --git a/types/0_dice.ts b/types/0_dice.ts index 2ebde929..8fb039bd 100644 --- a/types/0_dice.ts +++ b/types/0_dice.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A rolled dice. */ export interface Dice { @@ -28,6 +28,6 @@ export interface Dice { value: number; } -export function constructDice(dice_: types.MessageMediaDice): Dice { +export function constructDice(dice_: Api.messageMediaDice): Dice { return { emoji: dice_.emoticon, value: dice_.value }; } diff --git a/types/0_giveaway_parameters.ts b/types/0_giveaway_parameters.ts index ce8cbd6d..5b0143cd 100644 --- a/types/0_giveaway_parameters.ts +++ b/types/0_giveaway_parameters.ts @@ -19,7 +19,7 @@ */ import { fromUnixTimestamp } from "../1_utilities.ts"; -import { peerToChatId, types } from "../2_tl.ts"; +import { Api, peerToChatId } from "../2_tl.ts"; /** Giveaway parameters. */ export interface GiveawayParameters { @@ -35,10 +35,10 @@ export interface GiveawayParameters { countries: string[]; } -export function constructGiveawayParameters(g: types.MessageMediaGiveaway): GiveawayParameters { +export function constructGiveawayParameters(g: Api.messageMediaGiveaway): GiveawayParameters { const countries = g.countries_iso2 ?? []; - const boostedChatId = peerToChatId(new types.PeerChannel({ channel_id: g.channels[0] })); - const additionalChatIds = g.channels.slice(1).map((v) => peerToChatId(new types.PeerChannel({ channel_id: v }))); + const boostedChatId = peerToChatId({ _: "peerChannel", channel_id: g.channels[0] }); + const additionalChatIds = g.channels.slice(1).map((v) => peerToChatId({ _: "peerChannel", channel_id: v })); const onlyNewMembers = g.only_new_subscribers ? true : false; const winnerSelectionDate = fromUnixTimestamp(g.until_date); diff --git a/types/0_link_preview.ts b/types/0_link_preview.ts index 998b3c14..2017b3ed 100644 --- a/types/0_link_preview.ts +++ b/types/0_link_preview.ts @@ -19,7 +19,7 @@ */ import { cleanObject } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A link preview. */ export interface LinkPreview { @@ -35,7 +35,7 @@ export interface LinkPreview { aboveText?: boolean; } -export function constructLinkPreview(media: types.MessageMediaWebPage, invert?: boolean): LinkPreview { +export function constructLinkPreview(media: Api.messageMediaWebPage, invert?: boolean): LinkPreview { return cleanObject({ url: "url" in media.webpage ? media.webpage.url : undefined, smallMedia: media.force_small_media ? true : undefined, diff --git a/types/0_live_stream_channel.ts b/types/0_live_stream_channel.ts index 41b4794d..93e1f9ce 100644 --- a/types/0_live_stream_channel.ts +++ b/types/0_live_stream_channel.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A live stream channel. */ export interface LiveStreamChannel { @@ -30,7 +30,7 @@ export interface LiveStreamChannel { timestamp: number; } -export function constructLiveStreamChannel(channel: types.GroupCallStreamChannel): LiveStreamChannel { +export function constructLiveStreamChannel(channel: Api.groupCallStreamChannel): LiveStreamChannel { return { id: channel.channel, scale: channel.scale, diff --git a/types/0_location.ts b/types/0_location.ts index 9ce86f3f..fd201f62 100644 --- a/types/0_location.ts +++ b/types/0_location.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { as, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; /** A shared location. */ export interface Location { @@ -36,17 +36,17 @@ export interface Location { proximityAlertRadius?: number; } -export function constructLocation(geo_: types.MessageMediaGeo | types.MessageMediaGeoLive | types.GeoPoint): Location { - if (geo_ instanceof types.MessageMediaGeo) { - const geo = geo_.geo[as](types.GeoPoint); +export function constructLocation(geo_: Api.messageMediaGeo | Api.messageMediaGeoLive | Api.geoPoint): Location { + if (is("messageMediaGeo", geo_)) { + const geo = as("geoPoint", geo_.geo); return { latitude: geo.lat, longitude: geo.long, horizontalAccuracy: geo.accuracy_radius, }; - } else if (geo_ instanceof types.MessageMediaGeoLive) { + } else if (is("messageMediaGeoLive", geo_)) { const media = geo_; - const geo = media.geo[as](types.GeoPoint); + const geo = as("geoPoint", media.geo); return { latitude: geo.lat, longitude: geo.long, diff --git a/types/0_mask_position.ts b/types/0_mask_position.ts index dffb4c2e..95d97652 100644 --- a/types/0_mask_position.ts +++ b/types/0_mask_position.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { enums } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A mask position. */ export interface MaskPosition { @@ -28,7 +28,7 @@ export interface MaskPosition { scale: number; } -export function constructMaskPosition({ n, x, y, zoom }: enums.MaskCoords): MaskPosition { +export function constructMaskPosition({ n, x, y, zoom }: Api.MaskCoords): MaskPosition { return { point: n == 0 ? "forehead" : n == 1 ? "eyes" : n == 2 ? "mouth" : "chin", xShift: x, diff --git a/types/0_message_entity.ts b/types/0_message_entity.ts index 7ed68dc3..6b5cc576 100644 --- a/types/0_message_entity.ts +++ b/types/0_message_entity.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; /** @unlisted */ @@ -195,112 +195,112 @@ export type MessageEntity = | MessageEntitySpoiler | MessageEntityCustomEmoji; -export function constructMessageEntity(obj: enums.MessageEntity): MessageEntity | null { - if (obj instanceof types.MessageEntityMention) { +export function constructMessageEntity(obj: Api.MessageEntity): MessageEntity | null { + if (is("messageEntityMention", obj)) { return { type: "mention", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityHashtag) { + } else if (is("messageEntityHashtag", obj)) { return { type: "hashtag", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityBotCommand) { + } else if (is("messageEntityBotCommand", obj)) { return { type: "botCommand", offset: obj.offset ?? 0, length: obj.length }; - } else if (obj instanceof types.MessageEntityUrl) { + } else if (is("messageEntityUrl", obj)) { return { type: "url", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityEmail) { + } else if (is("messageEntityEmail", obj)) { return { type: "email", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityBold) { + } else if (is("messageEntityBold", obj)) { return { type: "bold", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityItalic) { + } else if (is("messageEntityItalic", obj)) { return { type: "italic", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityCode) { + } else if (is("messageEntityCode", obj)) { return { type: "code", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityPre) { + } else if (is("messageEntityPre", obj)) { return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language }; - } else if (obj instanceof types.MessageEntityTextUrl) { + } else if (is("messageEntityTextUrl", obj)) { return { type: "textLink", offset: obj.offset, length: obj.length, url: obj.url }; - } else if (obj instanceof types.MessageEntityMentionName) { + } else if (is("messageEntityMentionName", obj)) { return { type: "textMention", offset: obj.offset, length: obj.length, userId: Number(obj.user_id) }; - } else if (obj instanceof types.MessageEntityCashtag) { + } else if (is("messageEntityCashtag", obj)) { return { type: "cashtag", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityPhone) { + } else if (is("messageEntityPhone", obj)) { return { type: "phoneNumber", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityUnderline) { + } else if (is("messageEntityUnderline", obj)) { return { type: "underline", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityStrike) { + } else if (is("messageEntityStrike", obj)) { return { type: "strikethrough", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityBlockquote) { + } else if (is("messageEntityBlockquote", obj)) { return { type: "blockquote", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityBankCard) { + } else if (is("messageEntityBankCard", obj)) { return { type: "bankCard", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntitySpoiler) { + } else if (is("messageEntitySpoiler", obj)) { return { type: "spoiler", offset: obj.offset, length: obj.length }; - } else if (obj instanceof types.MessageEntityCustomEmoji) { + } else if (is("messageEntityCustomEmoji", obj)) { return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.document_id) }; } else { return null; } } -export async function messageEntityToTlObject(entity: MessageEntity, getEntity: EntityGetter): Promise { +export async function messageEntityToTlObject(entity: MessageEntity, getEntity: EntityGetter): Promise { const { offset, length } = entity; switch (entity.type) { case "mention": - return new types.MessageEntityMention({ offset, length }); + return { _: "messageEntityMention", offset, length }; case "hashtag": - return new types.MessageEntityHashtag({ offset, length }); + return { _: "messageEntityHashtag", offset, length }; case "botCommand": - return new types.MessageEntityBotCommand({ offset, length }); + return { _: "messageEntityBotCommand", offset, length }; case "url": - return new types.MessageEntityUrl({ offset, length }); + return { _: "messageEntityUrl", offset, length }; case "email": - return new types.MessageEntityEmail({ offset, length }); + return { _: "messageEntityEmail", offset, length }; case "bold": - return new types.MessageEntityBold({ offset, length }); + return { _: "messageEntityBold", offset, length }; case "italic": - return new types.MessageEntityItalic({ offset, length }); + return { _: "messageEntityItalic", offset, length }; case "code": - return new types.MessageEntityCode({ offset, length }); + return { _: "messageEntityCode", offset, length }; case "pre": - return new types.MessageEntityPre({ offset, length, language: entity.language }); + return { _: "messageEntityPre", offset, length, language: entity.language }; case "textLink": { try { const url = new URL(entity.url); if (url.protocol == "tg:" && url.hostname == "user" && (url.pathname == "/" || url.pathname == "")) { const id = Number(url.searchParams.get("id")); if (!isNaN(id)) { - const entity_ = await getEntity(new types.PeerUser({ user_id: BigInt(id) })); + const entity_ = await getEntity({ _: "peerUser", user_id: BigInt(id) }); if (!entity_) { unreachable(); } - return new types.InputMessageEntityMentionName({ offset, length, user_id: new types.InputUser({ user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) }); + return { _: "inputMessageEntityMentionName", offset, length, user_id: ({ _: "inputUser", user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) }; } } } catch { // } - return new types.MessageEntityTextUrl({ offset, length, url: entity.url }); + return { _: "messageEntityTextUrl", offset, length, url: entity.url }; } case "textMention": { - const entity_ = await getEntity(new types.PeerUser({ user_id: BigInt(entity.userId) })); + const entity_ = await getEntity({ _: "peerUser", user_id: BigInt(entity.userId) }); if (!entity_) { unreachable(); } - return new types.InputMessageEntityMentionName({ offset, length, user_id: new types.InputUser({ user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) }); + return { _: "inputMessageEntityMentionName", offset, length, user_id: ({ _: "inputUser", user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) }; } case "cashtag": - return new types.MessageEntityCashtag({ offset, length }); + return { _: "messageEntityCashtag", offset, length }; case "phoneNumber": - return new types.MessageEntityPhone({ offset, length }); + return { _: "messageEntityPhone", offset, length }; case "underline": - return new types.MessageEntityUnderline({ offset, length }); + return { _: "messageEntityUnderline", offset, length }; case "strikethrough": - return new types.MessageEntityStrike({ offset, length }); + return { _: "messageEntityStrike", offset, length }; case "blockquote": - return new types.MessageEntityBlockquote({ offset, length }); + return { _: "messageEntityBlockquote", offset, length }; case "bankCard": - return new types.MessageEntityBankCard({ offset, length }); + return { _: "messageEntityBankCard", offset, length }; case "spoiler": - return new types.MessageEntitySpoiler({ offset, length }); + return { _: "messageEntitySpoiler", offset, length }; case "customEmoji": - return new types.MessageEntityCustomEmoji({ offset, length, document_id: BigInt(entity.customEmojiId) }); + return { _: "messageEntityCustomEmoji", offset, length, document_id: BigInt(entity.customEmojiId) }; } } diff --git a/types/0_message_search_filter.ts b/types/0_message_search_filter.ts index 120be367..e7bf39b2 100644 --- a/types/0_message_search_filter.ts +++ b/types/0_message_search_filter.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; export type MessageSearchFilter = | "empty" @@ -37,36 +37,36 @@ export type MessageSearchFilter = | "mentions" | "pinned"; -export function messageSearchFilterToTlObject(filter: MessageSearchFilter): enums.MessagesFilter { +export function messageSearchFilterToTlObject(filter: MessageSearchFilter): Api.MessagesFilter { switch (filter) { case "empty": - return new types.InputMessagesFilterEmpty(); + return { _: "inputMessagesFilterEmpty" }; case "animations": - return new types.InputMessagesFilterGif(); + return { _: "inputMessagesFilterGif" }; case "audios": - return new types.InputMessagesFilterMusic(); + return { _: "inputMessagesFilterMusic" }; case "documents": - return new types.InputMessagesFilterDocument(); + return { _: "inputMessagesFilterDocument" }; case "photos": - return new types.InputMessagesFilterPhotos(); + return { _: "inputMessagesFilterPhotos" }; case "videos": - return new types.InputMessagesFilterVideo(); + return { _: "inputMessagesFilterVideo" }; case "voiceMessages": - return new types.InputMessagesFilterVoice(); + return { _: "inputMessagesFilterVoice" }; case "photosAndVideos": - return new types.InputMessagesFilterPhotoVideo(); + return { _: "inputMessagesFilterPhotoVideo" }; case "links": - return new types.InputMessagesFilterUrl(); + return { _: "inputMessagesFilterUrl" }; case "chatPhotos": - return new types.InputMessagesFilterChatPhotos(); + return { _: "inputMessagesFilterChatPhotos" }; case "videoNotes": - return new types.InputMessagesFilterRoundVideo(); + return { _: "inputMessagesFilterRoundVideo" }; case "voiceMessagesAndVideoNotes": - return new types.InputMessagesFilterRoundVoice(); + return { _: "inputMessagesFilterRoundVoice" }; case "mentions": - return new types.InputMessagesFilterMyMentions(); + return { _: "inputMessagesFilterMyMentions" }; case "pinned": - return new types.InputMessagesFilterPinned(); + return { _: "inputMessagesFilterPinned" }; default: unreachable(); } diff --git a/types/0_opening_hours.ts b/types/0_opening_hours.ts index a78c8eb2..9d6261ba 100644 --- a/types/0_opening_hours.ts +++ b/types/0_opening_hours.ts @@ -18,14 +18,14 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; export interface OpeningHours { timezone: string; intervals: [number, number][]; } -export function constructOpeningHours(hours: types.BusinessWorkHours): OpeningHours { +export function constructOpeningHours(hours: Api.businessWorkHours): OpeningHours { return { timezone: hours.timezone_id, intervals: hours.weekly_open.map((v) => [v.start_minute, v.end_minute]), diff --git a/types/0_poll_option.ts b/types/0_poll_option.ts index 5baa32c8..07fc0955 100644 --- a/types/0_poll_option.ts +++ b/types/0_poll_option.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { enums } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A poll option. */ export interface PollOption { @@ -28,7 +28,7 @@ export interface PollOption { voterCount: number; } -export function constructPollOption(option: enums.PollAnswer, results: Array): PollOption { +export function constructPollOption(option: Api.PollAnswer, results: Array): PollOption { return { text: option.text, voterCount: results.find((v) => v.option.every((v, i) => option.option[i] == v))?.voters ?? 0, diff --git a/types/0_reaction.ts b/types/0_reaction.ts index a39aa766..e60e9218 100644 --- a/types/0_reaction.ts +++ b/types/0_reaction.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; /** @unlisted */ export interface ReactionEmoji { @@ -36,18 +36,18 @@ export interface ReactionCustomEmoji { /** A reaction type. */ export type Reaction = ReactionEmoji | ReactionCustomEmoji; -export function constructReaction(reaction: enums.Reaction): Reaction { - if (reaction instanceof types.ReactionEmoji) { +export function constructReaction(reaction: Api.Reaction): Reaction { + if (is("reactionEmoji", reaction)) { return { type: "emoji", emoji: reaction.emoticon }; - } else if (reaction instanceof types.ReactionCustomEmoji) { + } else if (is("reactionCustomEmoji", reaction)) { return { type: "customEmoji", id: String(reaction.document_id) }; } else { unreachable(); } } -export function reactionToTlObject(reaction: Reaction): enums.Reaction { - return reaction.type == "emoji" ? new types.ReactionEmoji({ emoticon: reaction.emoji }) : new types.ReactionCustomEmoji({ document_id: BigInt(reaction.id) }); +export function reactionToTlObject(reaction: Reaction): Api.Reaction { + return reaction.type == "emoji" ? ({ _: "reactionEmoji", emoticon: reaction.emoji }) : ({ _: "reactionCustomEmoji", document_id: BigInt(reaction.id) }); } export function reactionEqual(left: Reaction, right: Reaction): boolean { diff --git a/types/0_restriction_reason.ts b/types/0_restriction_reason.ts index cc4d70e3..3ea3635f 100644 --- a/types/0_restriction_reason.ts +++ b/types/0_restriction_reason.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { enums } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** The reason for restricting an entity. */ export interface RestrictionReason { @@ -27,6 +27,6 @@ export interface RestrictionReason { text: string; } -export function constructRestrictionReason(rr: enums.RestrictionReason): RestrictionReason { +export function constructRestrictionReason(rr: Api.RestrictionReason): RestrictionReason { return { platform: rr.platform, reason: rr.reason, text: rr.text }; } diff --git a/types/0_thumbnail.ts b/types/0_thumbnail.ts index 819faa1a..855ea482 100644 --- a/types/0_thumbnail.ts +++ b/types/0_thumbnail.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { FileId, FileType, PhotoSourceType, serializeFileId, toUniqueFileId } from "./_file_id.ts"; /** A file or sticker thumbnail. */ @@ -35,9 +35,9 @@ export interface Thumbnail { fileSize: number; } -export function constructThumbnail(size: types.PhotoSize, file: types.Document | types.Photo): Thumbnail { - const type = file instanceof types.Photo ? FileType.Photo : FileType.Thumbnail; - const fileType = file instanceof types.Photo ? FileType.Photo : FileType.Document; +export function constructThumbnail(size: Api.photoSize, file: Api.document | Api.photo): Thumbnail { + const type = is("photo", file) ? FileType.Photo : FileType.Thumbnail; + const fileType = is("photo", file) ? FileType.Photo : FileType.Document; const fileId_: FileId = { type, diff --git a/types/0_video_chat.ts b/types/0_video_chat.ts index 5b9a65d3..45223207 100644 --- a/types/0_video_chat.ts +++ b/types/0_video_chat.ts @@ -19,7 +19,7 @@ */ import { fromUnixTimestamp } from "../1_utilities.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; /** @unlisted */ export interface _VideoChatCommon { @@ -69,9 +69,9 @@ export interface VideoChatEnded extends _VideoChatCommon { export type VideoChat = VideoChatActive | VideoChatScheduled | VideoChatEnded; -export function constructVideoChat(call: enums.GroupCall): VideoChat { +export function constructVideoChat(call: Api.GroupCall): VideoChat { const id = String(call.id); - if (call instanceof types.GroupCallDiscarded) { + if (is("groupCallDiscarded", call)) { return { type: "ended", id, diff --git a/types/0_voice.ts b/types/0_voice.ts index af82bc15..fb797a6f 100644 --- a/types/0_voice.ts +++ b/types/0_voice.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; /** A voice note. */ export interface Voice { @@ -34,7 +34,7 @@ export interface Voice { fileSize: number; } -export function constructVoice(document: types.Document, audioAttributes: types.DocumentAttributeAudio, fileId: string, fileUniqueId: string): Voice { +export function constructVoice(document: Api.document, audioAttributes: Api.documentAttributeAudio, fileId: string, fileUniqueId: string): Voice { return { fileId, fileUniqueId, diff --git a/types/1_animation.ts b/types/1_animation.ts index d9a7d8cc..5ebb2dc7 100644 --- a/types/1_animation.ts +++ b/types/1_animation.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; /** An animation file (GIF or H.264/MPEG-4 AVC video without sound). */ @@ -43,14 +43,14 @@ export interface Animation { fileSize: number; } -export function constructAnimation(document: types.Document, videoAttribute: types.DocumentAttributeVideo | undefined, fileAttribute: types.DocumentAttributeFilename | undefined, fileId: string, fileUniqueId: string): Animation { +export function constructAnimation(document: Api.document, videoAttribute: Api.documentAttributeVideo | undefined, fileAttribute: Api.documentAttributeFilename | undefined, fileId: string, fileUniqueId: string): Animation { return { fileId, fileUniqueId, width: videoAttribute?.w ?? 0, height: videoAttribute?.h ?? 0, duration: videoAttribute?.duration ?? 0, - thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], + thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], fileName: fileAttribute?.file_name, mimeType: document.mime_type, fileSize: Number(document.size), diff --git a/types/1_audio.ts b/types/1_audio.ts index 02d52958..0e9c147d 100644 --- a/types/1_audio.ts +++ b/types/1_audio.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; /** An audio file. */ @@ -41,7 +41,7 @@ export interface Audio { thumbnails: Thumbnail[]; } -export function constructAudio(document: types.Document, audioAttribute: types.DocumentAttributeAudio | undefined, fileId: string, fileUniqueId: string): Audio { +export function constructAudio(document: Api.document, audioAttribute: Api.documentAttributeAudio | undefined, fileId: string, fileUniqueId: string): Audio { return { fileId, fileUniqueId, @@ -50,6 +50,6 @@ export function constructAudio(document: types.Document, audioAttribute: types.D title: audioAttribute?.title, mimeType: document.mime_type, fileSize: Number(document.size), - thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], + thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], }; } diff --git a/types/1_bot_command_scope.ts b/types/1_bot_command_scope.ts index cfb7b248..5e74c6b7 100644 --- a/types/1_bot_command_scope.ts +++ b/types/1_bot_command_scope.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { InputPeerGetter } from "./_getters.ts"; import { ID } from "./0_id.ts"; @@ -65,26 +65,26 @@ export interface BotCommandScopeChatMember { /** A type specifying where bot commads are available. */ export type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember; -export async function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise { +export async function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise { switch (scope.type) { case "default": - return new types.BotCommandScopeDefault(); + return { _: "botCommandScopeDefault" }; case "allPrivateChats": - return new types.BotCommandScopeUsers(); + return { _: "botCommandScopeUsers" }; case "allGroupChats": - return new types.BotCommandScopeChats(); + return { _: "botCommandScopeChats" }; case "allChatAdministrators": - return new types.BotCommandScopeChatAdmins(); + return { _: "botCommandScopeChatAdmins" }; case "chat": - return new types.BotCommandScopePeer({ peer: await getInputPeer(scope.chatId) }); + return { _: "botCommandScopePeer", peer: await getInputPeer(scope.chatId) }; case "chatAdministrators": - return new types.BotCommandScopePeerAdmins({ peer: await getInputPeer(scope.chatId) }); + return { _: "botCommandScopePeerAdmins", peer: await getInputPeer(scope.chatId) }; case "chatMember": { const user = await getInputPeer(scope.userId); - if (!(user instanceof types.InputPeerUser)) { + if (!(is("inputPeerUser", user))) { unreachable(); } - return new types.BotCommandScopePeerUser({ peer: await getInputPeer(scope.chatId), user_id: new types.InputUser({ user_id: user.user_id, access_hash: user.access_hash }) }); + return { _: "botCommandScopePeerUser", peer: await getInputPeer(scope.chatId), user_id: ({ _: "inputUser", user_id: user.user_id, access_hash: user.access_hash }) }; } default: unreachable(); diff --git a/types/1_chat_p.ts b/types/1_chat_p.ts index 6c7509aa..cde584f9 100644 --- a/types/1_chat_p.ts +++ b/types/1_chat_p.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject, getColorFromPeerId, ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructRestrictionReason, RestrictionReason } from "./0_restriction_reason.ts"; /** @unlisted */ @@ -117,12 +117,12 @@ export interface ChatPSupergroup extends ChatPChannelBase { */ export type ChatP = ChatPPrivate | ChatPGroup | ChatPSupergroup | ChatPChannel; -export function constructChatP(chat: types.User): ChatPPrivate; -export function constructChatP(chat: types.Chat | types.ChatForbidden): ChatPGroup; -export function constructChatP(chat: types.Channel | types.ChannelForbidden): ChatPSupergroup | ChatPChannel; -export function constructChatP(chat: types.User | types.Chat | types.ChatForbidden | types.Channel | types.ChannelForbidden): ChatP; -export function constructChatP(chat: types.User | types.Chat | types.ChatForbidden | types.Channel | types.ChannelForbidden): ChatP { - if (chat instanceof types.User) { +export function constructChatP(chat: Api.user): ChatPPrivate; +export function constructChatP(chat: Api.chat | Api.chatForbidden): ChatPGroup; +export function constructChatP(chat: Api.channel | Api.channelForbidden): ChatPSupergroup | ChatPChannel; +export function constructChatP(chat: Api.user | Api.chat | Api.chatForbidden | Api.channel | Api.channelForbidden): ChatP; +export function constructChatP(chat: Api.user | Api.chat | Api.chatForbidden | Api.channel | Api.channelForbidden): ChatP { + if (is("user", chat)) { const id = Number(chat.id); const chat_: ChatPPrivate = { id, @@ -143,7 +143,7 @@ export function constructChatP(chat: types.User | types.Chat | types.ChatForbidd } return cleanObject(chat_); - } else if (chat instanceof types.Chat || chat instanceof types.ChatForbidden) { + } else if (is("chat", chat) || is("chatForbidden", chat)) { const id = Number(-chat.id); const chat_: ChatPGroup = { id, @@ -153,15 +153,15 @@ export function constructChatP(chat: types.User | types.Chat | types.ChatForbidd isCreator: false, }; - if (chat instanceof types.Chat) { + if (is("chat", chat)) { chat_.isCreator = chat.creator || false; } return cleanObject(chat_); - } else if (chat instanceof types.Channel || chat instanceof types.ChannelForbidden) { + } else if (is("channel", chat) || is("channelForbidden", chat)) { let chat_: ChatPSupergroup | ChatPChannel; const id = ZERO_CHANNEL_ID + -Number(chat.id); - if (chat instanceof types.ChannelForbidden) { + if (is("channelForbidden", chat)) { const { title } = chat; if (chat.megagroup) { return { id, color: getColorFromPeerId(id), title, type: "supergroup", isScam: false, isFake: false, isVerified: false, isRestricted: false, isForum: false }; diff --git a/types/1_document.ts b/types/1_document.ts index 8d01a2e0..a5a82a98 100644 --- a/types/1_document.ts +++ b/types/1_document.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; /** A document. */ @@ -37,11 +37,11 @@ export interface Document { fileSize: number; } -export function constructDocument(document: types.Document, fileNameAttribute: types.DocumentAttributeFilename, fileId: string, fileUniqueId: string): Document { +export function constructDocument(document: Api.document, fileNameAttribute: Api.documentAttributeFilename, fileId: string, fileUniqueId: string): Document { return { fileId, fileUniqueId, - thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], + thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], fileName: fileNameAttribute.file_name, mimeType: document.mime_type, fileSize: Number(document.size), diff --git a/types/1_giveaway.ts b/types/1_giveaway.ts index 24142527..741cb57d 100644 --- a/types/1_giveaway.ts +++ b/types/1_giveaway.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructGiveawayParameters, GiveawayParameters } from "./0_giveaway_parameters.ts"; /** A giveaway. */ @@ -30,7 +30,7 @@ export interface Giveaway { monthCount: number; } -export function constructGiveaway(g: types.MessageMediaGiveaway): Giveaway { +export function constructGiveaway(g: Api.messageMediaGiveaway): Giveaway { const winnerCount = g.quantity; const monthCount = g.months; const parameters = constructGiveawayParameters(g); diff --git a/types/1_keyboard_button.ts b/types/1_keyboard_button.ts index 9aabcc4e..661cc92f 100644 --- a/types/1_keyboard_button.ts +++ b/types/1_keyboard_button.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { ChatAdministratorRights, chatAdministratorRightsToTlObject, constructChatAdministratorRights } from "./0_chat_administrator_rights.ts"; import { KeyboardButtonPollType } from "./0_keyboard_button_poll_type.ts"; import { MiniAppInfo } from "./0_mini_app_info.ts"; @@ -82,11 +82,11 @@ export type KeyboardButton = | KeyboardButtonRequestPoll | KeyboardButtonMiniApp; -export function constructKeyboardButton(button_: enums.KeyboardButton): KeyboardButton { - if (button_ instanceof types.KeyboardButton) { +export function constructKeyboardButton(button_: Api.KeyboardButton): KeyboardButton { + if (is("keyboardButton", button_)) { return { text: button_.text }; - } else if (button_ instanceof types.KeyboardButtonRequestPeer) { - if (button_.peer_type instanceof types.RequestPeerTypeUser) { + } else if (is("keyboardButtonRequestPeer", button_)) { + if (is("requestPeerTypeUser", button_.peer_type)) { return { text: button_.text, requestUser: { @@ -95,7 +95,7 @@ export function constructKeyboardButton(button_: enums.KeyboardButton): Keyboard userIsPremium: button_.peer_type.premium || false, }, }; - } else if (button_.peer_type instanceof types.RequestPeerTypeChat) { + } else if (is("requestPeerTypeChat", button_.peer_type)) { const button: KeyboardButtonRequestChat = { text: button_.text, requestChat: { @@ -114,7 +114,7 @@ export function constructKeyboardButton(button_: enums.KeyboardButton): Keyboard button.requestChat.userAdministratorRights = constructChatAdministratorRights(button_.peer_type.user_admin_rights); } return button; - } else if (button_.peer_type instanceof types.RequestPeerTypeBroadcast) { + } else if (is("requestPeerTypeBroadcast", button_.peer_type)) { const button: KeyboardButtonRequestChat = { text: button_.text, requestChat: { @@ -134,11 +134,11 @@ export function constructKeyboardButton(button_: enums.KeyboardButton): Keyboard } else { unreachable(); } - } else if (button_ instanceof types.KeyboardButtonRequestPhone) { + } else if (is("keyboardButtonRequestPhone", button_)) { return { text: button_.text, requestContact: true }; - } else if (button_ instanceof types.KeyboardButtonRequestGeoLocation) { + } else if (is("keyboardButtonRequestGeoLocation", button_)) { return { text: button_.text, requestLocation: true }; - } else if (button_ instanceof types.KeyboardButtonRequestPoll) { + } else if (is("keyboardButtonRequestPoll", button_)) { const button: KeyboardButtonRequestPoll = { text: button_.text, requestPoll: {} }; if (button_.quiz) { @@ -146,58 +146,31 @@ export function constructKeyboardButton(button_: enums.KeyboardButton): Keyboard } return button; - } else if (button_ instanceof types.KeyboardButtonWebView || button_ instanceof types.KeyboardButtonSimpleWebView) { + } else if (is("keyboardButtonWebView", button_) || is("keyboardButtonSimpleWebView", button_)) { return { text: button_.text, miniApp: { url: button_.url } }; } else { unreachable(); } } -export function keyboardButtonToTlObject(button: KeyboardButton): enums.KeyboardButton { +export function keyboardButtonToTlObject(button: KeyboardButton): Api.KeyboardButton { if ("requestUser" in button) { - return new types.KeyboardButtonRequestPeer({ - text: button.text, - button_id: button.requestUser.requestId, - peer_type: new types.RequestPeerTypeUser({ bot: button.requestUser.userIsBot, premium: button.requestUser.userIsPremium }), - max_quantity: 1, - }); + return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestUser.requestId, peer_type: ({ _: "requestPeerTypeUser", bot: button.requestUser.userIsBot, premium: button.requestUser.userIsPremium }), max_quantity: 1 }; } else if ("requestChat" in button) { if (!button.requestChat.chatIsChannel) { // GUESS - return new types.KeyboardButtonRequestPeer({ - text: button.text, - button_id: button.requestChat.requestId, - peer_type: new types.RequestPeerTypeChat({ - forum: button.requestChat.chatIsForum, - has_username: button.requestChat.chatHasUsername, - creator: button.requestChat.chatIsCreated || undefined, - bot_participant: button.requestChat.botIsMember || undefined, - bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined, - user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined, - }), - max_quantity: 1, - }); + return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestChat.requestId, peer_type: ({ _: "requestPeerTypeChat", forum: button.requestChat.chatIsForum, has_username: button.requestChat.chatHasUsername, creator: button.requestChat.chatIsCreated || undefined, bot_participant: button.requestChat.botIsMember || undefined, bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined, user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined }), max_quantity: 1 }; } else { - return new types.KeyboardButtonRequestPeer({ - text: button.text, - button_id: button.requestChat.requestId, - peer_type: new types.RequestPeerTypeBroadcast({ - has_username: button.requestChat.chatHasUsername, - creator: button.requestChat.chatIsCreated || undefined, - bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined, - user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined, - }), - max_quantity: 1, - }); + return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestChat.requestId, peer_type: ({ _: "requestPeerTypeBroadcast", has_username: button.requestChat.chatHasUsername, creator: button.requestChat.chatIsCreated || undefined, bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined, user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined }), max_quantity: 1 }; } } else if ("requestContact" in button) { - return new types.KeyboardButtonRequestPhone({ text: button.text }); + return { _: "keyboardButtonRequestPhone", text: button.text }; } else if ("requestLocation" in button) { - return new types.KeyboardButtonRequestGeoLocation({ text: button.text }); + return { _: "keyboardButtonRequestGeoLocation", text: button.text }; } else if ("requestPoll" in button) { - return new types.KeyboardButtonRequestPoll({ text: button.text, quiz: button.requestPoll.type == "quiz" }); + return { _: "keyboardButtonRequestPoll", text: button.text, quiz: button.requestPoll.type == "quiz" }; } else if ("miniApp" in button) { - return new types.KeyboardButtonWebView({ text: button.text, url: button.miniApp.url }); + return { _: "keyboardButtonWebView", text: button.text, url: button.miniApp.url }; } else { - return new types.KeyboardButton({ text: button.text }); + return { _: "keyboardButton", text: button.text }; } } diff --git a/types/1_message_reaction.ts b/types/1_message_reaction.ts index 164265a4..12704b03 100644 --- a/types/1_message_reaction.ts +++ b/types/1_message_reaction.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { peerToChatId, types } from "../2_tl.ts"; +import { Api, is, peerToChatId } from "../2_tl.ts"; import { constructReaction, Reaction } from "./0_reaction.ts"; /** Represents a type of reaction made to a message. */ @@ -34,13 +34,13 @@ export interface MessageReaction { chosen: boolean; } -export function constructMessageReaction(reaction_: types.ReactionCount, recentReactions: types.MessagePeerReaction[]): MessageReaction { +export function constructMessageReaction(reaction_: Api.reactionCount, recentReactions: Api.messagePeerReaction[]): MessageReaction { const choosers = recentReactions .filter((v) => { - if (reaction_.reaction instanceof types.ReactionEmoji) { - return v.reaction instanceof types.ReactionEmoji && v.reaction.emoticon == reaction_.reaction.emoticon; - } else if (reaction_.reaction instanceof types.ReactionCustomEmoji) { - return v.reaction instanceof types.ReactionCustomEmoji && v.reaction.document_id == reaction_.reaction.document_id; + if (is("reactionEmoji", reaction_.reaction)) { + return is("reactionEmoji", v.reaction) && v.reaction.emoticon == reaction_.reaction.emoticon; + } else if (is("reactionCustomEmoji", reaction_.reaction)) { + return is("reactionCustomEmoji", v.reaction) && v.reaction.document_id == reaction_.reaction.document_id; } else { unreachable(); } diff --git a/types/1_photo.ts b/types/1_photo.ts index dcb7aa06..e7e7a212 100644 --- a/types/1_photo.ts +++ b/types/1_photo.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { getPhotoFileId } from "./_file_id.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; @@ -37,7 +37,7 @@ export interface Photo { thumbnails: Thumbnail[]; } -export function constructPhoto(photo: types.Photo): Photo { +export function constructPhoto(photo: Api.photo): Photo { const { sizes, largest } = getPhotoSizes(photo); return { ...getPhotoFileId(photo), @@ -48,16 +48,16 @@ export function constructPhoto(photo: types.Photo): Photo { }; } -export function getPhotoSizes(photo: types.Photo): { sizes: types.PhotoSize[]; largest: types.PhotoSize } { +export function getPhotoSizes(photo: Api.photo): { sizes: Api.photoSize[]; largest: Api.photoSize } { const sizes = photo.sizes .map((v) => { - if (v instanceof types.PhotoSizeProgressive) { - return new types.PhotoSize({ type: v.type, w: v.w, h: v.h, size: Math.max(...v.sizes) }); + if (is("photoSizeProgressive", v)) { + return { _: "photoSize", type: v.type, w: v.w, h: v.h, size: Math.max(...v.sizes) }; } else { return v; } }) - .filter((v): v is types.PhotoSize => v instanceof types.PhotoSize) + .filter((v): v is Api.photoSize => is("photoSize", v)) .sort((a, b) => a.size - b.size); const largest = sizes.slice(-1)[0]; return { sizes, largest }; diff --git a/types/1_poll.ts b/types/1_poll.ts index 44832392..0be9a3dc 100644 --- a/types/1_poll.ts +++ b/types/1_poll.ts @@ -19,7 +19,7 @@ */ import { cleanObject } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructMessageEntity, MessageEntity } from "./0_message_entity.ts"; import { constructPollOption, PollOption } from "./0_poll_option.ts"; @@ -53,7 +53,7 @@ export interface Poll { closeDate?: Date; } -export function constructPoll(media_: types.MessageMediaPoll): Poll { +export function constructPoll(media_: Api.messageMediaPoll): Poll { const poll = media_.poll; const correctOption = media_.results.results?.find((v) => v.correct)?.option; const correctOptionId = correctOption !== undefined ? poll.answers.findIndex((v) => v.option.every((v, i) => correctOption[i] == v)) : undefined; diff --git a/types/1_reaction_count.ts b/types/1_reaction_count.ts index 7788615f..85114e70 100644 --- a/types/1_reaction_count.ts +++ b/types/1_reaction_count.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructReaction, Reaction } from "./0_reaction.ts"; /** The count of a specific reaction. */ @@ -29,7 +29,7 @@ export interface ReactionCount { count: number; } -export function constructReactionCount(reaction_: types.ReactionCount): ReactionCount { +export function constructReactionCount(reaction_: Api.reactionCount): ReactionCount { const reaction = constructReaction(reaction_.reaction); const count = reaction_.count; return { reaction, count }; diff --git a/types/1_reply_quote.ts b/types/1_reply_quote.ts index de3e4880..4527b0b9 100644 --- a/types/1_reply_quote.ts +++ b/types/1_reply_quote.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { enums } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructMessageEntity, MessageEntity } from "./0_message_entity.ts"; /** A reference to a specific part of a message that is being replied to. */ @@ -31,7 +31,7 @@ export interface ReplyQuote { entities: MessageEntity[]; } -export function constructReplyQuote(quoteText: string | undefined, quoteOffset: number | undefined, quoteEntities: enums.MessageEntity[] | undefined): ReplyQuote { +export function constructReplyQuote(quoteText: string | undefined, quoteOffset: number | undefined, quoteEntities: Api.MessageEntity[] | undefined): ReplyQuote { quoteText ??= ""; quoteOffset ??= 0; quoteEntities ??= []; diff --git a/types/1_sticker.ts b/types/1_sticker.ts index 18184d1b..5ba51210 100644 --- a/types/1_sticker.ts +++ b/types/1_sticker.ts @@ -19,7 +19,7 @@ */ import { cleanObject, MaybePromise } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructMaskPosition, MaskPosition } from "./0_mask_position.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; @@ -58,14 +58,14 @@ export interface Sticker { } /** @unlisted */ -export type StickerSetNameGetter = (inputStickerSet: types.InputStickerSetID) => MaybePromise; +export type StickerSetNameGetter = (inputStickerSet: Api.inputStickerSetID) => MaybePromise; -export async function constructSticker(document: types.Document, fileId: string, fileUniqueId: string, getStickerSetName: StickerSetNameGetter, customEmojiId = ""): Promise { - const stickerAttribute = document.attributes.find((v): v is types.DocumentAttributeSticker => v instanceof types.DocumentAttributeSticker)!; - const imageSizeAttribute = document.attributes.find((v): v is types.DocumentAttributeImageSize => v instanceof types.DocumentAttributeImageSize)!; - const customEmojiAttribute = document.attributes.find((v): v is types.DocumentAttributeCustomEmoji => v instanceof types.DocumentAttributeCustomEmoji); - const videoAttribute = document.attributes.find((v): v is types.DocumentAttributeVideo => v instanceof types.DocumentAttributeVideo)!; - const setName = stickerAttribute.stickerset instanceof types.InputStickerSetID ? await getStickerSetName(stickerAttribute.stickerset) : undefined; +export async function constructSticker(document: Api.document, fileId: string, fileUniqueId: string, getStickerSetName: StickerSetNameGetter, customEmojiId = ""): Promise { + const stickerAttribute = document.attributes.find((v): v is Api.documentAttributeSticker => is("documentAttributeSticker", v))!; + const imageSizeAttribute = document.attributes.find((v): v is Api.documentAttributeImageSize => is("documentAttributeImageSize", v))!; + const customEmojiAttribute = document.attributes.find((v): v is Api.documentAttributeCustomEmoji => is("documentAttributeCustomEmoji", v)); + const videoAttribute = document.attributes.find((v): v is Api.documentAttributeVideo => is("documentAttributeVideo", v))!; + const setName = is("inputStickerSetID", stickerAttribute.stickerset) ? await getStickerSetName(stickerAttribute.stickerset) : undefined; return cleanObject({ fileId, @@ -75,7 +75,7 @@ export async function constructSticker(document: types.Document, fileId: string, height: imageSizeAttribute ? imageSizeAttribute.h : videoAttribute ? videoAttribute.h : 512, isAnimated: document.mime_type == "application/x-tgsticker", isVideo: document.mime_type == "video/webm", - thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], + thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], emoji: (customEmojiAttribute ? customEmojiAttribute.alt : stickerAttribute.alt) || undefined, setName, premiumAnimation: undefined, // TODO diff --git a/types/1_story_privacy.ts b/types/1_story_privacy.ts index cebbe157..5a41e0ef 100644 --- a/types/1_story_privacy.ts +++ b/types/1_story_privacy.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; /** @unlisted */ @@ -54,54 +54,54 @@ export type StoryPrivacy = | StoryPrivacyOnly; async function resolveUsers(ids: number[], getEntity: EntityGetter) { - const users = new Array(); + const users = new Array(); for (const id of ids) { - const entity = await getEntity(new types.PeerUser({ user_id: BigInt(id) })); - if (!(entity instanceof types.User)) { + const entity = await getEntity({ _: "peerUser", user_id: BigInt(id) }); + if (!(is("user", entity))) { unreachable(); } else { - users.push(new types.InputUser({ user_id: entity.id, access_hash: entity.access_hash ?? 0n })); + users.push({ _: "inputUser", user_id: entity.id, access_hash: entity.access_hash ?? 0n }); } } return users; } -async function restrict(users_: number[], rules: enums.InputPrivacyRule[], getEntity: EntityGetter) { +async function restrict(users_: number[], rules: Api.InputPrivacyRule[], getEntity: EntityGetter) { if (users_.length) { const users = await resolveUsers(users_, getEntity); - rules.push(new types.InputPrivacyValueDisallowUsers({ users })); + rules.push({ _: "inputPrivacyValueDisallowUsers", users }); } } -export async function storyPrivacyToTlObject(privacy: StoryPrivacy, getEntity: EntityGetter): Promise { - const rules = new Array(); +export async function storyPrivacyToTlObject(privacy: StoryPrivacy, getEntity: EntityGetter): Promise { + const rules = new Array(); if ("everyoneExcept" in privacy) { await restrict(privacy.everyoneExcept, rules, getEntity); - rules.push(new types.InputPrivacyValueAllowAll()); + rules.push({ _: "inputPrivacyValueAllowAll" }); } else if ("contactsExcept" in privacy) { await restrict(privacy.contactsExcept, rules, getEntity); - rules.push(new types.InputPrivacyValueAllowContacts()); + rules.push({ _: "inputPrivacyValueAllowContacts" }); } else if ("closeFriends" in privacy) { - rules.push(new types.InputPrivacyValueAllowCloseFriends()); + rules.push({ _: "inputPrivacyValueAllowCloseFriends" }); } else if ("only" in privacy) { if (!privacy.only.length) { unreachable(); } const users = await resolveUsers(privacy.only, getEntity); - rules.push(new types.InputPrivacyValueAllowUsers({ users })); + rules.push({ _: "inputPrivacyValueAllowUsers", users }); } return rules; } -export function constructStoryPrivacy(privacy: enums.PrivacyRule[]): StoryPrivacy { - const except = privacy.find((v): v is types.PrivacyValueDisallowUsers => v instanceof types.PrivacyValueDisallowUsers)?.users?.map(Number) ?? []; - if (privacy.some((v) => v instanceof types.PrivacyValueAllowAll)) { +export function constructStoryPrivacy(privacy: Api.PrivacyRule[]): StoryPrivacy { + const except = privacy.find((v): v is Api.privacyValueDisallowUsers => is("privacyValueDisallowUsers", v))?.users?.map(Number) ?? []; + if (privacy.some((v) => is("privacyValueAllowAll", v))) { return { everyoneExcept: except }; - } else if (privacy.some((v) => v instanceof types.PrivacyValueAllowContacts)) { + } else if (privacy.some((v) => is("privacyValueAllowContacts", v))) { return { contactsExcept: except }; - } else if (privacy.some((v) => v instanceof types.PrivacyValueAllowCloseFriends)) { + } else if (privacy.some((v) => is("privacyValueAllowCloseFriends", v))) { return { closeFriends: true }; } - const only = privacy.find((v): v is types.PrivacyValueAllowUsers => v instanceof types.PrivacyValueAllowUsers)?.users?.map(Number) ?? []; + const only = privacy.find((v): v is Api.privacyValueAllowUsers => is("privacyValueAllowUsers", v))?.users?.map(Number) ?? []; return { only }; } diff --git a/types/1_story_reaction.ts b/types/1_story_reaction.ts index 73db9f4d..cd41e036 100644 --- a/types/1_story_reaction.ts +++ b/types/1_story_reaction.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructReaction, Reaction } from "./0_reaction.ts"; /** Represents a type of reaction made to a story. */ @@ -31,7 +31,7 @@ export interface StoryReaction { chosen: boolean; } -export function constructStoryReaction(reaction_: types.ReactionCount): StoryReaction { +export function constructStoryReaction(reaction_: Api.reactionCount): StoryReaction { const reaction = constructReaction(reaction_.reaction); const count = reaction_.count; const chosen = reaction_.chosen_order !== undefined ? true : false; diff --git a/types/1_user.ts b/types/1_user.ts index 02ed93a0..f9f567bf 100644 --- a/types/1_user.ts +++ b/types/1_user.ts @@ -19,7 +19,7 @@ */ import { cleanObject, getColorFromPeerId } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { ChatPhoto, constructChatPhoto } from "./0_chat_photo.ts"; /** A user. */ @@ -56,7 +56,7 @@ export interface User { addedToAttachmentMenu: boolean; } -export function constructUser(user_: types.User): User { +export function constructUser(user_: Api.user): User { const id = Number(user_.id); const usernames = user_.usernames?.map((v) => v.username); const username = user_.username ?? usernames?.shift(); @@ -76,7 +76,7 @@ export function constructUser(user_: types.User): User { isSupport: user_.support || false, addedToAttachmentMenu: user_.attach_menu_enabled || false, }; - if (user_.photo instanceof types.UserProfilePhoto) { + if (is("userProfilePhoto", user_.photo)) { user.photo = constructChatPhoto(user_.photo, user.id, user_.access_hash ?? 0n); } diff --git a/types/1_venue.ts b/types/1_venue.ts index bf4eaa16..85be7788 100644 --- a/types/1_venue.ts +++ b/types/1_venue.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { as, types } from "../2_tl.ts"; +import { Api, as } from "../2_tl.ts"; import { Location } from "./0_location.ts"; /** A shared venue. */ @@ -35,8 +35,8 @@ export interface Venue { foursquareType?: string; } -export function constructVenue(media_: types.MessageMediaVenue | types.MediaAreaVenue): Venue { - const geo = media_.geo[as](types.GeoPoint); +export function constructVenue(media_: Api.messageMediaVenue | Api.mediaAreaVenue): Venue { + const geo = as("geoPoint", media_.geo); return { location: { latitude: geo.lat, diff --git a/types/1_video.ts b/types/1_video.ts index 92f484a8..76ac0870 100644 --- a/types/1_video.ts +++ b/types/1_video.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; /** A video file. */ @@ -43,14 +43,14 @@ export interface Video { fileSize: number; } -export function constructVideo(document: types.Document, videoAttribute: types.DocumentAttributeVideo, fileName: string | undefined, fileId: string, fileUniqueId: string): Video { +export function constructVideo(document: Api.document, videoAttribute: Api.documentAttributeVideo, fileName: string | undefined, fileId: string, fileUniqueId: string): Video { return { fileId, fileUniqueId, width: videoAttribute.w, height: videoAttribute.h, duration: videoAttribute.duration, - thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], + thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], fileName, mimeType: document.mime_type, fileSize: Number(document.size), diff --git a/types/1_video_note.ts b/types/1_video_note.ts index 019d39d7..2b9d0194 100644 --- a/types/1_video_note.ts +++ b/types/1_video_note.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { constructThumbnail, Thumbnail } from "./0_thumbnail.ts"; /** A video note. */ @@ -39,13 +39,13 @@ export interface VideoNote { fileSize: number; } -export function constructVideoNote(document: types.Document, videoAttribute: types.DocumentAttributeVideo, fileId: string, fileUniqueId: string): VideoNote { +export function constructVideoNote(document: Api.document, videoAttribute: Api.documentAttributeVideo, fileId: string, fileUniqueId: string): VideoNote { return { fileId, fileUniqueId, length: videoAttribute.w, duration: videoAttribute.duration, - thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof types.PhotoSize ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], + thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) as Thumbnail[] : [], fileSize: Number(document.size), }; } diff --git a/types/2_business_connection.ts b/types/2_business_connection.ts index a86c12d3..9f2acd8f 100644 --- a/types/2_business_connection.ts +++ b/types/2_business_connection.ts @@ -19,7 +19,7 @@ */ import { fromUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructUser, User } from "./1_user.ts"; @@ -37,10 +37,10 @@ export interface BusinessConnection { isEnabled: boolean; } -export async function constructBusinessConnection(connection: types.BotBusinessConnection, getEntity: EntityGetter): Promise { +export async function constructBusinessConnection(connection: Api.botBusinessConnection, getEntity: EntityGetter): Promise { return { id: connection.connection_id, - user: constructUser((await getEntity(new types.PeerUser(connection)))!), + user: constructUser((await getEntity({ ...connection, _: "peerUser" }))!), date: fromUnixTimestamp(connection.date), canReply: !!connection.can_reply, isEnabled: !connection.disabled, diff --git a/types/2_chat.ts b/types/2_chat.ts index 32651759..efd439ea 100644 --- a/types/2_chat.ts +++ b/types/2_chat.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructOpeningHours, OpeningHours } from "./0_opening_hours.ts"; import { ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, constructChatP } from "./1_chat_p.ts"; @@ -70,35 +70,35 @@ export interface ChatPrivate extends ChatBase, ChatPPrivate { */ export type Chat = ChatChannel | ChatSupergroup | ChatGroup | ChatPrivate; -export async function constructChat(fullChat: types.UserFull | types.ChatFull | types.ChannelFull, getEntity: EntityGetter): Promise { - if (fullChat instanceof types.UserFull) { - const user = await getEntity(new types.PeerUser({ user_id: fullChat.id })); +export async function constructChat(fullChat: Api.userFull | Api.chatFull | Api.channelFull, getEntity: EntityGetter): Promise { + if (is("userFull", fullChat)) { + const user = await getEntity({ _: "peerUser", user_id: fullChat.id }); if (user == null) unreachable(); const chatP = constructChatP(user); return cleanObject({ ...chatP, birthday: fullChat.birthday ? constructBirthday(fullChat.birthday) : undefined, - photo: fullChat.profile_photo && fullChat.profile_photo instanceof types.Photo ? constructPhoto(fullChat.profile_photo) : undefined, + photo: fullChat.profile_photo && is("photo", fullChat.profile_photo) ? constructPhoto(fullChat.profile_photo) : undefined, address: fullChat.business_location?.address, - location: fullChat.business_location?.geo_point && fullChat.business_location.geo_point instanceof types.GeoPoint ? constructLocation(fullChat.business_location.geo_point) : undefined, + location: fullChat.business_location?.geo_point && is("geoPoint", fullChat.business_location.geo_point) ? constructLocation(fullChat.business_location.geo_point) : undefined, openingHours: fullChat.business_work_hours ? constructOpeningHours(fullChat.business_work_hours) : undefined, }); - } else if (fullChat instanceof types.ChatFull) { - const chat = await getEntity(new types.PeerChat({ chat_id: fullChat.id })); + } else if (is("chatFull", fullChat)) { + const chat = await getEntity({ _: "peerChat", chat_id: fullChat.id }); if (chat == null) unreachable(); const chatP = constructChatP(chat); return cleanObject({ ...chatP, - photo: fullChat.chat_photo && fullChat.chat_photo instanceof types.Photo ? constructPhoto(fullChat.chat_photo) : undefined, + photo: fullChat.chat_photo && is("photo", fullChat.chat_photo) ? constructPhoto(fullChat.chat_photo) : undefined, videoChatId: fullChat.call ? String(fullChat.call.id) : undefined, }); - } else if (fullChat instanceof types.ChannelFull) { - const chat = await getEntity(new types.PeerChannel({ channel_id: fullChat.id })); + } else if (is("channelFull", fullChat)) { + const chat = await getEntity({ _: "peerChannel", channel_id: fullChat.id }); if (chat == null) unreachable(); const chatP = constructChatP(chat); return cleanObject({ ...chatP, - photo: fullChat.chat_photo && fullChat.chat_photo instanceof types.Photo ? constructPhoto(fullChat.chat_photo) : undefined, + photo: fullChat.chat_photo && is("photo", fullChat.chat_photo) ? constructPhoto(fullChat.chat_photo) : undefined, videoChatId: fullChat.call ? String(fullChat.call.id) : undefined, }); } diff --git a/types/2_chat_member.ts b/types/2_chat_member.ts index fff21b34..f5cd6cae 100644 --- a/types/2_chat_member.ts +++ b/types/2_chat_member.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject, fromUnixTimestamp } from "../1_utilities.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { ChatAdministratorRights, constructChatAdministratorRights } from "./0_chat_administrator_rights.ts"; import { ChatMemberRights, constructChatMemberRights } from "./0_chat_member_rights.ts"; @@ -76,30 +76,30 @@ export interface ChatMemberBanned extends _ChatMemberBase { /** A chat member. */ export type ChatMember = ChatMemberCreator | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned; -export async function constructChatMember(participant: enums.ChannelParticipant | enums.ChatParticipant, getEntity: EntityGetter): Promise { - const user_ = "user_id" in participant ? await getEntity(new types.PeerUser(participant)) : "peer" in participant ? participant.peer instanceof types.PeerUser ? await getEntity(participant.peer) : unreachable() : unreachable(); // TODO: support other peer types +export async function constructChatMember(participant: Api.ChannelParticipant | Api.ChatParticipant, getEntity: EntityGetter): Promise { + const user_ = "user_id" in participant ? await getEntity({ ...participant, _: "peerUser" }) : "peer" in participant ? is("peerUser", participant.peer) ? await getEntity(participant.peer) : unreachable() : unreachable(); // TODO: support other peer types if (user_ == null) unreachable(); const user = constructUser(user_); - if (participant instanceof types.ChannelParticipant || participant instanceof types.ChatParticipant) { + if (is("channelParticipant", participant) || is("chatParticipant", participant)) { return { status: "member", user, }; - } else if (participant instanceof types.ChannelParticipantCreator) { + } else if (is("channelParticipantCreator", participant)) { return cleanObject({ status: "creator", user, isAnonymous: participant.admin_rights.anonymous ? true : false, title: participant.rank, }); - } else if (participant instanceof types.ChannelParticipantAdmin) { + } else if (is("channelParticipantAdmin", participant)) { return cleanObject({ status: "administrator", user, rights: constructChatAdministratorRights(participant.admin_rights), title: participant.rank, }); - } else if (participant instanceof types.ChannelParticipantBanned) { + } else if (is("channelParticipantBanned", participant)) { const untilDate = participant.banned_rights.until_date ? fromUnixTimestamp(participant.banned_rights.until_date) : undefined; if (!participant.banned_rights.view_messages) { participant.peer; @@ -118,11 +118,11 @@ export async function constructChatMember(participant: enums.ChannelParticipant rights, untilDate, }); - } else if (participant instanceof types.ChannelParticipantSelf) { + } else if (is("channelParticipantSelf", participant)) { unreachable(); // TODO: implement - } else if (participant instanceof types.ChannelParticipantLeft) { + } else if (is("channelParticipantLeft", participant)) { return { status: "left", user }; - } else if (participant instanceof types.ChatParticipantAdmin) { + } else if (is("chatParticipantAdmin", participant)) { return cleanObject({ status: "administrator", user, @@ -141,7 +141,7 @@ export async function constructChatMember(participant: enums.ChannelParticipant canManageTopics: false, }, }); - } else if (participant instanceof types.ChatParticipantCreator) { + } else if (is("chatParticipantCreator", participant)) { return cleanObject({ status: "creator", user, diff --git a/types/2_chosen_inline_result.ts b/types/2_chosen_inline_result.ts index 9d891a46..986979a6 100644 --- a/types/2_chosen_inline_result.ts +++ b/types/2_chosen_inline_result.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { base64EncodeUrlSafe, cleanObject } from "../1_utilities.ts"; -import { serialize, types } from "../2_tl.ts"; +import { Api, is, serialize } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructLocation, Location } from "./0_location.ts"; import { constructUser, User } from "./1_user.ts"; @@ -39,16 +39,16 @@ export interface ChosenInlineResult { query: string; } -export async function constructChosenInlineResult(ubis: types.UpdateBotInlineSend, getEntity: EntityGetter): Promise { - const entity = await getEntity(new types.PeerUser(ubis)); - if (!entity || !(entity instanceof types.User)) { +export async function constructChosenInlineResult(ubis: Api.updateBotInlineSend, getEntity: EntityGetter): Promise { + const entity = await getEntity({ ...ubis, _: "peerUser" }); + if (!entity || !(is("user", entity))) { unreachable(); } return cleanObject({ resultId: ubis.id, from: constructUser(entity), - location: ubis.geo instanceof types.GeoPoint ? constructLocation(ubis.geo) : undefined, - inlineMessageId: ubis.msg_id === undefined ? undefined : base64EncodeUrlSafe(ubis.msg_id[serialize]()), + location: is("geoPoint", ubis.geo) ? constructLocation(ubis.geo) : undefined, + inlineMessageId: ubis.msg_id === undefined ? undefined : base64EncodeUrlSafe(serialize(ubis.msg_id)), query: ubis.query, }); } diff --git a/types/2_game.ts b/types/2_game.ts index 83a61fb4..7b53ede4 100644 --- a/types/2_game.ts +++ b/types/2_game.ts @@ -19,7 +19,7 @@ */ import { cleanObject } from "../1_utilities.ts"; -import { as, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; import { FileId, FileType, serializeFileId, toUniqueFileId } from "./_file_id.ts"; import { MessageEntity } from "./0_message_entity.ts"; import { Animation, constructAnimation } from "./1_animation.ts"; @@ -41,9 +41,9 @@ export interface Game { animation?: Animation; } -export function constructGame(media_: types.MessageMediaGame): Game { +export function constructGame(media_: Api.messageMediaGame): Game { const game_ = media_.game; - const document_ = game_.document ? game_.document[as](types.Document) : undefined; + const document_ = game_.document ? as("document", game_.document) : undefined; const fileId_: FileId | undefined = document_ ? { type: FileType.Animation, @@ -56,12 +56,12 @@ export function constructGame(media_: types.MessageMediaGame): Game { return cleanObject({ title: game_.title, description: media_.game.description, - photo: constructPhoto(game_.photo[as](types.Photo)), + photo: constructPhoto(as("photo", game_.photo)), animation: fileId_ && document_ ? constructAnimation( document_, - document_.attributes.find((v): v is types.DocumentAttributeVideo => v instanceof types.DocumentAttributeVideo)!, - document_.attributes.find((v): v is types.DocumentAttributeFilename => v instanceof types.DocumentAttributeFilename)!, + document_.attributes.find((v): v is Api.documentAttributeVideo => is("documentAttributeVideo", v))!, + document_.attributes.find((v): v is Api.documentAttributeFilename => is("documentAttributeFilename", v))!, serializeFileId(fileId_), toUniqueFileId(fileId_), ) diff --git a/types/2_inactive_chat.ts b/types/2_inactive_chat.ts index 855e8231..85378b6e 100644 --- a/types/2_inactive_chat.ts +++ b/types/2_inactive_chat.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { fromUnixTimestamp } from "../1_utilities.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { ChatP, constructChatP } from "./1_chat_p.ts"; /** An inactive chat. */ @@ -31,8 +31,8 @@ export interface InactiveChat { chat: ChatP; } -export function constructInactiveChat(chat_: enums.Chat, lastActivity: number): InactiveChat { - if (chat_ instanceof types.ChatEmpty) { +export function constructInactiveChat(chat_: Api.Chat, lastActivity: number): InactiveChat { + if (is("chatEmpty", chat_)) { unreachable(); } const chat = constructChatP(chat_); diff --git a/types/2_inline_keyboard_button.ts b/types/2_inline_keyboard_button.ts index 1c50eaaa..b8be840f 100644 --- a/types/2_inline_keyboard_button.ts +++ b/types/2_inline_keyboard_button.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { UsernameResolver } from "./_getters.ts"; import { LoginUrl } from "./0_login_url.ts"; import { constructMiniAppInfo, MiniAppInfo } from "./0_mini_app_info.ts"; @@ -88,51 +88,45 @@ export type InlineKeyboardButton = | InlineKeyboardButtonGame | InlineKeyboardButtonPay; -export function constructInlineKeyboardButton(button_: enums.KeyboardButton): InlineKeyboardButton { - if (button_ instanceof types.KeyboardButtonUrl) { +export function constructInlineKeyboardButton(button_: Api.KeyboardButton): InlineKeyboardButton { + if (is("keyboardButtonUrl", button_)) { return { text: button_.text, url: button_.url }; - } else if (button_ instanceof types.KeyboardButtonCallback) { + } else if (is("keyboardButtonCallback", button_)) { return { text: button_.text, callbackData: new TextDecoder().decode(button_.data) }; - } else if (button_ instanceof types.KeyboardButtonWebView || button_ instanceof types.KeyboardButtonSimpleWebView) { + } else if (is("keyboardButtonWebView", button_) || is("keyboardButtonSimpleWebView", button_)) { return { text: button_.text, miniApp: constructMiniAppInfo(button_.url) }; - } else if (button_ instanceof types.KeyboardButtonUrlAuth) { + } else if (is("keyboardButtonUrlAuth", button_)) { return { text: button_.text, loginUrl: { url: button_.url, forwardText: button_.fwd_text } }; - } else if (button_ instanceof types.KeyboardButtonSwitchInline) { + } else if (is("keyboardButtonSwitchInline", button_)) { if (button_.same_peer) { return { text: button_.text, switchInlineQueryCurrentChat: button_.query }; } else { return { text: button_.text, switchInlineQuery: button_.query }; } - } else if (button_ instanceof types.KeyboardButtonBuy) { + } else if (is("keyboardButtonBuy", button_)) { return { text: button_.text, pay: true }; - } else if (button_ instanceof types.KeyboardButtonGame) { + } else if (is("keyboardButtonGame", button_)) { return { text: button_.text, callbackGame: {} }; } else { unreachable(); } } -export async function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise { +export async function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise { if ("url" in button) { - return new types.KeyboardButtonUrl({ text: button.text, url: button.url }); + return { _: "keyboardButtonUrl", text: button.text, url: button.url }; } else if ("callbackData" in button) { - return new types.KeyboardButtonCallback({ text: button.text, data: new TextEncoder().encode(button.callbackData) }); + return { _: "keyboardButtonCallback", text: button.text, data: new TextEncoder().encode(button.callbackData) }; } else if ("miniApp" in button) { - return new types.KeyboardButtonWebView({ text: button.text, url: button.miniApp.url }); + return { _: "keyboardButtonWebView", text: button.text, url: button.miniApp.url }; } else if ("loginUrl" in button) { - return new types.InputKeyboardButtonUrlAuth({ - text: button.text, - url: button.loginUrl.url, - fwd_text: button.loginUrl.forwardText, - bot: button.loginUrl.botUsername ? await usernameResolver(button.loginUrl.botUsername) : new types.InputUserSelf(), - request_write_access: button.loginUrl.requestWriteAccess || undefined, - }); + return { _: "inputKeyboardButtonUrlAuth", text: button.text, url: button.loginUrl.url, fwd_text: button.loginUrl.forwardText, bot: button.loginUrl.botUsername ? await usernameResolver(button.loginUrl.botUsername) : { _: "inputUserSelf" }, request_write_access: button.loginUrl.requestWriteAccess || undefined }; } else if ("switchInlineQuery" in button) { - return new types.KeyboardButtonSwitchInline({ text: button.text, query: button.switchInlineQuery }); + return { _: "keyboardButtonSwitchInline", text: button.text, query: button.switchInlineQuery }; } else if ("switchInlineQueryCurrentChat" in button) { - return new types.KeyboardButtonSwitchInline({ text: button.text, query: button.switchInlineQueryCurrentChat, same_peer: true }); + return { _: "keyboardButtonSwitchInline", text: button.text, query: button.switchInlineQueryCurrentChat, same_peer: true }; } else if ("pay" in button) { - return new types.KeyboardButtonBuy({ text: button.text }); + return { _: "keyboardButtonBuy", text: button.text }; } else { unreachable(); } diff --git a/types/2_inline_query.ts b/types/2_inline_query.ts index 4b4e343e..d38ffb47 100644 --- a/types/2_inline_query.ts +++ b/types/2_inline_query.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructLocation, Location } from "./0_location.ts"; import { constructUser, User } from "./1_user.ts"; @@ -40,8 +40,8 @@ export interface InlineQuery { location?: Location; } -export async function constructInlineQuery(query_: types.UpdateBotInlineQuery, getEntity: EntityGetter): Promise { - const user_ = await getEntity(new types.PeerUser({ user_id: query_.user_id })); +export async function constructInlineQuery(query_: Api.updateBotInlineQuery, getEntity: EntityGetter): Promise { + const user_ = await getEntity({ _: "peerUser", user_id: query_.user_id }); if (user_ == null) { unreachable(); } @@ -50,22 +50,22 @@ export async function constructInlineQuery(query_: types.UpdateBotInlineQuery, g let chatType: InlineQuery["chatType"] | undefined; if (query_.peer_type !== undefined) { - if (query_.peer_type instanceof types.InlineQueryPeerTypeSameBotPM) { + if (is("inlineQueryPeerTypeSameBotPM", query_.peer_type)) { chatType = "private"; - } else if (query_.peer_type instanceof types.InlineQueryPeerTypeBotPM || query_.peer_type instanceof types.InlineQueryPeerTypePM) { + } else if (is("inlineQueryPeerTypeBotPM", query_.peer_type) || is("inlineQueryPeerTypePM", query_.peer_type)) { chatType = "sender"; - } else if (query_.peer_type instanceof types.InlineQueryPeerTypeChat) { + } else if (is("inlineQueryPeerTypeChat", query_.peer_type)) { chatType = "group"; - } else if (query_.peer_type instanceof types.InlineQueryPeerTypeMegagroup) { + } else if (is("inlineQueryPeerTypeMegagroup", query_.peer_type)) { chatType = "supergroup"; - } else if (query_.peer_type instanceof types.InlineQueryPeerTypeBroadcast) { + } else if (is("inlineQueryPeerTypeBroadcast", query_.peer_type)) { chatType = "channel"; } else { unreachable(); } } - const location = query_.geo !== undefined && query_.geo instanceof types.GeoPoint ? constructLocation(query_.geo) : undefined; + const location = query_.geo !== undefined && is("geoPoint", query_.geo) ? constructLocation(query_.geo) : undefined; return { id: String(query_.query_id), diff --git a/types/2_invite_link.ts b/types/2_invite_link.ts index 57344039..15851c8d 100644 --- a/types/2_invite_link.ts +++ b/types/2_invite_link.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject, fromUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructUser, User } from "./1_user.ts"; @@ -45,8 +45,8 @@ export interface InviteLink { pendingJoinRequestCount?: number; } -export async function constructInviteLink(inviteLink_: types.ChatInviteExported, getEntity: EntityGetter): Promise { - const entity = await getEntity(new types.PeerUser({ user_id: inviteLink_.admin_id })); +export async function constructInviteLink(inviteLink_: Api.chatInviteExported, getEntity: EntityGetter): Promise { + const entity = await getEntity({ _: "peerUser", user_id: inviteLink_.admin_id }); if (!entity) { unreachable(); } diff --git a/types/2_message_reaction_count.ts b/types/2_message_reaction_count.ts index 37418ca6..0cc28df4 100644 --- a/types/2_message_reaction_count.ts +++ b/types/2_message_reaction_count.ts @@ -19,7 +19,7 @@ */ import { fromUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { ChatP, constructChatP } from "./1_chat_p.ts"; import { constructReactionCount, ReactionCount } from "./1_reaction_count.ts"; @@ -36,7 +36,7 @@ export interface MessageReactionCount { reactions: ReactionCount[]; } -export async function constructMessageReactionCount(update: types.UpdateBotMessageReactions, getEntity: EntityGetter): Promise { +export async function constructMessageReactionCount(update: Api.updateBotMessageReactions, getEntity: EntityGetter): Promise { const date = fromUnixTimestamp(update.date); const reactions = update.reactions.map((v) => constructReactionCount(v)); const entity = await getEntity(update.peer); diff --git a/types/2_message_reactions.ts b/types/2_message_reactions.ts index 9421f272..aa588494 100644 --- a/types/2_message_reactions.ts +++ b/types/2_message_reactions.ts @@ -19,7 +19,7 @@ */ import { cleanObject, fromUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructReaction, Reaction } from "./0_reaction.ts"; import { ChatP, constructChatP } from "./1_chat_p.ts"; @@ -43,7 +43,7 @@ export interface MessageReactions { newReactions: Reaction[]; } -export async function constructMessageReactions(update: types.UpdateBotMessageReaction, getEntity: EntityGetter): Promise { +export async function constructMessageReactions(update: Api.updateBotMessageReaction, getEntity: EntityGetter): Promise { const date = fromUnixTimestamp(update.date); const oldReactions = update.old_reactions.map((v) => constructReaction(v)); const newReactions = update.new_reactions.map((v) => constructReaction(v)); @@ -62,7 +62,7 @@ export async function constructMessageReactions(update: types.UpdateBotMessageRe if (!entity) { return null; } - if (entity instanceof types.User) { + if (is("user", entity)) { user = constructUser(entity); } else { actorChat = constructChatP(entity); diff --git a/types/2_story_content.ts b/types/2_story_content.ts index f5cb4487..04ab02e1 100644 --- a/types/2_story_content.ts +++ b/types/2_story_content.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { as, enums, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; import { FileId, FileType, serializeFileId, toUniqueFileId } from "./_file_id.ts"; import { constructPhoto, Photo } from "./1_photo.ts"; import { constructVideo, Video } from "./1_video.ts"; @@ -45,20 +45,20 @@ export interface StoryContentUnsupported { /** A story content. */ export type StoryContent = StoryContentPhoto | StoryContentVideo | StoryContentUnsupported; -export function constructStoryContent(media: enums.MessageMedia): StoryContent { - if (media instanceof types.MessageMediaPhoto) { +export function constructStoryContent(media: Api.MessageMedia): StoryContent { + if (is("messageMediaPhoto", media)) { if (!media.photo) { unreachable(); } - const photo = constructPhoto(media.photo[as](types.Photo)); + const photo = constructPhoto(as("photo", media.photo)); return { photo }; - } else if (media instanceof types.MessageMediaDocument) { + } else if (is("messageMediaDocument", media)) { const document = media.document; - if (!(document instanceof types.Document)) { + if (!(is("document", document))) { unreachable(); } - const video = document.attributes.find((v): v is types.DocumentAttributeVideo => v instanceof types.DocumentAttributeVideo); + const video = document.attributes.find((v): v is Api.documentAttributeVideo => is("documentAttributeVideo", v)); if (!video) { unreachable(); } diff --git a/types/2_story_interactions.ts b/types/2_story_interactions.ts index 9b7e3853..7aec7ac9 100644 --- a/types/2_story_interactions.ts +++ b/types/2_story_interactions.ts @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructStoryReaction, StoryReaction } from "./1_story_reaction.ts"; /** The interactions made with a story. */ @@ -29,7 +29,7 @@ export interface StoryInteractions { forwards: number; } -export function constructStoryInteractions(views_: types.StoryViews): StoryInteractions { +export function constructStoryInteractions(views_: Api.storyViews): StoryInteractions { const views = views_.views_count; const forwards = views_.forwards_count ?? 0; const reactionCount = views_.reactions_count; diff --git a/types/2_story_interactive_area.ts b/types/2_story_interactive_area.ts index 640c8913..84ecc337 100644 --- a/types/2_story_interactive_area.ts +++ b/types/2_story_interactive_area.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { chatIdToPeer, enums, peerToChatId, types } from "../2_tl.ts"; +import { Api, chatIdToPeer, is, peerToChatId } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructLocation, Location } from "./0_location.ts"; import { MessageReference } from "./0_message_reference.ts"; @@ -71,7 +71,7 @@ export type StoryInteractiveArea = | StoryInteractiveAreaReaction | StoryInteractiveAreaMessage; -function constructStoryInteractiveAreaPosition(position: types.MediaAreaCoordinates): StoryInteractiveAreaPosition { +function constructStoryInteractiveAreaPosition(position: Api.mediaAreaCoordinates): StoryInteractiveAreaPosition { return { xPercentage: position.x, yPercentage: position.y, @@ -80,18 +80,18 @@ function constructStoryInteractiveAreaPosition(position: types.MediaAreaCoordina rotationAngle: position.rotation, }; } -export function constructStoryInteractiveArea(area: enums.MediaArea): StoryInteractiveArea { +export function constructStoryInteractiveArea(area: Api.MediaArea): StoryInteractiveArea { const position = constructStoryInteractiveAreaPosition(area.coordinates); - if (area instanceof types.MediaAreaGeoPoint) { - if (area.geo instanceof types.GeoPointEmpty) { + if (is("mediaAreaGeoPoint", area)) { + if (is("geoPointEmpty", area.geo)) { unreachable(); // will this ever be empty? } const location = constructLocation(area.geo); return { position, location }; - } else if (area instanceof types.MediaAreaVenue) { + } else if (is("mediaAreaVenue", area)) { const venue = constructVenue(area); return { position, venue }; - } else if (area instanceof types.MediaAreaSuggestedReaction) { + } else if (is("mediaAreaSuggestedReaction", area)) { const reaction = constructReaction(area.reaction); return { position, @@ -100,7 +100,7 @@ export function constructStoryInteractiveArea(area: enums.MediaArea): StoryInter flipped: area.flipped ? true : false, dark: area.dark ? true : false, }; - } else if (area instanceof types.MediaAreaChannelPost) { + } else if (is("mediaAreaChannelPost", area)) { return { position, messageReference: { @@ -113,23 +113,18 @@ export function constructStoryInteractiveArea(area: enums.MediaArea): StoryInter } } -function storyInteractiveAreaPositionToTlObject(position: StoryInteractiveAreaPosition) { - return new types.MediaAreaCoordinates({ - x: position.xPercentage, - y: position.yPercentage, - w: position.widthPercentage, - h: position.heightPercentage, - rotation: position.rotationAngle, - }); +function storyInteractiveAreaPositionToTlObject(position: StoryInteractiveAreaPosition): Api.mediaAreaCoordinates { + return { _: "mediaAreaCoordinates", x: position.xPercentage, y: position.yPercentage, w: position.widthPercentage, h: position.heightPercentage, rotation: position.rotationAngle }; } -export async function storyInteractiveAreaToTlObject(area: StoryInteractiveArea, getEntity: EntityGetter): Promise { +export async function storyInteractiveAreaToTlObject(area: StoryInteractiveArea, getEntity: EntityGetter): Promise { const coordinates = storyInteractiveAreaPositionToTlObject(area.position); if ("location" in area) { - const geo = new types.GeoPoint({ lat: area.location.latitude, long: area.location.longitude, access_hash: 0n, accuracy_radius: area.location.horizontalAccuracy }); - return new types.MediaAreaGeoPoint({ coordinates, geo }); + const geo: Api.geoPoint = { _: "geoPoint", lat: area.location.latitude, long: area.location.longitude, access_hash: 0n, accuracy_radius: area.location.horizontalAccuracy }; + return { _: "mediaAreaGeoPoint", coordinates, geo }; } else if ("venue" in area) { - const geo = new types.GeoPoint({ lat: area.venue.location.latitude, long: area.venue.location.longitude, access_hash: 0n, accuracy_radius: area.venue.location.horizontalAccuracy }); - return new types.MediaAreaVenue({ + const geo: Api.geoPoint = { _: "geoPoint", lat: area.venue.location.latitude, long: area.venue.location.longitude, access_hash: 0n, accuracy_radius: area.venue.location.horizontalAccuracy }; + return { + _: "mediaAreaVenue", coordinates, geo, address: area.venue.address, @@ -137,22 +132,17 @@ export async function storyInteractiveAreaToTlObject(area: StoryInteractiveArea, title: area.venue.title, venue_id: area.venue.foursquareId || "", // TODO: require? venue_type: area.venue.foursquareType || "", // TODO: require? - }); + }; } else if ("reaction" in area) { const reaction = reactionToTlObject(area.reaction); - return new types.MediaAreaSuggestedReaction({ - coordinates, - reaction, - dark: area.dark ? true : undefined, - flipped: area.flipped ? true : undefined, - }); + return { _: "mediaAreaSuggestedReaction", coordinates, reaction, dark: area.dark ? true : undefined, flipped: area.flipped ? true : undefined }; } else if ("messageReference" in area) { const entity = await getEntity(chatIdToPeer(area.messageReference.chatId)); - if (!(entity instanceof types.Channel)) { + if (!(is("channel", entity))) { unreachable(); } - const channel = new types.InputChannel({ channel_id: entity.id, access_hash: entity.access_hash ?? 0n }); - return new types.InputMediaAreaChannelPost({ coordinates, channel, msg_id: area.messageReference.messageId }); + const channel: Api.inputChannel = { _: "inputChannel", channel_id: entity.id, access_hash: entity.access_hash ?? 0n }; + return { _: "inputMediaAreaChannelPost", coordinates, channel, msg_id: area.messageReference.messageId }; } else { unreachable(); } diff --git a/types/3_chat_member_updated.ts b/types/3_chat_member_updated.ts index 30a334de..08550612 100644 --- a/types/3_chat_member_updated.ts +++ b/types/3_chat_member_updated.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject, fromUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructChatP } from "./1_chat_p.ts"; import { ChatP } from "./1_chat_p.ts"; @@ -46,23 +46,23 @@ export interface ChatMemberUpdated { viaSharedFolder?: boolean; } -export async function constructChatMemberUpdated(update: types.UpdateChannelParticipant | types.UpdateChatParticipant, getEntity: EntityGetter): Promise { +export async function constructChatMemberUpdated(update: Api.updateChannelParticipant | Api.updateChatParticipant, getEntity: EntityGetter): Promise { if (!update.prev_participant && !update.new_participant) { unreachable(); } - const chat_ = await getEntity("channel_id" in update ? new types.PeerChannel(update) : new types.PeerChat(update)); - const from_ = await getEntity(new types.PeerUser({ user_id: update.actor_id })); + const chat_ = await getEntity("channel_id" in update ? { ...update, _: "peerChannel" } : { ...update, _: "peerChat" }); + const from_ = await getEntity({ _: "peerUser", user_id: update.actor_id }); if (!chat_ || !from_) { unreachable(); } - const userPeer = new types.PeerUser(update); + const userPeer: Api.peerUser = { ...update, _: "peerUser" }; const chat = constructChatP(chat_); const from = constructUser(from_); const date = fromUnixTimestamp(update.date); - const oldChatMember = await constructChatMember(update.prev_participant ?? new types.ChannelParticipantLeft({ peer: userPeer }), getEntity); - const newChatMember = await constructChatMember(update.new_participant ?? new types.ChannelParticipantLeft({ peer: userPeer }), getEntity); + const oldChatMember = await constructChatMember(update.prev_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getEntity); + const newChatMember = await constructChatMember(update.new_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getEntity); const viaSharedFolder = "via_chatlist" in update ? update.via_chatlist ? true : update.invite ? false : undefined : undefined; - const inviteLink = (update.invite && update.invite instanceof types.ChatInviteExported) ? await constructInviteLink(update.invite, getEntity) : undefined; + const inviteLink = (update.invite && is("chatInviteExported", update.invite)) ? await constructInviteLink(update.invite, getEntity) : undefined; return cleanObject({ chat, from, diff --git a/types/3_reply_markup.ts b/types/3_reply_markup.ts index ee00841a..bbcc14b7 100644 --- a/types/3_reply_markup.ts +++ b/types/3_reply_markup.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject } from "../1_utilities.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api, is } from "../2_tl.ts"; import { UsernameResolver } from "./_getters.ts"; import { constructKeyboardButton, KeyboardButton, keyboardButtonToTlObject } from "./1_keyboard_button.ts"; import { constructInlineKeyboardButton, InlineKeyboardButton, inlineKeyboardButtonToTlObject } from "./2_inline_keyboard_button.ts"; @@ -33,7 +33,7 @@ export interface ReplyMarkupInlineKeyboard { inlineKeyboard: InlineKeyboardButton[][]; } -function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): ReplyMarkupInlineKeyboard { +function constructInlineKeyboardMarkup(keyboard_: Api.replyInlineMarkup): ReplyMarkupInlineKeyboard { const rows = new Array(); for (const row_ of keyboard_.rows) { const row = new Array(); @@ -45,16 +45,16 @@ function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): Repl return { inlineKeyboard: rows }; } -async function inlineKeyboardMarkupToTlObject(keyboard: ReplyMarkupInlineKeyboard, usernameResolver: UsernameResolver) { - const rows_ = new Array(); +async function inlineKeyboardMarkupToTlObject(keyboard: ReplyMarkupInlineKeyboard, usernameResolver: UsernameResolver): Promise { + const rows_ = new Array(); for (const row of keyboard.inlineKeyboard) { - const row_ = new Array(); + const row_ = new Array(); for (const button of row) { row_.push(await inlineKeyboardButtonToTlObject(button, usernameResolver)); } - rows_.push(new types.KeyboardButtonRow({ buttons: row_ })); + rows_.push({ _: "keyboardButtonRow", buttons: row_ }); } - return new types.ReplyInlineMarkup({ rows: rows_ }); + return { _: "replyInlineMarkup", rows: rows_ }; } // @@ -70,7 +70,7 @@ export interface ReplyMarkupKeyboard { selective?: boolean; } -function constructReplyKeyboardMarkup(keyboard_: types.ReplyKeyboardMarkup): ReplyMarkupKeyboard { +function constructReplyKeyboardMarkup(keyboard_: Api.replyKeyboardMarkup): ReplyMarkupKeyboard { const rows = new Array(); for (const row_ of keyboard_.rows) { const row = new Array(); @@ -88,23 +88,16 @@ function constructReplyKeyboardMarkup(keyboard_: types.ReplyKeyboardMarkup): Rep }; } -function replyKeyboardMarkupToTlObject(replyMarkup: ReplyMarkupKeyboard) { - const rows_ = new Array(); +function replyKeyboardMarkupToTlObject(replyMarkup: ReplyMarkupKeyboard): Api.replyKeyboardMarkup { + const rows_ = new Array(); for (const row of replyMarkup.keyboard) { - const row_ = new Array(); + const row_ = new Array(); for (const button of row) { row_.push(keyboardButtonToTlObject(button)); } - rows_.push(new types.KeyboardButtonRow({ buttons: row_ })); + rows_.push({ _: "keyboardButtonRow", buttons: row_ }); } - return new types.ReplyKeyboardMarkup({ - resize: replyMarkup.resizeKeyboard || undefined, - single_use: replyMarkup.oneTimeKeyboard || undefined, - selective: replyMarkup.selective || undefined, - persistent: replyMarkup.isPersistent || undefined, - rows: rows_, - placeholder: replyMarkup.inputFieldPlaceholder, - }); + return { _: "replyKeyboardMarkup", resize: replyMarkup.resizeKeyboard || undefined, single_use: replyMarkup.oneTimeKeyboard || undefined, selective: replyMarkup.selective || undefined, persistent: replyMarkup.isPersistent || undefined, rows: rows_, placeholder: replyMarkup.inputFieldPlaceholder }; } // @@ -123,12 +116,12 @@ export interface ReplyMarkupRemoveKeyboard { selective?: boolean; } -function constructReplyKeyboardRemove(replyMarkup_: types.ReplyKeyboardHide): ReplyMarkupRemoveKeyboard { +function constructReplyKeyboardRemove(replyMarkup_: Api.replyKeyboardHide): ReplyMarkupRemoveKeyboard { return cleanObject({ removeKeyboard: true, selective: replyMarkup_.selective }); } -function replyKeyboardRemoveToTlObject(replyMarkup: ReplyMarkupRemoveKeyboard) { - return new types.ReplyKeyboardHide({ selective: replyMarkup.selective || undefined }); +function replyKeyboardRemoveToTlObject(replyMarkup: ReplyMarkupRemoveKeyboard): Api.replyKeyboardHide { + return { _: "replyKeyboardHide", selective: replyMarkup.selective || undefined }; } // @@ -149,7 +142,7 @@ export interface ReplyMarkupForceReply { selective?: boolean; } -function constructForceReply(replyMarkup_: types.ReplyKeyboardForceReply) { +function constructForceReply(replyMarkup_: Api.replyKeyboardForceReply) { const replyMarkup: ReplyMarkupForceReply = { forceReply: true }; if (replyMarkup_.placeholder) { replyMarkup.inputFieldPlaceholder = replyMarkup_.placeholder; @@ -160,11 +153,8 @@ function constructForceReply(replyMarkup_: types.ReplyKeyboardForceReply) { return replyMarkup; } -function forceReplyToTlObject(replyMarkup: ReplyMarkupForceReply) { - return new types.ReplyKeyboardForceReply({ - selective: replyMarkup.selective || undefined, - placeholder: replyMarkup.inputFieldPlaceholder, - }); +function forceReplyToTlObject(replyMarkup: ReplyMarkupForceReply): Api.replyKeyboardForceReply { + return { _: "replyKeyboardForceReply", selective: replyMarkup.selective || undefined, placeholder: replyMarkup.inputFieldPlaceholder }; } // @@ -172,21 +162,21 @@ function forceReplyToTlObject(replyMarkup: ReplyMarkupForceReply) { /** A message's reply markup. */ export type ReplyMarkup = ReplyMarkupInlineKeyboard | ReplyMarkupKeyboard | ReplyMarkupRemoveKeyboard | ReplyMarkupForceReply; -export function constructReplyMarkup(replyMarkup: enums.ReplyMarkup): ReplyMarkup { - if (replyMarkup instanceof types.ReplyKeyboardMarkup) { +export function constructReplyMarkup(replyMarkup: Api.ReplyMarkup): ReplyMarkup { + if (is("replyKeyboardMarkup", replyMarkup)) { return constructReplyKeyboardMarkup(replyMarkup); - } else if (replyMarkup instanceof types.ReplyInlineMarkup) { + } else if (is("replyInlineMarkup", replyMarkup)) { return constructInlineKeyboardMarkup(replyMarkup); - } else if (replyMarkup instanceof types.ReplyKeyboardHide) { + } else if (is("replyKeyboardHide", replyMarkup)) { return constructReplyKeyboardRemove(replyMarkup); - } else if (replyMarkup instanceof types.ReplyKeyboardForceReply) { + } else if (is("replyKeyboardForceReply", replyMarkup)) { return constructForceReply(replyMarkup); } else { unreachable(); } } -export async function replyMarkupToTlObject(replyMarkup: ReplyMarkup, usernameResolver: UsernameResolver): Promise { +export async function replyMarkupToTlObject(replyMarkup: ReplyMarkup, usernameResolver: UsernameResolver): Promise { if ("inlineKeyboard" in replyMarkup) { return await inlineKeyboardMarkupToTlObject(replyMarkup, usernameResolver); } else if ("keyboard" in replyMarkup) { diff --git a/types/3_story.ts b/types/3_story.ts index 520cb0e6..d0773872 100644 --- a/types/3_story.ts +++ b/types/3_story.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject, fromUnixTimestamp } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructMessageEntity, MessageEntity } from "./0_message_entity.ts"; import { ChatP, constructChatP } from "./1_chat_p.ts"; @@ -46,7 +46,7 @@ export interface Story { captionEntities?: MessageEntity[]; } -export async function constructStory(story: types.StoryItem, peer: types.PeerUser | types.PeerChat | types.PeerChannel, getEntity: EntityGetter): Promise { +export async function constructStory(story: Api.storyItem, peer: Api.peerUser | Api.peerChat | Api.peerChannel, getEntity: EntityGetter): Promise { const id = story.id; const entity = await getEntity(peer); if (!entity) { diff --git a/types/4_inline_query_result.ts b/types/4_inline_query_result.ts index ff39bd55..afb700cd 100644 --- a/types/4_inline_query_result.ts +++ b/types/4_inline_query_result.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { as, enums, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; import { cleanObject } from "../1_utilities.ts"; import { deserializeFileId, FileType, getPhotoFileId, serializeFileId } from "./_file_id.ts"; import { UsernameResolver } from "./_getters.ts"; @@ -310,10 +310,10 @@ export type InlineQueryResult = | InlineQueryResultVideo | InlineQueryResultVoice; -export function constructInlineQueryResult(result: types.BotInlineResult | types.BotInlineMediaResult): InlineQueryResult { +export function constructInlineQueryResult(result: Api.botInlineResult | Api.botInlineMediaResult): InlineQueryResult { const id = result.id, title = result.title ?? "", type = result.type, description = result.description; - if (result.send_message instanceof types.BotInlineMessageMediaGeo) { - const geoPoint = result.send_message.geo as types.GeoPoint; + if (is("botInlineMessageMediaGeo", result.send_message)) { + const geoPoint = result.send_message.geo as Api.geoPoint; return cleanObject({ type: "location", id, @@ -325,8 +325,8 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types heading: result.send_message.heading, proximityAlertRadius: result.send_message.proximity_notification_radius, }); - } else if (result.send_message instanceof types.BotInlineMessageMediaVenue) { - const geoPoint = result.send_message.geo as types.GeoPoint; + } else if (is("botInlineMessageMediaVenue", result.send_message)) { + const geoPoint = result.send_message.geo as Api.geoPoint; return cleanObject({ type: "venue", id, @@ -337,7 +337,7 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types foursquareId: result.send_message.venue_id, foursquareType: result.send_message.venue_type, }); - } else if (result.send_message instanceof types.BotInlineMessageMediaWebPage || result.send_message instanceof types.BotInlineMessageText) { + } else if (is("botInlineMessageMediaWebPage", result.send_message) || is("botInlineMessageText", result.send_message)) { return cleanObject({ type: "article", id, @@ -347,24 +347,24 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types type: "text", text: result.send_message.message, entities: (result.send_message.entities ?? []).map(constructMessageEntity).filter((v) => v != null) as MessageEntity[], - linkPreview: result.send_message instanceof types.InputBotInlineMessageMediaWebPage ? { url: result.send_message.url, smallMedia: result.send_message.force_small_media, largeMedia: result.send_message.force_large_media, aboveText: result.send_message.invert_media } : undefined, + linkPreview: is("botInlineMessageMediaWebPage", result.send_message) ? { url: result.send_message.url, smallMedia: result.send_message.force_small_media, largeMedia: result.send_message.force_large_media, aboveText: result.send_message.invert_media } : undefined, }), replyMarkup: result.send_message.reply_markup ? constructReplyMarkup(result.send_message.reply_markup) as ReplyMarkupInlineKeyboard : undefined, }); - } else if (result.send_message instanceof types.BotInlineMessageMediaAuto) { + } else if (is("botInlineMessageMediaAuto", result.send_message)) { let ref: { url: string } | { fileId: string }; - let attributes: enums.DocumentAttribute[] | undefined; + let attributes: Api.DocumentAttribute[] | undefined; const thumbnailUrl = "thumb" in result ? result.thumb?.url : undefined; let photoSizes: ReturnType | undefined; - let photo: types.Photo | undefined; - if (result instanceof types.BotInlineMediaResult) { + let photo: Api.photo | undefined; + if (is("botInlineMediaResult", result)) { if (result.photo) { - photo = result.photo[as](types.Photo); + photo = as("photo", result.photo); ref = { fileId: getPhotoFileId(photo).fileId }; const { largest } = photoSizes = getPhotoSizes(photo); - attributes = [new types.DocumentAttributeImageSize({ w: largest.w, h: largest.h })]; + attributes = [{ _: "documentAttributeImageSize", w: largest.w, h: largest.h }]; } else if (result.document) { - const document = result.document[as](types.Document); + const document = as("document", result.document); ref = { fileId: serializeFileId( { @@ -396,7 +396,7 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types switch (type) { case "audio": { - const a = attributes?.find((v): v is types.DocumentAttributeAudio => v instanceof types.DocumentAttributeAudio); + const a = attributes?.find((v): v is Api.documentAttributeAudio => is("documentAttributeAudio", v)); return cleanObject({ id, type, @@ -410,7 +410,7 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types } case "gif": case "mpeg4Gif": { - const a = attributes.find((v): v is types.DocumentAttributeVideo => v instanceof types.DocumentAttributeVideo); + const a = attributes.find((v): v is Api.documentAttributeVideo => is("documentAttributeVideo", v)); return cleanObject({ id, type, @@ -425,7 +425,7 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types }) as InlineQueryResultGif | InlineQueryResultMpeg4Gif; } case "photo": { - const a = attributes.find((v): v is types.DocumentAttributeImageSize => v instanceof types.DocumentAttributeImageSize); + const a = attributes.find((v): v is Api.documentAttributeImageSize => is("documentAttributeImageSize", v)); return cleanObject({ id, type, @@ -441,7 +441,7 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types }); } case "video": { - const a = attributes.find((v): v is types.DocumentAttributeVideo => v instanceof types.DocumentAttributeVideo); + const a = attributes.find((v): v is Api.documentAttributeVideo => is("documentAttributeVideo", v)); return cleanObject({ id, type, @@ -458,7 +458,7 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types }); } case "voice": { - const a = attributes.find((v): v is types.DocumentAttributeAudio => v instanceof types.DocumentAttributeAudio); + const a = attributes.find((v): v is Api.documentAttributeAudio => is("documentAttributeAudio", v)); return cleanObject({ id, type, @@ -488,105 +488,81 @@ export function constructInlineQueryResult(result: types.BotInlineResult | types } // deno-lint-ignore no-explicit-any -export async function inlineQueryResultToTlObject(result_: InlineQueryResult, parseText: (text: string, params?: { parseMode?: ParseMode; entities?: MessageEntity[] }) => Promise, usernameResolver: UsernameResolver): Promise { - let document: enums.InputWebDocument | null = null; - let thumb: types.InputWebDocument | null = null; +export async function inlineQueryResultToTlObject(result_: InlineQueryResult, parseText: (text: string, params?: { parseMode?: ParseMode; entities?: MessageEntity[] }) => Promise, usernameResolver: UsernameResolver): Promise { + let document: Api.InputWebDocument | null = null; + let thumb: Api.inputWebDocument | null = null; let fileId_: string | null = null; switch (result_.type) { case "audio": if ("url" in result_) { - document = new types.InputWebDocument({ + document = { + _: "inputWebDocument", url: result_.url, size: 0, mime_type: "audio/mpeg", attributes: [ - new types.DocumentAttributeAudio({ - duration: result_.audioDuration ?? 0, - title: result_.title, - performer: result_.performer, - }), + { _: "documentAttributeAudio", duration: result_.audioDuration ?? 0, title: result_.title, performer: result_.performer }, ], - }); + }; } else { fileId_ = result_.fileId; } break; case "video": if ("url" in result_) { - document = new types.InputWebDocument({ + document = { + _: "inputWebDocument", url: result_.url, size: 0, mime_type: result_.mimeType ?? "video/mp4", attributes: [ - new types.DocumentAttributeVideo({ - duration: result_.videoDuration ?? 0, - h: result_.height ?? 0, - w: result_.width ?? 0, - }), + { _: "documentAttributeVideo", duration: result_.videoDuration ?? 0, h: result_.height ?? 0, w: result_.width ?? 0 }, ], - }); + }; } else { fileId_ = result_.fileId; } break; case "document": if ("url" in result_) { - document = new types.InputWebDocument({ - url: result_.url, - mime_type: "application/octet-stream", - attributes: [], - size: 0, - }); + document = { _: "inputWebDocument", url: result_.url, mime_type: "application/octet-stream", attributes: [], size: 0 }; } else { fileId_ = result_.fileId; } break; case "gif": if ("url" in result_) { - document = new types.InputWebDocument({ + document = { + _: "inputWebDocument", url: result_.url, size: 0, mime_type: "image/gif", attributes: [ - new types.DocumentAttributeVideo({ - duration: result_.duration ?? 0, - w: result_.width ?? 0, - h: result_.height ?? 0, - }), + { _: "documentAttributeVideo", duration: result_.duration ?? 0, w: result_.width ?? 0, h: result_.height ?? 0 }, ], - }); + }; } else { fileId_ = result_.fileId; } break; case "mpeg4Gif": if ("url" in result_) { - document = new types.InputWebDocument({ + document = { + _: "inputWebDocument", url: result_.url, size: 0, mime_type: "video/mp4", attributes: [ - new types.DocumentAttributeVideo({ - nosound: true, - duration: result_.duration ?? 0, - w: result_.width ?? 0, - h: result_.height ?? 0, - supports_streaming: true, - }), + { _: "documentAttributeVideo", nosound: true, duration: result_.duration ?? 0, w: result_.width ?? 0, h: result_.height ?? 0, supports_streaming: true }, ], - }); + }; } else { fileId_ = result_.fileId; } break; case "photo": if ("url" in result_) { - document = new types.InputWebDocument({ - url: result_.url, - size: 0, - mime_type: "image/jpeg", - attributes: [new types.DocumentAttributeImageSize({ w: result_.width ?? 0, h: result_.height ?? 0 })], - }); + document = { _: "inputWebDocument", url: result_.url, size: 0, mime_type: "image/jpeg", attributes: [{ _: "documentAttributeImageSize", w: result_.width ?? 0, h: result_.height ?? 0 }] }; } else { fileId_ = result_.fileId; } @@ -596,17 +572,15 @@ export async function inlineQueryResultToTlObject(result_: InlineQueryResult, pa break; case "voice": if ("url" in result_) { - document = new types.InputWebDocument({ + document = { + _: "inputWebDocument", url: result_.url, size: 0, mime_type: "audio/mpeg", attributes: [ - new types.DocumentAttributeAudio({ - duration: result_.voiceDuration ?? 0, - voice: true, - }), + { _: "documentAttributeAudio", duration: result_.voiceDuration ?? 0, voice: true }, ], - }); + }; } else { fileId_ = result_.fileId; } @@ -616,12 +590,7 @@ export async function inlineQueryResultToTlObject(result_: InlineQueryResult, pa const replyMarkup = "replyMarkup" in result_ && result_.replyMarkup ? await replyMarkupToTlObject(result_.replyMarkup, usernameResolver) : undefined; if ("thumbnailUrl" in result_ && result_.thumbnailUrl) { - thumb = new types.InputWebDocument({ - url: result_.thumbnailUrl, - size: 0, - mime_type: "image/jpeg", - attributes: [], - }); + thumb = { _: "inputWebDocument", url: result_.thumbnailUrl, size: 0, mime_type: "image/jpeg", attributes: [] }; } else if (result_.type == "photo") { thumb = document; } @@ -633,73 +602,33 @@ export async function inlineQueryResultToTlObject(result_: InlineQueryResult, pa const { type, id } = result_; const [message, entities] = ret; - const sendMessage = new types.InputBotInlineMessageMediaAuto({ - message, - entities, - reply_markup: replyMarkup, - }); + const sendMessage: Api.inputBotInlineMessageMediaAuto = { _: "inputBotInlineMessageMediaAuto", message, entities, reply_markup: replyMarkup }; const title = "title" in result_ ? result_.title : undefined; const description = "description" in result_ ? result_.description : undefined; if (document != null) { - return new types.InputBotInlineResult({ - id, - type, - title, - description, - thumb: thumb == null ? undefined : thumb, - content: document, - send_message: new types.InputBotInlineMessageMediaAuto({ - message, - entities, - reply_markup: replyMarkup, - }), - }); + return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb == null ? undefined : thumb, content: document, send_message: ({ _: "inputBotInlineMessageMediaAuto", message, entities, reply_markup: replyMarkup }) }; } else if (fileId_ != null) { const fileId = deserializeFileId(fileId_); - return new types.InputBotInlineResultDocument({ + return { + _: "inputBotInlineResultDocument", id, type: type == "document" ? "file" : type, title, description, - document: new types.InputDocument({ + document: ({ + _: "inputDocument", id: "id" in fileId.location ? fileId.location.id : unreachable(), // TODO: Remove UNREACHABLE()? access_hash: fileId.location.accessHash, file_reference: fileId.fileReference ?? new Uint8Array(), }), send_message: sendMessage, - }); + }; } else if (result_.type == "location") { - return new types.InputBotInlineResult({ - id, - type, - title, - description, - thumb: thumb == null ? undefined : thumb, - send_message: new types.InputBotInlineMessageMediaGeo({ - geo_point: new types.InputGeoPoint({ - lat: result_.latitude, - long: result_.longitude, - accuracy_radius: result_.horizontalAccuracy, - }), - heading: result_.heading, - period: result_.livePeriod, - proximity_notification_radius: result_.proximityAlertRadius, - reply_markup: replyMarkup, - }), - }); + return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb == null ? undefined : thumb, send_message: ({ _: "inputBotInlineMessageMediaGeo", geo_point: ({ _: "inputGeoPoint", lat: result_.latitude, long: result_.longitude, accuracy_radius: result_.horizontalAccuracy }), heading: result_.heading, period: result_.livePeriod, proximity_notification_radius: result_.proximityAlertRadius, reply_markup: replyMarkup }) }; } else if (result_.type == "game") { - return new types.InputBotInlineResult({ - id, - type, - title, - description, - thumb: thumb == null ? undefined : thumb, - send_message: new types.InputBotInlineMessageGame({ - reply_markup: replyMarkup, - }), - }); + return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb == null ? undefined : thumb, send_message: ({ _: "inputBotInlineMessageGame", reply_markup: replyMarkup }) }; } else if (result_.type == "article") { if (!("text" in result_.messageContent)) { unreachable(); @@ -708,57 +637,20 @@ export async function inlineQueryResultToTlObject(result_: InlineQueryResult, pa const noWebpage = result_.messageContent?.linkPreview?.disable ? true : undefined; const invertMedia = result_.messageContent?.linkPreview?.aboveText ? true : undefined; - let sendMessage: enums.InputBotInlineMessage; + let sendMessage: Api.InputBotInlineMessage; if (result_.messageContent.linkPreview?.url) { - sendMessage = new types.InputBotInlineMessageMediaWebPage({ - url: result_.messageContent.linkPreview.url, - force_large_media: result_.messageContent.linkPreview.largeMedia ? true : undefined, - force_small_media: result_.messageContent.linkPreview.smallMedia ? true : undefined, - optional: message.length ? undefined : true, - message, - entities, - invert_media: invertMedia, - reply_markup: replyMarkup, - }); + sendMessage = { _: "inputBotInlineMessageMediaWebPage", url: result_.messageContent.linkPreview.url, force_large_media: result_.messageContent.linkPreview.largeMedia ? true : undefined, force_small_media: result_.messageContent.linkPreview.smallMedia ? true : undefined, optional: message.length ? undefined : true, message, entities, invert_media: invertMedia, reply_markup: replyMarkup }; } else { - sendMessage = new types.InputBotInlineMessageText({ - message, - entities, - no_webpage: noWebpage, - invert_media: invertMedia, - reply_markup: replyMarkup, - }); + sendMessage = { _: "inputBotInlineMessageText", message, entities, no_webpage: noWebpage, invert_media: invertMedia, reply_markup: replyMarkup }; } - return new types.InputBotInlineResult({ - id, - type, - title, - description, - thumb: thumb == null ? undefined : thumb, - send_message: sendMessage, - }); + return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb == null ? undefined : thumb, send_message: sendMessage }; } else if (result_.type == "venue") { if (!result_.foursquareId || !result_.foursquareType) { unreachable(); } - return new types.InputBotInlineResult({ - id, - type, - title, - description, - thumb: thumb == null ? undefined : thumb, - send_message: new types.InputBotInlineMessageMediaVenue({ - geo_point: new types.InputGeoPoint({ long: result_.longitude, lat: result_.latitude }), - address: result_.address, - provider: "foursquare", - title: result_.title, - venue_id: result_.foursquareId, - venue_type: result_.foursquareType, - reply_markup: replyMarkup, - }), - }); + return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb == null ? undefined : thumb, send_message: ({ _: "inputBotInlineMessageMediaVenue", geo_point: ({ _: "inputGeoPoint", long: result_.longitude, lat: result_.latitude }), address: result_.address, provider: "foursquare", title: result_.title, venue_id: result_.foursquareId, venue_type: result_.foursquareType, reply_markup: replyMarkup }) }; } else { unreachable(); } diff --git a/types/4_message.ts b/types/4_message.ts index 5ebb10b2..a367846b 100644 --- a/types/4_message.ts +++ b/types/4_message.ts @@ -20,7 +20,7 @@ import { unreachable } from "../0_deps.ts"; import { cleanObject, fromUnixTimestamp, getLogger, MaybePromise, ZERO_CHANNEL_ID } from "../1_utilities.ts"; -import { as, enums, types } from "../2_tl.ts"; +import { Api, as, is } from "../2_tl.ts"; import { FileId, FileType, toUniqueFileId } from "./_file_id.ts"; import { serializeFileId } from "./_file_id.ts"; import { EntityGetter } from "./_getters.ts"; @@ -702,22 +702,22 @@ export interface MessageGetter { type Message_MessageGetter = MessageGetter | null; -async function getSender(message_: types.Message | types.MessageService, getEntity: EntityGetter) { - if (message_.from_id instanceof types.PeerUser) { +async function getSender(message_: Api.message | Api.messageService, getEntity: EntityGetter) { + if (is("peerUser", message_.from_id)) { const entity = await getEntity(message_.from_id); if (entity) { return { from: constructUser(entity) }; } else { unreachable(); } - } else if (message_.from_id instanceof types.PeerChannel) { + } else if (is("peerChannel", message_.from_id)) { const entity = await getEntity(message_.from_id); if (entity) { return { senderChat: constructChatP(entity) }; } else { unreachable(); } - } else if (message_.peer_id instanceof types.PeerUser) { + } else if (is("peerUser", message_.peer_id)) { const entity = await getEntity(message_.peer_id); if (entity) { return { from: constructUser(entity) }; @@ -727,8 +727,8 @@ async function getSender(message_: types.Message | types.MessageService, getEnti } } -async function getReply(message_: types.Message | types.MessageService, chat: ChatP, getMessage: Message_MessageGetter) { - if (getMessage && message_.reply_to instanceof types.MessageReplyHeader && message_.reply_to.reply_to_msg_id) { +async function getReply(message_: Api.message | Api.messageService, chat: ChatP, getMessage: Message_MessageGetter) { + if (getMessage && is("messageReplyHeader", message_.reply_to) && message_.reply_to.reply_to_msg_id) { let isTopicMessage = false; if (message_.reply_to.forum_topic) { isTopicMessage = true; @@ -744,7 +744,7 @@ async function getReply(message_: types.Message | types.MessageService, chat: Ch return { replyToMessage: undefined, threadId: undefined, isTopicMessage: false }; } -async function constructServiceMessage(message_: types.MessageService, chat: ChatP, getEntity: EntityGetter, getMessage: Message_MessageGetter): Promise { +async function constructServiceMessage(message_: Api.messageService, chat: ChatP, getEntity: EntityGetter, getMessage: Message_MessageGetter): Promise { const message: _MessageBase = { out: message_.out ?? false, id: message_.id, @@ -755,11 +755,11 @@ async function constructServiceMessage(message_: types.MessageService, chat: Cha Object.assign(message, await getSender(message_, getEntity)); - if (message_.action instanceof types.MessageActionChatAddUser || message_.action instanceof types.MessageActionChatJoinedByLink || message_.action instanceof types.MessageActionChatJoinedByRequest) { + if (is("messageActionChatAddUser", message_.action) || is("messageActionChatJoinedByLink", message_.action) || is("messageActionChatJoinedByRequest", message_.action)) { const newChatMembers = new Array(); const users = "users" in message_.action ? message_.action.users : [message_.from_id && "user_id" in message_.from_id ? message_.from_id.user_id : unreachable()]; for (const user_ of users) { - const entity = await getEntity(new types.PeerUser({ user_id: user_ })); + const entity = await getEntity({ _: "peerUser", user_id: user_ }); if (entity) { const user = constructUser(entity); newChatMembers.push(user); @@ -768,34 +768,34 @@ async function constructServiceMessage(message_: types.MessageService, chat: Cha } } return { ...message, newChatMembers }; - } else if (message_.action instanceof types.MessageActionChatDeleteUser) { - const entity = await getEntity(new types.PeerUser({ user_id: message_.action.user_id })); + } else if (is("messageActionChatDeleteUser", message_.action)) { + const entity = await getEntity({ _: "peerUser", user_id: message_.action.user_id }); if (entity) { const user = constructUser(entity); const leftChatMember = user; return { ...message, leftChatMember }; } - } else if (message_.action instanceof types.MessageActionChatEditTitle) { + } else if (is("messageActionChatEditTitle", message_.action)) { const newChatTitle = message_.action.title; return { ...message, newChatTitle }; - } else if (message_.action instanceof types.MessageActionChatEditPhoto) { - const newChatPhoto = constructPhoto(message_.action.photo[as](types.Photo)); + } else if (is("messageActionChatEditPhoto", message_.action)) { + const newChatPhoto = constructPhoto(as("photo", message_.action.photo)); return { ...message, newChatPhoto }; - } else if (message_.action instanceof types.MessageActionChatDeletePhoto) { + } else if (is("messageActionChatDeletePhoto", message_.action)) { const deletedChatPhoto = true; return { ...message, deletedChatPhoto }; - } else if (message_.action instanceof types.MessageActionChatCreate) { + } else if (is("messageActionChatCreate", message_.action)) { const groupCreated = true; const newChatMembers = new Array(); for (const user_ of message_.action.users) { - const entity = await getEntity(new types.PeerUser({ user_id: user_ })); + const entity = await getEntity({ _: "peerUser", user_id: user_ }); if (entity) { const user = constructUser(entity); newChatMembers.push(user); } } return { ...message, groupCreated, newChatMembers }; - } else if (message_.action instanceof types.MessageActionChannelCreate) { + } else if (is("messageActionChannelCreate", message_.action)) { if (message.chat.type == "channel") { const channelCreated = true; return { ...message, channelCreated }; @@ -805,34 +805,34 @@ async function constructServiceMessage(message_: types.MessageService, chat: Cha } else { // unreachable(); } - } else if (message_.action instanceof types.MessageActionChatMigrateTo) { + } else if (is("messageActionChatMigrateTo", message_.action)) { const chatMigratedTo = ZERO_CHANNEL_ID + Number(-message_.action.channel_id); return { ...message, chatMigratedTo }; - } else if (message_.action instanceof types.MessageActionChannelMigrateFrom) { + } else if (is("messageActionChannelMigrateFrom", message_.action)) { const chatMigratedFrom = Number(-message_.action.chat_id); return { ...message, chatMigratedFrom }; - } else if (message_.action instanceof types.MessageActionPinMessage) { + } else if (is("messageActionPinMessage", message_.action)) { const { replyToMessage } = await getReply(message_, chat, getMessage); if (replyToMessage) { const pinnedMessage = replyToMessage; return { ...message, pinnedMessage }; } - } else if (message_.action instanceof types.MessageActionRequestedPeer) { - const user = message_.action.peers[0][as](types.PeerUser); + } else if (is("messageActionRequestedPeer", message_.action)) { + const user = as("peerUser", message_.action.peers[0]); const userShared = { requestId: message_.action.button_id, userId: Number(user.user_id) }; return { ...message, userShared }; - } else if (message_.action instanceof types.MessageActionBotAllowed) { - const miniAppName = message_.action.app ? message_.action.app[as](types.BotApp).title : undefined; + } else if (is("messageActionBotAllowed", message_.action)) { + const miniAppName = message_.action.app ? as("botApp", message_.action.app).title : undefined; const writeAccessAllowed = { miniAppName }; return { ...message, writeAccessAllowed }; - } else if (message_.action instanceof types.MessageActionTopicCreate) { + } else if (is("messageActionTopicCreate", message_.action)) { const forumTopicCreated = { name: message_.action.title, iconColor: "#" + message_.action.icon_color.toString(16).padStart(6, "0"), iconCutsomEmojiId: message_.action.icon_emoji_id ? String(message_.action.icon_emoji_id) : undefined, }; return { ...message, forumTopicCreated }; - } else if (message_.action instanceof types.MessageActionTopicEdit) { + } else if (is("messageActionTopicEdit", message_.action)) { if (message_.action.closed) { const forumTopicClosed = true; return { ...message, forumTopicClosed }; @@ -846,10 +846,10 @@ async function constructServiceMessage(message_: types.MessageService, chat: Cha const forumTopicReopened = true; return { ...message, forumTopicReopened }; } - } else if (message_.action instanceof types.MessageActionGroupCallScheduled) { + } else if (is("messageActionGroupCallScheduled", message_.action)) { const videoChatScheduled = { startDate: new Date(message_.action.schedule_date * 1000) }; return { ...message, videoChatScheduled }; - } else if (message_.action instanceof types.MessageActionGroupCall) { + } else if (is("messageActionGroupCall", message_.action)) { if (message_.action.duration) { const videoChatEnded = { duration: message_.action.duration }; @@ -858,7 +858,7 @@ async function constructServiceMessage(message_: types.MessageService, chat: Cha const videoChatStarted = true; return { ...message, videoChatStarted }; } - } else if (message_.action instanceof types.MessageActionSetMessagesTTL) { + } else if (is("messageActionSetMessagesTTL", message_.action)) { const newAutoDeleteTime = message_.action.period || 0; return { ...message, newAutoDeleteTime }; } @@ -866,34 +866,34 @@ async function constructServiceMessage(message_: types.MessageService, chat: Cha } export async function constructMessage( - message_: enums.Message, + message_: Api.Message, getEntity: EntityGetter, getMessage: Message_MessageGetter, getStickerSetName: StickerSetNameGetter, getReply_ = true, - business?: { connectionId: string; replyToMessage?: enums.Message }, + business?: { connectionId: string; replyToMessage?: Api.Message }, ): Promise { - if (!(message_ instanceof types.Message) && !(message_ instanceof types.MessageService)) { + if (!(is("message", message_)) && !(is("messageService", message_))) { unreachable(); } let link: string | undefined; let chat_: ChatP | null = null; - if (message_.peer_id instanceof types.PeerUser) { + if (is("peerUser", message_.peer_id)) { const entity = await getEntity(message_.peer_id); if (entity) { chat_ = constructChatP(entity); } else { unreachable(); } - } else if (message_.peer_id instanceof types.PeerChat) { + } else if (is("peerChat", message_.peer_id)) { const entity = await getEntity(message_.peer_id); if (entity) { chat_ = constructChatP(entity); } else { unreachable(); } - } else if (message_.peer_id instanceof types.PeerChannel) { + } else if (is("peerChannel", message_.peer_id)) { link = `https://t.me/c/${message_.peer_id.channel_id}/${message_.id}`; const entity = await getEntity(message_.peer_id); if (entity) { @@ -905,7 +905,7 @@ export async function constructMessage( unreachable(); } - if (message_ instanceof types.MessageService) { + if (is("messageService", message_)) { return await constructServiceMessage(message_, chat_, getEntity, getMessage); } @@ -917,7 +917,7 @@ export async function constructMessage( date: fromUnixTimestamp(message_.date), views: message_.views, forwards: message_.forwards, - isTopicMessage: message_.reply_to && message_.reply_to instanceof types.MessageReplyHeader && message_.reply_to.reply_to_top_id ? true : false, + isTopicMessage: message_.reply_to && is("messageReplyHeader", message_.reply_to) && message_.reply_to.reply_to_top_id ? true : false, hasProtectedContent: message_.noforwards || false, senderBoostCount: message_.from_boosts_applied, }; @@ -927,7 +927,7 @@ export async function constructMessage( message.reactions = message_.reactions.results.map((v) => constructMessageReaction(v, recentReactions)); } - if (message_.reply_to instanceof types.MessageReplyHeader && message_.reply_to.reply_to_msg_id) { + if (is("messageReplyHeader", message_.reply_to) && message_.reply_to.reply_to_msg_id) { if (message_.reply_to.quote) { message.replyQuote = constructReplyQuote(message_.reply_to.quote_text, message_.reply_to.quote_offset, message_.reply_to.quote_entities); } @@ -949,7 +949,7 @@ export async function constructMessage( } if (message_.via_bot_id != undefined) { - const viaBot = await getEntity(new types.PeerUser({ user_id: message_.via_bot_id })); + const viaBot = await getEntity({ _: "peerUser", user_id: message_.via_bot_id }); if (viaBot) { message.viaBot = constructUser(viaBot); } else { @@ -957,7 +957,7 @@ export async function constructMessage( } } if (message_.via_business_bot_id != undefined) { - const viaBusinessBot = await getEntity(new types.PeerUser({ user_id: message_.via_business_bot_id })); + const viaBusinessBot = await getEntity({ _: "peerUser", user_id: message_.via_business_bot_id }); if (viaBusinessBot) { message.viaBusinessBot = constructUser(viaBusinessBot); } else { @@ -969,23 +969,23 @@ export async function constructMessage( message.authorSignature = message_.post_author; } - if (message_.fwd_from instanceof types.MessageFwdHeader) { + if (is("messageFwdHeader", message_.fwd_from)) { message.isAutomaticForward = message_.fwd_from.saved_from_peer != undefined && message_.fwd_from.saved_from_msg_id != undefined; message.forwardSenderName = message_.fwd_from.from_name; message.forwardId = message_.fwd_from.channel_post; message.forwardSignature = message_.fwd_from.post_author; message.forwardDate = fromUnixTimestamp(message_.fwd_from.date); - if (message_.fwd_from.from_id instanceof types.PeerUser) { + if (is("peerUser", message_.fwd_from.from_id)) { const entity = await getEntity(message_.fwd_from.from_id); if (entity) { message.forwardFrom = constructUser(entity); } - } else if (message_.fwd_from.from_id instanceof types.PeerChat) { + } else if (is("peerChat", message_.fwd_from.from_id)) { const entity = await getEntity(message_.fwd_from.from_id); if (entity) { message.forwardFromChat = constructChatP(entity); } - } else if (message_.fwd_from.from_id instanceof types.PeerChannel) { + } else if (is("peerChannel", message_.fwd_from.from_id)) { const entity = await getEntity(message_.fwd_from.from_id); if (entity) { message.forwardFromChat = constructChatP(entity); @@ -1017,24 +1017,24 @@ export async function constructMessage( captionEntities: message_.entities?.map(constructMessageEntity).filter((v): v is NonNullable => !!v) ?? [], }; - if (message_.media instanceof types.MessageMediaPhoto || message_.media instanceof types.MessageMediaDocument) { + if (is("messageMediaPhoto", message_.media) || is("messageMediaDocument", message_.media)) { messageMedia.hasMediaSpoiler = message_.media.spoiler || false; } let m: Message | null = null; - if (message_.media instanceof types.MessageMediaPhoto) { + if (is("messageMediaPhoto", message_.media)) { if (!message_.media.photo) { unreachable(); } - const photo = constructPhoto(message_.media.photo[as](types.Photo)); + const photo = constructPhoto(as("photo", message_.media.photo)); m = { ...messageMedia, photo }; - } else if (message_.media instanceof types.MessageMediaDice) { + } else if (is("messageMediaDice", message_.media)) { const dice = constructDice(message_.media); m = { ...message, dice }; - } else if (message_.media instanceof types.MessageMediaDocument) { + } else if (is("messageMediaDocument", message_.media)) { const { document } = message_.media; - if (document instanceof types.Document) { + if (is("document", document)) { const getFileId = (type: FileType): FileId => ( { type, @@ -1044,11 +1044,11 @@ export async function constructMessage( } ); - const animated = document.attributes.find((v): v is types.DocumentAttributeAnimated => v instanceof types.DocumentAttributeAnimated); - const audio = document.attributes.find((v): v is types.DocumentAttributeAudio => v instanceof types.DocumentAttributeAudio); - const fileName = document.attributes.find((v): v is types.DocumentAttributeFilename => v instanceof types.DocumentAttributeFilename); - const sticker = document.attributes.find((v): v is types.DocumentAttributeSticker => v instanceof types.DocumentAttributeSticker); - const video = document.attributes.find((v): v is types.DocumentAttributeVideo => v instanceof types.DocumentAttributeVideo); + const animated = document.attributes.find((v): v is Api.documentAttributeAnimated => is("documentAttributeAnimated", v)); + const audio = document.attributes.find((v): v is Api.documentAttributeAudio => is("documentAttributeAudio", v)); + const fileName = document.attributes.find((v): v is Api.documentAttributeFilename => is("documentAttributeFilename", v)); + const sticker = document.attributes.find((v): v is Api.documentAttributeSticker => is("documentAttributeSticker", v)); + const video = document.attributes.find((v): v is Api.documentAttributeVideo => is("documentAttributeVideo", v)); if (animated) { const fileId = getFileId(FileType.Animation); @@ -1080,33 +1080,33 @@ export async function constructMessage( m = { ...message, sticker }; } else { const fileId = getFileId(FileType.Document); - const document_ = constructDocument(document, fileName ?? new types.DocumentAttributeFilename({ file_name: "Unknown" }), serializeFileId(fileId), toUniqueFileId(fileId)); + const document_ = constructDocument(document, fileName ?? ({ _: "documentAttributeFilename", file_name: "Unknown" }), serializeFileId(fileId), toUniqueFileId(fileId)); m = { ...messageMedia, document: document_ }; } } - } else if (message_.media instanceof types.MessageMediaContact) { + } else if (is("messageMediaContact", message_.media)) { const contact = constructContact(message_.media); m = { ...messageMedia, contact }; - } else if (message_.media instanceof types.MessageMediaGame) { + } else if (is("messageMediaGame", message_.media)) { const game = constructGame(message_.media); m = { ...message, game }; - } else if (message_.media instanceof types.MessageMediaPoll) { + } else if (is("messageMediaPoll", message_.media)) { const poll = constructPoll(message_.media); m = { ...message, poll }; - } else if (message_.media instanceof types.MessageMediaVenue) { + } else if (is("messageMediaVenue", message_.media)) { const venue = constructVenue(message_.media); m = { ...message, venue }; - } else if (message_.media instanceof types.MessageMediaGeo || message_.media instanceof types.MessageMediaGeoLive) { + } else if (is("messageMediaGeo", message_.media) || is("messageMediaGeoLive", message_.media)) { const location = constructLocation(message_.media); m = { ...message, location }; - } else if (message_.media instanceof types.MessageMediaWebPage) { + } else if (is("messageMediaWebPage", message_.media)) { const linkPreview = constructLinkPreview(message_.media, message_.invert_media); if (message_.message) { m = { ...messageText, linkPreview }; } else { m = { ...message, linkPreview: { ...linkPreview, url: linkPreview.url ? linkPreview.url : unreachable() } }; } - } else if (message_.media instanceof types.MessageMediaGiveaway) { + } else if (is("messageMediaGiveaway", message_.media)) { const giveaway = constructGiveaway(message_.media); m = { ...message, giveaway }; } diff --git a/types/5_callback_query.ts b/types/5_callback_query.ts index 0a8e7a58..b791236d 100644 --- a/types/5_callback_query.ts +++ b/types/5_callback_query.ts @@ -21,7 +21,7 @@ import { unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { base64DecodeUrlSafe, base64EncodeUrlSafe, cleanObject } from "../1_utilities.ts"; -import { enums, peerToChatId, serialize, TLReader, types } from "../2_tl.ts"; +import { Api, is, peerToChatId, serialize, TLReader } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { constructUser, User } from "./1_user.ts"; import { Message, MessageGetter } from "./4_message.ts"; @@ -45,12 +45,12 @@ export interface CallbackQuery { } const ERR_INVALID_INLINE_MESSAGE_ID = new InputError("Invalid inline message ID"); -export function deserializeInlineMessageId(inlineMessageId: string): enums.InputBotInlineMessageID { +export function deserializeInlineMessageId(inlineMessageId: string): Api.InputBotInlineMessageID { try { const buffer = base64DecodeUrlSafe(inlineMessageId); const reader = new TLReader(buffer); const object = reader.readObject(); - if (object instanceof types.InputBotInlineMessageID || object instanceof types.InputBotInlineMessageID64) { + if (is("inputBotInlineMessageID64", object) || is("inputBotInlineMessageID", object)) { return object; } } catch { @@ -60,8 +60,8 @@ export function deserializeInlineMessageId(inlineMessageId: string): enums.Input throw ERR_INVALID_INLINE_MESSAGE_ID; } -export async function constructCallbackQuery(callbackQuery: types.UpdateBotCallbackQuery | types.UpdateInlineBotCallbackQuery, getEntity: EntityGetter, getMessage: MessageGetter): Promise { - const user_ = await getEntity(new types.PeerUser({ user_id: callbackQuery.user_id })); +export async function constructCallbackQuery(callbackQuery: Api.updateBotCallbackQuery | Api.updateInlineBotCallbackQuery, getEntity: EntityGetter, getMessage: MessageGetter): Promise { + const user_ = await getEntity({ _: "peerUser", user_id: callbackQuery.user_id }); if (!user_) { unreachable(); } @@ -70,13 +70,13 @@ export async function constructCallbackQuery(callbackQuery: types.UpdateBotCallb const gameShortName = callbackQuery.game_short_name; const data = callbackQuery.data !== undefined ? new TextDecoder().decode(callbackQuery.data) : undefined; const chatInstance = callbackQuery.chat_instance == 0n ? "" : String(callbackQuery.chat_instance); - if (callbackQuery instanceof types.UpdateBotCallbackQuery) { + if (is("updateBotCallbackQuery", callbackQuery)) { const message = await getMessage(peerToChatId(callbackQuery.peer), Number(callbackQuery.msg_id)); if (message == null) { unreachable(); } return cleanObject({ id, from: user, message, chatInstance, data, gameShortName }); } else { - return cleanObject({ id, from: user, inlineMessageId: base64EncodeUrlSafe(callbackQuery.msg_id[serialize]()), chatInstance, data, gameShortName }); + return cleanObject({ id, from: user, inlineMessageId: base64EncodeUrlSafe(serialize(callbackQuery.msg_id)), chatInstance, data, gameShortName }); } } diff --git a/types/5_chat_list_item.ts b/types/5_chat_list_item.ts index 69b8711c..99cecd75 100644 --- a/types/5_chat_list_item.ts +++ b/types/5_chat_list_item.ts @@ -19,7 +19,7 @@ */ import { unreachable } from "../0_deps.ts"; -import { chatIdToPeer, enums, peerToChatId, types } from "../2_tl.ts"; +import { Api, chatIdToPeer, is, peerToChatId } from "../2_tl.ts"; import { EntityGetter } from "./_getters.ts"; import { ChatP, constructChatP } from "./1_chat_p.ts"; import { StickerSetNameGetter } from "./1_sticker.ts"; @@ -57,7 +57,7 @@ export async function constructChatListItem(chatId: number, pinned: number, last }; } -export function constructChatListItem2(entity: types.User | types.Chat | types.ChatForbidden | types.Channel | types.ChannelForbidden, pinned: number, lastMessage: Omit | undefined): ChatListItem { +export function constructChatListItem2(entity: Api.user | Api.chat | Api.chatForbidden | Api.channel | Api.channelForbidden, pinned: number, lastMessage: Omit | undefined): ChatListItem { return { chat: constructChatP(entity), order: getChatListItemOrder(lastMessage, pinned), @@ -79,7 +79,7 @@ export async function constructChatListItem3(chatId: number, pinned: number, las }; } -export async function constructChatListItem4(dialog: enums.Dialog, dialogs: types.messages.Dialogs | types.messages.DialogsSlice, pinnedChats: number[], getEntity: EntityGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise { +export async function constructChatListItem4(dialog: Api.Dialog, dialogs: Api.messages_dialogs | Api.messages_dialogsSlice, pinnedChats: number[], getEntity: EntityGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise { const topMessage_ = dialogs.messages.find((v) => "id" in v && v.id == dialog.top_message); if (!topMessage_) { unreachable(); @@ -90,12 +90,12 @@ export async function constructChatListItem4(dialog: enums.Dialog, dialogs: type const userId = "user_id" in dialog.peer ? dialog.peer.user_id : null; const chatId = "chat_id" in dialog.peer ? dialog.peer.chat_id : null; const channelId = "channel_id" in dialog.peer ? dialog.peer.channel_id : null; - const chat__ = chatId != null ? dialogs.chats.find((v) => v instanceof types.Chat && v.id == chatId) : channelId != null ? dialogs.chats.find((v) => v instanceof types.Channel && v.id == channelId) : userId != null ? dialogs.users.find((v) => v instanceof types.User && v.id == userId) : unreachable(); + const chat__ = chatId != null ? dialogs.chats.find((v) => is("chat", v) && v.id == chatId) : channelId != null ? dialogs.chats.find((v) => is("channel", v) && v.id == channelId) : userId != null ? dialogs.users.find((v) => is("user", v) && v.id == userId) : unreachable(); if (!chat__) { unreachable(); } return { - chat: constructChatP(chat__ as types.User | types.Channel | types.Chat), + chat: constructChatP(chat__ as Api.user | Api.channel | Api.chat), order, lastMessage, pinned, diff --git a/types/5_inline_query_answer.ts b/types/5_inline_query_answer.ts index 1b86cb51..7680ca43 100644 --- a/types/5_inline_query_answer.ts +++ b/types/5_inline_query_answer.ts @@ -19,7 +19,7 @@ */ import { cleanObject } from "../1_utilities.ts"; -import { types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { constructInlineQueryResult, InlineQueryResult } from "./4_inline_query_result.ts"; /** An answer to an inline query. */ @@ -32,7 +32,7 @@ export interface InlineQueryAnswer { nextOffset?: string; } -export function constructInlineQueryAnswer(results: types.messages.BotResults): InlineQueryAnswer { +export function constructInlineQueryAnswer(results: Api.messages_BotResults): InlineQueryAnswer { return cleanObject({ id: results.query_id + "", results: results.results.map(constructInlineQueryResult), diff --git a/types/_file_id.ts b/types/_file_id.ts index 182fda64..3394c862 100644 --- a/types/_file_id.ts +++ b/types/_file_id.ts @@ -21,7 +21,7 @@ import { unreachable } from "../0_deps.ts"; import { InputError } from "../0_errors.ts"; import { base64DecodeUrlSafe, base64EncodeUrlSafe, rleDecode, rleEncode } from "../1_utilities.ts"; -import { TLReader, TLWriter, types } from "../2_tl.ts"; +import { Api, is, TLReader, TLWriter } from "../2_tl.ts"; const NEXT_VERSION = 53; const PERSISTENT_ID_VERSION = 4; @@ -359,16 +359,16 @@ export function toUniqueFileId(fileId: FileId): string { return base64EncodeUrlSafe(rleEncode(writer.buffer)); } -export function getPhotoFileId(photo: types.Photo): { fileId: string; fileUniqueId: string } { +export function getPhotoFileId(photo: Api.photo): { fileId: string; fileUniqueId: string } { const sizes = photo.sizes .map((v) => { - if (v instanceof types.PhotoSizeProgressive) { - return new types.PhotoSize({ type: v.type, w: v.w, h: v.h, size: Math.max(...v.sizes) }); + if (is("photoSizeProgressive", v)) { + return { _: "photoSize", type: v.type, w: v.w, h: v.h, size: Math.max(...v.sizes) }; } else { return v; } }) - .filter((v): v is types.PhotoSize => v instanceof types.PhotoSize) + .filter((v): v is Api.photoSize => is("photoSize", v)) .sort((a, b) => a.size - b.size); const largest = sizes.slice(-1)[0]; const { dc_id: dcId, id, access_hash: accessHash, file_reference: fileReference } = photo; diff --git a/types/_getters.ts b/types/_getters.ts index d9080e20..db5605a2 100644 --- a/types/_getters.ts +++ b/types/_getters.ts @@ -19,23 +19,23 @@ */ import { MaybePromise } from "../1_utilities.ts"; -import { enums, types } from "../2_tl.ts"; +import { Api } from "../2_tl.ts"; import { ID } from "./0_id.ts"; /** @unlisted */ export interface EntityGetter { - (peer: types.PeerUser): MaybePromise; - (peer: types.PeerChat): MaybePromise; - (peer: types.PeerChannel): MaybePromise; - (peer: types.PeerUser | types.PeerChat | types.PeerChannel): MaybePromise; + (peer: Api.peerUser): MaybePromise; + (peer: Api.peerChat): MaybePromise; + (peer: Api.peerChannel): MaybePromise; + (peer: Api.peerUser | Api.peerChat | Api.peerChannel): MaybePromise; } /** @unlisted */ export interface InputPeerGetter { - (id: ID): Promise; + (id: ID): Promise; } /** @unlisted */ export interface UsernameResolver { - (username: string): MaybePromise; + (username: string): MaybePromise; }