import _Long from 'long'; export declare namespace tl { const LAYER = 223; function $extendTypes(types: Record): void type Long = _Long; type RawLong = Uint8Array; type Int128 = Uint8Array; type Int256 = Uint8Array; type Double = number; type FindByName = Extract type Mutable = { -readonly [P in keyof T]: T[P] } type MtErrorText = | 'FLOOD_WAIT_%d' | 'FILE_MIGRATE_%d' | 'NETWORK_MIGRATE_%d' | 'PHONE_MIGRATE_%d' | 'STATS_MIGRATE_%d' | 'ABOUT_TOO_LONG' | 'ACCESS_TOKEN_EXPIRED' | 'ACCESS_TOKEN_INVALID' | 'ADMIN_ID_INVALID' | 'ADMIN_RANK_EMOJI_NOT_ALLOWED' | 'ADMIN_RANK_INVALID' | 'ADMINS_TOO_MUCH' | 'ALBUM_PHOTOS_TOO_MANY' | 'API_ID_INVALID' | 'API_ID_PUBLISHED_FLOOD' | 'ARTICLE_TITLE_EMPTY' | 'AUDIO_CONTENT_URL_EMPTY' | 'AUDIO_TITLE_EMPTY' | 'AUTH_BYTES_INVALID' | 'AUTH_TOKEN_ALREADY_ACCEPTED' | 'AUTH_TOKEN_EXCEPTION' | 'AUTH_TOKEN_EXPIRED' | 'AUTH_TOKEN_INVALID' | 'AUTH_TOKEN_INVALIDX' | 'AUTOARCHIVE_NOT_AVAILABLE' | 'BANK_CARD_NUMBER_INVALID' | 'BANNED_RIGHTS_INVALID' | 'BOT_APP_INVALID' | 'BOT_CHANNELS_NA' | 'BOT_COMMAND_DESCRIPTION_INVALID' | 'BOT_COMMAND_INVALID' | 'BOT_DOMAIN_INVALID' | 'BOT_GROUPS_BLOCKED' | 'BOT_INLINE_DISABLED' | 'BOT_INVALID' | 'BOT_MISSING' | 'BOT_ONESIDE_NOT_AVAIL' | 'BOT_PAYMENTS_DISABLED' | 'BOT_RESPONSE_TIMEOUT' | 'BOT_SCORE_NOT_MODIFIED' | 'BOTS_TOO_MUCH' | 'BROADCAST_ID_INVALID' | 'BROADCAST_PUBLIC_VOTERS_FORBIDDEN' | 'BROADCAST_REQUIRED' | 'BUTTON_DATA_INVALID' | 'BUTTON_TEXT_INVALID' | 'BUTTON_TYPE_INVALID' | 'BUTTON_URL_INVALID' | 'BUTTON_USER_PRIVACY_RESTRICTED' | 'CALL_ALREADY_ACCEPTED' | 'CALL_ALREADY_DECLINED' | 'CALL_OCCUPY_FAILED' | 'CALL_PEER_INVALID' | 'CALL_PROTOCOL_FLAGS_INVALID' | 'CDN_METHOD_INVALID' | 'CHANNEL_FORUM_MISSING' | 'CHANNEL_ID_INVALID' | 'CHANNEL_INVALID' | 'CHANNEL_PARICIPANT_MISSING' | 'CHANNEL_PRIVATE' | 'CHANNEL_TOO_BIG' | 'CHANNEL_TOO_LARGE' | 'CHANNELS_ADMIN_LOCATED_TOO_MUCH' | 'CHANNELS_ADMIN_PUBLIC_TOO_MUCH' | 'CHANNELS_TOO_MUCH' | 'CHAT_ABOUT_NOT_MODIFIED' | 'CHAT_ABOUT_TOO_LONG' | 'CHAT_ADMIN_REQUIRED' | 'CHAT_DISCUSSION_UNALLOWED' | 'CHAT_FORWARDS_RESTRICTED' | 'CHAT_ID_EMPTY' | 'CHAT_ID_INVALID' | 'CHAT_INVALID' | 'CHAT_INVITE_PERMANENT' | 'CHAT_LINK_EXISTS' | 'CHAT_NOT_MODIFIED' | 'CHAT_PUBLIC_REQUIRED' | 'CHAT_RESTRICTED' | 'CHAT_REVOKE_DATE_UNSUPPORTED' | 'CHAT_SEND_INLINE_FORBIDDEN' | 'CHAT_TITLE_EMPTY' | 'CHAT_TOO_BIG' | 'CODE_EMPTY' | 'CODE_HASH_INVALID' | 'CODE_INVALID' | 'CONNECTION_API_ID_INVALID' | 'CONNECTION_APP_VERSION_EMPTY' | 'CONNECTION_LAYER_INVALID' | 'CONTACT_ADD_MISSING' | 'CONTACT_ID_INVALID' | 'CONTACT_NAME_EMPTY' | 'CONTACT_REQ_MISSING' | 'CREATE_CALL_FAILED' | 'CURRENCY_TOTAL_AMOUNT_INVALID' | 'DATA_INVALID' | 'DATA_JSON_INVALID' | 'DATA_TOO_LONG' | 'DATE_EMPTY' | 'DC_ID_INVALID' | 'DH_G_A_INVALID' | 'DOCUMENT_INVALID' | 'EMAIL_HASH_EXPIRED' | 'EMAIL_INVALID' | 'EMAIL_NOT_SETUP' | 'EMAIL_UNCONFIRMED' | 'EMAIL_UNCONFIRMED_%d' | 'EMAIL_VERIFY_EXPIRED' | 'EMOJI_INVALID' | 'EMOJI_MARKUP_INVALID' | 'EMOJI_NOT_MODIFIED' | 'EMOTICON_EMPTY' | 'EMOTICON_INVALID' | 'EMOTICON_STICKERPACK_MISSING' | 'ENCRYPTED_MESSAGE_INVALID' | 'ENCRYPTION_ALREADY_ACCEPTED' | 'ENCRYPTION_ALREADY_DECLINED' | 'ENCRYPTION_DECLINED' | 'ENCRYPTION_ID_INVALID' | 'ENTITIES_TOO_LONG' | 'ENTITY_BOUNDS_INVALID' | 'ENTITY_MENTION_USER_INVALID' | 'ERROR_TEXT_EMPTY' | 'EXPIRE_DATE_INVALID' | 'EXPORT_CARD_INVALID' | 'EXTERNAL_URL_INVALID' | 'FILE_CONTENT_TYPE_INVALID' | 'FILE_EMTPY' | 'FILE_ID_INVALID' | 'FILE_PART_EMPTY' | 'FILE_PART_INVALID' | 'FILE_PART_LENGTH_INVALID' | 'FILE_PART_SIZE_CHANGED' | 'FILE_PART_SIZE_INVALID' | 'FILE_PART_TOO_BIG' | 'FILE_PARTS_INVALID' | 'FILE_REFERENCE_EMPTY' | 'FILE_REFERENCE_EXPIRED' | 'FILE_REFERENCE_INVALID' | 'FILE_TITLE_EMPTY' | 'FILE_TOKEN_INVALID' | 'FILTER_ID_INVALID' | 'FILTER_INCLUDE_EMPTY' | 'FILTER_NOT_SUPPORTED' | 'FILTER_TITLE_EMPTY' | 'FIRSTNAME_INVALID' | 'FOLDER_ID_EMPTY' | 'FOLDER_ID_INVALID' | 'FRESH_CHANGE_ADMINS_FORBIDDEN' | 'FROM_MESSAGE_BOT_DISABLED' | 'FROM_PEER_INVALID' | 'GAME_BOT_INVALID' | 'GEO_POINT_INVALID' | 'GIF_CONTENT_TYPE_INVALID' | 'GIF_ID_INVALID' | 'GRAPH_EXPIRED_RELOAD' | 'GRAPH_INVALID_RELOAD' | 'GRAPH_OUTDATED_RELOAD' | 'GROUPCALL_ALREADY_DISCARDED' | 'GROUPCALL_FORBIDDEN' | 'GROUPCALL_INVALID' | 'GROUPCALL_JOIN_MISSING' | 'GROUPCALL_NOT_MODIFIED' | 'GROUPCALL_SSRC_DUPLICATE_MUCH' | 'GROUPED_MEDIA_INVALID' | 'HASH_INVALID' | 'HIDE_REQUESTER_MISSING' | 'IMAGE_PROCESS_FAILED' | 'IMPORT_FILE_INVALID' | 'IMPORT_FORMAT_UNRECOGNIZED' | 'IMPORT_ID_INVALID' | 'IMPORT_TOKEN_INVALID' | 'INLINE_RESULT_EXPIRED' | 'INPUT_FILTER_INVALID' | 'INPUT_TEXT_EMPTY' | 'INPUT_USER_DEACTIVATED' | 'INVITE_FORBIDDEN_WITH_JOINAS' | 'INVITE_HASH_EMPTY' | 'INVITE_HASH_EXPIRED' | 'INVITE_HASH_INVALID' | 'INVITE_REQUEST_SENT' | 'INVITE_REVOKED_MISSING' | 'INVITE_SLUG_EMPTY' | 'INVITES_TOO_MUCH' | 'INVOICE_PAYLOAD_INVALID' | 'JOIN_AS_PEER_INVALID' | 'LANG_CODE_INVALID' | 'LANG_CODE_NOT_SUPPORTED' | 'LANG_PACK_INVALID' | 'LASTNAME_INVALID' | 'LIMIT_INVALID' | 'LINK_NOT_MODIFIED' | 'LOCATION_INVALID' | 'MAX_DATE_INVALID' | 'MAX_ID_INVALID' | 'MAX_QTS_INVALID' | 'MD5_CHECKSUM_INVALID' | 'MEDIA_CAPTION_TOO_LONG' | 'MEDIA_EMPTY' | 'MEDIA_GROUPED_INVALID' | 'MEDIA_INVALID' | 'MEDIA_NEW_INVALID' | 'MEDIA_PREV_INVALID' | 'MEGAGROUP_ID_INVALID' | 'MEGAGROUP_PREHISTORY_HIDDEN' | 'MEGAGROUP_REQUIRED' | 'MESSAGE_EDIT_TIME_EXPIRED' | 'MESSAGE_EMPTY' | 'MESSAGE_ID_INVALID' | 'MESSAGE_IDS_EMPTY' | 'MESSAGE_NOT_MODIFIED' | 'MESSAGE_POLL_CLOSED' | 'MESSAGE_TOO_LONG' | 'METHOD_INVALID' | 'MIN_DATE_INVALID' | 'MSG_ID_INVALID' | 'MSG_TOO_OLD' | 'MSG_WAIT_FAILED' | 'MULTI_MEDIA_TOO_LONG' | 'NEW_SALT_INVALID' | 'NEW_SETTINGS_EMPTY' | 'NEW_SETTINGS_INVALID' | 'NEXT_OFFSET_INVALID' | 'OFFSET_INVALID' | 'OFFSET_PEER_ID_INVALID' | 'OPTION_INVALID' | 'OPTIONS_TOO_MUCH' | 'ORDER_INVALID' | 'PACK_SHORT_NAME_INVALID' | 'PACK_SHORT_NAME_OCCUPIED' | 'PACK_TITLE_INVALID' | 'PARTICIPANT_ID_INVALID' | 'PARTICIPANT_JOIN_MISSING' | 'PARTICIPANT_VERSION_OUTDATED' | 'PARTICIPANTS_TOO_FEW' | 'PASSWORD_EMPTY' | 'PASSWORD_HASH_INVALID' | 'PASSWORD_MISSING' | 'PASSWORD_RECOVERY_EXPIRED' | 'PASSWORD_RECOVERY_NA' | 'PASSWORD_REQUIRED' | 'PASSWORD_TOO_FRESH_%d' | 'PAYMENT_PROVIDER_INVALID' | 'PEER_HISTORY_EMPTY' | 'PEER_ID_INVALID' | 'PEER_ID_NOT_SUPPORTED' | 'PEERS_LIST_EMPTY' | 'PERSISTENT_TIMESTAMP_EMPTY' | 'PERSISTENT_TIMESTAMP_INVALID' | 'PHONE_CODE_EMPTY' | 'PHONE_CODE_EXPIRED' | 'PHONE_CODE_HASH_EMPTY' | 'PHONE_CODE_INVALID' | 'PHONE_HASH_EXPIRED' | 'PHONE_NOT_OCCUPIED' | 'PHONE_NUMBER_APP_SIGNUP_FORBIDDEN' | 'PHONE_NUMBER_BANNED' | 'PHONE_NUMBER_FLOOD' | 'PHONE_NUMBER_INVALID' | 'PHONE_NUMBER_OCCUPIED' | 'PHONE_NUMBER_UNOCCUPIED' | 'PHONE_PASSWORD_PROTECTED' | 'PHOTO_CONTENT_TYPE_INVALID' | 'PHOTO_CONTENT_URL_EMPTY' | 'PHOTO_CROP_FILE_MISSING' | 'PHOTO_CROP_SIZE_SMALL' | 'PHOTO_EXT_INVALID' | 'PHOTO_FILE_MISSING' | 'PHOTO_ID_INVALID' | 'PHOTO_INVALID' | 'PHOTO_INVALID_DIMENSIONS' | 'PHOTO_SAVE_FILE_INVALID' | 'PHOTO_THUMB_URL_EMPTY' | 'PIN_RESTRICTED' | 'PINNED_DIALOGS_TOO_MUCH' | 'POLL_ANSWER_INVALID' | 'POLL_ANSWERS_INVALID' | 'POLL_OPTION_DUPLICATE' | 'POLL_OPTION_INVALID' | 'POLL_QUESTION_INVALID' | 'PRIVACY_KEY_INVALID' | 'PRIVACY_TOO_LONG' | 'PRIVACY_VALUE_INVALID' | 'PUBLIC_KEY_REQUIRED' | 'QUERY_ID_EMPTY' | 'QUERY_ID_INVALID' | 'QUERY_TOO_SHORT' | 'QUIZ_ANSWER_MISSING' | 'QUIZ_CORRECT_ANSWER_INVALID' | 'QUIZ_CORRECT_ANSWERS_EMPTY' | 'QUIZ_CORRECT_ANSWERS_TOO_MUCH' | 'QUIZ_MULTIPLE_INVALID' | 'RANDOM_ID_EMPTY' | 'RANDOM_ID_INVALID' | 'RANDOM_LENGTH_INVALID' | 'RANGES_INVALID' | 'REACTION_EMPTY' | 'REACTION_INVALID' | 'REACTIONS_TOO_MANY' | 'REPLY_MARKUP_BUY_EMPTY' | 'REPLY_MARKUP_INVALID' | 'REPLY_MARKUP_TOO_LONG' | 'RESET_REQUEST_MISSING' | 'RESULT_ID_DUPLICATE' | 'RESULT_ID_EMPTY' | 'RESULT_ID_INVALID' | 'RESULT_TYPE_INVALID' | 'RESULTS_TOO_MUCH' | 'REVOTE_NOT_ALLOWED' | 'RIGHTS_NOT_MODIFIED' | 'RSA_DECRYPT_FAILED' | 'SCHEDULE_BOT_NOT_ALLOWED' | 'SCHEDULE_DATE_INVALID' | 'SCHEDULE_DATE_TOO_LATE' | 'SCHEDULE_STATUS_PRIVATE' | 'SCHEDULE_TOO_MUCH' | 'SCORE_INVALID' | 'SEARCH_QUERY_EMPTY' | 'SEARCH_WITH_LINK_NOT_SUPPORTED' | 'SECONDS_INVALID' | 'SEND_AS_PEER_INVALID' | 'SEND_MESSAGE_MEDIA_INVALID' | 'SEND_MESSAGE_TYPE_INVALID' | 'SESSION_TOO_FRESH_%d' | 'SETTINGS_INVALID' | 'SHA256_HASH_INVALID' | 'SHORT_NAME_INVALID' | 'SHORT_NAME_OCCUPIED' | 'SLOWMODE_MULTI_MSGS_DISABLED' | 'SMS_CODE_CREATE_FAILED' | 'SRP_ID_INVALID' | 'SRP_PASSWORD_CHANGED' | 'START_PARAM_EMPTY' | 'START_PARAM_INVALID' | 'START_PARAM_TOO_LONG' | 'STICKER_DOCUMENT_INVALID' | 'STICKER_EMOJI_INVALID' | 'STICKER_FILE_INVALID' | 'STICKER_GIF_DIMENSIONS' | 'STICKER_ID_INVALID' | 'STICKER_INVALID' | 'STICKER_MIME_INVALID' | 'STICKER_PNG_DIMENSIONS' | 'STICKER_PNG_NOPNG' | 'STICKER_TGS_NODOC' | 'STICKER_TGS_NOTGS' | 'STICKER_THUMB_PNG_NOPNG' | 'STICKER_THUMB_TGS_NOTGS' | 'STICKER_VIDEO_BIG' | 'STICKER_VIDEO_NODOC' | 'STICKER_VIDEO_NOWEBM' | 'STICKERPACK_STICKERS_TOO_MUCH' | 'STICKERS_EMPTY' | 'STICKERS_TOO_MUCH' | 'STICKERSET_INVALID' | 'SWITCH_PM_TEXT_EMPTY' | 'TAKEOUT_REQUIRED' | 'TASK_ALREADY_EXISTS' | 'TEMP_AUTH_KEY_ALREADY_BOUND' | 'TEMP_AUTH_KEY_EMPTY' | 'THEME_FILE_INVALID' | 'THEME_FORMAT_INVALID' | 'THEME_INVALID' | 'THEME_MIME_INVALID' | 'THEME_TITLE_INVALID' | 'TITLE_INVALID' | 'TMP_PASSWORD_DISABLED' | 'TO_LANG_INVALID' | 'TOKEN_EMPTY' | 'TOKEN_INVALID' | 'TOKEN_TYPE_INVALID' | 'TOPIC_CLOSED' | 'TOPIC_DELETED' | 'TOPIC_ID_INVALID' | 'TOPIC_NOT_MODIFIED' | 'TRANSCRIPTION_FAILED' | 'TTL_DAYS_INVALID' | 'TTL_MEDIA_INVALID' | 'TTL_PERIOD_INVALID' | 'TYPES_EMPTY' | 'UNTIL_DATE_INVALID' | 'URL_INVALID' | 'USAGE_LIMIT_INVALID' | 'USER_ADMIN_INVALID' | 'USER_ALREADY_INVITED' | 'USER_ALREADY_PARTICIPANT' | 'USER_BANNED_IN_CHANNEL' | 'USER_BLOCKED' | 'USER_BOT' | 'USER_BOT_INVALID' | 'USER_BOT_REQUIRED' | 'USER_CHANNELS_TOO_MUCH' | 'USER_CREATOR' | 'USER_ID_INVALID' | 'USER_INVALID' | 'USER_IS_BLOCKED' | 'USER_IS_BOT' | 'USER_KICKED' | 'USER_NOT_MUTUAL_CONTACT' | 'USER_NOT_PARTICIPANT' | 'USER_VOLUME_INVALID' | 'USERNAME_INVALID' | 'USERNAME_NOT_MODIFIED' | 'USERNAME_NOT_OCCUPIED' | 'USERNAME_OCCUPIED' | 'USERNAME_PURCHASE_AVAILABLE' | 'USERNAMES_ACTIVE_TOO_MUCH' | 'USERPIC_UPLOAD_REQUIRED' | 'USERS_TOO_FEW' | 'USERS_TOO_MUCH' | 'VIDEO_CONTENT_TYPE_INVALID' | 'VIDEO_FILE_INVALID' | 'VIDEO_TITLE_EMPTY' | 'VOICE_MESSAGES_FORBIDDEN' | 'WALLPAPER_FILE_INVALID' | 'WALLPAPER_INVALID' | 'WALLPAPER_MIME_INVALID' | 'WC_CONVERT_URL_INVALID' | 'WEBDOCUMENT_INVALID' | 'WEBDOCUMENT_MIME_INVALID' | 'WEBDOCUMENT_SIZE_TOO_BIG' | 'WEBDOCUMENT_URL_INVALID' | 'WEBPAGE_CURL_FAILED' | 'WEBPAGE_MEDIA_EMPTY' | 'WEBPUSH_AUTH_INVALID' | 'WEBPUSH_KEY_INVALID' | 'WEBPUSH_TOKEN_INVALID' | 'YOU_BLOCKED_USER' | 'BROADCAST_FORBIDDEN' | 'CHANNEL_PUBLIC_GROUP_NA' | 'CHAT_ADMIN_INVITE_REQUIRED' | 'CHAT_GUEST_SEND_FORBIDDEN' | 'CHAT_SEND_AUDIOS_FORBIDDEN' | 'CHAT_SEND_DOCS_FORBIDDEN' | 'CHAT_SEND_GAME_FORBIDDEN' | 'CHAT_SEND_GIFS_FORBIDDEN' | 'CHAT_SEND_MEDIA_FORBIDDEN' | 'CHAT_SEND_PHOTOS_FORBIDDEN' | 'CHAT_SEND_PLAIN_FORBIDDEN' | 'CHAT_SEND_POLL_FORBIDDEN' | 'CHAT_SEND_STICKERS_FORBIDDEN' | 'CHAT_SEND_VIDEOS_FORBIDDEN' | 'CHAT_SEND_VOICES_FORBIDDEN' | 'CHAT_WRITE_FORBIDDEN' | 'EDIT_BOT_INVITE_FORBIDDEN' | 'GROUPCALL_ALREADY_STARTED' | 'INLINE_BOT_REQUIRED' | 'MESSAGE_AUTHOR_REQUIRED' | 'MESSAGE_DELETE_FORBIDDEN' | 'POLL_VOTE_REQUIRED' | 'PREMIUM_ACCOUNT_REQUIRED' | 'PUBLIC_CHANNEL_MISSING' | 'RIGHT_FORBIDDEN' | 'SENSITIVE_CHANGE_FORBIDDEN' | 'USER_DELETED' | 'USER_PRIVACY_RESTRICTED' | 'USER_RESTRICTED' | 'FILEREF_UPGRADE_NEEDED' | 'FRESH_CHANGE_PHONE_FORBIDDEN' | 'FRESH_RESET_AUTHORISATION_FORBIDDEN' | 'PAYMENT_UNSUPPORTED' | 'PHONE_PASSWORD_FLOOD' | 'PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN' | 'SEND_CODE_UNAVAILABLE' | 'STICKERSET_OWNER_ANONYMOUS' | 'USERPIC_PRIVACY_REQUIRED' | '2FA_CONFIRM_WAIT_%d' | 'SLOWMODE_WAIT_%d' | 'TAKEOUT_INIT_DELAY_%d' | 'AUTH_RESTART' | 'CDN_UPLOAD_TIMEOUT' | 'CHAT_ID_GENERATE_FAILED' | 'PERSISTENT_TIMESTAMP_OUTDATED' | 'RANDOM_ID_DUPLICATE' | 'SIGN_IN_FAILED' | 'Invalid msg_resend_req query' | 'Invalid msgs_ack query' | 'Invalid msgs_state_req query' | 'Timeout' | 'SESSION_PASSWORD_NEEDED' | 'ACTIVE_USER_REQUIRED' | 'AUTH_KEY_DUPLICATED' | 'AUTH_KEY_INVALID' | 'AUTH_KEY_PERM_EMPTY' | 'AUTH_KEY_UNREGISTERED' | 'AUTH_TOKEN_INVALID2' | 'BASE_PORT_LOC_INVALID' | 'BOT_GAMES_DISABLED' | 'BOT_METHOD_INVALID' | 'BOT_POLLS_DISABLED' | 'BROADCAST_CALLS_DISABLED' | 'CHANNEL_BANNED' | 'CHAT_FORBIDDEN' | 'CHAT_GET_FAILED' | 'CHP_CALL_FAIL' | 'CONNECTION_DEVICE_MODEL_EMPTY' | 'CONNECTION_LANG_PACK_INVALID' | 'CONNECTION_NOT_INITED' | 'CONNECTION_SYSTEM_EMPTY' | 'CONNECTION_SYSTEM_LANG_CODE_EMPTY' | 'ENCRYPTION_OCCUPY_FAILED' | 'EXPIRE_FORBIDDEN' | 'FIELD_NAME_EMPTY' | 'FIELD_NAME_INVALID' | 'FILE_PART_0_MISSING' | 'FILE_PART_%d_MISSING' | 'FLOOD_TEST_PHONE_WAIT_%d' | 'GROUPCALL_ADD_PARTICIPANTS_FAILED' | 'GROUP_CALL_INVALID' | 'HISTORY_GET_FAILED' | 'INPUT_CONSTRUCTOR_INVALID' | 'INPUT_FETCH_ERROR' | 'INPUT_FETCH_FAIL' | 'INPUT_LAYER_INVALID' | 'INPUT_METHOD_INVALID' | 'INPUT_REQUEST_TOO_LONG' | 'INTERDC_%d_CALL_ERROR' | 'INTERDC_%d_CALL_RICH_ERROR' | 'MEDIA_TTL_INVALID' | 'MEMBER_NO_LOCATION' | 'MEMBER_OCCUPY_PRIMARY_LOC_FAILED' | 'MSGID_DECREASE_RETRY' | 'MT_SEND_QUEUE_TOO_LONG' | 'NEED_CHAT_INVALID' | 'NEED_MEMBER_INVALID' | 'NOT_ALLOWED' | 'PARTICIPANT_CALL_FAILED' | 'PEER_FLOOD' | 'POLL_UNSUPPORTED' | 'POSTPONED_TIMEOUT' | 'PREMIUM_CURRENTLY_UNAVAILABLE' | 'PTS_CHANGE_EMPTY' | 'REFLECTOR_NOT_AVAILABLE' | 'REG_ID_GENERATE_FAILED' | 'REPLY_MARKUP_GAME_EMPTY' | 'RPC_CALL_FAIL' | 'RPC_MCGET_FAIL' | 'SESSION_EXPIRED' | 'SESSION_REVOKED' | 'SHORTNAME_OCCUPY_FAILED' | 'STORAGE_CHECK_FAILED' | 'STORE_INVALID_SCALAR_TYPE' | 'TAKEOUT_INVALID' | 'TMP_PASSWORD_INVALID' | 'TYPE_CONSTRUCTOR_INVALID' | 'Timedout' | 'UNKNOWN_ERROR' | 'UNKNOWN_METHOD' | 'UPDATE_APP_TO_LOGIN' | 'USER_DEACTIVATED' | 'USER_DEACTIVATED_BAN' | 'USER_MIGRATE_%d' | 'WORKER_BUSY_TOO_LONG_RETRY' | (string & {}) // to keep hints interface MtErrorArgMap { 'FLOOD_WAIT_%d': { seconds: number }, 'FILE_MIGRATE_%d': { newDc: number }, 'NETWORK_MIGRATE_%d': { newDc: number }, 'PHONE_MIGRATE_%d': { newDc: number }, 'STATS_MIGRATE_%d': { dc: number }, 'EMAIL_UNCONFIRMED_%d': { codeLength: number }, 'PASSWORD_TOO_FRESH_%d': { seconds: number }, 'SESSION_TOO_FRESH_%d': { seconds: number }, 'PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN': { minutes: number }, '2FA_CONFIRM_WAIT_%d': { seconds: number }, 'SLOWMODE_WAIT_%d': { seconds: number }, 'TAKEOUT_INIT_DELAY_%d': { seconds: number }, 'FILE_PART_%d_MISSING': { which: number }, 'FLOOD_TEST_PHONE_WAIT_%d': { seconds: number }, 'INTERDC_%d_CALL_ERROR': { dc: number }, 'INTERDC_%d_CALL_RICH_ERROR': { dc: number }, 'USER_MIGRATE_%d': { newDc: number }, } type RpcErrorWithArgs = RpcError & { text: T } & (T extends keyof MtErrorArgMap ? (RpcError & MtErrorArgMap[T]) : {}); export class RpcError extends Error { static BAD_REQUEST: 400; static UNAUTHORIZED: 401; static FORBIDDEN: 403; static NOT_FOUND: 404; static FLOOD: 420; static SEE_OTHER: 303; static NOT_ACCEPTABLE: 406; static INTERNAL: 500; readonly code: number; readonly text: MtErrorText; readonly unknown: boolean; constructor(code: number, text: MtErrorText); is(text: T): this is RpcErrorWithArgs; static is(err: unknown): err is RpcError; static is(err: unknown, text: T): err is RpcErrorWithArgs; static create(code: number, text: T): RpcErrorWithArgs; static fromTl(obj: object): RpcError; } /** * Error. */ interface RawError { _: 'error'; /** * Error code */ code: number; /** * Message */ text: string; } interface RawInputPeerPhotoFileLocationLegacy { _: 'inputPeerPhotoFileLocationLegacy'; big?: boolean; peer: tl.TypeInputPeer; volumeId: Long; localId: number; } interface RawInputStickerSetThumbLegacy { _: 'inputStickerSetThumbLegacy'; stickerset: tl.TypeInputStickerSet; volumeId: Long; localId: number; } /** * An empty constructor, no user or chat is defined. */ interface RawInputPeerEmpty { _: 'inputPeerEmpty'; } /** * Defines the current user. */ interface RawInputPeerSelf { _: 'inputPeerSelf'; } /** * Defines a chat for further interaction. */ interface RawInputPeerChat { _: 'inputPeerChat'; /** * Chat identifier */ chatId: number; } /** * Defines a user for further interaction. */ interface RawInputPeerUser { _: 'inputPeerUser'; /** * User identifier */ userId: number; /** * access_hash value from the {@link RawUser} * constructor */ accessHash: Long; } /** * Defines a channel for further interaction. */ interface RawInputPeerChannel { _: 'inputPeerChannel'; /** * Channel identifier */ channelId: number; /** * access_hash value from the * {@link RawChannel} constructor */ accessHash: Long; } /** * Defines a * min user * that was seen in a certain message of a certain chat. */ interface RawInputPeerUserFromMessage { _: 'inputPeerUserFromMessage'; /** * The chat where the user was seen */ peer: tl.TypeInputPeer; /** * The message ID */ msgId: number; /** * The identifier of the user that was seen */ userId: number; } /** * Defines a * min * channel that was seen in a certain message of a certain * chat. */ interface RawInputPeerChannelFromMessage { _: 'inputPeerChannelFromMessage'; /** * The chat where the channel's message was seen */ peer: tl.TypeInputPeer; /** * The message ID */ msgId: number; /** * The identifier of the channel that was seen */ channelId: number; } /** * Empty constructor, does not define a user. */ interface RawInputUserEmpty { _: 'inputUserEmpty'; } /** * Defines the current user. */ interface RawInputUserSelf { _: 'inputUserSelf'; } /** * Defines a user for further interaction. */ interface RawInputUser { _: 'inputUser'; /** * User identifier */ userId: number; /** * access_hash value from the {@link RawUser} * constructor */ accessHash: Long; } /** * Defines a * min user * that was seen in a certain message of a certain chat. */ interface RawInputUserFromMessage { _: 'inputUserFromMessage'; /** * The chat where the user was seen */ peer: tl.TypeInputPeer; /** * The message ID */ msgId: number; /** * The identifier of the user that was seen */ userId: number; } /** * Phone contact. */ interface RawInputPhoneContact { _: 'inputPhoneContact'; /** * An arbitrary 64-bit integer: it should be set, for example, * to an incremental number when using * {@link contacts.RawImportContactsRequest}, in order to retry * importing only the contacts that weren't imported * successfully, according to the client_ids returned in * {@link contacts.RawImportedContacts}.retry_contacts. */ clientId: Long; /** * Phone number */ phone: string; /** * Contact's first name */ firstName: string; /** * Contact's last name */ lastName: string; note?: tl.TypeTextWithEntities; } /** * Defines a file saved in parts using the method * {@link upload.RawSaveFilePartRequest}. */ interface RawInputFile { _: 'inputFile'; /** * Random file identifier created by the client */ id: Long; /** * Number of parts saved */ parts: number; /** * Full name of the file */ name: string; /** * In case the file's * md5-hash * was passed, contents of the file will be checked prior to * use */ md5Checksum: string; } /** * Assigns a big file (over 10 MB in size), saved in part using * the method {@link upload.RawSaveBigFilePartRequest}. */ interface RawInputFileBig { _: 'inputFileBig'; /** * Random file id, created by the client */ id: Long; /** * Number of parts saved */ parts: number; /** * Full file name */ name: string; } /** * Used to * edit * the thumbnail/static preview of a story, see here » for * more info on the full flow. */ interface RawInputFileStoryDocument { _: 'inputFileStoryDocument'; /** * The old story video. */ id: tl.TypeInputDocument; } /** * Empty media content of a message. */ interface RawInputMediaEmpty { _: 'inputMediaEmpty'; } /** * Photo */ interface RawInputMediaUploadedPhoto { _: 'inputMediaUploadedPhoto'; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * The * uploaded * file */ file: tl.TypeInputFile; /** * Attached mask stickers */ stickers?: tl.TypeInputDocument[]; /** * Time to live in seconds of self-destructing photo */ ttlSeconds?: number; } /** * Forwarded photo */ interface RawInputMediaPhoto { _: 'inputMediaPhoto'; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * Photo to be forwarded */ id: tl.TypeInputPhoto; /** * Time to live in seconds of self-destructing photo */ ttlSeconds?: number; } /** * Map. */ interface RawInputMediaGeoPoint { _: 'inputMediaGeoPoint'; /** * GeoPoint */ geoPoint: tl.TypeInputGeoPoint; } /** * Phone book contact */ interface RawInputMediaContact { _: 'inputMediaContact'; /** * Phone number */ phoneNumber: string; /** * Contact's first name */ firstName: string; /** * Contact's last name */ lastName: string; /** * Contact vcard */ vcard: string; } /** * New document */ interface RawInputMediaUploadedDocument { _: 'inputMediaUploadedDocument'; /** * Whether to send the file as a video even if it doesn't have * an audio track (i.e. if set, the * {@link RawDocumentAttributeAnimated} attribute will * not be set even for videos without audio) */ nosoundVideo?: boolean; /** * Force the media file to be uploaded as document */ forceFile?: boolean; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * The * uploaded * file */ file: tl.TypeInputFile; /** * Thumbnail of the document, uploaded as for the file */ thumb?: tl.TypeInputFile; /** * MIME type of document */ mimeType: string; /** * Attributes that specify the type of the document (video, * audio, voice, sticker, etc.) */ attributes: tl.TypeDocumentAttribute[]; /** * Attached stickers */ stickers?: tl.TypeInputDocument[]; /** * Start playing the video at the specified timestamp * (seconds). */ videoCover?: tl.TypeInputPhoto; /** * Start playing the video at the specified timestamp * (seconds). */ videoTimestamp?: number; /** * Time to live in seconds of self-destructing document */ ttlSeconds?: number; } /** * Forwarded document */ interface RawInputMediaDocument { _: 'inputMediaDocument'; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * The document to be forwarded. */ id: tl.TypeInputDocument; /** * Custom video cover. */ videoCover?: tl.TypeInputPhoto; /** * Start playing the video at the specified timestamp * (seconds). */ videoTimestamp?: number; /** * Time to live of self-destructing document */ ttlSeconds?: 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; } /** * Can be used to send a venue geolocation. */ interface RawInputMediaVenue { _: 'inputMediaVenue'; /** * Geolocation */ geoPoint: tl.TypeInputGeoPoint; /** * 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 */ venueId: string; /** * Venue type in the provider's database */ venueType: string; } /** * New photo that will be uploaded by the server using the * specified URL */ interface RawInputMediaPhotoExternal { _: 'inputMediaPhotoExternal'; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * URL of the photo */ url: string; /** * Self-destruct time to live of photo */ ttlSeconds?: number; } /** * Document that will be downloaded by the telegram servers */ interface RawInputMediaDocumentExternal { _: 'inputMediaDocumentExternal'; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * URL of the document */ url: string; /** * Self-destruct time to live of document */ ttlSeconds?: number; /** * Custom video cover. */ videoCover?: tl.TypeInputPhoto; /** * Start playing the video at the specified timestamp * (seconds). */ videoTimestamp?: number; } /** * A game */ interface RawInputMediaGame { _: 'inputMediaGame'; /** * The game to forward */ id: tl.TypeInputGame; } /** * Generated invoice of a * bot * payment */ interface RawInputMediaInvoice { _: 'inputMediaInvoice'; /** * 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?: tl.TypeInputWebDocument; /** * The actual invoice */ invoice: tl.TypeInvoice; /** * 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 */ 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. */ providerData: tl.TypeDataJSON; /** * Unique * bot * deep links start parameter. If present, forwarded copies * of the sent message will have a URL button with a * deep * link 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. */ startParam?: string; /** * Deprecated */ extendedMedia?: tl.TypeInputMedia; } /** * Live * geolocation */ interface RawInputMediaGeoLive { _: 'inputMediaGeoLive'; /** * Whether sending of the geolocation was stopped */ stopped?: boolean; /** * Current geolocation */ geoPoint: tl.TypeInputGeoPoint; /** * For * live * locations, a direction in which the location moves, in * degrees; 1-360. */ heading?: number; /** * Validity period of the current location */ period?: number; /** * For * live * locations, a maximum distance to another chat member for * proximity alerts, in meters (0-100000) */ proximityNotificationRadius?: number; } /** * A poll */ interface RawInputMediaPoll { _: 'inputMediaPoll'; /** * The poll to send */ poll: tl.TypePoll; /** * Correct answer IDs (for quiz polls) */ correctAnswers?: Uint8Array[]; /** * Explanation of quiz solution */ solution?: string; /** * Message * entities for styled text */ solutionEntities?: tl.TypeMessageEntity[]; } /** * Send a * dice-based * animated sticker */ interface RawInputMediaDice { _: 'inputMediaDice'; /** * The emoji, for now 🏀, 🎲 and 🎯 are supported */ emoticon: string; } /** * Forwarded story */ interface RawInputMediaStory { _: 'inputMediaStory'; /** * Peer where the story was posted */ peer: tl.TypeInputPeer; /** * Story ID */ id: number; } /** * Specifies options that will be used to generate the link * preview for the caption, or even a standalone link preview * without an attached message. */ interface RawInputMediaWebPage { _: 'inputMediaWebPage'; /** * If set, specifies that a large media preview should be used. */ forceLargeMedia?: boolean; /** * If set, specifies that a small media preview should be used. */ forceSmallMedia?: boolean; /** * 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?: boolean; /** * The URL to use for the link preview. */ url: string; } /** * Paid * media, see here » for more info. */ interface RawInputMediaPaidMedia { _: 'inputMediaPaidMedia'; /** * The price of the media in * Telegram * Stars. */ starsAmount: Long; /** * Photos or videos. */ extendedMedia: tl.TypeInputMedia[]; /** * Bots only, specifies a custom payload that will then be * passed in {@link RawUpdateBotPurchasedPaidMedia} when a * payment is made (this field will not be visible to the user) */ payload?: string; } /** * Creates a * todo list * ». */ interface RawInputMediaTodo { _: 'inputMediaTodo'; /** * The todo list. */ todo: tl.TypeTodoList; } interface RawInputMediaStakeDice { _: 'inputMediaStakeDice'; gameHash: string; tonAmount: Long; clientSeed: Uint8Array; } /** * Empty constructor, remove group photo. */ interface RawInputChatPhotoEmpty { _: 'inputChatPhotoEmpty'; } /** * New photo to be set as group profile photo. * * The file, video and * video_emoji_markup flags are mutually * exclusive. */ interface RawInputChatUploadedPhoto { _: 'inputChatUploadedPhoto'; /** * File saved in parts using the method * {@link upload.RawSaveFilePartRequest} */ file?: tl.TypeInputFile; /** * Square video for animated profile picture */ video?: tl.TypeInputFile; /** * 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. */ videoStartTs?: Double; /** * Animated sticker profile picture, must contain either a * {@link RawVideoSizeEmojiMarkup} or a * {@link RawVideoSizeStickerMarkup} constructor. */ videoEmojiMarkup?: tl.TypeVideoSize; } /** * Existing photo to be set as a chat profile photo. */ interface RawInputChatPhoto { _: 'inputChatPhoto'; /** * Existing photo */ id: tl.TypeInputPhoto; } /** * Empty GeoPoint constructor. */ interface RawInputGeoPointEmpty { _: 'inputGeoPointEmpty'; } /** * Defines a GeoPoint by its coordinates. */ interface RawInputGeoPoint { _: 'inputGeoPoint'; /** * Latitude */ lat: Double; /** * Longitude */ long: Double; /** * The estimated horizontal accuracy of the location, in * meters; as defined by the sender. */ accuracyRadius?: number; } /** * Empty constructor. */ interface RawInputPhotoEmpty { _: 'inputPhotoEmpty'; } /** * Defines a photo for further interaction. */ interface RawInputPhoto { _: 'inputPhoto'; /** * Photo identifier */ id: Long; /** * access_hash value from the {@link RawPhoto} * constructor */ accessHash: Long; /** * File * reference */ fileReference: Uint8Array; } /** * DEPRECATED location of a photo */ interface RawInputFileLocation { _: 'inputFileLocation'; /** * Server volume */ volumeId: Long; /** * File identifier */ localId: number; /** * Check sum to access the file */ secret: Long; /** * File * reference */ fileReference: Uint8Array; } /** * Location of encrypted secret chat file. */ interface RawInputEncryptedFileLocation { _: 'inputEncryptedFileLocation'; /** * File ID, id parameter value from * {@link RawEncryptedFile} */ id: Long; /** * Checksum, access_hash parameter value from * {@link RawEncryptedFile} */ accessHash: Long; } /** * Document location (video, voice, audio, basically every type * except photo) */ interface RawInputDocumentFileLocation { _: 'inputDocumentFileLocation'; /** * Document ID */ id: Long; /** * access_hash parameter from the * {@link RawDocument} constructor */ accessHash: Long; /** * File * reference */ fileReference: Uint8Array; /** * Thumbnail size to download the thumbnail */ thumbSize: string; } /** * Location of encrypted telegram * passport * file. */ interface RawInputSecureFileLocation { _: 'inputSecureFileLocation'; /** * File ID, id parameter value from * {@link RawSecureFile} */ id: Long; /** * Checksum, access_hash parameter value from * {@link RawSecureFile} */ accessHash: Long; } /** * Used to download a JSON file that will contain all personal * data related to features that do not have a specialized * takeout * method yet, see * here * » for more info on the takeout API. */ interface RawInputTakeoutFileLocation { _: 'inputTakeoutFileLocation'; } /** * Use this object to download a photo with * {@link upload.RawGetFileRequest} method */ interface RawInputPhotoFileLocation { _: 'inputPhotoFileLocation'; /** * Photo ID, obtained from the {@link RawPhoto} object */ id: Long; /** * Photo's access hash, obtained from the {@link RawPhoto} * object */ accessHash: Long; /** * File * reference */ fileReference: Uint8Array; /** * The * PhotoSize * to download: must be set to the type field of * the desired PhotoSize object of the {@link RawPhoto} */ thumbSize: string; } /** * DEPRECATED legacy photo file location */ interface RawInputPhotoLegacyFileLocation { _: 'inputPhotoLegacyFileLocation'; /** * Photo ID */ id: Long; /** * Access hash */ accessHash: Long; /** * File reference */ fileReference: Uint8Array; /** * Volume ID */ volumeId: Long; /** * Local ID */ localId: number; /** * Secret */ secret: Long; } /** * Location of profile photo of channel/group/supergroup/user */ interface RawInputPeerPhotoFileLocation { _: 'inputPeerPhotoFileLocation'; /** * Whether to download the high-quality version of the picture */ big?: boolean; /** * The peer whose profile picture should be downloaded */ peer: tl.TypeInputPeer; /** * Photo ID */ photoId: Long; } /** * Location of stickerset thumbnail (see * files) */ interface RawInputStickerSetThumb { _: 'inputStickerSetThumb'; /** * Sticker set */ stickerset: tl.TypeInputStickerSet; /** * Thumbnail version */ thumbVersion: number; } /** * Chunk of a livestream */ interface RawInputGroupCallStream { _: 'inputGroupCallStream'; /** * Livestream info */ call: tl.TypeInputGroupCall; /** * Timestamp in milliseconds */ timeMs: Long; /** * 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 */ videoChannel?: number; /** * Selected video quality (0 = lowest, 1 = medium, 2 = best) */ videoQuality?: number; } /** * Chat partner */ interface RawPeerUser { _: 'peerUser'; /** * User identifier */ userId: number; } /** * Group. */ interface RawPeerChat { _: 'peerChat'; /** * Group identifier */ chatId: number; } /** * Channel/supergroup */ interface RawPeerChannel { _: 'peerChannel'; /** * Channel ID */ channelId: number; } /** * Empty constructor, non-existent user. */ interface RawUserEmpty { _: 'userEmpty'; /** * User identifier or 0 */ id: number; } /** * Indicates info about a certain user. * * Unless specified otherwise, when updating the * local peer * database, all fields from the newly received constructor * take priority over the old constructor cached locally * (including by removing fields that aren't set in the new * constructor). * * See * here * » for an implementation of the logic to use when * updating the * local user * peer database. */ interface RawUser { _: 'user'; /** * Whether this user indicates the currently logged in user */ self?: boolean; /** * Whether this user is a contact * * When updating the * local peer * database, do not apply changes to this field if the * min flag is set. */ contact?: boolean; /** * Whether this user is a mutual contact. * * When updating the * local peer * database, do not apply changes to this field if the * min flag is set. */ mutualContact?: boolean; /** * Whether the account of this user was deleted. * * Changes to this flag should invalidate the local * {@link RawUserFull} cache for this user ID, see * here * » for more info. */ deleted?: boolean; /** * Is this user a bot? * * Changes to this flag should invalidate the local * {@link RawUserFull} cache for this user ID, see * here * » for more info. */ bot?: boolean; /** * Can the bot see all messages in groups? */ botChatHistory?: boolean; /** * Can the bot be added to groups? */ botNochats?: boolean; /** * Whether this user is verified */ verified?: boolean; /** * Access to this user must be restricted for the reason * specified in restriction_reason */ restricted?: boolean; /** * See min */ min?: boolean; /** * Whether the bot can request our geolocation in inline mode */ botInlineGeo?: boolean; /** * Whether this is an official support user */ support?: boolean; /** * This may be a scam user */ scam?: boolean; /** * If set and min is set, the value of * photo can be used to update the local database, * see the documentation of that flag for more info. */ applyMinPhoto?: boolean; /** * If set, this user was reported by many users as a fake or * scam user: be careful when interacting with them. */ fake?: boolean; /** * Whether this bot offers an * attachment * menu web app */ botAttachMenu?: boolean; /** * Whether this user is a Telegram Premium user * * Changes to this flag should invalidate the local * {@link RawUserFull} cache for this user ID, see * here * » for more info. * * Changes to this flag if the self flag is set * should also trigger the following calls, to refresh the * respective caches: * * - The {@link help.RawGetConfigRequest} cache * * - The {@link messages.RawGetTopReactionsRequest} cache if * the bot flag is not set */ premium?: boolean; /** * Whether we installed the * attachment * menu web app offered by this bot. * * When updating the * local peer * database, do not apply changes to this field if the * min flag is set. */ attachMenuEnabled?: boolean; /** * Whether we can edit the profile picture, name, about text * and description of this bot because we own it. * * When updating the * local peer * database, do not apply changes to this field if the * min flag is set. * * Changes to this flag (if min is not set) should * invalidate the local {@link RawUserFull} cache for this user * ID. */ botCanEdit?: boolean; /** * Whether we marked this user as a * close * friend, see here » for more info. * * When updating the * local peer * database, do not apply changes to this field if the * min flag is set. */ closeFriend?: boolean; /** * Whether we have * hidden * » all active stories of this user. * * When updating the * local peer * database, do not apply changes to this field if the * min flag is set. */ storiesHidden?: boolean; /** * No stories from this user are visible. */ storiesUnavailable?: boolean; /** * See * here * for more info on this flag ». */ contactRequirePremium?: boolean; /** * Whether this bot can be * connected * to a user as specified here ». */ botBusiness?: boolean; /** * If set, this bot has configured a * Main * Mini App ». */ botHasMainApp?: boolean; botForumView?: boolean; botForumCanManageTopics?: boolean; /** * ID of the user, see * here * » for more info and the available ID range. */ id: number; /** * Access hash of the user, see * here * » for more info. * * If this flag is set, when updating the * local peer * database, generate a virtual flag called * min_access_hash, which is: * * - Set to true if min is set AND * * -- The phone flag is not set * OR * * -- The phone flag is set and the associated * phone number string is non-empty * * - Set to false otherwise. * * * * Then, apply both access_hash and * min_access_hash to the local database if: * * - min_access_hash is false OR * * - min_access_hash is true AND * * -- There is no locally cached object for this user OR * * -- There is no access_hash in the local cache * OR * * -- The cached object's min_access_hash is also * true * * * * If the final merged object stored to the database has the * min_access_hash field set to true, the related * access_hash is only suitable * to use in {@link RawInputPeerPhotoFileLocation}, to directly * download * the profile pictures of users, everywhere else a * inputPeer*FromMessage constructor will have to * be generated as specified * here ». * * Bots can also use min access hashes in some conditions, by * passing 0 instead of the min access hash. */ accessHash?: Long; /** * First name. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The min flag of the locally cached user * entry is set. */ firstName?: string; /** * Last name. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The min flag of the locally cached user * entry is set. */ lastName?: string; /** * Main active username. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The min flag of the locally cached user * entry is set. * * Changes to this flag should invalidate the local * {@link RawUserFull} cache for this user ID if the above * conditions are respected and the bot_can_edit * flag is also set. */ username?: string; /** * Phone number. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The min flag of the locally cached user * entry is set. */ phone?: string; /** * Profile picture of user. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The apply_min_photo flag is set OR * * -- The min flag of the locally cached user * entry is set. */ photo?: tl.TypeUserProfilePhoto; /** * Online status of user. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The min flag of the locally cached user * entry is set OR * * -- The locally cached user entry is equal to * {@link RawUserStatusEmpty}. */ status?: tl.TypeUserStatus; /** * Version of the {@link RawUserFull}, incremented every time * it changes. * * Changes to this flag should invalidate the local * {@link RawUserFull} cache for this user ID, see * here * » for more info. */ botInfoVersion?: number; /** * Contains the reason why access to this user must be * restricted. */ restrictionReason?: tl.TypeRestrictionReason[]; /** * Inline placeholder for this inline bot */ botInlinePlaceholder?: string; /** * Language code of the user */ langCode?: string; /** * Emoji * status */ emojiStatus?: tl.TypeEmojiStatus; /** * Additional usernames. * * When updating the * local peer * database, apply changes to this field only if: * * - The min flag is not set OR * * - The min flag is set AND * * -- The min flag of the locally cached user * entry is set. * * Changes to this flag (if the above conditions are respected) * should invalidate the local {@link RawUserFull} cache for * this user ID. */ usernames?: tl.TypeUsername[]; /** * ID of the maximum read * story. * * * When updating the * local peer * database, do not apply changes to this field if the * min flag of the incoming constructor is set. */ storiesMaxId?: tl.TypeRecentStory; /** * The user's * accent * color. */ color?: tl.TypePeerColor; /** * The user's * profile * color. */ profileColor?: tl.TypePeerColor; /** * Monthly Active Users (MAU) of this bot (may be absent for * small bots). */ botActiveUsers?: number; /** * Describes a * bot * verification icon ». */ botVerificationIcon?: Long; /** * If set, the user has enabled * paid * messages », we might need to pay the specified * amount of * Stars * to send them messages, depending on the configured * exceptions: check * {@link RawUserFull}.send_paid_messages_stars or * {@link users.RawGetRequirementsToContactRequest} to see if * the currently logged in user actually has to pay or not, see * here * » for the full flow. */ sendPaidMessagesStars?: Long; } /** * Profile photo has not been set, or was hidden. */ interface RawUserProfilePhotoEmpty { _: 'userProfilePhotoEmpty'; } /** * User profile photo. */ interface RawUserProfilePhoto { _: 'userProfilePhoto'; /** * Whether an * animated * profile picture is available for this user */ hasVideo?: boolean; /** * Whether this profile photo is only visible to us (i.e. it * was set using * {@link photos.RawUploadContactProfilePhotoRequest}). */ personal?: boolean; /** * Identifier of the respective photo */ photoId: Long; /** * Stripped * thumbnail */ strippedThumb?: Uint8Array; /** * DC ID where the photo is stored */ dcId: number; } /** * User status has not been set yet. */ interface RawUserStatusEmpty { _: 'userStatusEmpty'; } /** * Online status of the user. */ interface RawUserStatusOnline { _: 'userStatusOnline'; /** * Time to expiration of the current online status */ expires: number; } /** * The user's offline status. */ interface RawUserStatusOffline { _: 'userStatusOffline'; /** * Time the user was last seen online */ wasOnline: number; } /** * Online status: last seen recently */ interface RawUserStatusRecently { _: 'userStatusRecently'; /** * If set, the exact user status of this user is actually * available to us, but to view it we must first purchase a * Premium * subscription, or allow this user to see our exact * last online status. See {@link RawPrivacyKeyStatusTimestamp} * for more info. */ byMe?: boolean; } /** * Online status: last seen last week */ interface RawUserStatusLastWeek { _: 'userStatusLastWeek'; /** * If set, the exact user status of this user is actually * available to us, but to view it we must first purchase a * Premium * subscription, or allow this user to see our exact * last online status. See {@link RawPrivacyKeyStatusTimestamp} * for more info. */ byMe?: boolean; } /** * Online status: last seen last month */ interface RawUserStatusLastMonth { _: 'userStatusLastMonth'; /** * If set, the exact user status of this user is actually * available to us, but to view it we must first purchase a * Premium * subscription, or allow this user to see our exact * last online status. See {@link RawPrivacyKeyStatusTimestamp} * for more info. */ byMe?: boolean; } /** * Empty constructor, group doesn't exist */ interface RawChatEmpty { _: 'chatEmpty'; /** * Group identifier */ id: number; } /** * Info about a group. * * When updating the * local peer * database, all fields from the newly received constructor * take priority over the old constructor cached locally * (including by removing fields that aren't set in the new * constructor). * * See * here * » for an implementation of the logic to use when * updating the * local user * peer database. */ interface RawChat { _: 'chat'; /** * Whether the current user is the creator of the group */ creator?: boolean; /** * Whether the current user has left the group */ left?: boolean; /** * Whether the group was * migrated */ deactivated?: boolean; /** * Whether a group call is currently active */ callActive?: boolean; /** * Whether there's anyone in the group call */ callNotEmpty?: boolean; /** * Whether this group is * protected, * thus does not allow forwarding messages from it */ noforwards?: boolean; /** * ID of the group, see * here * » for more info and the available ID range. */ id: number; /** * Title */ title: string; /** * Chat photo */ photo: tl.TypeChatPhoto; /** * Participant count */ participantsCount: 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 * to a supergroup */ migratedTo?: tl.TypeInputChannel; /** * Admin * rights of the user in the group */ adminRights?: tl.TypeChatAdminRights; /** * Default * banned rights of all users in the group */ defaultBannedRights?: tl.TypeChatBannedRights; } /** * A group to which the user has no access. E.g., because the * user was kicked from the group. */ interface RawChatForbidden { _: 'chatForbidden'; /** * User identifier */ id: number; /** * Group name */ title: string; } /** * Channel/supergroup info * * When updating the * local peer * database, all fields from the newly received constructor * take priority over the old constructor cached locally * (including by removing fields that aren't set in the new * constructor). * * The only exception to the above rule is when the * min flag is set, in which case * only the following fields must be applied * over any locally stored version: * * See * here * » for an implementation of the logic to use when * updating the * local user * peer database. */ interface RawChannel { _: 'channel'; /** * Whether the current user is the creator of this channel */ creator?: boolean; /** * Whether the current user has left or is not a member of this * channel */ left?: boolean; /** * Is this a channel? */ broadcast?: boolean; /** * Is this channel verified by telegram? */ verified?: boolean; /** * Is this a supergroup? * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ megagroup?: boolean; /** * Whether viewing/writing in this channel for a reason (see * restriction_reason) */ restricted?: boolean; /** * Whether signatures are enabled (channels) */ signatures?: boolean; /** * See min */ min?: boolean; /** * This channel/supergroup is probably a scam * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ scam?: boolean; /** * Whether this channel has a linked * discussion * group » (or this supergroup is a channel's discussion * group). The actual ID of the linked channel/supergroup is * contained in * {@link RawChannelFull}.linked_chat_id. * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ hasLink?: boolean; /** * Whether this channel has a geo position */ hasGeo?: boolean; /** * Whether slow mode is enabled for groups to prevent flood in * chat. * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ slowmodeEnabled?: boolean; /** * Whether a group call or livestream is currently active */ callActive?: boolean; /** * Whether there's anyone in the group call or livestream */ callNotEmpty?: boolean; /** * If set, this * supergroup/channel * was reported by many users as a fake or scam: be careful * when interacting with it. * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ fake?: boolean; /** * Whether this * supergroup * is a gigagroup * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ gigagroup?: boolean; /** * Whether this channel or group is * protected, * thus does not allow forwarding messages from it */ noforwards?: boolean; /** * Whether a user needs to join the supergroup before they can * send messages: can be false only for * discussion * groups », toggle using * {@link channels.RawToggleJoinToSendRequest} * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ joinToSend?: boolean; /** * Whether a user's join request will have to be * approved * by administrators, toggle using * {@link channels.RawToggleJoinRequestRequest} * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ joinRequest?: boolean; /** * Whether this supergroup is a * forum. * * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ forum?: boolean; /** * Whether we have * hidden * all stories posted by this channel ». */ storiesHidden?: boolean; /** * 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 {@link channels.RawGetChannelsRequest} to obtain the * latest value of the stories_hidden flag. */ storiesHiddenMin?: boolean; /** * No stories from the channel are visible. */ storiesUnavailable?: boolean; /** * If set, messages sent by admins to this channel will link to * the admin's profile (just like with groups). */ signatureProfiles?: boolean; /** * If set, * autotranslation * was enabled for all users by the admin of the channel, as * specified * here * ». */ autotranslation?: boolean; /** * If set, this channel has an associated * monoforum * », and its ID is specified in the * linked_monoforum_id flag. */ broadcastMessagesAllowed?: boolean; /** * If set, this is a * monoforum * », and the ID of the associated channel is specified in * the linked_monoforum_id. */ monoforum?: boolean; /** * If * set, enables the tabbed forum UI ». */ forumTabs?: boolean; /** * ID of the channel, see * here * » for more info and the available ID range. */ id: number; /** * Access hash, see * here * » for more info */ accessHash?: Long; /** * Title */ title: string; /** * Main active username. */ username?: string; /** * Profile photo */ photo: tl.TypeChatPhoto; /** * 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. * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ restrictionReason?: tl.TypeRestrictionReason[]; /** * Admin rights of the user in this channel (see * rights) */ adminRights?: tl.TypeChatAdminRights; /** * Banned rights of the user in this channel (see * rights) */ bannedRights?: tl.TypeChatBannedRights; /** * Default chat rights (see * rights) */ defaultBannedRights?: tl.TypeChatBannedRights; /** * Participant count */ participantsCount?: number; /** * Additional usernames */ usernames?: tl.TypeUsername[]; /** * ID of the maximum read * story. */ storiesMaxId?: tl.TypeRecentStory; /** * The channel's * accent * color. */ color?: tl.TypePeerColor; /** * The channel's * profile * color. */ profileColor?: tl.TypePeerColor; /** * Emoji * status */ emojiStatus?: tl.TypeEmojiStatus; /** * Boost * level. * * Changes to this flag should invalidate the local * {@link RawChannelFull} cache for this channel/supergroup ID, * see * here * » for more info. */ level?: number; /** * Expiration date of the * Telegram * Star subscription » the current user has bought to gain * access to this channel. */ subscriptionUntilDate?: number; /** * Describes a * bot * verification icon ». */ botVerificationIcon?: Long; /** * If set, this supergroup or * monoforum * has enabled * paid * messages », we might need to pay the specified * amount of * Stars * to send messages to it, depending on the configured * exceptions: check * {@link RawChannelFull}.send_paid_messages_stars * to see if the currently logged in user actually has to pay * or not, see * here * » for the full flow (only set for the monoforum, not the * associated channel). */ sendPaidMessagesStars?: Long; /** * For channels with associated * monoforums, * the * monoforum * ID. For * Monoforums, * the ID of the associated channel. */ linkedMonoforumId?: number; } /** * Indicates a channel/supergroup we can't access because we * were banned, or for some other reason. */ interface RawChannelForbidden { _: 'channelForbidden'; /** * Is this a channel */ broadcast?: boolean; /** * Is this a supergroup */ megagroup?: boolean; monoforum?: boolean; /** * Channel ID */ id: number; /** * Access hash */ accessHash: Long; /** * Title */ title: string; /** * The ban is valid until the specified date */ untilDate?: number; } /** * Full info about a * basic * group. * * When updating the * local peer * database », all fields from the newly received * constructor take priority over the old constructor cached * locally (including by removing fields that aren't set in the * new constructor). */ interface RawChatFull { _: 'chatFull'; /** * Can we change the username of this chat */ canSetUsername?: boolean; /** * Whether * scheduled * messages are available */ hasScheduled?: boolean; /** * Whether the * real-time * chat translation popup should be hidden. */ translationsDisabled?: boolean; /** * ID of the chat */ id: number; /** * About string for this chat */ about: string; /** * Participant list */ participants: tl.TypeChatParticipants; /** * Chat photo */ chatPhoto?: tl.TypePhoto; /** * Notification settings */ notifySettings: tl.TypePeerNotifySettings; /** * Chat invite */ exportedInvite?: tl.TypeExportedChatInvite; /** * Info about bots that are in this chat */ botInfo?: tl.TypeBotInfo[]; /** * Message ID of the last * pinned * message */ pinnedMsgId?: number; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Group call information */ call?: tl.TypeInputGroupCall; /** * Time-To-Live of messages sent by the current user to this * chat */ ttlPeriod?: number; /** * When using {@link phone.RawGetGroupCallJoinAsRequest} 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. */ groupcallDefaultJoinAs?: tl.TypePeer; /** * Emoji representing a specific chat theme */ themeEmoticon?: string; /** * Pending * join * requests » */ requestsPending?: number; /** * IDs of users who requested to join recently */ recentRequesters?: Long[]; /** * Allowed * message * reactions » */ availableReactions?: tl.TypeChatReactions; /** * This flag may be used to impose a custom limit of unique * reactions (i.e. a customizable version of * appConfig.reactions_uniq_max). */ reactionsLimit?: number; } /** * Full info about a * channel, * supergroup * or * gigagroup. * * When updating the * local peer * database », all fields from the newly received * constructor take priority over the old constructor cached * locally (including by removing fields that aren't set in the * new constructor). */ interface RawChannelFull { _: 'channelFull'; /** * Can we view the participant list? */ canViewParticipants?: boolean; /** * Can we set the channel's username? */ canSetUsername?: boolean; /** * Can we {@link channels.RawSetStickersRequest} a stickerpack * to the supergroup? */ canSetStickers?: boolean; /** * Is the history before we joined hidden to us? */ hiddenPrehistory?: boolean; /** * Can we set the geolocation of this group (for geogroups) */ canSetLocation?: boolean; /** * Whether scheduled messages are available */ hasScheduled?: boolean; /** * Can the user view * channel/supergroup * statistics */ canViewStats?: boolean; /** * 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 */ blocked?: boolean; /** * Can we delete this channel? */ canDeleteChannel?: boolean; /** * Whether * native * antispam functionality is enabled in this supergroup. */ antispam?: boolean; /** * Whether the participant list is hidden. */ participantsHidden?: boolean; /** * Whether the * real-time * chat translation popup should be hidden. */ translationsDisabled?: boolean; /** * Whether this user has some * pinned * stories. */ storiesPinnedAvailable?: boolean; /** * Users may also choose to display messages from all topics of * a * 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 * {@link channels.RawToggleViewForumAsMessagesRequest} method; * invoking this method will update the value of this flag. */ viewForumAsMessages?: boolean; /** * Whether ads on this channel were * disabled * as specified here » (this flag is only visible to the * owner of the channel). */ restrictedSponsored?: boolean; /** * If set, this user can view * ad * revenue statistics » for this channel. */ canViewRevenue?: boolean; /** * Whether the current user can send or forward * paid * media » to this channel. */ paidMediaAllowed?: boolean; /** * If set, this user can view * Telegram * Star revenue statistics » for this channel. */ canViewStarsRevenue?: boolean; /** * If set, users may send * paid * Telegram Star reactions » to messages of this channel. */ paidReactionsAvailable?: boolean; /** * If set, users may send * Gifts * » to this channel. */ stargiftsAvailable?: boolean; /** * If set, admins may * enable * enable paid messages » in this supergroup. */ paidMessagesAvailable?: boolean; /** * ID of the channel */ id: number; /** * Info about the channel */ about: string; /** * Number of participants of the channel */ participantsCount?: number; /** * Number of channel admins */ adminsCount?: number; /** * Number of users * kicked * from the channel */ kickedCount?: number; /** * Number of users * banned * from the channel */ bannedCount?: number; /** * Number of users currently online */ onlineCount?: number; /** * Position up to which all incoming messages are read. */ readInboxMaxId: number; /** * Position up to which all outgoing messages are read. */ readOutboxMaxId: number; /** * Count of unread messages */ unreadCount: number; /** * Channel picture */ chatPhoto: tl.TypePhoto; /** * Notification settings */ notifySettings: tl.TypePeerNotifySettings; /** * Invite link */ exportedInvite?: tl.TypeExportedChatInvite; /** * Info about bots in the channel/supergroup */ botInfo: tl.TypeBotInfo[]; /** * The chat ID from which this group was * migrated */ migratedFromChatId?: Long; /** * The message ID in the original chat at which this group was * migrated */ migratedFromMaxId?: number; /** * Message ID of the last * pinned * message */ pinnedMsgId?: number; /** * Associated stickerset */ stickerset?: tl.TypeStickerSet; /** * Identifier of a maximum unavailable message in a channel due * to hidden history. */ availableMinId?: number; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * ID of the linked * discussion * chat for channels (and vice versa, the ID of the linked * channel for discussion chats). */ linkedChatId?: number; /** * Location of the geo group */ location?: tl.TypeChannelLocation; /** * If specified, users in supergroups will only be able to send * one message every slowmode_seconds seconds */ slowmodeSeconds?: number; /** * Indicates when the user will be allowed to send another * message in the supergroup (unixtime) */ slowmodeNextSendDate?: number; /** * If set, specifies the DC to use for fetching channel * statistics */ statsDc?: number; /** * Latest * PTS * for this channel */ pts: number; /** * Livestream or group call information */ call?: tl.TypeInputGroupCall; /** * Time-To-Live of messages in this channel or supergroup */ ttlPeriod?: number; /** * A list of * suggested * actions for the supergroup admin, * see * here for more info ». */ pendingSuggestions?: string[]; /** * When using {@link phone.RawGetGroupCallJoinAsRequest} 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. */ groupcallDefaultJoinAs?: tl.TypePeer; /** * Emoji representing a specific chat theme */ themeEmoticon?: string; /** * Pending * join * requests » */ requestsPending?: number; /** * IDs of users who requested to join recently */ recentRequesters?: number[]; /** * Default peer used for sending messages to this channel */ defaultSendAs?: tl.TypePeer; /** * Allowed * message * reactions » */ availableReactions?: tl.TypeChatReactions; /** * This flag may be used to impose a custom limit of unique * reactions (i.e. a customizable version of * appConfig.reactions_uniq_max). */ reactionsLimit?: number; /** * Channel * stories */ stories?: tl.TypePeerStories; /** * Wallpaper */ wallpaper?: tl.TypeWallPaper; /** * The number of * boosts * the current user has applied to the current * supergroup. */ boostsApplied?: number; /** * The number of * boosts * this supergroup requires to bypass slowmode and * other restrictions, see * here * » for more info. */ boostsUnrestrict?: number; /** * Custom * emoji stickerset associated to the current * supergroup, set using * {@link channels.RawSetEmojiStickersRequest} after reaching * the appropriate boost level, see * here * » for more info. */ emojiset?: tl.TypeStickerSet; /** * Bot * verification icon */ botVerification?: tl.TypeBotVerification; /** * Admins with * {@link RawChatAdminRights}.post_messages rights * will see the total number of received gifts, everyone else * will see the number of gifts added to the channel's profile. */ stargiftsCount?: number; /** * If set and bigger than 0, this supergroup, * monoforum * or the monoforum associated to this channel has enabled * paid * messages » and we must pay the specified amount * of * Stars * to send messages to it, see * here * » for the full flow. * * This flag will be set both for the monoforum and for * {@link RawChannelFull} of the associated channel). * * If set and equal to 0, the monoforum requires payment in * general but we were exempted from paying. */ sendPaidMessagesStars?: Long; /** * The main tab for the channel's profile, see * here * » for more info. */ mainTab?: tl.TypeProfileTab; } /** * Group member. */ interface RawChatParticipant { _: 'chatParticipant'; /** * Member user ID */ userId: number; /** * ID of the user that added the member to the group */ inviterId: number; /** * Date added to the group */ date: number; rank?: string; } /** * Represents the creator of the group */ interface RawChatParticipantCreator { _: 'chatParticipantCreator'; /** * ID of the user that created the group */ userId: number; rank?: string; } /** * Chat admin */ interface RawChatParticipantAdmin { _: 'chatParticipantAdmin'; /** * ID of a group member that is admin */ userId: number; /** * ID of the user that added the member to the group */ inviterId: number; /** * Date when the user was added */ date: number; rank?: string; } /** * Info on members is unavailable */ interface RawChatParticipantsForbidden { _: 'chatParticipantsForbidden'; /** * Group ID */ chatId: number; /** * Info about the group membership of the current user */ selfParticipant?: tl.TypeChatParticipant; } /** * Group members. */ interface RawChatParticipants { _: 'chatParticipants'; /** * Group identifier */ chatId: number; /** * List of group members */ participants: tl.TypeChatParticipant[]; /** * Group version number */ version: number; } /** * Group photo is not set. */ interface RawChatPhotoEmpty { _: 'chatPhotoEmpty'; } /** * Group profile photo. */ interface RawChatPhoto { _: 'chatPhoto'; /** * Whether the user has an animated profile picture */ hasVideo?: boolean; /** * Photo ID */ photoId: Long; /** * Stripped * thumbnail */ strippedThumb?: Uint8Array; /** * DC where this photo is stored */ dcId: number; } /** * Empty constructor, non-existent message. */ interface RawMessageEmpty { _: 'messageEmpty'; /** * Message identifier */ id: number; /** * Peer ID, the chat where this message was sent */ peerId?: tl.TypePeer; } /** * A message */ interface RawMessage { _: 'message'; /** * Is this an outgoing message */ out?: boolean; /** * Whether we were * mentioned * in this message */ mentioned?: boolean; /** * Whether there are unread media attachments in this message */ mediaUnread?: boolean; /** * Whether this is a silent message (no notification triggered) */ silent?: boolean; /** * Whether this is a channel post */ post?: boolean; /** * Whether this is a * scheduled * message */ fromScheduled?: boolean; /** * This is a legacy message: it has to be refetched with the * new layer */ legacy?: boolean; /** * Whether the message should be shown as not modified to the * user, even if an edit date is present */ editHide?: boolean; /** * Whether this message is * pinned */ pinned?: boolean; /** * Whether this message is * protected * 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?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * If set, the message was sent because of a scheduled action * by the message sender, for example, as away, or a greeting * service message. */ offline?: boolean; /** * The video contained in the message is currently being * processed by the server (i.e. to generate alternative * qualities, that will be contained in the final * {@link RawMessageMediaDocument}.alt_document), * and will be sent once the video is processed, which will * happen approximately at the specified date * (i.e. messages with this flag set should be treated * similarly to * scheduled * messages, but instead of the scheduled date, * date contains the estimated conversion date). * * See * here * » for more info. */ videoProcessingPending?: boolean; /** * Set if this is a * suggested * channel post » that was paid using * Telegram * Stars. */ paidSuggestedPostStars?: boolean; /** * Set if this is a * suggested * channel post » that was paid using Toncoins. */ paidSuggestedPostTon?: boolean; /** * ID of the message */ id: number; /** * ID of the sender of the message */ fromId?: tl.TypePeer; /** * Supergroups only, contains the number of * boosts * this user has given the current supergroup, and should be * shown in the UI in the header of the message. * * Only present for incoming messages from non-anonymous * supergroup members that have boosted the supergroup. * * Note that this counter should be locally overridden for * non-anonymous outgoing messages, according to the * current value of * {@link RawChannelFull}.boosts_applied, to * ensure the value is correct even for messages sent by the * current user before a supergroup was boosted (or after a * boost has expired or the number of boosts has changed); do * not update this value for incoming messages from other * users, even if their boosts have changed. */ fromBoostsApplied?: number; fromRank?: string; /** * Peer ID, the chat where this message was sent */ peerId: tl.TypePeer; /** * Messages from a * saved * messages dialog » will have * peer={@link RawInputPeerSelf} and the * saved_peer_id flag set to the ID of the saved * dialog. * * Messages from a * monoforum * » will have peer=ID of the monoforum and * the saved_peer_id flag set to the ID of a * topic. */ savedPeerId?: tl.TypePeer; /** * Info about forwarded messages */ fwdFrom?: tl.TypeMessageFwdHeader; /** * ID of the inline bot that generated the message */ viaBotId?: number; /** * Whether the message was sent by the * business * bot specified in via_bot_id on behalf of * the user. */ viaBusinessBotId?: number; /** * Reply information */ replyTo?: tl.TypeMessageReplyHeader; /** * Date of the message */ date: number; /** * The message */ message: string; /** * Media attachment */ media?: tl.TypeMessageMedia; /** * Reply markup (bot/inline keyboards) */ replyMarkup?: tl.TypeReplyMarkup; /** * Message * entities * for styled text */ entities?: tl.TypeMessageEntity[]; /** * View count for channel posts */ views?: number; /** * Forward counter */ forwards?: number; /** * Info about * post * comments (for channels) or message replies (for groups) */ replies?: tl.TypeMessageReplies; /** * Last edit date of this message */ editDate?: number; /** * Name of the author of this message for channel posts (with * signatures enabled) */ postAuthor?: string; /** * Multiple media messages sent using * {@link messages.RawSendMultiMediaRequest} with the same * grouped ID indicate an * album * or media group */ groupedId?: Long; /** * Reactions to this message */ reactions?: tl.TypeMessageReactions; /** * Contains the reason why access to this message must be * restricted. */ restrictionReason?: tl.TypeRestrictionReason[]; /** * 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. */ ttlPeriod?: number; /** * If set, this message is a * quick * reply shortcut message » (note that quick reply shortcut * messages sent to a private chat will not * have this field set). */ quickReplyShortcutId?: number; /** * A * message * effect that should be played as specified here ». */ effect?: Long; /** * Represents a * fact-check * ». */ factcheck?: tl.TypeFactCheck; /** * Used for * Telegram * Gateway verification messages: if set and the current * unixtime is bigger than the specified unixtime, invoke * {@link messages.RawReportMessagesDeliveryRequest} passing * the ID and the peer of this message as soon as it is * received by the client (optionally batching requests for the * same peer). */ reportDeliveryUntilDate?: number; /** * The amount of stars the sender has paid to * send the message, see * here * » for more info. */ paidMessageStars?: Long; /** * Used to * suggest * a post to a channel, see here » for more info on the * full flow. */ suggestedPost?: tl.TypeSuggestedPost; scheduleRepeatPeriod?: number; summaryFromLanguage?: string; } /** * Indicates a service message */ interface RawMessageService { _: 'messageService'; /** * Whether the message is outgoing */ out?: boolean; /** * Whether we were mentioned in the message */ mentioned?: boolean; /** * Whether the message contains unread media */ mediaUnread?: boolean; /** * Whether you can * react * to this message ». */ reactionsArePossible?: boolean; /** * Whether the message is silent */ silent?: boolean; /** * Whether it's a channel post */ post?: boolean; /** * This is a legacy message: it has to be refetched with the * new layer */ legacy?: boolean; /** * Message ID */ id: number; /** * ID of the sender of this message */ fromId?: tl.TypePeer; /** * Sender of service message */ peerId: tl.TypePeer; /** * Will only be set for service messages within a * monoforum * topic »: peer will be equal to the ID of * the monoforum and the saved_peer_id flag will * be set to the ID of a topic. */ savedPeerId?: tl.TypePeer; /** * Reply (thread) information */ replyTo?: tl.TypeMessageReplyHeader; /** * Message date */ date: number; /** * Event connected with the service message */ action: tl.TypeMessageAction; /** * Reactions * ». */ reactions?: tl.TypeMessageReactions; /** * 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. */ ttlPeriod?: number; } /** * Empty constructor. */ interface RawMessageMediaEmpty { _: 'messageMediaEmpty'; } /** * Attached photo. */ interface RawMessageMediaPhoto { _: 'messageMediaPhoto'; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * Photo */ photo?: tl.TypePhoto; /** * Time to live in seconds of self-destructing photo */ ttlSeconds?: number; } /** * Attached map. */ interface RawMessageMediaGeo { _: 'messageMediaGeo'; /** * GeoPoint */ geo: tl.TypeGeoPoint; } /** * Attached contact. */ interface RawMessageMediaContact { _: 'messageMediaContact'; /** * Phone number */ phoneNumber: string; /** * Contact's first name */ firstName: string; /** * Contact's last name */ lastName: string; /** * VCARD of contact */ vcard: string; /** * User identifier or 0, if the user with the * given phone number is not registered */ userId: number; } /** * Current version of the client does not support this media * type. */ interface RawMessageMediaUnsupported { _: 'messageMediaUnsupported'; } /** * Document (video, audio, voice, sticker, any media type * except photo) */ interface RawMessageMediaDocument { _: 'messageMediaDocument'; /** * Whether this is a normal sticker, if not set this is a * premium sticker and a premium sticker animation must be * played. */ nopremium?: boolean; /** * Whether this media should be hidden behind a spoiler warning */ spoiler?: boolean; /** * Whether this is a video. */ video?: boolean; /** * Whether this is a round video. */ round?: boolean; /** * Whether this is a voice message. */ voice?: boolean; /** * Attached document */ document?: tl.TypeDocument; /** * Videos only, contains alternative qualities of the video. */ altDocuments?: tl.TypeDocument[]; /** * Custom video cover. */ videoCover?: tl.TypePhoto; /** * Start playing the video at the specified timestamp * (seconds). */ videoTimestamp?: number; /** * Time to live of self-destructing document */ ttlSeconds?: number; } /** * Preview of webpage */ interface RawMessageMediaWebPage { _: 'messageMediaWebPage'; /** * If set, specifies that a large media preview should be used. */ forceLargeMedia?: boolean; /** * If set, specifies that a small media preview should be used. */ forceSmallMedia?: boolean; /** * If set, indicates that the URL used for the webpage preview * was specified manually using {@link RawInputMediaWebPage}, * and may not be related to any of the URLs specified in the * message. */ manual?: boolean; /** * 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?: boolean; /** * Webpage preview */ webpage: tl.TypeWebPage; } /** * Venue */ interface RawMessageMediaVenue { _: 'messageMediaVenue'; /** * Geolocation of venue */ geo: tl.TypeGeoPoint; /** * 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 */ venueId: string; /** * Venue type in the provider's database */ venueType: string; } /** * Telegram game */ interface RawMessageMediaGame { _: 'messageMediaGame'; /** * Game */ game: tl.TypeGame; } /** * Invoice */ interface RawMessageMediaInvoice { _: 'messageMediaInvoice'; /** * Whether the shipping address was requested */ shippingAddressRequested?: boolean; /** * Whether this is an example invoice */ test?: boolean; /** * 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?: tl.TypeWebDocument; /** * Message ID of receipt: if set, clients should change the * text of the first {@link RawKeyboardButtonBuy} button always * attached to the {@link RawMessage} to a localized version of * the word Receipt */ receiptMsgId?: number; /** * Three-letter ISO 4217 * currency * code, or XTR for * Telegram * Stars. */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; /** * Unique bot deep-linking parameter that can be used to * generate this invoice */ startParam: string; /** * Deprecated */ extendedMedia?: tl.TypeMessageExtendedMedia; } /** * Indicates a * live * geolocation */ interface RawMessageMediaGeoLive { _: 'messageMediaGeoLive'; /** * Geolocation */ geo: tl.TypeGeoPoint; /** * For * live * locations, a direction in which the location moves, in * degrees; 1-360 */ heading?: number; /** * Validity period of provided geolocation */ period: number; /** * For * live * locations, a maximum distance to another chat member for * proximity alerts, in meters (0-100000). */ proximityNotificationRadius?: number; } /** * Poll */ interface RawMessageMediaPoll { _: 'messageMediaPoll'; /** * The poll */ poll: tl.TypePoll; /** * The results of the poll */ results: tl.TypePollResults; } /** * Dice-based * animated sticker */ interface RawMessageMediaDice { _: 'messageMediaDice'; /** * Dice * value */ value: number; /** * The emoji, for now 🏀, 🎲 and 🎯 are supported */ emoticon: string; gameOutcome?: tl.messages.TypeEmojiGameOutcome; } /** * Represents a forwarded * story * or a story mention. */ interface RawMessageMediaStory { _: 'messageMediaStory'; /** * 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). */ viaMention?: boolean; /** * Peer that posted the story. */ peer: tl.TypePeer; /** * Story ID */ id: number; /** * The story itself, if absent fetch it using * {@link stories.RawGetStoriesByIDRequest} and the * peer/id parameters specified * above. */ story?: tl.TypeStoryItem; } /** * Contains info about a * giveaway, * see here » for more info. */ interface RawMessageMediaGiveaway { _: 'messageMediaGiveaway'; /** * If set, only new subscribers starting from the giveaway * creation date will be able to participate to the giveaway. */ onlyNewSubscribers?: boolean; /** * If set, giveaway winners are public and will be listed in a * {@link RawMessageMediaGiveawayResults} message that will be * automatically sent to the channel once the giveaway ends. */ winnersAreVisible?: boolean; /** * The channels that the user must join to participate in the * giveaway. */ channels: number[]; /** * 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. */ countriesIso2?: string[]; /** * Can contain a textual description of additional giveaway * prizes. */ prizeDescription?: string; /** * Number of * Telegram * Premium subscriptions given away. */ quantity: number; /** * Duration in months of each * Telegram * Premium subscription in the giveaway. */ months?: number; /** * For * Telegram * Star giveaways, the total number of Telegram Stars being * given away. */ stars?: Long; /** * The end date of the giveaway. */ untilDate: number; } /** * A * giveaway * with public winners has finished, this constructor contains * info about the winners. */ interface RawMessageMediaGiveawayResults { _: 'messageMediaGiveawayResults'; /** * If set, only new subscribers starting from the giveaway * creation date participated in the giveaway. */ onlyNewSubscribers?: boolean; /** * If set, the giveaway was canceled and was fully refunded. */ refunded?: boolean; /** * ID of the channel/supergroup that was automatically * boosted * by the winners of the giveaway for duration of the Premium * subscription. */ channelId: Long; /** * Number of other channels that participated in the giveaway. */ additionalPeersCount?: number; /** * Identifier of the message with the giveaway in * channel_id. */ launchMsgId: number; /** * Total number of winners in the giveaway. */ winnersCount: number; /** * Number of not-yet-claimed prizes. */ unclaimedCount: number; /** * Up to 100 user identifiers of the winners of the giveaway. */ winners: Long[]; /** * Duration in months of each * Telegram * Premium subscription in the giveaway. */ months?: number; /** * For * Telegram * Star giveaways, the total number of Telegram Stars being * given away. */ stars?: Long; /** * Can contain a textual description of additional giveaway * prizes. */ prizeDescription?: string; /** * Point in time (UNIX timestamp in seconds) when the winners * were selected. May be bigger than winners selection date * specified in initial parameters of the giveaway. */ untilDate: number; } /** * Paid * media, see here » for more info. */ interface RawMessageMediaPaidMedia { _: 'messageMediaPaidMedia'; /** * The price of the media in * Telegram * Stars. */ starsAmount: Long; /** * Either the paid-for media, or super low resolution media * previews if the media wasn't purchased yet, * see * here » for more info. */ extendedMedia: tl.TypeMessageExtendedMedia[]; } /** * Represents a * todo list * ». */ interface RawMessageMediaToDo { _: 'messageMediaToDo'; /** * The todo list. */ todo: tl.TypeTodoList; /** * Completed items. */ completions?: tl.TypeTodoCompletion[]; } interface RawMessageMediaVideoStream { _: 'messageMediaVideoStream'; rtmpStream?: boolean; call: tl.TypeInputGroupCall; } /** * Empty constructor. */ interface RawMessageActionEmpty { _: 'messageActionEmpty'; } /** * Group created */ interface RawMessageActionChatCreate { _: 'messageActionChatCreate'; /** * Group name */ title: string; /** * List of group members */ users: number[]; } /** * Group name changed. */ interface RawMessageActionChatEditTitle { _: 'messageActionChatEditTitle'; /** * New group name */ title: string; } /** * Group profile changed */ interface RawMessageActionChatEditPhoto { _: 'messageActionChatEditPhoto'; /** * New group profile photo */ photo: tl.TypePhoto; } /** * Group profile photo removed. */ interface RawMessageActionChatDeletePhoto { _: 'messageActionChatDeletePhoto'; } /** * New member in the group */ interface RawMessageActionChatAddUser { _: 'messageActionChatAddUser'; /** * Users that were invited to the chat */ users: number[]; } /** * User left the group. */ interface RawMessageActionChatDeleteUser { _: 'messageActionChatDeleteUser'; /** * Leaving user ID */ userId: number; } /** * A user joined the chat via an invite link */ interface RawMessageActionChatJoinedByLink { _: 'messageActionChatJoinedByLink'; /** * ID of the user that created the invite link */ inviterId: number; } /** * The channel was created */ interface RawMessageActionChannelCreate { _: 'messageActionChannelCreate'; /** * Original channel/supergroup title */ title: string; } /** * Indicates the chat was * migrated * to the specified supergroup */ interface RawMessageActionChatMigrateTo { _: 'messageActionChatMigrateTo'; /** * The supergroup it was migrated to */ channelId: number; } /** * Indicates the channel was * migrated * from the specified chat */ interface RawMessageActionChannelMigrateFrom { _: 'messageActionChannelMigrateFrom'; /** * The old chat title */ title: string; /** * The old chat ID */ chatId: number; } /** * A message was pinned */ interface RawMessageActionPinMessage { _: 'messageActionPinMessage'; } /** * Chat history was cleared */ interface RawMessageActionHistoryClear { _: 'messageActionHistoryClear'; } /** * Someone scored in a game */ interface RawMessageActionGameScore { _: 'messageActionGameScore'; /** * Game ID */ gameId: Long; /** * Score */ score: number; } /** * A user just sent a payment to me (a bot) */ interface RawMessageActionPaymentSentMe { _: 'messageActionPaymentSentMe'; /** * Whether this is the first payment of a recurring payment we * just subscribed to */ recurringInit?: boolean; /** * Whether this payment is part of a recurring payment */ recurringUsed?: boolean; /** * Three-letter ISO 4217 * currency * code, or XTR for * Telegram * Stars. */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; /** * Bot specified invoice payload */ payload: Uint8Array; /** * Order info provided by the user */ info?: tl.TypePaymentRequestedInfo; /** * Identifier of the shipping option chosen by the user */ shippingOptionId?: string; /** * Provider payment identifier */ charge: tl.TypePaymentCharge; /** * Expiration date of the * Telegram * Star subscription ». */ subscriptionUntilDate?: number; } /** * A payment was sent */ interface RawMessageActionPaymentSent { _: 'messageActionPaymentSent'; /** * Whether this is the first payment of a recurring payment we * just subscribed to */ recurringInit?: boolean; /** * Whether this payment is part of a recurring payment */ recurringUsed?: boolean; /** * Three-letter ISO 4217 * currency * code, or XTR for * Telegram * Stars. */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; /** * An invoice slug taken from an * invoice * deep link or from the * premium_invoice_slug * app config parameter » */ invoiceSlug?: string; /** * Expiration date of the * Telegram * Star subscription ». */ subscriptionUntilDate?: number; } /** * A phone call */ interface RawMessageActionPhoneCall { _: 'messageActionPhoneCall'; /** * Is this a video call? */ video?: boolean; /** * Call ID */ callId: Long; /** * If the call has ended, the reason why it ended */ reason?: tl.TypePhoneCallDiscardReason; /** * Duration of the call in seconds */ duration?: number; } /** * A screenshot of the chat was taken */ interface RawMessageActionScreenshotTaken { _: 'messageActionScreenshotTaken'; } /** * Custom action (most likely not supported by the current * layer, an upgrade might be needed) */ interface RawMessageActionCustomAction { _: 'messageActionCustomAction'; /** * Action message */ message: string; } /** * We have given the bot permission to send us direct messages. * * The optional fields specify how did we authorize the bot to * send us messages. */ interface RawMessageActionBotAllowed { _: 'messageActionBotAllowed'; /** * We have authorized the bot to send us messages by installing * the bot's * attachment * menu. */ attachMenu?: boolean; /** * We have allowed the bot to send us messages using * {@link bots.RawAllowSendMessageRequest}. */ fromRequest?: boolean; /** * We have authorized the bot to send us messages by logging * into a website via * Telegram * 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. */ app?: tl.TypeBotApp; } /** * Secure * telegram * passport values were received */ interface RawMessageActionSecureValuesSentMe { _: 'messageActionSecureValuesSentMe'; /** * Vector with information about documents and other Telegram * Passport elements that were shared with the bot */ values: tl.TypeSecureValue[]; /** * Encrypted credentials required to decrypt the data */ credentials: tl.TypeSecureCredentialsEncrypted; } /** * Request for secure * telegram * passport values was sent */ interface RawMessageActionSecureValuesSent { _: 'messageActionSecureValuesSent'; /** * Secure value types */ types: tl.TypeSecureValueType[]; } /** * A contact just signed up to telegram */ interface RawMessageActionContactSignUp { _: 'messageActionContactSignUp'; } /** * A user of the chat is now in proximity of another user */ interface RawMessageActionGeoProximityReached { _: 'messageActionGeoProximityReached'; /** * The user or chat that is now in proximity of * to_id */ fromId: tl.TypePeer; /** * The user or chat that subscribed to * live * geolocation proximity alerts */ toId: tl.TypePeer; /** * Distance, in meters (0-100000) */ distance: number; } /** * The group call has ended */ interface RawMessageActionGroupCall { _: 'messageActionGroupCall'; /** * Group call */ call: tl.TypeInputGroupCall; /** * Group call duration */ duration?: number; } /** * A set of users was invited to the group call */ interface RawMessageActionInviteToGroupCall { _: 'messageActionInviteToGroupCall'; /** * The group call */ call: tl.TypeInputGroupCall; /** * The invited users */ users: number[]; } /** * The Time-To-Live of messages in this chat was changed. */ interface RawMessageActionSetMessagesTTL { _: 'messageActionSetMessagesTTL'; /** * 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 * {@link messages.RawSetDefaultHistoryTTLRequest}. 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. */ autoSettingFrom?: Long; } /** * A group call was scheduled */ interface RawMessageActionGroupCallScheduled { _: 'messageActionGroupCallScheduled'; /** * The group call */ call: tl.TypeInputGroupCall; /** * When is this group call scheduled to start */ scheduleDate: number; } /** * The chat theme was changed */ interface RawMessageActionSetChatTheme { _: 'messageActionSetChatTheme'; /** * The new chat theme. */ theme: tl.TypeChatTheme; } /** * A user was accepted into the group by an admin */ interface RawMessageActionChatJoinedByRequest { _: 'messageActionChatJoinedByRequest'; } /** * Data from an opened * reply * keyboard bot mini app was relayed to the bot that owns * it (bot side service message). */ interface RawMessageActionWebViewDataSentMe { _: 'messageActionWebViewDataSentMe'; /** * Text of the {@link RawKeyboardButtonSimpleWebView} that was * pressed to open the web app. */ text: string; /** * Relayed data. */ data: string; } /** * Data from an opened * reply * keyboard bot mini app was relayed to the bot that owns * it (user side service message). * * Clients should display a service message with the text * Data from the «$text» button was transferred to the * bot. */ interface RawMessageActionWebViewDataSent { _: 'messageActionWebViewDataSent'; /** * Text of the {@link RawKeyboardButtonSimpleWebView} that was * pressed to open the web app. */ text: string; } /** * Info about a gifted Telegram Premium subscription * * This service message should be displayed below the * appropriate sticker from the * {@link RawInputStickerSetPremiumGifts} * stickerset * »: */ interface RawMessageActionGiftPremium { _: 'messageActionGiftPremium'; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; days: number; /** * If the gift was bought using a cryptocurrency, the * cryptocurrency name. */ cryptoCurrency?: string; /** * If the gift was bought using a cryptocurrency, price of the * gift in the smallest units of a cryptocurrency. */ cryptoAmount?: Long; /** * Message attached with the gift */ message?: tl.TypeTextWithEntities; } /** * A * forum * topic was created. */ interface RawMessageActionTopicCreate { _: 'messageActionTopicCreate'; titleMissing?: boolean; /** * 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. */ iconColor: number; /** * ID of the * custom * emoji used as topic icon. */ iconEmojiId?: Long; } /** * Forum * topic information was edited. */ interface RawMessageActionTopicEdit { _: 'messageActionTopicEdit'; /** * New topic title. */ title?: string; /** * ID of the new * custom * emoji used as topic icon, or if it was removed. */ iconEmojiId?: Long; /** * 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; } /** * A new profile picture was suggested using * {@link photos.RawUploadContactProfilePhotoRequest}. */ interface RawMessageActionSuggestProfilePhoto { _: 'messageActionSuggestProfilePhoto'; /** * The photo that the user suggested we set as profile picture. */ photo: tl.TypePhoto; } /** * Contains info about one or more peers that the we (the user) * shared with the bot after clicking on a * {@link RawKeyboardButtonRequestPeer} button (service message * sent by the user). */ interface RawMessageActionRequestedPeer { _: 'messageActionRequestedPeer'; /** * button_id contained in the * {@link RawKeyboardButtonRequestPeer} */ buttonId: number; /** * The shared peers */ peers: tl.TypePeer[]; } /** * The * wallpaper * » of the current chat was changed. */ interface RawMessageActionSetChatWallPaper { _: 'messageActionSetChatWallPaper'; /** * If set, indicates the user applied a * wallpaper * » previously sent by the other user in a * {@link RawMessageActionSetChatWallPaper} message. */ same?: boolean; /** * 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 * {@link messages.RawSetChatWallPaperRequest}, providing only * the revert flag (and obviously the * peer parameter). */ forBoth?: boolean; /** * New * wallpaper */ wallpaper: tl.TypeWallPaper; } /** * Contains a * Telegram * Premium giftcode link. */ interface RawMessageActionGiftCode { _: 'messageActionGiftCode'; /** * If set, this gift code was received from a * giveaway * » started by a channel/supergroup we're subscribed to. */ viaGiveaway?: boolean; /** * If set, the link was not * redeemed * yet. */ unclaimed?: boolean; /** * Identifier of the channel/supergroup that created the gift * code * either * directly or through a giveaway: if we import this * giftcode link, we will also automatically * boost * this channel/supergroup. */ boostPeer?: tl.TypePeer; days: number; /** * Slug of the * Telegram * Premium giftcode link */ slug: string; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount?: Long; /** * If set, the gift was made using the specified * cryptocurrency. */ cryptoCurrency?: string; /** * If crypto_currency is set, contains the paid * amount, in the smallest units of the cryptocurrency. */ cryptoAmount?: Long; /** * Message attached with the gift */ message?: tl.TypeTextWithEntities; } /** * A * giveaway * was started. */ interface RawMessageActionGiveawayLaunch { _: 'messageActionGiveawayLaunch'; /** * For * Telegram * Star giveaways, the total number of Telegram Stars being * given away. */ stars?: Long; } /** * A * giveaway * has ended. */ interface RawMessageActionGiveawayResults { _: 'messageActionGiveawayResults'; /** * If set, this is a * Telegram * Star giveaway */ stars?: boolean; /** * Number of winners in the giveaway */ winnersCount: number; /** * Number of undistributed prizes */ unclaimedCount: number; } /** * Some * boosts * » were applied to the channel or supergroup. */ interface RawMessageActionBoostApply { _: 'messageActionBoostApply'; /** * Number of applied * boosts. */ boosts: number; } /** * Contains info about one or more peers that the a user shared * with the me (the bot) after clicking on a * {@link RawKeyboardButtonRequestPeer} button (service message * received by the bot). */ interface RawMessageActionRequestedPeerSentMe { _: 'messageActionRequestedPeerSentMe'; /** * button_id contained in the * {@link RawKeyboardButtonRequestPeer} */ buttonId: number; /** * Info about the shared peers. */ peers: tl.TypeRequestedPeer[]; } /** * Describes a payment refund (service message received by both * users and bots). */ interface RawMessageActionPaymentRefunded { _: 'messageActionPaymentRefunded'; /** * Identifier of the peer that returned the funds. */ peer: tl.TypePeer; /** * Currency, XTR for Telegram Stars. */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; /** * Bot specified invoice payload (only received by bots). */ payload?: Uint8Array; /** * Provider payment identifier */ charge: tl.TypePaymentCharge; } /** * You gifted or were gifted some * Telegram * Stars. * * This service message should be displayed below the * appropriate sticker from the * {@link RawInputStickerSetPremiumGifts} * stickerset * »: */ interface RawMessageActionGiftStars { _: 'messageActionGiftStars'; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Amount of gifted stars */ stars: Long; /** * If the gift was bought using a cryptocurrency, the * cryptocurrency name. */ cryptoCurrency?: string; /** * If the gift was bought using a cryptocurrency, price of the * gift in the smallest units of a cryptocurrency. */ cryptoAmount?: Long; /** * Identifier of the transaction, only visible to the receiver * of the gift. */ transactionId?: string; } /** * You won some * Telegram * Stars in a * Telegram * Star giveaway ». * * This service message should be displayed below the * appropriate sticker from the * {@link RawInputStickerSetPremiumGifts} * stickerset * »: */ interface RawMessageActionPrizeStars { _: 'messageActionPrizeStars'; /** * If set, this indicates the reverse transaction that refunds * the remaining stars to the creator of a giveaway if, when * the giveaway ends, the number of members in the channel is * smaller than the number of winners in the giveaway. */ unclaimed?: boolean; /** * The number of Telegram Stars you won */ stars: Long; /** * ID of the telegram star transaction. */ transactionId: string; /** * Identifier of the peer that was automatically boosted by the * winners of the giveaway. */ boostPeer: tl.TypePeer; /** * ID of the message containing the * {@link RawMessageMediaGiveaway} */ giveawayMsgId: number; } /** * You received a * gift, see * here » for more info. */ interface RawMessageActionStarGift { _: 'messageActionStarGift'; /** * If set, the name of the sender of the gift will be hidden if * the destination user decides to display the gift on their * profile */ nameHidden?: boolean; /** * Whether this gift was added to the destination user's * profile (may be toggled using * {@link payments.RawSaveStarGiftRequest} and fetched using * {@link payments.RawGetSavedStarGiftsRequest}) */ saved?: boolean; /** * Whether this gift was converted to * Telegram * Stars and cannot be displayed on the profile anymore. */ converted?: boolean; /** * This gift was upgraded to a * collectible * gift ». */ upgraded?: boolean; /** * This gift is not available anymore because a request to * refund the payment related to this gift was made, and the * money was returned. */ refunded?: boolean; /** * If set, this gift can be * upgraded * to a collectible gift; can only be set for the receiver * of a gift. */ canUpgrade?: boolean; /** * The sender has already pre-paid for the upgrade of this gift * to a collectible gift. */ prepaidUpgrade?: boolean; /** * This service message is the notification of a * separate * pre-payment for the upgrade of a gift we own. */ upgradeSeparate?: boolean; auctionAcquired?: boolean; /** * Info about the gift */ gift: tl.TypeStarGift; /** * Additional message from the sender of the gift */ message?: tl.TypeTextWithEntities; /** * The receiver of this gift may convert it to this many * Telegram Stars, instead of displaying it on their profile * page. * * convert_stars will be equal to * stars only if the gift was bought using * recently bought Telegram Stars, otherwise it will be less * than stars. */ convertStars?: Long; /** * If set, this gift was * upgraded * to a collectible gift, and the corresponding * {@link RawMessageActionStarGiftUnique} is available at the * specified message ID. */ upgradeMsgId?: number; /** * The number of Telegram Stars the user can pay to * convert * the gift into a collectible gift ». */ upgradeStars?: Long; /** * Sender of the gift (unset for anonymous gifts). */ fromId?: tl.TypePeer; /** * Receiver of the gift. */ peer?: tl.TypePeer; /** * For channel gifts, ID to use in * {@link RawInputSavedStarGiftChat} constructors. */ savedId?: Long; /** * Hash * to prepay for a gift upgrade separately ». */ prepaidUpgradeHash?: string; /** * For * separate * upgrades, the identifier of the message with the gift * whose upgrade was prepaid (only valid for the receiver of * the service message). */ giftMsgId?: number; toId?: tl.TypePeer; giftNum?: number; } /** * A gift * » was upgraded to a * collectible * gift ». */ interface RawMessageActionStarGiftUnique { _: 'messageActionStarGiftUnique'; /** * If set, this collectible was * upgraded * » to a collectible gift from a previously received or * sent (depending on the out flag of the * containing {@link RawMessageService}) non-collectible gift. */ upgrade?: boolean; /** * If set, this collectible was transferred (either to the * current user or by the current user to the other user in the * private chat, depending on the out flag of the * containing {@link RawMessageService}). */ transferred?: boolean; /** * If set, this gift is visible on the user or channel's * profile page; can only be set for the receiver of a gift. */ saved?: boolean; /** * This gift was upgraded to a * collectible * gift » and then re-downgraded to a regular gift because * a request to refund the payment related to the upgrade was * made, and the money was returned. */ refunded?: boolean; /** * The sender has pre-paid for the upgrade of this gift to a * collectible gift. */ prepaidUpgrade?: boolean; assigned?: boolean; fromOffer?: boolean; craft?: boolean; /** * The collectible gift. */ gift: tl.TypeStarGift; /** * If set, indicates that the current gift can't be * exported * to the TON blockchain » yet: the owner will be able to * export it at the specified unixtime. */ canExportAt?: number; /** * If set, indicates that the gift can be * transferred * » to another user by paying the specified amount of * stars. */ transferStars?: Long; /** * Sender of the gift (unset for anonymous gifts). */ fromId?: tl.TypePeer; /** * Receiver of the gift. */ peer?: tl.TypePeer; /** * For channel gifts, ID to use in * {@link RawInputSavedStarGiftChat} constructors. */ savedId?: Long; /** * Resale price of the gift. */ resaleAmount?: tl.TypeStarsAmount; /** * If set, indicates that the current gift can't be * transferred * » yet: the owner will be able to transfer it at the * specified unixtime. */ canTransferAt?: number; /** * If set, indicates that the current gift can't be * resold * » yet: the owner will be able to put it up for sale at * the specified unixtime. */ canResellAt?: number; dropOriginalDetailsStars?: Long; canCraftAt?: number; } /** * Sent from peer A to B, indicates that A refunded all * stars * B previously paid to send messages to A, see * here * » for more info on paid messages. */ interface RawMessageActionPaidMessagesRefunded { _: 'messageActionPaidMessagesRefunded'; /** * Number of paid messages affected by the refund. */ count: number; /** * Number of refunded stars. */ stars: Long; } /** * The price of * paid * messages » in this chat was changed. */ interface RawMessageActionPaidMessagesPrice { _: 'messageActionPaidMessagesPrice'; /** * Can only be set for channels, if set indicates that * direct * messages were enabled », otherwise indicates that direct * messages were disabled; the price of paid messages is * related to the price of direct messages (aka those sent to * the associated * monoforum). */ broadcastMessagesAllowed?: boolean; /** * The new price in * Telegram * Stars, can be 0 if messages are now free. */ stars: Long; } /** * Represents a * conference * call (or an invitation to a conference call, if neither * the missed nor active flags are * set). * * If * call_requests_disabled * is not set or false, an incoming * {@link RawMessageActionConferenceCall} with the * missed and active flags * not set should trigger ringing and an * incoming call screen, just like for one-on-one calls. */ interface RawMessageActionConferenceCall { _: 'messageActionConferenceCall'; /** * Whether the conference call has ended and the user hasn't * joined. */ missed?: boolean; /** * Whether the user is currently in the conference call. */ active?: boolean; /** * Whether this is a video conference call. */ video?: boolean; /** * Call ID. */ callId: Long; /** * Call duration, for left calls only. */ duration?: number; /** * Identifiers of some other call participants. */ otherParticipants?: tl.TypePeer[]; } /** * Items were marked as completed or not completed in a * todo list * ». */ interface RawMessageActionTodoCompletions { _: 'messageActionTodoCompletions'; /** * Items marked as completed. */ completed: number[]; /** * Items marked as not completed. */ incompleted: number[]; } /** * Items were appended to the * todo list * ». */ interface RawMessageActionTodoAppendTasks { _: 'messageActionTodoAppendTasks'; /** * Appended items. */ list: tl.TypeTodoItem[]; } /** * A * suggested * post » was approved or rejected. */ interface RawMessageActionSuggestedPostApproval { _: 'messageActionSuggestedPostApproval'; /** * Whether the suggested post was rejected. */ rejected?: boolean; /** * If set, the post was approved but the user's balance is too * low to pay for the suggested post. */ balanceTooLow?: boolean; /** * If the suggested post was rejected, can optionally contain a * rejection comment. */ rejectComment?: string; /** * Scheduling date. */ scheduleDate?: number; /** * Price for the suggested post. */ price?: tl.TypeStarsAmount; } /** * A * suggested * post » was successfully posted, and payment for it was * successfully received. */ interface RawMessageActionSuggestedPostSuccess { _: 'messageActionSuggestedPostSuccess'; /** * The price. */ price: tl.TypeStarsAmount; } /** * A * suggested * post » was accepted and posted or scheduled, but either * the channel deleted the posted/scheduled post before * stars_suggested_post_age_min * seconds have elapsed, or the user refunded the payment for * the stars used to pay for the suggested post. */ interface RawMessageActionSuggestedPostRefund { _: 'messageActionSuggestedPostRefund'; /** * If set, the user refunded the payment for the stars used to * pay for the suggested post. */ payerInitiated?: boolean; } /** * You were gifted some toncoins. * * This service message should be displayed below the * appropriate sticker from the * {@link RawInputStickerSetTonGifts} * stickerset * »: */ interface RawMessageActionGiftTon { _: 'messageActionGiftTon'; /** * Name of a localized FIAT currency. */ currency: string; /** * FIAT currency equivalent (in the currency specified in * currency) of the amount specified in * crypto_amount. */ amount: Long; /** * Name of the cryptocurrency. */ cryptoCurrency: string; /** * Amount in the smallest unit of the cryptocurrency (for TONs, * one billionth of a ton, AKA a nanoton). */ cryptoAmount: Long; /** * Transaction ID. */ transactionId?: string; } interface RawMessageActionSuggestBirthday { _: 'messageActionSuggestBirthday'; birthday: tl.TypeBirthday; } interface RawMessageActionStarGiftPurchaseOffer { _: 'messageActionStarGiftPurchaseOffer'; accepted?: boolean; declined?: boolean; gift: tl.TypeStarGift; price: tl.TypeStarsAmount; expiresAt: number; } interface RawMessageActionStarGiftPurchaseOfferDeclined { _: 'messageActionStarGiftPurchaseOfferDeclined'; expired?: boolean; gift: tl.TypeStarGift; price: tl.TypeStarsAmount; } interface RawMessageActionNewCreatorPending { _: 'messageActionNewCreatorPending'; newCreatorId: number; } interface RawMessageActionChangeCreator { _: 'messageActionChangeCreator'; newCreatorId: number; } interface RawMessageActionNoForwardsToggle { _: 'messageActionNoForwardsToggle'; prevValue: boolean; newValue: boolean; } interface RawMessageActionNoForwardsRequest { _: 'messageActionNoForwardsRequest'; expired?: boolean; prevValue: boolean; newValue: boolean; } /** * Chat */ interface RawDialog { _: 'dialog'; /** * Is the dialog pinned */ pinned?: boolean; /** * Whether the chat was manually marked as unread */ unreadMark?: boolean; /** * Users may also choose to display messages from all topics of * a * 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 * {@link channels.RawToggleViewForumAsMessagesRequest} method; * invoking this method will update the value of this flag. */ viewForumAsMessages?: boolean; /** * The chat */ peer: tl.TypePeer; /** * The latest message ID */ topMessage: number; /** * Position up to which all incoming messages are read. */ readInboxMaxId: number; /** * Position up to which all outgoing messages are read. */ readOutboxMaxId: number; /** * Number of unread messages */ unreadCount: number; /** * Number of * unread * mentions */ unreadMentionsCount: number; /** * Number of unread reactions to messages you sent */ unreadReactionsCount: number; /** * Notification settings */ notifySettings: tl.TypePeerNotifySettings; /** * PTS */ pts?: number; /** * Message * draft */ draft?: tl.TypeDraftMessage; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Time-to-live of all messages sent in this dialog */ ttlPeriod?: number; } /** * Dialog in folder */ interface RawDialogFolder { _: 'dialogFolder'; /** * Is this folder pinned */ pinned?: boolean; /** * The folder */ folder: tl.TypeFolder; /** * Peer in folder */ peer: tl.TypePeer; /** * Latest message ID of dialog */ topMessage: number; /** * Number of unread muted peers in folder */ unreadMutedPeersCount: number; /** * Number of unread unmuted peers in folder */ unreadUnmutedPeersCount: number; /** * Number of unread messages from muted peers in folder */ unreadMutedMessagesCount: number; /** * Number of unread messages from unmuted peers in folder */ unreadUnmutedMessagesCount: number; } /** * Empty constructor, non-existent photo */ interface RawPhotoEmpty { _: 'photoEmpty'; /** * Photo identifier */ id: Long; } /** * Photo */ interface RawPhoto { _: 'photo'; /** * Whether the photo has mask stickers attached to it */ hasStickers?: boolean; /** * ID */ id: Long; /** * Access hash */ accessHash: Long; /** * file * reference */ fileReference: Uint8Array; /** * Date of upload */ date: number; /** * Available sizes for download */ sizes: tl.TypePhotoSize[]; /** * For * animated profiles, the MPEG4 videos */ videoSizes?: tl.TypeVideoSize[]; /** * DC ID to use for download */ dcId: number; } /** * Empty constructor. Image with this thumbnail is unavailable. */ interface RawPhotoSizeEmpty { _: 'photoSizeEmpty'; /** * Thumbnail * type » */ type: string; } /** * Image description. */ interface RawPhotoSize { _: 'photoSize'; /** * Thumbnail * type » */ type: string; /** * Image width */ w: number; /** * Image height */ h: number; /** * File size */ size: number; } /** * Description of an image and its content. */ interface RawPhotoCachedSize { _: 'photoCachedSize'; /** * Thumbnail type */ type: string; /** * Image width */ w: number; /** * Image height */ h: number; /** * Binary data, file content */ bytes: Uint8Array; } /** * A low-resolution compressed JPG payload */ interface RawPhotoStrippedSize { _: 'photoStrippedSize'; /** * Thumbnail type */ type: string; /** * Thumbnail data, see * here * for more info on decompression » */ bytes: Uint8Array; } /** * Progressively encoded photosize */ interface RawPhotoSizeProgressive { _: 'photoSizeProgressive'; /** * Photosize * type » */ 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: number[]; } /** * Messages with animated stickers can have a compressed svg (< * 300 bytes) to show the outline of the sticker before * fetching the actual lottie animation. */ interface RawPhotoPathSize { _: 'photoPathSize'; /** * Always j */ type: string; /** * Compressed SVG path payload, * see * here for decompression instructions */ bytes: Uint8Array; } /** * Empty constructor. */ interface RawGeoPointEmpty { _: 'geoPointEmpty'; } /** * GeoPoint. */ interface RawGeoPoint { _: 'geoPoint'; /** * Longitude */ long: Double; /** * Latitude */ lat: Double; /** * Access hash */ accessHash: Long; /** * The estimated horizontal accuracy of the location, in * meters; as defined by the sender. */ accuracyRadius?: number; } /** * Notifications generated by a certain user or group. */ interface RawInputNotifyPeer { _: 'inputNotifyPeer'; /** * User or group */ peer: tl.TypeInputPeer; } /** * Notifications generated by all users. */ interface RawInputNotifyUsers { _: 'inputNotifyUsers'; } /** * Notifications generated by all groups. */ interface RawInputNotifyChats { _: 'inputNotifyChats'; } /** * All * channels */ interface RawInputNotifyBroadcasts { _: 'inputNotifyBroadcasts'; } /** * Notifications generated by a * topic * in a * forum. */ interface RawInputNotifyForumTopic { _: 'inputNotifyForumTopic'; /** * Forum ID */ peer: tl.TypeInputPeer; /** * Topic * ID */ topMsgId: number; } /** * Notification settings. */ interface RawInputPeerNotifySettings { _: 'inputPeerNotifySettings'; /** * If the text of the message shall be displayed in * notification */ showPreviews?: boolean; /** * Peer was muted? */ silent?: boolean; /** * Date until which all notifications shall be switched off */ muteUntil?: number; /** * Identifier of an audio file to play for notifications. */ sound?: tl.TypeNotificationSound; /** * Whether story notifications should be disabled. */ storiesMuted?: boolean; /** * Whether the sender name should be displayed in story * notifications. */ storiesHideSender?: boolean; /** * Identifier of an audio file to play for story notifications. */ storiesSound?: tl.TypeNotificationSound; } /** * Notification settings. */ interface RawPeerNotifySettings { _: 'peerNotifySettings'; /** * (Ternary value) If set, indicates whether or not to display * previews of messages in notifications; otherwise the default * behavior should be used. */ showPreviews?: 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 */ muteUntil?: number; /** * Notification sound for the official iOS application */ iosSound?: tl.TypeNotificationSound; /** * Notification sound for the official android application */ androidSound?: tl.TypeNotificationSound; /** * Notification sound for other applications */ otherSound?: tl.TypeNotificationSound; /** * Whether story notifications should be disabled. */ storiesMuted?: boolean; /** * Whether the sender name should be displayed in story * notifications. */ storiesHideSender?: boolean; /** * Sound for story notifications on the official iOS * application */ storiesIosSound?: tl.TypeNotificationSound; /** * Sound for story notifications on the official Android * application */ storiesAndroidSound?: tl.TypeNotificationSound; /** * Sound for story notifications on other applications */ storiesOtherSound?: tl.TypeNotificationSound; } /** * List of actions that are possible when interacting with this * user, to be shown as suggested actions in the * chat * action bar », see * here * » for more info. */ interface RawPeerSettings { _: 'peerSettings'; /** * Whether we can still report the user for spam */ reportSpam?: boolean; /** * Whether we can add the user as contact */ addContact?: boolean; /** * Whether we can block the user */ blockContact?: boolean; /** * Whether we can share the user's contact */ shareContact?: boolean; /** * Whether a special exception for contacts is needed */ needContactsException?: boolean; /** * Whether we can report a geo group as irrelevant for this * location */ reportGeo?: boolean; /** * Whether this peer was automatically archived according to * {@link RawGlobalPrivacySettings} and can be unarchived */ autoarchived?: boolean; /** * If set, this is a recently created group chat to which new * members can be invited */ inviteMembers?: boolean; /** * This flag is set if request_chat_title and * request_chat_date fields are set and the * join * request » is related to a channel (otherwise if only the * request fields are set, the * join * request » is related to a chat). */ requestChatBroadcast?: boolean; /** * This flag is set if both business_bot_id and * business_bot_manage_url are set and all * connected * business bots » were paused in this chat using * {@link account.RawToggleConnectedBotPausedRequest}. */ businessBotPaused?: boolean; /** * This flag is set if both business_bot_id and * business_bot_manage_url are set and * connected * business bots » can reply to messages in this chat, as * specified by the settings during * initial * configuration. */ businessBotCanReply?: boolean; /** * Distance in meters between us and this peer */ geoDistance?: 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. */ requestChatTitle?: 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 » was sent. */ requestChatDate?: number; /** * Contains the ID of the * business * bot » managing this chat, used to display info about the * bot in the action bar. */ businessBotId?: number; /** * Contains a * deep link * », used to open a management menu in the business bot. * This flag is set if and only if business_bot_id * is set. */ businessBotManageUrl?: string; /** * All users that must * pay * us » to send us private messages will have this * flag set only for us, containing the amount of * required stars, see * here * » for more info on paid messages. */ chargePaidMessageStars?: Long; /** * Used to display the user's registration year and month, the * string is in MM.YYYY format, where * MM is the registration month * (1-12), and YYYY is the * registration year. */ registrationMonth?: string; /** * The country code of the user's phone number. */ phoneCountry?: string; /** * When was the user's name last changed. */ nameChangeDate?: number; /** * When was the user's photo last changed. */ photoChangeDate?: number; } /** * Represents a * wallpaper * based on an image. */ interface RawWallPaper { _: 'wallPaper'; /** * Identifier */ id: Long; /** * Whether we created this wallpaper */ creator?: boolean; /** * Whether this is the default wallpaper */ default?: boolean; /** * Whether this is a * pattern * wallpaper » */ pattern?: boolean; /** * Whether this wallpaper should be used in dark mode. */ dark?: boolean; /** * Access hash */ accessHash: Long; /** * Unique wallpaper ID, used when generating * wallpaper * links or * importing * wallpaper links. */ slug: string; /** * The actual wallpaper */ document: tl.TypeDocument; /** * Info on how to generate the wallpaper, according to * these * instructions ». */ settings?: tl.TypeWallPaperSettings; } /** * Represents a * wallpaper * only based on colors/gradients. */ interface RawWallPaperNoFile { _: 'wallPaperNoFile'; /** * Wallpaper ID */ id: Long; /** * Whether this is the default wallpaper */ default?: boolean; /** * Whether this wallpaper should be used in dark mode. */ dark?: boolean; /** * Info on how to generate the wallpaper. */ settings?: tl.TypeWallPaperSettings; } /** * Report for spam */ interface RawInputReportReasonSpam { _: 'inputReportReasonSpam'; } /** * Report for violence */ interface RawInputReportReasonViolence { _: 'inputReportReasonViolence'; } /** * Report for pornography */ interface RawInputReportReasonPornography { _: 'inputReportReasonPornography'; } /** * Report for child abuse */ interface RawInputReportReasonChildAbuse { _: 'inputReportReasonChildAbuse'; } /** * Other */ interface RawInputReportReasonOther { _: 'inputReportReasonOther'; } /** * Report for copyrighted content */ interface RawInputReportReasonCopyright { _: 'inputReportReasonCopyright'; } /** * Report an irrelevant geo group */ interface RawInputReportReasonGeoIrrelevant { _: 'inputReportReasonGeoIrrelevant'; } /** * Report for impersonation */ interface RawInputReportReasonFake { _: 'inputReportReasonFake'; } /** * Report for illegal drugs */ interface RawInputReportReasonIllegalDrugs { _: 'inputReportReasonIllegalDrugs'; } /** * Report for divulgation of personal details */ interface RawInputReportReasonPersonalDetails { _: 'inputReportReasonPersonalDetails'; } /** * Extended user info * * When updating the * local peer * database », all fields from the newly received * constructor take priority over the old constructor cached * locally (including by removing fields that aren't set in the * new constructor). */ interface RawUserFull { _: 'userFull'; /** * Whether you have blocked this user */ blocked?: boolean; /** * Whether this user can make VoIP calls */ phoneCallsAvailable?: boolean; /** * Whether this user's privacy settings allow you to call them */ phoneCallsPrivate?: boolean; /** * Whether you can pin messages in the chat with this user, you * can do this only for a chat with yourself */ canPinMessage?: boolean; /** * Whether * scheduled * messages are available */ hasScheduled?: boolean; /** * Whether the user can receive video calls */ videoCallsAvailable?: boolean; /** * Whether this user doesn't allow sending voice messages in a * private chat with them */ voiceMessagesForbidden?: boolean; /** * Whether the * real-time * chat translation popup should be hidden. */ translationsDisabled?: boolean; /** * Whether this user has some * pinned * stories. */ storiesPinnedAvailable?: boolean; /** * Whether we've * blocked * this user, preventing them from seeing our stories ». */ blockedMyStoriesFrom?: boolean; /** * Whether the other user has chosen a custom wallpaper for us * using {@link messages.RawSetChatWallPaperRequest} and the * for_both flag, see * here * » for more info. */ wallpaperOverridden?: boolean; /** * If set, we cannot write to this user: subscribe to * Telegram * Premium to get permission to write to this user. * * To set this flag for ourselves invoke * {@link account.RawSetGlobalPrivacySettingsRequest}, setting * the * settings.new_noncontact_peers_require_premium * flag, see * here * » for more info. */ contactRequirePremium?: boolean; /** * If set, we cannot fetch the exact read date of messages we * send to this user using * {@link messages.RawGetOutboxReadDateRequest}. * * The exact read date of messages might still be unavailable * for other reasons, see * {@link messages.RawGetOutboxReadDateRequest} for more info. * * * To set this flag for ourselves invoke * {@link account.RawSetGlobalPrivacySettingsRequest}, setting * the settings.hide_read_marks flag. */ readDatesPrivate?: boolean; /** * Whether ads were re-enabled for the current account (only * accessible to the currently logged-in user), see * here * » for more info. */ sponsoredEnabled?: boolean; /** * If set, this user can view * ad * revenue statistics » for this bot. */ canViewRevenue?: boolean; /** * If set, this is a bot that can * change * our emoji status » */ botCanManageEmojiStatus?: boolean; /** * If this flag is set for both us and another user (changed * through {@link RawGlobalPrivacySettings}), a gift button * should always be displayed in the text field in private * chats with the other user: once clicked, the gift UI should * be displayed, offering the user options to gift * Telegram * Premium » subscriptions or * Telegram * Gifts ». */ displayGiftsButton?: boolean; noforwardsMyEnabled?: boolean; noforwardsPeerEnabled?: boolean; /** * User ID */ id: number; /** * Bio of the user */ about?: string; /** * Peer settings */ settings: tl.TypePeerSettings; /** * Personal profile photo, to be shown instead of * profile_photo. */ personalPhoto?: tl.TypePhoto; /** * Profile photo */ profilePhoto?: tl.TypePhoto; /** * Fallback profile photo, displayed if no photo is present in * profile_photo or personal_photo, * due to privacy settings. */ fallbackPhoto?: tl.TypePhoto; /** * Notification settings */ notifySettings: tl.TypePeerNotifySettings; /** * For bots, info about the bot (bot commands, etc) */ botInfo?: tl.TypeBotInfo; /** * Message ID of the last * pinned * message */ pinnedMsgId?: number; /** * Chats in common with this user */ commonChatsCount: number; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Time To Live of all messages in this chat; once a message is * this many seconds old, it must be deleted. */ ttlPeriod?: number; /** * The * chat theme associated with this user ». */ theme?: tl.TypeChatTheme; /** * Anonymized text to be shown instead of the user's name on * forwarded messages */ privateForwardName?: string; /** * A * suggested * set of administrator 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 ». */ botGroupAdminRights?: tl.TypeChatAdminRights; /** * A * suggested * set of administrator 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 ». */ botBroadcastAdminRights?: tl.TypeChatAdminRights; /** * Wallpaper * to use in the private chat with the user. */ wallpaper?: tl.TypeWallPaper; /** * Active * stories * » */ stories?: tl.TypePeerStories; /** * Telegram * Business working hours ». */ businessWorkHours?: tl.TypeBusinessWorkHours; /** * Telegram * Business location ». */ businessLocation?: tl.TypeBusinessLocation; /** * Telegram * Business greeting message ». */ businessGreetingMessage?: tl.TypeBusinessGreetingMessage; /** * Telegram * Business away message ». */ businessAwayMessage?: tl.TypeBusinessAwayMessage; /** * Specifies a custom * Telegram * Business profile introduction ». */ businessIntro?: tl.TypeBusinessIntro; /** * Contains info about the user's * birthday * ». */ birthday?: tl.TypeBirthday; /** * ID of the associated personal * channel * », that should be shown in the * profile * page. */ personalChannelId?: number; /** * ID of the latest message of the associated personal * channel * », that should be previewed in the * profile * page. */ personalChannelMessage?: number; /** * Number of * gifts * the user has chosen to display on their profile */ stargiftsCount?: number; /** * This bot has an active * referral * program » */ starrefProgram?: tl.TypeStarRefProgram; /** * Describes a * bot * verification icon ». */ botVerification?: tl.TypeBotVerification; /** * If set and bigger than 0, this user has enabled * paid * messages » and we must pay the specified amount * of * Stars * to send messages to them, see * here * » for the full flow. * * If set and equal to 0, the user requires payment in general * but we were exempted from paying * for * any of the reasons specified in the docs ». */ sendPaidMessagesStars?: Long; /** * Disallows the reception of specific gift types. */ disallowedGifts?: tl.TypeDisallowedGiftsSettings; /** * The user's * star * rating. */ starsRating?: tl.TypeStarsRating; /** * Our pending * star * rating, only visible for ourselves. */ starsMyPendingRating?: tl.TypeStarsRating; /** * When the pending * star * rating will be applied, only visible for ourselves. */ starsMyPendingRatingDate?: number; /** * The main tab for the user's profile, see * here * » for more info. */ mainTab?: tl.TypeProfileTab; /** * The first song on the music tab of the profile, see * here * » for more info on the music profile tab. */ savedMusic?: tl.TypeDocument; note?: tl.TypeTextWithEntities; } /** * A contact of the current user that is registered in the * system. */ interface RawContact { _: 'contact'; /** * User identifier */ userId: number; /** * Current user is in the user's contact list */ mutual: boolean; } /** * Successfully imported contact. */ interface RawImportedContact { _: 'importedContact'; /** * User identifier */ userId: number; /** * The contact's client identifier (passed to one of the * InputContact * constructors) */ clientId: Long; } /** * Contact status: online / offline. */ interface RawContactStatus { _: 'contactStatus'; /** * User identifier */ userId: number; /** * Online status */ status: tl.TypeUserStatus; } /** * Filter is absent. */ interface RawInputMessagesFilterEmpty { _: 'inputMessagesFilterEmpty'; } /** * Filter for messages containing photos. */ interface RawInputMessagesFilterPhotos { _: 'inputMessagesFilterPhotos'; } /** * Filter for messages containing videos. */ interface RawInputMessagesFilterVideo { _: 'inputMessagesFilterVideo'; } /** * Filter for messages containing photos or videos. */ interface RawInputMessagesFilterPhotoVideo { _: 'inputMessagesFilterPhotoVideo'; } /** * Filter for messages containing documents. */ interface RawInputMessagesFilterDocument { _: 'inputMessagesFilterDocument'; } /** * Return only messages containing URLs */ interface RawInputMessagesFilterUrl { _: 'inputMessagesFilterUrl'; } /** * Return only messages containing gifs */ interface RawInputMessagesFilterGif { _: 'inputMessagesFilterGif'; } /** * Return only messages containing voice notes */ interface RawInputMessagesFilterVoice { _: 'inputMessagesFilterVoice'; } /** * Return only messages containing audio files */ interface RawInputMessagesFilterMusic { _: 'inputMessagesFilterMusic'; } /** * Return only chat photo changes */ interface RawInputMessagesFilterChatPhotos { _: 'inputMessagesFilterChatPhotos'; } /** * Return only phone calls */ interface RawInputMessagesFilterPhoneCalls { _: 'inputMessagesFilterPhoneCalls'; /** * Return only missed phone calls */ missed?: boolean; } /** * Return only round videos and voice notes */ interface RawInputMessagesFilterRoundVoice { _: 'inputMessagesFilterRoundVoice'; } /** * Return only round videos */ interface RawInputMessagesFilterRoundVideo { _: 'inputMessagesFilterRoundVideo'; } /** * Return only messages where the current user was * mentioned. */ interface RawInputMessagesFilterMyMentions { _: 'inputMessagesFilterMyMentions'; } /** * Return only messages containing geolocations */ interface RawInputMessagesFilterGeo { _: 'inputMessagesFilterGeo'; } /** * Return only messages containing contacts */ interface RawInputMessagesFilterContacts { _: 'inputMessagesFilterContacts'; } /** * Fetch only pinned messages */ interface RawInputMessagesFilterPinned { _: 'inputMessagesFilterPinned'; } /** * New message in a private chat or in a * basic * group. */ interface RawUpdateNewMessage { _: 'updateNewMessage'; /** * Message */ message: tl.TypeMessage; /** * New quantity of actions in a message box */ pts: number; /** * Number of generated events */ ptsCount: number; } /** * Sent message with random_id client * identifier was assigned an identifier. */ interface RawUpdateMessageID { _: 'updateMessageID'; /** * id identifier of a respective * Message */ id: number; /** * Previously transferred client random_id * identifier */ randomId: Long; } /** * Messages were deleted. */ interface RawUpdateDeleteMessages { _: 'updateDeleteMessages'; /** * List of identifiers of deleted messages */ messages: number[]; /** * New quality of actions in a message box */ pts: number; /** * Number of generated * events */ ptsCount: number; } /** * 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 */ interface RawUpdateUserTyping { _: 'updateUserTyping'; /** * User id */ userId: number; topMsgId?: number; /** * Action type */ action: tl.TypeSendMessageAction; } /** * 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 */ interface RawUpdateChatUserTyping { _: 'updateChatUserTyping'; /** * Group id */ chatId: number; /** * Peer that started typing (can be the chat itself, in case of * anonymous admins). */ fromId: tl.TypePeer; /** * Type of action */ action: tl.TypeSendMessageAction; } /** * Composition of chat participants changed. */ interface RawUpdateChatParticipants { _: 'updateChatParticipants'; /** * Updated chat participants */ participants: tl.TypeChatParticipants; } /** * Contact status update. */ interface RawUpdateUserStatus { _: 'updateUserStatus'; /** * User identifier */ userId: number; /** * New status */ status: tl.TypeUserStatus; } /** * Changes the user's first name, last name and username. */ interface RawUpdateUserName { _: 'updateUserName'; /** * User identifier */ userId: number; /** * New first name. Corresponds to the new value of * real_first_name field of the * {@link RawUserFull} constructor. */ firstName: string; /** * New last name. Corresponds to the new value of * real_last_name field of the * {@link RawUserFull} constructor. */ lastName: string; /** * Usernames. */ usernames: tl.TypeUsername[]; } /** * A new session logged into the current user's account through * an unknown device. */ interface RawUpdateNewAuthorization { _: 'updateNewAuthorization'; /** * Whether the session is * unconfirmed, * see here » for more info. */ unconfirmed?: boolean; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Authorization date */ date?: number; /** * Name of device, for example Android */ device?: string; /** * Location, for example USA, NY (IP=1.2.3.4) */ location?: string; } /** * New encrypted message. */ interface RawUpdateNewEncryptedMessage { _: 'updateNewEncryptedMessage'; /** * Message */ message: tl.TypeEncryptedMessage; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * 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. */ interface RawUpdateEncryptedChatTyping { _: 'updateEncryptedChatTyping'; /** * Chat ID */ chatId: number; } /** * Change of state in an encrypted chat. */ interface RawUpdateEncryption { _: 'updateEncryption'; /** * Encrypted chat */ chat: tl.TypeEncryptedChat; /** * Date of change */ date: number; } /** * Communication history in an encrypted chat was marked as * read. */ interface RawUpdateEncryptedMessagesRead { _: 'updateEncryptedMessagesRead'; /** * Chat ID */ chatId: number; /** * Maximum value of data for read messages */ maxDate: number; /** * Time when messages were read */ date: number; } /** * New group member. */ interface RawUpdateChatParticipantAdd { _: 'updateChatParticipantAdd'; /** * Group ID */ chatId: number; /** * ID of the new member */ userId: number; /** * ID of the user, who added member to the group */ inviterId: number; /** * When was the participant added */ date: number; /** * Chat version number */ version: number; } /** * A member has left the group. */ interface RawUpdateChatParticipantDelete { _: 'updateChatParticipantDelete'; /** * Group ID */ chatId: number; /** * ID of the user */ userId: number; /** * Used in basic groups to reorder updates and make sure that * all of them was received. */ version: number; } /** * Changes in the data center configuration options. */ interface RawUpdateDcOptions { _: 'updateDcOptions'; /** * New connection options */ dcOptions: tl.TypeDcOption[]; } /** * Changes in notification settings. */ interface RawUpdateNotifySettings { _: 'updateNotifySettings'; /** * Notification source */ peer: tl.TypeNotifyPeer; /** * New notification settings */ notifySettings: tl.TypePeerNotifySettings; } /** * A service message for the user. * * The app must show the message to the user upon receiving * this update. In case the popup parameter * was passed, the text message must be displayed in a popup * alert immediately upon receipt. It is recommended to handle * the text as you would an ordinary message in terms of * highlighting links, etc. The message must also be stored * locally as part of the message history with the user id * 777000 (Telegram Notifications). */ interface RawUpdateServiceNotification { _: 'updateServiceNotification'; /** * If set, the message must be displayed in a popup. */ popup?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * 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). */ inboxDate?: number; /** * String, identical in format and contents to the * 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: tl.TypeMessageMedia; /** * Message * entities for styled text */ entities: tl.TypeMessageEntity[]; } /** * Privacy rules were changed */ interface RawUpdatePrivacy { _: 'updatePrivacy'; /** * Peers to which the privacy rules apply */ key: tl.TypePrivacyKey; /** * New privacy rules */ rules: tl.TypePrivacyRule[]; } /** * A user's phone number was changed */ interface RawUpdateUserPhone { _: 'updateUserPhone'; /** * User ID */ userId: number; /** * New phone number */ phone: string; } /** * Incoming messages were read */ interface RawUpdateReadHistoryInbox { _: 'updateReadHistoryInbox'; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Peer */ peer: tl.TypePeer; topMsgId?: number; /** * Maximum ID of messages read */ maxId: number; /** * Number of messages that are still unread */ stillUnreadCount: number; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Outgoing messages were read */ interface RawUpdateReadHistoryOutbox { _: 'updateReadHistoryOutbox'; /** * Peer */ peer: tl.TypePeer; /** * Maximum ID of read outgoing messages */ maxId: number; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * An instant * view webpage preview was generated */ interface RawUpdateWebPage { _: 'updateWebPage'; /** * Webpage preview */ webpage: tl.TypeWebPage; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Contents of messages in the common * message * box were read (emitted specifically for messages like * voice messages or video, only once the media is watched and * marked as read using * {@link messages.RawReadMessageContentsRequest}). */ interface RawUpdateReadMessagesContents { _: 'updateReadMessagesContents'; /** * IDs of read messages */ messages: number[]; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; /** * When was the last message in messages marked as * read. */ date?: number; } /** * 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. */ interface RawUpdateChannelTooLong { _: 'updateChannelTooLong'; /** * The channel */ channelId: number; /** * The * PTS. */ pts?: number; } /** * Channel/supergroup ({@link RawChannel} and/or * {@link RawChannelFull}) information was updated. * * This update can only be received through getDifference or in * {@link RawUpdates}/{@linkƒRawUpdatesCombined} constructors, * so it will always come bundled with the * updated {@link RawChannel}, that should be applied * as usual * », without re-fetching the info * manually. * * However, full peer information will not come bundled in * updates, so the full peer cache ({@link RawChannelFull}) * must be invalidated for channel_id when * receiving this update. */ interface RawUpdateChannel { _: 'updateChannel'; /** * Channel ID */ channelId: number; } /** * A new message was sent in a * channel/supergroup */ interface RawUpdateNewChannelMessage { _: 'updateNewChannelMessage'; /** * New message */ message: tl.TypeMessage; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Incoming messages in a * channel/supergroup * were read */ interface RawUpdateReadChannelInbox { _: 'updateReadChannelInbox'; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Channel/supergroup ID */ channelId: number; /** * Position up to which all incoming messages are read. */ maxId: number; /** * Count of messages weren't read yet */ stillUnreadCount: number; /** * Event * count after generation */ pts: number; } /** * Some messages in a * supergroup/channel * were deleted */ interface RawUpdateDeleteChannelMessages { _: 'updateDeleteChannelMessages'; /** * Channel ID */ channelId: number; /** * IDs of messages that were deleted */ messages: number[]; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * The view counter of a message in a channel has changed */ interface RawUpdateChannelMessageViews { _: 'updateChannelMessageViews'; /** * Channel ID */ channelId: number; /** * ID of the message */ id: number; /** * New view counter */ views: number; } /** * Admin permissions of a user in a * basic * group were changed */ interface RawUpdateChatParticipantAdmin { _: 'updateChatParticipantAdmin'; /** * Chat ID */ chatId: number; /** * ID of the (de)admined user */ userId: number; /** * Whether the user was rendered admin */ isAdmin: boolean; /** * Used in basic groups to reorder updates and make sure that * all of them was received. */ version: number; } /** * A new stickerset was installed */ interface RawUpdateNewStickerSet { _: 'updateNewStickerSet'; /** * The installed stickerset */ stickerset: tl.messages.TypeStickerSet; } /** * The order of stickersets was changed */ interface RawUpdateStickerSetsOrder { _: 'updateStickerSetsOrder'; /** * Whether the updated stickers are mask stickers */ masks?: boolean; /** * Whether the updated stickers are custom emoji stickers */ emojis?: boolean; /** * New sticker order by sticker ID */ order: Long[]; } /** * Installed stickersets have changed, the client should * refetch them as * described * in the docs. */ interface RawUpdateStickerSets { _: 'updateStickerSets'; /** * Whether mask stickersets have changed */ masks?: boolean; /** * Whether the list of installed * custom * emoji stickersets has changed */ emojis?: boolean; } /** * The saved gif list has changed, the client should refetch it * using {@link messages.RawGetSavedGifsRequest} */ interface RawUpdateSavedGifs { _: 'updateSavedGifs'; } /** * An incoming inline query */ interface RawUpdateBotInlineQuery { _: 'updateBotInlineQuery'; /** * Query ID */ queryId: Long; /** * User that sent the query */ userId: number; /** * Text of query */ query: string; /** * Attached geolocation */ geo?: tl.TypeGeoPoint; /** * Type of the chat from which the inline query was sent. */ peerType?: tl.TypeInlineQueryPeerType; /** * Offset to navigate through results */ offset: string; } /** * 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 for details on how to enable these updates * for your bot. */ interface RawUpdateBotInlineSend { _: 'updateBotInlineSend'; /** * The user that chose the result */ userId: number; /** * The query that was used to obtain the result */ query: string; /** * Optional. Sender location, only for bots that require user * location */ geo?: tl.TypeGeoPoint; /** * 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. */ msgId?: tl.TypeInputBotInlineMessageID; } /** * A message was edited in a * channel/supergroup */ interface RawUpdateEditChannelMessage { _: 'updateEditChannelMessage'; /** * The new message */ message: tl.TypeMessage; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * A callback button was pressed, and the button data was sent * to the bot that created the button */ interface RawUpdateBotCallbackQuery { _: 'updateBotCallbackQuery'; /** * Query ID */ queryId: Long; /** * ID of the user that pressed the button */ userId: number; /** * Chat where the inline keyboard was sent */ peer: tl.TypePeer; /** * Message ID */ msgId: number; /** * Global identifier, uniquely corresponding to the chat to * which the message with the callback button was sent. Useful * for high scores in games. */ chatInstance: Long; /** * Callback data */ data?: Uint8Array; /** * Short name of a Game to be returned, serves as the unique * identifier for the game */ gameShortName?: string; } /** * A message was edited */ interface RawUpdateEditMessage { _: 'updateEditMessage'; /** * The new edited message */ message: tl.TypeMessage; /** * PTS */ pts: number; /** * PTS * count */ ptsCount: number; } /** * This notification is received by bots when a button is * pressed */ interface RawUpdateInlineBotCallbackQuery { _: 'updateInlineBotCallbackQuery'; /** * Query ID */ queryId: Long; /** * ID of the user that pressed the button */ userId: number; /** * ID of the inline message with the button */ msgId: tl.TypeInputBotInlineMessageID; /** * Global identifier, uniquely corresponding to the chat to * which the message with the callback button was sent. Useful * for high scores in games. */ chatInstance: Long; /** * 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 */ gameShortName?: string; } /** * Outgoing messages in a * channel/supergroup * were read */ interface RawUpdateReadChannelOutbox { _: 'updateReadChannelOutbox'; /** * Channel/supergroup ID */ channelId: number; /** * Position up to which all outgoing messages are read. */ maxId: number; } /** * Notifies a change of a message * draft. */ interface RawUpdateDraftMessage { _: 'updateDraftMessage'; /** * The peer to which the draft is associated */ peer: tl.TypePeer; /** * ID of the * forum * topic to which the draft is associated */ topMsgId?: number; /** * If set, the draft is related to the specified * monoforum * topic ID ». */ savedPeerId?: tl.TypePeer; /** * The draft */ draft: tl.TypeDraftMessage; } /** * Some featured stickers were marked as read */ interface RawUpdateReadFeaturedStickers { _: 'updateReadFeaturedStickers'; } /** * The recent sticker list was updated */ interface RawUpdateRecentStickers { _: 'updateRecentStickers'; } /** * The server-side configuration has changed; the client should * re-fetch the config using {@link help.RawGetConfigRequest} * and {@link help.RawGetAppConfigRequest}. */ interface RawUpdateConfig { _: 'updateConfig'; } /** * Common * message box sequence PTS has changed, * state * has to be refetched using updates.getState */ interface RawUpdatePtsChanged { _: 'updatePtsChanged'; } /** * A webpage preview of a link in a * channel/supergroup * message was generated */ interface RawUpdateChannelWebPage { _: 'updateChannelWebPage'; /** * Channel/supergroup * ID */ channelId: number; /** * Generated webpage preview */ webpage: tl.TypeWebPage; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * A dialog was pinned/unpinned */ interface RawUpdateDialogPinned { _: 'updateDialogPinned'; /** * Whether the dialog was pinned */ pinned?: boolean; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * The dialog */ peer: tl.TypeDialogPeer; } /** * Pinned dialogs were updated */ interface RawUpdatePinnedDialogs { _: 'updatePinnedDialogs'; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * New order of pinned dialogs */ order?: tl.TypeDialogPeer[]; } /** * A new incoming event; for bots only */ interface RawUpdateBotWebhookJSON { _: 'updateBotWebhookJSON'; /** * The event */ data: tl.TypeDataJSON; } /** * A new incoming query; for bots only */ interface RawUpdateBotWebhookJSONQuery { _: 'updateBotWebhookJSONQuery'; /** * Query identifier */ queryId: Long; /** * Query data */ data: tl.TypeDataJSON; /** * Query timeout */ timeout: number; } /** * This object contains information about an incoming shipping * query. */ interface RawUpdateBotShippingQuery { _: 'updateBotShippingQuery'; /** * Unique query identifier */ queryId: Long; /** * User who sent the query */ userId: number; /** * Bot specified invoice payload */ payload: Uint8Array; /** * User specified shipping address */ shippingAddress: tl.TypePostAddress; } /** * This object contains information about an incoming * pre-checkout query. */ interface RawUpdateBotPrecheckoutQuery { _: 'updateBotPrecheckoutQuery'; /** * Unique query identifier */ queryId: Long; /** * User who sent the query */ userId: number; /** * Bot specified invoice payload */ payload: Uint8Array; /** * Order info provided by the user */ info?: tl.TypePaymentRequestedInfo; /** * Identifier of the shipping option chosen by the user */ shippingOptionId?: string; /** * Three-letter ISO 4217 * currency * code, or XTR for * Telegram * Stars. */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; } /** * An incoming phone call */ interface RawUpdatePhoneCall { _: 'updatePhoneCall'; /** * Phone call */ phoneCall: tl.TypePhoneCall; } /** * A language pack has changed, the client should manually * fetch the changed strings using * {@link langpack.RawGetDifferenceRequest} */ interface RawUpdateLangPackTooLong { _: 'updateLangPackTooLong'; /** * Language code */ langCode: string; } /** * Language pack updated */ interface RawUpdateLangPack { _: 'updateLangPack'; /** * Changed strings */ difference: tl.TypeLangPackDifference; } /** * The list of favorited stickers was changed, the client * should call {@link messages.RawGetFavedStickersRequest} to * refetch the new list */ interface RawUpdateFavedStickers { _: 'updateFavedStickers'; } /** * The specified * channel/supergroup * messages were read (emitted specifically for messages like * voice messages or video, only once the media is watched and * marked as read using * {@link channels.RawReadMessageContentsRequest}) */ interface RawUpdateChannelReadMessagesContents { _: 'updateChannelReadMessagesContents'; /** * Channel/supergroup * ID */ channelId: number; /** * Forum * topic ID. */ topMsgId?: number; /** * If set, the messages were read within the specified * monoforum * topic ». */ savedPeerId?: tl.TypePeer; /** * IDs of messages that were read */ messages: number[]; } /** * All contacts were deleted */ interface RawUpdateContactsReset { _: 'updateContactsReset'; } /** * The history of a * channel/supergroup * was hidden. */ interface RawUpdateChannelAvailableMessages { _: 'updateChannelAvailableMessages'; /** * Channel/supergroup ID */ channelId: number; /** * Identifier of a maximum unavailable message in a channel due * to hidden history. */ availableMinId: number; } /** * The manual unread mark of a chat was changed */ interface RawUpdateDialogUnreadMark { _: 'updateDialogUnreadMark'; /** * Was the chat marked or unmarked as read */ unread?: boolean; /** * The dialog */ peer: tl.TypeDialogPeer; /** * If set, the mark is related to the specified * monoforum * topic ID ». */ savedPeerId?: tl.TypePeer; } /** * The results of a poll have changed */ interface RawUpdateMessagePoll { _: 'updateMessagePoll'; /** * Poll ID */ pollId: Long; /** * If the server knows the client hasn't cached this poll yet, * the poll itself */ poll?: tl.TypePoll; /** * New poll results */ results: tl.TypePollResults; } /** * Default banned rights in a * normal * chat were updated */ interface RawUpdateChatDefaultBannedRights { _: 'updateChatDefaultBannedRights'; /** * The chat */ peer: tl.TypePeer; /** * New default banned rights */ defaultBannedRights: tl.TypeChatBannedRights; /** * Version */ version: number; } /** * The peer list of a * peer * folder was updated */ interface RawUpdateFolderPeers { _: 'updateFolderPeers'; /** * New peer list */ folderPeers: tl.TypeFolderPeer[]; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Settings of a certain peer have changed */ interface RawUpdatePeerSettings { _: 'updatePeerSettings'; /** * The peer */ peer: tl.TypePeer; /** * Associated peer settings */ settings: tl.TypePeerSettings; } /** * List of peers near you was updated */ interface RawUpdatePeerLocated { _: 'updatePeerLocated'; /** * Geolocated peer list update */ peers: tl.TypePeerLocated[]; } /** * A message was added to the * schedule * queue of a chat */ interface RawUpdateNewScheduledMessage { _: 'updateNewScheduledMessage'; /** * Message */ message: tl.TypeMessage; } /** * Some * scheduled * messages were deleted (or sent) from the schedule queue * of a chat */ interface RawUpdateDeleteScheduledMessages { _: 'updateDeleteScheduledMessages'; /** * Peer */ peer: tl.TypePeer; /** * Deleted scheduled messages */ messages: number[]; /** * If set, this update indicates that some scheduled messages * were sent (not simply deleted from the schedule queue). * * In this case, the messages field will contain * the scheduled message IDs for the sent messages (initially * returned in {@link RawUpdateNewScheduledMessage}), and * sent_messages will contain the real message IDs * for the sent messages. */ sentMessages?: number[]; } /** * A cloud theme was updated */ interface RawUpdateTheme { _: 'updateTheme'; /** * Theme */ theme: tl.TypeTheme; } /** * Live geo position message was viewed */ interface RawUpdateGeoLiveViewed { _: 'updateGeoLiveViewed'; /** * The user that viewed the live geo position */ peer: tl.TypePeer; /** * Message ID of geo position message */ msgId: number; } /** * A login token (for login via QR code) was accepted. */ interface RawUpdateLoginToken { _: 'updateLoginToken'; } /** * A specific peer has voted in a poll */ interface RawUpdateMessagePollVote { _: 'updateMessagePollVote'; /** * Poll ID */ pollId: Long; /** * The peer that voted in the poll */ peer: tl.TypePeer; /** * Chosen option(s) */ options: Uint8Array[]; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * A new * folder * was added */ interface RawUpdateDialogFilter { _: 'updateDialogFilter'; /** * Folder * ID */ id: number; /** * Folder * info */ filter?: tl.TypeDialogFilter; } /** * New * folder * order */ interface RawUpdateDialogFilterOrder { _: 'updateDialogFilterOrder'; /** * Ordered * folder * IDs */ order: number[]; } /** * Clients should update * folder * info */ interface RawUpdateDialogFilters { _: 'updateDialogFilters'; } /** * Incoming phone call signaling payload */ interface RawUpdatePhoneCallSignalingData { _: 'updatePhoneCallSignalingData'; /** * Phone call ID */ phoneCallId: Long; /** * Signaling payload */ data: Uint8Array; } /** * The forward counter of a message in a channel has changed */ interface RawUpdateChannelMessageForwards { _: 'updateChannelMessageForwards'; /** * Channel ID */ channelId: number; /** * ID of the message */ id: number; /** * New forward counter */ forwards: number; } /** * Incoming comments in a * discussion * thread were marked as read */ interface RawUpdateReadChannelDiscussionInbox { _: 'updateReadChannelDiscussionInbox'; /** * Discussion * group ID */ channelId: number; /** * ID of the group message that started the * thread * (message in linked discussion group) */ topMsgId: number; /** * Message ID of latest read incoming message for this * thread */ readMaxId: number; /** * If set, contains the ID of the * channel * that contains the post that started the * comment * thread in the discussion group (channel_id) */ broadcastId?: number; /** * If set, contains the ID of the channel post that started the * comment * thread */ broadcastPost?: number; } /** * Outgoing comments in a * discussion * thread were marked as read */ interface RawUpdateReadChannelDiscussionOutbox { _: 'updateReadChannelDiscussionOutbox'; /** * Supergroup * ID */ channelId: number; /** * ID of the group message that started the * thread */ topMsgId: number; /** * Message ID of latest read outgoing message for this * thread */ readMaxId: number; } /** * We blocked a peer, see * here » * for more info on blocklists. */ interface RawUpdatePeerBlocked { _: 'updatePeerBlocked'; /** * Whether the peer was blocked or unblocked */ blocked?: boolean; /** * Whether the peer was added/removed to/from the story * blocklist; if not set, this update affects the main * blocklist, see * here » * for more info. */ blockedMyStoriesFrom?: boolean; /** * The (un)blocked peer */ peerId: tl.TypePeer; } /** * A user is typing in a * supergroup, * channel or * message * thread */ interface RawUpdateChannelUserTyping { _: 'updateChannelUserTyping'; /** * Channel ID */ channelId: number; /** * Thread * ID */ topMsgId?: number; /** * The peer that is typing */ fromId: tl.TypePeer; /** * Whether the user is typing, sending a media or doing * something else */ action: tl.TypeSendMessageAction; } /** * Some messages were pinned in a chat */ interface RawUpdatePinnedMessages { _: 'updatePinnedMessages'; /** * Whether the messages were pinned or unpinned */ pinned?: boolean; /** * Peer */ peer: tl.TypePeer; /** * Message IDs */ messages: number[]; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Messages were pinned/unpinned in a * channel/supergroup */ interface RawUpdatePinnedChannelMessages { _: 'updatePinnedChannelMessages'; /** * Whether the messages were pinned or unpinned */ pinned?: boolean; /** * Channel ID */ channelId: number; /** * Messages */ messages: number[]; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Chat ({@link RawChat} and/or {@linkƒRawChatFull}) * information was updated. * * This update can only be received through getDifference or in * {@link RawUpdates}/{@linkƒRawUpdatesCombined} constructors, * so it will always come bundled with the * updated {@link RawChat}, that should be applied * as usual * », without re-fetching the info * manually. * * However, full peer information will not come bundled in * updates, so the full peer cache ({@link RawChatFull}) must * be invalidated for chat_id when receiving this * update. */ interface RawUpdateChat { _: 'updateChat'; /** * Chat ID */ chatId: number; } /** * The participant list of a certain group call has changed */ interface RawUpdateGroupCallParticipants { _: 'updateGroupCallParticipants'; /** * Group call */ call: tl.TypeInputGroupCall; /** * New participant list */ participants: tl.TypeGroupCallParticipant[]; /** * Version */ version: number; } /** * A new groupcall was started */ interface RawUpdateGroupCall { _: 'updateGroupCall'; liveStory?: boolean; peer?: tl.TypePeer; /** * Info about the group call or livestream */ call: tl.TypeGroupCall; } /** * The Time-To-Live for messages sent by the current user in a * specific chat has changed */ interface RawUpdatePeerHistoryTTL { _: 'updatePeerHistoryTTL'; /** * The chat */ peer: tl.TypePeer; /** * The new Time-To-Live */ ttlPeriod?: number; } /** * A user has joined or left a specific chat */ interface RawUpdateChatParticipant { _: 'updateChatParticipant'; /** * Chat * ID */ chatId: number; /** * 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) */ actorId: number; /** * User that was affected by the change */ userId: number; /** * Previous participant info (empty if this participant just * joined) */ prevParticipant?: tl.TypeChatParticipant; /** * New participant info (empty if this participant just left) */ newParticipant?: tl.TypeChatParticipant; /** * The invite that was used to join the group */ invite?: tl.TypeExportedChatInvite; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * A participant has left, joined, was banned or admined in a * channel * or supergroup. */ interface RawUpdateChannelParticipant { _: 'updateChannelParticipant'; /** * Whether the participant joined using a * chat * folder deep link ». */ viaChatlist?: boolean; /** * Channel ID */ channelId: number; /** * Date of the event */ date: number; /** * User that triggered the change (inviter, admin that kicked * the user, or the even the user_id itself) */ actorId: number; /** * User that was affected by the change */ userId: number; /** * Previous participant status */ prevParticipant?: tl.TypeChannelParticipant; /** * New participant status */ newParticipant?: tl.TypeChannelParticipant; /** * Chat invite used to join the * channel/supergroup */ invite?: tl.TypeExportedChatInvite; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * A bot was stopped or re-started. */ interface RawUpdateBotStopped { _: 'updateBotStopped'; /** * The user ID */ userId: number; /** * When did this action occur */ date: number; /** * Whether the bot was stopped or started */ stopped: boolean; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * New WebRTC parameters */ interface RawUpdateGroupCallConnection { _: 'updateGroupCallConnection'; /** * Are these parameters related to the screen capture session * currently in progress? */ presentation?: boolean; /** * WebRTC parameters */ params: tl.TypeDataJSON; } /** * The * command * set of a certain bot in a certain chat has changed. */ interface RawUpdateBotCommands { _: 'updateBotCommands'; /** * The affected chat */ peer: tl.TypePeer; /** * ID of the bot that changed its command set */ botId: number; /** * New bot commands */ commands: tl.TypeBotCommand[]; } /** * Someone has requested to join a chat or channel */ interface RawUpdatePendingJoinRequests { _: 'updatePendingJoinRequests'; /** * Chat or channel */ peer: tl.TypePeer; /** * Number of pending * join * requests » for the chat or channel */ requestsPending: number; /** * IDs of users that have recently requested to join */ recentRequesters: number[]; } /** * Someone has requested to join a chat or channel (bots only, * users will receive an {@link RawUpdatePendingJoinRequests}, * instead) */ interface RawUpdateBotChatInviteRequester { _: 'updateBotChatInviteRequester'; /** * The chat or channel in question */ peer: tl.TypePeer; /** * When was the * join * request » made */ date: number; /** * The user ID that is asking to join the chat or channel */ userId: number; /** * Bio of the user */ about: string; /** * Chat invite link that was used by the user to send the * join * request » */ invite: tl.TypeExportedChatInvite; /** * QTS * event sequence identifier */ qts: number; } /** * New * message * reactions » are available */ interface RawUpdateMessageReactions { _: 'updateMessageReactions'; /** * Peer */ peer: tl.TypePeer; /** * Message ID */ msgId: number; /** * Forum * topic ID */ topMsgId?: number; /** * If set, the reactions are in the specified * monoforum * topic ». */ savedPeerId?: tl.TypePeer; /** * Reactions */ reactions: tl.TypeMessageReactions; } /** * The list of installed * attachment * menu entries » has changed, use * {@link messages.RawGetAttachMenuBotsRequest} to fetch the * updated list. */ interface RawUpdateAttachMenuBots { _: 'updateAttachMenuBots'; } /** * Indicates to a bot that a webview was closed and an inline * message was sent on behalf of the user using * {@link messages.RawSendWebViewResultMessageRequest} */ interface RawUpdateWebViewResultSent { _: 'updateWebViewResultSent'; /** * Web app interaction ID */ queryId: Long; } /** * The menu button behavior for the specified bot has changed */ interface RawUpdateBotMenuButton { _: 'updateBotMenuButton'; /** * Bot ID */ botId: number; /** * New menu button */ button: tl.TypeBotMenuButton; } /** * The list of saved notification sounds has changed, use * {@link account.RawGetSavedRingtonesRequest} to fetch the new * list. */ interface RawUpdateSavedRingtones { _: 'updateSavedRingtones'; } /** * A pending * voice * message transcription » initiated with * {@link messages.RawTranscribeAudioRequest} was updated. */ interface RawUpdateTranscribedAudio { _: 'updateTranscribedAudio'; /** * Whether this transcription is still pending and further * {@link RawUpdateTranscribedAudio} about it will be sent in * the future. */ pending?: boolean; /** * Peer of the transcribed message */ peer: tl.TypePeer; /** * Transcribed message ID */ msgId: number; /** * Transcription ID */ transcriptionId: Long; /** * Transcribed text */ text: string; } /** * Some featured * custom * emoji stickers were marked as read */ interface RawUpdateReadFeaturedEmojiStickers { _: 'updateReadFeaturedEmojiStickers'; } /** * The * emoji * status of a certain user has changed */ interface RawUpdateUserEmojiStatus { _: 'updateUserEmojiStatus'; /** * User ID */ userId: number; /** * New * emoji * status */ emojiStatus: tl.TypeEmojiStatus; } /** * The list of recent * emoji * statuses has changed */ interface RawUpdateRecentEmojiStatuses { _: 'updateRecentEmojiStatuses'; } /** * The list of recent * message * reactions has changed */ interface RawUpdateRecentReactions { _: 'updateRecentReactions'; } /** * A stickerset was just moved to top, * see * here for more info » */ interface RawUpdateMoveStickerSetToTop { _: 'updateMoveStickerSetToTop'; /** * This update is referring to a * mask * stickerset */ masks?: boolean; /** * This update is referring to a * custom * emoji stickerset */ emojis?: boolean; /** * Stickerset * ID */ stickerset: Long; } /** * You * bought * a paid media »: this update contains the revealed media. */ interface RawUpdateMessageExtendedMedia { _: 'updateMessageExtendedMedia'; /** * Peer where the paid media was posted */ peer: tl.TypePeer; /** * ID of the message containing the paid media */ msgId: number; /** * Revealed media, contains only * {@link RawMessageExtendedMedia} constructors. */ extendedMedia: tl.TypeMessageExtendedMedia[]; } /** * User ({@link RawUser} and/or {@linkƒRawUserFull}) * information was updated. * * This update can only be received through getDifference or in * {@link RawUpdates}/{@linkƒRawUpdatesCombined} constructors, * so it will always come bundled with the * updated {@link RawUser}, that should be applied * as usual * », without re-fetching the info * manually. * * However, full peer information will not come bundled in * updates, so the full peer cache ({@link RawUserFull}) must * be invalidated for user_id when receiving this * update. */ interface RawUpdateUser { _: 'updateUser'; /** * User ID */ userId: number; } /** * Media autosave settings have changed and must be refetched * using {@link account.RawGetAutoSaveSettingsRequest}. */ interface RawUpdateAutoSaveSettings { _: 'updateAutoSaveSettings'; } /** * A new story was posted. */ interface RawUpdateStory { _: 'updateStory'; /** * ID of the poster. */ peer: tl.TypePeer; /** * The story that was posted. */ story: tl.TypeStoryItem; } /** * Stories of a specific peer were marked as read. */ interface RawUpdateReadStories { _: 'updateReadStories'; /** * The peer */ peer: tl.TypePeer; /** * ID of the last story that was marked as read */ maxId: number; } /** * A story was successfully uploaded. * * Once a story is successfully uploaded, an * {@link RawUpdateStoryID} will be returned, indicating the * story ID (id) that was attributed to the story * (like for messages, random_id indicates the * random_id that was passed to * {@link stories.RawSendStoryRequest}: this way, you can tell * which story was assigned a specific id by * checking which {@link stories.RawSendStoryRequest} call has * the returned random_id). */ interface RawUpdateStoryID { _: 'updateStoryID'; /** * The id that was attributed to the story. */ id: number; /** * The random_id that was passed to * {@link stories.RawSendStoryRequest}. */ randomId: Long; } /** * Indicates that * stories * stealth mode was activated. */ interface RawUpdateStoriesStealthMode { _: 'updateStoriesStealthMode'; /** * Information about the current * stealth * mode session. */ stealthMode: tl.TypeStoriesStealthMode; } /** * Indicates we * reacted * to a story ». */ interface RawUpdateSentStoryReaction { _: 'updateSentStoryReaction'; /** * The peer that sent the story */ peer: tl.TypePeer; /** * ID of the story we reacted to */ storyId: number; /** * The reaction that was sent */ reaction: tl.TypeReaction; } /** * A * channel/supergroup * boost has changed (bots only) */ interface RawUpdateBotChatBoost { _: 'updateBotChatBoost'; /** * Channel */ peer: tl.TypePeer; /** * New boost information */ boost: tl.TypeBoost; /** * QTS * event sequence identifier */ qts: number; } /** * 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 * {@link channels.RawToggleViewForumAsMessagesRequest} method; * invoking this method will update the value of the * view_forum_as_messages flag of * {@link RawChannelFull} or {@linkƒRawDialog} and emit an * {@link RawUpdateChannelViewForumAsMessages}. */ interface RawUpdateChannelViewForumAsMessages { _: 'updateChannelViewForumAsMessages'; /** * The forum ID */ channelId: number; /** * The new value of the toggle. */ enabled: boolean; } /** * The * wallpaper * » of a given peer has changed. */ interface RawUpdatePeerWallpaper { _: 'updatePeerWallpaper'; /** * Whether the other user has chosen a custom wallpaper for us * using {@link messages.RawSetChatWallPaperRequest} and the * for_both flag, see * here * » for more info. */ wallpaperOverridden?: boolean; /** * The peer where the wallpaper has changed. */ peer: tl.TypePeer; /** * The new wallpaper, if none the wallpaper was removed and the * default wallpaper should be used. */ wallpaper?: tl.TypeWallPaper; } /** * Bots only: a user has changed their reactions on a message * with public reactions. */ interface RawUpdateBotMessageReaction { _: 'updateBotMessageReaction'; /** * Peer of the reacted-to message. */ peer: tl.TypePeer; /** * ID of the reacted-to message. */ msgId: number; /** * Date of the change. */ date: number; /** * The user that (un)reacted to the message. */ actor: tl.TypePeer; /** * Old reactions */ oldReactions: tl.TypeReaction[]; /** * New reactions */ newReactions: tl.TypeReaction[]; /** * QTS * event sequence identifier */ qts: number; } /** * Bots only: the number of reactions on a message with * anonymous reactions has changed. */ interface RawUpdateBotMessageReactions { _: 'updateBotMessageReactions'; /** * Peer of the reacted-to message. */ peer: tl.TypePeer; /** * ID of the reacted-to message. */ msgId: number; /** * Date of the change. */ date: number; /** * New reaction counters. */ reactions: tl.TypeReactionCount[]; /** * QTS * event sequence identifier */ qts: number; } /** * A * saved * message dialog was pinned/unpinned */ interface RawUpdateSavedDialogPinned { _: 'updateSavedDialogPinned'; /** * Whether the dialog was pinned */ pinned?: boolean; /** * The dialog */ peer: tl.TypeDialogPeer; } /** * Pinned * saved dialogs » were updated */ interface RawUpdatePinnedSavedDialogs { _: 'updatePinnedSavedDialogs'; /** * New order of pinned saved dialogs */ order?: tl.TypeDialogPeer[]; } /** * The list of * reaction * tag » names assigned by the user has changed and should * be refetched using * {@link messages.RawGetSavedReactionTagsRequest}. */ interface RawUpdateSavedReactionTags { _: 'updateSavedReactionTags'; } /** * A new SMS job was received */ interface RawUpdateSmsJob { _: 'updateSmsJob'; /** * SMS job ID */ jobId: string; } /** * Info about or the order of * quick * reply shortcuts » was changed. */ interface RawUpdateQuickReplies { _: 'updateQuickReplies'; /** * New quick reply shortcut order and information. */ quickReplies: tl.TypeQuickReply[]; } /** * A new * quick * reply shortcut » was created. */ interface RawUpdateNewQuickReply { _: 'updateNewQuickReply'; /** * Quick reply shortcut. */ quickReply: tl.TypeQuickReply; } /** * A * quick * reply shortcut » was deleted. This will * not emit * {@link RawUpdateDeleteQuickReplyMessages} updates, even if * all the messages in the shortcut are also deleted by this * update. */ interface RawUpdateDeleteQuickReply { _: 'updateDeleteQuickReply'; /** * ID of the quick reply shortcut that was deleted. */ shortcutId: number; } /** * A new message was added to a * quick * reply shortcut ». */ interface RawUpdateQuickReplyMessage { _: 'updateQuickReplyMessage'; /** * The message that was added (the * {@link RawMessage}.quick_reply_shortcut_id * field will contain the shortcut ID). */ message: tl.TypeMessage; } /** * One or more messages in a * quick * reply shortcut » were deleted. */ interface RawUpdateDeleteQuickReplyMessages { _: 'updateDeleteQuickReplyMessages'; /** * Quick reply shortcut ID. */ shortcutId: number; /** * IDs of the deleted messages. */ messages: number[]; } /** * Connecting or disconnecting a * business * bot or changing the connection settings will emit an * {@link RawUpdateBotBusinessConnect} update to the bot, with * the new settings and a connection_id that will * be used by the bot to handle updates from and send messages * as the user. */ interface RawUpdateBotBusinessConnect { _: 'updateBotBusinessConnect'; /** * Business connection settings */ connection: tl.TypeBotBusinessConnection; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * A message was received via a * connected * business chat ». */ interface RawUpdateBotNewBusinessMessage { _: 'updateBotNewBusinessMessage'; /** * Connection ID. */ connectionId: string; /** * New message. */ message: tl.TypeMessage; /** * The message that message is replying to. */ replyToMessage?: tl.TypeMessage; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * A message was edited in a * connected * business chat ». */ interface RawUpdateBotEditBusinessMessage { _: 'updateBotEditBusinessMessage'; /** * Business connection ID */ connectionId: string; /** * New message. */ message: tl.TypeMessage; /** * The message that message is replying to. */ replyToMessage?: tl.TypeMessage; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * A message was deleted in a * connected * business chat ». */ interface RawUpdateBotDeleteBusinessMessage { _: 'updateBotDeleteBusinessMessage'; /** * Business connection ID. */ connectionId: string; /** * Peer * where the messages were deleted. */ peer: tl.TypePeer; /** * IDs of the messages that were deleted. */ messages: number[]; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * Represents a new * reaction * to a story. */ interface RawUpdateNewStoryReaction { _: 'updateNewStoryReaction'; /** * Story * ID. */ storyId: number; /** * The peer where the story was posted. */ peer: tl.TypePeer; /** * The * reaction. */ reaction: tl.TypeReaction; } /** * The current account's * Telegram * Stars balance » has changed. */ interface RawUpdateStarsBalance { _: 'updateStarsBalance'; /** * New balance. */ balance: tl.TypeStarsAmount; } /** * A callback button sent via a * business * connection was pressed, and the button data was sent to * the bot that created the button. */ interface RawUpdateBusinessBotCallbackQuery { _: 'updateBusinessBotCallbackQuery'; /** * Query ID */ queryId: Long; /** * ID of the user that pressed the button */ userId: number; /** * Business * connection ID */ connectionId: string; /** * Message that contains the keyboard (also contains info about * the chat where the message was sent). */ message: tl.TypeMessage; /** * The message that message is replying to. */ replyToMessage?: tl.TypeMessage; /** * Global identifier, uniquely corresponding to the chat to * which the message with the callback button was sent. Useful * for high scores in games. */ chatInstance: Long; /** * Callback data */ data?: Uint8Array; } /** * The * Telegram * Star balance of a channel/bot we own has changed ». */ interface RawUpdateStarsRevenueStatus { _: 'updateStarsRevenueStatus'; /** * Channel/bot */ peer: tl.TypePeer; /** * New Telegram Star balance. */ status: tl.TypeStarsRevenueStatus; } /** * Bots only: a user has purchased a * paid * media. */ interface RawUpdateBotPurchasedPaidMedia { _: 'updateBotPurchasedPaidMedia'; /** * The user that bought the media */ userId: number; /** * Payload passed by the bot in * {@link RawInputMediaPaidMedia}.payload */ payload: string; /** * New qts value, see * updates * » for more info. */ qts: number; } /** * Contains the current * default * paid reaction privacy, see here » for more info. * * Clients should invoke * {@link messages.RawGetPaidReactionPrivacyRequest} on startup * to fetch the current default reaction privacy because this * update is only sent to currently online sessions and cannot * be fetched using getDifference on client startup. */ interface RawUpdatePaidReactionPrivacy { _: 'updatePaidReactionPrivacy'; /** * Paid reaction privacy settings. */ private: tl.TypePaidReactionPrivacy; } /** * A paid login SMS code was successfully sent. */ interface RawUpdateSentPhoneCode { _: 'updateSentPhoneCode'; /** * Info about the sent code. */ sentCode: tl.auth.TypeSentCode; } /** * Contains updates to the blockchain of a conference call, see * here * » for more info. */ interface RawUpdateGroupCallChainBlocks { _: 'updateGroupCallChainBlocks'; /** * The conference call. */ call: tl.TypeInputGroupCall; /** * Subchain ID. */ subChainId: number; /** * Blocks. */ blocks: Uint8Array[]; /** * Offset of the next block. */ nextOffset: number; } /** * Incoming messages in a * monoforum * topic were read */ interface RawUpdateReadMonoForumInbox { _: 'updateReadMonoForumInbox'; /** * ID of the monoforum. */ channelId: number; /** * Topic ID. */ savedPeerId: tl.TypePeer; /** * Position up to which all incoming messages are read. */ readMaxId: number; } /** * Outgoing messages in a * monoforum * were read. */ interface RawUpdateReadMonoForumOutbox { _: 'updateReadMonoForumOutbox'; /** * ID of the monoforum. */ channelId: number; /** * Topic ID. */ savedPeerId: tl.TypePeer; /** * Position up to which all outgoing messages are read. */ readMaxId: number; } /** * An admin has (un)exempted this * monoforum * topic » from payment to send messages using * {@link account.RawToggleNoPaidMessagesExceptionRequest}. */ interface RawUpdateMonoForumNoPaidException { _: 'updateMonoForumNoPaidException'; /** * If set, an admin has exempted this peer, otherwise the peer * was unexempted. */ exception?: boolean; /** * The monoforum ID. */ channelId: number; /** * The peer/topic ID. */ savedPeerId: tl.TypePeer; } interface RawUpdateGroupCallMessage { _: 'updateGroupCallMessage'; call: tl.TypeInputGroupCall; message: tl.TypeGroupCallMessage; } interface RawUpdateGroupCallEncryptedMessage { _: 'updateGroupCallEncryptedMessage'; call: tl.TypeInputGroupCall; fromId: tl.TypePeer; encryptedMessage: Uint8Array; } interface RawUpdatePinnedForumTopic { _: 'updatePinnedForumTopic'; pinned?: boolean; peer: tl.TypePeer; topicId: number; } interface RawUpdatePinnedForumTopics { _: 'updatePinnedForumTopics'; peer: tl.TypePeer; order?: number[]; } interface RawUpdateDeleteGroupCallMessages { _: 'updateDeleteGroupCallMessages'; call: tl.TypeInputGroupCall; messages: number[]; } interface RawUpdateStarGiftAuctionState { _: 'updateStarGiftAuctionState'; giftId: Long; state: tl.TypeStarGiftAuctionState; } interface RawUpdateStarGiftAuctionUserState { _: 'updateStarGiftAuctionUserState'; giftId: Long; userState: tl.TypeStarGiftAuctionUserState; } interface RawUpdateEmojiGameInfo { _: 'updateEmojiGameInfo'; info: tl.messages.TypeEmojiGameInfo; } interface RawUpdateStarGiftCraftFail { _: 'updateStarGiftCraftFail'; } interface RawUpdateChatParticipantRank { _: 'updateChatParticipantRank'; chatId: number; userId: number; rank: string; version: number; } /** * Too many updates, it is necessary to execute * {@link updates.RawGetDifferenceRequest}. */ interface RawUpdatesTooLong { _: 'updatesTooLong'; } /** * Info about a message sent to (received from) another user */ interface RawUpdateShortMessage { _: 'updateShortMessage'; /** * Whether the message is outgoing */ out?: boolean; /** * Whether we were mentioned in the message */ mentioned?: boolean; /** * Whether there are some unread mentions in * this message */ mediaUnread?: boolean; /** * If true, the message is a silent message, no notifications * should be triggered */ silent?: boolean; /** * The message ID */ id: number; /** * The ID of the sender (if outgoing will be the * ID of the destination) of the message */ userId: number; /** * The message */ message: string; /** * PTS */ pts: number; /** * PTS * count */ ptsCount: number; /** * date */ date: number; /** * Info about a forwarded message */ fwdFrom?: tl.TypeMessageFwdHeader; /** * Info about the inline bot used to generate this message */ viaBotId?: number; /** * Reply and * thread * information */ replyTo?: tl.TypeMessageReplyHeader; /** * Entities * for styled text */ entities?: tl.TypeMessageEntity[]; /** * 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. */ ttlPeriod?: number; } /** * Shortened constructor containing info on one new incoming * text message from a chat */ interface RawUpdateShortChatMessage { _: 'updateShortChatMessage'; /** * Whether the message is outgoing */ out?: boolean; /** * Whether we were mentioned in this message */ mentioned?: boolean; /** * Whether the message contains some unread * mentions */ mediaUnread?: boolean; /** * If true, the message is a silent message, no notifications * should be triggered */ silent?: boolean; /** * ID of the message */ id: number; /** * ID of the sender of the message */ fromId: number; /** * ID of the chat where the message was sent */ chatId: number; /** * Message */ message: string; /** * PTS */ pts: number; /** * PTS * count */ ptsCount: number; /** * date */ date: number; /** * Info about a forwarded message */ fwdFrom?: tl.TypeMessageFwdHeader; /** * Info about the inline bot used to generate this message */ viaBotId?: number; /** * Reply (thread) information */ replyTo?: tl.TypeMessageReplyHeader; /** * Entities * for styled text */ entities?: tl.TypeMessageEntity[]; /** * 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. */ ttlPeriod?: number; } /** * Shortened constructor containing info on one update not * requiring auxiliary data */ interface RawUpdateShort { _: 'updateShort'; /** * Update */ update: tl.TypeUpdate; /** * Date of event */ date: number; } /** * Constructor for a group of updates. */ interface RawUpdatesCombined { _: 'updatesCombined'; /** * List of updates */ updates: tl.TypeUpdate[]; /** * List of users mentioned in updates */ users: tl.TypeUser[]; /** * List of chats mentioned in updates */ chats: tl.TypeChat[]; /** * Current date */ date: number; /** * Value seq for the earliest update in a * group */ seqStart: number; /** * Value seq for the latest update in a group */ seq: number; } /** * Full constructor of updates */ interface RawUpdates { _: 'updates'; /** * List of updates */ updates: tl.TypeUpdate[]; /** * List of users mentioned in updates */ users: tl.TypeUser[]; /** * List of chats mentioned in updates */ chats: tl.TypeChat[]; /** * Current date */ date: number; /** * Total number of sent updates */ seq: number; } /** * 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). */ interface RawUpdateShortSentMessage { _: 'updateShortSentMessage'; /** * Whether the message is outgoing */ out?: boolean; /** * ID of the sent message */ id: number; /** * PTS */ pts: number; /** * PTS * count */ ptsCount: number; /** * date */ date: number; /** * Attached media */ media?: tl.TypeMessageMedia; /** * Entities * for styled text */ entities?: tl.TypeMessageEntity[]; /** * 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. */ ttlPeriod?: number; } /** * Data center */ interface RawDcOption { _: 'dcOption'; /** * Whether the specified IP is an IPv6 address */ ipv6?: boolean; /** * Whether this DC should only be used to * download * or upload files */ mediaOnly?: boolean; /** * Whether this DC only supports connection with * transport * obfuscation */ tcpoOnly?: boolean; /** * Whether this is a * CDN DC. */ cdn?: boolean; /** * If set, this IP should be used when connecting through a * proxy */ static?: boolean; /** * If set, clients must connect using only the specified port, * without trying any other port. */ thisPortOnly?: boolean; /** * DC ID */ id: number; /** * IP address of DC */ ipAddress: string; /** * Port */ port: number; /** * If the tcpo_only flag is set, specifies the * secret to use when connecting using * transport * obfuscation */ secret?: Uint8Array; } /** * Current configuration */ interface RawConfig { _: 'config'; /** * Whether the client should use P2P by default for phone calls * with contacts */ defaultP2pContacts?: boolean; /** * Whether the client should preload featured stickers */ preloadFeaturedStickers?: boolean; /** * Whether incoming private messages can be deleted for both * participants */ revokePmInbox?: boolean; /** * Indicates that telegram is probably censored by * governments/ISPs in the current region */ blockedMode?: boolean; /** * Whether to forcefully connect using IPv6 * dcOptions, * even if the client knows that IPv4 is available. */ forceTryIpv6?: boolean; /** * Current date at the server */ date: number; /** * Expiration date of this config: when it expires it'll have * to be refetched using {@link help.RawGetConfigRequest} */ expires: number; /** * Whether we're connected to the test DCs */ testMode: boolean; /** * ID of the DC that returned the reply */ thisDc: number; /** * DC IP list */ dcOptions: tl.TypeDcOption[]; /** * Domain name for fetching encrypted DC list from DNS TXT * record */ dcTxtDomainName: string; /** * Maximum member count for normal * groups */ chatSizeMax: number; /** * Maximum member count for * supergroups */ megagroupSizeMax: number; /** * Maximum number of messages that can be forwarded at once * using {@link messages.RawForwardMessagesRequest}. */ forwardedCountMax: number; /** * The client should {@link account.RawUpdateStatusRequest} * every N milliseconds */ onlineUpdatePeriodMs: number; /** * Delay before offline status needs to be sent to the server */ offlineBlurTimeoutMs: number; /** * Time without any user activity after which it should be * treated offline */ offlineIdleTimeoutMs: 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. */ onlineCloudTimeoutMs: number; /** * If we are offline, but online from some other client then * delay sending the offline notification for * notify_cloud_delay_ms milliseconds. */ notifyCloudDelayMs: number; /** * If some other client is online, then delay notification for * notification_default_delay_ms milliseconds */ notifyDefaultDelayMs: number; /** * Not for client use */ pushChatPeriodMs: number; /** * Not for client use */ pushChatLimit: number; /** * Only messages with age smaller than the one specified can be * edited */ editTimeLimit: number; /** * Only channel/supergroup messages with age smaller than the * specified can be deleted */ revokeTimeLimit: number; /** * Only private messages with age smaller than the specified * can be deleted */ revokePmTimeLimit: number; /** * Exponential decay rate for computing * top * peer rating */ ratingEDecay: number; /** * Maximum number of recent stickers */ stickersRecentLimit: number; /** * Indicates that round videos (video notes) and voice messages * sent in channels and older than the specified period must be * marked as read */ channelsReadMediaPeriod: number; /** * Temporary * passport * sessions */ tmpSessions?: 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 */ callReceiveTimeoutMs: 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 */ callRingTimeoutMs: 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 */ callConnectTimeoutMs: number; /** * If during a VoIP call a packet isn't received for the * specified period of time, the call must be aborted */ callPacketTimeoutMs: number; /** * The domain to use to parse * deep links * ». */ meUrlPrefix: string; /** * URL to use to auto-update the current app */ autoupdateUrlPrefix?: string; /** * Username of the bot to use to search for GIFs */ gifSearchUsername?: string; /** * Username of the bot to use to search for venues */ venueSearchUsername?: string; /** * Username of the bot to use for image search */ imgSearchUsername?: string; /** * ID of the map provider to use for venues */ staticMapsProvider?: string; /** * Maximum length of caption (length in utf8 codepoints) */ captionLengthMax: number; /** * Maximum length of messages (length in utf8 codepoints) */ messageLengthMax: number; /** * DC ID to use to download * webfiles */ webfileDcId: number; /** * Suggested language code */ suggestedLangCode?: string; /** * Language pack version */ langPackVersion?: number; /** * Basic language pack version */ baseLangPackVersion?: number; /** * Default * message * reaction */ reactionsDefault?: tl.TypeReaction; /** * Autologin token, * click * here for more info on URL authorization ». */ autologinToken?: string; } /** * Nearest data center, according to geo-ip. */ interface RawNearestDc { _: 'nearestDc'; /** * Country code determined by geo-ip */ country: string; /** * Number of current data center */ thisDc: number; /** * Number of nearest data center */ nearestDc: number; } /** * Empty constructor. */ interface RawEncryptedChatEmpty { _: 'encryptedChatEmpty'; /** * Chat ID */ id: number; } /** * Chat waiting for approval of second participant. */ interface RawEncryptedChatWaiting { _: 'encryptedChatWaiting'; /** * Chat ID */ id: number; /** * Checking sum depending on user ID */ accessHash: Long; /** * Date of chat creation */ date: number; /** * Chat creator ID */ adminId: number; /** * ID of second chat participant */ participantId: number; } /** * Request to create an encrypted chat. */ interface RawEncryptedChatRequested { _: 'encryptedChatRequested'; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Chat ID */ id: number; /** * Check sum depending on user ID */ accessHash: Long; /** * Chat creation date */ date: number; /** * Chat creator ID */ adminId: number; /** * ID of second chat participant */ participantId: number; /** * A = g ^ a mod p, see * Wikipedia */ gA: Uint8Array; } /** * Encrypted chat */ interface RawEncryptedChat { _: 'encryptedChat'; /** * Chat ID */ id: number; /** * Check sum dependent on the user ID */ accessHash: Long; /** * Date chat was created */ date: number; /** * Chat creator ID */ adminId: number; /** * ID of the second chat participant */ participantId: number; /** * B = g ^ b mod p, if the currently authorized * user is the chat's creator, * * or A = g ^ a mod p otherwise * * See * Wikipedia * for more info */ gAOrB: Uint8Array; /** * 64-bit fingerprint of received key */ keyFingerprint: Long; } /** * Discarded or deleted chat. */ interface RawEncryptedChatDiscarded { _: 'encryptedChatDiscarded'; /** * Whether both users of this secret chat should also remove * all of its messages */ historyDeleted?: boolean; /** * Chat ID */ id: number; } /** * Creates an encrypted chat. */ interface RawInputEncryptedChat { _: 'inputEncryptedChat'; /** * Chat ID */ chatId: number; /** * Checking sum from constructor {@link RawEncryptedChat}, * {@link RawEncryptedChatWaiting} or * {@link RawEncryptedChatRequested} */ accessHash: Long; } /** * Empty constructor, non-existing file. */ interface RawEncryptedFileEmpty { _: 'encryptedFileEmpty'; } /** * Encrypted file. */ interface RawEncryptedFile { _: 'encryptedFile'; /** * File ID */ id: Long; /** * Checking sum depending on user ID */ accessHash: Long; /** * File size in bytes */ size: number; /** * Number of data center */ dcId: number; /** * 32-bit fingerprint of key used for file encryption */ keyFingerprint: number; } /** * Empty constructor. */ interface RawInputEncryptedFileEmpty { _: 'inputEncryptedFileEmpty'; } /** * Sets new encrypted file saved by parts using * upload.saveFilePart method. */ interface RawInputEncryptedFileUploaded { _: 'inputEncryptedFileUploaded'; /** * Random file ID created by client */ id: Long; /** * Number of saved parts */ parts: number; /** * In case * md5-HASH of * the (already encrypted) file was transmitted, file content * will be checked prior to use */ md5Checksum: string; /** * 32-bit fingerprint of the key used to encrypt a file */ keyFingerprint: number; } /** * Sets forwarded encrypted file for attachment. */ interface RawInputEncryptedFile { _: 'inputEncryptedFile'; /** * File ID, value of id parameter from * {@link RawEncryptedFile} */ id: Long; /** * Checking sum, value of access_hash * parameter from {@link RawEncryptedFile} */ accessHash: Long; } /** * Assigns a new big encrypted file (over 10 MB in size), saved * in parts using the method * {@link upload.RawSaveBigFilePartRequest}. */ interface RawInputEncryptedFileBigUploaded { _: 'inputEncryptedFileBigUploaded'; /** * Random file id, created by the client */ id: Long; /** * Number of saved parts */ parts: number; /** * 32-bit imprint of the key used to encrypt the file */ keyFingerprint: number; } /** * Encrypted message. */ interface RawEncryptedMessage { _: 'encryptedMessage'; /** * Random message ID, assigned by the author of message */ randomId: Long; /** * ID of encrypted chat */ chatId: number; /** * Date of sending */ date: number; /** * TL-serialization of * DecryptedMessage * type, encrypted with the key created at chat initialization */ bytes: Uint8Array; /** * Attached encrypted file */ file: tl.TypeEncryptedFile; } /** * Encrypted service message */ interface RawEncryptedMessageService { _: 'encryptedMessageService'; /** * Random message ID, assigned by the author of message */ randomId: Long; /** * ID of encrypted chat */ chatId: number; /** * Date of sending */ date: number; /** * TL-serialization of the * DecryptedMessage * type, encrypted with the key created at chat initialization */ bytes: Uint8Array; } /** * Empty constructor. */ interface RawInputDocumentEmpty { _: 'inputDocumentEmpty'; } /** * Defines a document for subsequent interaction. */ interface RawInputDocument { _: 'inputDocument'; /** * Document ID */ id: Long; /** * access_hash parameter from the * {@link RawDocument} constructor */ accessHash: Long; /** * File * reference */ fileReference: Uint8Array; } /** * Empty constructor, document doesn't exist. */ interface RawDocumentEmpty { _: 'documentEmpty'; /** * Document ID or 0 */ id: Long; } /** * Document */ interface RawDocument { _: 'document'; /** * Document ID */ id: Long; /** * Check sum, dependent on document ID */ accessHash: Long; /** * File * reference */ fileReference: Uint8Array; /** * Creation date */ date: number; /** * MIME type */ mimeType: string; /** * Size */ size: number; /** * Thumbnails */ thumbs?: tl.TypePhotoSize[]; /** * Video thumbnails */ videoThumbs?: tl.TypeVideoSize[]; /** * DC ID */ dcId: number; /** * Attributes */ attributes: tl.TypeDocumentAttribute[]; } /** * Notifications generated by a certain user or group. */ interface RawNotifyPeer { _: 'notifyPeer'; /** * user or group */ peer: tl.TypePeer; } /** * Notifications generated by all users. */ interface RawNotifyUsers { _: 'notifyUsers'; } /** * Notifications generated by all groups. */ interface RawNotifyChats { _: 'notifyChats'; } /** * Channel notification settings */ interface RawNotifyBroadcasts { _: 'notifyBroadcasts'; } /** * Notifications generated by a * topic * in a * forum. */ interface RawNotifyForumTopic { _: 'notifyForumTopic'; /** * Forum ID */ peer: tl.TypePeer; /** * Topic * ID */ topMsgId: number; } /** * User is typing. */ interface RawSendMessageTypingAction { _: 'sendMessageTypingAction'; } /** * Invalidate all previous action updates. E.g. when user * deletes entered text or aborts a video upload. */ interface RawSendMessageCancelAction { _: 'sendMessageCancelAction'; } /** * User is recording a video. */ interface RawSendMessageRecordVideoAction { _: 'sendMessageRecordVideoAction'; } /** * User is uploading a video. */ interface RawSendMessageUploadVideoAction { _: 'sendMessageUploadVideoAction'; /** * Progress percentage */ progress: number; } /** * User is recording a voice message. */ interface RawSendMessageRecordAudioAction { _: 'sendMessageRecordAudioAction'; } /** * User is uploading a voice message. */ interface RawSendMessageUploadAudioAction { _: 'sendMessageUploadAudioAction'; /** * Progress percentage */ progress: number; } /** * User is uploading a photo. */ interface RawSendMessageUploadPhotoAction { _: 'sendMessageUploadPhotoAction'; /** * Progress percentage */ progress: number; } /** * User is uploading a file. */ interface RawSendMessageUploadDocumentAction { _: 'sendMessageUploadDocumentAction'; /** * Progress percentage */ progress: number; } /** * User is selecting a location to share. */ interface RawSendMessageGeoLocationAction { _: 'sendMessageGeoLocationAction'; } /** * User is selecting a contact to share. */ interface RawSendMessageChooseContactAction { _: 'sendMessageChooseContactAction'; } /** * User is playing a game */ interface RawSendMessageGamePlayAction { _: 'sendMessageGamePlayAction'; } /** * User is recording a round video to share */ interface RawSendMessageRecordRoundAction { _: 'sendMessageRecordRoundAction'; } /** * User is uploading a round video */ interface RawSendMessageUploadRoundAction { _: 'sendMessageUploadRoundAction'; /** * Progress percentage */ progress: number; } /** * User is currently speaking in the group call */ interface RawSpeakingInGroupCallAction { _: 'speakingInGroupCallAction'; } /** * Chat history is being imported */ interface RawSendMessageHistoryImportAction { _: 'sendMessageHistoryImportAction'; /** * Progress percentage */ progress: number; } /** * User is choosing a sticker */ interface RawSendMessageChooseStickerAction { _: 'sendMessageChooseStickerAction'; } /** * User has clicked on an animated emoji triggering a * reaction, * click here for more info ». */ interface RawSendMessageEmojiInteraction { _: 'sendMessageEmojiInteraction'; /** * Emoji */ emoticon: string; /** * Message ID of the animated emoji that was clicked */ msgId: number; /** * A JSON object with interaction info, * click * here for more info » */ interaction: tl.TypeDataJSON; } /** * User is watching an animated emoji reaction triggered by * another user, * click * here for more info ». */ interface RawSendMessageEmojiInteractionSeen { _: 'sendMessageEmojiInteractionSeen'; /** * Emoji */ emoticon: string; } interface RawSendMessageTextDraftAction { _: 'sendMessageTextDraftAction'; randomId: Long; text: tl.TypeTextWithEntities; } /** * Whether people will be able to see our exact last online * timestamp. * * Note that if we decide to hide our exact last * online timestamp to someone (i.e., users A, B, C, or all * users) and we do not have a * Premium * subscription, we won't be able to see the exact last online * timestamp of those users (A, B, C, or all users), even if * those users do share it with us. * * If those users do share their exact online status * with us, but we can't see it due to the reason mentioned * above, the by_me flag of * {@link RawUserStatusRecently}, * {@link RawUserStatusLastWeek}, * {@link RawUserStatusLastMonth} will be set. */ interface RawInputPrivacyKeyStatusTimestamp { _: 'inputPrivacyKeyStatusTimestamp'; } /** * Whether people will be able to invite you to chats */ interface RawInputPrivacyKeyChatInvite { _: 'inputPrivacyKeyChatInvite'; } /** * Whether you will accept phone calls */ interface RawInputPrivacyKeyPhoneCall { _: 'inputPrivacyKeyPhoneCall'; } /** * Whether to allow P2P communication during VoIP calls */ interface RawInputPrivacyKeyPhoneP2P { _: 'inputPrivacyKeyPhoneP2P'; } /** * Whether messages forwarded from you will be * anonymous */ interface RawInputPrivacyKeyForwards { _: 'inputPrivacyKeyForwards'; } /** * Whether people will be able to see your profile picture */ interface RawInputPrivacyKeyProfilePhoto { _: 'inputPrivacyKeyProfilePhoto'; } /** * Whether people will be able to see your phone number */ interface RawInputPrivacyKeyPhoneNumber { _: 'inputPrivacyKeyPhoneNumber'; } /** * Whether people can add you to their contact list by your * phone number */ interface RawInputPrivacyKeyAddedByPhone { _: 'inputPrivacyKeyAddedByPhone'; } /** * Whether people can send you voice messages or round videos * (Premium * users only). */ interface RawInputPrivacyKeyVoiceMessages { _: 'inputPrivacyKeyVoiceMessages'; } /** * Whether people can see your bio */ interface RawInputPrivacyKeyAbout { _: 'inputPrivacyKeyAbout'; } /** * Whether the user can see our birthday. */ interface RawInputPrivacyKeyBirthday { _: 'inputPrivacyKeyBirthday'; } /** * Whether received * gifts * will be automatically displayed on our profile */ interface RawInputPrivacyKeyStarGiftsAutoSave { _: 'inputPrivacyKeyStarGiftsAutoSave'; } /** * Who can send you messages without paying, if * paid * messages » are enabled. */ interface RawInputPrivacyKeyNoPaidMessages { _: 'inputPrivacyKeyNoPaidMessages'; } interface RawInputPrivacyKeySavedMusic { _: 'inputPrivacyKeySavedMusic'; } /** * Whether we can see the last online timestamp of this user. * * Note that if we decide to hide our exact last * online timestamp to someone (i.e., users A, B, C, or all * users) and we do not have a * Premium * subscription, we won't be able to see the exact last online * timestamp of those users (A, B, C, or all users), even if * those users do share it with us. * * If those users do share their exact online status * with us, but we can't see it due to the reason mentioned * above, the by_me flag of * {@link RawUserStatusRecently}, * {@link RawUserStatusLastWeek}, * {@link RawUserStatusLastMonth} will be set. */ interface RawPrivacyKeyStatusTimestamp { _: 'privacyKeyStatusTimestamp'; } /** * Whether the user can be invited to chats */ interface RawPrivacyKeyChatInvite { _: 'privacyKeyChatInvite'; } /** * Whether the user accepts phone calls */ interface RawPrivacyKeyPhoneCall { _: 'privacyKeyPhoneCall'; } /** * Whether P2P connections in phone calls with this user are * allowed */ interface RawPrivacyKeyPhoneP2P { _: 'privacyKeyPhoneP2P'; } /** * Whether messages forwarded from the user will be * anonymously * forwarded */ interface RawPrivacyKeyForwards { _: 'privacyKeyForwards'; } /** * Whether the profile picture of the user is visible */ interface RawPrivacyKeyProfilePhoto { _: 'privacyKeyProfilePhoto'; } /** * Whether the user allows us to see their phone number */ interface RawPrivacyKeyPhoneNumber { _: 'privacyKeyPhoneNumber'; } /** * Whether this user can be added to our contact list by their * phone number */ interface RawPrivacyKeyAddedByPhone { _: 'privacyKeyAddedByPhone'; } /** * Whether the user accepts voice messages */ interface RawPrivacyKeyVoiceMessages { _: 'privacyKeyVoiceMessages'; } /** * Whether people can see your bio */ interface RawPrivacyKeyAbout { _: 'privacyKeyAbout'; } /** * Whether the user can see our birthday. */ interface RawPrivacyKeyBirthday { _: 'privacyKeyBirthday'; } /** * Whether received * gifts * will be automatically displayed on our profile */ interface RawPrivacyKeyStarGiftsAutoSave { _: 'privacyKeyStarGiftsAutoSave'; } /** * Who can send you messages without paying, if * paid * messages » are enabled. */ interface RawPrivacyKeyNoPaidMessages { _: 'privacyKeyNoPaidMessages'; } interface RawPrivacyKeySavedMusic { _: 'privacyKeySavedMusic'; } /** * Allow only contacts */ interface RawInputPrivacyValueAllowContacts { _: 'inputPrivacyValueAllowContacts'; } /** * Allow all users */ interface RawInputPrivacyValueAllowAll { _: 'inputPrivacyValueAllowAll'; } /** * Allow only certain users */ interface RawInputPrivacyValueAllowUsers { _: 'inputPrivacyValueAllowUsers'; /** * Allowed users */ users: tl.TypeInputUser[]; } /** * Disallow only contacts */ interface RawInputPrivacyValueDisallowContacts { _: 'inputPrivacyValueDisallowContacts'; } /** * Disallow all */ interface RawInputPrivacyValueDisallowAll { _: 'inputPrivacyValueDisallowAll'; } /** * Disallow only certain users */ interface RawInputPrivacyValueDisallowUsers { _: 'inputPrivacyValueDisallowUsers'; /** * Users to disallow */ users: tl.TypeInputUser[]; } /** * Allow only participants of certain chats */ interface RawInputPrivacyValueAllowChatParticipants { _: 'inputPrivacyValueAllowChatParticipants'; /** * Allowed chat IDs (either a {@link RawChat} or a * {@link RawChannel} ID, verbatim the way it is received in * the constructor (i.e. unlike with bot API IDs, here group * and supergroup IDs should be treated in the same way)). */ chats: number[]; } /** * Disallow only participants of certain chats */ interface RawInputPrivacyValueDisallowChatParticipants { _: 'inputPrivacyValueDisallowChatParticipants'; /** * Disallowed chat IDs (either a {@link RawChat} or a * {@link RawChannel} ID, verbatim the way it is received in * the constructor (i.e. unlike with bot API IDs, here group * and supergroup IDs should be treated in the same way)). */ chats: number[]; } /** * Allow only * close * friends » */ interface RawInputPrivacyValueAllowCloseFriends { _: 'inputPrivacyValueAllowCloseFriends'; } /** * Allow only users with a * Premium * subscription », currently only usable for * {@link RawInputPrivacyKeyChatInvite}. */ interface RawInputPrivacyValueAllowPremium { _: 'inputPrivacyValueAllowPremium'; } /** * Allow bots and mini apps */ interface RawInputPrivacyValueAllowBots { _: 'inputPrivacyValueAllowBots'; } /** * Disallow bots and mini apps */ interface RawInputPrivacyValueDisallowBots { _: 'inputPrivacyValueDisallowBots'; } /** * Allow all contacts */ interface RawPrivacyValueAllowContacts { _: 'privacyValueAllowContacts'; } /** * Allow all users */ interface RawPrivacyValueAllowAll { _: 'privacyValueAllowAll'; } /** * Allow only certain users */ interface RawPrivacyValueAllowUsers { _: 'privacyValueAllowUsers'; /** * Allowed users */ users: number[]; } /** * Disallow only contacts */ interface RawPrivacyValueDisallowContacts { _: 'privacyValueDisallowContacts'; } /** * Disallow all users */ interface RawPrivacyValueDisallowAll { _: 'privacyValueDisallowAll'; } /** * Disallow only certain users */ interface RawPrivacyValueDisallowUsers { _: 'privacyValueDisallowUsers'; /** * Disallowed users */ users: number[]; } /** * Allow all participants of certain chats */ interface RawPrivacyValueAllowChatParticipants { _: 'privacyValueAllowChatParticipants'; /** * Allowed chat IDs (either a {@link RawChat} or a * {@link RawChannel} ID, verbatim the way it is received in * the constructor (i.e. unlike with bot API IDs, here group * and supergroup IDs should be treated in the same way)). */ chats: number[]; } /** * Disallow only participants of certain chats */ interface RawPrivacyValueDisallowChatParticipants { _: 'privacyValueDisallowChatParticipants'; /** * Disallowed chats IDs (either a {@link RawChat} or a * {@link RawChannel} ID, verbatim the way it is received in * the constructor (i.e. unlike with bot API IDs, here group * and supergroup IDs should be treated in the same way)). */ chats: number[]; } /** * Allow only * close * friends » */ interface RawPrivacyValueAllowCloseFriends { _: 'privacyValueAllowCloseFriends'; } /** * Allow only users with a * Premium * subscription », currently only usable for * {@link RawInputPrivacyKeyChatInvite}. */ interface RawPrivacyValueAllowPremium { _: 'privacyValueAllowPremium'; } /** * Allow bots and mini apps */ interface RawPrivacyValueAllowBots { _: 'privacyValueAllowBots'; } /** * Disallow bots and mini apps */ interface RawPrivacyValueDisallowBots { _: 'privacyValueDisallowBots'; } /** * Time to live in days of the current account */ interface RawAccountDaysTTL { _: 'accountDaysTTL'; /** * This account will self-destruct in the specified number of * days */ days: number; } /** * Defines the width and height of an image uploaded as * document */ interface RawDocumentAttributeImageSize { _: 'documentAttributeImageSize'; /** * Width of image */ w: number; /** * Height of image */ h: number; } /** * Defines an animated GIF */ interface RawDocumentAttributeAnimated { _: 'documentAttributeAnimated'; } /** * Defines a sticker */ interface RawDocumentAttributeSticker { _: 'documentAttributeSticker'; /** * Whether this is a mask sticker */ mask?: boolean; /** * Alternative emoji representation of sticker */ alt: string; /** * Associated stickerset */ stickerset: tl.TypeInputStickerSet; /** * Mask coordinates (if this is a mask sticker, attached to a * photo) */ maskCoords?: tl.TypeMaskCoords; } /** * Defines a video */ interface RawDocumentAttributeVideo { _: 'documentAttributeVideo'; /** * Whether this is a round video */ roundMessage?: boolean; /** * Whether the video supports streaming */ supportsStreaming?: boolean; /** * Whether the specified document is a video file with no audio * tracks */ nosound?: boolean; /** * Duration in seconds */ duration: Double; /** * Video width */ w: number; /** * Video height */ h: number; /** * Number of bytes to preload when preloading videos * (particularly * video * stories). */ preloadPrefixSize?: number; /** * Floating point UNIX timestamp in seconds, indicating the * frame of the video that should be used as static preview and * thumbnail. */ videoStartTs?: Double; /** * Codec used for the video, i.e. "h264", "h265", or "av1" */ videoCodec?: string; } /** * Represents an audio file */ interface RawDocumentAttributeAudio { _: 'documentAttributeAudio'; /** * Whether this is a voice message */ voice?: boolean; /** * 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. */ waveform?: Uint8Array; } /** * A simple document with a file name */ interface RawDocumentAttributeFilename { _: 'documentAttributeFilename'; /** * The file name */ fileName: string; } /** * Whether the current document has stickers attached */ interface RawDocumentAttributeHasStickers { _: 'documentAttributeHasStickers'; } /** * Info about a custom emoji */ interface RawDocumentAttributeCustomEmoji { _: 'documentAttributeCustomEmoji'; /** * Whether this custom emoji can be sent by non-Premium users */ free?: boolean; /** * 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. */ textColor?: boolean; /** * The actual emoji */ alt: string; /** * The emoji stickerset to which this emoji belongs. */ stickerset: tl.TypeInputStickerSet; } /** * 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. */ interface RawStickerPack { _: 'stickerPack'; /** * Emoji */ emoticon: string; /** * Stickers */ documents: Long[]; } /** * No preview is available for the webpage */ interface RawWebPageEmpty { _: 'webPageEmpty'; /** * Preview ID */ id: Long; /** * URL of the webpage. */ url?: string; } /** * A preview of the webpage is currently being generated */ interface RawWebPagePending { _: 'webPagePending'; /** * ID of preview */ id: Long; /** * URL of the webpage */ url?: string; /** * When was the processing started */ date: number; } /** * Webpage preview */ interface RawWebPage { _: 'webPage'; /** * Whether the size of the media in the preview can be changed. */ hasLargeMedia?: boolean; /** * Represents a custom * video * cover. */ videoCoverPhoto?: boolean; /** * Preview ID */ id: Long; /** * URL of previewed webpage */ url: string; /** * Webpage URL to be displayed to the user */ displayUrl: string; /** * Hash * used for caching, for more info click here */ hash: number; /** * Type of the web page. One of the following: * * * * - app * * - article * * - document * * - gif * * - photo * * - profile * * - telegram_album * * - telegram_auction * * - telegram_background * * - telegram_bot * * - telegram_botapp * * - telegram_call * * - telegram_channel * * - telegram_channel_boost * * - telegram_channel_direct * * - telegram_channel_request * * - telegram_chat * * - telegram_chat_request * * - telegram_chatlist * * - telegram_collection * * - telegram_community * * - telegram_giftcode * * - telegram_group_boost * * - telegram_livestream * * - telegram_megagroup * * - telegram_megagroup_request * * - telegram_message * * - telegram_nft * * - telegram_stickerset * * - telegram_story * * - telegram_story_album * * - telegram_theme * * - telegram_user * * - telegram_videochat * * - telegram_voicechat * * - video * * * * */ type?: string; /** * Short name of the site (e.g., Google Docs, App Store) */ siteName?: string; /** * Title of the content */ title?: string; /** * Content description */ description?: string; /** * Image representing the content */ photo?: tl.TypePhoto; /** * URL to show in the embedded preview */ embedUrl?: string; /** * MIME type of the embedded preview, (e.g., text/html or * video/mp4) */ embedType?: string; /** * Width of the embedded preview */ embedWidth?: number; /** * Height of the embedded preview */ embedHeight?: number; /** * Duration of the content, in seconds */ duration?: number; /** * Author of the content */ author?: string; /** * Preview of the content as a media file */ document?: tl.TypeDocument; /** * Page contents in * instant view * format */ cachedPage?: tl.TypePage; /** * Webpage attributes */ attributes?: tl.TypeWebPageAttribute[]; } /** * The preview of the webpage hasn't changed */ interface RawWebPageNotModified { _: 'webPageNotModified'; /** * Page view count */ cachedPageViews?: number; } /** * Logged-in session */ interface RawAuthorization { _: 'authorization'; /** * Whether this is the current session */ current?: boolean; /** * Whether the session is from an official app */ officialApp?: boolean; /** * Whether the session is still waiting for a 2FA password */ passwordPending?: boolean; /** * Whether this session will accept encrypted chats */ encryptedRequestsDisabled?: boolean; /** * Whether this session will accept phone calls */ callRequestsDisabled?: boolean; /** * Whether the session is * unconfirmed, * see here » for more info. */ unconfirmed?: boolean; /** * Identifier */ hash: Long; /** * Device model */ deviceModel: string; /** * Platform */ platform: string; /** * System version */ systemVersion: string; /** * API * ID */ apiId: number; /** * App name */ appName: string; /** * App version */ appVersion: string; /** * When was the session created */ dateCreated: number; /** * When was the session last active */ dateActive: number; /** * Last known IP */ ip: string; /** * Country determined from IP */ country: string; /** * Region determined from IP */ region: string; } /** * Message ID, for which PUSH-notifications were cancelled. */ interface RawReceivedNotifyMessage { _: 'receivedNotifyMessage'; /** * Message ID, for which PUSH-notifications were canceled */ id: number; /** * Reserved for future use */ flags: number; } /** * Exported chat invite */ interface RawChatInviteExported { _: 'chatInviteExported'; /** * Whether this chat invite was revoked */ revoked?: boolean; /** * Whether this chat invite has no expiration */ permanent?: boolean; /** * Whether users importing this invite link will have to be * approved to join the channel or group */ requestNeeded?: boolean; /** * Chat invitation link */ link: string; /** * ID of the admin that created this chat invite */ adminId: number; /** * When was this chat invite created */ date: number; /** * When was this chat invite last modified */ startDate?: number; /** * When does this chat invite expire */ expireDate?: number; /** * Maximum number of users that can join using this link */ usageLimit?: number; /** * How many users joined using this link */ usage?: number; /** * Number of users that have already used this link to join */ requested?: number; /** * For * Telegram * Star subscriptions », contains the number of chat * members which have already joined the chat using the link, * but have already left due to expiration of their * subscription. */ subscriptionExpired?: number; /** * Custom description for the invite link, visible only to * admins */ title?: string; /** * For * Telegram * Star subscriptions », contains the pricing of the * subscription the user must activate to join the private * channel. */ subscriptionPricing?: tl.TypeStarsSubscriptionPricing; } /** * Used in updates and in the channel log to indicate when a * user is requesting to join or has joined a * discussion * group */ interface RawChatInvitePublicJoinRequests { _: 'chatInvitePublicJoinRequests'; } /** * The user has already joined this chat */ interface RawChatInviteAlready { _: 'chatInviteAlready'; /** * The chat connected to the invite */ chat: tl.TypeChat; } /** * Chat invite info */ interface RawChatInvite { _: 'chatInvite'; /** * Whether this is a * channel/supergroup * or a * normal * group */ channel?: boolean; /** * Whether this is a * channel */ broadcast?: boolean; /** * Whether this is a public * channel/supergroup */ public?: boolean; /** * Whether this is a * supergroup */ megagroup?: boolean; /** * Whether the * join * request » must be first approved by an administrator */ requestNeeded?: boolean; /** * Is this chat or channel verified by Telegram? */ verified?: boolean; /** * This chat is probably a scam */ scam?: boolean; /** * If set, this chat was reported by many users as a fake or * scam: be careful when interacting with it. */ fake?: boolean; /** * If set, indicates that the user has already paid for the * associated * Telegram * Star subscriptions » and it hasn't expired yet, so they * may re-join the channel using * {@link messages.RawImportChatInviteRequest} without * repeating the payment. */ canRefulfillSubscription?: boolean; /** * Chat/supergroup/channel title */ title: string; /** * Description of the group of channel */ about?: string; /** * Chat/supergroup/channel photo */ photo: tl.TypePhoto; /** * Participant count */ participantsCount: number; /** * A few of the participants that are in the group */ participants?: tl.TypeUser[]; /** * Profile * color palette ID */ color: number; /** * For * Telegram * Star subscriptions », contains the pricing of the * subscription the user must activate to join the private * channel. */ subscriptionPricing?: tl.TypeStarsSubscriptionPricing; /** * For * Telegram * Star subscriptions », the ID of the payment form for the * subscription. */ subscriptionFormId?: Long; /** * Describes a * bot * verification icon ». */ botVerification?: tl.TypeBotVerification; } /** * A chat invitation that also allows peeking into the group to * read messages without joining it. */ interface RawChatInvitePeek { _: 'chatInvitePeek'; /** * Chat information */ chat: tl.TypeChat; /** * Read-only anonymous access to this group will be revoked at * this date */ expires: number; } /** * Empty constructor */ interface RawInputStickerSetEmpty { _: 'inputStickerSetEmpty'; } /** * Stickerset by ID */ interface RawInputStickerSetID { _: 'inputStickerSetID'; /** * ID */ id: Long; /** * Access hash */ accessHash: Long; } /** * Stickerset by short name, from a * stickerset * deep link » */ interface RawInputStickerSetShortName { _: 'inputStickerSetShortName'; /** * Short name from a * stickerset * deep link » */ shortName: string; } /** * Animated emojis stickerset */ interface RawInputStickerSetAnimatedEmoji { _: 'inputStickerSetAnimatedEmoji'; } /** * Used for fetching * animated * dice stickers */ interface RawInputStickerSetDice { _: 'inputStickerSetDice'; /** * The emoji, for now 🏀, 🎲 and 🎯 are supported */ emoticon: string; } /** * Animated emoji reaction stickerset (contains animations to * play when a user clicks on a given animated emoji) */ interface RawInputStickerSetAnimatedEmojiAnimations { _: 'inputStickerSetAnimatedEmojiAnimations'; } /** * Stickers to show when receiving a gifted Telegram Premium * subscription */ interface RawInputStickerSetPremiumGifts { _: 'inputStickerSetPremiumGifts'; } /** * Generic animation stickerset containing animations to play * when * reacting * to messages using a normal emoji without a custom * animation */ interface RawInputStickerSetEmojiGenericAnimations { _: 'inputStickerSetEmojiGenericAnimations'; } /** * Default * custom * emoji status stickerset */ interface RawInputStickerSetEmojiDefaultStatuses { _: 'inputStickerSetEmojiDefaultStatuses'; } /** * Default * custom * emoji stickerset for * forum * topic icons */ interface RawInputStickerSetEmojiDefaultTopicIcons { _: 'inputStickerSetEmojiDefaultTopicIcons'; } /** * Default * custom * emoji status stickerset for channel statuses */ interface RawInputStickerSetEmojiChannelDefaultStatuses { _: 'inputStickerSetEmojiChannelDefaultStatuses'; } /** * TON gifts stickerset. */ interface RawInputStickerSetTonGifts { _: 'inputStickerSetTonGifts'; } /** * Represents a stickerset (stickerpack) */ interface RawStickerSet { _: 'stickerSet'; /** * Whether this stickerset was archived (due to too many saved * stickers in the current account) */ archived?: boolean; /** * Is this stickerset official */ official?: boolean; /** * Is this a mask stickerset */ masks?: boolean; /** * This is a custom emoji stickerset */ emojis?: boolean; /** * 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. */ textColor?: boolean; /** * If set, this custom emoji stickerset can be used in * channel/supergroup * emoji statuses. */ channelEmojiStatus?: boolean; /** * Whether we created this stickerset */ creator?: boolean; /** * When was this stickerset installed */ installedDate?: number; /** * ID of the stickerset */ id: Long; /** * Access hash of stickerset */ accessHash: Long; /** * Title of stickerset */ title: string; /** * Short name of stickerset, used when sharing stickerset using * stickerset * deep links. */ shortName: string; /** * Stickerset thumbnail */ thumbs?: tl.TypePhotoSize[]; /** * DC ID of thumbnail */ thumbDcId?: number; /** * Thumbnail version */ thumbVersion?: number; /** * Document ID of custom emoji thumbnail, fetch the document * using {@link messages.RawGetCustomEmojiDocumentsRequest} */ thumbDocumentId?: Long; /** * Number of stickers in pack */ count: number; /** * Hash */ hash: number; } /** * Describes a bot command that can be used in a chat */ interface RawBotCommand { _: 'botCommand'; /** * /command name */ command: string; /** * Description of the command */ description: string; } /** * Info about bots (available bot commands, etc) */ interface RawBotInfo { _: 'botInfo'; /** * If set, the bot has some * preview * medias for the configured Main Mini App, see here » for * more info on Main Mini App preview medias. */ hasPreviewMedias?: boolean; /** * ID of the bot */ userId?: number; /** * Description of the bot */ description?: string; /** * Description photo */ descriptionPhoto?: tl.TypePhoto; /** * Description animation in MPEG4 format */ descriptionDocument?: tl.TypeDocument; /** * Bot commands that can be used in the chat */ commands?: tl.TypeBotCommand[]; /** * Indicates the action to execute when pressing the in-UI menu * button for bots */ menuButton?: tl.TypeBotMenuButton; /** * The HTTP link to the privacy policy of the bot. If not set, * then the /privacy command must be used, if * supported by the bot (i.e. if it's present in the * commands vector). If it isn't supported, then * https://telegram.org/privacy-tpa * must be opened, instead. */ privacyPolicyUrl?: string; /** * Mini * app » settings * * */ appSettings?: tl.TypeBotAppSettings; /** * This bot can * verify * peers: this field contains more info about the * verification the bot can assign to peers. */ verifierSettings?: tl.TypeBotVerifierSettings; } /** * Bot keyboard button */ interface RawKeyboardButton { _: 'keyboardButton'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; } /** * URL button */ interface RawKeyboardButtonUrl { _: 'keyboardButtonUrl'; style?: tl.TypeKeyboardButtonStyle; /** * Button label */ text: string; /** * URL */ url: string; } /** * Callback button */ interface RawKeyboardButtonCallback { _: 'keyboardButtonCallback'; /** * Whether the user should verify their identity by entering * their 2FA * SRP parameters to the * {@link messages.RawGetBotCallbackAnswerRequest} method. * NOTE: telegram and the bot WILL NOT have access to the * plaintext password, thanks to * SRP. * This button is mainly used by the official * @botfather bot, for * verifying the user's identity before transferring ownership * of a bot to another user. */ requiresPassword?: boolean; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * Callback data */ data: Uint8Array; } /** * Button to request a user's phone number */ interface RawKeyboardButtonRequestPhone { _: 'keyboardButtonRequestPhone'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; } /** * Button to request a user's geolocation */ interface RawKeyboardButtonRequestGeoLocation { _: 'keyboardButtonRequestGeoLocation'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; } /** * 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. */ interface RawKeyboardButtonSwitchInline { _: 'keyboardButtonSwitchInline'; /** * If set, pressing the button will insert the bot's username * and the specified inline query in the current * chat's input field. */ samePeer?: boolean; style?: tl.TypeKeyboardButtonStyle; /** * Button label */ text: string; /** * The inline query to use */ query: string; /** * Filter to use when selecting chats. */ peerTypes?: tl.TypeInlineQueryPeerType[]; } /** * Button to start a game */ interface RawKeyboardButtonGame { _: 'keyboardButtonGame'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; } /** * Button to buy a product */ interface RawKeyboardButtonBuy { _: 'keyboardButtonBuy'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; } /** * Button to request a user to authorize via URL using * Seamless * Telegram Login. When the user clicks on such a button, * {@link messages.RawRequestUrlAuthRequest} should be called, * providing the button_id and the ID of the * container message. The returned * {@link RawUrlAuthResultRequest} 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 * {@link messages.RawAcceptUrlAuthRequest} to get a * {@link RawUrlAuthResultAccepted} with the URL to open * instead of the url of this constructor, or a * {@link RawUrlAuthResultDefault}, 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. */ interface RawKeyboardButtonUrlAuth { _: 'keyboardButtonUrlAuth'; style?: tl.TypeKeyboardButtonStyle; /** * Button label */ text: string; /** * New text of the button in forwarded messages. */ fwdText?: 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. * * * * 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. */ url: string; /** * ID of the button to pass to * {@link messages.RawRequestUrlAuthRequest} */ buttonId: number; } /** * Button to request a user to * {@link messages.RawAcceptUrlAuthRequest} via URL using * Seamless * Telegram Login. */ interface RawInputKeyboardButtonUrlAuth { _: 'inputKeyboardButtonUrlAuth'; /** * Set this flag to request the permission for your bot to send * messages to the user. */ requestWriteAccess?: boolean; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * New text of the button in forwarded messages. */ fwdText?: 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. * * 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. */ url: string; /** * Username of a bot, which will be used for user * authorization. See * 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 for more details. */ bot: tl.TypeInputUser; } /** * A button that allows the user to create and send a poll when * pressed; available only in private */ interface RawKeyboardButtonRequestPoll { _: 'keyboardButtonRequestPoll'; style?: tl.TypeKeyboardButtonStyle; /** * If set, only quiz polls can be sent */ quiz?: boolean; /** * Button text */ text: string; } /** * Button that links directly to a user profile */ interface RawInputKeyboardButtonUserProfile { _: 'inputKeyboardButtonUserProfile'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * User ID */ userId: tl.TypeInputUser; } /** * Button that links directly to a user profile */ interface RawKeyboardButtonUserProfile { _: 'keyboardButtonUserProfile'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * User ID */ userId: number; } /** * Button to open a * bot * mini app using * {@link messages.RawRequestWebViewRequest}, sending over user * information after user confirmation. * * Can only be sent or received as part of an inline keyboard, * use {@link RawKeyboardButtonSimpleWebView} for reply * keyboards. */ interface RawKeyboardButtonWebView { _: 'keyboardButtonWebView'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * Web * app url */ url: string; } /** * Button to open a * bot * mini app using * {@link messages.RawRequestSimpleWebViewRequest}, without * sending user information to the web app. * * Can only be sent or received as part of a reply keyboard, * use {@link RawKeyboardButtonWebView} for inline keyboards. */ interface RawKeyboardButtonSimpleWebView { _: 'keyboardButtonSimpleWebView'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * Web * app URL */ url: string; } /** * Prompts the user to select and share one or more peers with * the bot using * {@link messages.RawSendBotRequestedPeerRequest} */ interface RawKeyboardButtonRequestPeer { _: 'keyboardButtonRequestPeer'; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * Button ID, to be passed to * {@link messages.RawSendBotRequestedPeerRequest}. */ buttonId: 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. */ peerType: tl.TypeRequestPeerType; /** * Maximum number of peers that can be chosen. */ maxQuantity: number; } /** * Prompts the user to select and share one or more peers with * the bot using * {@link messages.RawSendBotRequestedPeerRequest}. */ interface RawInputKeyboardButtonRequestPeer { _: 'inputKeyboardButtonRequestPeer'; /** * Set this flag to request the peer's name. */ nameRequested?: boolean; /** * Set this flag to request the peer's @username * (if any). */ usernameRequested?: boolean; /** * Set this flag to request the peer's photo (if any). */ photoRequested?: boolean; style?: tl.TypeKeyboardButtonStyle; /** * Button text */ text: string; /** * Button ID, to be passed to * {@link messages.RawSendBotRequestedPeerRequest}. */ buttonId: 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. */ peerType: tl.TypeRequestPeerType; /** * Maximum number of peers that can be chosen. */ maxQuantity: number; } /** * Clipboard button: when clicked, the attached text must be * copied to the clipboard. */ interface RawKeyboardButtonCopy { _: 'keyboardButtonCopy'; style?: tl.TypeKeyboardButtonStyle; /** * Title of the button */ text: string; /** * The text that will be copied to the clipboard */ copyText: string; } /** * Inline keyboard row */ interface RawKeyboardButtonRow { _: 'keyboardButtonRow'; /** * Bot or inline keyboard buttons */ buttons: tl.TypeKeyboardButton[]; } /** * Hide sent bot keyboard */ interface RawReplyKeyboardHide { _: 'replyKeyboardHide'; /** * 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?: boolean; } /** * Force the user to send a reply */ interface RawReplyKeyboardForceReply { _: 'replyKeyboardForceReply'; /** * 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. */ singleUse?: boolean; /** * 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?: boolean; /** * The placeholder to be shown in the input field when the * keyboard is active; 1-64 characters. */ placeholder?: string; } /** * Bot keyboard */ interface RawReplyKeyboardMarkup { _: 'replyKeyboardMarkup'; /** * 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?: boolean; /** * 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. */ singleUse?: boolean; /** * 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?: boolean; /** * Requests clients to always show the keyboard when the * regular keyboard is hidden. */ persistent?: boolean; /** * Button row */ rows: tl.TypeKeyboardButtonRow[]; /** * The placeholder to be shown in the input field when the * keyboard is active; 1-64 characters. */ placeholder?: string; } /** * Bot or inline keyboard */ interface RawReplyInlineMarkup { _: 'replyInlineMarkup'; /** * Bot or inline keyboard rows */ rows: tl.TypeKeyboardButtonRow[]; } /** * Unknown message entity */ interface RawMessageEntityUnknown { _: 'messageEntityUnknown'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity * mentioning * a user by @username; * {@link RawMessageEntityMentionName} can also be used to * mention users by their ID. */ interface RawMessageEntityMention { _: 'messageEntityMention'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * #hashtag message entity */ interface RawMessageEntityHashtag { _: 'messageEntityHashtag'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing a bot /command */ interface RawMessageEntityBotCommand { _: 'messageEntityBotCommand'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing an in-text url: * https://google.com; for * text urls, use * {@link RawMessageEntityTextUrl}. */ interface RawMessageEntityUrl { _: 'messageEntityUrl'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing an * email@example.com. */ interface RawMessageEntityEmail { _: 'messageEntityEmail'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing bold text. */ interface RawMessageEntityBold { _: 'messageEntityBold'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing italic text. */ interface RawMessageEntityItalic { _: 'messageEntityItalic'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing a codeblock. */ interface RawMessageEntityCode { _: 'messageEntityCode'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing a preformatted * codeblock, allowing the user to specify a * programming language for the codeblock. */ interface RawMessageEntityPre { _: 'messageEntityPre'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; /** * Programming language of the code */ language: string; } /** * Message entity representing a * text url: for in-text urls * like https://google.com * use {@link RawMessageEntityUrl}. * * Note that an additional confirmation popup with the full URL * must be displayed to the user before opening this link, * unless the domain satisfies the conditions specified in the * domain * whitelist documentation ». */ interface RawMessageEntityTextUrl { _: 'messageEntityTextUrl'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; /** * The actual URL */ url: string; } /** * Message entity representing a * user * mention: for creating a mention use * {@link RawInputMessageEntityMentionName}. */ interface RawMessageEntityMentionName { _: 'messageEntityMentionName'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; /** * Identifier of the user that was mentioned */ userId: number; } /** * Message entity that can be used to create a user * user * mention: received mentions use the * {@link RawMessageEntityMentionName} constructor, instead. */ interface RawInputMessageEntityMentionName { _: 'inputMessageEntityMentionName'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; /** * Identifier of the user that was mentioned */ userId: tl.TypeInputUser; } /** * Message entity representing a phone number. */ interface RawMessageEntityPhone { _: 'messageEntityPhone'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing a $cashtag. */ interface RawMessageEntityCashtag { _: 'messageEntityCashtag'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing underlined text. */ interface RawMessageEntityUnderline { _: 'messageEntityUnderline'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing strikethrough text. */ interface RawMessageEntityStrike { _: 'messageEntityStrike'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Indicates a credit card number */ interface RawMessageEntityBankCard { _: 'messageEntityBankCard'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Message entity representing a spoiler */ interface RawMessageEntitySpoiler { _: 'messageEntitySpoiler'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } /** * Represents a custom emoji. * * * Note that this entity must wrap exactly one regular emoji * (the one contained in * {@link RawDocumentAttributeCustomEmoji}.alt) in * the related text, otherwise the server will ignore it. */ interface RawMessageEntityCustomEmoji { _: 'messageEntityCustomEmoji'; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; /** * Document ID of the * custom * emoji, use * {@link messages.RawGetCustomEmojiDocumentsRequest} to fetch * the emoji animation and the actual emoji it represents. */ documentId: Long; } /** * Message entity representing a block quote. */ interface RawMessageEntityBlockquote { _: 'messageEntityBlockquote'; /** * Whether the quote is collapsed by default. */ collapsed?: boolean; /** * Offset of message entity within message (in * UTF-16 * code units) */ offset: number; /** * Length of message entity within message (in * UTF-16 * code units) */ length: number; } interface RawMessageEntityFormattedDate { _: 'messageEntityFormattedDate'; relative?: boolean; shortTime?: boolean; longTime?: boolean; shortDate?: boolean; longDate?: boolean; dayOfWeek?: boolean; offset: number; length: number; date: number; } /** * Represents the absence of a channel */ interface RawInputChannelEmpty { _: 'inputChannelEmpty'; } /** * Represents a channel */ interface RawInputChannel { _: 'inputChannel'; /** * Channel ID */ channelId: number; /** * Access hash taken from the {@link RawChannel} constructor */ accessHash: Long; } /** * Defines a * min * channel that was seen in a certain message of a certain * chat. */ interface RawInputChannelFromMessage { _: 'inputChannelFromMessage'; /** * The chat where the channel was seen */ peer: tl.TypeInputPeer; /** * The message ID in the chat where the channel was seen */ msgId: number; /** * The channel ID */ channelId: number; } /** * Indicates a range of chat messages */ interface RawMessageRange { _: 'messageRange'; /** * Start of range (message ID) */ minId: number; /** * End of range (message ID) */ maxId: number; } /** * No filter */ interface RawChannelMessagesFilterEmpty { _: 'channelMessagesFilterEmpty'; } /** * Filter for getting only certain types of channel messages */ interface RawChannelMessagesFilter { _: 'channelMessagesFilter'; /** * Whether to exclude new messages from the search */ excludeNewMessages?: boolean; /** * A range of messages to fetch */ ranges: tl.TypeMessageRange[]; } /** * Channel/supergroup participant */ interface RawChannelParticipant { _: 'channelParticipant'; /** * Participant user ID */ userId: number; /** * Date joined */ date: number; /** * If set, contains the expiration date of the current * Telegram * Star subscription period » for the specified * participant. */ subscriptionUntilDate?: number; rank?: string; } /** * Myself */ interface RawChannelParticipantSelf { _: 'channelParticipantSelf'; /** * Whether I joined upon specific approval of an admin */ viaRequest?: boolean; /** * User ID */ userId: number; /** * User that invited me to the channel/supergroup */ inviterId: number; /** * When did I join the channel/supergroup */ date: number; /** * If set, contains the expiration date of the current * Telegram * Star subscription period » for the specified * participant. */ subscriptionUntilDate?: number; rank?: string; } /** * Channel/supergroup creator */ interface RawChannelParticipantCreator { _: 'channelParticipantCreator'; /** * User ID */ userId: number; /** * Creator admin rights */ adminRights: tl.TypeChatAdminRights; /** * The role (rank) of the group creator in the group: just an * arbitrary string, admin by default */ rank?: string; } /** * Admin */ interface RawChannelParticipantAdmin { _: 'channelParticipantAdmin'; /** * Can this admin promote other admins with the same * permissions? */ canEdit?: boolean; /** * Is this the current user */ self?: boolean; /** * Admin user ID */ userId: number; /** * User that invited the admin to the channel/group */ inviterId?: number; /** * User that promoted the user to admin */ promotedBy: number; /** * When did the user join */ date: number; /** * Admin * rights */ adminRights: tl.TypeChatAdminRights; /** * The role (rank) of the admin in the group: just an arbitrary * string, admin by default */ rank?: string; } /** * Banned/kicked user */ interface RawChannelParticipantBanned { _: 'channelParticipantBanned'; /** * Whether the user has left the group */ left?: boolean; /** * The banned peer */ peer: tl.TypePeer; /** * User was kicked by the specified admin */ kickedBy: number; /** * When did the user join the group */ date: number; /** * Banned * rights */ bannedRights: tl.TypeChatBannedRights; rank?: string; } /** * A participant that left the channel/supergroup */ interface RawChannelParticipantLeft { _: 'channelParticipantLeft'; /** * The peer that left */ peer: tl.TypePeer; } /** * Fetch only recent participants */ interface RawChannelParticipantsRecent { _: 'channelParticipantsRecent'; } /** * Fetch only admin participants */ interface RawChannelParticipantsAdmins { _: 'channelParticipantsAdmins'; } /** * Fetch only kicked participants */ interface RawChannelParticipantsKicked { _: 'channelParticipantsKicked'; /** * Optional filter for searching kicked participants by name * (otherwise empty) */ q: string; } /** * Fetch only bot participants */ interface RawChannelParticipantsBots { _: 'channelParticipantsBots'; } /** * Fetch only banned participants */ interface RawChannelParticipantsBanned { _: 'channelParticipantsBanned'; /** * Optional filter for searching banned participants by name * (otherwise empty) */ q: string; } /** * Query participants by name */ interface RawChannelParticipantsSearch { _: 'channelParticipantsSearch'; /** * Search query */ q: string; } /** * Fetch only participants that are also contacts */ interface RawChannelParticipantsContacts { _: 'channelParticipantsContacts'; /** * Optional search query for searching contact participants by * name */ q: string; } /** * 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 * through the * comment * section of a channel. */ interface RawChannelParticipantsMentions { _: 'channelParticipantsMentions'; /** * Filter by user name or username */ q?: string; /** * Look only for users that posted in this * thread */ topMsgId?: number; } /** * A media */ interface RawInputBotInlineMessageMediaAuto { _: 'inputBotInlineMessageMediaAuto'; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Caption */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Simple text message */ interface RawInputBotInlineMessageText { _: 'inputBotInlineMessageText'; /** * Disable webpage preview */ noWebpage?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Message */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Geolocation */ interface RawInputBotInlineMessageMediaGeo { _: 'inputBotInlineMessageMediaGeo'; /** * Geolocation */ geoPoint: tl.TypeInputGeoPoint; /** * For * live * locations, a direction in which the location moves, in * degrees; 1-360 */ heading?: number; /** * Validity period */ period?: number; /** * For * live * locations, a maximum distance to another chat member for * proximity alerts, in meters (0-100000) */ proximityNotificationRadius?: number; /** * Reply markup for bot/inline keyboards */ replyMarkup?: tl.TypeReplyMarkup; } /** * Venue */ interface RawInputBotInlineMessageMediaVenue { _: 'inputBotInlineMessageMediaVenue'; /** * Geolocation */ geoPoint: tl.TypeInputGeoPoint; /** * 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 */ venueId: string; /** * Venue type in the provider's database */ venueType: string; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * A contact */ interface RawInputBotInlineMessageMediaContact { _: 'inputBotInlineMessageMediaContact'; /** * Phone number */ phoneNumber: string; /** * First name */ firstName: string; /** * Last name */ lastName: string; /** * VCard info */ vcard: string; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * A game */ interface RawInputBotInlineMessageGame { _: 'inputBotInlineMessageGame'; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * An invoice */ interface RawInputBotInlineMessageMediaInvoice { _: 'inputBotInlineMessageMediaInvoice'; /** * Product name, 1-32 characters */ title: string; /** * Product description, 1-255 characters */ description: string; /** * Invoice photo */ photo?: tl.TypeInputWebDocument; /** * The invoice */ invoice: tl.TypeInvoice; /** * 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 */ 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. */ providerData: tl.TypeDataJSON; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Specifies options that will be used to generate the link * preview for the message, or even a standalone link preview * without an attached message. */ interface RawInputBotInlineMessageMediaWebPage { _: 'inputBotInlineMessageMediaWebPage'; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * If set, specifies that a large media preview should be used. */ forceLargeMedia?: boolean; /** * If set, specifies that a small media preview should be used. */ forceSmallMedia?: boolean; /** * 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?: boolean; /** * The message, can be empty. */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * The URL to use for the link preview. */ url: string; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * An inline bot result */ interface RawInputBotInlineResult { _: 'inputBotInlineResult'; /** * ID of result */ id: string; /** * Result type (see * bot * API docs) */ type: string; /** * Result title */ title?: string; /** * Result description */ description?: string; /** * URL of result */ url?: string; /** * Thumbnail for result */ thumb?: tl.TypeInputWebDocument; /** * Result contents */ content?: tl.TypeInputWebDocument; /** * Message to send when the result is selected */ sendMessage: tl.TypeInputBotInlineMessage; } /** * Photo */ interface RawInputBotInlineResultPhoto { _: 'inputBotInlineResultPhoto'; /** * Result ID */ id: string; /** * Result type (see * bot * API docs) */ type: string; /** * Photo to send */ photo: tl.TypeInputPhoto; /** * Message to send when the result is selected */ sendMessage: tl.TypeInputBotInlineMessage; } /** * Document (media of any type except for photos) */ interface RawInputBotInlineResultDocument { _: 'inputBotInlineResultDocument'; /** * Result ID */ id: string; /** * Result type (see * bot * API docs) */ type: string; /** * Result title */ title?: string; /** * Result description */ description?: string; /** * Document to send */ document: tl.TypeInputDocument; /** * Message to send when the result is selected */ sendMessage: tl.TypeInputBotInlineMessage; } /** * Game */ interface RawInputBotInlineResultGame { _: 'inputBotInlineResultGame'; /** * Result ID */ id: string; /** * Game short name */ shortName: string; /** * Message to send when the result is selected */ sendMessage: tl.TypeInputBotInlineMessage; } /** * Send whatever media is attached to the * {@link RawBotInlineMediaResult} */ interface RawBotInlineMessageMediaAuto { _: 'botInlineMessageMediaAuto'; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Caption */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Send a simple text message */ interface RawBotInlineMessageText { _: 'botInlineMessageText'; /** * Disable webpage preview */ noWebpage?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * The message */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Send a geolocation */ interface RawBotInlineMessageMediaGeo { _: 'botInlineMessageMediaGeo'; /** * Geolocation */ geo: tl.TypeGeoPoint; /** * For * live * locations, a direction in which the location moves, in * degrees; 1-360. */ heading?: number; /** * Validity period */ period?: number; /** * For * live * locations, a maximum distance to another chat member for * proximity alerts, in meters (0-100000). */ proximityNotificationRadius?: number; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Send a venue */ interface RawBotInlineMessageMediaVenue { _: 'botInlineMessageMediaVenue'; /** * Geolocation of venue */ geo: tl.TypeGeoPoint; /** * 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 */ venueId: string; /** * Venue type in the provider's database */ venueType: string; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Send a contact */ interface RawBotInlineMessageMediaContact { _: 'botInlineMessageMediaContact'; /** * Phone number */ phoneNumber: string; /** * First name */ firstName: string; /** * Last name */ lastName: string; /** * VCard info */ vcard: string; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Send an invoice */ interface RawBotInlineMessageMediaInvoice { _: 'botInlineMessageMediaInvoice'; /** * Set this flag if you require the user's shipping address to * complete the order */ shippingAddressRequested?: boolean; /** * Test invoice */ test?: boolean; /** * Product name, 1-32 characters */ title: string; /** * Product description, 1-255 characters */ description: string; /** * Product photo */ photo?: tl.TypeWebDocument; /** * Three-letter ISO 4217 * currency * code, or XTR for * Telegram * Stars. */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; /** * Inline keyboard */ replyMarkup?: tl.TypeReplyMarkup; } /** * Specifies options that must be used to generate the link * preview for the message, or even a standalone link preview * without an attached message. */ interface RawBotInlineMessageMediaWebPage { _: 'botInlineMessageMediaWebPage'; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * If set, specifies that a large media preview should be used. */ forceLargeMedia?: boolean; /** * If set, specifies that a small media preview should be used. */ forceSmallMedia?: boolean; /** * If set, indicates that the URL used for the webpage preview * was specified manually using {@link RawInputMediaWebPage}, * and may not be related to any of the URLs specified in the * message. */ manual?: boolean; /** * If set, the link can be opened directly without user * confirmation. */ safe?: boolean; /** * The message, can be empty. */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * The URL to use for the link preview. */ url: string; /** * Reply markup for sending bot buttons */ replyMarkup?: tl.TypeReplyMarkup; } /** * Generic result */ interface RawBotInlineResult { _: 'botInlineResult'; /** * Result ID */ id: string; /** * Result type (see * bot * API docs) */ type: string; /** * Result title */ title?: string; /** * Result description */ description?: string; /** * URL of article or webpage */ url?: string; /** * Thumbnail for the result */ thumb?: tl.TypeWebDocument; /** * Content of the result */ content?: tl.TypeWebDocument; /** * Message to send */ sendMessage: tl.TypeBotInlineMessage; } /** * Media result */ interface RawBotInlineMediaResult { _: 'botInlineMediaResult'; /** * Result ID */ id: string; /** * Result type (see * bot * API docs) */ type: string; /** * If type is photo, the photo to send */ photo?: tl.TypePhoto; /** * If type is document, the document to send */ document?: tl.TypeDocument; /** * Result title */ title?: string; /** * Description */ description?: string; /** * Depending on the type and on the * constructor, * contains the caption of the media or the content of the * message to be sent instead of the media */ sendMessage: tl.TypeBotInlineMessage; } /** * Link to a message in a supergroup/channel */ interface RawExportedMessageLink { _: 'exportedMessageLink'; /** * URL */ link: string; /** * Embed code */ html: string; } /** * Info about a forwarded message */ interface RawMessageFwdHeader { _: 'messageFwdHeader'; /** * Whether this message was * imported * from a foreign chat service, click here for more info » */ imported?: boolean; /** * Only for messages forwarded to * 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). */ savedOut?: boolean; /** * The ID of the user that originally sent the message */ fromId?: tl.TypePeer; /** * The name of the user that originally sent the message */ fromName?: string; /** * When was the message originally sent */ date: number; /** * ID of the channel message that was forwarded */ channelPost?: number; /** * For channels and if signatures are enabled, author of the * channel message */ postAuthor?: string; /** * Only for messages forwarded to * saved * messages », contains the dialog where the message was * originally sent. */ savedFromPeer?: tl.TypePeer; /** * Only for messages forwarded to * saved * messages », contains the original ID of the message in * saved_from_peer. */ savedFromMsgId?: number; /** * Only for forwarded messages reforwarded to * 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). */ savedFromId?: tl.TypePeer; /** * Only for forwarded messages from users with forward privacy * enabled, sent by users with forward privacy enabled, * reforwarded to * 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). */ savedFromName?: string; /** * Only for forwarded messages reforwarded to * 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 {@link RawMessage} will contain 3). */ savedDate?: number; /** * PSA type */ psaType?: string; } /** * Represents a sent inline message from the perspective of a * bot (legacy constructor) */ interface RawInputBotInlineMessageID { _: 'inputBotInlineMessageID'; /** * DC ID to use when working with this inline message */ dcId: 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: Long; /** * Access hash of message */ accessHash: Long; } /** * Represents a sent inline message from the perspective of a * bot */ interface RawInputBotInlineMessageID64 { _: 'inputBotInlineMessageID64'; /** * DC ID to use when working with this inline message */ dcId: number; /** * ID of the owner of this message */ ownerId: Long; /** * ID of message */ id: number; /** * Access hash of message */ accessHash: Long; } /** * The bot requested the user to message them in private */ interface RawInlineBotSwitchPM { _: '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 */ startParam: string; } /** * Top peer */ interface RawTopPeer { _: 'topPeer'; /** * Peer */ peer: tl.TypePeer; /** * Rating as computed in * top * peer rating » */ rating: Double; } /** * Most used bots */ interface RawTopPeerCategoryBotsPM { _: 'topPeerCategoryBotsPM'; } /** * Most used inline bots */ interface RawTopPeerCategoryBotsInline { _: 'topPeerCategoryBotsInline'; } /** * Users we've chatted most frequently with */ interface RawTopPeerCategoryCorrespondents { _: 'topPeerCategoryCorrespondents'; } /** * Often-opened groups and supergroups */ interface RawTopPeerCategoryGroups { _: 'topPeerCategoryGroups'; } /** * Most frequently visited channels */ interface RawTopPeerCategoryChannels { _: 'topPeerCategoryChannels'; } /** * Most frequently called users */ interface RawTopPeerCategoryPhoneCalls { _: 'topPeerCategoryPhoneCalls'; } /** * Users to which the users often forwards messages to */ interface RawTopPeerCategoryForwardUsers { _: 'topPeerCategoryForwardUsers'; } /** * Chats to which the users often forwards messages to */ interface RawTopPeerCategoryForwardChats { _: 'topPeerCategoryForwardChats'; } /** * Most frequently used * Main * Mini Bot Apps. */ interface RawTopPeerCategoryBotsApp { _: 'topPeerCategoryBotsApp'; } /** * Top peer category */ interface RawTopPeerCategoryPeers { _: 'topPeerCategoryPeers'; /** * Top peer category of peers */ category: tl.TypeTopPeerCategory; /** * Count of peers */ count: number; /** * Peers */ peers: tl.TypeTopPeer[]; } /** * Empty draft */ interface RawDraftMessageEmpty { _: 'draftMessageEmpty'; /** * When was the draft last updated */ date?: number; } /** * Represents a message * draft. */ interface RawDraftMessage { _: 'draftMessage'; /** * Whether no webpage preview will be generated */ noWebpage?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * If set, indicates that the message should be sent in reply * to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * The draft */ message: string; /** * Message * entities * for styled text. */ entities?: tl.TypeMessageEntity[]; /** * Media. */ media?: tl.TypeInputMedia; /** * Date of last update of the draft. */ date: number; /** * A * message * effect that should be played as specified here ». */ effect?: Long; /** * Used to * suggest * a post to a channel, see here » for more info on the * full flow. */ suggestedPost?: tl.TypeSuggestedPost; } /** * Stickerset with a single sticker as preview */ interface RawStickerSetCovered { _: 'stickerSetCovered'; /** * Stickerset */ set: tl.TypeStickerSet; /** * Preview */ cover: tl.TypeDocument; } /** * Stickerset, with multiple stickers as preview */ interface RawStickerSetMultiCovered { _: 'stickerSetMultiCovered'; /** * Stickerset */ set: tl.TypeStickerSet; /** * Preview stickers */ covers: tl.TypeDocument[]; } /** * Stickerset preview with all stickers of the stickerset * included. * * * Currently used only for * custom * emoji stickersets, to avoid a further call to * {@link messages.RawGetStickerSetRequest}. */ interface RawStickerSetFullCovered { _: 'stickerSetFullCovered'; /** * Stickerset */ set: tl.TypeStickerSet; /** * Emoji information about every sticker in the stickerset */ packs: tl.TypeStickerPack[]; /** * Keywords for some or every sticker in the stickerset. */ keywords: tl.TypeStickerKeyword[]; /** * Stickers */ documents: tl.TypeDocument[]; } /** * Just the stickerset information, with no previews. */ interface RawStickerSetNoCovered { _: 'stickerSetNoCovered'; /** * Stickerset information. */ set: tl.TypeStickerSet; } /** * Position on a photo where a mask should be placed when * attaching * stickers to media » * * The n position indicates where the mask should * be placed: */ interface RawMaskCoords { _: '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: Double; /** * 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: Double; /** * Mask scaling coefficient. (For example, 2.0 means a doubled * size) */ zoom: Double; } /** * A photo with stickers attached */ interface RawInputStickeredMediaPhoto { _: 'inputStickeredMediaPhoto'; /** * The photo */ id: tl.TypeInputPhoto; } /** * A document with stickers attached */ interface RawInputStickeredMediaDocument { _: 'inputStickeredMediaDocument'; /** * The document */ id: tl.TypeInputDocument; } /** * Indicates an already sent game */ interface RawGame { _: 'game'; /** * ID of the game */ id: Long; /** * Access hash of the game */ accessHash: Long; /** * Short name for the game */ shortName: string; /** * Title of the game */ title: string; /** * Game description */ description: string; /** * Game preview */ photo: tl.TypePhoto; /** * Optional attached document */ document?: tl.TypeDocument; } /** * Indicates an already sent game */ interface RawInputGameID { _: 'inputGameID'; /** * game ID from * Game * constructor */ id: Long; /** * access hash from * Game * constructor */ accessHash: Long; } /** * Game by short name */ interface RawInputGameShortName { _: 'inputGameShortName'; /** * The bot that provides the game */ botId: tl.TypeInputUser; /** * The game's short name, usually obtained from a * game * link » */ shortName: string; } /** * Game highscore */ interface RawHighScore { _: 'highScore'; /** * Position in highscore list */ pos: number; /** * User ID */ userId: number; /** * Score */ score: number; } /** * Empty rich text element */ interface RawTextEmpty { _: 'textEmpty'; } /** * Plain text */ interface RawTextPlain { _: 'textPlain'; /** * Text */ text: string; } /** * Bold text */ interface RawTextBold { _: 'textBold'; /** * Text */ text: tl.TypeRichText; } /** * Italic text */ interface RawTextItalic { _: 'textItalic'; /** * Text */ text: tl.TypeRichText; } /** * Underlined text */ interface RawTextUnderline { _: 'textUnderline'; /** * Text */ text: tl.TypeRichText; } /** * Strikethrough text */ interface RawTextStrike { _: 'textStrike'; /** * Text */ text: tl.TypeRichText; } /** * fixed-width rich text */ interface RawTextFixed { _: 'textFixed'; /** * Text */ text: tl.TypeRichText; } /** * Link */ interface RawTextUrl { _: 'textUrl'; /** * Text of link */ text: tl.TypeRichText; /** * Webpage HTTP URL */ url: string; /** * If a preview was already generated for the page, the page ID */ webpageId: Long; } /** * Rich text email link */ interface RawTextEmail { _: 'textEmail'; /** * Link text */ text: tl.TypeRichText; /** * Email address */ email: string; } /** * Concatenation of rich texts */ interface RawTextConcat { _: 'textConcat'; /** * Concatenated rich texts */ texts: tl.TypeRichText[]; } /** * Subscript text */ interface RawTextSubscript { _: 'textSubscript'; /** * Text */ text: tl.TypeRichText; } /** * Superscript text */ interface RawTextSuperscript { _: 'textSuperscript'; /** * Text */ text: tl.TypeRichText; } /** * Highlighted text */ interface RawTextMarked { _: 'textMarked'; /** * Text */ text: tl.TypeRichText; } /** * Rich text linked to a phone number */ interface RawTextPhone { _: 'textPhone'; /** * Text */ text: tl.TypeRichText; /** * Phone number */ phone: string; } /** * Inline image */ interface RawTextImage { _: 'textImage'; /** * Document ID */ documentId: Long; /** * Width */ w: number; /** * Height */ h: number; } /** * Text linking to another section of the page */ interface RawTextAnchor { _: 'textAnchor'; /** * Text */ text: tl.TypeRichText; /** * Section name */ name: string; } /** * Unsupported IV element */ interface RawPageBlockUnsupported { _: 'pageBlockUnsupported'; } /** * Title */ interface RawPageBlockTitle { _: 'pageBlockTitle'; /** * Title */ text: tl.TypeRichText; } /** * Subtitle */ interface RawPageBlockSubtitle { _: 'pageBlockSubtitle'; /** * Text */ text: tl.TypeRichText; } /** * Author and date of creation of article */ interface RawPageBlockAuthorDate { _: 'pageBlockAuthorDate'; /** * Author name */ author: tl.TypeRichText; /** * Date of publication */ publishedDate: number; } /** * Page header */ interface RawPageBlockHeader { _: 'pageBlockHeader'; /** * Contents */ text: tl.TypeRichText; } /** * Subheader */ interface RawPageBlockSubheader { _: 'pageBlockSubheader'; /** * Subheader */ text: tl.TypeRichText; } /** * A paragraph */ interface RawPageBlockParagraph { _: 'pageBlockParagraph'; /** * Text */ text: tl.TypeRichText; } /** * Preformatted (
 text)
     */
    interface RawPageBlockPreformatted {
        _: 'pageBlockPreformatted';
        /**
         * Text
         */
        text: tl.TypeRichText;
        /**
         * Programming language of preformatted text
         */
        language: string;
    }
    /**
     * Page footer
     */
    interface RawPageBlockFooter {
        _: 'pageBlockFooter';
        /**
         * Contents
         */
        text: tl.TypeRichText;
    }
    /**
     * An empty block separating a page
     */
    interface RawPageBlockDivider {
        _: 'pageBlockDivider';
    }
    /**
     * Link to section within the page itself (like
     * anchor)
     */
    interface RawPageBlockAnchor {
        _: 'pageBlockAnchor';
        /**
         * Name of target section
         */
        name: string;
    }
    /**
     * Unordered list of IV blocks
     */
    interface RawPageBlockList {
        _: 'pageBlockList';
        /**
         * List of blocks in an IV page
         */
        items: tl.TypePageListItem[];
    }
    /**
     * Quote (equivalent to the HTML 
) */ interface RawPageBlockBlockquote { _: 'pageBlockBlockquote'; /** * Quote contents */ text: tl.TypeRichText; /** * Caption */ caption: tl.TypeRichText; } /** * Pullquote */ interface RawPageBlockPullquote { _: 'pageBlockPullquote'; /** * Text */ text: tl.TypeRichText; /** * Caption */ caption: tl.TypeRichText; } /** * A photo */ interface RawPageBlockPhoto { _: 'pageBlockPhoto'; /** * Photo ID */ photoId: Long; /** * Caption */ caption: tl.TypePageCaption; /** * HTTP URL of page the photo leads to when clicked */ url?: string; /** * ID of preview of the page the photo leads to when clicked */ webpageId?: Long; } /** * Video */ interface RawPageBlockVideo { _: 'pageBlockVideo'; /** * Whether the video is set to autoplay */ autoplay?: boolean; /** * Whether the video is set to loop */ loop?: boolean; /** * Video ID */ videoId: Long; /** * Caption */ caption: tl.TypePageCaption; } /** * A page cover */ interface RawPageBlockCover { _: 'pageBlockCover'; /** * Cover */ cover: tl.TypePageBlock; } /** * An embedded webpage */ interface RawPageBlockEmbed { _: 'pageBlockEmbed'; /** * Whether the block should be full width */ fullWidth?: boolean; /** * Whether scrolling should be allowed */ allowScrolling?: boolean; /** * Web page URL, if available */ url?: string; /** * HTML-markup of the embedded page */ html?: string; /** * Poster photo, if available */ posterPhotoId?: Long; /** * Block width, if known */ w?: number; /** * Block height, if known */ h?: number; /** * Caption */ caption: tl.TypePageCaption; } /** * An embedded post */ interface RawPageBlockEmbedPost { _: 'pageBlockEmbedPost'; /** * Web page URL */ url: string; /** * ID of generated webpage preview */ webpageId: Long; /** * ID of the author's photo */ authorPhotoId: Long; /** * Author name */ author: string; /** * Creation date */ date: number; /** * Post contents */ blocks: tl.TypePageBlock[]; /** * Caption */ caption: tl.TypePageCaption; } /** * Collage of media */ interface RawPageBlockCollage { _: 'pageBlockCollage'; /** * Media elements */ items: tl.TypePageBlock[]; /** * Caption */ caption: tl.TypePageCaption; } /** * Slideshow */ interface RawPageBlockSlideshow { _: 'pageBlockSlideshow'; /** * Slideshow items */ items: tl.TypePageBlock[]; /** * Caption */ caption: tl.TypePageCaption; } /** * Reference to a telegram channel */ interface RawPageBlockChannel { _: 'pageBlockChannel'; /** * The channel/supergroup/chat */ channel: tl.TypeChat; } /** * Audio */ interface RawPageBlockAudio { _: 'pageBlockAudio'; /** * Audio ID (to be fetched from the container {@link RawPage} * constructor */ audioId: Long; /** * Audio caption */ caption: tl.TypePageCaption; } /** * Kicker */ interface RawPageBlockKicker { _: 'pageBlockKicker'; /** * Contents */ text: tl.TypeRichText; } /** * Table */ interface RawPageBlockTable { _: 'pageBlockTable'; /** * Does the table have a visible border? */ bordered?: boolean; /** * Is the table striped? */ striped?: boolean; /** * Title */ title: tl.TypeRichText; /** * Table rows */ rows: tl.TypePageTableRow[]; } /** * Ordered list of IV blocks */ interface RawPageBlockOrderedList { _: 'pageBlockOrderedList'; /** * List items */ items: tl.TypePageListOrderedItem[]; } /** * A collapsible details block */ interface RawPageBlockDetails { _: 'pageBlockDetails'; /** * Whether the block is open by default */ open?: boolean; /** * Block contents */ blocks: tl.TypePageBlock[]; /** * Always visible heading for the block */ title: tl.TypeRichText; } /** * Related articles */ interface RawPageBlockRelatedArticles { _: 'pageBlockRelatedArticles'; /** * Title */ title: tl.TypeRichText; /** * Related articles */ articles: tl.TypePageRelatedArticle[]; } /** * A map */ interface RawPageBlockMap { _: 'pageBlockMap'; /** * Location of the map center */ geo: tl.TypeGeoPoint; /** * 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: tl.TypePageCaption; } /** * The phone call was missed */ interface RawPhoneCallDiscardReasonMissed { _: 'phoneCallDiscardReasonMissed'; } /** * The phone call was disconnected */ interface RawPhoneCallDiscardReasonDisconnect { _: 'phoneCallDiscardReasonDisconnect'; } /** * The phone call was ended normally */ interface RawPhoneCallDiscardReasonHangup { _: 'phoneCallDiscardReasonHangup'; } /** * The phone call was discarded because the user is busy in * another call */ interface RawPhoneCallDiscardReasonBusy { _: 'phoneCallDiscardReasonBusy'; } /** * This phone call was migrated to a * conference * call. */ interface RawPhoneCallDiscardReasonMigrateConferenceCall { _: 'phoneCallDiscardReasonMigrateConferenceCall'; /** * Conference * link » slug. */ slug: string; } /** * Represents a json-encoded object */ interface RawDataJSON { _: 'dataJSON'; /** * JSON-encoded object */ data: string; } /** * This object represents a portion of the price for goods or * services. */ interface RawLabeledPrice { _: '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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Invoice */ interface RawInvoice { _: 'invoice'; /** * Test invoice */ test?: boolean; /** * Set this flag if you require the user's full name to * complete the order */ nameRequested?: boolean; /** * Set this flag if you require the user's phone number to * complete the order */ phoneRequested?: boolean; /** * Set this flag if you require the user's email address to * complete the order */ emailRequested?: boolean; /** * Set this flag if you require the user's shipping address to * complete the order */ shippingAddressRequested?: boolean; /** * Set this flag if the final price depends on the shipping * method */ flexible?: boolean; /** * Set this flag if user's phone number should be sent to * provider */ phoneToProvider?: boolean; /** * Set this flag if user's email address should be sent to * provider */ emailToProvider?: boolean; /** * Whether this is a recurring payment */ recurring?: boolean; /** * Three-letter ISO 4217 * currency * code, or XTR for * Telegram * Stars. */ currency: string; /** * Price breakdown, a list of components (e.g. product price, * tax, discount, delivery cost, delivery tax, bonus, etc.) */ prices: tl.TypeLabeledPrice[]; /** * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ maxTipAmount?: Long; /** * 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. */ suggestedTipAmounts?: Long[]; /** * Terms of service URL */ termsUrl?: string; /** * The number of seconds between consecutive Telegram Star * debiting for * bot * subscription invoices */ subscriptionPeriod?: number; } /** * Payment identifier */ interface RawPaymentCharge { _: 'paymentCharge'; /** * Telegram payment identifier */ id: string; /** * Provider payment identifier */ providerChargeId: string; } /** * Shipping address */ interface RawPostAddress { _: 'postAddress'; /** * First line for the address */ streetLine1: string; /** * Second line for the address */ streetLine2: string; /** * City */ city: string; /** * State, if applicable (empty otherwise) */ state: string; /** * ISO 3166-1 alpha-2 country code */ countryIso2: string; /** * Address post code */ postCode: string; } /** * Order info provided by the user */ interface RawPaymentRequestedInfo { _: 'paymentRequestedInfo'; /** * User's full name */ name?: string; /** * User's phone number */ phone?: string; /** * User's email address */ email?: string; /** * User's shipping address */ shippingAddress?: tl.TypePostAddress; } /** * Saved credit card */ interface RawPaymentSavedCredentialsCard { _: 'paymentSavedCredentialsCard'; /** * Card ID */ id: string; /** * Title */ title: string; } /** * Remote document */ interface RawWebDocument { _: 'webDocument'; /** * Document URL */ url: string; /** * Access hash */ accessHash: Long; /** * File size */ size: number; /** * MIME type */ mimeType: string; /** * Attributes for media types */ attributes: tl.TypeDocumentAttribute[]; } /** * Remote document that can be downloaded without * proxying * through telegram */ interface RawWebDocumentNoProxy { _: 'webDocumentNoProxy'; /** * Document URL */ url: string; /** * File size */ size: number; /** * MIME type */ mimeType: string; /** * Attributes for media types */ attributes: tl.TypeDocumentAttribute[]; } /** * The document */ interface RawInputWebDocument { _: 'inputWebDocument'; /** * Remote document URL to be downloaded using the appropriate * method */ url: string; /** * Remote file size */ size: number; /** * Mime type */ mimeType: string; /** * Attributes for media types */ attributes: tl.TypeDocumentAttribute[]; } /** * Location of a remote HTTP(s) file */ interface RawInputWebFileLocation { _: 'inputWebFileLocation'; /** * HTTP URL of file */ url: string; /** * Access hash */ accessHash: Long; } /** * Used to download a server-generated image with the map * preview from a {@link RawGeoPoint}, see the * webfile * docs for more info ». */ interface RawInputWebFileGeoPointLocation { _: 'inputWebFileGeoPointLocation'; /** * Generated from the lat, long and * accuracy_radius parameters of the * {@link RawGeoPoint} */ geoPoint: tl.TypeInputGeoPoint; /** * Access hash of the {@link RawGeoPoint} */ accessHash: Long; /** * 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; } /** * Used to download an album cover for any music file using * {@link upload.RawGetWebFileRequest}, see the * webfile * docs for more info ». */ interface RawInputWebFileAudioAlbumThumbLocation { _: 'inputWebFileAudioAlbumThumbLocation'; /** * Used to return a thumbnail with 100x100 * resolution (instead of the default 600x600) */ small?: boolean; /** * The audio file in question: must NOT be provided in secret * chats, provide the title and * performer fields instead. */ document?: tl.TypeInputDocument; /** * 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; } /** * Saved payment credentials */ interface RawInputPaymentCredentialsSaved { _: 'inputPaymentCredentialsSaved'; /** * Credential ID */ id: string; /** * Temporary password */ tmpPassword: Uint8Array; } /** * Payment credentials */ interface RawInputPaymentCredentials { _: 'inputPaymentCredentials'; /** * Save payment credential for future use */ save?: boolean; /** * Payment credentials */ data: tl.TypeDataJSON; } /** * Apple pay payment credentials */ interface RawInputPaymentCredentialsApplePay { _: 'inputPaymentCredentialsApplePay'; /** * Payment data */ paymentData: tl.TypeDataJSON; } /** * Google Pay payment credentials */ interface RawInputPaymentCredentialsGooglePay { _: 'inputPaymentCredentialsGooglePay'; /** * Payment token */ paymentToken: tl.TypeDataJSON; } /** * Shipping option */ interface RawShippingOption { _: 'shippingOption'; /** * Option ID */ id: string; /** * Title */ title: string; /** * List of price portions */ prices: tl.TypeLabeledPrice[]; } /** * Sticker in a stickerset */ interface RawInputStickerSetItem { _: 'inputStickerSetItem'; /** * The sticker */ document: tl.TypeInputDocument; /** * Associated emoji */ emoji: string; /** * Coordinates for mask sticker */ maskCoords?: tl.TypeMaskCoords; /** * Set of keywords, separated by commas (can't be provided for * mask stickers) */ keywords?: string; } /** * Phone call */ interface RawInputPhoneCall { _: 'inputPhoneCall'; /** * Call ID */ id: Long; /** * Access hash */ accessHash: Long; } /** * Empty constructor */ interface RawPhoneCallEmpty { _: 'phoneCallEmpty'; /** * Call ID */ id: Long; } /** * Incoming phone call */ interface RawPhoneCallWaiting { _: 'phoneCallWaiting'; /** * Is this a video call */ video?: boolean; /** * Call ID */ id: Long; /** * Access hash */ accessHash: Long; /** * Date */ date: number; /** * Admin ID */ adminId: number; /** * Participant ID */ participantId: number; /** * Phone call protocol info */ protocol: tl.TypePhoneCallProtocol; /** * When was the phone call received */ receiveDate?: number; } /** * Requested phone call */ interface RawPhoneCallRequested { _: 'phoneCallRequested'; /** * Whether this is a video call */ video?: boolean; /** * Phone call ID */ id: Long; /** * Access hash */ accessHash: Long; /** * When was the phone call created */ date: number; /** * ID of the creator of the phone call */ adminId: number; /** * ID of the other participant of the phone call */ participantId: number; /** * Parameter * for key exchange */ gAHash: Uint8Array; /** * Call protocol info to be passed to libtgvoip */ protocol: tl.TypePhoneCallProtocol; } /** * An accepted phone call */ interface RawPhoneCallAccepted { _: 'phoneCallAccepted'; /** * Whether this is a video call */ video?: boolean; /** * ID of accepted phone call */ id: Long; /** * Access hash of phone call */ accessHash: Long; /** * When was the call accepted */ date: number; /** * ID of the call creator */ adminId: number; /** * ID of the other user in the call */ participantId: number; /** * B parameter for * secure * E2E phone call key exchange */ gB: Uint8Array; /** * Protocol to use for phone call */ protocol: tl.TypePhoneCallProtocol; } /** * Phone call */ interface RawPhoneCall { _: 'phoneCall'; /** * Whether P2P connection to the other peer is allowed */ p2pAllowed?: boolean; /** * Whether this is a video call */ video?: boolean; /** * If set, the other party supports upgrading of the call to a * conference * call. */ conferenceSupported?: boolean; /** * Call ID */ id: Long; /** * Access hash */ accessHash: Long; /** * Date of creation of the call */ date: number; /** * User ID of the creator of the call */ adminId: number; /** * User ID of the other participant in the call */ participantId: number; /** * Parameter * for key exchange */ gAOrB: Uint8Array; /** * Key * fingerprint */ keyFingerprint: Long; /** * Call protocol info to be passed to libtgvoip */ protocol: tl.TypePhoneCallProtocol; /** * List of endpoints the user can connect to exchange call data */ connections: tl.TypePhoneConnection[]; /** * When was the call actually started */ startDate: number; /** * Custom JSON-encoded call parameters to be passed to tgcalls. */ customParameters?: tl.TypeDataJSON; } /** * Indicates a discarded phone call */ interface RawPhoneCallDiscarded { _: 'phoneCallDiscarded'; /** * Whether the server required the user to * {@link phone.RawSetCallRatingRequest} the call */ needRating?: boolean; /** * Whether the server required the client to * {@link phone.RawSaveCallDebugRequest} the libtgvoip call * debug data */ needDebug?: boolean; /** * Whether the call was a video call */ video?: boolean; /** * Call ID */ id: Long; /** * Why was the phone call discarded */ reason?: tl.TypePhoneCallDiscardReason; /** * Duration of the phone call in seconds */ duration?: number; } /** * Identifies an endpoint that can be used to connect to the * other user in a phone call */ interface RawPhoneConnection { _: 'phoneConnection'; /** * Whether TCP should be used */ tcp?: boolean; /** * Endpoint ID */ id: Long; /** * IP address of endpoint */ ip: string; /** * IPv6 address of endpoint */ ipv6: string; /** * Port ID */ port: number; /** * Our peer tag */ peerTag: Uint8Array; } /** * WebRTC connection parameters */ interface RawPhoneConnectionWebrtc { _: 'phoneConnectionWebrtc'; /** * Whether this is a TURN endpoint */ turn?: boolean; /** * Whether this is a STUN endpoint */ stun?: boolean; /** * Endpoint ID */ id: Long; /** * IP address */ ip: string; /** * IPv6 address */ ipv6: string; /** * Port */ port: number; /** * Username */ username: string; /** * Password */ password: string; } /** * Protocol info for libtgvoip */ interface RawPhoneCallProtocol { _: 'phoneCallProtocol'; /** * Whether to allow P2P connection to the other participant */ udpP2p?: boolean; /** * Whether to allow connection to the other participants * through the reflector servers */ udpReflector?: boolean; /** * Minimum layer for remote libtgvoip */ minLayer: number; /** * Maximum layer for remote libtgvoip */ maxLayer: number; /** * When using {@link phone.RawRequestCallRequest} and * {@link phone.RawAcceptCallRequest}, 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 * {@link phone.RawAcceptCallRequest} and in the * {@link RawPhoneCallAccepted} update received by the caller. */ libraryVersions: string[]; } /** * Public key to use only during handshakes to * CDN DCs. */ interface RawCdnPublicKey { _: 'cdnPublicKey'; /** * CDN DC ID */ dcId: number; /** * RSA public key */ publicKey: string; } /** * Configuration for * CDN file * downloads. */ interface RawCdnConfig { _: 'cdnConfig'; /** * Vector of public keys to use only during * handshakes to * CDN DCs. */ publicKeys: tl.TypeCdnPublicKey[]; } /** * Translated localization string */ interface RawLangPackString { _: 'langPackString'; /** * Language key */ key: string; /** * Value */ value: string; } /** * 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 * for more info */ interface RawLangPackStringPluralized { _: 'langPackStringPluralized'; /** * Localization key */ key: string; /** * Value for zero objects */ zeroValue?: string; /** * Value for one object */ oneValue?: string; /** * Value for two objects */ twoValue?: string; /** * Value for a few objects */ fewValue?: string; /** * Value for many objects */ manyValue?: string; /** * Default value */ otherValue: string; } /** * Deleted localization string */ interface RawLangPackStringDeleted { _: 'langPackStringDeleted'; /** * Localization key */ key: string; } /** * Changes to the app's localization pack */ interface RawLangPackDifference { _: 'langPackDifference'; /** * Language code */ langCode: string; /** * Previous version number */ fromVersion: number; /** * New version number */ version: number; /** * Localized strings */ strings: tl.TypeLangPackString[]; } /** * Identifies a localization pack */ interface RawLangPackLanguage { _: 'langPackLanguage'; /** * Whether the language pack is official */ official?: boolean; /** * Is this a localization pack for an RTL language */ rtl?: boolean; /** * Is this a beta localization pack? */ beta?: boolean; /** * Language name */ name: string; /** * Language name in the language itself */ nativeName: string; /** * Language code (pack identifier) */ langCode: 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 */ baseLangCode?: string; /** * A language code to be used to apply plural forms. See * https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html * for more info */ pluralCode: string; /** * Total number of non-deleted strings from the language pack */ stringsCount: number; /** * Total number of translated strings from the language pack */ translatedCount: number; /** * Link to language translation interface; empty for custom * local language packs */ translationsUrl: string; } /** * Channel/supergroup title was changed */ interface RawChannelAdminLogEventActionChangeTitle { _: 'channelAdminLogEventActionChangeTitle'; /** * Previous title */ prevValue: string; /** * New title */ newValue: string; } /** * The description was changed */ interface RawChannelAdminLogEventActionChangeAbout { _: 'channelAdminLogEventActionChangeAbout'; /** * Previous description */ prevValue: string; /** * New description */ newValue: string; } /** * Channel/supergroup username was changed */ interface RawChannelAdminLogEventActionChangeUsername { _: 'channelAdminLogEventActionChangeUsername'; /** * Old username */ prevValue: string; /** * New username */ newValue: string; } /** * The channel/supergroup's picture was changed */ interface RawChannelAdminLogEventActionChangePhoto { _: 'channelAdminLogEventActionChangePhoto'; /** * Previous picture */ prevPhoto: tl.TypePhoto; /** * New picture */ newPhoto: tl.TypePhoto; } /** * Invites were enabled/disabled */ interface RawChannelAdminLogEventActionToggleInvites { _: 'channelAdminLogEventActionToggleInvites'; /** * New value */ newValue: boolean; } /** * Channel signatures were enabled/disabled */ interface RawChannelAdminLogEventActionToggleSignatures { _: 'channelAdminLogEventActionToggleSignatures'; /** * New value */ newValue: boolean; } /** * A message was pinned */ interface RawChannelAdminLogEventActionUpdatePinned { _: 'channelAdminLogEventActionUpdatePinned'; /** * The message that was pinned */ message: tl.TypeMessage; } /** * A message was edited */ interface RawChannelAdminLogEventActionEditMessage { _: 'channelAdminLogEventActionEditMessage'; /** * Old message */ prevMessage: tl.TypeMessage; /** * New message */ newMessage: tl.TypeMessage; } /** * A message was deleted */ interface RawChannelAdminLogEventActionDeleteMessage { _: 'channelAdminLogEventActionDeleteMessage'; /** * The message that was deleted */ message: tl.TypeMessage; } /** * A user has joined the group (in the case of big groups, info * of the user that has joined isn't shown) */ interface RawChannelAdminLogEventActionParticipantJoin { _: 'channelAdminLogEventActionParticipantJoin'; } /** * A user left the channel/supergroup (in the case of big * groups, info of the user that has joined isn't shown) */ interface RawChannelAdminLogEventActionParticipantLeave { _: 'channelAdminLogEventActionParticipantLeave'; } /** * A user was invited to the group */ interface RawChannelAdminLogEventActionParticipantInvite { _: 'channelAdminLogEventActionParticipantInvite'; /** * The user that was invited */ participant: tl.TypeChannelParticipant; } /** * The banned * rights * of a user were changed */ interface RawChannelAdminLogEventActionParticipantToggleBan { _: 'channelAdminLogEventActionParticipantToggleBan'; /** * Old banned rights of user */ prevParticipant: tl.TypeChannelParticipant; /** * New banned rights of user */ newParticipant: tl.TypeChannelParticipant; } /** * The admin * rights * of a user were changed */ interface RawChannelAdminLogEventActionParticipantToggleAdmin { _: 'channelAdminLogEventActionParticipantToggleAdmin'; /** * Previous admin rights */ prevParticipant: tl.TypeChannelParticipant; /** * New admin rights */ newParticipant: tl.TypeChannelParticipant; } /** * The supergroup's stickerset was changed */ interface RawChannelAdminLogEventActionChangeStickerSet { _: 'channelAdminLogEventActionChangeStickerSet'; /** * Previous stickerset */ prevStickerset: tl.TypeInputStickerSet; /** * New stickerset */ newStickerset: tl.TypeInputStickerSet; } /** * The hidden prehistory setting was * {@link channels.RawTogglePreHistoryHiddenRequest} */ interface RawChannelAdminLogEventActionTogglePreHistoryHidden { _: 'channelAdminLogEventActionTogglePreHistoryHidden'; /** * New value */ newValue: boolean; } /** * The default banned rights were modified */ interface RawChannelAdminLogEventActionDefaultBannedRights { _: 'channelAdminLogEventActionDefaultBannedRights'; /** * Previous global * banned * rights */ prevBannedRights: tl.TypeChatBannedRights; /** * New global * banned * rights. */ newBannedRights: tl.TypeChatBannedRights; } /** * A poll was stopped */ interface RawChannelAdminLogEventActionStopPoll { _: 'channelAdminLogEventActionStopPoll'; /** * The poll that was stopped */ message: tl.TypeMessage; } /** * The linked chat was changed */ interface RawChannelAdminLogEventActionChangeLinkedChat { _: 'channelAdminLogEventActionChangeLinkedChat'; /** * Previous linked chat */ prevValue: number; /** * New linked chat */ newValue: number; } /** * The geo group location was changed */ interface RawChannelAdminLogEventActionChangeLocation { _: 'channelAdminLogEventActionChangeLocation'; /** * Previous location */ prevValue: tl.TypeChannelLocation; /** * New location */ newValue: tl.TypeChannelLocation; } /** * {@link channels.RawToggleSlowModeRequest} */ interface RawChannelAdminLogEventActionToggleSlowMode { _: 'channelAdminLogEventActionToggleSlowMode'; /** * Previous slow mode value */ prevValue: number; /** * New slow mode value */ newValue: number; } /** * A group call was started */ interface RawChannelAdminLogEventActionStartGroupCall { _: 'channelAdminLogEventActionStartGroupCall'; /** * Group call */ call: tl.TypeInputGroupCall; } /** * A group call was terminated */ interface RawChannelAdminLogEventActionDiscardGroupCall { _: 'channelAdminLogEventActionDiscardGroupCall'; /** * The group call that was terminated */ call: tl.TypeInputGroupCall; } /** * A group call participant was muted */ interface RawChannelAdminLogEventActionParticipantMute { _: 'channelAdminLogEventActionParticipantMute'; /** * The participant that was muted */ participant: tl.TypeGroupCallParticipant; } /** * A group call participant was unmuted */ interface RawChannelAdminLogEventActionParticipantUnmute { _: 'channelAdminLogEventActionParticipantUnmute'; /** * The participant that was unmuted */ participant: tl.TypeGroupCallParticipant; } /** * Group call settings were changed */ interface RawChannelAdminLogEventActionToggleGroupCallSetting { _: 'channelAdminLogEventActionToggleGroupCallSetting'; /** * Whether all users are muted by default upon joining */ joinMuted: boolean; } /** * A user joined the * supergroup/channel * using a specific invite link */ interface RawChannelAdminLogEventActionParticipantJoinByInvite { _: 'channelAdminLogEventActionParticipantJoinByInvite'; /** * The participant joined by importing a * chat * folder deep link ». */ viaChatlist?: boolean; /** * The invite link used to join the * supergroup/channel */ invite: tl.TypeExportedChatInvite; } /** * A chat invite was deleted */ interface RawChannelAdminLogEventActionExportedInviteDelete { _: 'channelAdminLogEventActionExportedInviteDelete'; /** * The deleted chat invite */ invite: tl.TypeExportedChatInvite; } /** * A specific invite link was revoked */ interface RawChannelAdminLogEventActionExportedInviteRevoke { _: 'channelAdminLogEventActionExportedInviteRevoke'; /** * The invite link that was revoked */ invite: tl.TypeExportedChatInvite; } /** * A chat invite was edited */ interface RawChannelAdminLogEventActionExportedInviteEdit { _: 'channelAdminLogEventActionExportedInviteEdit'; /** * Previous chat invite information */ prevInvite: tl.TypeExportedChatInvite; /** * New chat invite information */ newInvite: tl.TypeExportedChatInvite; } /** * channelAdminLogEvent.user_id has set the volume of * participant.peer to participant.volume */ interface RawChannelAdminLogEventActionParticipantVolume { _: 'channelAdminLogEventActionParticipantVolume'; /** * The participant whose volume was changed */ participant: tl.TypeGroupCallParticipant; } /** * The Time-To-Live of messages in this chat was changed */ interface RawChannelAdminLogEventActionChangeHistoryTTL { _: 'channelAdminLogEventActionChangeHistoryTTL'; /** * Previous value */ prevValue: number; /** * New value */ newValue: number; } /** * A new member was accepted to the chat by an admin */ interface RawChannelAdminLogEventActionParticipantJoinByRequest { _: 'channelAdminLogEventActionParticipantJoinByRequest'; /** * The invite link that was used to join the chat */ invite: tl.TypeExportedChatInvite; /** * ID of the admin that approved the invite */ approvedBy: number; } /** * Forwards were enabled or disabled */ interface RawChannelAdminLogEventActionToggleNoForwards { _: 'channelAdminLogEventActionToggleNoForwards'; /** * Old value */ newValue: boolean; } /** * A message was posted in a channel */ interface RawChannelAdminLogEventActionSendMessage { _: 'channelAdminLogEventActionSendMessage'; /** * The message that was sent */ message: tl.TypeMessage; } /** * The set of allowed * message * reactions » for this channel has changed */ interface RawChannelAdminLogEventActionChangeAvailableReactions { _: 'channelAdminLogEventActionChangeAvailableReactions'; /** * Previously allowed reaction emojis */ prevValue: tl.TypeChatReactions; /** * New allowed reaction emojis */ newValue: tl.TypeChatReactions; } /** * The list of usernames associated with the channel was * changed */ interface RawChannelAdminLogEventActionChangeUsernames { _: 'channelAdminLogEventActionChangeUsernames'; /** * Previous set of usernames */ prevValue: string[]; /** * New set of usernames */ newValue: string[]; } /** * Forum * functionality was enabled or disabled. */ interface RawChannelAdminLogEventActionToggleForum { _: 'channelAdminLogEventActionToggleForum'; /** * Whether * forum * functionality was enabled or disabled. */ newValue: boolean; } /** * A * forum * topic was created */ interface RawChannelAdminLogEventActionCreateTopic { _: 'channelAdminLogEventActionCreateTopic'; /** * The * forum * topic that was created */ topic: tl.TypeForumTopic; } /** * A * forum * topic was edited */ interface RawChannelAdminLogEventActionEditTopic { _: 'channelAdminLogEventActionEditTopic'; /** * Previous topic information */ prevTopic: tl.TypeForumTopic; /** * New topic information */ newTopic: tl.TypeForumTopic; } /** * A * forum * topic was deleted */ interface RawChannelAdminLogEventActionDeleteTopic { _: 'channelAdminLogEventActionDeleteTopic'; /** * The * forum * topic that was deleted */ topic: tl.TypeForumTopic; } /** * A * forum * topic was pinned or unpinned */ interface RawChannelAdminLogEventActionPinTopic { _: 'channelAdminLogEventActionPinTopic'; /** * Previous topic information */ prevTopic?: tl.TypeForumTopic; /** * New topic information */ newTopic?: tl.TypeForumTopic; } /** * Native * antispam functionality was enabled or disabled. */ interface RawChannelAdminLogEventActionToggleAntiSpam { _: 'channelAdminLogEventActionToggleAntiSpam'; /** * Whether antispam functionality was enabled or disabled. */ newValue: boolean; } /** * The * message * accent color was changed */ interface RawChannelAdminLogEventActionChangePeerColor { _: 'channelAdminLogEventActionChangePeerColor'; /** * Previous accent palette */ prevValue: tl.TypePeerColor; /** * New accent palette */ newValue: tl.TypePeerColor; } /** * The * profile * accent color was changed */ interface RawChannelAdminLogEventActionChangeProfilePeerColor { _: 'channelAdminLogEventActionChangeProfilePeerColor'; /** * Previous accent palette */ prevValue: tl.TypePeerColor; /** * New accent palette */ newValue: tl.TypePeerColor; } /** * The * wallpaper * was changed */ interface RawChannelAdminLogEventActionChangeWallpaper { _: 'channelAdminLogEventActionChangeWallpaper'; /** * Previous wallpaper */ prevValue: tl.TypeWallPaper; /** * New wallpaper */ newValue: tl.TypeWallPaper; } /** * The * emoji * status was changed */ interface RawChannelAdminLogEventActionChangeEmojiStatus { _: 'channelAdminLogEventActionChangeEmojiStatus'; /** * Previous emoji status */ prevValue: tl.TypeEmojiStatus; /** * New emoji status */ newValue: tl.TypeEmojiStatus; } /** * The supergroup's * custom * emoji stickerset was changed. */ interface RawChannelAdminLogEventActionChangeEmojiStickerSet { _: 'channelAdminLogEventActionChangeEmojiStickerSet'; /** * Old value */ prevStickerset: tl.TypeInputStickerSet; /** * New value */ newStickerset: tl.TypeInputStickerSet; } /** * Channel signature profiles were enabled/disabled. */ interface RawChannelAdminLogEventActionToggleSignatureProfiles { _: 'channelAdminLogEventActionToggleSignatureProfiles'; /** * New value */ newValue: boolean; } /** * A paid subscriber has extended their * Telegram * Star subscription ». */ interface RawChannelAdminLogEventActionParticipantSubExtend { _: 'channelAdminLogEventActionParticipantSubExtend'; /** * Same as new_participant. */ prevParticipant: tl.TypeChannelParticipant; /** * The subscriber that extended the subscription. */ newParticipant: tl.TypeChannelParticipant; } /** * Channel * autotranslation was toggled ». */ interface RawChannelAdminLogEventActionToggleAutotranslation { _: 'channelAdminLogEventActionToggleAutotranslation'; /** * New value of the toggle */ newValue: boolean; } interface RawChannelAdminLogEventActionParticipantEditRank { _: 'channelAdminLogEventActionParticipantEditRank'; userId: number; prevRank: string; newRank: string; } /** * Admin log event */ interface RawChannelAdminLogEvent { _: 'channelAdminLogEvent'; /** * Event ID */ id: Long; /** * Date */ date: number; /** * User ID */ userId: number; /** * Action */ action: tl.TypeChannelAdminLogEventAction; } /** * Filter only certain admin log events */ interface RawChannelAdminLogEventsFilter { _: 'channelAdminLogEventsFilter'; /** * {@link RawChannelAdminLogEventActionParticipantJoin}, * including * {@link RawChannelAdminLogEventActionParticipantJoinByInvite} * and * {@link RawChannelAdminLogEventActionParticipantJoinByRequest}. */ join?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantLeave} */ leave?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantInvite} */ invite?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantToggleBan} */ ban?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantToggleBan} */ unban?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantToggleBan} */ kick?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantToggleBan} */ unkick?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantToggleAdmin} */ promote?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantToggleAdmin} */ demote?: boolean; /** * Info change events (when * {@link RawChannelAdminLogEventActionChangeAbout}, * {@link RawChannelAdminLogEventActionChangeLinkedChat}, * {@link RawChannelAdminLogEventActionChangeLocation}, * {@link RawChannelAdminLogEventActionChangePhoto}, * {@link RawChannelAdminLogEventActionChangeStickerSet}, * {@link RawChannelAdminLogEventActionChangeTitle} or * {@link RawChannelAdminLogEventActionChangeUsername}, * {@link RawChannelAdminLogEventActionToggleSlowMode}, * {@link RawChannelAdminLogEventActionChangeHistoryTTL} * settings of a channel gets modified) */ info?: boolean; /** * Settings change events * ({@link RawChannelAdminLogEventActionToggleInvites}, * {@link RawChannelAdminLogEventActionTogglePreHistoryHidden}, * {@link RawChannelAdminLogEventActionToggleSignatures}, * {@link RawChannelAdminLogEventActionDefaultBannedRights}, * {@link RawChannelAdminLogEventActionToggleForum}) */ settings?: boolean; /** * {@link RawChannelAdminLogEventActionUpdatePinned} */ pinned?: boolean; /** * {@link RawChannelAdminLogEventActionEditMessage} */ edit?: boolean; /** * {@link RawChannelAdminLogEventActionDeleteMessage} */ delete?: boolean; /** * Group call events */ groupCall?: boolean; /** * Invite events */ invites?: boolean; /** * A message was posted in a channel */ send?: boolean; /** * Forum-related * events */ forums?: boolean; /** * {@link RawChannelAdminLogEventActionParticipantSubExtend} */ subExtend?: boolean; editRank?: boolean; } /** * Popular contact */ interface RawPopularContact { _: 'popularContact'; /** * Contact identifier */ clientId: Long; /** * How many people imported this contact */ importers: number; } /** * Unknown t.me url */ interface RawRecentMeUrlUnknown { _: 'recentMeUrlUnknown'; /** * URL */ url: string; } /** * Recent t.me link to a user */ interface RawRecentMeUrlUser { _: 'recentMeUrlUser'; /** * URL */ url: string; /** * User ID */ userId: number; } /** * Recent t.me link to a chat */ interface RawRecentMeUrlChat { _: 'recentMeUrlChat'; /** * t.me URL */ url: string; /** * Chat ID */ chatId: number; } /** * Recent t.me invite link to a chat */ interface RawRecentMeUrlChatInvite { _: 'recentMeUrlChatInvite'; /** * t.me URL */ url: string; /** * Chat invitation */ chatInvite: tl.TypeChatInvite; } /** * Recent t.me stickerset installation URL */ interface RawRecentMeUrlStickerSet { _: 'recentMeUrlStickerSet'; /** * t.me URL */ url: string; /** * Stickerset */ set: tl.TypeStickerSetCovered; } /** * A single media in an * album * or grouped media sent with * {@link messages.RawSendMultiMediaRequest}. */ interface RawInputSingleMedia { _: 'inputSingleMedia'; /** * The media */ media: tl.TypeInputMedia; /** * Unique client media ID required to prevent message resending */ randomId: Long; /** * A caption for the media */ message: string; /** * Message * entities * for styled text */ entities?: tl.TypeMessageEntity[]; } /** * Represents a bot logged in using the * Telegram * login widget */ interface RawWebAuthorization { _: 'webAuthorization'; /** * Authorization hash */ hash: Long; /** * Bot ID */ botId: number; /** * 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 */ dateCreated: number; /** * When was the web session last active */ dateActive: number; /** * IP address */ ip: string; /** * Region, determined from IP address */ region: string; } /** * Message by ID */ interface RawInputMessageID { _: 'inputMessageID'; /** * Message ID */ id: number; } /** * Message to which the specified message replies to */ interface RawInputMessageReplyTo { _: 'inputMessageReplyTo'; /** * ID of the message that replies to the message we need */ id: number; } /** * Pinned message */ interface RawInputMessagePinned { _: 'inputMessagePinned'; } /** * Used by bots for fetching information about the message that * originated a callback query */ interface RawInputMessageCallbackQuery { _: 'inputMessageCallbackQuery'; /** * Message ID */ id: number; /** * Callback query ID */ queryId: Long; } /** * A peer */ interface RawInputDialogPeer { _: 'inputDialogPeer'; /** * Peer */ peer: tl.TypeInputPeer; } /** * All peers in a * peer * folder */ interface RawInputDialogPeerFolder { _: 'inputDialogPeerFolder'; /** * Peer * folder ID, for more info click here */ folderId: number; } /** * Peer */ interface RawDialogPeer { _: 'dialogPeer'; /** * Peer */ peer: tl.TypePeer; } /** * Peer * folder */ interface RawDialogPeerFolder { _: 'dialogPeerFolder'; /** * Peer * folder ID, for more info click here */ folderId: number; } /** * SHA256 Hash of an uploaded file, to be checked for validity * after download */ interface RawFileHash { _: 'fileHash'; /** * Offset from where to start computing SHA-256 hash */ offset: number; /** * Length */ limit: number; /** * SHA-256 Hash of file chunk, to be checked for validity after * download */ hash: Uint8Array; } /** * Info about an * MTProxy * used to connect. */ interface RawInputClientProxy { _: 'inputClientProxy'; /** * Proxy address */ address: string; /** * Proxy port */ port: number; } /** * Uploaded secure file, for more info * see * the passport docs » */ interface RawInputSecureFileUploaded { _: 'inputSecureFileUploaded'; /** * Secure file ID */ id: Long; /** * Secure file part count */ parts: number; /** * MD5 hash of encrypted uploaded file, to be checked * server-side */ md5Checksum: string; /** * File hash */ fileHash: Uint8Array; /** * Secret */ secret: Uint8Array; } /** * Pre-uploaded * passport * file, for more info * see * the passport docs » */ interface RawInputSecureFile { _: 'inputSecureFile'; /** * Secure file ID */ id: Long; /** * Secure file access hash */ accessHash: Long; } /** * Empty constructor */ interface RawSecureFileEmpty { _: 'secureFileEmpty'; } /** * Secure * passport * file, for more info * see * the passport docs » */ interface RawSecureFile { _: 'secureFile'; /** * ID */ id: Long; /** * Access hash */ accessHash: Long; /** * File size */ size: number; /** * DC ID */ dcId: number; /** * Date of upload */ date: number; /** * File hash */ fileHash: Uint8Array; /** * Secret */ secret: Uint8Array; } /** * Secure * passport * data, for more info * see * the passport docs » */ interface RawSecureData { _: 'secureData'; /** * Data */ data: Uint8Array; /** * Data hash */ dataHash: Uint8Array; /** * Secret */ secret: Uint8Array; } /** * Phone number to use in * telegram * passport: * it * must be verified, first ». */ interface RawSecurePlainPhone { _: 'securePlainPhone'; /** * Phone number */ phone: string; } /** * Email address to use in * telegram * passport: * it * must be verified, first ». */ interface RawSecurePlainEmail { _: 'securePlainEmail'; /** * Email address */ email: string; } /** * Personal details */ interface RawSecureValueTypePersonalDetails { _: 'secureValueTypePersonalDetails'; } /** * Passport */ interface RawSecureValueTypePassport { _: 'secureValueTypePassport'; } /** * Driver's license */ interface RawSecureValueTypeDriverLicense { _: 'secureValueTypeDriverLicense'; } /** * Identity card */ interface RawSecureValueTypeIdentityCard { _: 'secureValueTypeIdentityCard'; } /** * Internal * passport */ interface RawSecureValueTypeInternalPassport { _: 'secureValueTypeInternalPassport'; } /** * Address */ interface RawSecureValueTypeAddress { _: 'secureValueTypeAddress'; } /** * Utility bill */ interface RawSecureValueTypeUtilityBill { _: 'secureValueTypeUtilityBill'; } /** * Bank statement */ interface RawSecureValueTypeBankStatement { _: 'secureValueTypeBankStatement'; } /** * Rental agreement */ interface RawSecureValueTypeRentalAgreement { _: 'secureValueTypeRentalAgreement'; } /** * Internal registration * passport */ interface RawSecureValueTypePassportRegistration { _: 'secureValueTypePassportRegistration'; } /** * Temporary registration */ interface RawSecureValueTypeTemporaryRegistration { _: 'secureValueTypeTemporaryRegistration'; } /** * Phone */ interface RawSecureValueTypePhone { _: 'secureValueTypePhone'; } /** * Email */ interface RawSecureValueTypeEmail { _: 'secureValueTypeEmail'; } /** * Secure value */ interface RawSecureValue { _: 'secureValue'; /** * Secure * passport * value type */ type: tl.TypeSecureValueType; /** * Encrypted * Telegram * Passport element data */ data?: tl.TypeSecureData; /** * Encrypted * passport * file with the front side of the document */ frontSide?: tl.TypeSecureFile; /** * Encrypted * passport * file with the reverse side of the document */ reverseSide?: tl.TypeSecureFile; /** * Encrypted * passport * file with a selfie of the user holding the document */ selfie?: tl.TypeSecureFile; /** * Array of encrypted * passport * files with translated versions of the provided documents */ translation?: tl.TypeSecureFile[]; /** * Array of encrypted * passport * files with photos the of the documents */ files?: tl.TypeSecureFile[]; /** * Plaintext verified * passport * data */ plainData?: tl.TypeSecurePlainData; /** * Data hash */ hash: Uint8Array; } /** * Secure value, * for * more info see the passport docs » */ interface RawInputSecureValue { _: 'inputSecureValue'; /** * Secure * passport * value type */ type: tl.TypeSecureValueType; /** * Encrypted * Telegram * Passport element data */ data?: tl.TypeSecureData; /** * Encrypted * passport * file with the front side of the document */ frontSide?: tl.TypeInputSecureFile; /** * Encrypted * passport * file with the reverse side of the document */ reverseSide?: tl.TypeInputSecureFile; /** * Encrypted * passport * file with a selfie of the user holding the document */ selfie?: tl.TypeInputSecureFile; /** * Array of encrypted * passport * files with translated versions of the provided documents */ translation?: tl.TypeInputSecureFile[]; /** * Array of encrypted * passport * files with photos the of the documents */ files?: tl.TypeInputSecureFile[]; /** * Plaintext verified * passport * data */ plainData?: tl.TypeSecurePlainData; } /** * Secure value hash */ interface RawSecureValueHash { _: 'secureValueHash'; /** * Secure value type */ type: tl.TypeSecureValueType; /** * Hash */ hash: Uint8Array; } /** * 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. */ interface RawSecureValueErrorData { _: 'secureValueErrorData'; /** * The section of the user's Telegram Passport which has the * error, one of {@link RawSecureValueTypePersonalDetails}, * {@link RawSecureValueTypePassport}, * {@link RawSecureValueTypeDriverLicense}, * {@link RawSecureValueTypeIdentityCard}, * {@link RawSecureValueTypeInternalPassport}, * {@link RawSecureValueTypeAddress} */ type: tl.TypeSecureValueType; /** * Data hash */ dataHash: Uint8Array; /** * Name of the data field which has the error */ field: string; /** * Error message */ text: string; } /** * 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. */ interface RawSecureValueErrorFrontSide { _: 'secureValueErrorFrontSide'; /** * One of {@link RawSecureValueTypePassport}, * {@link RawSecureValueTypeDriverLicense}, * {@link RawSecureValueTypeIdentityCard}, * {@link RawSecureValueTypeInternalPassport} */ type: tl.TypeSecureValueType; /** * File hash */ fileHash: Uint8Array; /** * Error message */ text: string; } /** * 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. */ interface RawSecureValueErrorReverseSide { _: 'secureValueErrorReverseSide'; /** * One of {@link RawSecureValueTypeDriverLicense}, * {@link RawSecureValueTypeIdentityCard} */ type: tl.TypeSecureValueType; /** * File hash */ fileHash: Uint8Array; /** * Error message */ text: string; } /** * Represents an issue with the selfie with a document. The * error is considered resolved when the file with the selfie * changes. */ interface RawSecureValueErrorSelfie { _: 'secureValueErrorSelfie'; /** * One of {@link RawSecureValueTypePassport}, * {@link RawSecureValueTypeDriverLicense}, * {@link RawSecureValueTypeIdentityCard}, * {@link RawSecureValueTypeInternalPassport} */ type: tl.TypeSecureValueType; /** * File hash */ fileHash: Uint8Array; /** * Error message */ text: string; } /** * Represents an issue with a document scan. The error is * considered resolved when the file with the document scan * changes. */ interface RawSecureValueErrorFile { _: 'secureValueErrorFile'; /** * One of {@link RawSecureValueTypeUtilityBill}, * {@link RawSecureValueTypeBankStatement}, * {@link RawSecureValueTypeRentalAgreement}, * {@link RawSecureValueTypePassportRegistration}, * {@link RawSecureValueTypeTemporaryRegistration} */ type: tl.TypeSecureValueType; /** * File hash */ fileHash: Uint8Array; /** * Error message */ text: string; } /** * Represents an issue with a list of scans. The error is * considered resolved when the list of files containing the * scans changes. */ interface RawSecureValueErrorFiles { _: 'secureValueErrorFiles'; /** * One of {@link RawSecureValueTypeUtilityBill}, * {@link RawSecureValueTypeBankStatement}, * {@link RawSecureValueTypeRentalAgreement}, * {@link RawSecureValueTypePassportRegistration}, * {@link RawSecureValueTypeTemporaryRegistration} */ type: tl.TypeSecureValueType; /** * File hash */ fileHash: Uint8Array[]; /** * Error message */ text: string; } /** * Secure value error */ interface RawSecureValueError { _: 'secureValueError'; /** * Type of element which has the issue */ type: tl.TypeSecureValueType; /** * Hash */ hash: Uint8Array; /** * Error message */ text: string; } /** * Represents an issue with one of the files that constitute * the translation of a document. The error is considered * resolved when the file changes. */ interface RawSecureValueErrorTranslationFile { _: 'secureValueErrorTranslationFile'; /** * One of {@link RawSecureValueTypePersonalDetails}, * {@link RawSecureValueTypePassport}, * {@link RawSecureValueTypeDriverLicense}, * {@link RawSecureValueTypeIdentityCard}, * {@link RawSecureValueTypeInternalPassport}, * {@link RawSecureValueTypeUtilityBill}, * {@link RawSecureValueTypeBankStatement}, * {@link RawSecureValueTypeRentalAgreement}, * {@link RawSecureValueTypePassportRegistration}, * {@link RawSecureValueTypeTemporaryRegistration} */ type: tl.TypeSecureValueType; /** * File hash */ fileHash: Uint8Array; /** * Error message */ text: string; } /** * Represents an issue with the translated version of a * document. The error is considered resolved when a file with * the document translation changes. */ interface RawSecureValueErrorTranslationFiles { _: 'secureValueErrorTranslationFiles'; /** * One of {@link RawSecureValueTypePersonalDetails}, * {@link RawSecureValueTypePassport}, * {@link RawSecureValueTypeDriverLicense}, * {@link RawSecureValueTypeIdentityCard}, * {@link RawSecureValueTypeInternalPassport}, * {@link RawSecureValueTypeUtilityBill}, * {@link RawSecureValueTypeBankStatement}, * {@link RawSecureValueTypeRentalAgreement}, * {@link RawSecureValueTypePassportRegistration}, * {@link RawSecureValueTypeTemporaryRegistration} */ type: tl.TypeSecureValueType; /** * Hash */ fileHash: Uint8Array[]; /** * Error message */ text: string; } /** * Encrypted credentials required to decrypt * telegram * passport data. */ interface RawSecureCredentialsEncrypted { _: '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 » */ data: Uint8Array; /** * Data hash for data authentication as described in * decrypting * data » */ hash: Uint8Array; /** * Secret, encrypted with the bot's public RSA key, required * for data decryption as described in * decrypting * data » */ secret: Uint8Array; } /** * Saved contact */ interface RawSavedPhoneContact { _: 'savedPhoneContact'; /** * Phone number */ phone: string; /** * First name */ firstName: string; /** * Last name */ lastName: string; /** * Date added */ date: number; } /** * Unknown KDF (most likely, the client is outdated and does * not support the specified KDF algorithm) */ interface RawPasswordKdfAlgoUnknown { _: 'passwordKdfAlgoUnknown'; } /** * This key derivation algorithm defines that * SRP 2FA * login must be used */ interface RawPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow { _: 'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow'; /** * One of two salts used by the derivation function (see * SRP 2FA * login) */ salt1: Uint8Array; /** * One of two salts used by the derivation function (see * SRP 2FA * login) */ salt2: Uint8Array; /** * Base (see * SRP 2FA * login) */ g: number; /** * 2048-bit modulus (see * SRP 2FA * login) */ p: Uint8Array; } /** * Unknown KDF algo (most likely the client has to be updated) */ interface RawSecurePasswordKdfAlgoUnknown { _: 'securePasswordKdfAlgoUnknown'; } /** * PBKDF2 with SHA512 and 100000 iterations KDF algo */ interface RawSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 { _: 'securePasswordKdfAlgoPBKDF2HMACSHA512iter100000'; /** * Salt */ salt: Uint8Array; } /** * SHA512 KDF algo */ interface RawSecurePasswordKdfAlgoSHA512 { _: 'securePasswordKdfAlgoSHA512'; /** * Salt */ salt: Uint8Array; } /** * Secure settings */ interface RawSecureSecretSettings { _: 'secureSecretSettings'; /** * Secure KDF algo */ secureAlgo: tl.TypeSecurePasswordKdfAlgo; /** * Secure secret */ secureSecret: Uint8Array; /** * Secret ID */ secureSecretId: Long; } /** * There is no password */ interface RawInputCheckPasswordEmpty { _: 'inputCheckPasswordEmpty'; } /** * Constructor for checking the validity of a 2FA SRP password * (see * SRP) */ interface RawInputCheckPasswordSRP { _: 'inputCheckPasswordSRP'; /** * SRP ID */ srpId: Long; /** * A parameter (see * SRP) */ A: Uint8Array; /** * M1 parameter (see * SRP) */ M1: Uint8Array; } /** * Required type */ interface RawSecureRequiredType { _: 'secureRequiredType'; /** * Native names */ nativeNames?: boolean; /** * Is a selfie required */ selfieRequired?: boolean; /** * Is a translation required */ translationRequired?: boolean; /** * Secure value type */ type: tl.TypeSecureValueType; } /** * One of */ interface RawSecureRequiredTypeOneOf { _: 'secureRequiredTypeOneOf'; /** * Secure required value types */ types: tl.TypeSecureRequiredType[]; } /** * Event that occurred in the application. */ interface RawInputAppEvent { _: 'inputAppEvent'; /** * Client's exact timestamp for the event */ time: Double; /** * Type of event */ type: string; /** * Arbitrary numeric value for more convenient selection of * certain event types, or events referring to a certain object */ peer: Long; /** * Details of the event */ data: tl.TypeJSONValue; } /** * JSON key: value pair */ interface RawJsonObjectValue { _: 'jsonObjectValue'; /** * Key */ key: string; /** * Value */ value: tl.TypeJSONValue; } /** * null JSON value */ interface RawJsonNull { _: 'jsonNull'; } /** * JSON boolean value */ interface RawJsonBool { _: 'jsonBool'; /** * Value */ value: boolean; } /** * JSON numeric value */ interface RawJsonNumber { _: 'jsonNumber'; /** * Value */ value: Double; } /** * JSON string */ interface RawJsonString { _: 'jsonString'; /** * Value */ value: string; } /** * JSON array */ interface RawJsonArray { _: 'jsonArray'; /** * JSON values */ value: tl.TypeJSONValue[]; } /** * JSON object value */ interface RawJsonObject { _: 'jsonObject'; /** * Values */ value: tl.TypeJSONObjectValue[]; } /** * Table cell */ interface RawPageTableCell { _: 'pageTableCell'; /** * Is this element part of the column header */ header?: boolean; /** * Horizontally centered block */ alignCenter?: boolean; /** * Right-aligned block */ alignRight?: boolean; /** * Vertically centered block */ valignMiddle?: boolean; /** * Block vertically-aligned to the bottom */ valignBottom?: boolean; /** * Content */ text?: tl.TypeRichText; /** * For how many columns should this cell extend */ colspan?: number; /** * For how many rows should this cell extend */ rowspan?: number; } /** * Table row */ interface RawPageTableRow { _: 'pageTableRow'; /** * Table cells */ cells: tl.TypePageTableCell[]; } /** * Page caption */ interface RawPageCaption { _: 'pageCaption'; /** * Caption */ text: tl.TypeRichText; /** * Credits */ credit: tl.TypeRichText; } /** * List item */ interface RawPageListItemText { _: 'pageListItemText'; /** * Text */ text: tl.TypeRichText; } /** * List item */ interface RawPageListItemBlocks { _: 'pageListItemBlocks'; /** * Blocks */ blocks: tl.TypePageBlock[]; } /** * Ordered list of text items */ interface RawPageListOrderedItemText { _: 'pageListOrderedItemText'; /** * Number of element within ordered list */ num: string; /** * Text */ text: tl.TypeRichText; } /** * Ordered list of * IV blocks */ interface RawPageListOrderedItemBlocks { _: 'pageListOrderedItemBlocks'; /** * Number of element within ordered list */ num: string; /** * Item contents */ blocks: tl.TypePageBlock[]; } /** * Related article */ interface RawPageRelatedArticle { _: 'pageRelatedArticle'; /** * URL of article */ url: string; /** * Webpage ID of generated IV preview */ webpageId: Long; /** * Title */ title?: string; /** * Description */ description?: string; /** * ID of preview photo */ photoId?: Long; /** * Author name */ author?: string; /** * Date of publication */ publishedDate?: number; } /** * Instant view * page */ interface RawPage { _: '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 {@link messages.RawGetWebPagePreviewRequest}. */ part?: boolean; /** * Whether the page contains RTL text */ rtl?: boolean; /** * Whether this is an * IV * v2 page */ v2?: boolean; /** * Original page HTTP URL */ url: string; /** * Page elements (like with HTML elements, only as TL * constructors) */ blocks: tl.TypePageBlock[]; /** * Photos in page */ photos: tl.TypePhoto[]; /** * Media in page */ documents: tl.TypeDocument[]; /** * View count */ views?: number; } /** * A possible answer of a poll */ interface RawPollAnswer { _: 'pollAnswer'; /** * Textual representation of the answer (only * Premium * users can use * custom * emoji entities here). */ text: tl.TypeTextWithEntities; /** * The param that has to be passed to * {@link messages.RawSendVoteRequest}. */ option: Uint8Array; } /** * Poll */ interface RawPoll { _: 'poll'; /** * ID of the poll */ id: Long; /** * Whether the poll is closed and doesn't accept any more * answers */ closed?: boolean; /** * Whether cast votes are publicly visible to all users * (non-anonymous poll) */ publicVoters?: boolean; /** * Whether multiple options can be chosen as answer */ multipleChoice?: boolean; /** * Whether this is a quiz (with wrong and correct answers, * results shown in the return type) */ quiz?: boolean; /** * The question of the poll (only * Premium * users can use * custom * emoji entities here). */ question: tl.TypeTextWithEntities; /** * The possible answers * (2-poll_answers_max), * vote using {@link messages.RawSendVoteRequest}. */ answers: tl.TypePollAnswer[]; /** * Amount of time in seconds the poll will be active after * creation, 5-600. Can't be used together with close_date. */ closePeriod?: number; /** * Point in time (UNIX timestamp in seconds) 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. */ closeDate?: number; } /** * A poll answer, and how users voted on it */ interface RawPollAnswerVoters { _: 'pollAnswerVoters'; /** * Whether we have chosen this answer */ chosen?: boolean; /** * For quizzes, whether the option we have chosen is correct */ correct?: boolean; /** * The param that has to be passed to * {@link messages.RawSendVoteRequest}. */ option: Uint8Array; /** * How many users voted for this option */ voters: number; } /** * Results of poll */ interface RawPollResults { _: 'pollResults'; /** * Similar to * 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 * {@link messages.RawGetPollResultsRequest} to get the full * poll results). */ min?: boolean; /** * Poll results */ results?: tl.TypePollAnswerVoters[]; /** * Total number of people that voted in the poll */ totalVoters?: number; /** * IDs of the last users that recently voted in the poll */ recentVoters?: tl.TypePeer[]; /** * Explanation of quiz solution */ solution?: string; /** * Message * entities for styled text in quiz solution */ solutionEntities?: tl.TypeMessageEntity[]; } /** * Number of online users in a chat */ interface RawChatOnlines { _: 'chatOnlines'; /** * Number of online users */ onlines: number; } /** * URL with chat statistics */ interface RawStatsURL { _: 'statsURL'; /** * Chat statistics */ url: string; } /** * Represents the rights of an admin in a * channel/supergroup. */ interface RawChatAdminRights { _: 'chatAdminRights'; /** * If set, allows the admin to modify the description of the * channel/supergroup */ changeInfo?: boolean; /** * If set, allows the admin to post messages in the * channel */ postMessages?: boolean; /** * If set, allows the admin to also edit messages from other * admins in the * channel */ editMessages?: boolean; /** * If set, allows the admin to also delete messages from other * admins in the * channel */ deleteMessages?: boolean; /** * If set, allows the admin to ban users from the * channel/supergroup */ banUsers?: boolean; /** * If set, allows the admin to invite users in the * channel/supergroup */ inviteUsers?: boolean; /** * If set, allows the admin to pin messages in the * channel/supergroup */ pinMessages?: boolean; /** * If set, allows the admin to add other admins with the same * (or more limited) permissions in the * channel/supergroup */ addAdmins?: boolean; /** * Whether this admin is anonymous */ anonymous?: boolean; /** * If set, allows the admin to change group call/livestream * settings */ manageCall?: boolean; /** * 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, get * chat * statistics, get * message * statistics in channels, get channel members, see * anonymous administrators in supergroups and ignore slow * mode. */ other?: boolean; /** * If set, allows the admin to create, delete or modify * forum * topics ». */ manageTopics?: boolean; /** * If set, allows the admin to post * stories * as the * channel. */ postStories?: boolean; /** * If set, allows the admin to edit * stories * posted by the other admins of the * channel. */ editStories?: boolean; /** * If set, allows the admin to delete * stories * posted by the other admins of the * channel. */ deleteStories?: boolean; /** * If set, allows the admin to manage the * direct * messages monoforum » and * decline * suggested posts ». */ manageDirectMessages?: boolean; manageRanks?: boolean; } /** * Represents the rights of a normal user in a * supergroup/channel/chat. * In this case, the flags are inverted: if set, a flag * does not allow a user to do X. */ interface RawChatBannedRights { _: 'chatBannedRights'; /** * If set, does not allow a user to view messages in a * supergroup/channel/chat */ viewMessages?: boolean; /** * If set, does not allow a user to send messages in a * supergroup/chat */ sendMessages?: boolean; /** * If set, does not allow a user to send any media in a * supergroup/chat */ sendMedia?: boolean; /** * If set, does not allow a user to send stickers in a * supergroup/chat */ sendStickers?: boolean; /** * If set, does not allow a user to send gifs in a * supergroup/chat */ sendGifs?: boolean; /** * If set, does not allow a user to send games in a * supergroup/chat */ sendGames?: boolean; /** * If set, does not allow a user to use inline bots in a * supergroup/chat. */ sendInline?: boolean; /** * If set, does not allow a user to embed links in the messages * of a * supergroup/chat */ embedLinks?: boolean; /** * If set, does not allow a user to send polls in a * supergroup/chat */ sendPolls?: boolean; /** * If set, does not allow any user to change the description of * a * supergroup/chat */ changeInfo?: boolean; /** * If set, does not allow any user to invite users in a * supergroup/chat */ inviteUsers?: boolean; /** * If set, does not allow any user to pin messages in a * supergroup/chat */ pinMessages?: boolean; /** * If set, does not allow any user to create, delete or modify * forum * topics ». */ manageTopics?: boolean; /** * If set, does not allow a user to send photos in a * supergroup/chat. */ sendPhotos?: boolean; /** * If set, does not allow a user to send videos in a * supergroup/chat. */ sendVideos?: boolean; /** * If set, does not allow a user to send round videos in a * supergroup/chat. */ sendRoundvideos?: boolean; /** * If set, does not allow a user to send audio files in a * supergroup/chat. */ sendAudios?: boolean; /** * If set, does not allow a user to send voice messages in a * supergroup/chat. */ sendVoices?: boolean; /** * If set, does not allow a user to send documents in a * supergroup/chat. */ sendDocs?: boolean; /** * If set, does not allow a user to send text messages in a * supergroup/chat. */ sendPlain?: boolean; editRank?: boolean; /** * Validity of said permissions (it is considered forever any * value less then 30 seconds or more then 366 days). */ untilDate: number; } /** * Wallpaper */ interface RawInputWallPaper { _: 'inputWallPaper'; /** * Wallpaper * ID */ id: Long; /** * Access hash */ accessHash: Long; } /** * Wallpaper * by slug (a unique ID, obtained from a * wallpaper * link ») */ interface RawInputWallPaperSlug { _: 'inputWallPaperSlug'; /** * Unique wallpaper ID */ slug: string; } /** * Wallpaper * with no file access hash, used for example when deleting * (unsave=true) wallpapers using * {@link account.RawSaveWallPaperRequest}, specifying just the * wallpaper ID. */ interface RawInputWallPaperNoFile { _: 'inputWallPaperNoFile'; /** * Wallpaper ID */ id: Long; } /** * Settings used by telegram servers for sending the confirm * code. * * Example implementations: * telegram * for android, * tdlib. */ interface RawCodeSettings { _: 'codeSettings'; /** * Whether to allow phone verification via * phone * calls. */ allowFlashcall?: boolean; /** * Pass true if the phone number is used on the current device. * Ignored if allow_flashcall is not set. */ currentNumber?: boolean; /** * 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 */ allowAppHash?: boolean; /** * Whether this device supports receiving the code using the * {@link auth.RawCodeTypeMissedCall} method */ allowMissedCall?: boolean; /** * Whether Firebase auth is supported */ allowFirebase?: boolean; /** * Set this flag if there is a SIM card in the current device, * but it is not possible to check whether the specified phone * number matches the SIM's phone number. */ unknownNumber?: boolean; /** * Previously stored future auth tokens, see * the * documentation for more info » */ logoutTokens?: Uint8Array[]; /** * 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. */ appSandbox?: boolean; } /** * Wallpaper * rendering information. */ interface RawWallPaperSettings { _: 'wallPaperSettings'; /** * For * image * wallpapers »: if set, the JPEG must be downscaled to fit * in 450x450 square and then box-blurred with radius 12. */ blur?: boolean; /** * If set, the background needs to be slightly moved when the * device is rotated. */ motion?: boolean; /** * Used for * solid * », * gradient * » and * freeform * gradient » fills. */ backgroundColor?: number; /** * Used for * gradient * » and * freeform * gradient » fills. */ secondBackgroundColor?: number; /** * Used for * freeform * gradient » fills. */ thirdBackgroundColor?: number; /** * Used for * freeform * gradient » fills. */ fourthBackgroundColor?: number; /** * Used for * 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; } /** * Autodownload settings */ interface RawAutoDownloadSettings { _: 'autoDownloadSettings'; /** * Disable automatic media downloads? */ disabled?: boolean; /** * Whether to preload the first seconds of videos larger than * the specified limit */ videoPreloadLarge?: boolean; /** * Whether to preload the next audio track when you're * listening to music */ audioPreloadNext?: boolean; /** * Whether to enable data saving mode in phone calls */ phonecallsLessData?: boolean; /** * Whether to preload * stories; * in particular, the first * {@link RawDocumentAttributeVideo}.preload_prefix_size * bytes of story videos should be preloaded. */ storiesPreload?: boolean; /** * Maximum size of photos to preload */ photoSizeMax: number; /** * Maximum size of videos to preload */ videoSizeMax: number; /** * Maximum size of other files to preload */ fileSizeMax: number; /** * Maximum suggested bitrate for uploading * videos */ videoUploadMaxbitrate: number; /** * A limit, specifying the maximum number of files that should * be downloaded in parallel from the same DC, for files * smaller than 20MB. */ smallQueueActiveOperationsMax: number; /** * A limit, specifying the maximum number of files that should * be downloaded in parallel from the same DC, for files bigger * than 20MB. */ largeQueueActiveOperationsMax: number; } /** * Emoji keyword */ interface RawEmojiKeyword { _: 'emojiKeyword'; /** * Keyword */ keyword: string; /** * Emojis associated to keyword */ emoticons: string[]; } /** * Deleted emoji keyword */ interface RawEmojiKeywordDeleted { _: 'emojiKeywordDeleted'; /** * Keyword */ keyword: string; /** * Emojis that were associated to keyword */ emoticons: string[]; } /** * Changes to emoji keywords */ interface RawEmojiKeywordsDifference { _: 'emojiKeywordsDifference'; /** * Language code for keywords */ langCode: string; /** * Previous emoji keyword list version */ fromVersion: number; /** * Current version of emoji keyword list */ version: number; /** * Emojis associated to keywords */ keywords: tl.TypeEmojiKeyword[]; } /** * 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 */ interface RawEmojiURL { _: '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; } /** * Emoji language */ interface RawEmojiLanguage { _: 'emojiLanguage'; /** * Language code */ langCode: string; } /** * Folder */ interface RawFolder { _: 'folder'; /** * Automatically add new channels to this folder */ autofillNewBroadcasts?: boolean; /** * Automatically add joined new public supergroups to this * folder */ autofillPublicGroups?: boolean; /** * Automatically add new private chats to this folder */ autofillNewCorrespondents?: boolean; /** * Folder ID */ id: number; /** * Folder title */ title: string; /** * Folder picture */ photo?: tl.TypeChatPhoto; } /** * Peer in a folder */ interface RawInputFolderPeer { _: 'inputFolderPeer'; /** * Peer */ peer: tl.TypeInputPeer; /** * Peer * folder ID, for more info click here */ folderId: number; } /** * Peer in a folder */ interface RawFolderPeer { _: 'folderPeer'; /** * Folder peer info */ peer: tl.TypePeer; /** * Peer * folder ID, for more info click here */ folderId: number; } /** * Details about the authorization request, for more info * click * here » */ interface RawUrlAuthResultRequest { _: 'urlAuthResultRequest'; /** * Whether the bot would like to send messages to the user */ requestWriteAccess?: boolean; requestPhoneNumber?: boolean; matchCodesFirst?: boolean; /** * 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 for more details. */ bot: tl.TypeUser; /** * The domain name of the website on which the user will log * in. */ domain: string; browser?: string; platform?: string; ip?: string; region?: string; matchCodes?: string[]; userIdHint?: number; } /** * Details about an accepted authorization request, for more * info * click * here » */ interface RawUrlAuthResultAccepted { _: 'urlAuthResultAccepted'; /** * The URL name of the website on which the user has logged in. */ url?: string; } /** * Details about an accepted authorization request, for more * info * click * here » */ interface RawUrlAuthResultDefault { _: 'urlAuthResultDefault'; } /** * No location (normal supergroup) */ interface RawChannelLocationEmpty { _: 'channelLocationEmpty'; } /** * Geographical location of supergroup (geogroups) */ interface RawChannelLocation { _: 'channelLocation'; /** * Geographical location of supergroup */ geoPoint: tl.TypeGeoPoint; /** * Textual description of the address */ address: string; } /** * Peer geolocated nearby */ interface RawPeerLocated { _: 'peerLocated'; /** * Peer */ peer: tl.TypePeer; /** * Validity period of current data */ expires: number; /** * Distance from the peer in meters */ distance: number; } /** * Current peer */ interface RawPeerSelfLocated { _: 'peerSelfLocated'; /** * Expiry of geolocation info for current peer */ expires: number; } /** * Restriction reason. * * See * here * » for the full flow to use for restricted or age-gated * content. */ interface RawRestrictionReason { _: '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.). Ignore this restriction reason if it is contained in * the * ignore_restriction_reasons * » client configuration parameter. */ reason: string; /** * Error message to be shown to the user */ text: string; } /** * Theme */ interface RawInputTheme { _: 'inputTheme'; /** * ID */ id: Long; /** * Access hash */ accessHash: Long; } /** * Theme by theme ID */ interface RawInputThemeSlug { _: 'inputThemeSlug'; /** * Unique theme ID obtained from a * theme * deep link » */ slug: string; } /** * Theme */ interface RawTheme { _: 'theme'; /** * Whether the current user is the creator of this theme */ creator?: boolean; /** * Whether this is the default theme */ default?: boolean; /** * Whether this theme is meant to be used as a * chat * theme */ forChat?: boolean; /** * Theme ID */ id: Long; /** * Theme access hash */ accessHash: Long; /** * Unique theme ID */ slug: string; /** * Theme name */ title: string; /** * Theme */ document?: tl.TypeDocument; /** * Theme settings */ settings?: tl.TypeThemeSettings[]; /** * Theme emoji */ emoticon?: string; /** * Installation count */ installsCount?: number; } /** * Classic theme */ interface RawBaseThemeClassic { _: 'baseThemeClassic'; } /** * Day theme */ interface RawBaseThemeDay { _: 'baseThemeDay'; } /** * Night theme */ interface RawBaseThemeNight { _: 'baseThemeNight'; } /** * Tinted theme */ interface RawBaseThemeTinted { _: 'baseThemeTinted'; } /** * Arctic theme */ interface RawBaseThemeArctic { _: 'baseThemeArctic'; } /** * Theme settings */ interface RawInputThemeSettings { _: 'inputThemeSettings'; /** * If set, the freeform gradient fill needs to be animated on * every sent message */ messageColorsAnimated?: boolean; /** * Default theme on which this theme is based */ baseTheme: tl.TypeBaseTheme; /** * Accent color, ARGB format */ accentColor: number; /** * Accent color of outgoing messages in ARGB format */ outboxAccentColor?: 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. */ messageColors?: number[]; /** * {@link RawInputWallPaper} or {@linkƒRawInputWallPaper} when * passing wallpaper files for * image * or * pattern * wallpapers, {@link RawInputWallPaperNoFile} with * id=0 otherwise. */ wallpaper?: tl.TypeInputWallPaper; /** * Wallpaper * settings. */ wallpaperSettings?: tl.TypeWallPaperSettings; } /** * Theme settings */ interface RawThemeSettings { _: 'themeSettings'; /** * If set, the freeform gradient fill needs to be animated on * every sent message. */ messageColorsAnimated?: boolean; /** * Base theme */ baseTheme: tl.TypeBaseTheme; /** * Accent color, ARGB format */ accentColor: number; /** * Accent color of outgoing messages in ARGB format */ outboxAccentColor?: 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. */ messageColors?: number[]; /** * Wallpaper */ wallpaper?: tl.TypeWallPaper; } /** * Page theme */ interface RawWebPageAttributeTheme { _: 'webPageAttributeTheme'; /** * Theme files */ documents?: tl.TypeDocument[]; /** * Theme settings */ settings?: tl.TypeThemeSettings; } /** * Webpage preview of a Telegram story */ interface RawWebPageAttributeStory { _: 'webPageAttributeStory'; /** * Peer that posted the story */ peer: tl.TypePeer; /** * Story * ID */ id: number; /** * May contain the story, if not the story should be fetched * when and if needed using * {@link stories.RawGetStoriesByIDRequest} with the above * id and peer. */ story?: tl.TypeStoryItem; } /** * Contains info about a * stickerset * », for a {@link RawWebPage} preview of a * stickerset * deep link » (the {@link RawWebPage} will have a * type of telegram_stickerset). */ interface RawWebPageAttributeStickerSet { _: 'webPageAttributeStickerSet'; /** * Whether this i s a * custom * emoji stickerset. */ emojis?: boolean; /** * 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. */ textColor?: boolean; /** * A subset of the stickerset in the stickerset. */ stickers: tl.TypeDocument[]; } /** * Contains info about * collectible * gift » for a {@link RawWebPage} preview of a * collectible * gift » (the {@link RawWebPage} will have a * type of telegram_nft). */ interface RawWebPageAttributeUniqueStarGift { _: 'webPageAttributeUniqueStarGift'; /** * The {@link RawStarGiftUnique} constructor. */ gift: tl.TypeStarGift; } /** * Contains info about a * gift * collection » for a {@link RawWebPage} preview of a * gift * collection » (the {@link RawWebPage} will have a * type of telegram_collection). */ interface RawWebPageAttributeStarGiftCollection { _: 'webPageAttributeStarGiftCollection'; /** * Gifts in the collection. */ icons: tl.TypeDocument[]; } interface RawWebPageAttributeStarGiftAuction { _: 'webPageAttributeStarGiftAuction'; gift: tl.TypeStarGift; endDate: number; } /** * Credit card info URL provided by the bank */ interface RawBankCardOpenUrl { _: 'bankCardOpenUrl'; /** * Info URL */ url: string; /** * Bank name */ name: string; } /** * Dialog filter AKA * folder */ interface RawDialogFilter { _: 'dialogFilter'; /** * Whether to include all contacts in this * folder */ contacts?: boolean; /** * Whether to include all non-contacts in this * folder */ nonContacts?: boolean; /** * Whether to include all groups in this * folder */ groups?: boolean; /** * Whether to include all channels in this * folder */ broadcasts?: boolean; /** * Whether to include all bots in this * folder */ bots?: boolean; /** * Whether to exclude muted chats from this * folder */ excludeMuted?: boolean; /** * Whether to exclude read chats from this * folder */ excludeRead?: boolean; /** * Whether to exclude archived chats from this * folder */ excludeArchived?: boolean; /** * If set, any animated emojis present in title * should not be animated and should be instead frozen on the * first frame. */ titleNoanimate?: boolean; /** * Folder * ID */ id: number; /** * Folder * name (max 12 UTF-8 chars) */ title: tl.TypeTextWithEntities; /** * Emoji to use as icon for the folder. */ emoticon?: string; /** * A color ID for the * folder * tag associated to this folder, see here » for more info. */ color?: number; /** * Pinned chats, * folders * can have unlimited pinned chats */ pinnedPeers: tl.TypeInputPeer[]; /** * Include the following chats in this * folder */ includePeers: tl.TypeInputPeer[]; /** * Exclude the following chats from this * folder */ excludePeers: tl.TypeInputPeer[]; } /** * Used only when reordering folders to indicate the default * (all chats) folder. */ interface RawDialogFilterDefault { _: 'dialogFilterDefault'; } /** * A folder imported using a * chat * folder deep link ». */ interface RawDialogFilterChatlist { _: 'dialogFilterChatlist'; /** * Whether the current user has created some * chat * folder deep links » to share the folder as well. */ hasMyInvites?: boolean; /** * If set, any animated emojis present in title * should not be animated and should be instead frozen on the * first frame. */ titleNoanimate?: boolean; /** * ID of the folder */ id: number; /** * Name of the folder (max 12 UTF-8 chars) */ title: tl.TypeTextWithEntities; /** * Emoji to use as icon for the folder. */ emoticon?: string; /** * A color ID for the * folder * tag associated to this folder, see here » for more info. */ color?: number; /** * Pinned chats, * folders * can have unlimited pinned chats */ pinnedPeers: tl.TypeInputPeer[]; /** * Chats to include in the folder */ includePeers: tl.TypeInputPeer[]; } /** * Suggested * folders */ interface RawDialogFilterSuggested { _: 'dialogFilterSuggested'; /** * Folder * info */ filter: tl.TypeDialogFilter; /** * Folder * description */ description: string; } /** * Channel * statistics date range */ interface RawStatsDateRangeDays { _: 'statsDateRangeDays'; /** * Initial date */ minDate: number; /** * Final date */ maxDate: number; } /** * Statistics value couple; initial and final value for period * of time currently in consideration */ interface RawStatsAbsValueAndPrev { _: 'statsAbsValueAndPrev'; /** * Current value */ current: Double; /** * Previous value */ previous: Double; } /** * Channel * statistics percentage. * * * Compute the percentage simply by doing part * total / * 100 */ interface RawStatsPercentValue { _: 'statsPercentValue'; /** * Partial value */ part: Double; /** * Total value */ total: Double; } /** * This * channel * statistics graph must be generated asynchronously using * {@link stats.RawLoadAsyncGraphRequest} to reduce server load */ interface RawStatsGraphAsync { _: 'statsGraphAsync'; /** * Token to use for fetching the async graph */ token: string; } /** * An error occurred while generating the * statistics * graph */ interface RawStatsGraphError { _: 'statsGraphError'; /** * The error */ error: string; } /** * Channel * statistics graph */ interface RawStatsGraph { _: 'statsGraph'; /** * Statistics data */ json: tl.TypeDataJSON; /** * Zoom token */ zoomToken?: string; } /** * An * animated * profile picture in MPEG4 format */ interface RawVideoSize { _: '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) */ videoStartTs?: Double; } /** * An * animated * profile picture based on a * custom * emoji sticker. */ interface RawVideoSizeEmojiMarkup { _: 'videoSizeEmojiMarkup'; /** * Custom * emoji ID: the custom emoji sticker is shown at the * center of the profile picture and occupies at most 67% of * it. */ emojiId: Long; /** * 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 are generated. The rotation angle for * gradient backgrounds is 0. */ backgroundColors: number[]; } /** * An * animated * profile picture based on a * sticker. */ interface RawVideoSizeStickerMarkup { _: 'videoSizeStickerMarkup'; /** * Stickerset */ stickerset: tl.TypeInputStickerSet; /** * Sticker ID */ stickerId: Long; /** * 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 are generated. The rotation angle for * gradient backgrounds is 0. */ backgroundColors: number[]; } /** * Information about an active user in a supergroup */ interface RawStatsGroupTopPoster { _: 'statsGroupTopPoster'; /** * User ID */ userId: number; /** * Number of messages for * statistics * period in consideration */ messages: number; /** * Average number of characters per message */ avgChars: number; } /** * Information about an active admin in a supergroup */ interface RawStatsGroupTopAdmin { _: 'statsGroupTopAdmin'; /** * User ID */ userId: number; /** * Number of deleted messages for * statistics * period in consideration */ deleted: number; /** * Number of kicked users for * statistics * period in consideration */ kicked: number; /** * Number of banned users for * statistics * period in consideration */ banned: number; } /** * Information about an active supergroup inviter */ interface RawStatsGroupTopInviter { _: 'statsGroupTopInviter'; /** * User ID */ userId: number; /** * Number of invitations for * statistics * period in consideration */ invitations: number; } /** * Global privacy settings */ interface RawGlobalPrivacySettings { _: 'globalPrivacySettings'; /** * Whether to archive and mute new chats from non-contacts */ archiveAndMuteNewNoncontactPeers?: boolean; /** * Whether unmuted chats will be kept in the Archive chat list * when they get a new message. */ keepArchivedUnmuted?: boolean; /** * Whether unmuted chats that are always included or pinned in * a * folder, * will be kept in the Archive chat list when they get a new * message. Ignored if keep_archived_unmuted is * set. */ keepArchivedFolders?: boolean; /** * If this flag is set, the * {@link RawInputPrivacyKeyStatusTimestamp} key will also * apply to the ability to use * {@link messages.RawGetOutboxReadDateRequest} on messages * sent to us. * * Meaning, users that cannot see our exact last * online date due to the current value of the * {@link RawInputPrivacyKeyStatusTimestamp} key will receive a * 403 USER_PRIVACY_RESTRICTED error when invoking * {@link messages.RawGetOutboxReadDateRequest} to fetch the * exact read date of a message they sent to us. * * The {@link RawUserFull}.read_dates_private flag * will be set for users that have this flag enabled. */ hideReadMarks?: boolean; /** * See * here * for more info on this flag ». */ newNoncontactPeersRequirePremium?: boolean; /** * Enables or disables our * {@link RawUserFull}.display_gifts_button flag: * if the {@link RawUserFull}.display_gifts_button * flag of both us and another user is set, a gift button * should always be displayed in the text field in private * chats with the other user: once clicked, the gift UI should * be displayed, offering the user options to gift * Telegram * Premium » subscriptions or * Telegram * Gifts ». */ displayGiftsButton?: boolean; /** * If configured, specifies the number of * stars * users must pay us to send us a message, see * here * » for more info on paid messages. */ noncontactPeersPaidStars?: Long; /** * Disallows the reception of specific gift types. */ disallowedGifts?: tl.TypeDisallowedGiftsSettings; } /** * View, forward counter + info about replies of a specific * message */ interface RawMessageViews { _: 'messageViews'; /** * View count of message */ views?: number; /** * Forward count of message */ forwards?: number; /** * Reply and * thread * information of message */ replies?: tl.TypeMessageReplies; } /** * Message replies and * thread * information */ interface RawMessageReplyHeader { _: 'messageReplyHeader'; /** * This is a reply to a scheduled message. */ replyToScheduled?: boolean; /** * Whether this message was sent in a * forum * topic (except for the General topic). */ forumTopic?: boolean; /** * Whether this message is quoting a part of another message. */ quote?: boolean; /** * ID of message to which this message is replying */ replyToMsgId?: number; /** * For replies sent in * channel * discussion threads of which the current user is not a * member, the discussion group ID */ replyToPeerId?: tl.TypePeer; /** * 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. */ replyFrom?: tl.TypeMessageFwdHeader; /** * When replying to a media sent by a certain peer to another * chat, contains the media of the replied-to message. */ replyMedia?: tl.TypeMessageMedia; /** * ID of the message that started this * message * thread */ replyToTopId?: number; /** * Used to quote-reply to only a certain section (specified * here) of the original message. */ quoteText?: string; /** * Message * entities for styled text from the * quote_text field. */ quoteEntities?: tl.TypeMessageEntity[]; /** * Offset of the message quote_text within the * original message (in * UTF-16 * code units). */ quoteOffset?: number; /** * Can be set to reply to the specified item of a * todo list * ». */ todoItemId?: number; } /** * Represents a reply to a * story */ interface RawMessageReplyStoryHeader { _: 'messageReplyStoryHeader'; /** * Sender of the story. */ peer: tl.TypePeer; /** * Story ID */ storyId: number; } /** * Info about * the * comment section of a channel post, a simple message thread, * a forum topic, or a direct messages topic (all features * ultimately based on message threads). */ interface RawMessageReplies { _: 'messageReplies'; /** * Whether this constructor contains information about the * comment * section of a channel post, or a simple message thread */ comments?: boolean; /** * Contains the total number of replies in this thread or * comment section. */ replies: number; /** * PTS * of the message that started this thread. */ repliesPts: 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. */ recentRepliers?: tl.TypePeer[]; /** * For channel post comments, contains the ID of the associated * discussion * supergroup */ channelId?: number; /** * ID of the latest message in this thread or comment section. */ maxId?: number; /** * Contains the ID of the latest read message in this thread or * comment section. */ readMaxId?: number; } /** * Information about a blocked peer */ interface RawPeerBlocked { _: 'peerBlocked'; /** * Peer ID */ peerId: tl.TypePeer; /** * When was the peer blocked */ date: number; } /** * An ended group call */ interface RawGroupCallDiscarded { _: 'groupCallDiscarded'; /** * Group call ID */ id: Long; /** * Group call access hash */ accessHash: Long; /** * Group call duration */ duration: number; } /** * Info about a group call or livestream */ interface RawGroupCall { _: 'groupCall'; /** * Whether the user should be muted upon joining the call */ joinMuted?: boolean; /** * Whether the current user can change the value of the * join_muted flag using * {@link phone.RawToggleGroupCallSettingsRequest} */ canChangeJoinMuted?: boolean; /** * Specifies the ordering to use when locally sorting by date * and displaying in the UI group call participants. */ joinDateAsc?: boolean; /** * Whether we subscribed to the scheduled call */ scheduleStartSubscribed?: boolean; /** * Whether you can start streaming video into the call */ canStartVideo?: boolean; /** * Whether the group call is currently being recorded */ recordVideoActive?: boolean; /** * Whether RTMP streams are allowed */ rtmpStream?: boolean; /** * Whether the listeners list is hidden and cannot be fetched * using {@link phone.RawGetGroupParticipantsRequest}. The * phone.groupParticipants.count and * groupCall.participants_count counters will * still include listeners. */ listenersHidden?: boolean; /** * Whether this is an E2E conference call. */ conference?: boolean; /** * Whether we're created this group call. */ creator?: boolean; messagesEnabled?: boolean; canChangeMessagesEnabled?: boolean; min?: boolean; /** * Group call ID */ id: Long; /** * Group call access hash */ accessHash: Long; /** * Participant count */ participantsCount: number; /** * Group call title */ title?: string; /** * DC ID to be used for livestream chunks */ streamDcId?: number; /** * When was the recording started */ recordStartDate?: number; /** * When is the call scheduled to start */ scheduleDate?: number; /** * Number of people currently streaming video into the call */ unmutedVideoCount?: number; /** * Maximum number of people allowed to stream video into the * call */ unmutedVideoLimit: number; /** * Version */ version: number; /** * Invitation link for the conference. */ inviteLink?: string; sendPaidMessagesStars?: Long; defaultSendAs?: tl.TypePeer; } /** * Points to a specific group call */ interface RawInputGroupCall { _: 'inputGroupCall'; /** * Group call ID */ id: Long; /** * Group call access hash */ accessHash: Long; } /** * Join a conference call through an * invitation * link ». */ interface RawInputGroupCallSlug { _: 'inputGroupCallSlug'; /** * Slug from the * conference * link ». */ slug: string; } /** * Join a group call through a * {@link RawMessageActionConferenceCall} invitation message. */ interface RawInputGroupCallInviteMessage { _: 'inputGroupCallInviteMessage'; /** * ID of the {@link RawMessageActionConferenceCall}. */ msgId: number; } /** * Info about a group call participant */ interface RawGroupCallParticipant { _: 'groupCallParticipant'; /** * Whether the participant is muted */ muted?: boolean; /** * Whether the participant has left */ left?: boolean; /** * Whether the participant can unmute themselves */ canSelfUnmute?: boolean; /** * Whether the participant has just joined */ justJoined?: boolean; /** * If set, and {@link RawUpdateGroupCallParticipants}.version < * locally stored call.version, info about this participant * should be ignored. If (...), and * {@link RawUpdateGroupCallParticipants}.version > * call.version+1, the participant list should be refetched * using {@link phone.RawGetGroupParticipantsRequest}. */ versioned?: boolean; /** * 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?: boolean; /** * Whether this participant was muted by the current user */ mutedByYou?: boolean; /** * Whether our volume can only changed by an admin */ volumeByAdmin?: boolean; /** * Whether this participant is the current user */ self?: boolean; /** * Whether this participant is currently broadcasting video */ videoJoined?: boolean; /** * Peer information */ peer: tl.TypePeer; /** * When did this participant join the group call */ date: number; /** * When was this participant last active in the group call */ activeDate?: 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. */ raiseHandRating?: Long; /** * Info about the video stream the participant is currently * broadcasting */ video?: tl.TypeGroupCallParticipantVideo; /** * Info about the screen sharing stream the participant is * currently broadcasting */ presentation?: tl.TypeGroupCallParticipantVideo; paidStarsTotal?: Long; } /** * Peer type: private chat with the bot itself */ interface RawInlineQueryPeerTypeSameBotPM { _: 'inlineQueryPeerTypeSameBotPM'; } /** * Peer type: private chat */ interface RawInlineQueryPeerTypePM { _: 'inlineQueryPeerTypePM'; } /** * Peer type: * chat */ interface RawInlineQueryPeerTypeChat { _: 'inlineQueryPeerTypeChat'; } /** * Peer type: * supergroup */ interface RawInlineQueryPeerTypeMegagroup { _: 'inlineQueryPeerTypeMegagroup'; } /** * Peer type: * channel */ interface RawInlineQueryPeerTypeBroadcast { _: 'inlineQueryPeerTypeBroadcast'; } /** * Peer type: private chat with a bot. */ interface RawInlineQueryPeerTypeBotPM { _: 'inlineQueryPeerTypeBotPM'; } /** * When and which user joined the chat using a chat invite */ interface RawChatInviteImporter { _: 'chatInviteImporter'; /** * Whether this user currently has a pending * join * request » */ requested?: boolean; /** * The participant joined by importing a * chat * folder deep link ». */ viaChatlist?: boolean; /** * The user */ userId: number; /** * 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 » of the user */ approvedBy?: number; } /** * Info about chat invites generated by admins. */ interface RawChatAdminWithInvites { _: 'chatAdminWithInvites'; /** * The admin */ adminId: number; /** * Number of invites generated by the admin */ invitesCount: number; /** * Number of revoked invites */ revokedInvitesCount: number; } /** * Describes a group of video synchronization source * identifiers */ interface RawGroupCallParticipantVideoSourceGroup { _: 'groupCallParticipantVideoSourceGroup'; /** * SDP semantics */ semantics: string; /** * Source IDs */ sources: number[]; } /** * Info about a video stream */ interface RawGroupCallParticipantVideo { _: 'groupCallParticipantVideo'; /** * Whether the stream is currently paused */ paused?: boolean; /** * Endpoint */ endpoint: string; /** * Source groups */ sourceGroups: tl.TypeGroupCallParticipantVideoSourceGroup[]; /** * Audio source ID */ audioSource?: number; } /** * The commands will be valid in all dialogs */ interface RawBotCommandScopeDefault { _: 'botCommandScopeDefault'; } /** * The specified bot commands will only be valid in all private * chats with users. */ interface RawBotCommandScopeUsers { _: 'botCommandScopeUsers'; } /** * The specified bot commands will be valid in all * groups * and supergroups. */ interface RawBotCommandScopeChats { _: 'botCommandScopeChats'; } /** * The specified bot commands will be valid only for chat * administrators, in all * groups * and supergroups. */ interface RawBotCommandScopeChatAdmins { _: 'botCommandScopeChatAdmins'; } /** * The specified bot commands will be valid only in a specific * dialog. */ interface RawBotCommandScopePeer { _: 'botCommandScopePeer'; /** * The dialog */ peer: tl.TypeInputPeer; } /** * The specified bot commands will be valid for all admins of * the specified * group or * supergroup. */ interface RawBotCommandScopePeerAdmins { _: 'botCommandScopePeerAdmins'; /** * The chat */ peer: tl.TypeInputPeer; } /** * The specified bot commands will be valid only for a specific * user in the specified * group or * supergroup. */ interface RawBotCommandScopePeerUser { _: 'botCommandScopePeerUser'; /** * The chat */ peer: tl.TypeInputPeer; /** * The user */ userId: tl.TypeInputUser; } /** * A chat theme */ interface RawChatTheme { _: 'chatTheme'; /** * The emoji identifying the chat theme. */ emoticon: string; } /** * A chat theme based on a * collectible * gift ». */ interface RawChatThemeUniqueGift { _: 'chatThemeUniqueGift'; /** * The owned collectible gift on which this theme is based, as * a {@link RawStarGiftUnique} constructor. */ gift: tl.TypeStarGift; /** * Theme settings. */ themeSettings: tl.TypeThemeSettings[]; } /** * A * sponsored * message. */ interface RawSponsoredMessage { _: 'sponsoredMessage'; /** * Whether the message needs to be labeled as "recommended" * instead of "sponsored" */ recommended?: boolean; /** * Whether this message can be * reported * as specified here ». */ canReport?: boolean; /** * Message ID */ randomId: Uint8Array; /** * Contains the URL to open when the user clicks on the * sponsored message. */ url: string; /** * Contains the title of the sponsored message. */ title: string; /** * Sponsored message */ message: string; /** * Message * entities for styled text in message. */ entities?: tl.TypeMessageEntity[]; /** * If set, contains a custom profile photo bubble that should * be displayed for the sponsored message, like for messages * sent in groups. */ photo?: tl.TypePhoto; /** * If set, contains some media. */ media?: tl.TypeMessageMedia; /** * If set, the sponsored message should use the * message * accent color » specified in color. */ color?: tl.TypePeerColor; /** * Label of the sponsored message button. */ buttonText: string; /** * If set, contains additional information about the sponsor to * be shown along with the message. */ sponsorInfo?: string; /** * If set, contains additional information about the sponsored * message to be shown along with the message. */ additionalInfo?: string; /** * For * sponsored * messages to show on channel videos », allow the user to * hide the ad only after the specified amount of seconds. */ minDisplayDuration?: number; /** * For * sponsored * messages to show on channel videos », autohide the ad * after after the specified amount of seconds. */ maxDisplayDuration?: number; } /** * Information about found messages sent on a specific day, * used to split the messages in * {@link messages.RawSearchResultsCalendar} constructors by * days. * * Multiple searchResultsCalendarPeriod constructors are * returned in {@link messages.RawSearchResultsCalendar}, each * containing information about the first, last and total * number of messages matching the filter that were sent on a * specific day. */ interface RawSearchResultsCalendarPeriod { _: 'searchResultsCalendarPeriod'; /** * The day this object is referring to. */ date: number; /** * First message ID that was sent on this day. */ minMsgId: number; /** * Last message ID that was sent on this day. */ maxMsgId: number; /** * All messages that were sent on this day. */ count: number; } /** * Information about a message in a specific position */ interface RawSearchResultPosition { _: 'searchResultPosition'; /** * Message ID */ msgId: number; /** * When was the message sent */ date: number; /** * 0-based message position in the full list of suitable * messages */ offset: number; } /** * Reactions */ interface RawReactionCount { _: '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. */ chosenOrder?: number; /** * The reaction. */ reaction: tl.TypeReaction; /** * Number of users that reacted with this emoji. */ count: number; } /** * Message * reactions » */ interface RawMessageReactions { _: 'messageReactions'; /** * Similar to * min * objects, used for * message * reaction » constructors that are the same for all users * so they don't have the reactions sent by the current user * (you can use {@link messages.RawGetMessagesReactionsRequest} * to get the full reaction info). */ min?: boolean; /** * Whether {@link messages.RawGetMessageReactionsListRequest} * can be used to see how each specific peer reacted to the * message */ canSeeList?: boolean; /** * If set or if there are no reactions, all present and future * reactions should be treated as * message * tags, see here » for more info. */ reactionsAsTags?: boolean; /** * Reactions */ results: tl.TypeReactionCount[]; /** * List of recent peers and their reactions */ recentReactions?: tl.TypeMessagePeerReaction[]; /** * Paid * Telegram Star reactions leaderboard » for this message. */ topReactors?: tl.TypeMessageReactor[]; } /** * Animations associated with a message reaction */ interface RawAvailableReaction { _: 'availableReaction'; /** * If not set, the reaction can be added to new messages and * enabled in chats. */ inactive?: boolean; /** * Whether this reaction can only be used by Telegram Premium * users */ premium?: boolean; /** * Reaction emoji */ reaction: string; /** * Reaction description */ title: string; /** * Static icon for the reaction */ staticIcon: tl.TypeDocument; /** * The animated sticker to show when the user opens the * reaction dropdown */ appearAnimation: tl.TypeDocument; /** * The animated sticker to show when the user hovers over the * reaction */ selectAnimation: tl.TypeDocument; /** * The animated sticker to show when the reaction is chosen and * activated */ activateAnimation: tl.TypeDocument; /** * The background effect (still an animated sticker) to play * under the activate_animation, when the reaction * is chosen and activated */ effectAnimation: tl.TypeDocument; /** * The animation that plays around the button when you press an * existing reaction (played together with * center_icon). */ aroundAnimation?: tl.TypeDocument; /** * The animation of the emoji inside the button when you press * an existing reaction (played together with * around_animation). */ centerIcon?: tl.TypeDocument; } /** * How a certain peer reacted to the message */ interface RawMessagePeerReaction { _: 'messagePeerReaction'; /** * Whether the specified * message * reaction » should elicit a bigger and longer reaction */ big?: boolean; /** * Whether the reaction wasn't yet marked as read by the * current user */ unread?: boolean; /** * Starting from layer 159, * {@link messages.RawSendReactionRequest} will send reactions * from the peer (user or channel) specified using * {@link messages.RawSaveDefaultSendAsRequest}. * * If set, this flag indicates that this reaction was sent by * us, even if the peer doesn't point to the * current account. */ my?: boolean; /** * Peer that reacted to the message */ peerId: tl.TypePeer; /** * When was this reaction added */ date: number; /** * Reaction emoji */ reaction: tl.TypeReaction; } /** * Info about an RTMP stream in a group call or livestream */ interface RawGroupCallStreamChannel { _: '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 {@link RawInputGroupCallStream} */ lastTimestampMs: Long; } /** * Represents an attachment menu icon color for * bot * mini apps » */ interface RawAttachMenuBotIconColor { _: '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; } /** * Represents an attachment menu icon for * bot * mini apps » */ interface RawAttachMenuBotIcon { _: '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: tl.TypeDocument; /** * Attachment menu icon colors. */ colors?: tl.TypeAttachMenuBotIconColor[]; } /** * Represents a * bot * mini app that can be launched from the attachment/side menu * » * * At least one of the show_in_attach_menu or the * show_in_side_menu flags will always be set. */ interface RawAttachMenuBot { _: '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 * {@link messages.RawToggleBotInAttachMenuRequest} the app * should be opened. */ inactive?: boolean; /** * Deprecated flag, can be ignored. */ hasSettings?: boolean; /** * Whether the bot would like to send messages to the user. */ requestWriteAccess?: boolean; /** * Whether, when installed, an attachment menu entry should be * shown for the Mini App. */ showInAttachMenu?: boolean; /** * Whether, when installed, an entry in the main view side menu * should be shown for the Mini App. */ showInSideMenu?: boolean; /** * If inactive if set and the user hasn't * previously accepted the third-party mini apps * Terms of * Service for this bot, when showing the mini app * installation prompt, an additional mandatory checkbox to * accept the mini * apps TOS and a disclaimer indicating that this Mini App * is not affiliated to Telegram should be shown. */ sideMenuDisclaimerNeeded?: boolean; /** * Bot ID */ botId: number; /** * Attachment menu item name */ shortName: string; /** * List of dialog types where this attachment menu entry should * be shown */ peerTypes?: tl.TypeAttachMenuPeerType[]; /** * List of platform-specific static icons and animations to use * for the attachment menu button */ icons: tl.TypeAttachMenuBotIcon[]; } /** * The list of bot mini apps hasn't changed */ interface RawAttachMenuBotsNotModified { _: 'attachMenuBotsNotModified'; } /** * Represents a list of * bot * mini apps that can be launched from the attachment menu * » */ interface RawAttachMenuBots { _: 'attachMenuBots'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * List of * bot * mini apps that can be launched from the attachment menu * » */ bots: tl.TypeAttachMenuBot[]; /** * Info about related users/bots */ users: tl.TypeUser[]; } /** * Represents a * bot * mini app that can be launched from the attachment menu » */ interface RawAttachMenuBotsBot { _: 'attachMenuBotsBot'; /** * Represents a * bot * mini app that can be launched from the attachment menu » * * */ bot: tl.TypeAttachMenuBot; /** * Info about related users and bots */ users: tl.TypeUser[]; } /** * Contains the webview URL with appropriate theme and user * info parameters added */ interface RawWebViewResultUrl { _: 'webViewResultUrl'; /** * If set, the app must be opened in fullsize mode instead of * compact mode. */ fullsize?: boolean; /** * If set, the app must be opened in fullscreen */ fullscreen?: boolean; /** * Webview session ID (only returned by * inline * button mini apps, * menu * button mini apps, * attachment * menu mini apps). */ queryId?: Long; /** * Webview URL to open */ url: string; } /** * Info about a sent inline webview message */ interface RawWebViewMessageSent { _: 'webViewMessageSent'; /** * Message ID */ msgId?: tl.TypeInputBotInlineMessageID; } /** * Placeholder * bot * menu button never returned to users: see * the * docs for more info. */ interface RawBotMenuButtonDefault { _: 'botMenuButtonDefault'; } /** * Bot * menu button that opens the bot command list when * clicked. */ interface RawBotMenuButtonCommands { _: 'botMenuButtonCommands'; } /** * Bot * menu button that opens a * web * app when clicked. */ interface RawBotMenuButton { _: 'botMenuButton'; /** * Title to be displayed on the menu button instead of 'Menu' */ text: string; /** * URL of a * web * app to open when the user clicks on the button */ url: string; } /** * Indicates the default notification sound should be used */ interface RawNotificationSoundDefault { _: 'notificationSoundDefault'; } /** * No notification sound should be used */ interface RawNotificationSoundNone { _: 'notificationSoundNone'; } /** * Indicates a specific local notification sound should be used */ interface RawNotificationSoundLocal { _: 'notificationSoundLocal'; /** * Notification sound title */ title: string; /** * Notification sound identifier (arbitrary data used by the * client to identify a specific local notification sound) */ data: string; } /** * A specific previously uploaded notification sound should be * used */ interface RawNotificationSoundRingtone { _: 'notificationSoundRingtone'; /** * Document ID of notification sound uploaded using * {@link account.RawUploadRingtoneRequest} */ id: Long; } /** * The bot attachment menu entry is available in the chat with * the bot that offers it */ interface RawAttachMenuPeerTypeSameBotPM { _: 'attachMenuPeerTypeSameBotPM'; } /** * The bot attachment menu entry is available in private chats * with other bots (excluding the bot that offers the current * attachment menu) */ interface RawAttachMenuPeerTypeBotPM { _: 'attachMenuPeerTypeBotPM'; } /** * The bot attachment menu entry is available in private chats * with other users (not bots) */ interface RawAttachMenuPeerTypePM { _: 'attachMenuPeerTypePM'; } /** * The bot attachment menu entry is available in * groups * and supergroups */ interface RawAttachMenuPeerTypeChat { _: 'attachMenuPeerTypeChat'; } /** * The bot attachment menu entry is available in channels */ interface RawAttachMenuPeerTypeBroadcast { _: 'attachMenuPeerTypeBroadcast'; } /** * An invoice contained in a {@link RawMessageMediaInvoice} * message or * paid * media ». */ interface RawInputInvoiceMessage { _: 'inputInvoiceMessage'; /** * Chat where the invoice/paid media was sent */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; } /** * An invoice slug taken from an * invoice * deep link or from the * premium_invoice_slug * app config parameter » */ interface RawInputInvoiceSlug { _: 'inputInvoiceSlug'; /** * The invoice slug */ slug: string; } /** * Used if the user wishes to start a channel/supergroup * giveaway * or send some * giftcodes * to members of a channel/supergroup, in exchange for * boosts. */ interface RawInputInvoicePremiumGiftCode { _: 'inputInvoicePremiumGiftCode'; /** * Should be populated with * {@link RawInputStorePaymentPremiumGiveaway} for * giveaways * and {@link RawInputStorePaymentPremiumGiftCode} for * gifts. */ purpose: tl.TypeInputStorePaymentPurpose; /** * Should be populated with one of the giveaway options * returned by * {@link payments.RawGetPremiumGiftCodeOptionsRequest}, see * the * giveaways * » documentation for more info. */ option: tl.TypePremiumGiftCodeOption; } /** * Used to top up the * Telegram * Stars balance of the current account or someone else's * account, or to start a * Telegram * Star giveaway ». */ interface RawInputInvoiceStars { _: 'inputInvoiceStars'; /** * An {@link RawInputStorePaymentStarsGiveaway}, * {@link RawInputStorePaymentStarsTopup} or * {@link RawInputStorePaymentStarsGift}. */ purpose: tl.TypeInputStorePaymentPurpose; } /** * Used to pay for a * Telegram * Star subscription ». */ interface RawInputInvoiceChatInviteSubscription { _: 'inputInvoiceChatInviteSubscription'; /** * The * invitation * link of the Telegram Star subscription » */ hash: string; } /** * Used to buy a * Telegram * Star Gift, see here » for more info. */ interface RawInputInvoiceStarGift { _: 'inputInvoiceStarGift'; /** * If set, your name will be hidden if the destination user * decides to display the gift on their profile (they will * still see that you sent the gift) */ hideName?: boolean; /** * Also pay for an eventual upgrade of the gift to a * collectible * gift ». */ includeUpgrade?: boolean; /** * Receiver of the gift. */ peer: tl.TypeInputPeer; /** * Identifier of the gift, from * {@link RawStarGift}.id */ giftId: Long; /** * Optional message, attached with the gift. * * The maximum length for this field is specified in the * stargifts_message_length_max * client configuration value ». */ message?: tl.TypeTextWithEntities; } /** * Used to * pay * to upgrade a Gift to a collectible gift, see the * collectible * gifts » documentation for more info on the full flow. */ interface RawInputInvoiceStarGiftUpgrade { _: 'inputInvoiceStarGiftUpgrade'; /** * Set this flag to keep the original gift text, sender and * receiver in the upgraded gift as a * {@link RawStarGiftAttributeOriginalDetails} attribute. */ keepOriginalDetails?: boolean; /** * The identifier of the received gift to upgrade. */ stargift: tl.TypeInputSavedStarGift; } /** * Used to * pay * to transfer a collectible gift to another peer, see the * gifts * » documentation for more info. */ interface RawInputInvoiceStarGiftTransfer { _: 'inputInvoiceStarGiftTransfer'; /** * The identifier of the received gift */ stargift: tl.TypeInputSavedStarGift; /** * The destination peer */ toId: tl.TypeInputPeer; } /** * Used to gift a * Telegram * Premium subscription to another user, paying with * Telegram * Stars. */ interface RawInputInvoicePremiumGiftStars { _: 'inputInvoicePremiumGiftStars'; /** * Who will receive the gifted subscription. */ userId: tl.TypeInputUser; /** * Duration of the subscription in months, must be one of the * options with currency == "XTR" returned by * {@link payments.RawGetPremiumGiftCodeOptionsRequest}. */ months: number; /** * Message attached with the gift. */ message?: tl.TypeTextWithEntities; } /** * Transfer stars from the balance of a user account * connected * to a business bot, to the balance of the * business * bot, see * here * » for more info on the full flow. */ interface RawInputInvoiceBusinessBotTransferStars { _: 'inputInvoiceBusinessBotTransferStars'; /** * Always {@link RawInputUserSelf}. */ bot: tl.TypeInputUser; /** * The number of stars to transfer. */ stars: Long; } /** * Used to buy a * collectible * gift currently up on resale, see * here * for more info on the full flow. */ interface RawInputInvoiceStarGiftResale { _: 'inputInvoiceStarGiftResale'; /** * Buy the gift using TON. */ ton?: boolean; /** * Slug of the gift to buy. */ slug: string; /** * The receiver of the gift. */ toId: tl.TypeInputPeer; } /** * Separately * prepay for the upgrade of a gift ». */ interface RawInputInvoiceStarGiftPrepaidUpgrade { _: 'inputInvoiceStarGiftPrepaidUpgrade'; /** * The peer that owns the gift. */ peer: tl.TypeInputPeer; /** * The upgrade hash from * {@link RawMessageActionStarGift}.prepaid_upgrade_hash * or * {@link RawSavedStarGift}.prepaid_upgrade_hash. */ hash: string; } interface RawInputInvoicePremiumAuthCode { _: 'inputInvoicePremiumAuthCode'; purpose: tl.TypeInputStorePaymentPurpose; } interface RawInputInvoiceStarGiftDropOriginalDetails { _: 'inputInvoiceStarGiftDropOriginalDetails'; stargift: tl.TypeInputSavedStarGift; } interface RawInputInvoiceStarGiftAuctionBid { _: 'inputInvoiceStarGiftAuctionBid'; hideName?: boolean; updateBid?: boolean; peer?: tl.TypeInputPeer; giftId: Long; bidAmount: Long; message?: tl.TypeTextWithEntities; } /** * Info about a Telegram Premium purchase */ interface RawInputStorePaymentPremiumSubscription { _: 'inputStorePaymentPremiumSubscription'; /** * Pass true if this is a restore of a Telegram Premium * purchase; only for the App Store */ restore?: boolean; /** * Pass true if this is an upgrade from a monthly subscription * to a yearly subscription; only for App Store */ upgrade?: boolean; } /** * Info about a gifted Telegram Premium purchase */ interface RawInputStorePaymentGiftPremium { _: 'inputStorePaymentGiftPremium'; /** * The user to which the Telegram Premium subscription was * gifted */ userId: tl.TypeInputUser; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Used to gift * Telegram * Premium subscriptions only to some specific subscribers * of a channel/supergroup or to some of our contacts, see * here * » for more info on giveaways and gifts. */ interface RawInputStorePaymentPremiumGiftCode { _: 'inputStorePaymentPremiumGiftCode'; /** * The users that will receive the * Telegram * Premium subscriptions. */ users: tl.TypeInputUser[]; /** * If set, the gifts will be sent on behalf of a * channel/supergroup we are an admin of, which will also * assign some * boosts * to it. Otherwise, the gift will be sent directly from the * currently logged in user, and we will gain some extra * boost * slots. See * here * » for more info on giveaways and gifts. */ boostPeer?: tl.TypeInputPeer; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Message attached with the gift */ message?: tl.TypeTextWithEntities; } /** * Used to pay for a * giveaway, * see here » for more info. */ interface RawInputStorePaymentPremiumGiveaway { _: 'inputStorePaymentPremiumGiveaway'; /** * If set, only new subscribers starting from the giveaway * creation date will be able to participate to the giveaway. */ onlyNewSubscribers?: boolean; /** * If set, giveaway winners are public and will be listed in a * {@link RawMessageMediaGiveawayResults} message that will be * automatically sent to the channel once the giveaway ends. */ winnersAreVisible?: boolean; /** * The channel/supergroup starting the giveaway, that the user * must join to participate, that will receive the giveaway * boosts; * see * here * » for more info on giveaways. */ boostPeer: tl.TypeInputPeer; /** * Additional channels that the user must join to participate * to the giveaway can be specified here. */ additionalPeers?: tl.TypeInputPeer[]; /** * 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 * countries, specified as two-letter ISO 3166-1 alpha-2 * country codes. */ countriesIso2?: string[]; /** * Can contain a textual description of additional giveaway * prizes. */ prizeDescription?: string; /** * Random ID to avoid resending the giveaway */ randomId: Long; /** * The end date of the giveaway, must be at most * giveaway_period_max * seconds in the future; see * here * » for more info on giveaways. */ untilDate: number; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Used to top up the * Telegram * Stars balance of the current account. */ interface RawInputStorePaymentStarsTopup { _: 'inputStorePaymentStarsTopup'; /** * Amount of stars to topup */ stars: Long; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Should be populated with the peer where the topup process * was initiated due to low funds (i.e. a bot for bot payments, * a channel for paid media/reactions, etc); leave this flag * unpopulated if the topup flow was not initated when * attempting to spend more Stars than currently available on * the account's balance. */ spendPurposePeer?: tl.TypeInputPeer; } /** * Used to gift * Telegram * Stars to a friend. */ interface RawInputStorePaymentStarsGift { _: 'inputStorePaymentStarsGift'; /** * The user to which the stars should be gifted. */ userId: tl.TypeInputUser; /** * Amount of stars to gift */ stars: Long; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Used to pay for a * star * giveaway, see here » for more info. */ interface RawInputStorePaymentStarsGiveaway { _: 'inputStorePaymentStarsGiveaway'; /** * If set, only new subscribers starting from the giveaway * creation date will be able to participate to the giveaway. */ onlyNewSubscribers?: boolean; /** * If set, giveaway winners are public and will be listed in a * {@link RawMessageMediaGiveawayResults} message that will be * automatically sent to the channel once the giveaway ends. */ winnersAreVisible?: boolean; /** * Total number of Telegram Stars being given away (each user * will receive stars/users stars). */ stars: Long; /** * The channel/supergroup starting the giveaway, that the user * must join to participate, that will receive the giveaway * boosts; * see * here * » for more info on giveaways. */ boostPeer: tl.TypeInputPeer; /** * Additional channels that the user must join to participate * to the giveaway can be specified here. */ additionalPeers?: tl.TypeInputPeer[]; /** * 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 * countries, specified as two-letter ISO 3166-1 alpha-2 * country codes. */ countriesIso2?: string[]; /** * Can contain a textual description of additional giveaway * prizes. */ prizeDescription?: string; /** * Random ID to avoid resending the giveaway */ randomId: Long; /** * The end date of the giveaway, must be at most * giveaway_period_max * seconds in the future; see * here * » for more info on giveaways. */ untilDate: number; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Number of winners. */ users: number; } /** * Indicates payment for a login code. */ interface RawInputStorePaymentAuthCode { _: 'inputStorePaymentAuthCode'; /** * Set this flag to restore a previously made purchase. */ restore?: boolean; /** * Phone number. */ phoneNumber: string; /** * phone_code_hash returned by * {@link auth.RawSendCodeRequest}. */ phoneCodeHash: string; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Represents an additional payment method */ interface RawPaymentFormMethod { _: 'paymentFormMethod'; /** * URL to open in a webview to process the payment */ url: string; /** * Payment method description */ title: string; } /** * No emoji status is set */ interface RawEmojiStatusEmpty { _: 'emojiStatusEmpty'; } /** * An * emoji * status */ interface RawEmojiStatus { _: 'emojiStatus'; /** * Custom * emoji document ID */ documentId: Long; /** * If set, the emoji status will be active until the specified * unixtime. */ until?: number; } /** * An * owned * collectible gift » as emoji status. * * Cannot be passed to * {@link account.RawUpdateEmojiStatusRequest}, must be * converted to an {@link RawInputEmojiStatusCollectible} first * before passing it to that method. */ interface RawEmojiStatusCollectible { _: 'emojiStatusCollectible'; /** * ID of the collectible (from * {@link RawStarGiftUnique}.id). */ collectibleId: Long; /** * ID of the * custom * emoji representing the status. */ documentId: Long; /** * Name of the collectible. */ title: string; /** * Unique identifier of the collectible that may be used to * create a * collectible * gift link » for the current collectible, or to fetch * further info about the collectible using * {@link payments.RawGetUniqueStarGiftRequest}. */ slug: string; /** * The ID of a pattern to apply on the profile's backdrop, * correlated to the {@link RawStarGiftAttributePattern} from * the gift in slug. */ patternDocumentId: Long; /** * Color of the center of the profile backdrop in RGB24 format, * from the gift's {@link RawStarGiftAttributeBackdrop}. */ centerColor: number; /** * Color of the edges of the profile backdrop in RGB24 format, * from the gift's {@link RawStarGiftAttributeBackdrop}. */ edgeColor: number; /** * Color of the pattern_document_id applied on the * profile backdrop in RGB24 format, from the gift's * {@link RawStarGiftAttributeBackdrop}. */ patternColor: number; /** * Color of text on the profile backdrop in RGB24 format, from * the gift's {@link RawStarGiftAttributeBackdrop}. */ textColor: number; /** * If set, the emoji status will be active until the specified * unixtime. */ until?: number; } /** * An * owned * collectible gift » as emoji status: can only be used in * {@link account.RawUpdateEmojiStatusRequest}, is never * returned by the API. * * Note that once set, the status will be returned to users as * a {@link RawEmojiStatusCollectible} constructor, instead * (which cannot be passed to * {@link account.RawUpdateEmojiStatusRequest}, and must be * converted to an {@link RawInputEmojiStatusCollectible} * first). */ interface RawInputEmojiStatusCollectible { _: 'inputEmojiStatusCollectible'; /** * ID of the collectible (from * {@link RawStarGiftUnique}.id). */ collectibleId: Long; /** * If set, the emoji status will be active until the specified * unixtime. */ until?: number; } /** * No reaction */ interface RawReactionEmpty { _: 'reactionEmpty'; } /** * Normal emoji message reaction */ interface RawReactionEmoji { _: 'reactionEmoji'; /** * Emoji */ emoticon: string; } /** * Custom * emoji message reaction */ interface RawReactionCustomEmoji { _: 'reactionCustomEmoji'; /** * Custom * emoji document ID */ documentId: Long; } /** * Represents a * paid * Telegram Star reaction ». */ interface RawReactionPaid { _: 'reactionPaid'; } /** * No reactions are allowed */ interface RawChatReactionsNone { _: 'chatReactionsNone'; } /** * All reactions or all non-custom reactions are allowed */ interface RawChatReactionsAll { _: 'chatReactionsAll'; /** * Whether to allow custom reactions */ allowCustom?: boolean; } /** * Some reactions are allowed */ interface RawChatReactionsSome { _: 'chatReactionsSome'; /** * Allowed set of reactions: the * reactions_in_chat_max * configuration field indicates the maximum number of * reactions that can be specified in this field. */ reactions: tl.TypeReaction[]; } /** * Email verification purpose: setup login email */ interface RawEmailVerifyPurposeLoginSetup { _: 'emailVerifyPurposeLoginSetup'; /** * Phone number */ phoneNumber: string; /** * Phone code hash as specified by the * documentation */ phoneCodeHash: string; } /** * Email verification purpose: change login email */ interface RawEmailVerifyPurposeLoginChange { _: 'emailVerifyPurposeLoginChange'; } /** * Verify an email for use in * telegram * passport */ interface RawEmailVerifyPurposePassport { _: 'emailVerifyPurposePassport'; } /** * Email verification code */ interface RawEmailVerificationCode { _: 'emailVerificationCode'; /** * Received verification code */ code: string; } /** * Google ID email verification token */ interface RawEmailVerificationGoogle { _: 'emailVerificationGoogle'; /** * Token */ token: string; } /** * Apple ID email verification token */ interface RawEmailVerificationApple { _: 'emailVerificationApple'; /** * Token */ token: string; } /** * Describes a Telegram Premium subscription option */ interface RawPremiumSubscriptionOption { _: 'premiumSubscriptionOption'; /** * Whether this subscription option is currently in use. */ current?: boolean; /** * 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. */ canPurchaseUpgrade?: boolean; /** * 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 * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Deep * link used to initiate payment */ botUrl: string; /** * Store product ID, only for official apps */ storeProduct?: string; } /** * Indicates a peer that can be used to send messages */ interface RawSendAsPeer { _: 'sendAsPeer'; /** * Whether a Telegram Premium account is required to send * messages as this peer */ premiumRequired?: boolean; /** * Peer */ peer: tl.TypePeer; } /** * Paid media preview for not yet purchased paid media, * see * here » for more info. */ interface RawMessageExtendedMediaPreview { _: 'messageExtendedMediaPreview'; /** * Width */ w?: number; /** * Height */ h?: number; /** * Extremely * low resolution thumbnail. */ thumb?: tl.TypePhotoSize; /** * Video duration for videos. */ videoDuration?: number; } /** * Already purchased paid media, * see * here » for more info. */ interface RawMessageExtendedMedia { _: 'messageExtendedMedia'; /** * The media we purchased. */ media: tl.TypeMessageMedia; } /** * Keywords for a certain sticker */ interface RawStickerKeyword { _: 'stickerKeyword'; /** * Sticker ID */ documentId: Long; /** * Keywords */ keyword: string[]; } /** * Contains information about a username. */ interface RawUsername { _: 'username'; /** * Whether the username is editable, meaning it wasn't bought * on fragment. */ editable?: boolean; /** * Whether the username is active. */ active?: boolean; /** * The username. */ username: string; } /** * Represents a deleted forum topic. */ interface RawForumTopicDeleted { _: 'forumTopicDeleted'; /** * The ID of the deleted forum topic. */ id: number; } /** * Represents a * forum * topic. */ interface RawForumTopic { _: 'forumTopic'; /** * Whether the topic was created by the current user */ my?: boolean; /** * Whether the topic is closed (no messages can be sent to it) */ closed?: boolean; /** * Whether the topic is pinned */ pinned?: boolean; /** * 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 » and in the * {@link messages.RawChannelMessages} constructor: if needed, * full information can be fetched using * {@link channels.RawGetForumTopicsByIDRequest}. */ short?: boolean; /** * Whether the topic is hidden (only valid for the "General" * topic, id=1) */ hidden?: boolean; titleMissing?: boolean; /** * Topic * ID */ id: number; /** * Topic creation date */ date: number; peer: tl.TypePeer; /** * 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. */ iconColor: number; /** * ID of the * custom * emoji used as topic icon. */ iconEmojiId?: Long; /** * ID of the last message that was sent to this topic */ topMessage: number; /** * Position up to which all incoming messages are read. */ readInboxMaxId: number; /** * Position up to which all outgoing messages are read. */ readOutboxMaxId: number; /** * Number of unread messages */ unreadCount: number; /** * Number of * unread * mentions */ unreadMentionsCount: number; /** * Number of unread reactions to messages you sent */ unreadReactionsCount: number; /** * ID of the peer that created the topic */ fromId: tl.TypePeer; /** * Notification settings */ notifySettings: tl.TypePeerNotifySettings; /** * Message * draft */ draft?: tl.TypeDraftMessage; } /** * Contains info about the default value of the Time-To-Live * setting, applied to all new chats. */ interface RawDefaultHistoryTTL { _: 'defaultHistoryTTL'; /** * Time-To-Live setting applied to all new chats. */ period: number; } /** * Describes a * temporary * profile link. */ interface RawExportedContactToken { _: 'exportedContactToken'; /** * The * temporary * profile link. */ url: string; /** * Its expiration date */ expires: number; } /** * Choose a user. */ interface RawRequestPeerTypeUser { _: 'requestPeerTypeUser'; /** * Whether to allow choosing only bots. */ bot?: boolean; /** * Whether to allow choosing only * Premium * users. */ premium?: boolean; } /** * Choose a chat or supergroup */ interface RawRequestPeerTypeChat { _: 'requestPeerTypeChat'; /** * Whether to allow only choosing chats or supergroups that * were created by the current user. */ creator?: boolean; /** * Whether to allow only choosing chats or supergroups where * the bot is a participant. */ botParticipant?: boolean; /** * If specified, allows only choosing channels with or without * a username, according to the value of * Bool. */ hasUsername?: boolean; /** * If specified, allows only choosing chats or supergroups that * are or aren't * forums, * according to the value of * 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. */ userAdminRights?: tl.TypeChatAdminRights; /** * If specified, allows only choosing chats or supergroups * where the bot is an admin with at least the specified admin * rights. */ botAdminRights?: tl.TypeChatAdminRights; } /** * Choose a channel */ interface RawRequestPeerTypeBroadcast { _: 'requestPeerTypeBroadcast'; /** * Whether to allow only choosing channels that were created by * the current user. */ creator?: boolean; /** * If specified, allows only choosing channels with or without * a username, according to the value of * Bool. */ hasUsername?: boolean; /** * If specified, allows only choosing channels where the * current user is an admin with at least the specified admin * rights. */ userAdminRights?: tl.TypeChatAdminRights; /** * If specified, allows only choosing channels where the bot is * an admin with at least the specified admin rights. */ botAdminRights?: tl.TypeChatAdminRights; } /** * The list of * custom * emojis hasn't changed. */ interface RawEmojiListNotModified { _: 'emojiListNotModified'; } /** * Represents a list of * custom * emojis. */ interface RawEmojiList { _: 'emojiList'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Custom emoji IDs */ documentId: Long[]; } /** * Represents an * emoji * category. */ interface RawEmojiGroup { _: 'emojiGroup'; /** * Category name, i.e. "Animals", "Flags", "Faces" and so on... */ title: string; /** * A single custom emoji used as preview for the category. */ iconEmojiId: Long; /** * A list of UTF-8 emojis, matching the category. */ emoticons: string[]; } /** * Represents an * emoji * category, that should be moved to the top of the list * when choosing a sticker for a * business * introduction */ interface RawEmojiGroupGreeting { _: 'emojiGroupGreeting'; /** * Category name, i.e. "Animals", "Flags", "Faces" and so on... */ title: string; /** * A single custom emoji used as preview for the category. */ iconEmojiId: Long; /** * A list of UTF-8 emojis, matching the category. */ emoticons: string[]; } /** * An * emoji * category, used to select all * Premium-only * stickers (i.e. those with a * Premium * effect * »)/Premium-only * custom * emojis (i.e. those where the * {@link RawDocumentAttributeCustomEmoji}.free * flag is not set) */ interface RawEmojiGroupPremium { _: 'emojiGroupPremium'; /** * Category name, i.e. "Animals", "Flags", "Faces" and so on... */ title: string; /** * A single custom emoji used as preview for the category. */ iconEmojiId: Long; } /** * Styled text with * message * entities */ interface RawTextWithEntities { _: 'textWithEntities'; /** * Text */ text: string; /** * Message * entities for styled text */ entities: tl.TypeMessageEntity[]; } /** * Media autosave settings */ interface RawAutoSaveSettings { _: 'autoSaveSettings'; /** * Whether photos should be autosaved to the gallery. */ photos?: boolean; /** * Whether videos should be autosaved to the gallery. */ videos?: boolean; /** * If set, specifies a size limit for autosavable videos */ videoMaxSize?: Long; } /** * Peer-specific media autosave settings */ interface RawAutoSaveException { _: 'autoSaveException'; /** * The peer */ peer: tl.TypePeer; /** * Media autosave settings */ settings: tl.TypeAutoSaveSettings; } /** * Used to fetch information about a * direct * link Mini App by its ID */ interface RawInputBotAppID { _: 'inputBotAppID'; /** * direct * link Mini App ID. */ id: Long; /** * Access hash, obtained from the {@link RawBotApp} * constructor. */ accessHash: Long; } /** * Used to fetch information about a * direct * link Mini App by its short name */ interface RawInputBotAppShortName { _: 'inputBotAppShortName'; /** * ID of the bot that owns the bot mini app */ botId: tl.TypeInputUser; /** * Short name, obtained from a * Direct * Mini App deep link */ shortName: string; } /** * Bot app info hasn't changed. */ interface RawBotAppNotModified { _: 'botAppNotModified'; } /** * Contains information about a * direct * link Mini App. */ interface RawBotApp { _: 'botApp'; /** * bot mini app ID */ id: Long; /** * bot mini app access hash */ accessHash: Long; /** * bot mini app short name, used to generate * Direct * Mini App deep links. */ shortName: string; /** * bot mini app title. */ title: string; /** * bot mini app description. */ description: string; /** * bot mini app photo. */ photo: tl.TypePhoto; /** * bot mini app animation. */ document?: tl.TypeDocument; /** * Hash to pass to {@link messages.RawGetBotAppRequest}, to * avoid refetching bot app info if it hasn't changed. */ hash: Long; } /** * Specifies an * inline * mode mini app button, shown on top of the inline query * results list. */ interface RawInlineBotWebView { _: 'inlineBotWebView'; /** * Text of the button */ text: string; /** * Webapp URL */ url: string; } /** * Contains info about when a certain participant has read a * message */ interface RawReadParticipantDate { _: 'readParticipantDate'; /** * User ID */ userId: number; /** * When the user read the message */ date: number; } /** * Folder ID */ interface RawInputChatlistDialogFilter { _: 'inputChatlistDialogFilter'; /** * Folder * ID */ filterId: number; } /** * Exported * chat * folder deep link ». */ interface RawExportedChatlistInvite { _: 'exportedChatlistInvite'; /** * Name of the link */ title: string; /** * The * chat * folder deep link ». */ url: string; /** * Peers to import */ peers: tl.TypePeer[]; } /** * How a peer voted in a poll */ interface RawMessagePeerVote { _: 'messagePeerVote'; /** * Peer ID */ peer: tl.TypePeer; /** * The option chosen by the peer */ option: Uint8Array; /** * When did the peer cast the vote */ date: number; } /** * How a peer voted in a poll (reduced constructor, returned if * an option was provided to * {@link messages.RawGetPollVotesRequest}) */ interface RawMessagePeerVoteInputOption { _: 'messagePeerVoteInputOption'; /** * The peer that voted for the queried option */ peer: tl.TypePeer; /** * When did the peer cast the vote */ date: number; } /** * How a peer voted in a multiple-choice poll */ interface RawMessagePeerVoteMultiple { _: 'messagePeerVoteMultiple'; /** * Peer ID */ peer: tl.TypePeer; /** * Options chosen by the peer */ options: Uint8Array[]; /** * When did the peer cast their votes */ date: number; } /** * Aggregated view and reaction information of a * story. */ interface RawStoryViews { _: '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 * account. */ hasViewers?: boolean; /** * View counter of the story */ viewsCount: number; /** * Forward counter of the story */ forwardsCount?: number; /** * All reactions sent to this story */ reactions?: tl.TypeReactionCount[]; /** * Number of reactions added to the story */ reactionsCount?: number; /** * User IDs of some recent viewers of the story */ recentViewers?: number[]; } /** * Represents a previously active story, that was deleted */ interface RawStoryItemDeleted { _: 'storyItemDeleted'; /** * Story ID */ id: number; } /** * Represents an active story, whose full information was * omitted for space and performance reasons; use * {@link stories.RawGetStoriesByIDRequest} to fetch full info * about the skipped story when and if needed. */ interface RawStoryItemSkipped { _: 'storyItemSkipped'; /** * Whether this story can only be viewed by * our * close friends, see here » for more info */ closeFriends?: boolean; live?: boolean; /** * Story ID */ id: number; /** * When was the story posted. */ date: number; /** * When does the story expire. */ expireDate: number; } /** * Represents a * story. */ interface RawStoryItem { _: 'storyItem'; /** * Whether this story is pinned on the user's profile */ pinned?: boolean; /** * Whether this story is public and can be viewed by everyone */ public?: boolean; /** * Whether this story can only be viewed by * our * close friends, see here » for more info */ closeFriends?: boolean; /** * Full information about this story was omitted for space and * performance reasons; use * {@link stories.RawGetStoriesByIDRequest} to fetch full info * about this story when and if needed. */ min?: boolean; /** * Whether this story is * protected * 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?: boolean; /** * Indicates whether the story was edited. */ edited?: boolean; /** * Whether this story can only be viewed by our contacts */ contacts?: boolean; /** * Whether this story can only be viewed by a select list of * our contacts */ selectedContacts?: boolean; /** * indicates whether we sent this story. */ out?: boolean; /** * ID of the story. */ id: number; /** * When was the story posted. */ date: number; /** * Sender of the story. */ fromId?: tl.TypePeer; /** * For * reposted * stories », contains info about the original story. */ fwdFrom?: tl.TypeStoryFwdHeader; /** * When does the story expire. */ expireDate: number; /** * Story caption. */ caption?: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Story media. */ media: tl.TypeMessageMedia; /** * List of media areas, see * here * » for more info on media areas. */ mediaAreas?: tl.TypeMediaArea[]; /** * Privacy * rules indicating who can and can't view this story */ privacy?: tl.TypePrivacyRule[]; /** * View date and reaction information */ views?: tl.TypeStoryViews; /** * The reaction we sent. */ sentReaction?: tl.TypeReaction; /** * Albums * this story is part of. */ albums?: number[]; } /** * Story * view date and reaction information */ interface RawStoryView { _: 'storyView'; /** * Whether we have * completely * blocked this user, including from viewing more of our * stories. */ blocked?: boolean; /** * Whether we have * blocked * this user from viewing more of our stories. */ blockedMyStoriesFrom?: boolean; /** * The user that viewed the story */ userId: number; /** * When did the user view the story */ date: number; /** * If present, contains the reaction that the user left on the * story */ reaction?: tl.TypeReaction; } /** * A certain peer has forwarded the story as a message to a * public chat or channel. */ interface RawStoryViewPublicForward { _: 'storyViewPublicForward'; /** * Whether we have * completely * blocked this user, including from viewing more of our * stories. */ blocked?: boolean; /** * Whether we have * blocked * this user from viewing more of our stories. */ blockedMyStoriesFrom?: boolean; /** * The message with the forwarded story. */ message: tl.TypeMessage; } /** * A certain peer has reposted the story. */ interface RawStoryViewPublicRepost { _: 'storyViewPublicRepost'; /** * Whether we have * completely * blocked this user, including from viewing more of our * stories. */ blocked?: boolean; /** * Whether we have * blocked * this user from viewing more of our stories. */ blockedMyStoriesFrom?: boolean; /** * The peer that reposted the story. */ peerId: tl.TypePeer; /** * The reposted story. */ story: tl.TypeStoryItem; } /** * Reply to a message. */ interface RawInputReplyToMessage { _: 'inputReplyToMessage'; /** * The message ID to reply to. */ replyToMsgId: 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. */ topMsgId?: number; /** * Used to reply to messages sent to another chat (specified * here), can only be used for non-protected chats * and messages. */ replyToPeerId?: tl.TypeInputPeer; /** * 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 * config key. */ quoteText?: string; /** * Message * entities for styled text from the * quote_text field. */ quoteEntities?: tl.TypeMessageEntity[]; /** * Offset of the message quote_text within the * original message (in * UTF-16 * code units). */ quoteOffset?: number; /** * Must be set to the ID of the topic when replying to a * message within a * monoforum * topic. */ monoforumPeerId?: tl.TypeInputPeer; /** * Can be set to reply to the specified item of a * todo list * ». */ todoItemId?: number; } /** * Reply to a story. */ interface RawInputReplyToStory { _: 'inputReplyToStory'; /** * Sender of the story */ peer: tl.TypeInputPeer; /** * ID of the story to reply to. */ storyId: number; } /** * Used to send messages to a * monoforum * topic. */ interface RawInputReplyToMonoForum { _: 'inputReplyToMonoForum'; /** * The topic ID. */ monoforumPeerId: tl.TypeInputPeer; } /** * Represents a * story * deep link. */ interface RawExportedStoryLink { _: 'exportedStoryLink'; /** * The * story * deep link. */ link: string; } /** * Information about the current * stealth * mode session. */ interface RawStoriesStealthMode { _: 'storiesStealthMode'; /** * The date up to which stealth mode will be active. */ activeUntilDate?: number; /** * The date starting from which the user will be allowed to * re-enable stealth mode again. */ cooldownUntilDate?: number; } /** * Coordinates and size of a clickable rectangular area on top * of a story. */ interface RawMediaAreaCoordinates { _: 'mediaAreaCoordinates'; /** * The abscissa of the rectangle's center, as a percentage of * the media width (0-100). */ x: Double; /** * The ordinate of the rectangle's center, as a percentage of * the media height (0-100). */ y: Double; /** * The width of the rectangle, as a percentage of the media * width (0-100). */ w: Double; /** * The height of the rectangle, as a percentage of the media * height (0-100). */ h: Double; /** * Clockwise rotation angle of the rectangle, in degrees * (0-360). */ rotation: Double; /** * The radius of the rectangle corner rounding, as a percentage * of the media width. */ radius?: Double; } /** * Represents a location tag attached to a * story, * with additional venue information. */ interface RawMediaAreaVenue { _: 'mediaAreaVenue'; /** * The size and location of the media area corresponding to the * location sticker on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * Coordinates of the venue */ geo: tl.TypeGeoPoint; /** * Venue name */ title: string; /** * Address */ address: string; /** * Venue provider: currently only "foursquare" and "gplaces" * need to be supported. */ provider: string; /** * Venue ID in the provider's database */ venueId: string; /** * Venue type in the provider's database */ venueType: string; } /** * Represents a * location * tag attached to a * story, * with additional venue information. */ interface RawInputMediaAreaVenue { _: 'inputMediaAreaVenue'; /** * The size and location of the media area corresponding to the * location sticker on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * The query_id from * {@link messages.RawBotResults}, see * here * » for more info. */ queryId: Long; /** * The id of the chosen result, see * here * » for more info. */ resultId: string; } /** * Represents a geolocation tag attached to a * story. */ interface RawMediaAreaGeoPoint { _: 'mediaAreaGeoPoint'; /** * The size and position of the media area corresponding to the * location sticker on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * Coordinates of the geolocation tag. */ geo: tl.TypeGeoPoint; /** * Optional textual representation of the address. */ address?: tl.TypeGeoPointAddress; } /** * Represents a reaction bubble. */ interface RawMediaAreaSuggestedReaction { _: 'mediaAreaSuggestedReaction'; /** * Whether the reaction bubble has a dark background. */ dark?: boolean; /** * Whether the reaction bubble is mirrored (see * here * » for more info). */ flipped?: boolean; /** * The coordinates of the media area corresponding to the * reaction button. */ coordinates: tl.TypeMediaAreaCoordinates; /** * The reaction that should be sent when this area is clicked. */ reaction: tl.TypeReaction; } /** * Represents a channel post. */ interface RawMediaAreaChannelPost { _: 'mediaAreaChannelPost'; /** * The size and location of the media area corresponding to the * location sticker on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * The channel that posted the message */ channelId: number; /** * ID of the channel message */ msgId: number; } /** * Represents a channel post */ interface RawInputMediaAreaChannelPost { _: 'inputMediaAreaChannelPost'; /** * The size and location of the media area corresponding to the * location sticker on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * The channel that posted the message */ channel: tl.TypeInputChannel; /** * ID of the channel message */ msgId: number; } /** * Represents a * URL * media area. */ interface RawMediaAreaUrl { _: 'mediaAreaUrl'; /** * The size and location of the media area corresponding to the * URL button on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * URL to open when clicked. */ url: string; } /** * Represents a * weather * widget ». */ interface RawMediaAreaWeather { _: 'mediaAreaWeather'; /** * The size and location of the media area corresponding to the * widget on top of the story media. */ coordinates: tl.TypeMediaAreaCoordinates; /** * Weather emoji, should be rendered as an * animated * emoji. */ emoji: string; /** * Temperature in degrees Celsius. */ temperatureC: Double; /** * ARGB background color. */ color: number; } /** * Represents a * collectible * gift ». */ interface RawMediaAreaStarGift { _: 'mediaAreaStarGift'; /** * Coordinates of the media area. */ coordinates: tl.TypeMediaAreaCoordinates; /** * slug from * {@link RawStarGiftUnique}.slug, that can be * resolved as * specified * here ». */ slug: string; } /** * Stories * associated to a peer */ interface RawPeerStories { _: 'peerStories'; /** * The peer */ peer: tl.TypePeer; /** * If set, contains the ID of the maximum read story */ maxReadId?: number; /** * Stories */ stories: tl.TypeStoryItem[]; } /** * Contains info about a * giveaway/gift * option. */ interface RawPremiumGiftCodeOption { _: 'premiumGiftCodeOption'; /** * Number of users which will be able to activate the gift * codes. */ users: number; /** * Duration in months of each gifted * Telegram * Premium subscription. */ months: number; /** * Identifier of the store product associated with the option, * official apps only. */ storeProduct?: string; /** * Number of times the store product must be paid */ storeQuantity?: number; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Contains info about a * prepaid * giveaway ». */ interface RawPrepaidGiveaway { _: 'prepaidGiveaway'; /** * Prepaid giveaway ID. */ id: Long; /** * Duration in months of each gifted * Telegram * Premium subscription. */ months: number; /** * Number of given away * Telegram * Premium subscriptions. */ quantity: number; /** * Payment date. */ date: number; } /** * Contains info about a * prepaid * Telegram Star giveaway ». */ interface RawPrepaidStarsGiveaway { _: 'prepaidStarsGiveaway'; /** * Prepaid giveaway ID. */ id: Long; /** * Number of given away * Telegram * Stars » */ stars: Long; /** * Number of giveaway winners */ quantity: number; /** * Number of boosts the channel will gain by launching the * giveaway. */ boosts: number; /** * When was the giveaway paid for */ date: number; } /** * Info about one or more * boosts * applied by a specific user. */ interface RawBoost { _: 'boost'; /** * Whether this boost was applied because the * channel/supergroup * directly * gifted a subscription to the user. */ gift?: boolean; /** * Whether this boost was applied because the user was chosen * in a * giveaway * started by the channel/supergroup. */ giveaway?: boolean; /** * If set, the user hasn't yet invoked * {@link payments.RawApplyGiftCodeRequest} to claim a * subscription gifted * directly * or in a giveaway by the channel. */ unclaimed?: boolean; /** * Unique ID for this set of boosts. */ id: string; /** * ID of the user that applied the boost. */ userId?: number; /** * The message ID of the * giveaway */ giveawayMsgId?: 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. */ usedGiftSlug?: string; /** * If set, this boost counts as multiplier boosts, * otherwise it counts as a single boost. */ multiplier?: number; /** * Number of Telegram Stars distributed among the winners of * the giveaway. */ stars?: Long; } /** * Contains information about a single * boost slot * ». */ interface RawMyBoost { _: 'myBoost'; /** * Boost slot * ID » */ slot: number; /** * If set, indicates this slot is currently occupied, i.e. we * are * boosting * this peer. * * Note that we can assign multiple boost slots to the same * peer. */ peer?: tl.TypePeer; /** * 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. */ cooldownUntilDate?: number; } /** * Contains info about the original poster of a reposted story. */ interface RawStoryFwdHeader { _: 'storyFwdHeader'; /** * Whether the story media was modified before reposting it * (for example by overlaying a round video with a reaction). */ modified?: boolean; /** * 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?: tl.TypePeer; /** * Will be set for stories forwarded from a user with forwards * privacy enabled, in which case from will also * be empty. */ fromName?: string; /** * , contains the story ID */ storyId?: number; } /** * Interaction counters for a message. */ interface RawPostInteractionCountersMessage { _: 'postInteractionCountersMessage'; /** * Message ID */ msgId: number; /** * Number of views */ views: number; /** * Number of forwards to public channels */ forwards: number; /** * Number of reactions */ reactions: number; } /** * Interaction counters for a story. */ interface RawPostInteractionCountersStory { _: 'postInteractionCountersStory'; /** * Story ID */ storyId: number; /** * Number of views */ views: number; /** * Number of forwards and reposts to public chats and channels */ forwards: number; /** * Number of reactions */ reactions: number; } /** * Contains info about a forward of a * story * as a message. */ interface RawPublicForwardMessage { _: 'publicForwardMessage'; /** * Info about the message with the reposted story. */ message: tl.TypeMessage; } /** * Contains info about a forward of a * story * as a repost by a public channel. */ interface RawPublicForwardStory { _: 'publicForwardStory'; /** * The channel that reposted the story. */ peer: tl.TypePeer; /** * The reposted story (may be different from the original * story). */ story: tl.TypeStoryItem; } /** * Represents a * color * palette ». */ interface RawPeerColor { _: 'peerColor'; /** * Color * palette ID, see here » for more info; if not set, the * default palette should be used. */ color?: number; /** * Optional * custom * emoji ID used to generate the pattern. */ backgroundEmojiId?: Long; } interface RawPeerColorCollectible { _: 'peerColorCollectible'; collectibleId: Long; giftEmojiId: Long; backgroundEmojiId: Long; accentColor: number; colors: number[]; darkAccentColor?: number; darkColors?: number[]; } interface RawInputPeerColorCollectible { _: 'inputPeerColorCollectible'; collectibleId: Long; } /** * How a certain peer reacted to a story */ interface RawStoryReaction { _: 'storyReaction'; /** * The peer */ peerId: tl.TypePeer; /** * Reaction date */ date: number; /** * The reaction */ reaction: tl.TypeReaction; } /** * A certain peer has forwarded the story as a message to a * public chat or channel. */ interface RawStoryReactionPublicForward { _: 'storyReactionPublicForward'; /** * The message with the forwarded story. */ message: tl.TypeMessage; } /** * A certain peer has reposted the story. */ interface RawStoryReactionPublicRepost { _: 'storyReactionPublicRepost'; /** * The peer that reposted the story. */ peerId: tl.TypePeer; /** * The reposted story. */ story: tl.TypeStoryItem; } /** * Represents a * saved * dialog ». */ interface RawSavedDialog { _: 'savedDialog'; /** * Is the dialog pinned */ pinned?: boolean; /** * The dialog */ peer: tl.TypePeer; /** * The latest message ID */ topMessage: number; } /** * Represents a * monoforum * topic ». */ interface RawMonoForumDialog { _: 'monoForumDialog'; /** * Whether this topic has a manually set (with * {@link messages.RawMarkDialogUnreadRequest}) unread mark. */ unreadMark?: boolean; /** * If set, an admin has exempted this peer from payment to send * messages using * {@link account.RawToggleNoPaidMessagesExceptionRequest}. */ nopaidMessagesException?: boolean; /** * The peer associated to the topic, AKA the topic ID. */ peer: tl.TypePeer; /** * The latest message ID */ topMessage: number; /** * Position up to which all incoming messages are read. */ readInboxMaxId: number; /** * Position up to which all outgoing messages are read. */ readOutboxMaxId: number; /** * Number of unread messages. */ unreadCount: number; /** * Number of unread reactions. */ unreadReactionsCount: number; /** * A pending message * draft. */ draft?: tl.TypeDraftMessage; } /** * Info about a * saved * message reaction tag ». */ interface RawSavedReactionTag { _: 'savedReactionTag'; /** * Reaction * associated to the tag. */ reaction: tl.TypeReaction; /** * Custom tag name assigned by the user (max 12 UTF-8 chars). */ title?: string; /** * Number of messages tagged with this tag. */ count: number; } /** * Exact read date of a private message we sent to another * user. */ interface RawOutboxReadDate { _: 'outboxReadDate'; /** * UNIX timestamp with the read date. */ date: number; } /** * Info about an SMS job. */ interface RawSmsJob { _: 'smsJob'; /** * Job ID */ jobId: string; /** * Destination phone number */ phoneNumber: string; /** * Text */ text: string; } /** * A time interval, indicating the opening hours of a business. * * Note that opening hours specified by the user must be * appropriately validated and transformed before uploading * them to the server, as specified * here * ». */ interface RawBusinessWeeklyOpen { _: 'businessWeeklyOpen'; /** * Start minute in minutes of the week, 0 to * 7*24*60 inclusively. */ startMinute: number; /** * End minute in minutes of the week, 1 to * 8*24*60 inclusively (8 and not * 7 because this allows to specify intervals * that, for example, start on Sunday 21:00 and * end on Monday 04:00 (6*24*60+21*60 * to 7*24*60+4*60) without passing an invalid * end_minute < start_minute). See * here * » for more info. */ endMinute: number; } /** * Specifies a set of * Telegram * Business opening hours. */ interface RawBusinessWorkHours { _: 'businessWorkHours'; /** * Ignored if set while invoking * {@link account.RawUpdateBusinessWorkHoursRequest}, only * returned by the server in * {@link RawUserFull}.business_work_hours, * indicating whether the business is currently open according * to the current time and the values in * weekly_open and timezone. */ openNow?: boolean; /** * An ID of one of the timezones returned by * {@link help.RawGetTimezonesListRequest}. * * The timezone ID is contained * {@link RawTimezone}.id, a human-readable, * localized name of the timezone is available in * {@link RawTimezone}.name and the * {@link RawTimezone}.utc_offset field contains * the UTC offset in seconds, which may be displayed in hh:mm * format by the client together with the human-readable name * (i.e. $name UTC -01:00). */ timezoneId: string; /** * A list of time intervals (max 28) represented by * {@link RawBusinessWeeklyOpen}, indicating the opening hours * of their business. */ weeklyOpen: tl.TypeBusinessWeeklyOpen[]; } /** * Represents the location of a * Telegram * Business ». */ interface RawBusinessLocation { _: 'businessLocation'; /** * Geographical coordinates (optional). */ geoPoint?: tl.TypeGeoPoint; /** * Textual description of the address (mandatory). */ address: string; } /** * Specifies the chats that can receive * Telegram Business * away * » and * greeting * » messages. * * If exclude_selected is set, specifies all chats * that cannot receive Telegram Business * away * » and * greeting * » messages. */ interface RawInputBusinessRecipients { _: 'inputBusinessRecipients'; /** * All existing private chats. */ existingChats?: boolean; /** * All new private chats. */ newChats?: boolean; /** * All private chats with contacts. */ contacts?: boolean; /** * All private chats with non-contacts. */ nonContacts?: boolean; /** * If set, inverts the selection. */ excludeSelected?: boolean; /** * Only private chats with the specified users. */ users?: tl.TypeInputUser[]; } /** * Specifies the chats that can receive * Telegram Business * away * » and * greeting * » messages. * * If exclude_selected is set, specifies all chats * that cannot receive Telegram Business * away * » and * greeting * » messages. */ interface RawBusinessRecipients { _: 'businessRecipients'; /** * All existing private chats. */ existingChats?: boolean; /** * All new private chats. */ newChats?: boolean; /** * All private chats with contacts. */ contacts?: boolean; /** * All private chats with non-contacts. */ nonContacts?: boolean; /** * If set, inverts the selection. */ excludeSelected?: boolean; /** * Only private chats with the specified users. */ users?: number[]; } /** * Always send * Telegram * Business away messages to users writing to us in * private. */ interface RawBusinessAwayMessageScheduleAlways { _: 'businessAwayMessageScheduleAlways'; } /** * Send * Telegram * Business away messages to users writing to us in private * outside of the configured * Telegram * Business working hours. */ interface RawBusinessAwayMessageScheduleOutsideWorkHours { _: 'businessAwayMessageScheduleOutsideWorkHours'; } /** * Send * Telegram * Business away messages to users writing to us in private * in the specified time span. */ interface RawBusinessAwayMessageScheduleCustom { _: 'businessAwayMessageScheduleCustom'; /** * Start date (UNIX timestamp). */ startDate: number; /** * End date (UNIX timestamp). */ endDate: number; } /** * Describes a * Telegram * Business greeting, automatically sent to new users * writing to us in private for the first time, or after a * certain inactivity period. */ interface RawInputBusinessGreetingMessage { _: 'inputBusinessGreetingMessage'; /** * ID of a * quick * reply shorcut, containing the greeting messages to send, see * here » for more info. */ shortcutId: number; /** * Allowed recipients for the greeting messages. */ recipients: tl.TypeInputBusinessRecipients; /** * The number of days after which a private chat will be * considered as inactive; currently, must be one of 7, 14, 21, * or 28. */ noActivityDays: number; } /** * Describes a * Telegram * Business greeting, automatically sent to new users * writing to us in private for the first time, or after a * certain inactivity period. */ interface RawBusinessGreetingMessage { _: 'businessGreetingMessage'; /** * ID of a * quick * reply shorcut, containing the greeting messages to send, see * here » for more info. */ shortcutId: number; /** * Allowed recipients for the greeting messages. */ recipients: tl.TypeBusinessRecipients; /** * The number of days after which a private chat will be * considered as inactive; currently, must be one of 7, 14, 21, * or 28. */ noActivityDays: number; } /** * Describes a * Telegram * Business away message, automatically sent to users * writing to us when we're offline, during closing hours, * while we're on vacation, or in some other custom time period * when we cannot immediately answer to the user. */ interface RawInputBusinessAwayMessage { _: 'inputBusinessAwayMessage'; /** * If set, the messages will not be sent if the account was * online in the last 10 minutes. */ offlineOnly?: boolean; /** * ID of a * quick * reply shorcut, containing the away messages to send, see * here » for more info. */ shortcutId: number; /** * Specifies when should the away messages be sent. */ schedule: tl.TypeBusinessAwayMessageSchedule; /** * Allowed recipients for the away messages. */ recipients: tl.TypeInputBusinessRecipients; } /** * Describes a * Telegram * Business away message, automatically sent to users * writing to us when we're offline, during closing hours, * while we're on vacation, or in some other custom time period * when we cannot immediately answer to the user. */ interface RawBusinessAwayMessage { _: 'businessAwayMessage'; /** * If set, the messages will not be sent if the account was * online in the last 10 minutes. */ offlineOnly?: boolean; /** * ID of a * quick * reply shorcut, containing the away messages to send, see * here » for more info. */ shortcutId: number; /** * Specifies when should the away messages be sent. */ schedule: tl.TypeBusinessAwayMessageSchedule; /** * Allowed recipients for the away messages. */ recipients: tl.TypeBusinessRecipients; } /** * Timezone information. */ interface RawTimezone { _: 'timezone'; /** * Unique timezone ID. */ id: string; /** * Human-readable and localized timezone name. */ name: string; /** * UTC offset in seconds, which may be displayed in hh:mm * format by the client together with the human-readable name * (i.e. $name UTC -01:00). */ utcOffset: number; } /** * A * quick * reply shortcut. */ interface RawQuickReply { _: 'quickReply'; /** * Unique shortcut ID. */ shortcutId: number; /** * Shortcut name. */ shortcut: string; /** * ID of the last message in the shortcut. */ topMessage: number; /** * Total number of messages in the shortcut. */ count: number; } /** * Selects a * quick * reply shortcut by name. */ interface RawInputQuickReplyShortcut { _: 'inputQuickReplyShortcut'; /** * Shortcut name. */ shortcut: string; } /** * Selects a * quick * reply shortcut by its numeric ID. */ interface RawInputQuickReplyShortcutId { _: 'inputQuickReplyShortcutId'; /** * Shortcut ID. */ shortcutId: number; } /** * Contains info about a * connected * business bot ». */ interface RawConnectedBot { _: 'connectedBot'; /** * ID of the connected bot */ botId: number; /** * Specifies the private chats that a * connected * business bot » may receive messages and interact with. * * */ recipients: tl.TypeBusinessBotRecipients; /** * Business bot rights. */ rights: tl.TypeBusinessBotRights; } /** * Birthday * information for a user. * * Also used to invite users to gift * Telegram * Premium subscriptions » to other users with birthdays * within a +1/-1 day time range, related to the current day. */ interface RawBirthday { _: 'birthday'; /** * Birth day */ day: number; /** * Birth month */ month: number; /** * (Optional) birth year. */ year?: number; } /** * Contains info about a * bot * business connection. */ interface RawBotBusinessConnection { _: 'botBusinessConnection'; /** * Whether this business connection is currently disabled */ disabled?: boolean; /** * Business connection ID, used to identify messages coming * from the connection and to reply to them as specified * here * ». */ connectionId: string; /** * ID of the user that the bot is connected to via this * connection. */ userId: number; /** * ID of the datacenter where to send queries wrapped in a * {@link RawInvokeWithBusinessConnectionRequest} as specified * here * ». */ dcId: number; /** * When was the connection created. */ date: number; /** * Business bot rights. */ rights?: tl.TypeBusinessBotRights; } /** * Telegram * Business introduction ». */ interface RawInputBusinessIntro { _: 'inputBusinessIntro'; /** * Title of the introduction message */ title: string; /** * Profile introduction */ description: string; /** * Optional introduction * sticker. */ sticker?: tl.TypeInputDocument; } /** * Telegram * Business introduction ». */ interface RawBusinessIntro { _: 'businessIntro'; /** * Title of the introduction message (max * intro_title_length_limit * » UTF-8 characters). */ title: string; /** * Profile introduction (max * intro_description_length_limit * » UTF-8 characters). */ description: string; /** * Optional introduction * sticker. */ sticker?: tl.TypeDocument; } /** * Represents a * username * fragment collectible */ interface RawInputCollectibleUsername { _: 'inputCollectibleUsername'; /** * Username */ username: string; } /** * Represents a * phone * number fragment collectible */ interface RawInputCollectiblePhone { _: 'inputCollectiblePhone'; /** * Phone number */ phone: string; } /** * Specifies the private chats that a * connected * business bot » may interact with. */ interface RawInputBusinessBotRecipients { _: 'inputBusinessBotRecipients'; /** * Selects all existing private chats. */ existingChats?: boolean; /** * Selects all new private chats. */ newChats?: boolean; /** * Selects all private chats with contacts. */ contacts?: boolean; /** * Selects all private chats with non-contacts. */ nonContacts?: boolean; /** * If set, then all private chats except the ones * selected by existing_chats, * new_chats, contacts, * non_contacts and users are chosen. * * * Note that if this flag is set, any values passed in * exclude_users will be merged and moved into * users by the server. */ excludeSelected?: boolean; /** * Explicitly selected private chats. */ users?: tl.TypeInputUser[]; /** * Identifiers of private chats that are always excluded. */ excludeUsers?: tl.TypeInputUser[]; } /** * Specifies the private chats that a * connected * business bot » may receive messages and interact with. */ interface RawBusinessBotRecipients { _: 'businessBotRecipients'; /** * Selects all existing private chats. */ existingChats?: boolean; /** * Selects all new private chats. */ newChats?: boolean; /** * Selects all private chats with contacts. */ contacts?: boolean; /** * Selects all private chats with non-contacts. */ nonContacts?: boolean; /** * If set, then all private chats except the ones * selected by existing_chats, * new_chats, contacts, * non_contacts and users are chosen. * * * Note that if this flag is set, any values passed in * exclude_users will be merged and moved into * users by the server, thus * exclude_users will always be empty. */ excludeSelected?: boolean; /** * Explicitly selected private chats. */ users?: number[]; /** * Identifiers of private chats that are always excluded. */ excludeUsers?: number[]; } /** * Birthday information of a contact. */ interface RawContactBirthday { _: 'contactBirthday'; /** * User ID. */ contactId: number; /** * Birthday information. */ birthday: tl.TypeBirthday; } /** * Info about why a specific user could not be * invited * ». */ interface RawMissingInvitee { _: 'missingInvitee'; /** * If set, we could not add the user only because the * current account needs to purchase a * Telegram * Premium subscription to complete the operation. */ premiumWouldAllowInvite?: boolean; /** * If set, we could not add the user because of their privacy * settings, and additionally, the current account needs to * purchase a * Telegram * Premium subscription to directly share an invite link * with the user via a private message. */ premiumRequiredForPm?: boolean; /** * ID of the user. If neither of the flags below are set, we * could not add the user because of their privacy settings, * and we can create and directly share an * invite * link with them using a normal message, instead. */ userId: number; } /** * Contains info about a * business * chat deep link » to be created by the current account. */ interface RawInputBusinessChatLink { _: 'inputBusinessChatLink'; /** * Message to pre-fill in the message input field. */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Human-readable name of the link, to simplify management in * the UI (only visible to the creator of the link). */ title?: string; } /** * Contains info about a * business * chat deep link » created by the current account. */ interface RawBusinessChatLink { _: 'businessChatLink'; /** * Business * chat deep link. */ link: string; /** * Message to pre-fill in the message input field. */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Human-readable name of the link, to simplify management in * the UI (only visible to the creator of the link). */ title?: string; /** * Number of times the link was resolved * (clicked/scanned/etc...). */ views: number; } /** * Info about a user, shared by a user with the currently * logged in bot using * {@link messages.RawSendBotRequestedPeerRequest}. * * All fields except the ID are optional, and will be populated * if present on the chosen user, according to the parameters * of the requesting {@link RawInputKeyboardButtonRequestPeer}. */ interface RawRequestedPeerUser { _: 'requestedPeerUser'; /** * User ID. */ userId: number; /** * First name. */ firstName?: string; /** * Last name. */ lastName?: string; /** * Username. */ username?: string; /** * Profile photo. */ photo?: tl.TypePhoto; } /** * Info about a * chat, * shared by a user with the currently logged in bot using * {@link messages.RawSendBotRequestedPeerRequest}. * * All fields except the ID are optional, and will be populated * if present on the chosen chat, according to the parameters * of the requesting {@link RawInputKeyboardButtonRequestPeer}. */ interface RawRequestedPeerChat { _: 'requestedPeerChat'; /** * Chat ID. */ chatId: number; /** * Chat title. */ title?: string; /** * Chat photo. */ photo?: tl.TypePhoto; } /** * Info about a * channel/supergroup, * shared by a user with the currently logged in bot using * {@link messages.RawSendBotRequestedPeerRequest}. * * All fields except the ID are optional, and will be populated * if present on the chosen channel/supergroup, according to * the parameters of the requesting * {@link RawInputKeyboardButtonRequestPeer}. */ interface RawRequestedPeerChannel { _: 'requestedPeerChannel'; /** * Channel/supergroup ID. */ channelId: number; /** * Channel/supergroup title. */ title?: string; /** * Channel/supergroup username. */ username?: string; /** * Channel/supergroup photo. */ photo?: tl.TypePhoto; } /** * A * report * option for a sponsored message ». */ interface RawSponsoredMessageReportOption { _: 'sponsoredMessageReportOption'; /** * Localized description of the option. */ text: string; /** * Option identifier to pass to * {@link messages.RawReportSponsoredMessageRequest}. */ option: Uint8Array; } /** * Receive notifications about reactions made only by our * contacts. */ interface RawReactionNotificationsFromContacts { _: 'reactionNotificationsFromContacts'; } /** * Receive notifications about reactions made by any user. */ interface RawReactionNotificationsFromAll { _: 'reactionNotificationsFromAll'; } /** * Reaction notification settings, see * here * » for more info. */ interface RawReactionsNotifySettings { _: 'reactionsNotifySettings'; /** * Message reaction notification settings, if not set * completely disables notifications/updates about message * reactions. */ messagesNotifyFrom?: tl.TypeReactionNotificationsFrom; /** * Story reaction notification settings, if not set completely * disables notifications/updates about reactions to stories. */ storiesNotifyFrom?: tl.TypeReactionNotificationsFrom; /** * Notification * sound for reactions » */ sound: tl.TypeNotificationSound; /** * If false, * push * notifications » about message/story reactions will only * be of type * REACT_HIDDEN/REACT_STORY_HIDDEN, * without any information about the reacted-to story or the * reaction itself. */ showPreviews: boolean; } /** * Represents a * message * effect ». * * All long IDs except for id are * {@link RawDocument}.ids from the containing * {@link messages.RawAvailableEffects} constructor. * * See here * » for more info on how to use following fields. */ interface RawAvailableEffect { _: 'availableEffect'; /** * Whether a * Premium * subscription is required to use this effect. */ premiumRequired?: boolean; /** * Unique effect ID. */ id: Long; /** * Emoji corresponding to the effect, to be used as icon for * the effect if static_icon_id is not set. */ emoticon: string; /** * ID of the document containing the static icon (WEBP) of the * effect. */ staticIconId?: Long; /** * Contains the preview * animation * (TGS format »), used for the effect selection menu. */ effectStickerId: Long; /** * If set, contains the actual animated effect * (TGS * format »). If not set, the animated effect must be set * equal to the * premium * animated sticker effect associated to the animated * sticker specified in effect_sticker_id (always * different from the preview animation, fetched thanks to the * {@link RawVideoSize} of type f as specified * here * »). */ effectAnimationId?: Long; } /** * Represents a * fact-check * » created by an independent fact-checker. */ interface RawFactCheck { _: 'factCheck'; /** * If set, the country/text fields * will not be set, and the fact check must be * fetched manually by the client (if it isn't already cached * with the key specified in hash) using bundled * {@link messages.RawGetFactCheckRequest} requests, when the * message with the factcheck scrolls into view. */ needCheck?: boolean; /** * A two-letter ISO 3166-1 alpha-2 country code of the country * for which the fact-check should be shown. */ country?: string; /** * The fact-check. */ text?: tl.TypeTextWithEntities; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Describes a * Telegram * Star transaction that cannot be described using the * current layer. */ interface RawStarsTransactionPeerUnsupported { _: 'starsTransactionPeerUnsupported'; } /** * Describes a * Telegram * Star transaction with the App Store, used when * purchasing Telegram Stars through the App Store. */ interface RawStarsTransactionPeerAppStore { _: 'starsTransactionPeerAppStore'; } /** * Describes a * Telegram * Star transaction with the Play Store, used when * purchasing Telegram Stars through the Play Store. */ interface RawStarsTransactionPeerPlayMarket { _: 'starsTransactionPeerPlayMarket'; } /** * Describes a * Telegram * Star transaction made using * @PremiumBot (i.e. * using the {@link RawInputInvoiceStars} flow described * here * »). */ interface RawStarsTransactionPeerPremiumBot { _: 'starsTransactionPeerPremiumBot'; } /** * Describes a * Telegram * Star transaction with * Fragment, used when * purchasing Telegram Stars through * Fragment. */ interface RawStarsTransactionPeerFragment { _: 'starsTransactionPeerFragment'; } /** * Describes a * Telegram * Star transaction with another peer. */ interface RawStarsTransactionPeer { _: 'starsTransactionPeer'; /** * The peer. */ peer: tl.TypePeer; } /** * Describes a * Telegram * Star transaction used to pay for * Telegram * ads as specified here ». */ interface RawStarsTransactionPeerAds { _: 'starsTransactionPeerAds'; } /** * Describes a * Telegram * Star transaction used to pay for paid API usage, such as * paid * bot broadcasts. */ interface RawStarsTransactionPeerAPI { _: 'starsTransactionPeerAPI'; } /** * Telegram * Stars topup option. */ interface RawStarsTopupOption { _: 'starsTopupOption'; /** * If set, the option must only be shown in the full list of * topup options. */ extended?: boolean; /** * Amount of Telegram stars. */ stars: Long; /** * Identifier of the store product associated with the option, * official apps only. */ storeProduct?: string; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Represents a * Telegram * Stars or TON transaction ». */ interface RawStarsTransaction { _: 'starsTransaction'; /** * Whether this transaction is a refund. */ refund?: boolean; /** * The transaction is currently pending. */ pending?: boolean; /** * This transaction has failed. */ failed?: boolean; /** * This transaction was a gift from the user in * peer.peer. */ gift?: boolean; /** * This transaction is a * paid * reaction ». */ reaction?: boolean; /** * This transaction pays for the upgrade of a gift to a * collectible * gift ». */ stargiftUpgrade?: boolean; /** * This transaction transfers stars from the balance of a user * account * connected * to a business bot, to the balance of the business bot, * see * here * » for more info. */ businessTransfer?: boolean; /** * This transaction is related to the * resale * of a collectible gift ». */ stargiftResale?: boolean; /** * Represents payment for a * paid * global post search ». */ postsSearch?: boolean; /** * Represents payment for a * separate * prepaid upgrade of a gift. */ stargiftPrepaidUpgrade?: boolean; stargiftDropOriginalDetails?: boolean; phonegroupMessage?: boolean; stargiftAuctionBid?: boolean; offer?: boolean; /** * Transaction ID. */ id: string; /** * Amount of Telegram Stars or TON. */ amount: tl.TypeStarsAmount; /** * Date of the transaction (unixtime). */ date: number; /** * Source of the incoming transaction, or its recipient for * outgoing transactions. */ peer: tl.TypeStarsTransactionPeer; /** * For transactions with bots, title of the bought product. */ title?: string; /** * For transactions with bots, description of the bought * product. */ description?: string; /** * For transactions with bots, photo of the bought product. */ photo?: tl.TypeWebDocument; /** * If neither pending nor failed are * set, the transaction was completed successfully, and this * field will contain the point in time (UNIX timestamp in * seconds) when the withdrawal was completed successfully. */ transactionDate?: number; /** * If neither pending nor failed are * set, the transaction was completed successfully, and this * field will contain a URL where the withdrawal transaction * can be viewed. */ transactionUrl?: string; /** * Bot specified invoice payload (i.e. the payload * passed to {@link RawInputMediaInvoice} when * creating * the invoice). */ botPayload?: Uint8Array; /** * For * paid * media transactions », message ID of the paid media * posted to peer.peer (can point to a deleted * message; either way, extended_media will always * contain the bought media). */ msgId?: number; /** * The purchased * paid * media ». */ extendedMedia?: tl.TypeMessageMedia[]; /** * The number of seconds between consecutive Telegram Star * debiting for * Telegram * Star subscriptions ». */ subscriptionPeriod?: number; /** * ID of the message containing the * {@link RawMessageMediaGiveaway}, for incoming * star * giveaway prizes. */ giveawayPostId?: number; /** * This transaction indicates a purchase or a sale (conversion * back to Stars) of a * gift * ». */ stargift?: tl.TypeStarGift; /** * This transaction is payment for * paid * bot broadcasts. * * Paid broadcasts are only allowed if the * allow_paid_floodskip parameter of * {@link messages.RawSendMessageRequest} and other message * sending methods is set while trying to broadcast more than * 30 messages per second to bot users. * * The integer value returned by this flag indicates the number * of billed API calls. */ floodskipNumber?: number; /** * This transaction is the receival (or refund) of an * affiliate * commission (i.e. this is the transaction received by the * peer that created the * referral * link, flag 17 is for transactions made by users that * imported the referral link). */ starrefCommissionPermille?: number; /** * For transactions made by * referred * users, the peer that received the affiliate commission. */ starrefPeer?: tl.TypePeer; /** * For transactions made by * referred * users, the amount of Telegram Stars received by the * affiliate, can be negative for refunds. */ starrefAmount?: tl.TypeStarsAmount; /** * This transaction is related to the reception or transmission * of a * paid * message ». */ paidMessages?: number; /** * This transaction indicates the payment for a * gifted * Telegram Premium subscription ». */ premiumGiftMonths?: number; /** * Indicates that this is payment for ad revenue from the * specified unixtime (always set together with * ads_proceeds_to_date). */ adsProceedsFromDate?: number; /** * Indicates that this is payment for ad revenue to the * specified unixtime. */ adsProceedsToDate?: number; } /** * A story found using * global * story search ». */ interface RawFoundStory { _: 'foundStory'; /** * The peer that posted the story. */ peer: tl.TypePeer; /** * The story. */ story: tl.TypeStoryItem; } /** * Address optionally associated to a {@link RawGeoPoint}. */ interface RawGeoPointAddress { _: 'geoPointAddress'; /** * Two-letter ISO 3166-1 alpha-2 country code */ countryIso2: string; /** * State */ state?: string; /** * City */ city?: string; /** * Street */ street?: string; } /** * Describes * Telegram * Star revenue balances ». */ interface RawStarsRevenueStatus { _: 'starsRevenueStatus'; /** * If set, the user may * withdraw * up to available_balance stars. */ withdrawalEnabled?: boolean; /** * Amount of not-yet-withdrawn Telegram Stars. */ currentBalance: tl.TypeStarsAmount; /** * Amount of withdrawable Telegram Stars. */ availableBalance: tl.TypeStarsAmount; /** * Total amount of earned Telegram Stars. */ overallRevenue: tl.TypeStarsAmount; /** * Unixtime indicating when will withdrawal be available to the * user. If not set, withdrawal can be started now. */ nextWithdrawalAt?: number; } /** * Used to fetch info about a * Telegram * Star transaction ». */ interface RawInputStarsTransaction { _: 'inputStarsTransaction'; /** * If set, fetches info about the refund transaction for this * transaction. */ refund?: boolean; /** * Transaction ID. */ id: string; } /** * Telegram * Stars gift option. */ interface RawStarsGiftOption { _: 'starsGiftOption'; /** * If set, the option must only be shown in the full list of * topup options. */ extended?: boolean; /** * Amount of Telegram stars. */ stars: Long; /** * Identifier of the store product associated with the option, * official apps only. */ storeProduct?: string; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; } /** * Represents a * Main * Mini App preview media, see here » for more info. */ interface RawBotPreviewMedia { _: 'botPreviewMedia'; /** * When was this media last updated. */ date: number; /** * The actual photo/video. */ media: tl.TypeMessageMedia; } /** * Pricing of a * Telegram * Star subscription ». */ interface RawStarsSubscriptionPricing { _: 'starsSubscriptionPricing'; /** * The user should pay amount stars every * period seconds to gain and maintain access to * the channel. * * Currently the only allowed subscription period is * 30*24*60*60, i.e. the user will be debited * amount stars every month. */ period: number; /** * Price of the subscription in Telegram Stars. */ amount: Long; } /** * Represents a * Telegram * Star subscription ». */ interface RawStarsSubscription { _: 'starsSubscription'; /** * Whether this subscription was cancelled. */ canceled?: boolean; /** * Whether we left the associated private channel, but we can * still rejoin it using * {@link payments.RawFulfillStarsSubscriptionRequest} because * the current subscription period hasn't expired yet. */ canRefulfill?: boolean; /** * Whether this subscription has expired because there are not * enough stars on the user's balance to extend it. */ missingBalance?: boolean; /** * Set if this * bot * subscription was cancelled by the bot */ botCanceled?: boolean; /** * Subscription ID. */ id: string; /** * Identifier of the associated private chat. */ peer: tl.TypePeer; /** * Expiration date of the current subscription period. */ untilDate: number; /** * Pricing of the subscription in Telegram Stars. */ pricing: tl.TypeStarsSubscriptionPricing; /** * Invitation link, used to renew the subscription after * cancellation or expiration. */ chatInviteHash?: string; /** * For bot subscriptions, the title of the subscription invoice */ title?: string; /** * For bot subscriptions, the photo from the subscription * invoice */ photo?: tl.TypeWebDocument; /** * For bot subscriptions, the * identifier * of the subscription invoice */ invoiceSlug?: string; } /** * Info about a user in the * paid * Star reactions leaderboard for a message. */ interface RawMessageReactor { _: 'messageReactor'; /** * If set, the reactor is one of the most active reactors; may * be unset if the reactor is the current user. */ top?: boolean; /** * If set, this reactor is the current user. */ my?: boolean; /** * If set, the reactor is anonymous. */ anonymous?: boolean; /** * Identifier of the peer that reacted: may be unset for * anonymous reactors different from the current user (i.e. if * the current user sent an anonymous reaction * anonymous will be set but this field will also * be set). */ peerId?: tl.TypePeer; /** * The number of sent Telegram Stars. */ count: number; } /** * Contains info about a * Telegram * Star giveaway option. */ interface RawStarsGiveawayOption { _: 'starsGiveawayOption'; /** * If set, this option must only be shown in the full list of * giveaway options (i.e. they must be added to the list only * when the user clicks on the expand button). */ extended?: boolean; /** * If set, this option must be pre-selected by default in the * option list. */ default?: boolean; /** * The number of Telegram Stars that will be distributed among * winners */ stars: Long; /** * Number of times the chat will be boosted for one year if the * {@link RawInputStorePaymentStarsGiveaway}.boost_peer * flag is populated */ yearlyBoosts: number; /** * Identifier of the store product associated with the option, * official apps only. */ storeProduct?: string; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Allowed options for the number of giveaway winners. */ winners: tl.TypeStarsGiveawayWinnersOption[]; } /** * Allowed options for the number of giveaway winners. */ interface RawStarsGiveawayWinnersOption { _: 'starsGiveawayWinnersOption'; /** * If set, this option must be pre-selected by default in the * option list. */ default?: boolean; /** * The number of users that will be randomly chosen as winners. */ users: number; /** * The number of * Telegram * Stars each winner will receive. */ perUserStars: Long; } /** * Represents a * star gift, * see here » for more info. */ interface RawStarGift { _: 'starGift'; /** * Whether this is a limited-supply gift. */ limited?: boolean; /** * Whether this gift sold out and cannot be bought anymore. */ soldOut?: boolean; /** * Whether this is a birthday-themed gift */ birthday?: boolean; /** * This gift can only be bought by users with a * Premium * subscription. */ requirePremium?: boolean; /** * If set, the maximum number of gifts of this type that can be * owned by a single user is limited and specified in * per_user_total, and the remaining slots for the * current user in per_user_remains. */ limitedPerUser?: boolean; peerColorAvailable?: boolean; auction?: boolean; /** * Identifier of the gift */ id: Long; /** * Sticker * that represents the gift. */ sticker: tl.TypeDocument; /** * Price of the gift in * Telegram * Stars. */ stars: Long; /** * For limited-supply gifts: the remaining number of gifts that * may be bought. */ availabilityRemains?: number; /** * For limited-supply gifts: the total number of gifts that was * available in the initial supply. */ availabilityTotal?: number; /** * The total number of (upgraded to * collectibles) * gifts of this type currently on * resale */ availabilityResale?: Long; /** * The receiver of this gift may convert it to this many * Telegram Stars, instead of displaying it on their profile * page. * * convert_stars will be equal to * stars only if the gift was bought using * recently bought Telegram Stars, otherwise it will be less * than stars. */ convertStars: Long; /** * For sold out gifts only: when was the gift first bought. */ firstSaleDate?: number; /** * For sold out gifts only: when was the gift last bought. */ lastSaleDate?: number; /** * The number of Telegram Stars the user can pay to * convert * the gift into a collectible gift ». */ upgradeStars?: Long; /** * The minimum price in * Stars * for gifts of this type currently on * resale. */ resellMinStars?: Long; /** * Title of the gift */ title?: string; /** * This gift was released by the specified peer. */ releasedBy?: tl.TypePeer; /** * Maximum number of gifts of this type that can be owned by * any user. */ perUserTotal?: number; /** * Remaining number of gifts of this type that can be owned by * the current user. */ perUserRemains?: number; /** * If set, the specified gift possibly cannot be sent * until the specified date, see * here » * for the full flow. */ lockedUntilDate?: number; auctionSlug?: string; giftsPerRound?: number; auctionStartDate?: number; upgradeVariants?: number; background?: tl.TypeStarGiftBackground; } /** * Represents a * collectible * star gift, see here » for more info. * * The sticker that represents the gift is contained in a * {@link RawStarGiftAttributeModel} object in * attributes. */ interface RawStarGiftUnique { _: 'starGiftUnique'; /** * This gift can only be bought by users with a * Premium * subscription. */ requirePremium?: boolean; /** * Whether the gift can be bought only using Toncoins. */ resaleTonOnly?: boolean; /** * A chat theme associated to this gift is available, * see * here » for more info on how to use it. */ themeAvailable?: boolean; burned?: boolean; crafted?: boolean; /** * Identifier of the collectible gift. */ id: Long; /** * Unique ID of the gift. */ giftId: Long; /** * Collectible title. */ title: string; /** * Slug that can be used to create a * collectible * gift deep link », or * elsewhere * in the API where a collectible slug is accepted. */ slug: string; /** * Unique identifier of this collectible gift among all * (already upgraded) collectible gifts of the same type. */ num: number; /** * The owner of the gift. */ ownerId?: tl.TypePeer; /** * The name of the owner if neither owner_id nor * owner_address are set. */ ownerName?: string; /** * For * NFTs * on the TON blockchain, contains the address of the owner * (append it to the * ton_blockchain_explorer_url * client configuration value » to obtain a link with * information about the address). */ ownerAddress?: string; /** * Collectible attributes */ attributes: tl.TypeStarGiftAttribute[]; /** * Total number of gifts of the same type that were upgraded to * a collectible gift. */ availabilityIssued: number; /** * Total number of gifts of the same type that can be upgraded * or were already upgraded to a collectible gift. */ availabilityTotal: number; /** * For * NFTs * on the TON blockchain, contains the address of the NFT * (append it to the * ton_blockchain_explorer_url * client configuration value » to obtain a link with * information about the address). */ giftAddress?: string; /** * Resale price of the gift. */ resellAmount?: tl.TypeStarsAmount[]; /** * This gift was released by the specified peer. */ releasedBy?: tl.TypePeer; /** * Price of the gift. */ valueAmount?: Long; /** * Currency for the gift's price. */ valueCurrency?: string; valueUsdAmount?: Long; /** * The current chat where the associated * chat * theme is installed, if any (gift-based themes can only * be installed in one chat at a time). */ themePeer?: tl.TypePeer; peerColor?: tl.TypePeerColor; hostId?: tl.TypePeer; offerMinStars?: number; craftChancePermille?: number; } /** * Report menu option */ interface RawMessageReportOption { _: 'messageReportOption'; /** * Option title */ text: string; /** * Option identifier: if the user selects this option, * re-invoke {@link messages.RawReportRequest}, passing this * option to option */ option: Uint8Array; } /** * The user must choose one of the following options, and then * {@link messages.RawReportRequest} must be re-invoked, * passing the option's option identifier to * {@link messages.RawReportRequest}.option. */ interface RawReportResultChooseOption { _: 'reportResultChooseOption'; /** * Title of the option popup */ title: string; /** * Available options, rendered as menu entries. */ options: tl.TypeMessageReportOption[]; } /** * The user should enter an additional comment for the * moderators, and then {@link messages.RawReportRequest} must * be re-invoked, passing the comment to * {@link messages.RawReportRequest}.message. */ interface RawReportResultAddComment { _: 'reportResultAddComment'; /** * Whether this step can be skipped by the user, passing an * empty message to * {@link messages.RawReportRequest}, or if a non-empty * message is mandatory. */ optional?: boolean; /** * The {@link messages.RawReportRequest} method must be * re-invoked, passing this option to option */ option: Uint8Array; } /** * The report was sent successfully, no further actions are * required. */ interface RawReportResultReported { _: 'reportResultReported'; } /** * Mini * app » settings */ interface RawBotAppSettings { _: 'botAppSettings'; /** * SVG placeholder logo, compressed using the same format used * for * vector * thumbnails ». */ placeholderPath?: Uint8Array; /** * Default light mode background color */ backgroundColor?: number; /** * Default dark mode background color */ backgroundDarkColor?: number; /** * Default light mode header color */ headerColor?: number; /** * Default dark mode header color */ headerDarkColor?: number; } /** * Indo about an * affiliate * program offered by a bot */ interface RawStarRefProgram { _: 'starRefProgram'; /** * ID of the bot that offers the program */ botId: number; /** * An affiliate gets a commission of * {@link RawStarRefProgram}.commission_permille‰ * Telegram * Stars for every mini app transaction made by users they * refer */ commissionPermille: number; /** * An affiliate gets a commission for every mini app * transaction made by users they refer, for * duration_months months after a referral link is * imported, starting the bot for the first time */ durationMonths?: number; /** * Point in time (UNIX timestamp in seconds) when the affiliate * program will be closed (optional, if not set the affiliate * program isn't scheduled to be closed) */ endDate?: number; /** * The amount of daily revenue per user in Telegram Stars of * the bot that created the affiliate program. * * To obtain the approximated revenue per referred user, * multiply this value by commission_permille and * divide by 1000. */ dailyRevenuePerUser?: tl.TypeStarsAmount; } /** * Info about an * active * affiliate program we have with a Mini App */ interface RawConnectedBotStarRef { _: 'connectedBotStarRef'; /** * If set, this affiliation was revoked by the affiliate using * {@link payments.RawEditConnectedStarRefBotRequest}, or by * the affiliation program owner using * {@link bots.RawUpdateStarRefProgramRequest} */ revoked?: boolean; /** * Referral * link to be shared */ url: string; /** * When did we affiliate with bot_id */ date: number; /** * ID of the mini app that created the affiliate program */ botId: number; /** * The number of Telegram Stars received by the affiliate for * each 1000 Telegram Stars received by bot_id */ commissionPermille: number; /** * Number of months the program will be active; if not set, * there is no expiration date. */ durationMonths?: number; /** * The number of users that used the affiliate program */ participants: Long; /** * The number of Telegram Stars that were earned by the * affiliate program */ revenue: Long; } /** * Describes a real (i.e. possibly decimal) amount of * Telegram * Stars. */ interface RawStarsAmount { _: 'starsAmount'; /** * The integer amount of Telegram Stars. */ amount: Long; /** * The decimal amount of Telegram Stars, expressed as nanostars * (i.e. 1 nanostar is equal to 1/1'000'000'000th * (one billionth) of a Telegram Star). * * This field may also be negative (the allowed range is * -999999999 to 999999999). */ nanos: number; } /** * Describes an amount of toncoin in nanotons (i.e. * 1/1_000_000_000 of a toncoin). */ interface RawStarsTonAmount { _: 'starsTonAmount'; /** * The amount in nanotons. */ amount: Long; } /** * Info about the current * verifier * bot ». */ interface RawBotVerifierSettings { _: 'botVerifierSettings'; /** * Indicates whether the bot is allowed to set a custom * description field for individual verified peers, different * from the custom_description provided here. */ canModifyCustomDescription?: boolean; /** * Verification icon */ icon: Long; /** * The name of the organization that provides the verification */ company: string; /** * An optional default description for the verification */ customDescription?: string; } /** * Describes a * bot * verification icon ». */ interface RawBotVerification { _: 'botVerification'; /** * ID of the bot that verified this peer */ botId: number; /** * Verification icon */ icon: Long; /** * Verification description */ description: string; } /** * The model of a * collectible * gift ». */ interface RawStarGiftAttributeModel { _: 'starGiftAttributeModel'; crafted?: boolean; /** * Name of the model */ name: string; /** * The * sticker * representing the upgraded gift */ document: tl.TypeDocument; rarity: tl.TypeStarGiftAttributeRarity; } /** * A * sticker * applied on the backdrop of a * collectible * gift » using a repeating pattern. */ interface RawStarGiftAttributePattern { _: 'starGiftAttributePattern'; /** * Name of the symbol */ name: string; /** * The symbol */ document: tl.TypeDocument; rarity: tl.TypeStarGiftAttributeRarity; } /** * The backdrop of a * collectible * gift ». */ interface RawStarGiftAttributeBackdrop { _: 'starGiftAttributeBackdrop'; /** * Name of the backdrop */ name: string; /** * Unique ID of the backdrop */ backdropId: number; /** * Color of the center of the backdrop in RGB24 format. */ centerColor: number; /** * Color of the edges of the backdrop in RGB24 format. */ edgeColor: number; /** * Color of the {@link RawStarGiftAttributePattern} applied on * the backdrop in RGB24 format. */ patternColor: number; /** * Color of the text on the backdrop in RGB24 format. */ textColor: number; rarity: tl.TypeStarGiftAttributeRarity; } /** * Info about the sender, receiver and message attached to the * original * gift * », before it was upgraded to a * collectible * gift ». */ interface RawStarGiftAttributeOriginalDetails { _: 'starGiftAttributeOriginalDetails'; /** * Original sender of the gift, absent if the gift was private. */ senderId?: tl.TypePeer; /** * Original receiver of the gift. */ recipientId: tl.TypePeer; /** * When was the gift sent. */ date: number; /** * Original message attached to the gift, if present. */ message?: tl.TypeTextWithEntities; } /** * Represents a * gift * owned by a peer. */ interface RawSavedStarGift { _: 'savedStarGift'; /** * If set, the gift sender in from_id and the * message are set only for the receiver of the * gift. */ nameHidden?: boolean; /** * If set, the gift is not pinned on the * user's profile. */ unsaved?: boolean; /** * This gift was upgraded to a * collectible * gift » and then re-downgraded to a regular gift because * a request to refund the payment related to the upgrade was * made, and the money was returned. */ refunded?: boolean; /** * Only set for non-collectible gifts, if they can be upgraded * to a * collectible * gift ». */ canUpgrade?: boolean; /** * Whether this gift is pinned on top of the user's profile * page. */ pinnedToTop?: boolean; /** * If set, someone already * separately * pre-paid for the upgrade of this gift. */ upgradeSeparate?: boolean; /** * Sender of the gift (unset for anonymous gifts). */ fromId?: tl.TypePeer; /** * Reception date of the gift. */ date: number; /** * The collectible gift. */ gift: tl.TypeStarGift; /** * Message attached to the gift. */ message?: tl.TypeTextWithEntities; /** * For gifts received by users, ID to use in * {@link RawInputSavedStarGiftUser} constructors. */ msgId?: number; /** * For gifts received by channels, ID to use in * {@link RawInputSavedStarGiftChat} constructors. */ savedId?: Long; /** * For non-collectible gifts, the receiver of this gift may * convert it to this many Telegram Stars, instead of * displaying it on their profile page. */ convertStars?: Long; /** * Only for pre-paid * non-collectible gifts, the number of Telegram Stars the * sender has already paid to * convert * the gift into a collectible gift » (this is different * from the meaning of the flag in * {@link RawMessageActionStarGift}, where it signals the * upgrade price for not yet upgraded gifts). */ upgradeStars?: Long; /** * If set, indicates that the current gift can't be * exported * to the TON blockchain » yet: the owner will be able to * export it at the specified unixtime. */ canExportAt?: number; /** * If set, indicates that the gift can be * transferred * » to another user by paying the specified amount of * stars. */ transferStars?: Long; /** * If set, indicates that the current gift can't be * transferred * » yet: the owner will be able to transfer it at the * specified unixtime. */ canTransferAt?: number; /** * If set, indicates that the current gift can't be * resold * » yet: the owner will be able to put it up for sale at * the specified unixtime. */ canResellAt?: number; /** * IDs of the * collections * » that this gift is a part of. */ collectionId?: number[]; /** * Hash * to prepay for a gift upgrade separately ». */ prepaidUpgradeHash?: string; dropOriginalDetailsStars?: Long; giftNum?: number; canCraftAt?: number; } /** * A gift received in a private chat with another user. */ interface RawInputSavedStarGiftUser { _: 'inputSavedStarGiftUser'; /** * ID of the {@link RawMessageService} with the * {@link RawMessageActionStarGift} with the gift. */ msgId: number; } /** * A gift received by a channel we own. */ interface RawInputSavedStarGiftChat { _: 'inputSavedStarGiftChat'; /** * The channel. */ peer: tl.TypeInputPeer; /** * ID of the gift, must be the saved_id of a * {@link RawMessageActionStarGift}/{@linkƒRawMessageActionStarGiftUnique} * constructor. */ savedId: Long; } /** * Points to a * collectible * gift obtained from a collectible gift link ». */ interface RawInputSavedStarGiftSlug { _: 'inputSavedStarGiftSlug'; /** * Slug from the link. */ slug: string; } /** * Uses the default reaction privacy, set using * {@link messages.RawTogglePaidReactionPrivacyRequest}. */ interface RawPaidReactionPrivacyDefault { _: 'paidReactionPrivacyDefault'; } /** * Send paid reactions anonymously. */ interface RawPaidReactionPrivacyAnonymous { _: 'paidReactionPrivacyAnonymous'; } /** * Send paid reactions as the specified peer, fetched using * {@link channels.RawGetSendAsRequest}. */ interface RawPaidReactionPrivacyPeer { _: 'paidReactionPrivacyPeer'; /** * The peer to send reactions as. */ peer: tl.TypeInputPeer; } /** * This user can be freely contacted. */ interface RawRequirementToContactEmpty { _: 'requirementToContactEmpty'; } /** * This user requires us to buy a * Premium * subscription in order to contact them. */ interface RawRequirementToContactPremium { _: 'requirementToContactPremium'; } /** * This user requires us to pay the specified amount of * Telegram * Stars to send them a message, see * here * » for the full flow. */ interface RawRequirementToContactPaidMessages { _: 'requirementToContactPaidMessages'; /** * The required amount of * Telegram * Stars. */ starsAmount: Long; } /** * Business * bot rights. */ interface RawBusinessBotRights { _: 'businessBotRights'; /** * Whether the bot can send and edit messages in private chats * that had incoming messages in the last 24 hours. */ reply?: boolean; /** * Whether the bot can mark incoming private messages as read. */ readMessages?: boolean; /** * Whether the bot can delete messages sent by the bot. */ deleteSentMessages?: boolean; /** * Whether the bot can delete received private messages in * managed chats. */ deleteReceivedMessages?: boolean; /** * Whether the bot can edit the first and last name of the * business account. */ editName?: boolean; /** * Whether the bot can edit the bio of the business account. */ editBio?: boolean; /** * Whether the bot can edit the profile photo of the business * account. */ editProfilePhoto?: boolean; /** * Whether the bot can edit the username of the business * account. */ editUsername?: boolean; /** * Whether the bot can view gifts and the amount of Telegram * Stars owned by the business account. */ viewGifts?: boolean; /** * Whether the bot can convert regular gifts owned by the * business account to Telegram Stars. */ sellGifts?: boolean; /** * Whether the bot can change the privacy settings pertaining * to gifts for the business account. */ changeGiftSettings?: boolean; /** * Whether the bot can transfer and upgrade gifts owned by the * business account. */ transferAndUpgradeGifts?: boolean; /** * Whether the bot can transfer Telegram Stars received by the * business account to its own account, or use them to upgrade * and transfer gifts. */ transferStars?: boolean; /** * Whether the bot can post, edit and delete stories on behalf * of the business account. */ manageStories?: boolean; } /** * Disallow the reception of specific * gift * types. */ interface RawDisallowedGiftsSettings { _: 'disallowedGiftsSettings'; /** * Disallow the reception of gifts with an unlimited supply * (those with the {@link RawStarGift}.limited * flag not set). */ disallowUnlimitedStargifts?: boolean; /** * Disallow the reception of limited-supply gifts (those with * the {@link RawStarGift}.limited flag set). */ disallowLimitedStargifts?: boolean; /** * Disallow the reception of * collectible * gifts ». */ disallowUniqueStargifts?: boolean; /** * Disallow the reception of * gifted * Telegram Premium subscriptions ». */ disallowPremiumGifts?: boolean; disallowStargiftsFromChannels?: boolean; } /** * A sponsored peer. */ interface RawSponsoredPeer { _: 'sponsoredPeer'; /** * ID of the sponsored peer, to be passed to * {@link messages.RawViewSponsoredMessageRequest}, * {@link messages.RawClickSponsoredMessageRequest} or * {@link messages.RawReportSponsoredMessageRequest} (the same * methods used for * sponsored * messages &raquo). */ randomId: Uint8Array; /** * The sponsored peer. */ peer: tl.TypePeer; /** * If set, contains additional information about the sponsor to * be shown along with the peer. */ sponsorInfo?: string; /** * If set, contains additional information about the sponsored * message to be shown along with the peer. */ additionalInfo?: string; } /** * The ID of a model of a * collectible * gift ». */ interface RawStarGiftAttributeIdModel { _: 'starGiftAttributeIdModel'; /** * The * sticker * representing the upgraded gift */ documentId: Long; } /** * The ID of a pattern of a * collectible * gift ». */ interface RawStarGiftAttributeIdPattern { _: 'starGiftAttributeIdPattern'; /** * The * sticker * representing the symbol */ documentId: Long; } /** * The ID of a backdrop of a * collectible * gift ». */ interface RawStarGiftAttributeIdBackdrop { _: 'starGiftAttributeIdBackdrop'; /** * Unique ID of the backdrop. */ backdropId: number; } /** * Indicates the total number of gifts that have the specified * attribute. */ interface RawStarGiftAttributeCounter { _: 'starGiftAttributeCounter'; /** * The attribute (just the ID, without the attribute itself). */ attribute: tl.TypeStarGiftAttributeId; /** * Total number of gifts with this attribute. */ count: number; } /** * Represents a * custom * pending suggestion ». */ interface RawPendingSuggestion { _: 'pendingSuggestion'; /** * The suggestion ID, can be passed to * {@link help.RawDismissSuggestionRequest}. */ suggestion: string; /** * Title of the suggestion. */ title: tl.TypeTextWithEntities; /** * Body of the suggestion. */ description: tl.TypeTextWithEntities; /** * URL to open when the user clicks on the suggestion. */ url: string; } /** * An item of a * todo list * ». */ interface RawTodoItem { _: 'todoItem'; /** * ID of the item, a positive (non-zero) integer unique within * the current list. */ id: number; /** * Text of the item, maximum length equal to * todo_item_length_max * ». */ title: tl.TypeTextWithEntities; } /** * Represents a * todo list * ». */ interface RawTodoList { _: 'todoList'; /** * If set, users different from the creator of the list can * append items to the list. */ othersCanAppend?: boolean; /** * If set, users different from the creator of the list can * complete items in the list. */ othersCanComplete?: boolean; /** * Title of the todo list, maximum length equal to * todo_title_length_max * ». */ title: tl.TypeTextWithEntities; /** * Items of the list. */ list: tl.TypeTodoItem[]; } /** * A completed * todo list * » item. */ interface RawTodoCompletion { _: 'todoCompletion'; /** * The ID of the completed item. */ id: number; /** * ID of the user that completed the item. */ completedBy: tl.TypePeer; /** * When was the item completed. */ date: number; } /** * Contains info about a * suggested * post ». */ interface RawSuggestedPost { _: 'suggestedPost'; /** * Whether the suggested post was accepted. */ accepted?: boolean; /** * Whether the suggested post was rejected. */ rejected?: boolean; /** * Price of the suggested post. */ price?: tl.TypeStarsAmount; /** * Scheduling date. */ scheduleDate?: number; } /** * Represents the profile's * star * rating, see here » for more info. */ interface RawStarsRating { _: 'starsRating'; /** * The current level, may be negative. */ level: number; /** * The numerical value of the rating required for the current * level. */ currentLevelStars: Long; /** * Numerical value of the current rating. */ stars: Long; /** * The numerical value of the rating required for the next * level. */ nextLevelStars?: Long; } /** * Represents a * star * gift collection ». */ interface RawStarGiftCollection { _: 'starGiftCollection'; /** * The ID of the collection. */ collectionId: number; /** * Title of the collection. */ title: string; /** * Optional icon for the collection, taken from the first gift * in the collection. */ icon?: tl.TypeDocument; /** * Number of gifts in the collection. */ giftsCount: number; /** * Field to use instead of * collection_id when generating the hash * to pass to * {@link payments.RawGetStarGiftCollectionsRequest}. */ hash: Long; } /** * Represents a * story * album ». */ interface RawStoryAlbum { _: 'storyAlbum'; /** * ID of the album. */ albumId: number; /** * Name of the album. */ title: string; /** * Photo from the first story of the album, if it's a photo. */ iconPhoto?: tl.TypePhoto; /** * Video from the first story of the album, if it's a video. */ iconVideo?: tl.TypeDocument; } /** * Indicates if the specified * global * post search » requires payment. */ interface RawSearchPostsFlood { _: 'searchPostsFlood'; /** * The specified query is free (and it will not use up * free search slots). */ queryIsFree?: boolean; /** * Total number of daily free search slots. */ totalDaily: number; /** * Remaining number of free search slots. */ remains: number; /** * If there are no more search slots, specifies the unixtime * when more search slots will be available. */ waitTill?: number; /** * The number of * Telegram * Stars to pay for each non-free search. */ starsAmount: Long; } /** * Represents the * stories * tab of a profile page. */ interface RawProfileTabPosts { _: 'profileTabPosts'; } /** * Represents the * gifts * tab of a profile page. */ interface RawProfileTabGifts { _: 'profileTabGifts'; } /** * Represents the media tab of a profile page. */ interface RawProfileTabMedia { _: 'profileTabMedia'; } /** * Represents the shared files tab of a profile. */ interface RawProfileTabFiles { _: 'profileTabFiles'; } /** * Represents the * music * tab of a profile page. */ interface RawProfileTabMusic { _: 'profileTabMusic'; } /** * Represents the voice messages tab of a profile page. */ interface RawProfileTabVoice { _: 'profileTabVoice'; } /** * Represents the shared links tab of a profile page. */ interface RawProfileTabLinks { _: 'profileTabLinks'; } /** * Represents the gifs tab of a profile page. */ interface RawProfileTabGifs { _: 'profileTabGifs'; } /** * Remove any currently configured theme. */ interface RawInputChatThemeEmpty { _: 'inputChatThemeEmpty'; } /** * Set an emoji-based chat theme, returned by * {@link account.RawGetChatThemesRequest}. */ interface RawInputChatTheme { _: 'inputChatTheme'; /** * The emoji. */ emoticon: string; } /** * Set a theme based on an owned * collectible * gift », returned by * {@link account.RawGetUniqueGiftChatThemesRequest}. */ interface RawInputChatThemeUniqueGift { _: 'inputChatThemeUniqueGift'; /** * The slug from {@link RawStarGiftUnique}.slug. */ slug: string; } interface RawStarGiftUpgradePrice { _: 'starGiftUpgradePrice'; date: number; upgradeStars: Long; } interface RawGroupCallMessage { _: 'groupCallMessage'; fromAdmin?: boolean; id: number; fromId: tl.TypePeer; date: number; message: tl.TypeTextWithEntities; paidMessageStars?: Long; } interface RawGroupCallDonor { _: 'groupCallDonor'; top?: boolean; my?: boolean; peerId?: tl.TypePeer; stars: Long; } interface RawRecentStory { _: 'recentStory'; live?: boolean; maxId?: number; } interface RawAuctionBidLevel { _: 'auctionBidLevel'; pos: number; amount: Long; date: number; } interface RawStarGiftAuctionStateNotModified { _: 'starGiftAuctionStateNotModified'; } interface RawStarGiftAuctionState { _: 'starGiftAuctionState'; version: number; startDate: number; endDate: number; minBidAmount: Long; bidLevels: tl.TypeAuctionBidLevel[]; topBidders: Long[]; nextRoundAt: number; lastGiftNum: number; giftsLeft: number; currentRound: number; totalRounds: number; rounds: tl.TypeStarGiftAuctionRound[]; } interface RawStarGiftAuctionStateFinished { _: 'starGiftAuctionStateFinished'; startDate: number; endDate: number; averagePrice: Long; listedCount?: number; fragmentListedCount?: number; fragmentListedUrl?: string; } interface RawStarGiftAuctionUserState { _: 'starGiftAuctionUserState'; returned?: boolean; bidAmount?: Long; bidDate?: number; minBidAmount?: Long; bidPeer?: tl.TypePeer; acquiredCount: number; } interface RawStarGiftAuctionAcquiredGift { _: 'starGiftAuctionAcquiredGift'; nameHidden?: boolean; peer: tl.TypePeer; date: number; bidAmount: Long; round: number; pos: number; message?: tl.TypeTextWithEntities; giftNum?: number; } interface RawStarGiftActiveAuctionState { _: 'starGiftActiveAuctionState'; gift: tl.TypeStarGift; state: tl.TypeStarGiftAuctionState; userState: tl.TypeStarGiftAuctionUserState; } interface RawInputStarGiftAuction { _: 'inputStarGiftAuction'; giftId: Long; } interface RawInputStarGiftAuctionSlug { _: 'inputStarGiftAuctionSlug'; slug: string; } interface RawPasskey { _: 'passkey'; id: string; name: string; date: number; softwareEmojiId?: Long; lastUsageDate?: number; } interface RawInputPasskeyResponseRegister { _: 'inputPasskeyResponseRegister'; clientData: tl.TypeDataJSON; attestationData: Uint8Array; } interface RawInputPasskeyResponseLogin { _: 'inputPasskeyResponseLogin'; clientData: tl.TypeDataJSON; authenticatorData: Uint8Array; signature: Uint8Array; userHandle: string; } interface RawInputPasskeyCredentialPublicKey { _: 'inputPasskeyCredentialPublicKey'; id: string; rawId: string; response: tl.TypeInputPasskeyResponse; } interface RawInputPasskeyCredentialFirebasePNV { _: 'inputPasskeyCredentialFirebasePNV'; pnvToken: string; } interface RawStarGiftBackground { _: 'starGiftBackground'; centerColor: number; edgeColor: number; textColor: number; } interface RawStarGiftAuctionRound { _: 'starGiftAuctionRound'; num: number; duration: number; } interface RawStarGiftAuctionRoundExtendable { _: 'starGiftAuctionRoundExtendable'; num: number; duration: number; extendTop: number; extendWindow: number; } interface RawStarGiftAttributeRarity { _: 'starGiftAttributeRarity'; permille: number; } interface RawStarGiftAttributeRarityUncommon { _: 'starGiftAttributeRarityUncommon'; } interface RawStarGiftAttributeRarityRare { _: 'starGiftAttributeRarityRare'; } interface RawStarGiftAttributeRarityEpic { _: 'starGiftAttributeRarityEpic'; } interface RawStarGiftAttributeRarityLegendary { _: 'starGiftAttributeRarityLegendary'; } interface RawKeyboardButtonStyle { _: 'keyboardButtonStyle'; bgPrimary?: boolean; bgDanger?: boolean; bgSuccess?: boolean; icon?: Long; } /** * A * forum * topic » was pinned or unpinned. */ interface RawUpdateChannelPinnedTopic { _: 'updateChannelPinnedTopic'; /** * Whether the topic was pinned or unpinned */ pinned?: boolean; /** * The forum ID */ channelId: number; /** * The topic ID */ topicId: number; } /** * The * pinned * topics of a forum have changed. */ interface RawUpdateChannelPinnedTopics { _: 'updateChannelPinnedTopics'; /** * Forum ID. */ channelId: number; /** * Ordered list containing the IDs of all pinned topics. */ order?: number[]; } /** * Invokes a query after successful completion of one of the * previous queries. */ interface RawInvokeAfterMsgRequest { _: 'invokeAfterMsg'; /** * Message identifier on which a current query depends */ msgId: Long; /** * The query itself */ query: X; } /** * Invokes a query after a successful completion of previous * queries */ interface RawInvokeAfterMsgsRequest { _: 'invokeAfterMsgs'; /** * List of messages on which a current query depends */ msgIds: Long[]; /** * The query itself */ query: X; } /** * Initialize connection */ interface RawInitConnectionRequest { _: 'initConnection'; /** * Application identifier (see. * App * configuration) */ apiId: number; /** * Device model */ deviceModel: string; /** * Operation system version */ systemVersion: string; /** * Application version */ appVersion: string; /** * Code for the language used on the device's OS, ISO 639-1 * standard */ systemLangCode: string; /** * Platform identifier (i.e. android, * tdesktop, etc). */ langPack: string; /** * Either an ISO 639-1 language code or a language pack name * obtained from a * language * pack link. */ langCode: string; /** * Info about an MTProto proxy */ proxy?: tl.TypeInputClientProxy; /** * Additional initConnection parameters. * * For now, only the tz_offset field is supported, * for specifying the timezone offset in seconds. */ params?: tl.TypeJSONValue; /** * The query itself */ query: X; } /** * Invoke the specified query using the specified API * layer */ interface RawInvokeWithLayerRequest { _: 'invokeWithLayer'; /** * The layer to use */ layer: number; /** * The query */ query: X; } /** * Invoke a request without subscribing the used connection for * updates * (this is enabled by default for * file * queries). */ interface RawInvokeWithoutUpdatesRequest { _: 'invokeWithoutUpdates'; /** * The query */ query: X; } /** * Invoke with the given message range */ interface RawInvokeWithMessagesRangeRequest { _: 'invokeWithMessagesRange'; /** * Message range */ range: tl.TypeMessageRange; /** * Query */ query: X; } /** * Invoke a method within a * takeout * session, see here » for more info. */ interface RawInvokeWithTakeoutRequest { _: 'invokeWithTakeout'; /** * Takeout * session ID » */ takeoutId: Long; /** * Query */ query: X; } /** * Invoke a method using a * Telegram * Business Bot connection, see here » for more info, including * a list of the methods that can be wrapped in this * constructor. * * Make sure to always send queries wrapped in a * invokeWithBusinessConnection to the datacenter * ID, specified in the dc_id field of the * {@link RawBotBusinessConnection} that is being used. */ interface RawInvokeWithBusinessConnectionRequest { _: 'invokeWithBusinessConnection'; /** * Business connection ID. */ connectionId: string; /** * The actual query. */ query: X; } /** * Official clients only, invoke with Google Play Integrity * token. */ interface RawInvokeWithGooglePlayIntegrityRequest { _: 'invokeWithGooglePlayIntegrity'; /** * Nonce. */ nonce: string; /** * Token. */ token: string; /** * Query. */ query: X; } /** * Official clients only, invoke with Apple push verification. */ interface RawInvokeWithApnsSecretRequest { _: 'invokeWithApnsSecret'; /** * Nonce. */ nonce: string; /** * Secret. */ secret: string; /** * Query. */ query: X; } /** * Official clients only: re-execute a method call that * required reCAPTCHA verification via a * RECAPTCHA_CHECK_%s__%s, where the first * placeholder is the action, and the second one * is the reCAPTCHA key ID. */ interface RawInvokeWithReCaptchaRequest { _: 'invokeWithReCaptcha'; /** * reCAPTCHA token received after verification. */ token: string; /** * The original method call. */ query: X; } interface RpcCallReturn extends storage.RpcCallReturn, auth.RpcCallReturn, contacts.RpcCallReturn, messages.RpcCallReturn, updates.RpcCallReturn, photos.RpcCallReturn, upload.RpcCallReturn, help.RpcCallReturn, account.RpcCallReturn, channels.RpcCallReturn, payments.RpcCallReturn, phone.RpcCallReturn, stats.RpcCallReturn, stickers.RpcCallReturn, users.RpcCallReturn, chatlists.RpcCallReturn, bots.RpcCallReturn, stories.RpcCallReturn, premium.RpcCallReturn, smsjobs.RpcCallReturn, fragment.RpcCallReturn, mtcute.RpcCallReturn, langpack.RpcCallReturn, folders.RpcCallReturn { 'invokeAfterMsg': any 'invokeAfterMsgs': any 'initConnection': any 'invokeWithLayer': any 'invokeWithoutUpdates': any 'invokeWithMessagesRange': any 'invokeWithTakeout': any 'invokeWithBusinessConnection': any 'invokeWithGooglePlayIntegrity': any 'invokeWithApnsSecret': any 'invokeWithReCaptcha': any } /** * An object containing a query error. */ type TypeError = tl.RawError function isAnyError(o: object): o is TypeError /** * Defines the location of a file for download. */ type TypeInputFileLocation = tl.RawInputPeerPhotoFileLocationLegacy | tl.RawInputStickerSetThumbLegacy | tl.RawInputFileLocation | tl.RawInputEncryptedFileLocation | tl.RawInputDocumentFileLocation | tl.RawInputSecureFileLocation | tl.RawInputTakeoutFileLocation | tl.RawInputPhotoFileLocation | tl.RawInputPhotoLegacyFileLocation | tl.RawInputPeerPhotoFileLocation | tl.RawInputStickerSetThumb | tl.RawInputGroupCallStream function isAnyInputFileLocation(o: object): o is TypeInputFileLocation /** * Peer */ type TypeInputPeer = tl.RawInputPeerEmpty | tl.RawInputPeerSelf | tl.RawInputPeerChat | tl.RawInputPeerUser | tl.RawInputPeerChannel | tl.RawInputPeerUserFromMessage | tl.RawInputPeerChannelFromMessage | tl.mtcute.RawDummyInputPeerMinUser | tl.mtcute.RawDummyInputPeerMinChannel function isAnyInputPeer(o: object): o is TypeInputPeer /** * Defines a user for subsequent interaction. */ type TypeInputUser = tl.RawInputUserEmpty | tl.RawInputUserSelf | tl.RawInputUser | tl.RawInputUserFromMessage function isAnyInputUser(o: object): o is TypeInputUser /** * Object defines a contact from the user's phone book. */ type TypeInputContact = tl.RawInputPhoneContact function isAnyInputContact(o: object): o is TypeInputContact /** * Defines a file uploaded by the client. */ type TypeInputFile = tl.RawInputFile | tl.RawInputFileBig | tl.RawInputFileStoryDocument function isAnyInputFile(o: object): o is TypeInputFile /** * Defines media content of a message. */ type TypeInputMedia = tl.RawInputMediaEmpty | tl.RawInputMediaUploadedPhoto | tl.RawInputMediaPhoto | tl.RawInputMediaGeoPoint | tl.RawInputMediaContact | tl.RawInputMediaUploadedDocument | tl.RawInputMediaDocument | tl.RawInputMediaVenue | tl.RawInputMediaPhotoExternal | tl.RawInputMediaDocumentExternal | tl.RawInputMediaGame | tl.RawInputMediaInvoice | tl.RawInputMediaGeoLive | tl.RawInputMediaPoll | tl.RawInputMediaDice | tl.RawInputMediaStory | tl.RawInputMediaWebPage | tl.RawInputMediaPaidMedia | tl.RawInputMediaTodo | tl.RawInputMediaStakeDice function isAnyInputMedia(o: object): o is TypeInputMedia /** * Defines a new group profile photo. */ type TypeInputChatPhoto = tl.RawInputChatPhotoEmpty | tl.RawInputChatUploadedPhoto | tl.RawInputChatPhoto function isAnyInputChatPhoto(o: object): o is TypeInputChatPhoto /** * Defines a GeoPoint. */ type TypeInputGeoPoint = tl.RawInputGeoPointEmpty | tl.RawInputGeoPoint function isAnyInputGeoPoint(o: object): o is TypeInputGeoPoint /** * Defines a photo for further interaction. */ type TypeInputPhoto = tl.RawInputPhotoEmpty | tl.RawInputPhoto function isAnyInputPhoto(o: object): o is TypeInputPhoto /** * Identifier of a private chat, basic group, group or channel * (see here * » for more info). */ type TypePeer = tl.RawPeerUser | tl.RawPeerChat | tl.RawPeerChannel function isAnyPeer(o: object): o is TypePeer /** * Object defines a user. */ type TypeUser = tl.RawUserEmpty | tl.RawUser function isAnyUser(o: object): o is TypeUser /** * Object contains info on the user's profile photo. */ type TypeUserProfilePhoto = tl.RawUserProfilePhotoEmpty | tl.RawUserProfilePhoto function isAnyUserProfilePhoto(o: object): o is TypeUserProfilePhoto /** * User online status */ type TypeUserStatus = tl.RawUserStatusEmpty | tl.RawUserStatusOnline | tl.RawUserStatusOffline | tl.RawUserStatusRecently | tl.RawUserStatusLastWeek | tl.RawUserStatusLastMonth function isAnyUserStatus(o: object): o is TypeUserStatus /** * Object defines a group. */ type TypeChat = tl.RawChatEmpty | tl.RawChat | tl.RawChatForbidden | tl.RawChannel | tl.RawChannelForbidden function isAnyChat(o: object): o is TypeChat /** * Full info about a * channel, * supergroup, * gigagroup * or * basic * group. */ type TypeChatFull = tl.RawChatFull | tl.RawChannelFull function isAnyChatFull(o: object): o is TypeChatFull /** * Details of a group member. */ type TypeChatParticipant = tl.RawChatParticipant | tl.RawChatParticipantCreator | tl.RawChatParticipantAdmin function isAnyChatParticipant(o: object): o is TypeChatParticipant /** * Object contains info on group members. */ type TypeChatParticipants = tl.RawChatParticipantsForbidden | tl.RawChatParticipants function isAnyChatParticipants(o: object): o is TypeChatParticipants /** * Object defines a group profile photo. */ type TypeChatPhoto = tl.RawChatPhotoEmpty | tl.RawChatPhoto function isAnyChatPhoto(o: object): o is TypeChatPhoto /** * Object describing a message. */ type TypeMessage = tl.RawMessageEmpty | tl.RawMessage | tl.RawMessageService function isAnyMessage(o: object): o is TypeMessage /** * Media */ type TypeMessageMedia = tl.RawMessageMediaEmpty | tl.RawMessageMediaPhoto | tl.RawMessageMediaGeo | tl.RawMessageMediaContact | tl.RawMessageMediaUnsupported | tl.RawMessageMediaDocument | tl.RawMessageMediaWebPage | tl.RawMessageMediaVenue | tl.RawMessageMediaGame | tl.RawMessageMediaInvoice | tl.RawMessageMediaGeoLive | tl.RawMessageMediaPoll | tl.RawMessageMediaDice | tl.RawMessageMediaStory | tl.RawMessageMediaGiveaway | tl.RawMessageMediaGiveawayResults | tl.RawMessageMediaPaidMedia | tl.RawMessageMediaToDo | tl.RawMessageMediaVideoStream function isAnyMessageMedia(o: object): o is TypeMessageMedia /** * Object describing actions connected to a service message. */ type TypeMessageAction = tl.RawMessageActionEmpty | tl.RawMessageActionChatCreate | tl.RawMessageActionChatEditTitle | tl.RawMessageActionChatEditPhoto | tl.RawMessageActionChatDeletePhoto | tl.RawMessageActionChatAddUser | tl.RawMessageActionChatDeleteUser | tl.RawMessageActionChatJoinedByLink | tl.RawMessageActionChannelCreate | tl.RawMessageActionChatMigrateTo | tl.RawMessageActionChannelMigrateFrom | tl.RawMessageActionPinMessage | tl.RawMessageActionHistoryClear | tl.RawMessageActionGameScore | tl.RawMessageActionPaymentSentMe | tl.RawMessageActionPaymentSent | tl.RawMessageActionPhoneCall | tl.RawMessageActionScreenshotTaken | tl.RawMessageActionCustomAction | tl.RawMessageActionBotAllowed | tl.RawMessageActionSecureValuesSentMe | tl.RawMessageActionSecureValuesSent | tl.RawMessageActionContactSignUp | tl.RawMessageActionGeoProximityReached | tl.RawMessageActionGroupCall | tl.RawMessageActionInviteToGroupCall | tl.RawMessageActionSetMessagesTTL | tl.RawMessageActionGroupCallScheduled | tl.RawMessageActionSetChatTheme | tl.RawMessageActionChatJoinedByRequest | tl.RawMessageActionWebViewDataSentMe | tl.RawMessageActionWebViewDataSent | tl.RawMessageActionGiftPremium | tl.RawMessageActionTopicCreate | tl.RawMessageActionTopicEdit | tl.RawMessageActionSuggestProfilePhoto | tl.RawMessageActionRequestedPeer | tl.RawMessageActionSetChatWallPaper | tl.RawMessageActionGiftCode | tl.RawMessageActionGiveawayLaunch | tl.RawMessageActionGiveawayResults | tl.RawMessageActionBoostApply | tl.RawMessageActionRequestedPeerSentMe | tl.RawMessageActionPaymentRefunded | tl.RawMessageActionGiftStars | tl.RawMessageActionPrizeStars | tl.RawMessageActionStarGift | tl.RawMessageActionStarGiftUnique | tl.RawMessageActionPaidMessagesRefunded | tl.RawMessageActionPaidMessagesPrice | tl.RawMessageActionConferenceCall | tl.RawMessageActionTodoCompletions | tl.RawMessageActionTodoAppendTasks | tl.RawMessageActionSuggestedPostApproval | tl.RawMessageActionSuggestedPostSuccess | tl.RawMessageActionSuggestedPostRefund | tl.RawMessageActionGiftTon | tl.RawMessageActionSuggestBirthday | tl.RawMessageActionStarGiftPurchaseOffer | tl.RawMessageActionStarGiftPurchaseOfferDeclined | tl.RawMessageActionNewCreatorPending | tl.RawMessageActionChangeCreator | tl.RawMessageActionNoForwardsToggle | tl.RawMessageActionNoForwardsRequest function isAnyMessageAction(o: object): o is TypeMessageAction /** * Chat info. */ type TypeDialog = tl.RawDialog | tl.RawDialogFolder function isAnyDialog(o: object): o is TypeDialog /** * Object describes a photo. */ type TypePhoto = tl.RawPhotoEmpty | tl.RawPhoto function isAnyPhoto(o: object): o is TypePhoto /** * Location of a certain size of a picture */ type TypePhotoSize = tl.RawPhotoSizeEmpty | tl.RawPhotoSize | tl.RawPhotoCachedSize | tl.RawPhotoStrippedSize | tl.RawPhotoSizeProgressive | tl.RawPhotoPathSize function isAnyPhotoSize(o: object): o is TypePhotoSize /** * Object defines a GeoPoint. */ type TypeGeoPoint = tl.RawGeoPointEmpty | tl.RawGeoPoint function isAnyGeoPoint(o: object): o is TypeGeoPoint /** * Object defines the set of users and/or groups that generate * notifications. */ type TypeInputNotifyPeer = tl.RawInputNotifyPeer | tl.RawInputNotifyUsers | tl.RawInputNotifyChats | tl.RawInputNotifyBroadcasts | tl.RawInputNotifyForumTopic function isAnyInputNotifyPeer(o: object): o is TypeInputNotifyPeer /** * Notifications settings. */ type TypeInputPeerNotifySettings = tl.RawInputPeerNotifySettings function isAnyInputPeerNotifySettings(o: object): o is TypeInputPeerNotifySettings /** * Notification settings. */ type TypePeerNotifySettings = tl.RawPeerNotifySettings function isAnyPeerNotifySettings(o: object): o is TypePeerNotifySettings /** * List of actions that are possible when interacting with this * user, to be shown as suggested actions in the chat bar */ type TypePeerSettings = tl.RawPeerSettings function isAnyPeerSettings(o: object): o is TypePeerSettings /** * Object contains info on a * wallpaper. */ type TypeWallPaper = tl.RawWallPaper | tl.RawWallPaperNoFile function isAnyWallPaper(o: object): o is TypeWallPaper /** * Report reason */ type TypeReportReason = tl.RawInputReportReasonSpam | tl.RawInputReportReasonViolence | tl.RawInputReportReasonPornography | tl.RawInputReportReasonChildAbuse | tl.RawInputReportReasonOther | tl.RawInputReportReasonCopyright | tl.RawInputReportReasonGeoIrrelevant | tl.RawInputReportReasonFake | tl.RawInputReportReasonIllegalDrugs | tl.RawInputReportReasonPersonalDetails function isAnyReportReason(o: object): o is TypeReportReason /** * Object contains extended user info. */ type TypeUserFull = tl.RawUserFull function isAnyUserFull(o: object): o is TypeUserFull /** * A contact of the current user. */ type TypeContact = tl.RawContact function isAnyContact(o: object): o is TypeContact /** * Object contains info on a successfully imported contact. */ type TypeImportedContact = tl.RawImportedContact function isAnyImportedContact(o: object): o is TypeImportedContact /** * Contact status: online / offline. */ type TypeContactStatus = tl.RawContactStatus function isAnyContactStatus(o: object): o is TypeContactStatus /** * Object describes message filter. */ type TypeMessagesFilter = tl.RawInputMessagesFilterEmpty | tl.RawInputMessagesFilterPhotos | tl.RawInputMessagesFilterVideo | tl.RawInputMessagesFilterPhotoVideo | tl.RawInputMessagesFilterDocument | tl.RawInputMessagesFilterUrl | tl.RawInputMessagesFilterGif | tl.RawInputMessagesFilterVoice | tl.RawInputMessagesFilterMusic | tl.RawInputMessagesFilterChatPhotos | tl.RawInputMessagesFilterPhoneCalls | tl.RawInputMessagesFilterRoundVoice | tl.RawInputMessagesFilterRoundVideo | tl.RawInputMessagesFilterMyMentions | tl.RawInputMessagesFilterGeo | tl.RawInputMessagesFilterContacts | tl.RawInputMessagesFilterPinned function isAnyMessagesFilter(o: object): o is TypeMessagesFilter /** * Object contains info on events occurred. */ type TypeUpdate = tl.RawUpdateNewMessage | tl.RawUpdateMessageID | tl.RawUpdateDeleteMessages | tl.RawUpdateUserTyping | tl.RawUpdateChatUserTyping | tl.RawUpdateChatParticipants | tl.RawUpdateUserStatus | tl.RawUpdateUserName | tl.RawUpdateNewAuthorization | tl.RawUpdateNewEncryptedMessage | tl.RawUpdateEncryptedChatTyping | tl.RawUpdateEncryption | tl.RawUpdateEncryptedMessagesRead | tl.RawUpdateChatParticipantAdd | tl.RawUpdateChatParticipantDelete | tl.RawUpdateDcOptions | tl.RawUpdateNotifySettings | tl.RawUpdateServiceNotification | tl.RawUpdatePrivacy | tl.RawUpdateUserPhone | tl.RawUpdateReadHistoryInbox | tl.RawUpdateReadHistoryOutbox | tl.RawUpdateWebPage | tl.RawUpdateReadMessagesContents | tl.RawUpdateChannelTooLong | tl.RawUpdateChannel | tl.RawUpdateNewChannelMessage | tl.RawUpdateReadChannelInbox | tl.RawUpdateDeleteChannelMessages | tl.RawUpdateChannelMessageViews | tl.RawUpdateChatParticipantAdmin | tl.RawUpdateNewStickerSet | tl.RawUpdateStickerSetsOrder | tl.RawUpdateStickerSets | tl.RawUpdateSavedGifs | tl.RawUpdateBotInlineQuery | tl.RawUpdateBotInlineSend | tl.RawUpdateEditChannelMessage | tl.RawUpdateBotCallbackQuery | tl.RawUpdateEditMessage | tl.RawUpdateInlineBotCallbackQuery | tl.RawUpdateReadChannelOutbox | tl.RawUpdateDraftMessage | tl.RawUpdateReadFeaturedStickers | tl.RawUpdateRecentStickers | tl.RawUpdateConfig | tl.RawUpdatePtsChanged | tl.RawUpdateChannelWebPage | tl.RawUpdateDialogPinned | tl.RawUpdatePinnedDialogs | tl.RawUpdateBotWebhookJSON | tl.RawUpdateBotWebhookJSONQuery | tl.RawUpdateBotShippingQuery | tl.RawUpdateBotPrecheckoutQuery | tl.RawUpdatePhoneCall | tl.RawUpdateLangPackTooLong | tl.RawUpdateLangPack | tl.RawUpdateFavedStickers | tl.RawUpdateChannelReadMessagesContents | tl.RawUpdateContactsReset | tl.RawUpdateChannelAvailableMessages | tl.RawUpdateDialogUnreadMark | tl.RawUpdateMessagePoll | tl.RawUpdateChatDefaultBannedRights | tl.RawUpdateFolderPeers | tl.RawUpdatePeerSettings | tl.RawUpdatePeerLocated | tl.RawUpdateNewScheduledMessage | tl.RawUpdateDeleteScheduledMessages | tl.RawUpdateTheme | tl.RawUpdateGeoLiveViewed | tl.RawUpdateLoginToken | tl.RawUpdateMessagePollVote | tl.RawUpdateDialogFilter | tl.RawUpdateDialogFilterOrder | tl.RawUpdateDialogFilters | tl.RawUpdatePhoneCallSignalingData | tl.RawUpdateChannelMessageForwards | tl.RawUpdateReadChannelDiscussionInbox | tl.RawUpdateReadChannelDiscussionOutbox | tl.RawUpdatePeerBlocked | tl.RawUpdateChannelUserTyping | tl.RawUpdatePinnedMessages | tl.RawUpdatePinnedChannelMessages | tl.RawUpdateChat | tl.RawUpdateGroupCallParticipants | tl.RawUpdateGroupCall | tl.RawUpdatePeerHistoryTTL | tl.RawUpdateChatParticipant | tl.RawUpdateChannelParticipant | tl.RawUpdateBotStopped | tl.RawUpdateGroupCallConnection | tl.RawUpdateBotCommands | tl.RawUpdatePendingJoinRequests | tl.RawUpdateBotChatInviteRequester | tl.RawUpdateMessageReactions | tl.RawUpdateAttachMenuBots | tl.RawUpdateWebViewResultSent | tl.RawUpdateBotMenuButton | tl.RawUpdateSavedRingtones | tl.RawUpdateTranscribedAudio | tl.RawUpdateReadFeaturedEmojiStickers | tl.RawUpdateUserEmojiStatus | tl.RawUpdateRecentEmojiStatuses | tl.RawUpdateRecentReactions | tl.RawUpdateMoveStickerSetToTop | tl.RawUpdateMessageExtendedMedia | tl.RawUpdateUser | tl.RawUpdateAutoSaveSettings | tl.RawUpdateStory | tl.RawUpdateReadStories | tl.RawUpdateStoryID | tl.RawUpdateStoriesStealthMode | tl.RawUpdateSentStoryReaction | tl.RawUpdateBotChatBoost | tl.RawUpdateChannelViewForumAsMessages | tl.RawUpdatePeerWallpaper | tl.RawUpdateBotMessageReaction | tl.RawUpdateBotMessageReactions | tl.RawUpdateSavedDialogPinned | tl.RawUpdatePinnedSavedDialogs | tl.RawUpdateSavedReactionTags | tl.RawUpdateSmsJob | tl.RawUpdateQuickReplies | tl.RawUpdateNewQuickReply | tl.RawUpdateDeleteQuickReply | tl.RawUpdateQuickReplyMessage | tl.RawUpdateDeleteQuickReplyMessages | tl.RawUpdateBotBusinessConnect | tl.RawUpdateBotNewBusinessMessage | tl.RawUpdateBotEditBusinessMessage | tl.RawUpdateBotDeleteBusinessMessage | tl.RawUpdateNewStoryReaction | tl.RawUpdateStarsBalance | tl.RawUpdateBusinessBotCallbackQuery | tl.RawUpdateStarsRevenueStatus | tl.RawUpdateBotPurchasedPaidMedia | tl.RawUpdatePaidReactionPrivacy | tl.RawUpdateSentPhoneCode | tl.RawUpdateGroupCallChainBlocks | tl.RawUpdateReadMonoForumInbox | tl.RawUpdateReadMonoForumOutbox | tl.RawUpdateMonoForumNoPaidException | tl.RawUpdateGroupCallMessage | tl.RawUpdateGroupCallEncryptedMessage | tl.RawUpdatePinnedForumTopic | tl.RawUpdatePinnedForumTopics | tl.RawUpdateDeleteGroupCallMessages | tl.RawUpdateStarGiftAuctionState | tl.RawUpdateStarGiftAuctionUserState | tl.RawUpdateEmojiGameInfo | tl.RawUpdateStarGiftCraftFail | tl.RawUpdateChatParticipantRank | tl.RawUpdateChannelPinnedTopic | tl.RawUpdateChannelPinnedTopics | tl.mtcute.RawDummyUpdate function isAnyUpdate(o: object): o is TypeUpdate /** * Object which is perceived by the client without a call on * its part when an event occurs. */ type TypeUpdates = tl.RawUpdatesTooLong | tl.RawUpdateShortMessage | tl.RawUpdateShortChatMessage | tl.RawUpdateShort | tl.RawUpdatesCombined | tl.RawUpdates | tl.RawUpdateShortSentMessage function isAnyUpdates(o: object): o is TypeUpdates /** * Information for connection to data center. */ type TypeDcOption = tl.RawDcOption function isAnyDcOption(o: object): o is TypeDcOption /** * Object contains info on API configuring parameters. */ type TypeConfig = tl.RawConfig function isAnyConfig(o: object): o is TypeConfig /** * Object contains info on nearest data center. */ type TypeNearestDc = tl.RawNearestDc function isAnyNearestDc(o: object): o is TypeNearestDc /** * Object contains info on an encrypted chat. */ type TypeEncryptedChat = tl.RawEncryptedChatEmpty | tl.RawEncryptedChatWaiting | tl.RawEncryptedChatRequested | tl.RawEncryptedChat | tl.RawEncryptedChatDiscarded function isAnyEncryptedChat(o: object): o is TypeEncryptedChat /** * Object sets an encrypted chat ID. */ type TypeInputEncryptedChat = tl.RawInputEncryptedChat function isAnyInputEncryptedChat(o: object): o is TypeInputEncryptedChat /** * Seta an encrypted file. */ type TypeEncryptedFile = tl.RawEncryptedFileEmpty | tl.RawEncryptedFile function isAnyEncryptedFile(o: object): o is TypeEncryptedFile /** * Object sets encrypted file for attachment */ type TypeInputEncryptedFile = tl.RawInputEncryptedFileEmpty | tl.RawInputEncryptedFileUploaded | tl.RawInputEncryptedFile | tl.RawInputEncryptedFileBigUploaded function isAnyInputEncryptedFile(o: object): o is TypeInputEncryptedFile /** * Object contains encrypted message. */ type TypeEncryptedMessage = tl.RawEncryptedMessage | tl.RawEncryptedMessageService function isAnyEncryptedMessage(o: object): o is TypeEncryptedMessage /** * Defines a document for subsequent interaction. */ type TypeInputDocument = tl.RawInputDocumentEmpty | tl.RawInputDocument function isAnyInputDocument(o: object): o is TypeInputDocument /** * A document. */ type TypeDocument = tl.RawDocumentEmpty | tl.RawDocument function isAnyDocument(o: object): o is TypeDocument /** * Object defines the set of users and/or groups that generate * notifications. */ type TypeNotifyPeer = tl.RawNotifyPeer | tl.RawNotifyUsers | tl.RawNotifyChats | tl.RawNotifyBroadcasts | tl.RawNotifyForumTopic function isAnyNotifyPeer(o: object): o is TypeNotifyPeer /** * User actions. Use this to provide users with detailed info * about their chat partner's actions: typing or sending * attachments of all kinds. */ type TypeSendMessageAction = tl.RawSendMessageTypingAction | tl.RawSendMessageCancelAction | tl.RawSendMessageRecordVideoAction | tl.RawSendMessageUploadVideoAction | tl.RawSendMessageRecordAudioAction | tl.RawSendMessageUploadAudioAction | tl.RawSendMessageUploadPhotoAction | tl.RawSendMessageUploadDocumentAction | tl.RawSendMessageGeoLocationAction | tl.RawSendMessageChooseContactAction | tl.RawSendMessageGamePlayAction | tl.RawSendMessageRecordRoundAction | tl.RawSendMessageUploadRoundAction | tl.RawSpeakingInGroupCallAction | tl.RawSendMessageHistoryImportAction | tl.RawSendMessageChooseStickerAction | tl.RawSendMessageEmojiInteraction | tl.RawSendMessageEmojiInteractionSeen | tl.RawSendMessageTextDraftAction function isAnySendMessageAction(o: object): o is TypeSendMessageAction /** * Privacy keys together with * privacy * rules » indicate what can or can't someone do * and are specified by a * PrivacyKey * constructor, and its input counterpart * InputPrivacyKey. * * See the * privacy * documentation » for more info. */ type TypeInputPrivacyKey = tl.RawInputPrivacyKeyStatusTimestamp | tl.RawInputPrivacyKeyChatInvite | tl.RawInputPrivacyKeyPhoneCall | tl.RawInputPrivacyKeyPhoneP2P | tl.RawInputPrivacyKeyForwards | tl.RawInputPrivacyKeyProfilePhoto | tl.RawInputPrivacyKeyPhoneNumber | tl.RawInputPrivacyKeyAddedByPhone | tl.RawInputPrivacyKeyVoiceMessages | tl.RawInputPrivacyKeyAbout | tl.RawInputPrivacyKeyBirthday | tl.RawInputPrivacyKeyStarGiftsAutoSave | tl.RawInputPrivacyKeyNoPaidMessages | tl.RawInputPrivacyKeySavedMusic function isAnyInputPrivacyKey(o: object): o is TypeInputPrivacyKey /** * Privacy keys together with * privacy * rules » indicate what can or can't someone do * and are specified by a * PrivacyKey * constructor, and its input counterpart * InputPrivacyKey. * * See the * privacy * documentation » for more info. */ type TypePrivacyKey = tl.RawPrivacyKeyStatusTimestamp | tl.RawPrivacyKeyChatInvite | tl.RawPrivacyKeyPhoneCall | tl.RawPrivacyKeyPhoneP2P | tl.RawPrivacyKeyForwards | tl.RawPrivacyKeyProfilePhoto | tl.RawPrivacyKeyPhoneNumber | tl.RawPrivacyKeyAddedByPhone | tl.RawPrivacyKeyVoiceMessages | tl.RawPrivacyKeyAbout | tl.RawPrivacyKeyBirthday | tl.RawPrivacyKeyStarGiftsAutoSave | tl.RawPrivacyKeyNoPaidMessages | tl.RawPrivacyKeySavedMusic function isAnyPrivacyKey(o: object): o is TypePrivacyKey /** * Privacy rules indicate who can or * can't do something and are specified by a * PrivacyRule, * and its input counterpart * InputPrivacyRule. * * See the * privacy * documentation » for more info. */ type TypeInputPrivacyRule = tl.RawInputPrivacyValueAllowContacts | tl.RawInputPrivacyValueAllowAll | tl.RawInputPrivacyValueAllowUsers | tl.RawInputPrivacyValueDisallowContacts | tl.RawInputPrivacyValueDisallowAll | tl.RawInputPrivacyValueDisallowUsers | tl.RawInputPrivacyValueAllowChatParticipants | tl.RawInputPrivacyValueDisallowChatParticipants | tl.RawInputPrivacyValueAllowCloseFriends | tl.RawInputPrivacyValueAllowPremium | tl.RawInputPrivacyValueAllowBots | tl.RawInputPrivacyValueDisallowBots function isAnyInputPrivacyRule(o: object): o is TypeInputPrivacyRule /** * Privacy rules together with * privacy * keys indicate what can or can't someone do and * are specified by a * PrivacyRule * constructor, and its input counterpart * InputPrivacyRule. * * See the * privacy * documentation » for more info. */ type TypePrivacyRule = tl.RawPrivacyValueAllowContacts | tl.RawPrivacyValueAllowAll | tl.RawPrivacyValueAllowUsers | tl.RawPrivacyValueDisallowContacts | tl.RawPrivacyValueDisallowAll | tl.RawPrivacyValueDisallowUsers | tl.RawPrivacyValueAllowChatParticipants | tl.RawPrivacyValueDisallowChatParticipants | tl.RawPrivacyValueAllowCloseFriends | tl.RawPrivacyValueAllowPremium | tl.RawPrivacyValueAllowBots | tl.RawPrivacyValueDisallowBots function isAnyPrivacyRule(o: object): o is TypePrivacyRule /** * Time-to-live of current account */ type TypeAccountDaysTTL = tl.RawAccountDaysTTL function isAnyAccountDaysTTL(o: object): o is TypeAccountDaysTTL /** * Various possible attributes of a document (used to define if * it's a sticker, a GIF, a video, a mask sticker, an image, an * audio, and so on) */ type TypeDocumentAttribute = tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeAnimated | tl.RawDocumentAttributeSticker | tl.RawDocumentAttributeVideo | tl.RawDocumentAttributeAudio | tl.RawDocumentAttributeFilename | tl.RawDocumentAttributeHasStickers | tl.RawDocumentAttributeCustomEmoji function isAnyDocumentAttribute(o: object): o is TypeDocumentAttribute /** * Stickerpack */ type TypeStickerPack = tl.RawStickerPack function isAnyStickerPack(o: object): o is TypeStickerPack /** * Instant View * webpage preview */ type TypeWebPage = tl.RawWebPageEmpty | tl.RawWebPagePending | tl.RawWebPage | tl.RawWebPageNotModified function isAnyWebPage(o: object): o is TypeWebPage /** * Represents a logged-in session */ type TypeAuthorization = tl.RawAuthorization function isAnyAuthorization(o: object): o is TypeAuthorization /** * Confirmation of message receipt */ type TypeReceivedNotifyMessage = tl.RawReceivedNotifyMessage function isAnyReceivedNotifyMessage(o: object): o is TypeReceivedNotifyMessage /** * Exported chat invite */ type TypeExportedChatInvite = tl.RawChatInviteExported | tl.RawChatInvitePublicJoinRequests function isAnyExportedChatInvite(o: object): o is TypeExportedChatInvite /** * Chat invite */ type TypeChatInvite = tl.RawChatInviteAlready | tl.RawChatInvite | tl.RawChatInvitePeek function isAnyChatInvite(o: object): o is TypeChatInvite /** * Represents a stickerset */ type TypeInputStickerSet = tl.RawInputStickerSetEmpty | tl.RawInputStickerSetID | tl.RawInputStickerSetShortName | tl.RawInputStickerSetAnimatedEmoji | tl.RawInputStickerSetDice | tl.RawInputStickerSetAnimatedEmojiAnimations | tl.RawInputStickerSetPremiumGifts | tl.RawInputStickerSetEmojiGenericAnimations | tl.RawInputStickerSetEmojiDefaultStatuses | tl.RawInputStickerSetEmojiDefaultTopicIcons | tl.RawInputStickerSetEmojiChannelDefaultStatuses | tl.RawInputStickerSetTonGifts function isAnyInputStickerSet(o: object): o is TypeInputStickerSet /** * Represents a stickerset (stickerpack) */ type TypeStickerSet = tl.RawStickerSet function isAnyStickerSet(o: object): o is TypeStickerSet /** * Describes a bot command that can be used in a chat */ type TypeBotCommand = tl.RawBotCommand function isAnyBotCommand(o: object): o is TypeBotCommand /** * Info about bots (available bot commands, etc) */ type TypeBotInfo = tl.RawBotInfo function isAnyBotInfo(o: object): o is TypeBotInfo /** * Bot or inline keyboard buttons */ type TypeKeyboardButton = tl.RawKeyboardButton | tl.RawKeyboardButtonUrl | tl.RawKeyboardButtonCallback | tl.RawKeyboardButtonRequestPhone | tl.RawKeyboardButtonRequestGeoLocation | tl.RawKeyboardButtonSwitchInline | tl.RawKeyboardButtonGame | tl.RawKeyboardButtonBuy | tl.RawKeyboardButtonUrlAuth | tl.RawInputKeyboardButtonUrlAuth | tl.RawKeyboardButtonRequestPoll | tl.RawInputKeyboardButtonUserProfile | tl.RawKeyboardButtonUserProfile | tl.RawKeyboardButtonWebView | tl.RawKeyboardButtonSimpleWebView | tl.RawKeyboardButtonRequestPeer | tl.RawInputKeyboardButtonRequestPeer | tl.RawKeyboardButtonCopy function isAnyKeyboardButton(o: object): o is TypeKeyboardButton /** * Bot or inline keyboard rows */ type TypeKeyboardButtonRow = tl.RawKeyboardButtonRow function isAnyKeyboardButtonRow(o: object): o is TypeKeyboardButtonRow /** * Reply markup for bot and inline keyboards */ type TypeReplyMarkup = tl.RawReplyKeyboardHide | tl.RawReplyKeyboardForceReply | tl.RawReplyKeyboardMarkup | tl.RawReplyInlineMarkup function isAnyReplyMarkup(o: object): o is TypeReplyMarkup /** * Message entities, representing styled text in a message */ type TypeMessageEntity = tl.RawMessageEntityUnknown | tl.RawMessageEntityMention | tl.RawMessageEntityHashtag | tl.RawMessageEntityBotCommand | tl.RawMessageEntityUrl | tl.RawMessageEntityEmail | tl.RawMessageEntityBold | tl.RawMessageEntityItalic | tl.RawMessageEntityCode | tl.RawMessageEntityPre | tl.RawMessageEntityTextUrl | tl.RawMessageEntityMentionName | tl.RawInputMessageEntityMentionName | tl.RawMessageEntityPhone | tl.RawMessageEntityCashtag | tl.RawMessageEntityUnderline | tl.RawMessageEntityStrike | tl.RawMessageEntityBankCard | tl.RawMessageEntitySpoiler | tl.RawMessageEntityCustomEmoji | tl.RawMessageEntityBlockquote | tl.RawMessageEntityFormattedDate function isAnyMessageEntity(o: object): o is TypeMessageEntity /** * Represents a channel */ type TypeInputChannel = tl.RawInputChannelEmpty | tl.RawInputChannel | tl.RawInputChannelFromMessage function isAnyInputChannel(o: object): o is TypeInputChannel /** * Indicates a range of chat messages */ type TypeMessageRange = tl.RawMessageRange function isAnyMessageRange(o: object): o is TypeMessageRange /** * Filter for fetching only certain types of channel messages */ type TypeChannelMessagesFilter = tl.RawChannelMessagesFilterEmpty | tl.RawChannelMessagesFilter function isAnyChannelMessagesFilter(o: object): o is TypeChannelMessagesFilter /** * Channel participant */ type TypeChannelParticipant = tl.RawChannelParticipant | tl.RawChannelParticipantSelf | tl.RawChannelParticipantCreator | tl.RawChannelParticipantAdmin | tl.RawChannelParticipantBanned | tl.RawChannelParticipantLeft function isAnyChannelParticipant(o: object): o is TypeChannelParticipant /** * Filter for fetching channel participants */ type TypeChannelParticipantsFilter = tl.RawChannelParticipantsRecent | tl.RawChannelParticipantsAdmins | tl.RawChannelParticipantsKicked | tl.RawChannelParticipantsBots | tl.RawChannelParticipantsBanned | tl.RawChannelParticipantsSearch | tl.RawChannelParticipantsContacts | tl.RawChannelParticipantsMentions function isAnyChannelParticipantsFilter(o: object): o is TypeChannelParticipantsFilter /** * Represents a sent inline message from the perspective of a * bot */ type TypeInputBotInlineMessage = tl.RawInputBotInlineMessageMediaAuto | tl.RawInputBotInlineMessageText | tl.RawInputBotInlineMessageMediaGeo | tl.RawInputBotInlineMessageMediaVenue | tl.RawInputBotInlineMessageMediaContact | tl.RawInputBotInlineMessageGame | tl.RawInputBotInlineMessageMediaInvoice | tl.RawInputBotInlineMessageMediaWebPage function isAnyInputBotInlineMessage(o: object): o is TypeInputBotInlineMessage /** * Inline bot result */ type TypeInputBotInlineResult = tl.RawInputBotInlineResult | tl.RawInputBotInlineResultPhoto | tl.RawInputBotInlineResultDocument | tl.RawInputBotInlineResultGame function isAnyInputBotInlineResult(o: object): o is TypeInputBotInlineResult /** * Inline message */ type TypeBotInlineMessage = tl.RawBotInlineMessageMediaAuto | tl.RawBotInlineMessageText | tl.RawBotInlineMessageMediaGeo | tl.RawBotInlineMessageMediaVenue | tl.RawBotInlineMessageMediaContact | tl.RawBotInlineMessageMediaInvoice | tl.RawBotInlineMessageMediaWebPage function isAnyBotInlineMessage(o: object): o is TypeBotInlineMessage /** * Results of an inline query */ type TypeBotInlineResult = tl.RawBotInlineResult | tl.RawBotInlineMediaResult function isAnyBotInlineResult(o: object): o is TypeBotInlineResult /** * HTTP link and embed info of channel message */ type TypeExportedMessageLink = tl.RawExportedMessageLink function isAnyExportedMessageLink(o: object): o is TypeExportedMessageLink /** * Info about a forwarded message */ type TypeMessageFwdHeader = tl.RawMessageFwdHeader function isAnyMessageFwdHeader(o: object): o is TypeMessageFwdHeader /** * Represents a sent inline message from the perspective of a * bot */ type TypeInputBotInlineMessageID = tl.RawInputBotInlineMessageID | tl.RawInputBotInlineMessageID64 function isAnyInputBotInlineMessageID(o: object): o is TypeInputBotInlineMessageID /** * The bot requested the user to message them in private */ type TypeInlineBotSwitchPM = tl.RawInlineBotSwitchPM function isAnyInlineBotSwitchPM(o: object): o is TypeInlineBotSwitchPM /** * Top peer */ type TypeTopPeer = tl.RawTopPeer function isAnyTopPeer(o: object): o is TypeTopPeer /** * Top peer category */ type TypeTopPeerCategory = tl.RawTopPeerCategoryBotsPM | tl.RawTopPeerCategoryBotsInline | tl.RawTopPeerCategoryCorrespondents | tl.RawTopPeerCategoryGroups | tl.RawTopPeerCategoryChannels | tl.RawTopPeerCategoryPhoneCalls | tl.RawTopPeerCategoryForwardUsers | tl.RawTopPeerCategoryForwardChats | tl.RawTopPeerCategoryBotsApp function isAnyTopPeerCategory(o: object): o is TypeTopPeerCategory /** * Top peers by top peer category */ type TypeTopPeerCategoryPeers = tl.RawTopPeerCategoryPeers function isAnyTopPeerCategoryPeers(o: object): o is TypeTopPeerCategoryPeers /** * Represents a message * draft. */ type TypeDraftMessage = tl.RawDraftMessageEmpty | tl.RawDraftMessage function isAnyDraftMessage(o: object): o is TypeDraftMessage /** * Stickerset preview */ type TypeStickerSetCovered = tl.RawStickerSetCovered | tl.RawStickerSetMultiCovered | tl.RawStickerSetFullCovered | tl.RawStickerSetNoCovered function isAnyStickerSetCovered(o: object): o is TypeStickerSetCovered /** * Mask coordinates (if this is a mask sticker, attached to a * photo) */ type TypeMaskCoords = tl.RawMaskCoords function isAnyMaskCoords(o: object): o is TypeMaskCoords /** * Represents a media with attached stickers */ type TypeInputStickeredMedia = tl.RawInputStickeredMediaPhoto | tl.RawInputStickeredMediaDocument function isAnyInputStickeredMedia(o: object): o is TypeInputStickeredMedia /** * Indicates an already sent game */ type TypeGame = tl.RawGame function isAnyGame(o: object): o is TypeGame /** * A game to send */ type TypeInputGame = tl.RawInputGameID | tl.RawInputGameShortName function isAnyInputGame(o: object): o is TypeInputGame /** * Game high score */ type TypeHighScore = tl.RawHighScore function isAnyHighScore(o: object): o is TypeHighScore /** * Rich text */ type TypeRichText = tl.RawTextEmpty | tl.RawTextPlain | tl.RawTextBold | tl.RawTextItalic | tl.RawTextUnderline | tl.RawTextStrike | tl.RawTextFixed | tl.RawTextUrl | tl.RawTextEmail | tl.RawTextConcat | tl.RawTextSubscript | tl.RawTextSuperscript | tl.RawTextMarked | tl.RawTextPhone | tl.RawTextImage | tl.RawTextAnchor function isAnyRichText(o: object): o is TypeRichText /** * Represents an * instant view * page element */ type TypePageBlock = tl.RawPageBlockUnsupported | tl.RawPageBlockTitle | tl.RawPageBlockSubtitle | tl.RawPageBlockAuthorDate | tl.RawPageBlockHeader | tl.RawPageBlockSubheader | tl.RawPageBlockParagraph | tl.RawPageBlockPreformatted | tl.RawPageBlockFooter | tl.RawPageBlockDivider | tl.RawPageBlockAnchor | tl.RawPageBlockList | tl.RawPageBlockBlockquote | tl.RawPageBlockPullquote | tl.RawPageBlockPhoto | tl.RawPageBlockVideo | tl.RawPageBlockCover | tl.RawPageBlockEmbed | tl.RawPageBlockEmbedPost | tl.RawPageBlockCollage | tl.RawPageBlockSlideshow | tl.RawPageBlockChannel | tl.RawPageBlockAudio | tl.RawPageBlockKicker | tl.RawPageBlockTable | tl.RawPageBlockOrderedList | tl.RawPageBlockDetails | tl.RawPageBlockRelatedArticles | tl.RawPageBlockMap function isAnyPageBlock(o: object): o is TypePageBlock /** * Why was the phone call discarded? */ type TypePhoneCallDiscardReason = tl.RawPhoneCallDiscardReasonMissed | tl.RawPhoneCallDiscardReasonDisconnect | tl.RawPhoneCallDiscardReasonHangup | tl.RawPhoneCallDiscardReasonBusy | tl.RawPhoneCallDiscardReasonMigrateConferenceCall function isAnyPhoneCallDiscardReason(o: object): o is TypePhoneCallDiscardReason /** * Represent a JSON-encoded object */ type TypeDataJSON = tl.RawDataJSON function isAnyDataJSON(o: object): o is TypeDataJSON /** * Labeled pricetag */ type TypeLabeledPrice = tl.RawLabeledPrice function isAnyLabeledPrice(o: object): o is TypeLabeledPrice /** * Invoice */ type TypeInvoice = tl.RawInvoice function isAnyInvoice(o: object): o is TypeInvoice /** * Charged payment */ type TypePaymentCharge = tl.RawPaymentCharge function isAnyPaymentCharge(o: object): o is TypePaymentCharge /** * Shipping address */ type TypePostAddress = tl.RawPostAddress function isAnyPostAddress(o: object): o is TypePostAddress /** * Requested payment info */ type TypePaymentRequestedInfo = tl.RawPaymentRequestedInfo function isAnyPaymentRequestedInfo(o: object): o is TypePaymentRequestedInfo /** * Saved payment credentials */ type TypePaymentSavedCredentials = tl.RawPaymentSavedCredentialsCard function isAnyPaymentSavedCredentials(o: object): o is TypePaymentSavedCredentials /** * Remote document */ type TypeWebDocument = tl.RawWebDocument | tl.RawWebDocumentNoProxy function isAnyWebDocument(o: object): o is TypeWebDocument /** * Specifies a document that will have to be downloaded from * the URL by the telegram servers */ type TypeInputWebDocument = tl.RawInputWebDocument function isAnyInputWebDocument(o: object): o is TypeInputWebDocument /** * Location of remote file */ type TypeInputWebFileLocation = tl.RawInputWebFileLocation | tl.RawInputWebFileGeoPointLocation | tl.RawInputWebFileAudioAlbumThumbLocation function isAnyInputWebFileLocation(o: object): o is TypeInputWebFileLocation /** * Payment credentials */ type TypeInputPaymentCredentials = tl.RawInputPaymentCredentialsSaved | tl.RawInputPaymentCredentials | tl.RawInputPaymentCredentialsApplePay | tl.RawInputPaymentCredentialsGooglePay function isAnyInputPaymentCredentials(o: object): o is TypeInputPaymentCredentials /** * Shipping options */ type TypeShippingOption = tl.RawShippingOption function isAnyShippingOption(o: object): o is TypeShippingOption /** * Sticker */ type TypeInputStickerSetItem = tl.RawInputStickerSetItem function isAnyInputStickerSetItem(o: object): o is TypeInputStickerSetItem /** * Phone call */ type TypeInputPhoneCall = tl.RawInputPhoneCall function isAnyInputPhoneCall(o: object): o is TypeInputPhoneCall /** * Phone call */ type TypePhoneCall = tl.RawPhoneCallEmpty | tl.RawPhoneCallWaiting | tl.RawPhoneCallRequested | tl.RawPhoneCallAccepted | tl.RawPhoneCall | tl.RawPhoneCallDiscarded function isAnyPhoneCall(o: object): o is TypePhoneCall /** * Phone call connection */ type TypePhoneConnection = tl.RawPhoneConnection | tl.RawPhoneConnectionWebrtc function isAnyPhoneConnection(o: object): o is TypePhoneConnection /** * Phone call protocol */ type TypePhoneCallProtocol = tl.RawPhoneCallProtocol function isAnyPhoneCallProtocol(o: object): o is TypePhoneCallProtocol /** * Public key to use only during handshakes to * CDN DCs. */ type TypeCdnPublicKey = tl.RawCdnPublicKey function isAnyCdnPublicKey(o: object): o is TypeCdnPublicKey /** * Configuration for * CDN file * downloads. */ type TypeCdnConfig = tl.RawCdnConfig function isAnyCdnConfig(o: object): o is TypeCdnConfig /** * Language pack string */ type TypeLangPackString = tl.RawLangPackString | tl.RawLangPackStringPluralized | tl.RawLangPackStringDeleted function isAnyLangPackString(o: object): o is TypeLangPackString /** * Language pack changes */ type TypeLangPackDifference = tl.RawLangPackDifference function isAnyLangPackDifference(o: object): o is TypeLangPackDifference /** * Language pack language */ type TypeLangPackLanguage = tl.RawLangPackLanguage function isAnyLangPackLanguage(o: object): o is TypeLangPackLanguage /** * Channel admin log event */ type TypeChannelAdminLogEventAction = tl.RawChannelAdminLogEventActionChangeTitle | tl.RawChannelAdminLogEventActionChangeAbout | tl.RawChannelAdminLogEventActionChangeUsername | tl.RawChannelAdminLogEventActionChangePhoto | tl.RawChannelAdminLogEventActionToggleInvites | tl.RawChannelAdminLogEventActionToggleSignatures | tl.RawChannelAdminLogEventActionUpdatePinned | tl.RawChannelAdminLogEventActionEditMessage | tl.RawChannelAdminLogEventActionDeleteMessage | tl.RawChannelAdminLogEventActionParticipantJoin | tl.RawChannelAdminLogEventActionParticipantLeave | tl.RawChannelAdminLogEventActionParticipantInvite | tl.RawChannelAdminLogEventActionParticipantToggleBan | tl.RawChannelAdminLogEventActionParticipantToggleAdmin | tl.RawChannelAdminLogEventActionChangeStickerSet | tl.RawChannelAdminLogEventActionTogglePreHistoryHidden | tl.RawChannelAdminLogEventActionDefaultBannedRights | tl.RawChannelAdminLogEventActionStopPoll | tl.RawChannelAdminLogEventActionChangeLinkedChat | tl.RawChannelAdminLogEventActionChangeLocation | tl.RawChannelAdminLogEventActionToggleSlowMode | tl.RawChannelAdminLogEventActionStartGroupCall | tl.RawChannelAdminLogEventActionDiscardGroupCall | tl.RawChannelAdminLogEventActionParticipantMute | tl.RawChannelAdminLogEventActionParticipantUnmute | tl.RawChannelAdminLogEventActionToggleGroupCallSetting | tl.RawChannelAdminLogEventActionParticipantJoinByInvite | tl.RawChannelAdminLogEventActionExportedInviteDelete | tl.RawChannelAdminLogEventActionExportedInviteRevoke | tl.RawChannelAdminLogEventActionExportedInviteEdit | tl.RawChannelAdminLogEventActionParticipantVolume | tl.RawChannelAdminLogEventActionChangeHistoryTTL | tl.RawChannelAdminLogEventActionParticipantJoinByRequest | tl.RawChannelAdminLogEventActionToggleNoForwards | tl.RawChannelAdminLogEventActionSendMessage | tl.RawChannelAdminLogEventActionChangeAvailableReactions | tl.RawChannelAdminLogEventActionChangeUsernames | tl.RawChannelAdminLogEventActionToggleForum | tl.RawChannelAdminLogEventActionCreateTopic | tl.RawChannelAdminLogEventActionEditTopic | tl.RawChannelAdminLogEventActionDeleteTopic | tl.RawChannelAdminLogEventActionPinTopic | tl.RawChannelAdminLogEventActionToggleAntiSpam | tl.RawChannelAdminLogEventActionChangePeerColor | tl.RawChannelAdminLogEventActionChangeProfilePeerColor | tl.RawChannelAdminLogEventActionChangeWallpaper | tl.RawChannelAdminLogEventActionChangeEmojiStatus | tl.RawChannelAdminLogEventActionChangeEmojiStickerSet | tl.RawChannelAdminLogEventActionToggleSignatureProfiles | tl.RawChannelAdminLogEventActionParticipantSubExtend | tl.RawChannelAdminLogEventActionToggleAutotranslation | tl.RawChannelAdminLogEventActionParticipantEditRank function isAnyChannelAdminLogEventAction(o: object): o is TypeChannelAdminLogEventAction /** * An event in a channel admin log */ type TypeChannelAdminLogEvent = tl.RawChannelAdminLogEvent function isAnyChannelAdminLogEvent(o: object): o is TypeChannelAdminLogEvent /** * Filter for fetching events in the channel admin log */ type TypeChannelAdminLogEventsFilter = tl.RawChannelAdminLogEventsFilter function isAnyChannelAdminLogEventsFilter(o: object): o is TypeChannelAdminLogEventsFilter /** * Popular contact */ type TypePopularContact = tl.RawPopularContact function isAnyPopularContact(o: object): o is TypePopularContact /** * Recent t.me urls */ type TypeRecentMeUrl = tl.RawRecentMeUrlUnknown | tl.RawRecentMeUrlUser | tl.RawRecentMeUrlChat | tl.RawRecentMeUrlChatInvite | tl.RawRecentMeUrlStickerSet function isAnyRecentMeUrl(o: object): o is TypeRecentMeUrl /** * A single media in an * album * or grouped media sent with * {@link messages.RawSendMultiMediaRequest}. */ type TypeInputSingleMedia = tl.RawInputSingleMedia function isAnyInputSingleMedia(o: object): o is TypeInputSingleMedia /** * Web authorization */ type TypeWebAuthorization = tl.RawWebAuthorization function isAnyWebAuthorization(o: object): o is TypeWebAuthorization /** * A message */ type TypeInputMessage = tl.RawInputMessageID | tl.RawInputMessageReplyTo | tl.RawInputMessagePinned | tl.RawInputMessageCallbackQuery function isAnyInputMessage(o: object): o is TypeInputMessage /** * Peer, or all peers in a certain folder */ type TypeInputDialogPeer = tl.RawInputDialogPeer | tl.RawInputDialogPeerFolder function isAnyInputDialogPeer(o: object): o is TypeInputDialogPeer /** * Peer, or all peers in a folder */ type TypeDialogPeer = tl.RawDialogPeer | tl.RawDialogPeerFolder function isAnyDialogPeer(o: object): o is TypeDialogPeer /** * Hash of an uploaded file, to be checked for validity after * download */ type TypeFileHash = tl.RawFileHash function isAnyFileHash(o: object): o is TypeFileHash /** * Info about an * MTProxy * used to connect. */ type TypeInputClientProxy = tl.RawInputClientProxy function isAnyInputClientProxy(o: object): o is TypeInputClientProxy /** * Secure * passport * file, for more info * see * the passport docs » */ type TypeInputSecureFile = tl.RawInputSecureFileUploaded | tl.RawInputSecureFile function isAnyInputSecureFile(o: object): o is TypeInputSecureFile /** * Secure * passport * file, for more info * see * the passport docs » */ type TypeSecureFile = tl.RawSecureFileEmpty | tl.RawSecureFile function isAnySecureFile(o: object): o is TypeSecureFile /** * Secure * passport * data, for more info * see * the passport docs » */ type TypeSecureData = tl.RawSecureData function isAnySecureData(o: object): o is TypeSecureData /** * Plaintext verified * passport * data. */ type TypeSecurePlainData = tl.RawSecurePlainPhone | tl.RawSecurePlainEmail function isAnySecurePlainData(o: object): o is TypeSecurePlainData /** * Secure value type */ type TypeSecureValueType = tl.RawSecureValueTypePersonalDetails | tl.RawSecureValueTypePassport | tl.RawSecureValueTypeDriverLicense | tl.RawSecureValueTypeIdentityCard | tl.RawSecureValueTypeInternalPassport | tl.RawSecureValueTypeAddress | tl.RawSecureValueTypeUtilityBill | tl.RawSecureValueTypeBankStatement | tl.RawSecureValueTypeRentalAgreement | tl.RawSecureValueTypePassportRegistration | tl.RawSecureValueTypeTemporaryRegistration | tl.RawSecureValueTypePhone | tl.RawSecureValueTypeEmail function isAnySecureValueType(o: object): o is TypeSecureValueType /** * Secure Telegram Passport value */ type TypeSecureValue = tl.RawSecureValue function isAnySecureValue(o: object): o is TypeSecureValue /** * Secure value, * for * more info see the passport docs » */ type TypeInputSecureValue = tl.RawInputSecureValue function isAnyInputSecureValue(o: object): o is TypeInputSecureValue /** * Secure value hash */ type TypeSecureValueHash = tl.RawSecureValueHash function isAnySecureValueHash(o: object): o is TypeSecureValueHash /** * Secure value error */ type TypeSecureValueError = tl.RawSecureValueErrorData | tl.RawSecureValueErrorFrontSide | tl.RawSecureValueErrorReverseSide | tl.RawSecureValueErrorSelfie | tl.RawSecureValueErrorFile | tl.RawSecureValueErrorFiles | tl.RawSecureValueError | tl.RawSecureValueErrorTranslationFile | tl.RawSecureValueErrorTranslationFiles function isAnySecureValueError(o: object): o is TypeSecureValueError /** * Encrypted secure credentials */ type TypeSecureCredentialsEncrypted = tl.RawSecureCredentialsEncrypted function isAnySecureCredentialsEncrypted(o: object): o is TypeSecureCredentialsEncrypted /** * Saved contact */ type TypeSavedContact = tl.RawSavedPhoneContact function isAnySavedContact(o: object): o is TypeSavedContact /** * Key derivation function to use when generating the * password * hash for SRP two-factor authorization */ type TypePasswordKdfAlgo = tl.RawPasswordKdfAlgoUnknown | tl.RawPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow function isAnyPasswordKdfAlgo(o: object): o is TypePasswordKdfAlgo /** * KDF algorithm to use for computing telegram * passport * hash */ type TypeSecurePasswordKdfAlgo = tl.RawSecurePasswordKdfAlgoUnknown | tl.RawSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 | tl.RawSecurePasswordKdfAlgoSHA512 function isAnySecurePasswordKdfAlgo(o: object): o is TypeSecurePasswordKdfAlgo /** * Telegram * passport * settings */ type TypeSecureSecretSettings = tl.RawSecureSecretSettings function isAnySecureSecretSettings(o: object): o is TypeSecureSecretSettings /** * Constructors for checking the validity of a * 2FA SRP * password. * * See * here * » for more info on the 2FA authentication flow for * methods that require it, before and after login. */ type TypeInputCheckPasswordSRP = tl.RawInputCheckPasswordEmpty | tl.RawInputCheckPasswordSRP function isAnyInputCheckPasswordSRP(o: object): o is TypeInputCheckPasswordSRP /** * Required secure file type */ type TypeSecureRequiredType = tl.RawSecureRequiredType | tl.RawSecureRequiredTypeOneOf function isAnySecureRequiredType(o: object): o is TypeSecureRequiredType /** * Object contains info about an event that occurred in the * application. */ type TypeInputAppEvent = tl.RawInputAppEvent function isAnyInputAppEvent(o: object): o is TypeInputAppEvent /** * JSON key: value pair */ type TypeJSONObjectValue = tl.RawJsonObjectValue function isAnyJSONObjectValue(o: object): o is TypeJSONObjectValue /** * JSON value */ type TypeJSONValue = tl.RawJsonNull | tl.RawJsonBool | tl.RawJsonNumber | tl.RawJsonString | tl.RawJsonArray | tl.RawJsonObject function isAnyJSONValue(o: object): o is TypeJSONValue /** * Represents a table in an * instant view * table */ type TypePageTableCell = tl.RawPageTableCell function isAnyPageTableCell(o: object): o is TypePageTableCell /** * Table row */ type TypePageTableRow = tl.RawPageTableRow function isAnyPageTableRow(o: object): o is TypePageTableRow /** * Page caption */ type TypePageCaption = tl.RawPageCaption function isAnyPageCaption(o: object): o is TypePageCaption /** * Item in block list */ type TypePageListItem = tl.RawPageListItemText | tl.RawPageListItemBlocks function isAnyPageListItem(o: object): o is TypePageListItem /** * Represents an * instant view * ordered list */ type TypePageListOrderedItem = tl.RawPageListOrderedItemText | tl.RawPageListOrderedItemBlocks function isAnyPageListOrderedItem(o: object): o is TypePageListOrderedItem /** * Related articles */ type TypePageRelatedArticle = tl.RawPageRelatedArticle function isAnyPageRelatedArticle(o: object): o is TypePageRelatedArticle /** * Instant view * page */ type TypePage = tl.RawPage function isAnyPage(o: object): o is TypePage /** * Indicates a possible answer to a * poll. */ type TypePollAnswer = tl.RawPollAnswer function isAnyPollAnswer(o: object): o is TypePollAnswer /** * Indicates a poll message */ type TypePoll = tl.RawPoll function isAnyPoll(o: object): o is TypePoll /** * How users voted on a certain poll answer */ type TypePollAnswerVoters = tl.RawPollAnswerVoters function isAnyPollAnswerVoters(o: object): o is TypePollAnswerVoters /** * Results of poll */ type TypePollResults = tl.RawPollResults function isAnyPollResults(o: object): o is TypePollResults /** * Number of online users in a chat */ type TypeChatOnlines = tl.RawChatOnlines function isAnyChatOnlines(o: object): o is TypeChatOnlines /** * URL with chat statistics */ type TypeStatsURL = tl.RawStatsURL function isAnyStatsURL(o: object): o is TypeStatsURL /** * Represents the rights of an admin in a * channel/supergroup. */ type TypeChatAdminRights = tl.RawChatAdminRights function isAnyChatAdminRights(o: object): o is TypeChatAdminRights /** * Represents the rights of a normal user in a * supergroup/channel/chat. */ type TypeChatBannedRights = tl.RawChatBannedRights function isAnyChatBannedRights(o: object): o is TypeChatBannedRights /** * Wallpaper */ type TypeInputWallPaper = tl.RawInputWallPaper | tl.RawInputWallPaperSlug | tl.RawInputWallPaperNoFile function isAnyInputWallPaper(o: object): o is TypeInputWallPaper /** * Settings for the code type to send */ type TypeCodeSettings = tl.RawCodeSettings function isAnyCodeSettings(o: object): o is TypeCodeSettings /** * Wallpaper rendering information. */ type TypeWallPaperSettings = tl.RawWallPaperSettings function isAnyWallPaperSettings(o: object): o is TypeWallPaperSettings /** * Media autodownload settings */ type TypeAutoDownloadSettings = tl.RawAutoDownloadSettings function isAnyAutoDownloadSettings(o: object): o is TypeAutoDownloadSettings /** * Emoji keyword */ type TypeEmojiKeyword = tl.RawEmojiKeyword | tl.RawEmojiKeywordDeleted function isAnyEmojiKeyword(o: object): o is TypeEmojiKeyword /** * New emoji keywords */ type TypeEmojiKeywordsDifference = tl.RawEmojiKeywordsDifference function isAnyEmojiKeywordsDifference(o: object): o is TypeEmojiKeywordsDifference /** * Emoji URL */ type TypeEmojiURL = tl.RawEmojiURL function isAnyEmojiURL(o: object): o is TypeEmojiURL /** * Emoji language */ type TypeEmojiLanguage = tl.RawEmojiLanguage function isAnyEmojiLanguage(o: object): o is TypeEmojiLanguage /** * A folder */ type TypeFolder = tl.RawFolder function isAnyFolder(o: object): o is TypeFolder /** * Peer in a folder */ type TypeInputFolderPeer = tl.RawInputFolderPeer function isAnyInputFolderPeer(o: object): o is TypeInputFolderPeer /** * Peer associated to folder */ type TypeFolderPeer = tl.RawFolderPeer function isAnyFolderPeer(o: object): o is TypeFolderPeer /** * URL authorization result */ type TypeUrlAuthResult = tl.RawUrlAuthResultRequest | tl.RawUrlAuthResultAccepted | tl.RawUrlAuthResultDefault function isAnyUrlAuthResult(o: object): o is TypeUrlAuthResult /** * Geographical location of supergroup (geogroups) */ type TypeChannelLocation = tl.RawChannelLocationEmpty | tl.RawChannelLocation function isAnyChannelLocation(o: object): o is TypeChannelLocation /** * Geolocated peer */ type TypePeerLocated = tl.RawPeerLocated | tl.RawPeerSelfLocated function isAnyPeerLocated(o: object): o is TypePeerLocated /** * Restriction reason */ type TypeRestrictionReason = tl.RawRestrictionReason function isAnyRestrictionReason(o: object): o is TypeRestrictionReason /** * Cloud theme */ type TypeInputTheme = tl.RawInputTheme | tl.RawInputThemeSlug function isAnyInputTheme(o: object): o is TypeInputTheme /** * Cloud theme */ type TypeTheme = tl.RawTheme function isAnyTheme(o: object): o is TypeTheme /** * Basic theme settings */ type TypeBaseTheme = tl.RawBaseThemeClassic | tl.RawBaseThemeDay | tl.RawBaseThemeNight | tl.RawBaseThemeTinted | tl.RawBaseThemeArctic function isAnyBaseTheme(o: object): o is TypeBaseTheme /** * Theme settings */ type TypeInputThemeSettings = tl.RawInputThemeSettings function isAnyInputThemeSettings(o: object): o is TypeInputThemeSettings /** * Theme settings */ type TypeThemeSettings = tl.RawThemeSettings function isAnyThemeSettings(o: object): o is TypeThemeSettings /** * Webpage attributes */ type TypeWebPageAttribute = tl.RawWebPageAttributeTheme | tl.RawWebPageAttributeStory | tl.RawWebPageAttributeStickerSet | tl.RawWebPageAttributeUniqueStarGift | tl.RawWebPageAttributeStarGiftCollection | tl.RawWebPageAttributeStarGiftAuction function isAnyWebPageAttribute(o: object): o is TypeWebPageAttribute /** * Credit card info URL provided by the bank */ type TypeBankCardOpenUrl = tl.RawBankCardOpenUrl function isAnyBankCardOpenUrl(o: object): o is TypeBankCardOpenUrl /** * Dialog filter * (folder * ») */ type TypeDialogFilter = tl.RawDialogFilter | tl.RawDialogFilterDefault | tl.RawDialogFilterChatlist function isAnyDialogFilter(o: object): o is TypeDialogFilter /** * Suggested dialog filters * (folder * ») */ type TypeDialogFilterSuggested = tl.RawDialogFilterSuggested function isAnyDialogFilterSuggested(o: object): o is TypeDialogFilterSuggested /** * Channel statistics date range */ type TypeStatsDateRangeDays = tl.RawStatsDateRangeDays function isAnyStatsDateRangeDays(o: object): o is TypeStatsDateRangeDays /** * Channel statistics value pair */ type TypeStatsAbsValueAndPrev = tl.RawStatsAbsValueAndPrev function isAnyStatsAbsValueAndPrev(o: object): o is TypeStatsAbsValueAndPrev /** * Channel statistics percentage */ type TypeStatsPercentValue = tl.RawStatsPercentValue function isAnyStatsPercentValue(o: object): o is TypeStatsPercentValue /** * Channel statistics graph */ type TypeStatsGraph = tl.RawStatsGraphAsync | tl.RawStatsGraphError | tl.RawStatsGraph function isAnyStatsGraph(o: object): o is TypeStatsGraph /** * Represents an animated video thumbnail */ type TypeVideoSize = tl.RawVideoSize | tl.RawVideoSizeEmojiMarkup | tl.RawVideoSizeStickerMarkup function isAnyVideoSize(o: object): o is TypeVideoSize /** * Most active user in a * supergroup */ type TypeStatsGroupTopPoster = tl.RawStatsGroupTopPoster function isAnyStatsGroupTopPoster(o: object): o is TypeStatsGroupTopPoster /** * Most active admin in a * supergroup */ type TypeStatsGroupTopAdmin = tl.RawStatsGroupTopAdmin function isAnyStatsGroupTopAdmin(o: object): o is TypeStatsGroupTopAdmin /** * Most active inviter in a * supergroup */ type TypeStatsGroupTopInviter = tl.RawStatsGroupTopInviter function isAnyStatsGroupTopInviter(o: object): o is TypeStatsGroupTopInviter /** * Global privacy settings */ type TypeGlobalPrivacySettings = tl.RawGlobalPrivacySettings function isAnyGlobalPrivacySettings(o: object): o is TypeGlobalPrivacySettings /** * View, forward counter + info about replies of a specific * message */ type TypeMessageViews = tl.RawMessageViews function isAnyMessageViews(o: object): o is TypeMessageViews /** * Reply information */ type TypeMessageReplyHeader = tl.RawMessageReplyHeader | tl.RawMessageReplyStoryHeader function isAnyMessageReplyHeader(o: object): o is TypeMessageReplyHeader /** * Info about * post * comments (for channels) or message replies (for groups) */ type TypeMessageReplies = tl.RawMessageReplies function isAnyMessageReplies(o: object): o is TypeMessageReplies /** * Info about a blocked user */ type TypePeerBlocked = tl.RawPeerBlocked function isAnyPeerBlocked(o: object): o is TypePeerBlocked /** * A group call */ type TypeGroupCall = tl.RawGroupCallDiscarded | tl.RawGroupCall function isAnyGroupCall(o: object): o is TypeGroupCall /** * Indicates a group call */ type TypeInputGroupCall = tl.RawInputGroupCall | tl.RawInputGroupCallSlug | tl.RawInputGroupCallInviteMessage function isAnyInputGroupCall(o: object): o is TypeInputGroupCall /** * Info about a group call participant */ type TypeGroupCallParticipant = tl.RawGroupCallParticipant function isAnyGroupCallParticipant(o: object): o is TypeGroupCallParticipant /** * Inline query peer type. */ type TypeInlineQueryPeerType = tl.RawInlineQueryPeerTypeSameBotPM | tl.RawInlineQueryPeerTypePM | tl.RawInlineQueryPeerTypeChat | tl.RawInlineQueryPeerTypeMegagroup | tl.RawInlineQueryPeerTypeBroadcast | tl.RawInlineQueryPeerTypeBotPM function isAnyInlineQueryPeerType(o: object): o is TypeInlineQueryPeerType /** * When and which user joined the chat using a chat invite */ type TypeChatInviteImporter = tl.RawChatInviteImporter function isAnyChatInviteImporter(o: object): o is TypeChatInviteImporter /** * Info about chat invites generated by admins. */ type TypeChatAdminWithInvites = tl.RawChatAdminWithInvites function isAnyChatAdminWithInvites(o: object): o is TypeChatAdminWithInvites /** * Describes a group of video synchronization source * identifiers */ type TypeGroupCallParticipantVideoSourceGroup = tl.RawGroupCallParticipantVideoSourceGroup function isAnyGroupCallParticipantVideoSourceGroup(o: object): o is TypeGroupCallParticipantVideoSourceGroup /** * Info about a video stream */ type TypeGroupCallParticipantVideo = tl.RawGroupCallParticipantVideo function isAnyGroupCallParticipantVideo(o: object): o is TypeGroupCallParticipantVideo /** * Represents a scope where the bot commands, specified using * {@link bots.RawSetBotCommandsRequest} will be valid. */ type TypeBotCommandScope = tl.RawBotCommandScopeDefault | tl.RawBotCommandScopeUsers | tl.RawBotCommandScopeChats | tl.RawBotCommandScopeChatAdmins | tl.RawBotCommandScopePeer | tl.RawBotCommandScopePeerAdmins | tl.RawBotCommandScopePeerUser function isAnyBotCommandScope(o: object): o is TypeBotCommandScope /** * A chat theme */ type TypeChatTheme = tl.RawChatTheme | tl.RawChatThemeUniqueGift function isAnyChatTheme(o: object): o is TypeChatTheme /** * A sponsored message */ type TypeSponsoredMessage = tl.RawSponsoredMessage function isAnySponsoredMessage(o: object): o is TypeSponsoredMessage /** * Information about found messages sent on a specific day, * used to split the messages in * {@link messages.RawSearchResultsCalendar} constructors by * days. */ type TypeSearchResultsCalendarPeriod = tl.RawSearchResultsCalendarPeriod function isAnySearchResultsCalendarPeriod(o: object): o is TypeSearchResultsCalendarPeriod /** * Information about a message in a specific position */ type TypeSearchResultsPosition = tl.RawSearchResultPosition function isAnySearchResultsPosition(o: object): o is TypeSearchResultsPosition /** * Number of users that reacted with a certain emoji */ type TypeReactionCount = tl.RawReactionCount function isAnyReactionCount(o: object): o is TypeReactionCount /** * Message * reactions » */ type TypeMessageReactions = tl.RawMessageReactions function isAnyMessageReactions(o: object): o is TypeMessageReactions /** * Animations associated with a message reaction */ type TypeAvailableReaction = tl.RawAvailableReaction function isAnyAvailableReaction(o: object): o is TypeAvailableReaction /** * How a certain peer reacted to the message */ type TypeMessagePeerReaction = tl.RawMessagePeerReaction function isAnyMessagePeerReaction(o: object): o is TypeMessagePeerReaction /** * Info about an RTMP stream in a group call or livestream */ type TypeGroupCallStreamChannel = tl.RawGroupCallStreamChannel function isAnyGroupCallStreamChannel(o: object): o is TypeGroupCallStreamChannel /** * Represents an attachment menu icon color for * bot * mini apps » */ type TypeAttachMenuBotIconColor = tl.RawAttachMenuBotIconColor function isAnyAttachMenuBotIconColor(o: object): o is TypeAttachMenuBotIconColor /** * Represents an attachment menu icon for * bot * mini apps » */ type TypeAttachMenuBotIcon = tl.RawAttachMenuBotIcon function isAnyAttachMenuBotIcon(o: object): o is TypeAttachMenuBotIcon /** * Represents a * bot * mini app that can be launched from the attachment menu » */ type TypeAttachMenuBot = tl.RawAttachMenuBot function isAnyAttachMenuBot(o: object): o is TypeAttachMenuBot /** * Represents a list of * bot * mini apps that can be launched from the attachment menu * » */ type TypeAttachMenuBots = tl.RawAttachMenuBotsNotModified | tl.RawAttachMenuBots function isAnyAttachMenuBots(o: object): o is TypeAttachMenuBots /** * Represents a * bot * mini app that can be launched from the attachment menu » */ type TypeAttachMenuBotsBot = tl.RawAttachMenuBotsBot function isAnyAttachMenuBotsBot(o: object): o is TypeAttachMenuBotsBot /** * Contains the webview URL with appropriate theme and user * info parameters added */ type TypeWebViewResult = tl.RawWebViewResultUrl function isAnyWebViewResult(o: object): o is TypeWebViewResult /** * Contains information about an inline message sent by a * Web App * on behalf of a user. */ type TypeWebViewMessageSent = tl.RawWebViewMessageSent function isAnyWebViewMessageSent(o: object): o is TypeWebViewMessageSent /** * Indicates the action to execute when pressing the in-UI menu * button for bots */ type TypeBotMenuButton = tl.RawBotMenuButtonDefault | tl.RawBotMenuButtonCommands | tl.RawBotMenuButton function isAnyBotMenuButton(o: object): o is TypeBotMenuButton /** * Represents a notification sound */ type TypeNotificationSound = tl.RawNotificationSoundDefault | tl.RawNotificationSoundNone | tl.RawNotificationSoundLocal | tl.RawNotificationSoundRingtone function isAnyNotificationSound(o: object): o is TypeNotificationSound /** * Indicates a supported peer type for a * bot * mini app attachment menu */ type TypeAttachMenuPeerType = tl.RawAttachMenuPeerTypeSameBotPM | tl.RawAttachMenuPeerTypeBotPM | tl.RawAttachMenuPeerTypePM | tl.RawAttachMenuPeerTypeChat | tl.RawAttachMenuPeerTypeBroadcast function isAnyAttachMenuPeerType(o: object): o is TypeAttachMenuPeerType /** * An invoice */ type TypeInputInvoice = tl.RawInputInvoiceMessage | tl.RawInputInvoiceSlug | tl.RawInputInvoicePremiumGiftCode | tl.RawInputInvoiceStars | tl.RawInputInvoiceChatInviteSubscription | tl.RawInputInvoiceStarGift | tl.RawInputInvoiceStarGiftUpgrade | tl.RawInputInvoiceStarGiftTransfer | tl.RawInputInvoicePremiumGiftStars | tl.RawInputInvoiceBusinessBotTransferStars | tl.RawInputInvoiceStarGiftResale | tl.RawInputInvoiceStarGiftPrepaidUpgrade | tl.RawInputInvoicePremiumAuthCode | tl.RawInputInvoiceStarGiftDropOriginalDetails | tl.RawInputInvoiceStarGiftAuctionBid function isAnyInputInvoice(o: object): o is TypeInputInvoice /** * Info about a Telegram Premium purchase */ type TypeInputStorePaymentPurpose = tl.RawInputStorePaymentPremiumSubscription | tl.RawInputStorePaymentGiftPremium | tl.RawInputStorePaymentPremiumGiftCode | tl.RawInputStorePaymentPremiumGiveaway | tl.RawInputStorePaymentStarsTopup | tl.RawInputStorePaymentStarsGift | tl.RawInputStorePaymentStarsGiveaway | tl.RawInputStorePaymentAuthCode function isAnyInputStorePaymentPurpose(o: object): o is TypeInputStorePaymentPurpose /** * Represents a payment method */ type TypePaymentFormMethod = tl.RawPaymentFormMethod function isAnyPaymentFormMethod(o: object): o is TypePaymentFormMethod /** * Emoji * status */ type TypeEmojiStatus = tl.RawEmojiStatusEmpty | tl.RawEmojiStatus | tl.RawEmojiStatusCollectible | tl.RawInputEmojiStatusCollectible function isAnyEmojiStatus(o: object): o is TypeEmojiStatus /** * Message * reaction */ type TypeReaction = tl.RawReactionEmpty | tl.RawReactionEmoji | tl.RawReactionCustomEmoji | tl.RawReactionPaid function isAnyReaction(o: object): o is TypeReaction /** * Available chat reactions */ type TypeChatReactions = tl.RawChatReactionsNone | tl.RawChatReactionsAll | tl.RawChatReactionsSome function isAnyChatReactions(o: object): o is TypeChatReactions /** * Email verification purpose */ type TypeEmailVerifyPurpose = tl.RawEmailVerifyPurposeLoginSetup | tl.RawEmailVerifyPurposeLoginChange | tl.RawEmailVerifyPurposePassport function isAnyEmailVerifyPurpose(o: object): o is TypeEmailVerifyPurpose /** * Email verification code or token */ type TypeEmailVerification = tl.RawEmailVerificationCode | tl.RawEmailVerificationGoogle | tl.RawEmailVerificationApple function isAnyEmailVerification(o: object): o is TypeEmailVerification /** * Telegram Premium subscription option */ type TypePremiumSubscriptionOption = tl.RawPremiumSubscriptionOption function isAnyPremiumSubscriptionOption(o: object): o is TypePremiumSubscriptionOption /** * Indicates a peer that can be used to send messages */ type TypeSendAsPeer = tl.RawSendAsPeer function isAnySendAsPeer(o: object): o is TypeSendAsPeer /** * Paid * media, see here » for more info. */ type TypeMessageExtendedMedia = tl.RawMessageExtendedMediaPreview | tl.RawMessageExtendedMedia function isAnyMessageExtendedMedia(o: object): o is TypeMessageExtendedMedia /** * Keywords for a certain sticker */ type TypeStickerKeyword = tl.RawStickerKeyword function isAnyStickerKeyword(o: object): o is TypeStickerKeyword /** * Contains information about a username */ type TypeUsername = tl.RawUsername function isAnyUsername(o: object): o is TypeUsername /** * Contains information about a * forum * topic */ type TypeForumTopic = tl.RawForumTopicDeleted | tl.RawForumTopic function isAnyForumTopic(o: object): o is TypeForumTopic /** * Contains info about the default value of the Time-To-Live * setting, applied to all new chats. */ type TypeDefaultHistoryTTL = tl.RawDefaultHistoryTTL function isAnyDefaultHistoryTTL(o: object): o is TypeDefaultHistoryTTL /** * Describes a * temporary * profile link. */ type TypeExportedContactToken = tl.RawExportedContactToken function isAnyExportedContactToken(o: object): o is TypeExportedContactToken /** * Filtering criteria to use for the peer selection list shown * to the user. */ type TypeRequestPeerType = tl.RawRequestPeerTypeUser | tl.RawRequestPeerTypeChat | tl.RawRequestPeerTypeBroadcast function isAnyRequestPeerType(o: object): o is TypeRequestPeerType /** * Represents a list of * custom * emojis. */ type TypeEmojiList = tl.RawEmojiListNotModified | tl.RawEmojiList function isAnyEmojiList(o: object): o is TypeEmojiList /** * Represents an * emoji * category. */ type TypeEmojiGroup = tl.RawEmojiGroup | tl.RawEmojiGroupGreeting | tl.RawEmojiGroupPremium function isAnyEmojiGroup(o: object): o is TypeEmojiGroup /** * Styled text with * message * entities */ type TypeTextWithEntities = tl.RawTextWithEntities function isAnyTextWithEntities(o: object): o is TypeTextWithEntities /** * Media autosave settings */ type TypeAutoSaveSettings = tl.RawAutoSaveSettings function isAnyAutoSaveSettings(o: object): o is TypeAutoSaveSettings /** * Peer-specific autosave settings */ type TypeAutoSaveException = tl.RawAutoSaveException function isAnyAutoSaveException(o: object): o is TypeAutoSaveException /** * Used to fetch information about a * direct * link Mini App */ type TypeInputBotApp = tl.RawInputBotAppID | tl.RawInputBotAppShortName function isAnyInputBotApp(o: object): o is TypeInputBotApp /** * Contains information about a * direct * link Mini App. */ type TypeBotApp = tl.RawBotAppNotModified | tl.RawBotApp function isAnyBotApp(o: object): o is TypeBotApp /** * Specifies an * inline * mode mini app button, shown on top of the inline query * results list. */ type TypeInlineBotWebView = tl.RawInlineBotWebView function isAnyInlineBotWebView(o: object): o is TypeInlineBotWebView /** * Contains info about when a certain participant has read a * message */ type TypeReadParticipantDate = tl.RawReadParticipantDate function isAnyReadParticipantDate(o: object): o is TypeReadParticipantDate /** * Represents a folder */ type TypeInputChatlist = tl.RawInputChatlistDialogFilter function isAnyInputChatlist(o: object): o is TypeInputChatlist /** * An exported * chat * folder deep link ». */ type TypeExportedChatlistInvite = tl.RawExportedChatlistInvite function isAnyExportedChatlistInvite(o: object): o is TypeExportedChatlistInvite /** * How a user voted in a poll */ type TypeMessagePeerVote = tl.RawMessagePeerVote | tl.RawMessagePeerVoteInputOption | tl.RawMessagePeerVoteMultiple function isAnyMessagePeerVote(o: object): o is TypeMessagePeerVote /** * Aggregated view and reaction information of a * story */ type TypeStoryViews = tl.RawStoryViews function isAnyStoryViews(o: object): o is TypeStoryViews /** * Represents a * Telegram * Story */ type TypeStoryItem = tl.RawStoryItemDeleted | tl.RawStoryItemSkipped | tl.RawStoryItem function isAnyStoryItem(o: object): o is TypeStoryItem /** * Story * view date and reaction information */ type TypeStoryView = tl.RawStoryView | tl.RawStoryViewPublicForward | tl.RawStoryViewPublicRepost function isAnyStoryView(o: object): o is TypeStoryView /** * Contains info about a message or story to reply to. */ type TypeInputReplyTo = tl.RawInputReplyToMessage | tl.RawInputReplyToStory | tl.RawInputReplyToMonoForum function isAnyInputReplyTo(o: object): o is TypeInputReplyTo /** * Represents a * story * deep link */ type TypeExportedStoryLink = tl.RawExportedStoryLink function isAnyExportedStoryLink(o: object): o is TypeExportedStoryLink /** * Story * stealth mode status */ type TypeStoriesStealthMode = tl.RawStoriesStealthMode function isAnyStoriesStealthMode(o: object): o is TypeStoriesStealthMode /** * Coordinates and size of a clickable rectangular area on top * of a story. */ type TypeMediaAreaCoordinates = tl.RawMediaAreaCoordinates function isAnyMediaAreaCoordinates(o: object): o is TypeMediaAreaCoordinates /** * Represents a * story * media area » */ type TypeMediaArea = tl.RawMediaAreaVenue | tl.RawInputMediaAreaVenue | tl.RawMediaAreaGeoPoint | tl.RawMediaAreaSuggestedReaction | tl.RawMediaAreaChannelPost | tl.RawInputMediaAreaChannelPost | tl.RawMediaAreaUrl | tl.RawMediaAreaWeather | tl.RawMediaAreaStarGift function isAnyMediaArea(o: object): o is TypeMediaArea /** * Stories * associated to a peer */ type TypePeerStories = tl.RawPeerStories function isAnyPeerStories(o: object): o is TypePeerStories /** * Giveaway * option. */ type TypePremiumGiftCodeOption = tl.RawPremiumGiftCodeOption function isAnyPremiumGiftCodeOption(o: object): o is TypePremiumGiftCodeOption /** * Contains info about a * prepaid * giveaway ». */ type TypePrepaidGiveaway = tl.RawPrepaidGiveaway | tl.RawPrepaidStarsGiveaway function isAnyPrepaidGiveaway(o: object): o is TypePrepaidGiveaway /** * Info about one or more * boosts * applied by a specific user. */ type TypeBoost = tl.RawBoost function isAnyBoost(o: object): o is TypeBoost /** * Contains information about a single * boost slot * ». */ type TypeMyBoost = tl.RawMyBoost function isAnyMyBoost(o: object): o is TypeMyBoost /** * Contains info about the original poster of a reposted story. */ type TypeStoryFwdHeader = tl.RawStoryFwdHeader function isAnyStoryFwdHeader(o: object): o is TypeStoryFwdHeader /** * Interaction counters */ type TypePostInteractionCounters = tl.RawPostInteractionCountersMessage | tl.RawPostInteractionCountersStory function isAnyPostInteractionCounters(o: object): o is TypePostInteractionCounters /** * Contains info about the forwards of a * story * as a message to public chats and reposts by public channels. */ type TypePublicForward = tl.RawPublicForwardMessage | tl.RawPublicForwardStory function isAnyPublicForward(o: object): o is TypePublicForward /** * Represents a * color * palette ». */ type TypePeerColor = tl.RawPeerColor | tl.RawPeerColorCollectible | tl.RawInputPeerColorCollectible function isAnyPeerColor(o: object): o is TypePeerColor /** * How a certain peer reacted to or interacted with a story */ type TypeStoryReaction = tl.RawStoryReaction | tl.RawStoryReactionPublicForward | tl.RawStoryReactionPublicRepost function isAnyStoryReaction(o: object): o is TypeStoryReaction /** * Represents a * saved * message dialog ». */ type TypeSavedDialog = tl.RawSavedDialog | tl.RawMonoForumDialog function isAnySavedDialog(o: object): o is TypeSavedDialog /** * Info about a * saved * message reaction tag ». */ type TypeSavedReactionTag = tl.RawSavedReactionTag function isAnySavedReactionTag(o: object): o is TypeSavedReactionTag /** * Exact read date of a private message we sent to another * user. */ type TypeOutboxReadDate = tl.RawOutboxReadDate function isAnyOutboxReadDate(o: object): o is TypeOutboxReadDate /** * Info about an SMS job. */ type TypeSmsJob = tl.RawSmsJob function isAnySmsJob(o: object): o is TypeSmsJob /** * A time interval, indicating the opening hours of a * Telegram * Business. */ type TypeBusinessWeeklyOpen = tl.RawBusinessWeeklyOpen function isAnyBusinessWeeklyOpen(o: object): o is TypeBusinessWeeklyOpen /** * Specifies a set of * Telegram * Business opening hours. */ type TypeBusinessWorkHours = tl.RawBusinessWorkHours function isAnyBusinessWorkHours(o: object): o is TypeBusinessWorkHours /** * Represents the location of a * Telegram * Business ». */ type TypeBusinessLocation = tl.RawBusinessLocation function isAnyBusinessLocation(o: object): o is TypeBusinessLocation /** * Specifies the chats that can receive * Telegram Business * away * » and * greeting * » messages. * * If exclude_selected is set, specifies all chats * that cannot receive Telegram Business * away * » and * greeting * » messages. */ type TypeInputBusinessRecipients = tl.RawInputBusinessRecipients function isAnyInputBusinessRecipients(o: object): o is TypeInputBusinessRecipients /** * Specifies the chats that can receive * Telegram Business * away * » and * greeting * » messages. */ type TypeBusinessRecipients = tl.RawBusinessRecipients function isAnyBusinessRecipients(o: object): o is TypeBusinessRecipients /** * Specifies when should the * Telegram * Business away messages be sent. */ type TypeBusinessAwayMessageSchedule = tl.RawBusinessAwayMessageScheduleAlways | tl.RawBusinessAwayMessageScheduleOutsideWorkHours | tl.RawBusinessAwayMessageScheduleCustom function isAnyBusinessAwayMessageSchedule(o: object): o is TypeBusinessAwayMessageSchedule /** * Describes a * Telegram * Business greeting, automatically sent to new users * writing to us in private for the first time, or after a * certain inactivity period. */ type TypeInputBusinessGreetingMessage = tl.RawInputBusinessGreetingMessage function isAnyInputBusinessGreetingMessage(o: object): o is TypeInputBusinessGreetingMessage /** * Describes a * Telegram * Business greeting, automatically sent to new users * writing to us in private for the first time, or after a * certain inactivity period. */ type TypeBusinessGreetingMessage = tl.RawBusinessGreetingMessage function isAnyBusinessGreetingMessage(o: object): o is TypeBusinessGreetingMessage /** * Describes a * Telegram * Business away message, automatically sent to users * writing to us when we're offline, during closing hours, * while we're on vacation, or in some other custom time period * when we cannot immediately answer to the user. */ type TypeInputBusinessAwayMessage = tl.RawInputBusinessAwayMessage function isAnyInputBusinessAwayMessage(o: object): o is TypeInputBusinessAwayMessage /** * Describes a * Telegram * Business away message, automatically sent to users * writing to us when we're offline, during closing hours, * while we're on vacation, or in some other custom time period * when we cannot immediately answer to the user. */ type TypeBusinessAwayMessage = tl.RawBusinessAwayMessage function isAnyBusinessAwayMessage(o: object): o is TypeBusinessAwayMessage /** * Timezone information. */ type TypeTimezone = tl.RawTimezone function isAnyTimezone(o: object): o is TypeTimezone /** * A * quick * reply shortcut. */ type TypeQuickReply = tl.RawQuickReply function isAnyQuickReply(o: object): o is TypeQuickReply /** * Represents a * quick * reply shortcut ». */ type TypeInputQuickReplyShortcut = tl.RawInputQuickReplyShortcut | tl.RawInputQuickReplyShortcutId function isAnyInputQuickReplyShortcut(o: object): o is TypeInputQuickReplyShortcut /** * Contains info about a * connected * business bot ». */ type TypeConnectedBot = tl.RawConnectedBot function isAnyConnectedBot(o: object): o is TypeConnectedBot /** * Birthday * information for a user. */ type TypeBirthday = tl.RawBirthday function isAnyBirthday(o: object): o is TypeBirthday /** * Contains info about a * bot * business connection. */ type TypeBotBusinessConnection = tl.RawBotBusinessConnection function isAnyBotBusinessConnection(o: object): o is TypeBotBusinessConnection /** * Telegram * Business introduction ». */ type TypeInputBusinessIntro = tl.RawInputBusinessIntro function isAnyInputBusinessIntro(o: object): o is TypeInputBusinessIntro /** * Telegram * Business introduction ». */ type TypeBusinessIntro = tl.RawBusinessIntro function isAnyBusinessIntro(o: object): o is TypeBusinessIntro /** * Represents a * Fragment * collectible ». */ type TypeInputCollectible = tl.RawInputCollectibleUsername | tl.RawInputCollectiblePhone function isAnyInputCollectible(o: object): o is TypeInputCollectible /** * Specifies the private chats that a * connected * business bot » may interact with. */ type TypeInputBusinessBotRecipients = tl.RawInputBusinessBotRecipients function isAnyInputBusinessBotRecipients(o: object): o is TypeInputBusinessBotRecipients /** * Specifies the private chats that a * connected * business bot » may receive messages and interact with. */ type TypeBusinessBotRecipients = tl.RawBusinessBotRecipients function isAnyBusinessBotRecipients(o: object): o is TypeBusinessBotRecipients /** * Birthday information of a contact. */ type TypeContactBirthday = tl.RawContactBirthday function isAnyContactBirthday(o: object): o is TypeContactBirthday /** * Info about why a specific user could not be * invited * ». */ type TypeMissingInvitee = tl.RawMissingInvitee function isAnyMissingInvitee(o: object): o is TypeMissingInvitee /** * Contains info about a * business * chat deep link » to be created by the current account. */ type TypeInputBusinessChatLink = tl.RawInputBusinessChatLink function isAnyInputBusinessChatLink(o: object): o is TypeInputBusinessChatLink /** * Contains info about a * business * chat deep link » created by the current account. */ type TypeBusinessChatLink = tl.RawBusinessChatLink function isAnyBusinessChatLink(o: object): o is TypeBusinessChatLink /** * Info about a peer, shared by a user with the currently * logged in bot using * {@link messages.RawSendBotRequestedPeerRequest}. */ type TypeRequestedPeer = tl.RawRequestedPeerUser | tl.RawRequestedPeerChat | tl.RawRequestedPeerChannel function isAnyRequestedPeer(o: object): o is TypeRequestedPeer /** * A * report * option for a sponsored message ». */ type TypeSponsoredMessageReportOption = tl.RawSponsoredMessageReportOption function isAnySponsoredMessageReportOption(o: object): o is TypeSponsoredMessageReportOption /** * Reaction notification settings */ type TypeReactionNotificationsFrom = tl.RawReactionNotificationsFromContacts | tl.RawReactionNotificationsFromAll function isAnyReactionNotificationsFrom(o: object): o is TypeReactionNotificationsFrom /** * Reaction notification settings, see * here * » for more info. */ type TypeReactionsNotifySettings = tl.RawReactionsNotifySettings function isAnyReactionsNotifySettings(o: object): o is TypeReactionsNotifySettings /** * Describes a * message * effect ». */ type TypeAvailableEffect = tl.RawAvailableEffect function isAnyAvailableEffect(o: object): o is TypeAvailableEffect /** * Represents a * fact-check * » created by an independent fact-checker. */ type TypeFactCheck = tl.RawFactCheck function isAnyFactCheck(o: object): o is TypeFactCheck /** * Source of an incoming * Telegram * Star transaction, or its recipient for outgoing * Telegram * Star transactions. */ type TypeStarsTransactionPeer = tl.RawStarsTransactionPeerUnsupported | tl.RawStarsTransactionPeerAppStore | tl.RawStarsTransactionPeerPlayMarket | tl.RawStarsTransactionPeerPremiumBot | tl.RawStarsTransactionPeerFragment | tl.RawStarsTransactionPeer | tl.RawStarsTransactionPeerAds | tl.RawStarsTransactionPeerAPI function isAnyStarsTransactionPeer(o: object): o is TypeStarsTransactionPeer /** * Telegram * Stars topup option. */ type TypeStarsTopupOption = tl.RawStarsTopupOption function isAnyStarsTopupOption(o: object): o is TypeStarsTopupOption /** * Represents a * Telegram * Stars transaction ». */ type TypeStarsTransaction = tl.RawStarsTransaction function isAnyStarsTransaction(o: object): o is TypeStarsTransaction /** * A story found using * global * story search ». */ type TypeFoundStory = tl.RawFoundStory function isAnyFoundStory(o: object): o is TypeFoundStory /** * Address optionally associated to a {@link RawGeoPoint}. */ type TypeGeoPointAddress = tl.RawGeoPointAddress function isAnyGeoPointAddress(o: object): o is TypeGeoPointAddress /** * Describes * Telegram * Star revenue balances ». */ type TypeStarsRevenueStatus = tl.RawStarsRevenueStatus function isAnyStarsRevenueStatus(o: object): o is TypeStarsRevenueStatus /** * Used to fetch info about a * Telegram * Star transaction ». */ type TypeInputStarsTransaction = tl.RawInputStarsTransaction function isAnyInputStarsTransaction(o: object): o is TypeInputStarsTransaction /** * Telegram * Stars gift option. */ type TypeStarsGiftOption = tl.RawStarsGiftOption function isAnyStarsGiftOption(o: object): o is TypeStarsGiftOption /** * Represents a * Main * Mini App preview media, see here » for more info. */ type TypeBotPreviewMedia = tl.RawBotPreviewMedia function isAnyBotPreviewMedia(o: object): o is TypeBotPreviewMedia /** * Pricing of a * Telegram * Star subscription ». */ type TypeStarsSubscriptionPricing = tl.RawStarsSubscriptionPricing function isAnyStarsSubscriptionPricing(o: object): o is TypeStarsSubscriptionPricing /** * Represents a * Telegram * Star subscription ». */ type TypeStarsSubscription = tl.RawStarsSubscription function isAnyStarsSubscription(o: object): o is TypeStarsSubscription /** * Info about a user in the * paid * Star reactions leaderboard for a message. */ type TypeMessageReactor = tl.RawMessageReactor function isAnyMessageReactor(o: object): o is TypeMessageReactor /** * Contains info about a * Telegram * Star giveaway option. */ type TypeStarsGiveawayOption = tl.RawStarsGiveawayOption function isAnyStarsGiveawayOption(o: object): o is TypeStarsGiveawayOption /** * Represents a possible option for the number of winners in a * star giveaway */ type TypeStarsGiveawayWinnersOption = tl.RawStarsGiveawayWinnersOption function isAnyStarsGiveawayWinnersOption(o: object): o is TypeStarsGiveawayWinnersOption /** * Represents a * star gift, * see here » for more info. */ type TypeStarGift = tl.RawStarGift | tl.RawStarGiftUnique function isAnyStarGift(o: object): o is TypeStarGift /** * Report menu option */ type TypeMessageReportOption = tl.RawMessageReportOption function isAnyMessageReportOption(o: object): o is TypeMessageReportOption /** * Represents a report menu or result */ type TypeReportResult = tl.RawReportResultChooseOption | tl.RawReportResultAddComment | tl.RawReportResultReported function isAnyReportResult(o: object): o is TypeReportResult /** * Mini * app » settings */ type TypeBotAppSettings = tl.RawBotAppSettings function isAnyBotAppSettings(o: object): o is TypeBotAppSettings /** * Indo about an * affiliate * program offered by a bot */ type TypeStarRefProgram = tl.RawStarRefProgram function isAnyStarRefProgram(o: object): o is TypeStarRefProgram /** * Info about an * active * affiliate program we have with a Mini App */ type TypeConnectedBotStarRef = tl.RawConnectedBotStarRef function isAnyConnectedBotStarRef(o: object): o is TypeConnectedBotStarRef /** * Describes a real (i.e. possibly decimal) amount of * Telegram * Stars. */ type TypeStarsAmount = tl.RawStarsAmount | tl.RawStarsTonAmount function isAnyStarsAmount(o: object): o is TypeStarsAmount /** * Info about the current * verifier * bot ». */ type TypeBotVerifierSettings = tl.RawBotVerifierSettings function isAnyBotVerifierSettings(o: object): o is TypeBotVerifierSettings /** * Describes a * bot * verification icon ». */ type TypeBotVerification = tl.RawBotVerification function isAnyBotVerification(o: object): o is TypeBotVerification /** * An attribute of a * collectible * gift ». */ type TypeStarGiftAttribute = tl.RawStarGiftAttributeModel | tl.RawStarGiftAttributePattern | tl.RawStarGiftAttributeBackdrop | tl.RawStarGiftAttributeOriginalDetails function isAnyStarGiftAttribute(o: object): o is TypeStarGiftAttribute /** * Represents a * gift * owned by a peer. */ type TypeSavedStarGift = tl.RawSavedStarGift function isAnySavedStarGift(o: object): o is TypeSavedStarGift /** * Points to a * gift * ». */ type TypeInputSavedStarGift = tl.RawInputSavedStarGiftUser | tl.RawInputSavedStarGiftChat | tl.RawInputSavedStarGiftSlug function isAnyInputSavedStarGift(o: object): o is TypeInputSavedStarGift /** * Paid * reaction privacy settings » */ type TypePaidReactionPrivacy = tl.RawPaidReactionPrivacyDefault | tl.RawPaidReactionPrivacyAnonymous | tl.RawPaidReactionPrivacyPeer function isAnyPaidReactionPrivacy(o: object): o is TypePaidReactionPrivacy /** * Specifies a requirement that must be satisfied in order to * contact a user. */ type TypeRequirementToContact = tl.RawRequirementToContactEmpty | tl.RawRequirementToContactPremium | tl.RawRequirementToContactPaidMessages function isAnyRequirementToContact(o: object): o is TypeRequirementToContact /** * Business * bot rights. */ type TypeBusinessBotRights = tl.RawBusinessBotRights function isAnyBusinessBotRights(o: object): o is TypeBusinessBotRights /** * Disallow the reception of specific * gift * types. */ type TypeDisallowedGiftsSettings = tl.RawDisallowedGiftsSettings function isAnyDisallowedGiftsSettings(o: object): o is TypeDisallowedGiftsSettings /** * A sponsored peer. */ type TypeSponsoredPeer = tl.RawSponsoredPeer function isAnySponsoredPeer(o: object): o is TypeSponsoredPeer /** * Represents the identifier of a * collectible * gift attribute. */ type TypeStarGiftAttributeId = tl.RawStarGiftAttributeIdModel | tl.RawStarGiftAttributeIdPattern | tl.RawStarGiftAttributeIdBackdrop function isAnyStarGiftAttributeId(o: object): o is TypeStarGiftAttributeId /** * Indicates the total number of gifts that have the specified * attribute. */ type TypeStarGiftAttributeCounter = tl.RawStarGiftAttributeCounter function isAnyStarGiftAttributeCounter(o: object): o is TypeStarGiftAttributeCounter /** * Represents a * custom * pending suggestion ». */ type TypePendingSuggestion = tl.RawPendingSuggestion function isAnyPendingSuggestion(o: object): o is TypePendingSuggestion /** * An item of a * todo list * ». */ type TypeTodoItem = tl.RawTodoItem function isAnyTodoItem(o: object): o is TypeTodoItem /** * Represents a * todo list * ». */ type TypeTodoList = tl.RawTodoList function isAnyTodoList(o: object): o is TypeTodoList /** * A completed * todo list * » item. */ type TypeTodoCompletion = tl.RawTodoCompletion function isAnyTodoCompletion(o: object): o is TypeTodoCompletion /** * Contains info about a * suggested * post ». */ type TypeSuggestedPost = tl.RawSuggestedPost function isAnySuggestedPost(o: object): o is TypeSuggestedPost /** * Represents the profile's * star * rating, see here » for more info. */ type TypeStarsRating = tl.RawStarsRating function isAnyStarsRating(o: object): o is TypeStarsRating /** * Represents a * star * gift collection ». */ type TypeStarGiftCollection = tl.RawStarGiftCollection function isAnyStarGiftCollection(o: object): o is TypeStarGiftCollection /** * Represents a * story * album ». */ type TypeStoryAlbum = tl.RawStoryAlbum function isAnyStoryAlbum(o: object): o is TypeStoryAlbum /** * Indicates if the specified * global * post search » requires payment. */ type TypeSearchPostsFlood = tl.RawSearchPostsFlood function isAnySearchPostsFlood(o: object): o is TypeSearchPostsFlood /** * Represents a * tab * of a profile page ». */ type TypeProfileTab = tl.RawProfileTabPosts | tl.RawProfileTabGifts | tl.RawProfileTabMedia | tl.RawProfileTabFiles | tl.RawProfileTabMusic | tl.RawProfileTabVoice | tl.RawProfileTabLinks | tl.RawProfileTabGifs function isAnyProfileTab(o: object): o is TypeProfileTab /** * Specifies a * chat * theme ». */ type TypeInputChatTheme = tl.RawInputChatThemeEmpty | tl.RawInputChatTheme | tl.RawInputChatThemeUniqueGift function isAnyInputChatTheme(o: object): o is TypeInputChatTheme type TypeStarGiftUpgradePrice = tl.RawStarGiftUpgradePrice function isAnyStarGiftUpgradePrice(o: object): o is TypeStarGiftUpgradePrice type TypeGroupCallMessage = tl.RawGroupCallMessage function isAnyGroupCallMessage(o: object): o is TypeGroupCallMessage type TypeGroupCallDonor = tl.RawGroupCallDonor function isAnyGroupCallDonor(o: object): o is TypeGroupCallDonor type TypeRecentStory = tl.RawRecentStory function isAnyRecentStory(o: object): o is TypeRecentStory type TypeAuctionBidLevel = tl.RawAuctionBidLevel function isAnyAuctionBidLevel(o: object): o is TypeAuctionBidLevel type TypeStarGiftAuctionState = tl.RawStarGiftAuctionStateNotModified | tl.RawStarGiftAuctionState | tl.RawStarGiftAuctionStateFinished function isAnyStarGiftAuctionState(o: object): o is TypeStarGiftAuctionState type TypeStarGiftAuctionUserState = tl.RawStarGiftAuctionUserState function isAnyStarGiftAuctionUserState(o: object): o is TypeStarGiftAuctionUserState type TypeStarGiftAuctionAcquiredGift = tl.RawStarGiftAuctionAcquiredGift function isAnyStarGiftAuctionAcquiredGift(o: object): o is TypeStarGiftAuctionAcquiredGift type TypeStarGiftActiveAuctionState = tl.RawStarGiftActiveAuctionState function isAnyStarGiftActiveAuctionState(o: object): o is TypeStarGiftActiveAuctionState type TypeInputStarGiftAuction = tl.RawInputStarGiftAuction | tl.RawInputStarGiftAuctionSlug function isAnyInputStarGiftAuction(o: object): o is TypeInputStarGiftAuction type TypePasskey = tl.RawPasskey function isAnyPasskey(o: object): o is TypePasskey type TypeInputPasskeyResponse = tl.RawInputPasskeyResponseRegister | tl.RawInputPasskeyResponseLogin function isAnyInputPasskeyResponse(o: object): o is TypeInputPasskeyResponse type TypeInputPasskeyCredential = tl.RawInputPasskeyCredentialPublicKey | tl.RawInputPasskeyCredentialFirebasePNV function isAnyInputPasskeyCredential(o: object): o is TypeInputPasskeyCredential type TypeStarGiftBackground = tl.RawStarGiftBackground function isAnyStarGiftBackground(o: object): o is TypeStarGiftBackground type TypeStarGiftAuctionRound = tl.RawStarGiftAuctionRound | tl.RawStarGiftAuctionRoundExtendable function isAnyStarGiftAuctionRound(o: object): o is TypeStarGiftAuctionRound type TypeStarGiftAttributeRarity = tl.RawStarGiftAttributeRarity | tl.RawStarGiftAttributeRarityUncommon | tl.RawStarGiftAttributeRarityRare | tl.RawStarGiftAttributeRarityEpic | tl.RawStarGiftAttributeRarityLegendary function isAnyStarGiftAttributeRarity(o: object): o is TypeStarGiftAttributeRarity type TypeKeyboardButtonStyle = tl.RawKeyboardButtonStyle function isAnyKeyboardButtonStyle(o: object): o is TypeKeyboardButtonStyle namespace storage { /** * Unknown type. */ interface RawFileUnknown { _: 'storage.fileUnknown'; } /** * Part of a bigger file. */ interface RawFilePartial { _: 'storage.filePartial'; } /** * JPEG image. MIME type: image/jpeg. */ interface RawFileJpeg { _: 'storage.fileJpeg'; } /** * GIF image. MIME type: image/gif. */ interface RawFileGif { _: 'storage.fileGif'; } /** * PNG image. MIME type: image/png. */ interface RawFilePng { _: 'storage.filePng'; } /** * PDF document image. MIME type: application/pdf. */ interface RawFilePdf { _: 'storage.filePdf'; } /** * Mp3 audio. MIME type: audio/mpeg. */ interface RawFileMp3 { _: 'storage.fileMp3'; } /** * Quicktime video. MIME type: video/quicktime. */ interface RawFileMov { _: 'storage.fileMov'; } /** * MPEG-4 video. MIME type: video/mp4. */ interface RawFileMp4 { _: 'storage.fileMp4'; } /** * WEBP image. MIME type: image/webp. */ interface RawFileWebp { _: 'storage.fileWebp'; } interface RpcCallReturn { } /** * Object describes the file type. */ type TypeFileType = tl.storage.RawFileUnknown | tl.storage.RawFilePartial | tl.storage.RawFileJpeg | tl.storage.RawFileGif | tl.storage.RawFilePng | tl.storage.RawFilePdf | tl.storage.RawFileMp3 | tl.storage.RawFileMov | tl.storage.RawFileMp4 | tl.storage.RawFileWebp function isAnyFileType(o: object): o is TypeFileType } namespace auth { /** * Contains info about a sent verification code. */ interface RawSentCode { _: 'auth.sentCode'; /** * Phone code type */ type: tl.auth.TypeSentCodeType; /** * Phone code hash, to be stored and later re-used with * {@link auth.RawSignInRequest} */ phoneCodeHash: string; /** * Phone code type that will be sent next, if the phone code is * not received within timeout seconds: to send it * use {@link auth.RawResendCodeRequest} */ nextType?: tl.auth.TypeCodeType; /** * Timeout for reception of the phone code */ timeout?: number; } /** * The user successfully authorized using * future * auth tokens */ interface RawSentCodeSuccess { _: 'auth.sentCodeSuccess'; /** * Authorization info */ authorization: tl.auth.TypeAuthorization; } /** * Official apps may receive this constructor, indicating that * due to the high cost of SMS verification codes for the * user's country/provider, the user must purchase a * Telegram * Premium subscription in order to proceed with the * login/signup. */ interface RawSentCodePaymentRequired { _: 'auth.sentCodePaymentRequired'; /** * Store identifier of the Telegram Premium subscription. */ storeProduct: string; /** * Phone code hash, to be stored and later re-used with * {@link auth.RawSignInRequest} */ phoneCodeHash: string; /** * An email address that can be contacted for more information * about this request. */ supportEmailAddress: string; /** * The mandatory subject for the email. */ supportEmailSubject: string; currency: string; amount: Long; } /** * Contains user authorization info. */ interface RawAuthorization { _: 'auth.authorization'; /** * Suggests the user to set up a 2-step verification password * to be able to log in again */ setupPasswordRequired?: boolean; /** * If and only if 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. */ otherwiseReloginDays?: number; /** * Temporary * passport * sessions */ tmpSessions?: number; /** * A * future * auth token */ futureAuthToken?: Uint8Array; /** * Info on authorized user */ user: tl.TypeUser; } /** * An account with this phone number doesn't exist on telegram: * the user has to * enter basic * information and sign up */ interface RawAuthorizationSignUpRequired { _: 'auth.authorizationSignUpRequired'; /** * Telegram's terms of service: the user must read and accept * the terms of service before signing up to telegram */ termsOfService?: tl.help.TypeTermsOfService; } /** * Data for copying of authorization between data centers. */ interface RawExportedAuthorization { _: 'auth.exportedAuthorization'; /** * current user identifier */ id: Long; /** * authorizes key */ bytes: Uint8Array; } /** * Recovery info of a * 2FA * password, only for accounts with a * recovery * email configured. */ interface RawPasswordRecovery { _: 'auth.passwordRecovery'; /** * The email to which the recovery code was sent must match * this * pattern. */ emailPattern: string; } /** * The next time, the authentication code will be delivered via * an immediately canceled incoming call. */ interface RawCodeTypeSms { _: 'auth.codeTypeSms'; } /** * The next time, the authentication code is to be delivered * via an outgoing phone call. */ interface RawCodeTypeCall { _: 'auth.codeTypeCall'; } /** * The next time, the authentication code will be delivered via * an immediately canceled incoming call. */ interface RawCodeTypeFlashCall { _: 'auth.codeTypeFlashCall'; } /** * The next time, the authentication code will be delivered via * an immediately canceled incoming call, handled manually by * the user. */ interface RawCodeTypeMissedCall { _: 'auth.codeTypeMissedCall'; } /** * The next time, the authentication code will be delivered via * fragment.com */ interface RawCodeTypeFragmentSms { _: 'auth.codeTypeFragmentSms'; } /** * The code was sent through the telegram app */ interface RawSentCodeTypeApp { _: 'auth.sentCodeTypeApp'; /** * Length of the code in bytes */ length: number; } /** * The code was sent via SMS */ interface RawSentCodeTypeSms { _: 'auth.sentCodeTypeSms'; /** * Length of the code in bytes */ length: number; } /** * The code will be sent via a phone call: a synthesized voice * will tell the user which verification code to input. */ interface RawSentCodeTypeCall { _: 'auth.sentCodeTypeCall'; /** * Length of the verification code */ length: number; } /** * 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. */ interface RawSentCodeTypeFlashCall { _: 'auth.sentCodeTypeFlashCall'; /** * pattern * to match */ pattern: string; } /** * 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. */ interface RawSentCodeTypeMissedCall { _: 'auth.sentCodeTypeMissedCall'; /** * Prefix of the phone number from which the call will be made */ prefix: string; /** * Length of the verification code */ length: number; } /** * The code was sent via the * previously * configured login email » */ interface RawSentCodeTypeEmailCode { _: 'auth.sentCodeTypeEmailCode'; /** * Whether authorization through Apple ID is allowed */ appleSigninAllowed?: boolean; /** * Whether authorization through Google ID is allowed */ googleSigninAllowed?: boolean; /** * Pattern * of the email */ emailPattern: string; /** * Length of the sent verification code */ length: number; /** * Clients should wait for the specified amount of seconds * before allowing the user to invoke * {@link auth.RawResetLoginEmailRequest} (will be 0 for * Premium * users). */ resetAvailablePeriod?: number; /** * An email reset was already requested, and will occur at the * specified date. */ resetPendingDate?: number; } /** * The user should add and verify an email address in order to * login as described * here * ». */ interface RawSentCodeTypeSetUpEmailRequired { _: 'auth.sentCodeTypeSetUpEmailRequired'; /** * Whether authorization through Apple ID is allowed */ appleSigninAllowed?: boolean; /** * Whether authorization through Google ID is allowed */ googleSigninAllowed?: boolean; } /** * The code was delivered via * fragment.com. */ interface RawSentCodeTypeFragmentSms { _: 'auth.sentCodeTypeFragmentSms'; /** * Open the specified URL to log into * fragment.com with the * wallet that owns the specified phone number and view the * code. */ url: string; /** * Length of the delivered code. */ length: number; } /** * An authentication code should be delivered via SMS after * Firebase attestation, as described in the * auth * documentation ». */ interface RawSentCodeTypeFirebaseSms { _: 'auth.sentCodeTypeFirebaseSms'; /** * On Android, the nonce to be used as described in the * auth * documentation » */ nonce?: Uint8Array; /** * Google Play Integrity project ID */ playIntegrityProjectId?: Long; /** * Play Integrity API nonce */ playIntegrityNonce?: 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 {@link auth.RawResendCodeRequest}. */ pushTimeout?: number; /** * Length of the code that will be delivered. */ length: number; } /** * The code was sent via SMS as a secret word, starting with * the letter specified in beginning */ interface RawSentCodeTypeSmsWord { _: 'auth.sentCodeTypeSmsWord'; /** * If set, the secret word in the sent SMS (which may contain * multiple words) starts with this letter. */ beginning?: string; } /** * The code was sent via SMS as a secret phrase starting with * the word specified in beginning */ interface RawSentCodeTypeSmsPhrase { _: 'auth.sentCodeTypeSmsPhrase'; /** * If set, the secret phrase (and the SMS) starts with this * word. */ beginning?: string; } /** * Login token (for * QR code * login) */ interface RawLoginToken { _: 'auth.loginToken'; /** * Expiration date of QR code */ expires: number; /** * Token to render in QR code */ token: Uint8Array; } /** * Repeat the query to the specified DC */ interface RawLoginTokenMigrateTo { _: 'auth.loginTokenMigrateTo'; /** * DC ID */ dcId: number; /** * Token to use for login */ token: Uint8Array; } /** * Login via token (QR code) succeeded! */ interface RawLoginTokenSuccess { _: 'auth.loginTokenSuccess'; /** * Authorization info */ authorization: tl.auth.TypeAuthorization; } /** * Future * auth token » to be used on subsequent authorizations */ interface RawLoggedOut { _: 'auth.loggedOut'; /** * Future * auth token » to be used on subsequent authorizations */ futureAuthToken?: Uint8Array; } interface RawPasskeyLoginOptions { _: 'auth.passkeyLoginOptions'; options: tl.TypeDataJSON; } /** * Send the verification code for login * * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawSendCodeRequest { _: 'auth.sendCode'; /** * Phone number in international format */ phoneNumber: string; /** * Application identifier (see * App * configuration) */ apiId: number; /** * Application secret hash (see * App * configuration) */ apiHash: string; /** * Settings for the code type to send */ settings: tl.TypeCodeSettings; } /** * Registers a validated phone number in the system. * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawSignUpRequest { _: 'auth.signUp'; /** * If set, users on Telegram that have already added * phone_number to their contacts will * not receive signup notifications about this user. */ noJoinedNotifications?: boolean; /** * Phone number in the international format */ phoneNumber: string; /** * SMS-message ID */ phoneCodeHash: string; /** * New user first name */ firstName: string; /** * New user last name */ lastName: string; } /** * Signs in a user with a validated phone number. * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawSignInRequest { _: 'auth.signIn'; /** * Phone number in the international format */ phoneNumber: string; /** * SMS-message ID, obtained from * {@link auth.RawSendCodeRequest} */ phoneCodeHash: string; /** * Valid numerical code from the SMS-message */ phoneCode?: string; /** * Email verification code or token */ emailVerification?: tl.TypeEmailVerification; } /** * Logs out the user. * * RPC method returns {@link tl.auth.TypeLoggedOut} */ interface RawLogOutRequest { _: 'auth.logOut'; } /** * Terminates all user's authorized sessions except for the * current one. * * After calling this method it is necessary to reregister the * current device using the method * {@link account.RawRegisterDeviceRequest} * * RPC method returns boolean */ interface RawResetAuthorizationsRequest { _: 'auth.resetAuthorizations'; } /** * Returns data for copying authorization to another * data-center. * * RPC method returns {@link tl.auth.TypeExportedAuthorization} */ interface RawExportAuthorizationRequest { _: 'auth.exportAuthorization'; /** * Number of a target data-center */ dcId: number; } /** * Logs in a user using a key transmitted from their native * data-center. * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawImportAuthorizationRequest { _: 'auth.importAuthorization'; /** * User ID */ id: Long; /** * Authorization key */ bytes: Uint8Array; } /** * 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. * * For more information, see * Perfect * Forward Secrecy. * * RPC method returns boolean */ interface RawBindTempAuthKeyRequest { _: 'auth.bindTempAuthKey'; /** * Permanent auth_key_id to bind to */ permAuthKeyId: Long; /** * Random long from Binding * message contents */ nonce: Long; /** * UNIX timestamp in seconds to invalidate temporary key, see * Binding message * contents */ expiresAt: number; /** * See Generating * encrypted_message */ encryptedMessage: Uint8Array; } /** * Login as a bot * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawImportBotAuthorizationRequest { _: 'auth.importBotAuthorization'; /** * Reserved for future use */ flags: number; /** * Application identifier (see. * App * configuration) */ apiId: number; /** * Application identifier hash (see. * App * configuration) */ apiHash: string; /** * Bot token (see * bots) */ botAuthToken: string; } /** * Try logging to an account protected by a * 2FA * password. * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawCheckPasswordRequest { _: 'auth.checkPassword'; /** * The account's password (see * SRP) */ password: tl.TypeInputCheckPasswordSRP; } /** * Request recovery code of a * 2FA * password, only for accounts with a * recovery * email configured. * * RPC method returns {@link tl.auth.TypePasswordRecovery} */ interface RawRequestPasswordRecoveryRequest { _: 'auth.requestPasswordRecovery'; } /** * Reset the * 2FA * password using the recovery code sent using * {@link auth.RawRequestPasswordRecoveryRequest}. * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawRecoverPasswordRequest { _: 'auth.recoverPassword'; /** * Code received via email */ code: string; /** * New password */ newSettings?: tl.account.TypePasswordInputSettings; } /** * 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 * for more info. * * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawResendCodeRequest { _: 'auth.resendCode'; /** * The phone number */ phoneNumber: string; /** * The phone code hash obtained from * {@link auth.RawSendCodeRequest} */ phoneCodeHash: string; /** * Official clients only, used if the device integrity * verification failed, and no secret could be obtained to * invoke {@link auth.RawRequestFirebaseSmsRequest}: in this * case, the device integrity verification failure reason must * be passed here. */ reason?: string; } /** * Cancel the login verification code * * RPC method returns boolean */ interface RawCancelCodeRequest { _: 'auth.cancelCode'; /** * Phone number */ phoneNumber: string; /** * Phone code hash from {@link auth.RawSendCodeRequest} */ phoneCodeHash: string; } /** * Delete all temporary authorization keys except * for the ones specified * * RPC method returns boolean */ interface RawDropTempAuthKeysRequest { _: 'auth.dropTempAuthKeys'; /** * The auth keys that shouldn't be dropped. */ exceptAuthKeys: Long[]; } /** * Generate a login token, for * login * via QR code. * * * The generated login token should be encoded using base64url, * then shown as a * tg://login?token=base64encodedtoken * deep * link » in the QR code. * * For more info, see * login * via QR code. * * RPC method returns {@link tl.auth.TypeLoginToken} */ interface RawExportLoginTokenRequest { _: 'auth.exportLoginToken'; /** * Application identifier (see. * App * configuration) */ apiId: number; /** * Application identifier hash (see. * App * configuration) */ apiHash: string; /** * List of already logged-in user IDs, to prevent logging in * twice with the same user */ exceptIds: Long[]; } /** * Login using a redirected login token, generated in case of * DC mismatch during * QR code * login. * * For more info, see * login * via QR code. * * RPC method returns {@link tl.auth.TypeLoginToken} */ interface RawImportLoginTokenRequest { _: 'auth.importLoginToken'; /** * Login token */ token: Uint8Array; } /** * Accept QR code login token, logging in the app that * generated it. * * Returns info about the new session. * * For more info, see * login * via QR code. * * RPC method returns {@link tl.TypeAuthorization} */ interface RawAcceptLoginTokenRequest { _: 'auth.acceptLoginToken'; /** * Login token embedded in QR code, for more info, see * login * via QR code. */ token: Uint8Array; } /** * Check if the * 2FA recovery * code sent using * {@link auth.RawRequestPasswordRecoveryRequest} is valid, * before passing it to {@link auth.RawRecoverPasswordRequest}. * * RPC method returns boolean */ interface RawCheckRecoveryPasswordRequest { _: 'auth.checkRecoveryPassword'; /** * Code received via email */ code: string; } /** * Login by importing an authorization token * * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawImportWebTokenAuthorizationRequest { _: 'auth.importWebTokenAuthorization'; /** * API * ID */ apiId: number; /** * API * hash */ apiHash: string; /** * The authorization token */ webAuthToken: string; } /** * Request an SMS code via Firebase. * * RPC method returns boolean */ interface RawRequestFirebaseSmsRequest { _: 'auth.requestFirebaseSms'; /** * Phone number */ phoneNumber: string; /** * Phone code hash returned by {@link auth.RawSendCodeRequest} */ phoneCodeHash: string; /** * On Android, a JWS object obtained as described in the * auth * documentation » */ safetyNetToken?: string; /** * On Android, an object obtained as described in the * auth * documentation » */ playIntegrityToken?: string; /** * Secret token received via an apple push notification */ iosPushSecret?: string; } /** * Reset the * login * email ». * * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawResetLoginEmailRequest { _: 'auth.resetLoginEmail'; /** * Phone number of the account */ phoneNumber: string; /** * Phone code hash, obtained as described in the * documentation * » */ phoneCodeHash: string; } /** * Official apps only, reports that the SMS authentication code * wasn't delivered. * * RPC method returns boolean */ interface RawReportMissingCodeRequest { _: 'auth.reportMissingCode'; /** * Phone number where we were supposed to receive the code */ phoneNumber: string; /** * The phone code hash obtained from * {@link auth.RawSendCodeRequest} */ phoneCodeHash: string; /** * MNC * of the current network operator. */ mnc: string; } /** * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawCheckPaidAuthRequest { _: 'auth.checkPaidAuth'; phoneNumber: string; phoneCodeHash: string; formId: Long; } /** * RPC method returns {@link tl.auth.TypePasskeyLoginOptions} */ interface RawInitPasskeyLoginRequest { _: 'auth.initPasskeyLogin'; apiId: number; apiHash: string; } /** * RPC method returns {@link tl.auth.TypeAuthorization} */ interface RawFinishPasskeyLoginRequest { _: 'auth.finishPasskeyLogin'; credential: tl.TypeInputPasskeyCredential; fromDcId?: number; fromAuthKeyId?: Long; } interface RpcCallReturn { 'auth.sendCode': tl.auth.TypeSentCode 'auth.signUp': tl.auth.TypeAuthorization 'auth.signIn': tl.auth.TypeAuthorization 'auth.logOut': tl.auth.TypeLoggedOut 'auth.resetAuthorizations': boolean 'auth.exportAuthorization': tl.auth.TypeExportedAuthorization 'auth.importAuthorization': tl.auth.TypeAuthorization 'auth.bindTempAuthKey': boolean 'auth.importBotAuthorization': tl.auth.TypeAuthorization 'auth.checkPassword': tl.auth.TypeAuthorization 'auth.requestPasswordRecovery': tl.auth.TypePasswordRecovery 'auth.recoverPassword': tl.auth.TypeAuthorization 'auth.resendCode': tl.auth.TypeSentCode 'auth.cancelCode': boolean 'auth.dropTempAuthKeys': boolean 'auth.exportLoginToken': tl.auth.TypeLoginToken 'auth.importLoginToken': tl.auth.TypeLoginToken 'auth.acceptLoginToken': tl.TypeAuthorization 'auth.checkRecoveryPassword': boolean 'auth.importWebTokenAuthorization': tl.auth.TypeAuthorization 'auth.requestFirebaseSms': boolean 'auth.resetLoginEmail': tl.auth.TypeSentCode 'auth.reportMissingCode': boolean 'auth.checkPaidAuth': tl.auth.TypeSentCode 'auth.initPasskeyLogin': tl.auth.TypePasskeyLoginOptions 'auth.finishPasskeyLogin': tl.auth.TypeAuthorization } /** * Contains info on a confirmation code message sent via SMS, * phone call or Telegram. */ type TypeSentCode = tl.auth.RawSentCode | tl.auth.RawSentCodeSuccess | tl.auth.RawSentCodePaymentRequired function isAnySentCode(o: object): o is TypeSentCode /** * Object contains info on user authorization. */ type TypeAuthorization = tl.auth.RawAuthorization | tl.auth.RawAuthorizationSignUpRequired function isAnyAuthorization(o: object): o is TypeAuthorization /** * Exported authorization */ type TypeExportedAuthorization = tl.auth.RawExportedAuthorization function isAnyExportedAuthorization(o: object): o is TypeExportedAuthorization /** * Recovery info of a * 2FA * password, only for accounts with a * recovery * email configured. */ type TypePasswordRecovery = tl.auth.RawPasswordRecovery function isAnyPasswordRecovery(o: object): o is TypePasswordRecovery /** * Type of verification code that will be sent next if you call * the resendCode method */ type TypeCodeType = tl.auth.RawCodeTypeSms | tl.auth.RawCodeTypeCall | tl.auth.RawCodeTypeFlashCall | tl.auth.RawCodeTypeMissedCall | tl.auth.RawCodeTypeFragmentSms function isAnyCodeType(o: object): o is TypeCodeType /** * Type of the verification code that was sent */ type TypeSentCodeType = tl.auth.RawSentCodeTypeApp | tl.auth.RawSentCodeTypeSms | tl.auth.RawSentCodeTypeCall | tl.auth.RawSentCodeTypeFlashCall | tl.auth.RawSentCodeTypeMissedCall | tl.auth.RawSentCodeTypeEmailCode | tl.auth.RawSentCodeTypeSetUpEmailRequired | tl.auth.RawSentCodeTypeFragmentSms | tl.auth.RawSentCodeTypeFirebaseSms | tl.auth.RawSentCodeTypeSmsWord | tl.auth.RawSentCodeTypeSmsPhrase function isAnySentCodeType(o: object): o is TypeSentCodeType /** * Login token (for QR code login) */ type TypeLoginToken = tl.auth.RawLoginToken | tl.auth.RawLoginTokenMigrateTo | tl.auth.RawLoginTokenSuccess function isAnyLoginToken(o: object): o is TypeLoginToken /** * Future * auth token » to be used on subsequent authorizations */ type TypeLoggedOut = tl.auth.RawLoggedOut function isAnyLoggedOut(o: object): o is TypeLoggedOut type TypePasskeyLoginOptions = tl.auth.RawPasskeyLoginOptions function isAnyPasskeyLoginOptions(o: object): o is TypePasskeyLoginOptions } namespace contacts { /** * Contact list on the server is the same as the list on the * client. */ interface RawContactsNotModified { _: 'contacts.contactsNotModified'; } /** * The current user's contact list and info on users. */ interface RawContacts { _: 'contacts.contacts'; /** * Contact list */ contacts: tl.TypeContact[]; /** * Number of contacts that were saved successfully */ savedCount: number; /** * User list */ users: tl.TypeUser[]; } /** * Info on successfully imported contacts. */ interface RawImportedContacts { _: 'contacts.importedContacts'; /** * List of successfully imported contacts */ imported: tl.TypeImportedContact[]; /** * Popular contacts */ popularInvites: tl.TypePopularContact[]; /** * List of contact ids that could not be imported due to system * limitation and will need to be imported at a later date. */ retryContacts: Long[]; /** * List of users */ users: tl.TypeUser[]; } /** * Full list of blocked users. */ interface RawBlocked { _: 'contacts.blocked'; /** * List of blocked users */ blocked: tl.TypePeerBlocked[]; /** * Blocked chats */ chats: tl.TypeChat[]; /** * List of users */ users: tl.TypeUser[]; } /** * Incomplete list of blocked users. */ interface RawBlockedSlice { _: 'contacts.blockedSlice'; /** * Total number of elements in the list */ count: number; /** * List of blocked users */ blocked: tl.TypePeerBlocked[]; /** * Blocked chats */ chats: tl.TypeChat[]; /** * List of users */ users: tl.TypeUser[]; } /** * Users found by name substring and auxiliary data. */ interface RawFound { _: 'contacts.found'; /** * Personalized results */ myResults: tl.TypePeer[]; /** * List of found user identifiers */ results: tl.TypePeer[]; /** * Found chats */ chats: tl.TypeChat[]; /** * List of users */ users: tl.TypeUser[]; } /** * Resolved peer */ interface RawResolvedPeer { _: 'contacts.resolvedPeer'; /** * The peer */ peer: tl.TypePeer; /** * Chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; } /** * Top peer info hasn't changed */ interface RawTopPeersNotModified { _: 'contacts.topPeersNotModified'; } /** * Top peers */ interface RawTopPeers { _: 'contacts.topPeers'; /** * Top peers by top peer category */ categories: tl.TypeTopPeerCategoryPeers[]; /** * Chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; } /** * Top peers disabled */ interface RawTopPeersDisabled { _: 'contacts.topPeersDisabled'; } /** * Birthday information of our contacts. */ interface RawContactBirthdays { _: 'contacts.contactBirthdays'; /** * Birthday info */ contacts: tl.TypeContactBirthday[]; /** * User information */ users: tl.TypeUser[]; } /** * There are no sponsored peers for this query. */ interface RawSponsoredPeersEmpty { _: 'contacts.sponsoredPeersEmpty'; } /** * Sponsored peers. */ interface RawSponsoredPeers { _: 'contacts.sponsoredPeers'; /** * Sponsored peers. */ peers: tl.TypeSponsoredPeer[]; /** * Info about sponsored chats and channels */ chats: tl.TypeChat[]; /** * Info about sponsored users */ users: tl.TypeUser[]; } /** * 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). * * RPC method returns number array */ interface RawGetContactIDsRequest { _: 'contacts.getContactIDs'; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Use this method to obtain the online statuses of all * contacts with an accessible Telegram account. * * RPC method returns {@link tl.TypeContactStatus} array */ interface RawGetStatusesRequest { _: 'contacts.getStatuses'; } /** * Returns the current user's contact list. * * RPC method returns {@link tl.contacts.TypeContacts} */ interface RawGetContactsRequest { _: 'contacts.getContacts'; /** * Hash * used for caching, for more info click here. * * Note that the hash is computed * using * the usual algorithm, passing to the algorithm first the * previously returned * {@link contacts.RawContacts}.saved_count field, * then max 100000 sorted user IDs from the * contact list, including the ID of the currently logged in * user if it is saved as a contact. * * Example: * tdlib * implementation. */ hash: Long; } /** * Imports contacts: saves a full list on the server, adds * already registered contacts to the contact list, returns * added contacts and their info. * * Use {@link contacts.RawAddContactRequest} to add Telegram * contacts without actually using their phone number. * * RPC method returns {@link tl.contacts.TypeImportedContacts} */ interface RawImportContactsRequest { _: 'contacts.importContacts'; /** * List of contacts to import */ contacts: tl.TypeInputContact[]; } /** * Deletes several contacts from the list. * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteContactsRequest { _: 'contacts.deleteContacts'; /** * User ID list */ id: tl.TypeInputUser[]; } /** * Delete contacts by phone number * * RPC method returns boolean */ interface RawDeleteByPhonesRequest { _: 'contacts.deleteByPhones'; /** * Phone numbers */ phones: string[]; } /** * Adds a peer to a blocklist, see * here » * for more info. * * RPC method returns boolean */ interface RawBlockRequest { _: 'contacts.block'; /** * Whether the peer should be added to the story blocklist; if * not set, the peer will be added to the main blocklist, see * here » * for more info. */ myStoriesFrom?: boolean; /** * Peer */ id: tl.TypeInputPeer; } /** * Deletes a peer from a blocklist, see * here » * for more info. * * RPC method returns boolean */ interface RawUnblockRequest { _: 'contacts.unblock'; /** * Whether the peer should be removed from the story blocklist; * if not set, the peer will be removed from the main * blocklist, see * here » * for more info. */ myStoriesFrom?: boolean; /** * Peer */ id: tl.TypeInputPeer; } /** * Returns the list of blocked users. * * RPC method returns {@link tl.contacts.TypeBlocked} */ interface RawGetBlockedRequest { _: 'contacts.getBlocked'; /** * Whether to fetch the story blocklist; if not set, will fetch * the main blocklist. See * here » * for differences between the two. */ myStoriesFrom?: boolean; /** * The number of list elements to be skipped */ offset: number; /** * The number of list elements to be returned */ limit: number; } /** * Returns users found by username substring. * * RPC method returns {@link tl.contacts.TypeFound} */ interface RawSearchRequest { _: 'contacts.search'; /** * Target substring */ q: string; /** * Maximum number of users to be returned */ limit: number; } /** * Resolve a @username to get peer info * * RPC method returns {@link tl.contacts.TypeResolvedPeer} */ interface RawResolveUsernameRequest { _: 'contacts.resolveUsername'; /** * @username to resolve */ username: string; /** * Referrer * ID from referral links ». */ referer?: string; } /** * Get most used peers * * RPC method returns {@link tl.contacts.TypeTopPeers} */ interface RawGetTopPeersRequest { _: 'contacts.getTopPeers'; /** * Users we've chatted most frequently with */ correspondents?: boolean; /** * Most used bots */ botsPm?: boolean; /** * Most used inline bots */ botsInline?: boolean; /** * Most frequently called users */ phoneCalls?: boolean; /** * Users to which the users often forwards messages to */ forwardUsers?: boolean; /** * Chats to which the users often forwards messages to */ forwardChats?: boolean; /** * Often-opened groups and supergroups */ groups?: boolean; /** * Most frequently visited channels */ channels?: boolean; /** * Most frequently used * Main * Mini Bot Apps. */ botsApp?: boolean; /** * Offset for * pagination */ offset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Reset * rating * of top peer * * RPC method returns boolean */ interface RawResetTopPeerRatingRequest { _: 'contacts.resetTopPeerRating'; /** * Top peer category */ category: tl.TypeTopPeerCategory; /** * Peer whose rating should be reset */ peer: tl.TypeInputPeer; } /** * Removes all contacts without an associated Telegram account. * * RPC method returns boolean */ interface RawResetSavedRequest { _: 'contacts.resetSaved'; } /** * Get all contacts, requires a * takeout * session, see here » for more info. * * RPC method returns {@link tl.TypeSavedContact} array */ interface RawGetSavedRequest { _: 'contacts.getSaved'; } /** * Enable/disable * top * peers * * RPC method returns boolean */ interface RawToggleTopPeersRequest { _: 'contacts.toggleTopPeers'; /** * Enable/disable */ enabled: boolean; } /** * Add an existing telegram user as contact. * * Use {@link contacts.RawImportContactsRequest} to add * contacts by phone number, without knowing their Telegram ID. * * RPC method returns {@link tl.TypeUpdates} */ interface RawAddContactRequest { _: 'contacts.addContact'; /** * Allow the other user to see our phone number? */ addPhonePrivacyException?: boolean; /** * Telegram ID of the other user */ id: tl.TypeInputUser; /** * First name */ firstName: string; /** * Last name */ lastName: string; /** * User's phone number, may be omitted to simply add the user * to the contact list, without a phone number. */ phone: string; note?: tl.TypeTextWithEntities; } /** * If the * add * contact action bar is active, add that user as contact * * RPC method returns {@link tl.TypeUpdates} */ interface RawAcceptContactRequest { _: 'contacts.acceptContact'; /** * The user to add as contact */ id: tl.TypeInputUser; } /** * Get users and geochats near you, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetLocatedRequest { _: 'contacts.getLocated'; /** * 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?: boolean; /** * Geolocation */ geoPoint: tl.TypeInputGeoPoint; /** * 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. */ selfExpires?: number; } /** * Stop getting notifications about * discussion * replies of a certain user in @replies * * RPC method returns {@link tl.TypeUpdates} */ interface RawBlockFromRepliesRequest { _: 'contacts.blockFromReplies'; /** * Whether to delete the specified message as well */ deleteMessage?: boolean; /** * Whether to delete all @replies messages from * this user as well */ deleteHistory?: boolean; /** * Whether to also report this user for spam */ reportSpam?: boolean; /** * ID of the message in the * @replies * chat */ msgId: number; } /** * Resolve a phone number to get user info, if their privacy * settings allow it. * * RPC method returns {@link tl.contacts.TypeResolvedPeer} */ interface RawResolvePhoneRequest { _: 'contacts.resolvePhone'; /** * Phone number in international format, possibly obtained from * a * phone * number deep link. */ phone: string; } /** * Generates a * temporary * profile link for the currently logged-in user. * * RPC method returns {@link tl.TypeExportedContactToken} */ interface RawExportContactTokenRequest { _: 'contacts.exportContactToken'; } /** * Obtain user info from a * temporary * profile link. * * RPC method returns {@link tl.TypeUser} */ interface RawImportContactTokenRequest { _: 'contacts.importContactToken'; /** * The token extracted from the * temporary * profile link. */ token: string; } /** * Edit the * close * friends list, see here » for more info. * * RPC method returns boolean */ interface RawEditCloseFriendsRequest { _: 'contacts.editCloseFriends'; /** * Full list of user IDs of close friends, see * here * for more info. */ id: number[]; } /** * Replace the contents of an entire * blocklist, * see here for more info ». * * RPC method returns boolean */ interface RawSetBlockedRequest { _: 'contacts.setBlocked'; /** * Whether to edit the story blocklist; if not set, will edit * the main blocklist. See * here » * for differences between the two. */ myStoriesFrom?: boolean; /** * Full content of the blocklist. */ id: tl.TypeInputPeer[]; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Fetch all users with birthdays that fall within +1/-1 days, * relative to the current day: this method should be invoked * by clients every 6-8 hours, and if the result is non-empty, * it should be used to appropriately update locally cached * birthday information in * {@link RawUser}.birthday. * * See * here » for more info. * * RPC method returns {@link tl.contacts.TypeContactBirthdays} */ interface RawGetBirthdaysRequest { _: 'contacts.getBirthdays'; } /** * Obtain a list of sponsored peer search results for a given * query * * RPC method returns {@link tl.contacts.TypeSponsoredPeers} */ interface RawGetSponsoredPeersRequest { _: 'contacts.getSponsoredPeers'; /** * The query */ q: string; } /** * RPC method returns boolean */ interface RawUpdateContactNoteRequest { _: 'contacts.updateContactNote'; id: tl.TypeInputUser; note: tl.TypeTextWithEntities; } interface RpcCallReturn { 'contacts.getContactIDs': number[] 'contacts.getStatuses': tl.TypeContactStatus[] 'contacts.getContacts': tl.contacts.TypeContacts 'contacts.importContacts': tl.contacts.TypeImportedContacts 'contacts.deleteContacts': tl.TypeUpdates 'contacts.deleteByPhones': boolean 'contacts.block': boolean 'contacts.unblock': boolean 'contacts.getBlocked': tl.contacts.TypeBlocked 'contacts.search': tl.contacts.TypeFound 'contacts.resolveUsername': tl.contacts.TypeResolvedPeer 'contacts.getTopPeers': tl.contacts.TypeTopPeers 'contacts.resetTopPeerRating': boolean 'contacts.resetSaved': boolean 'contacts.getSaved': tl.TypeSavedContact[] 'contacts.toggleTopPeers': boolean 'contacts.addContact': tl.TypeUpdates 'contacts.acceptContact': tl.TypeUpdates 'contacts.getLocated': tl.TypeUpdates 'contacts.blockFromReplies': tl.TypeUpdates 'contacts.resolvePhone': tl.contacts.TypeResolvedPeer 'contacts.exportContactToken': tl.TypeExportedContactToken 'contacts.importContactToken': tl.TypeUser 'contacts.editCloseFriends': boolean 'contacts.setBlocked': boolean 'contacts.getBirthdays': tl.contacts.TypeContactBirthdays 'contacts.getSponsoredPeers': tl.contacts.TypeSponsoredPeers 'contacts.updateContactNote': boolean } /** * Info on the current user's contact list. */ type TypeContacts = tl.contacts.RawContactsNotModified | tl.contacts.RawContacts function isAnyContacts(o: object): o is TypeContacts /** * Object contains info on successfully imported contacts. */ type TypeImportedContacts = tl.contacts.RawImportedContacts function isAnyImportedContacts(o: object): o is TypeImportedContacts /** * Info on users from the current user's black list. */ type TypeBlocked = tl.contacts.RawBlocked | tl.contacts.RawBlockedSlice function isAnyBlocked(o: object): o is TypeBlocked /** * Object contains info on users found by name substring and * auxiliary data. */ type TypeFound = tl.contacts.RawFound function isAnyFound(o: object): o is TypeFound /** * Peer returned after resolving a @username */ type TypeResolvedPeer = tl.contacts.RawResolvedPeer function isAnyResolvedPeer(o: object): o is TypeResolvedPeer /** * Top peers */ type TypeTopPeers = tl.contacts.RawTopPeersNotModified | tl.contacts.RawTopPeers | tl.contacts.RawTopPeersDisabled function isAnyTopPeers(o: object): o is TypeTopPeers /** * Birthday information of our contacts. */ type TypeContactBirthdays = tl.contacts.RawContactBirthdays function isAnyContactBirthdays(o: object): o is TypeContactBirthdays /** * A list of sponsored peers. */ type TypeSponsoredPeers = tl.contacts.RawSponsoredPeersEmpty | tl.contacts.RawSponsoredPeers function isAnySponsoredPeers(o: object): o is TypeSponsoredPeers } namespace messages { /** * Full list of chats with messages and auxiliary data. */ interface RawDialogs { _: 'messages.dialogs'; /** * List of chats */ dialogs: tl.TypeDialog[]; /** * List of last messages from each chat */ messages: tl.TypeMessage[]; /** * List of groups mentioned in the chats */ chats: tl.TypeChat[]; /** * List of users mentioned in messages and groups */ users: tl.TypeUser[]; } /** * Incomplete list of dialogs with messages and auxiliary data. */ interface RawDialogsSlice { _: 'messages.dialogsSlice'; /** * Total number of dialogs */ count: number; /** * List of dialogs */ dialogs: tl.TypeDialog[]; /** * List of last messages from dialogs */ messages: tl.TypeMessage[]; /** * List of chats mentioned in dialogs */ chats: tl.TypeChat[]; /** * List of users mentioned in messages and chats */ users: tl.TypeUser[]; } /** * Dialogs haven't changed */ interface RawDialogsNotModified { _: 'messages.dialogsNotModified'; /** * Number of dialogs found server-side by the query */ count: number; } /** * Full list of messages with auxiliary data. */ interface RawMessages { _: 'messages.messages'; /** * List of messages */ messages: tl.TypeMessage[]; topics: tl.TypeForumTopic[]; /** * List of chats mentioned in dialogs */ chats: tl.TypeChat[]; /** * List of users mentioned in messages and chats */ users: tl.TypeUser[]; } /** * Incomplete list of messages and auxiliary data. */ interface RawMessagesSlice { _: 'messages.messagesSlice'; /** * If set, indicates that the results may be inexact */ inexact?: boolean; /** * Total number of messages in the list */ count: number; /** * Rate to use in the offset_rate parameter in the * next call to {@link messages.RawSearchGlobalRequest} */ nextRate?: 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}). */ offsetIdOffset?: number; /** * For * global post searches », the remaining amount of free * searches, here query_is_free is related to the * current call only, not to the next paginated call, and all * subsequent pagination calls will always be free. */ searchFlood?: tl.TypeSearchPostsFlood; /** * List of messages */ messages: tl.TypeMessage[]; topics: tl.TypeForumTopic[]; /** * List of chats mentioned in messages */ chats: tl.TypeChat[]; /** * List of users mentioned in messages and chats */ users: tl.TypeUser[]; } /** * Channel messages */ interface RawChannelMessages { _: 'messages.channelMessages'; /** * If set, returned results may be inexact */ inexact?: boolean; /** * Event * count after generation */ 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}. */ offsetIdOffset?: number; /** * Found messages */ messages: tl.TypeMessage[]; /** * Forum * topic information */ topics: tl.TypeForumTopic[]; /** * Chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; } /** * No new messages matching the query were found */ interface RawMessagesNotModified { _: 'messages.messagesNotModified'; /** * Number of results found server-side by the given query */ count: number; } /** * List of chats with auxiliary data. */ interface RawChats { _: 'messages.chats'; /** * List of chats */ chats: tl.TypeChat[]; } /** * Partial list of chats, more would have to be fetched with * pagination */ interface RawChatsSlice { _: 'messages.chatsSlice'; /** * Total number of results that were found server-side (not all * are included in chats) */ count: number; /** * Chats */ chats: tl.TypeChat[]; } /** * Full info about a * channel, * supergroup, * gigagroup * or * basic * group. */ interface RawChatFull { _: 'messages.chatFull'; /** * Full info */ fullChat: tl.TypeChatFull; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Affected part of communication history with the user or in a * chat. */ interface RawAffectedHistory { _: 'messages.affectedHistory'; /** * Number of events occurred in a text box */ pts: number; /** * Number of affected events */ ptsCount: 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; } /** * Configuring parameters did not change. */ interface RawDhConfigNotModified { _: 'messages.dhConfigNotModified'; /** * Random sequence of bytes of assigned length */ random: Uint8Array; } /** * New set of configuring parameters. */ interface RawDhConfig { _: 'messages.dhConfig'; /** * New value prime, see * Wikipedia */ g: number; /** * New value primitive root, see * Wikipedia */ p: Uint8Array; /** * Version of set of parameters */ version: number; /** * Random sequence of bytes of assigned length */ random: Uint8Array; } /** * Message without file attachments sent to an encrypted file. */ interface RawSentEncryptedMessage { _: 'messages.sentEncryptedMessage'; /** * Date of sending */ date: number; } /** * Message with a file enclosure sent to a protected chat */ interface RawSentEncryptedFile { _: 'messages.sentEncryptedFile'; /** * Sending date */ date: number; /** * Attached file */ file: tl.TypeEncryptedFile; } /** * No new stickers were found for the given query */ interface RawStickersNotModified { _: 'messages.stickersNotModified'; } /** * Found stickers */ interface RawStickers { _: 'messages.stickers'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Stickers */ stickers: tl.TypeDocument[]; } /** * Info about all installed stickers hasn't changed */ interface RawAllStickersNotModified { _: 'messages.allStickersNotModified'; } /** * Info about all installed stickers */ interface RawAllStickers { _: 'messages.allStickers'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * All stickersets */ sets: tl.TypeStickerSet[]; } /** * Events affected by operation */ interface RawAffectedMessages { _: 'messages.affectedMessages'; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; } /** * Stickerset and stickers inside it */ interface RawStickerSet { _: 'messages.stickerSet'; /** * The stickerset */ set: tl.TypeStickerSet; /** * Emoji info for stickers */ packs: tl.TypeStickerPack[]; /** * Keywords for some or every sticker in the stickerset. */ keywords: tl.TypeStickerKeyword[]; /** * Stickers in stickerset */ documents: tl.TypeDocument[]; } /** * The stickerset hasn't changed */ interface RawStickerSetNotModified { _: 'messages.stickerSetNotModified'; } /** * No new saved gifs were found */ interface RawSavedGifsNotModified { _: 'messages.savedGifsNotModified'; } /** * Saved gifs */ interface RawSavedGifs { _: 'messages.savedGifs'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * List of saved gifs */ gifs: tl.TypeDocument[]; } /** * Result of a query to an inline bot */ interface RawBotResults { _: 'messages.botResults'; /** * Whether the result is a picture gallery */ gallery?: boolean; /** * Query ID */ queryId: Long; /** * The next offset to use when navigating through results */ nextOffset?: 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. */ switchPm?: tl.TypeInlineBotSwitchPM; /** * Shown as a button on top of the remaining inline result * list; if clicked, opens the specified * inline * mode mini app. */ switchWebview?: tl.TypeInlineBotWebView; /** * The results */ results: tl.TypeBotInlineResult[]; /** * Caching validity of the results */ cacheTime: number; /** * Users mentioned in the results */ users: tl.TypeUser[]; } /** * Callback answer sent by the bot in response to a button * press */ interface RawBotCallbackAnswer { _: 'messages.botCallbackAnswer'; /** * Whether an alert should be shown to the user instead of a * toast notification */ alert?: boolean; /** * Whether an URL is present */ hasUrl?: boolean; /** * Whether to show games in WebView or in native UI. */ nativeUi?: boolean; /** * Alert to show */ message?: string; /** * URL to open */ url?: string; /** * For how long should this answer be cached */ cacheTime: number; } /** * Message edit data for media */ interface RawMessageEditData { _: 'messages.messageEditData'; /** * Media caption, if the specified media's caption can be * edited */ caption?: boolean; } /** * Dialog info of multiple peers */ interface RawPeerDialogs { _: 'messages.peerDialogs'; /** * Dialog info */ dialogs: tl.TypeDialog[]; /** * Messages mentioned in dialog info */ messages: tl.TypeMessage[]; /** * Chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; /** * Current * update * state of dialog */ state: tl.updates.TypeState; } /** * Featured stickers haven't changed */ interface RawFeaturedStickersNotModified { _: 'messages.featuredStickersNotModified'; /** * Total number of featured stickers */ count: number; } /** * Featured stickersets */ interface RawFeaturedStickers { _: 'messages.featuredStickers'; /** * Whether this is a premium stickerset */ premium?: boolean; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Total number of featured stickers */ count: number; /** * Featured stickersets */ sets: tl.TypeStickerSetCovered[]; /** * IDs of new featured stickersets */ unread: Long[]; } /** * No new recent sticker was found */ interface RawRecentStickersNotModified { _: 'messages.recentStickersNotModified'; } /** * Recently used stickers */ interface RawRecentStickers { _: 'messages.recentStickers'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Emojis associated to stickers */ packs: tl.TypeStickerPack[]; /** * Recent stickers */ stickers: tl.TypeDocument[]; /** * When was each sticker last used */ dates: number[]; } /** * Archived stickersets */ interface RawArchivedStickers { _: 'messages.archivedStickers'; /** * Number of archived stickers */ count: number; /** * Archived stickersets */ sets: tl.TypeStickerSetCovered[]; } /** * The stickerset was installed successfully */ interface RawStickerSetInstallResultSuccess { _: 'messages.stickerSetInstallResultSuccess'; } /** * The stickerset was installed, but since there are too many * stickersets some were archived */ interface RawStickerSetInstallResultArchive { _: 'messages.stickerSetInstallResultArchive'; /** * Archived stickersets */ sets: tl.TypeStickerSetCovered[]; } /** * Highscores in a game */ interface RawHighScores { _: 'messages.highScores'; /** * Highscores */ scores: tl.TypeHighScore[]; /** * Users, associated to the highscores */ users: tl.TypeUser[]; } /** * No new favorited stickers were found */ interface RawFavedStickersNotModified { _: 'messages.favedStickersNotModified'; } /** * Favorited stickers */ interface RawFavedStickers { _: 'messages.favedStickers'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Emojis associated to stickers */ packs: tl.TypeStickerPack[]; /** * Favorited stickers */ stickers: tl.TypeDocument[]; } /** * No further results were found */ interface RawFoundStickerSetsNotModified { _: 'messages.foundStickerSetsNotModified'; } /** * Found stickersets */ interface RawFoundStickerSets { _: 'messages.foundStickerSets'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Found stickersets */ sets: tl.TypeStickerSetCovered[]; } /** * Indicates how many results would be found by a * {@link messages.RawSearchRequest} call with the same * parameters */ interface RawSearchCounter { _: 'messages.searchCounter'; /** * If set, the results may be inexact */ inexact?: boolean; /** * Provided message filter */ filter: tl.TypeMessagesFilter; /** * Number of results that were found server-side */ count: number; } /** * Inactive chat list */ interface RawInactiveChats { _: 'messages.inactiveChats'; /** * When was the chat last active */ dates: number[]; /** * Chat list */ chats: tl.TypeChat[]; /** * Users mentioned in the chat list */ users: tl.TypeUser[]; } /** * How users voted in a poll */ interface RawVotesList { _: 'messages.votesList'; /** * Total number of votes for all options (or only for the * chosen option, if provided to * {@link messages.RawGetPollVotesRequest}) */ count: number; /** * Vote info for each user */ votes: tl.TypeMessagePeerVote[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Info about users that voted in the poll */ users: tl.TypeUser[]; /** * Offset to use with the next * {@link messages.RawGetPollVotesRequest} request, empty * string if no more results are available. */ nextOffset?: string; } /** * View, forward counter + info about replies */ interface RawMessageViews { _: 'messages.messageViews'; /** * View, forward counter + info about replies */ views: tl.TypeMessageViews[]; /** * Chats mentioned in constructor */ chats: tl.TypeChat[]; /** * Users mentioned in constructor */ users: tl.TypeUser[]; } /** * Information about a * message * thread */ interface RawDiscussionMessage { _: '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: tl.TypeMessage[]; /** * Message ID of latest reply in this * thread */ maxId?: number; /** * Message ID of latest read incoming message in this * thread */ readInboxMaxId?: number; /** * Message ID of latest read outgoing message in this * thread */ readOutboxMaxId?: number; /** * Number of unread messages */ unreadCount: number; /** * Chats mentioned in constructor */ chats: tl.TypeChat[]; /** * Users mentioned in constructor */ users: tl.TypeUser[]; } /** * ID of a specific * chat * import session, click here for more info ». */ interface RawHistoryImport { _: 'messages.historyImport'; /** * History * import ID */ id: Long; } /** * Contains information about a chat export file * generated * by a foreign chat app, click here for more info. * * * If neither the pm or group flags * are set, the specified chat export was generated from a chat * of unknown type. */ interface RawHistoryImportParsed { _: 'messages.historyImportParsed'; /** * The chat export file was generated from a private chat. */ pm?: boolean; /** * The chat export file was generated from a group chat. */ group?: boolean; /** * Title of the chat. */ title?: string; } /** * Messages found and affected by changes */ interface RawAffectedFoundMessages { _: 'messages.affectedFoundMessages'; /** * Event * count after generation */ pts: number; /** * Number * of events that were generated */ ptsCount: number; /** * If bigger than zero, the request must be repeated to remove * more messages */ offset: number; /** * Affected message IDs */ messages: number[]; } /** * Info about chat invites exported by a certain admin. */ interface RawExportedChatInvites { _: 'messages.exportedChatInvites'; /** * Number of invites exported by the admin */ count: number; /** * Exported invites */ invites: tl.TypeExportedChatInvite[]; /** * Info about the admin */ users: tl.TypeUser[]; } /** * Info about a chat invite */ interface RawExportedChatInvite { _: 'messages.exportedChatInvite'; /** * Info about the chat invite */ invite: tl.TypeExportedChatInvite; /** * Mentioned users */ users: tl.TypeUser[]; } /** * The specified chat invite was replaced with another one */ interface RawExportedChatInviteReplaced { _: 'messages.exportedChatInviteReplaced'; /** * The replaced chat invite */ invite: tl.TypeExportedChatInvite; /** * The invite that replaces the previous invite */ newInvite: tl.TypeExportedChatInvite; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Info about the users that joined the chat using a specific * chat invite */ interface RawChatInviteImporters { _: 'messages.chatInviteImporters'; /** * Number of users that joined */ count: number; /** * The users that joined */ importers: tl.TypeChatInviteImporter[]; /** * The users that joined */ users: tl.TypeUser[]; } /** * Info about chat invites generated by admins. */ interface RawChatAdminsWithInvites { _: 'messages.chatAdminsWithInvites'; /** * Info about chat invites generated by admins. */ admins: tl.TypeChatAdminWithInvites[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Contains a confirmation text to be shown to the user, upon * importing * chat history, click here for more info ». */ interface RawCheckedHistoryImportPeer { _: 'messages.checkedHistoryImportPeer'; /** * A confirmation text to be shown to the user, upon * importing * chat history ». */ confirmText: string; } /** * A set of sponsored messages associated to a channel */ interface RawSponsoredMessages { _: '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. */ postsBetween?: number; /** * For * sponsored * messages to show on channel videos », the number of * seconds to wait before showing the first ad. */ startDelay?: number; /** * For * sponsored * messages to show on channel videos », the number of * seconds to wait after the previous ad is hidden, before * showing the next ad. */ betweenDelay?: number; /** * Sponsored messages */ messages: tl.TypeSponsoredMessage[]; /** * Chats mentioned in the sponsored messages */ chats: tl.TypeChat[]; /** * Users mentioned in the sponsored messages */ users: tl.TypeUser[]; } /** * No sponsored messages are available. */ interface RawSponsoredMessagesEmpty { _: 'messages.sponsoredMessagesEmpty'; } /** * Information about found messages sent on a specific day */ interface RawSearchResultsCalendar { _: 'messages.searchResultsCalendar'; /** * If set, indicates that the results may be inexact */ inexact?: boolean; /** * Total number of results matching query */ count: number; /** * Starting timestamp of attached messages */ minDate: number; /** * Ending timestamp of attached messages */ minMsgId: 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}. */ offsetIdOffset?: number; /** * Used to split the messages by days: multiple * 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: tl.TypeSearchResultsCalendarPeriod[]; /** * Messages */ messages: tl.TypeMessage[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Information about sparse positions of messages */ interface RawSearchResultsPositions { _: 'messages.searchResultsPositions'; /** * Total number of found messages */ count: number; /** * List of message positions */ positions: tl.TypeSearchResultsPosition[]; } /** * Peer settings */ interface RawPeerSettings { _: 'messages.peerSettings'; /** * Peer settings */ settings: tl.TypePeerSettings; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * List of peers that reacted to a specific message */ interface RawMessageReactionsList { _: 'messages.messageReactionsList'; /** * Total number of reactions matching query */ count: number; /** * List of peers that reacted to a specific message */ reactions: tl.TypeMessagePeerReaction[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; /** * If set, indicates the next offset to use to load more * results by invoking * {@link messages.RawGetMessageReactionsListRequest}. */ nextOffset?: string; } /** * No new reactions are available */ interface RawAvailableReactionsNotModified { _: 'messages.availableReactionsNotModified'; } /** * Animations and metadata associated with * message * reactions » */ interface RawAvailableReactions { _: 'messages.availableReactions'; /** * Hash * used for caching, for more info click here */ hash: number; /** * Animations and metadata associated with * message * reactions » */ reactions: tl.TypeAvailableReaction[]; } /** * Transcribed * text from a voice message » */ interface RawTranscribedAudio { _: 'messages.transcribedAudio'; /** * Whether the transcription is partial because audio * transcription is still in progress, if set the user may * receive further {@link RawUpdateTranscribedAudio} updates * with the updated transcription. */ pending?: boolean; /** * Transcription ID */ transcriptionId: Long; /** * Transcripted text */ text: string; /** * For * non-Premium * users, this flag will be set, indicating the remaining * transcriptions in the free trial period. */ trialRemainsNum?: number; /** * For * non-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. */ trialRemainsUntilDate?: number; } /** * The server-side list of * message * reactions hasn't changed */ interface RawReactionsNotModified { _: 'messages.reactionsNotModified'; } /** * List of * message * reactions */ interface RawReactions { _: 'messages.reactions'; /** * Hash used for caching, can also be locally regenerated using * the algorithm specified * here * ». */ hash: Long; /** * Reactions */ reactions: tl.TypeReaction[]; } /** * Contains information about multiple * forum * topics */ interface RawForumTopics { _: 'messages.forumTopics'; /** * Whether the returned topics are ordered by creation date; if * set, pagination by offset_date should use * {@link RawForumTopic}.date; otherwise topics * are ordered by the last message date, so paginate by the * date of the * message * referenced by * {@link RawForumTopic}.top_message. */ orderByCreateDate?: boolean; /** * Total number of topics matching query; may be more than the * topics contained in topics, in which case * pagination * is required. */ count: number; /** * Forum topics */ topics: tl.TypeForumTopic[]; /** * Related messages (contains the messages mentioned by * {@link RawForumTopic}.top_message). */ messages: tl.TypeMessage[]; /** * Related chats */ chats: tl.TypeChat[]; /** * Related users */ users: tl.TypeUser[]; /** * Event * count after generation */ pts: number; } /** * The list of * emoji * categories hasn't changed. */ interface RawEmojiGroupsNotModified { _: 'messages.emojiGroupsNotModified'; } /** * Represents a list of * emoji * categories. */ interface RawEmojiGroups { _: 'messages.emojiGroups'; /** * Hash * used for caching, for more info click here */ hash: number; /** * A list of * emoji * categories. */ groups: tl.TypeEmojiGroup[]; } /** * Translated text with * entities */ interface RawTranslateResult { _: 'messages.translateResult'; /** * Text+entities, * for each input message. */ result: tl.TypeTextWithEntities[]; } /** * Contains information about a * direct * link Mini App */ interface RawBotApp { _: 'messages.botApp'; /** * Whether the web app was never used by the user, and * confirmation must be asked from the user before opening it. */ inactive?: boolean; /** * The bot is asking permission to send messages to the user: * if the user agrees, set the write_allowed flag * when invoking {@link messages.RawRequestAppWebViewRequest}. */ requestWriteAccess?: boolean; /** * Deprecated flag, can be ignored. */ hasSettings?: boolean; /** * Bot app information */ app: tl.TypeBotApp; } /** * Represents an Instant View webpage. */ interface RawWebPage { _: 'messages.webPage'; /** * The instant view webpage. */ webpage: tl.TypeWebPage; /** * Chats mentioned in the webpage. */ chats: tl.TypeChat[]; /** * Users mentioned in the webpage. */ users: tl.TypeUser[]; } /** * Represents some * saved * message dialogs ». */ interface RawSavedDialogs { _: 'messages.savedDialogs'; /** * Saved * message dialogs ». */ dialogs: tl.TypeSavedDialog[]; /** * List of last messages from each saved dialog */ messages: tl.TypeMessage[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Incomplete list of * saved * message dialogs » with messages and auxiliary data. */ interface RawSavedDialogsSlice { _: 'messages.savedDialogsSlice'; /** * Total number of saved message dialogs */ count: number; /** * List of saved message dialogs */ dialogs: tl.TypeSavedDialog[]; /** * List of last messages from dialogs */ messages: tl.TypeMessage[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * The saved dialogs haven't changed */ interface RawSavedDialogsNotModified { _: 'messages.savedDialogsNotModified'; /** * Number of * saved * dialogs found server-side by the query */ count: number; } /** * The list of * reaction * tag » names assigned by the user hasn't changed. */ interface RawSavedReactionTagsNotModified { _: 'messages.savedReactionTagsNotModified'; } /** * List of * reaction * tag » names assigned by the user. */ interface RawSavedReactionTags { _: 'messages.savedReactionTags'; /** * Saved reaction tags. */ tags: tl.TypeSavedReactionTag[]; /** * Hash * used for caching, for more info click here. Can also be * manually regenerated, if needed, using the * custom * algorithm specified here ». */ hash: Long; } /** * Info about * quick * reply shortcuts ». */ interface RawQuickReplies { _: 'messages.quickReplies'; /** * Quick reply shortcuts. */ quickReplies: tl.TypeQuickReply[]; /** * Messages mentioned in quick_replies. */ messages: tl.TypeMessage[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Info about * quick * reply shortcuts » hasn't changed. */ interface RawQuickRepliesNotModified { _: 'messages.quickRepliesNotModified'; } /** * Folder * and folder tags information */ interface RawDialogFilters { _: 'messages.dialogFilters'; /** * Whether * folder * tags are enabled. */ tagsEnabled?: boolean; /** * Folders. */ filters: tl.TypeDialogFilter[]; } /** * The list of * stickersets * owned by the current account ». */ interface RawMyStickers { _: 'messages.myStickers'; /** * Total number of owned stickersets. */ count: number; /** * Stickersets */ sets: tl.TypeStickerSetCovered[]; } /** * Contains info about successfully or unsuccessfully * invited * » users. */ interface RawInvitedUsers { _: 'messages.invitedUsers'; /** * List of updates about successfully invited users (and * eventually info about the created group) */ updates: tl.TypeUpdates; /** * A list of users that could not be invited, along with the * reason why they couldn't be invited. */ missingInvitees: tl.TypeMissingInvitee[]; } /** * The full list of usable * animated * message effects » hasn't changed. */ interface RawAvailableEffectsNotModified { _: 'messages.availableEffectsNotModified'; } /** * The full list of usable * animated * message effects ». */ interface RawAvailableEffects { _: 'messages.availableEffects'; /** * Hash * used for caching, for more info click here */ hash: number; /** * Message effects */ effects: tl.TypeAvailableEffect[]; /** * Documents specified in the effects * constructors. */ documents: tl.TypeDocument[]; } /** * Represents a * prepared * inline message saved by a bot, to be sent to the user via a * web app » */ interface RawBotPreparedInlineMessage { _: 'messages.botPreparedInlineMessage'; /** * The ID of the saved message, to be passed to the * id field of the * web_app_send_prepared_message * event » */ id: string; /** * Expiration date of the message */ expireDate: number; } /** * Represents a * prepared * inline message received via a bot's mini app, that can be * sent to some chats » */ interface RawPreparedInlineMessage { _: 'messages.preparedInlineMessage'; /** * The query_id to pass to * {@link messages.RawSendInlineBotResultRequest} */ queryId: Long; /** * The contents of the message, to be shown in a preview */ result: tl.TypeBotInlineResult; /** * Types of chats where this message can be sent */ peerTypes: tl.TypeInlineQueryPeerType[]; /** * Caching validity of the results */ cacheTime: number; /** * Users mentioned in the results */ users: tl.TypeUser[]; } /** * No new stickers were found for the specified query */ interface RawFoundStickersNotModified { _: 'messages.foundStickersNotModified'; /** * Offset for * pagination */ nextOffset?: number; } /** * Found stickers */ interface RawFoundStickers { _: 'messages.foundStickers'; /** * Offset for * pagination */ nextOffset?: number; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Found stickers */ stickers: tl.TypeDocument[]; } /** * Represents a webpage preview. */ interface RawWebPagePreview { _: 'messages.webPagePreview'; /** * The {@link RawMessageMediaWebPage} or a * {@link RawMessageMediaEmpty} if there is no preview. */ media: tl.TypeMessageMedia; /** * Chats mentioned in the gift field. */ chats: tl.TypeChat[]; /** * Users mentioned within the media object. */ users: tl.TypeUser[]; } interface RawEmojiGameOutcome { _: 'messages.emojiGameOutcome'; seed: Uint8Array; stakeTonAmount: Long; tonAmount: Long; } interface RawEmojiGameUnavailable { _: 'messages.emojiGameUnavailable'; } interface RawEmojiGameDiceInfo { _: 'messages.emojiGameDiceInfo'; gameHash: string; prevStake: Long; currentStreak: number; params: number[]; playsLeft?: number; } /** * Returns the list of messages by their IDs. * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetMessagesRequest { _: 'messages.getMessages'; /** * Message ID list */ id: tl.TypeInputMessage[]; } /** * Returns the current user dialog list. * * RPC method returns {@link tl.messages.TypeDialogs} */ interface RawGetDialogsRequest { _: 'messages.getDialogs'; /** * Exclude pinned dialogs */ excludePinned?: boolean; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Offsets * for pagination, for more info click here */ offsetDate: number; /** * Offsets * for pagination, for more info click here * (top_message ID used for pagination) */ offsetId: number; /** * Offset * peer for pagination */ offsetPeer: tl.TypeInputPeer; /** * Number of list elements to be returned */ limit: number; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Returns the conversation history with one interlocutor / * within a chat * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetHistoryRequest { _: 'messages.getHistory'; /** * Target peer */ peer: tl.TypeInputPeer; /** * Only return messages starting from the specified message ID */ offsetId: number; /** * Only return messages sent before the specified date */ offsetDate: number; /** * Number of list elements to be skipped, negative values are * also accepted. */ addOffset: 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 */ maxId: number; /** * If a positive value was transferred, the method will return * only messages with IDs more than min_id */ minId: number; /** * Result * hash */ hash: Long; } /** * Search for messages. * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawSearchRequest { _: 'messages.search'; /** * User or chat, histories with which are searched, or * {@link RawInputPeerEmpty} constructor to search in all * private chats and * normal * groups (not channels) ». Use * {@link messages.RawSearchGlobalRequest} to search globally * in all chats, groups, supergroups and channels. */ peer: tl.TypeInputPeer; /** * Text search request */ q: string; /** * Only return messages sent by the specified user ID */ fromId?: tl.TypeInputPeer; /** * Search within the * saved * message dialog » with this ID. */ savedPeerId?: tl.TypeInputPeer; /** * You may search for * saved * messages tagged » with one or more reactions using this * flag. */ savedReaction?: tl.TypeReaction[]; /** * Thread * ID */ topMsgId?: number; /** * Filter to return only specified message types */ filter: tl.TypeMessagesFilter; /** * If a positive value was transferred, only messages with a * sending date bigger than the transferred one will be * returned */ minDate: number; /** * If a positive value was transferred, only messages with a * sending date smaller than the transferred one will be * returned */ maxDate: number; /** * Only return messages starting from the specified message ID */ offsetId: number; /** * Additional * offset */ addOffset: number; /** * Number * of results to return, can be 0 to only return the * message counter. */ limit: number; /** * Maximum * message ID to return */ maxId: number; /** * Minimum * message ID to return */ minId: number; /** * Hash */ hash: Long; } /** * Marks message history as read. * * RPC method returns {@link tl.messages.TypeAffectedMessages} */ interface RawReadHistoryRequest { _: 'messages.readHistory'; /** * Target user or group */ peer: tl.TypeInputPeer; /** * If a positive value is passed, only messages with * identifiers less or equal than the given one will be read */ maxId: number; } /** * Deletes communication history. * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawDeleteHistoryRequest { _: 'messages.deleteHistory'; /** * Just clear history for the current user, without actually * removing messages for every chat user */ justClear?: boolean; /** * Whether to delete the message history for all chat * participants */ revoke?: boolean; /** * User or chat, communication history of which will be deleted */ peer: tl.TypeInputPeer; /** * Maximum ID of message to delete */ maxId: number; /** * Delete all messages newer than this UNIX timestamp */ minDate?: number; /** * Delete all messages older than this UNIX timestamp */ maxDate?: number; } /** * Deletes messages by their identifiers. * * RPC method returns {@link tl.messages.TypeAffectedMessages} */ interface RawDeleteMessagesRequest { _: 'messages.deleteMessages'; /** * Whether to delete messages for all participants of the chat */ revoke?: boolean; /** * Message ID list */ id: number[]; } /** * Confirms receipt of messages by a client, cancels * PUSH-notification sending. * * RPC method returns {@link tl.TypeReceivedNotifyMessage} * array */ interface RawReceivedMessagesRequest { _: 'messages.receivedMessages'; /** * Maximum message ID available in a client. */ maxId: number; } /** * Sends a current user typing event (see * SendMessageAction * for all event types) to a conversation partner or group. * * RPC method returns boolean */ interface RawSetTypingRequest { _: 'messages.setTyping'; /** * Target user or group */ peer: tl.TypeInputPeer; /** * Topic * ID */ topMsgId?: number; /** * Type of action */ action: tl.TypeSendMessageAction; } /** * Sends a message to a chat * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendMessageRequest { _: 'messages.sendMessage'; /** * Set this flag to disable generation of the webpage preview */ noWebpage?: boolean; /** * Send this message silently (no notifications for the * receivers) */ silent?: boolean; /** * Send this message as background message */ background?: boolean; /** * Clear the draft field */ clearDraft?: boolean; /** * Only for bots, disallows forwarding and saving of the * messages, even if the destination chat doesn't have * content * protection enabled */ noforwards?: boolean; /** * Whether to move used stickersets to top, * see * here for more info on this flag » */ updateStickersetsOrder?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Bots only: if set, allows sending up to 1000 messages per * second, ignoring * broadcasting * limits for a fee of 0.1 Telegram Stars per message. The * relevant Stars will be withdrawn from the bot's balance. */ allowPaidFloodskip?: boolean; /** * The destination where the message will be sent */ peer: tl.TypeInputPeer; /** * If set, indicates that the message should be sent in reply * to the specified message or story. * * Also used to quote other messages. */ replyTo?: tl.TypeInputReplyTo; /** * The message */ message: string; /** * Unique client message ID required to prevent message * resending */ randomId: Long; /** * Reply markup for sending bot buttons */ replyMarkup?: tl.TypeReplyMarkup; /** * Message * entities * for sending styled text */ entities?: tl.TypeMessageEntity[]; /** * Scheduled message date for * scheduled * messages */ scheduleDate?: number; scheduleRepeatPeriod?: number; /** * Send this message as the specified peer */ sendAs?: tl.TypeInputPeer; /** * Add the message to the specified * quick * reply shortcut », instead. */ quickReplyShortcut?: tl.TypeInputQuickReplyShortcut; /** * Specifies a * message * effect » to use for the message. */ effect?: Long; /** * For * paid * messages », specifies the amount of * Telegram * Stars the user has agreed to pay in order to send the * message. */ allowPaidStars?: Long; /** * Used to * suggest * a post to a channel, see here » for more info on the * full flow. */ suggestedPost?: tl.TypeSuggestedPost; } /** * Send a media * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendMediaRequest { _: 'messages.sendMedia'; /** * Send message silently (no notification should be triggered) */ silent?: boolean; /** * Send message in background */ background?: boolean; /** * Clear the draft */ clearDraft?: boolean; /** * Only for bots, disallows forwarding and saving of the * messages, even if the destination chat doesn't have * content * protection enabled */ noforwards?: boolean; /** * Whether to move used stickersets to top, * see * here for more info on this flag » */ updateStickersetsOrder?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Bots only: if set, allows sending up to 1000 messages per * second, ignoring * broadcasting * limits for a fee of 0.1 Telegram Stars per message. The * relevant Stars will be withdrawn from the bot's balance. */ allowPaidFloodskip?: boolean; /** * Destination */ peer: tl.TypeInputPeer; /** * If set, indicates that the message should be sent in reply * to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * Attached media */ media: tl.TypeInputMedia; /** * Caption */ message: string; /** * Random ID to avoid resending the same message */ randomId: Long; /** * Reply markup for bot keyboards */ replyMarkup?: tl.TypeReplyMarkup; /** * Message * entities * for styled text */ entities?: tl.TypeMessageEntity[]; /** * Scheduled message date for * scheduled * messages */ scheduleDate?: number; scheduleRepeatPeriod?: number; /** * Send this message as the specified peer */ sendAs?: tl.TypeInputPeer; /** * Add the message to the specified * quick * reply shortcut », instead. */ quickReplyShortcut?: tl.TypeInputQuickReplyShortcut; /** * Specifies a * message * effect » to use for the message. */ effect?: Long; /** * For * paid * messages », specifies the amount of * Telegram * Stars the user has agreed to pay in order to send the * message. */ allowPaidStars?: Long; /** * Used to * suggest * a post to a channel, see here » for more info on the * full flow. */ suggestedPost?: tl.TypeSuggestedPost; } /** * Forwards messages by their IDs. * * RPC method returns {@link tl.TypeUpdates} */ interface RawForwardMessagesRequest { _: 'messages.forwardMessages'; /** * Whether to send messages silently (no notification will be * triggered on the destination clients) */ silent?: boolean; /** * Whether to send the message in background */ background?: boolean; /** * When forwarding games, whether to include your score in the * game */ withMyScore?: boolean; /** * Whether to forward messages without quoting the original * author */ dropAuthor?: boolean; /** * Whether to strip captions from media */ dropMediaCaptions?: boolean; /** * Only for bots, disallows further re-forwarding and saving of * the messages, even if the destination chat doesn't have * content * protection enabled */ noforwards?: boolean; /** * Bots only: if set, allows sending up to 1000 messages per * second, ignoring * broadcasting * limits for a fee of 0.1 Telegram Stars per message. The * relevant Stars will be withdrawn from the bot's balance. */ allowPaidFloodskip?: boolean; /** * Source of messages */ fromPeer: tl.TypeInputPeer; /** * IDs of messages */ id: number[]; /** * Random ID to prevent resending of messages */ randomId: Long[]; /** * Destination peer */ toPeer: tl.TypeInputPeer; /** * Destination * forum * topic */ topMsgId?: number; /** * Can only contain an {@link RawInputReplyToMonoForum}, to * forward messages to a * monoforum * topic (mutually exclusive with top_msg_id). */ replyTo?: tl.TypeInputReplyTo; /** * Scheduled message date for scheduled messages */ scheduleDate?: number; scheduleRepeatPeriod?: number; /** * Forward the messages as the specified peer */ sendAs?: tl.TypeInputPeer; /** * Add the messages to the specified * quick * reply shortcut », instead. */ quickReplyShortcut?: tl.TypeInputQuickReplyShortcut; effect?: Long; /** * Start playing the video at the specified timestamp * (seconds). */ videoTimestamp?: number; /** * For * paid * messages », specifies the amount of * Telegram * Stars the user has agreed to pay in order to send the * message. */ allowPaidStars?: Long; /** * Used to * suggest * a post to a channel, see here » for more info on the * full flow. */ suggestedPost?: tl.TypeSuggestedPost; } /** * Report a new incoming chat for spam, if the * {@link RawPeerSettings} of the chat allow us to do that * * RPC method returns boolean */ interface RawReportSpamRequest { _: 'messages.reportSpam'; /** * Peer to report */ peer: tl.TypeInputPeer; } /** * Get peer settings * * RPC method returns {@link tl.messages.TypePeerSettings} */ interface RawGetPeerSettingsRequest { _: 'messages.getPeerSettings'; /** * The peer */ peer: tl.TypeInputPeer; } /** * Report a message in a chat for violation of telegram's Terms * of Service * * RPC method returns {@link tl.TypeReportResult} */ interface RawReportRequest { _: 'messages.report'; /** * Peer */ peer: tl.TypeInputPeer; /** * IDs of messages to report */ id: number[]; /** * Menu option, intially empty */ option: Uint8Array; /** * Comment for report moderation */ message: string; } /** * Returns chat basic info on their IDs. * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetChatsRequest { _: 'messages.getChats'; /** * List of chat IDs */ id: number[]; } /** * Get full info about a * basic * group. * * RPC method returns {@link tl.messages.TypeChatFull} */ interface RawGetFullChatRequest { _: 'messages.getFullChat'; /** * Basic * group ID. */ chatId: number; } /** * Changes chat name and sends a service message on it. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditChatTitleRequest { _: 'messages.editChatTitle'; /** * Chat ID */ chatId: number; /** * New chat name, different from the old one */ title: string; } /** * Changes chat photo and sends a service message on it * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditChatPhotoRequest { _: 'messages.editChatPhoto'; /** * Chat ID */ chatId: number; /** * Photo to be set */ photo: tl.TypeInputChatPhoto; } /** * Adds a user to a chat and sends a service message on it. * * RPC method returns {@link tl.messages.TypeInvitedUsers} */ interface RawAddChatUserRequest { _: 'messages.addChatUser'; /** * Chat ID */ chatId: number; /** * User ID to be added */ userId: tl.TypeInputUser; /** * Number of last messages to be forwarded */ fwdLimit: number; } /** * Deletes a user from a chat and sends a service message on * it. * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteChatUserRequest { _: 'messages.deleteChatUser'; /** * Remove the entire chat history of the specified user in this * chat. */ revokeHistory?: boolean; /** * Chat ID */ chatId: number; /** * User ID to be deleted */ userId: tl.TypeInputUser; } /** * Creates a new chat. * * RPC method returns {@link tl.messages.TypeInvitedUsers} */ interface RawCreateChatRequest { _: 'messages.createChat'; /** * List of user IDs to be invited */ users: tl.TypeInputUser[]; /** * 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 * {@link messages.RawSetDefaultHistoryTTLRequest} to edit this * value later. */ ttlPeriod?: number; } /** * Returns configuration parameters for Diffie-Hellman key * generation. Can also return a random sequence of bytes of * required length. * * RPC method returns {@link tl.messages.TypeDhConfig} */ interface RawGetDhConfigRequest { _: 'messages.getDhConfig'; /** * Value of the version parameter from * {@link messages.RawDhConfig}, available at the client */ version: number; /** * Length of the required random sequence */ randomLength: number; } /** * Sends a request to start a secret chat to the user. * * RPC method returns {@link tl.TypeEncryptedChat} */ interface RawRequestEncryptionRequest { _: 'messages.requestEncryption'; /** * User ID */ userId: tl.TypeInputUser; /** * Unique client request ID required to prevent resending. This * also doubles as the chat ID. */ randomId: number; /** * A = g ^ a mod p, see * Wikipedia */ gA: Uint8Array; } /** * Confirms creation of a secret chat * * RPC method returns {@link tl.TypeEncryptedChat} */ interface RawAcceptEncryptionRequest { _: 'messages.acceptEncryption'; /** * Secret chat ID */ peer: tl.TypeInputEncryptedChat; /** * B = g ^ b mod p, see * Wikipedia */ gB: Uint8Array; /** * 64-bit fingerprint of the received key */ keyFingerprint: Long; } /** * Cancels a request for creation and/or delete info on secret * chat. * * RPC method returns boolean */ interface RawDiscardEncryptionRequest { _: 'messages.discardEncryption'; /** * Whether to delete the entire chat history for the other user * as well */ deleteHistory?: boolean; /** * Secret chat ID */ chatId: number; } /** * Send typing event by the current user to a secret chat. * * RPC method returns boolean */ interface RawSetEncryptedTypingRequest { _: 'messages.setEncryptedTyping'; /** * Secret chat ID */ peer: tl.TypeInputEncryptedChat; /** * Typing. * * Possible values: * * true, if the user started typing and more than 5 * seconds have passed since the last request * * false, if the user stopped typing */ typing: boolean; } /** * Marks message history within a secret chat as read. * * RPC method returns boolean */ interface RawReadEncryptedHistoryRequest { _: 'messages.readEncryptedHistory'; /** * Secret chat ID */ peer: tl.TypeInputEncryptedChat; /** * Maximum date value for received messages in history */ maxDate: number; } /** * Sends a text message to a secret chat. * * RPC method returns * {@link tl.messages.TypeSentEncryptedMessage} */ interface RawSendEncryptedRequest { _: 'messages.sendEncrypted'; /** * Send encrypted message without a notification */ silent?: boolean; /** * Secret chat ID */ peer: tl.TypeInputEncryptedChat; /** * Unique client message ID, necessary to avoid message * resending */ randomId: Long; /** * TL-serialization of * DecryptedMessage * type, encrypted with a key that was created during chat * initialization */ data: Uint8Array; } /** * Sends a message with a file attachment to a secret chat * * RPC method returns * {@link tl.messages.TypeSentEncryptedMessage} */ interface RawSendEncryptedFileRequest { _: 'messages.sendEncryptedFile'; /** * Whether to send the file without triggering a notification */ silent?: boolean; /** * Secret chat ID */ peer: tl.TypeInputEncryptedChat; /** * Unique client message ID necessary to prevent message * resending */ randomId: Long; /** * TL-serialization of * DecryptedMessage * type, encrypted with a key generated during chat * initialization */ data: Uint8Array; /** * File attachment for the secret chat */ file: tl.TypeInputEncryptedFile; } /** * Sends a service message to a secret chat. * * RPC method returns * {@link tl.messages.TypeSentEncryptedMessage} */ interface RawSendEncryptedServiceRequest { _: 'messages.sendEncryptedService'; /** * Secret chat ID */ peer: tl.TypeInputEncryptedChat; /** * Unique client message ID required to prevent message * resending */ randomId: Long; /** * TL-serialization of * DecryptedMessage * type, encrypted with a key generated during chat * initialization */ data: Uint8Array; } /** * Confirms receipt of messages in a secret chat by client, * cancels push notifications. * * * The method returns a list of random_ids of * messages for which push notifications were cancelled. * * RPC method returns Long array */ interface RawReceivedQueueRequest { _: 'messages.receivedQueue'; /** * Maximum qts value available at the client */ maxQts: number; } /** * Report a secret chat for spam * * RPC method returns boolean */ interface RawReportEncryptedSpamRequest { _: 'messages.reportEncryptedSpam'; /** * The secret chat to report */ peer: tl.TypeInputEncryptedChat; } /** * Notifies the sender about the recipient having listened a * voice message or watched a video, emitting an * {@link RawUpdateReadMessagesContents}. * * RPC method returns {@link tl.messages.TypeAffectedMessages} */ interface RawReadMessageContentsRequest { _: 'messages.readMessageContents'; /** * Message ID list */ id: number[]; } /** * Get stickers by emoji * * RPC method returns {@link tl.messages.TypeStickers} */ interface RawGetStickersRequest { _: 'messages.getStickers'; /** * The emoji */ emoticon: string; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get all installed stickers * * RPC method returns {@link tl.messages.TypeAllStickers} */ interface RawGetAllStickersRequest { _: 'messages.getAllStickers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get preview of webpage * * RPC method returns {@link tl.messages.TypeWebPagePreview} */ interface RawGetWebPagePreviewRequest { _: 'messages.getWebPagePreview'; /** * Message from which to extract the preview */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; } /** * Export an invite link for a chat * * RPC method returns {@link tl.TypeExportedChatInvite} */ interface RawExportChatInviteRequest { _: 'messages.exportChatInvite'; /** * 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. */ legacyRevokePermanent?: boolean; /** * Whether admin confirmation is required before admitting each * separate user into the chat */ requestNeeded?: boolean; /** * Chat */ peer: tl.TypeInputPeer; /** * Expiration date */ expireDate?: number; /** * Maximum number of users that can join using this link */ usageLimit?: number; /** * Description of the invite link, visible only to * administrators */ title?: string; /** * For * Telegram * Star subscriptions », contains the pricing of the * subscription the user must activate to join the private * channel. */ subscriptionPricing?: tl.TypeStarsSubscriptionPricing; } /** * Check the validity of a chat invite link and get basic info * about it * * RPC method returns {@link tl.TypeChatInvite} */ interface RawCheckChatInviteRequest { _: 'messages.checkChatInvite'; /** * Invite hash from * chat * invite deep link ». */ hash: string; } /** * Import a chat invite and join a private * chat/supergroup/channel * * RPC method returns {@link tl.TypeUpdates} */ interface RawImportChatInviteRequest { _: 'messages.importChatInvite'; /** * hash from a * chat * invite deep link */ hash: string; } /** * Get info about a stickerset * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawGetStickerSetRequest { _: 'messages.getStickerSet'; /** * Stickerset */ stickerset: tl.TypeInputStickerSet; /** * Hash * used for caching, for more info click here */ hash: number; } /** * Install a stickerset * * RPC method returns * {@link tl.messages.TypeStickerSetInstallResult} */ interface RawInstallStickerSetRequest { _: 'messages.installStickerSet'; /** * Stickerset to install */ stickerset: tl.TypeInputStickerSet; /** * Whether to archive stickerset */ archived: boolean; } /** * Uninstall a stickerset * * RPC method returns boolean */ interface RawUninstallStickerSetRequest { _: 'messages.uninstallStickerSet'; /** * The stickerset to uninstall */ stickerset: tl.TypeInputStickerSet; } /** * Start a conversation with a bot using a * deep * linking parameter * * RPC method returns {@link tl.TypeUpdates} */ interface RawStartBotRequest { _: 'messages.startBot'; /** * The bot */ bot: tl.TypeInputUser; /** * The chat where to start the bot, can be the bot's private * chat or a group */ peer: tl.TypeInputPeer; /** * Random ID to avoid resending the same message */ randomId: Long; /** * Deep * linking parameter */ startParam: string; } /** * Get and increase the view counter of a message sent or * forwarded from a * channel * * RPC method returns {@link tl.messages.TypeMessageViews} */ interface RawGetMessagesViewsRequest { _: 'messages.getMessagesViews'; /** * Peer where the message was found */ peer: tl.TypeInputPeer; /** * ID of message */ id: number[]; /** * Whether to mark the message as viewed and increment the view * counter */ increment: boolean; } /** * Make a user admin in a * basic * group. * * RPC method returns boolean */ interface RawEditChatAdminRequest { _: 'messages.editChatAdmin'; /** * The ID of the group */ chatId: number; /** * The user to make admin */ userId: tl.TypeInputUser; /** * Whether to make them admin */ isAdmin: boolean; } /** * Turn a * basic * group into a supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawMigrateChatRequest { _: 'messages.migrateChat'; /** * Basic * group to migrate */ chatId: number; } /** * Search for messages and peers globally * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawSearchGlobalRequest { _: 'messages.searchGlobal'; /** * If set, only returns results from channels (used in the * global * channel search tab »). */ broadcastsOnly?: boolean; /** * Whether to search only in groups */ groupsOnly?: boolean; /** * Whether to search only in private chats */ usersOnly?: boolean; /** * Peer * folder ID, for more info click here */ folderId?: number; /** * Query */ q: string; /** * Global search filter */ filter: tl.TypeMessagesFilter; /** * If a positive value was specified, the method will return * only messages with date bigger than min_date */ minDate: number; /** * If a positive value was transferred, the method will return * only messages with date smaller than max_date */ maxDate: number; /** * Initially 0, then set to the * {@link messages.RawMessagesSlice}, or if that is absent, the * date of the last returned message. */ offsetRate: number; /** * Offsets * for pagination, for more info click here */ offsetPeer: tl.TypeInputPeer; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Offsets * for pagination, for more info click here */ limit: number; } /** * Reorder installed stickersets * * RPC method returns boolean */ interface RawReorderStickerSetsRequest { _: 'messages.reorderStickerSets'; /** * Reorder mask stickersets */ masks?: boolean; /** * Reorder * custom * emoji stickersets */ emojis?: boolean; /** * New stickerset order by stickerset IDs */ order: Long[]; } /** * Get a document by its SHA256 hash, mainly used for gifs * * RPC method returns {@link tl.TypeDocument} */ interface RawGetDocumentByHashRequest { _: 'messages.getDocumentByHash'; /** * SHA256 of file */ sha256: Uint8Array; /** * Size of the file in bytes */ size: number; /** * Mime type */ mimeType: string; } /** * Get saved GIFs. * * RPC method returns {@link tl.messages.TypeSavedGifs} */ interface RawGetSavedGifsRequest { _: 'messages.getSavedGifs'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Add GIF to saved gifs list * * RPC method returns boolean */ interface RawSaveGifRequest { _: 'messages.saveGif'; /** * GIF to save */ id: tl.TypeInputDocument; /** * Whether to remove GIF from saved gifs list */ unsave: boolean; } /** * Query an inline bot * * RPC method returns {@link tl.messages.TypeBotResults} */ interface RawGetInlineBotResultsRequest { _: 'messages.getInlineBotResults'; /** * The bot to query */ bot: tl.TypeInputUser; /** * The currently opened chat */ peer: tl.TypeInputPeer; /** * The geolocation, if requested */ geoPoint?: tl.TypeInputGeoPoint; /** * The query */ query: string; /** * The offset within the results, will be passed directly as-is * to the bot. */ offset: string; } /** * Answer an inline query, for bots only * * RPC method returns boolean */ interface RawSetInlineBotResultsRequest { _: 'messages.setInlineBotResults'; /** * Set this flag if the results are composed of media files */ gallery?: boolean; /** * 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?: boolean; /** * Unique identifier for the answered query */ queryId: Long; /** * Vector of results for the inline query */ results: tl.TypeInputBotInlineResult[]; /** * The maximum amount of time in seconds that the result of the * inline query may be cached on the server. Defaults to 300. */ cacheTime: 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. */ nextOffset?: 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. */ switchPm?: tl.TypeInlineBotSwitchPM; /** * 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. */ switchWebview?: tl.TypeInlineBotWebView; } /** * Send a result obtained using * {@link messages.RawGetInlineBotResultsRequest}. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendInlineBotResultRequest { _: 'messages.sendInlineBotResult'; /** * Whether to send the message silently (no notification will * be triggered on the other client) */ silent?: boolean; /** * Whether to send the message in background */ background?: boolean; /** * Whether to clear the * draft */ clearDraft?: boolean; /** * Whether to hide the via @botname in the * resulting message (only for bot usernames encountered in the * {@link RawConfig}) */ hideVia?: boolean; /** * Destination */ peer: tl.TypeInputPeer; /** * If set, indicates that the message should be sent in reply * to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * Random ID to avoid resending the same query */ randomId: Long; /** * Query ID from {@link messages.RawGetInlineBotResultsRequest} */ queryId: Long; /** * Result ID from * {@link messages.RawGetInlineBotResultsRequest} */ id: string; /** * Scheduled message date for scheduled messages */ scheduleDate?: number; /** * Send this message as the specified peer */ sendAs?: tl.TypeInputPeer; /** * Add the message to the specified * quick * reply shortcut », instead. */ quickReplyShortcut?: tl.TypeInputQuickReplyShortcut; /** * For * paid * messages », specifies the amount of * Telegram * Stars the user has agreed to pay in order to send the * message. */ allowPaidStars?: Long; } /** * Find out if a media message's caption can be edited * * RPC method returns {@link tl.messages.TypeMessageEditData} */ interface RawGetMessageEditDataRequest { _: 'messages.getMessageEditData'; /** * Peer where the media was sent */ peer: tl.TypeInputPeer; /** * ID of message */ id: number; } /** * Edit message * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditMessageRequest { _: 'messages.editMessage'; /** * Disable webpage preview */ noWebpage?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Where was the message sent */ peer: tl.TypeInputPeer; /** * ID of the message to edit */ id: number; /** * New message */ message?: string; /** * New attached media */ media?: tl.TypeInputMedia; /** * Reply markup for inline keyboards */ replyMarkup?: tl.TypeReplyMarkup; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Scheduled message date for * scheduled * messages */ scheduleDate?: number; scheduleRepeatPeriod?: number; /** * If specified, edits a * quick * reply shortcut message, instead ». */ quickReplyShortcutId?: number; } /** * Edit an inline bot message * * RPC method returns boolean */ interface RawEditInlineBotMessageRequest { _: 'messages.editInlineBotMessage'; /** * Disable webpage preview */ noWebpage?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Sent inline message ID */ id: tl.TypeInputBotInlineMessageID; /** * Message */ message?: string; /** * Media */ media?: tl.TypeInputMedia; /** * Reply markup for inline keyboards */ replyMarkup?: tl.TypeReplyMarkup; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; } /** * Press an inline callback button and get a callback answer * from the bot * * RPC method returns {@link tl.messages.TypeBotCallbackAnswer} */ interface RawGetBotCallbackAnswerRequest { _: 'messages.getBotCallbackAnswer'; /** * Whether this is a "play game" button */ game?: boolean; /** * Where was the inline keyboard sent */ peer: tl.TypeInputPeer; /** * ID of the Message with the inline keyboard */ msgId: number; /** * Callback data */ data?: Uint8Array; /** * For buttons {@link RawKeyboardButtonCallback}, the SRP * payload generated using * SRP. */ password?: tl.TypeInputCheckPasswordSRP; } /** * Set the callback answer to a user button press (bots only) * * RPC method returns boolean */ interface RawSetBotCallbackAnswerRequest { _: 'messages.setBotCallbackAnswer'; /** * Whether to show the message as a popup instead of a toast * notification */ alert?: boolean; /** * Query ID */ queryId: Long; /** * Popup to show */ message?: string; /** * URL to open */ url?: string; /** * Cache validity */ cacheTime: number; } /** * Get dialog info of specified peers * * RPC method returns {@link tl.messages.TypePeerDialogs} */ interface RawGetPeerDialogsRequest { _: 'messages.getPeerDialogs'; /** * Peers */ peers: tl.TypeInputDialogPeer[]; } /** * Save a message * draft * associated to a chat. * * RPC method returns boolean */ interface RawSaveDraftRequest { _: 'messages.saveDraft'; /** * Disable generation of the webpage preview */ noWebpage?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * If set, indicates that the message should be sent in reply * to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * Destination of the message that should be sent */ peer: tl.TypeInputPeer; /** * The draft */ message: string; /** * Message * entities * for styled text */ entities?: tl.TypeMessageEntity[]; /** * Attached media */ media?: tl.TypeInputMedia; /** * Specifies a * message * effect » to use for the message. */ effect?: Long; /** * Used to * suggest * a post to a channel, see here » for more info on the * full flow. */ suggestedPost?: tl.TypeSuggestedPost; } /** * Return all message * drafts. * * * Returns all the latest {@link RawUpdateDraftMessage} updates * related to all chats with drafts. * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetAllDraftsRequest { _: 'messages.getAllDrafts'; } /** * Get featured stickers * * RPC method returns {@link tl.messages.TypeFeaturedStickers} */ interface RawGetFeaturedStickersRequest { _: 'messages.getFeaturedStickers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Mark new featured stickers as read * * RPC method returns boolean */ interface RawReadFeaturedStickersRequest { _: 'messages.readFeaturedStickers'; /** * IDs of stickersets to mark as read */ id: Long[]; } /** * Get recent stickers * * RPC method returns {@link tl.messages.TypeRecentStickers} */ interface RawGetRecentStickersRequest { _: 'messages.getRecentStickers'; /** * Get stickers recently attached to photo or video files */ attached?: boolean; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Add/remove sticker from recent stickers list * * RPC method returns boolean */ interface RawSaveRecentStickerRequest { _: 'messages.saveRecentSticker'; /** * Whether to add/remove stickers recently attached to photo or * video files */ attached?: boolean; /** * Sticker */ id: tl.TypeInputDocument; /** * Whether to save or unsave the sticker */ unsave: boolean; } /** * Clear recent stickers * * RPC method returns boolean */ interface RawClearRecentStickersRequest { _: 'messages.clearRecentStickers'; /** * Set this flag to clear the list of stickers recently * attached to photo or video files */ attached?: boolean; } /** * Get all archived stickers * * RPC method returns {@link tl.messages.TypeArchivedStickers} */ interface RawGetArchivedStickersRequest { _: 'messages.getArchivedStickers'; /** * Get * mask * stickers */ masks?: boolean; /** * Get * custom * emoji stickers */ emojis?: boolean; /** * Offsets * for pagination, for more info click here */ offsetId: Long; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Get installed mask stickers * * RPC method returns {@link tl.messages.TypeAllStickers} */ interface RawGetMaskStickersRequest { _: 'messages.getMaskStickers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get stickers attached to a photo or video * * RPC method returns {@link tl.TypeStickerSetCovered} array */ interface RawGetAttachedStickersRequest { _: 'messages.getAttachedStickers'; /** * Stickered media */ media: tl.TypeInputStickeredMedia; } /** * Use this method to set the score of the specified user in a * game sent as a normal message (bots only). * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetGameScoreRequest { _: 'messages.setGameScore'; /** * Set this flag if the game message should be automatically * edited to include the current scoreboard */ editMessage?: boolean; /** * Set this flag if the high score is allowed to decrease. This * can be useful when fixing mistakes or banning cheaters */ force?: boolean; /** * Unique identifier of target chat */ peer: tl.TypeInputPeer; /** * Identifier of the sent message */ id: number; /** * User identifier */ userId: tl.TypeInputUser; /** * New score */ score: number; } /** * Use this method to set the score of the specified user in a * game sent as an inline message (bots only). * * RPC method returns boolean */ interface RawSetInlineGameScoreRequest { _: 'messages.setInlineGameScore'; /** * Set this flag if the game message should be automatically * edited to include the current scoreboard */ editMessage?: boolean; /** * Set this flag if the high score is allowed to decrease. This * can be useful when fixing mistakes or banning cheaters */ force?: boolean; /** * ID of the inline message */ id: tl.TypeInputBotInlineMessageID; /** * User identifier */ userId: tl.TypeInputUser; /** * New score */ score: number; } /** * Get highscores of a game * * RPC method returns {@link tl.messages.TypeHighScores} */ interface RawGetGameHighScoresRequest { _: 'messages.getGameHighScores'; /** * Where was the game sent */ peer: tl.TypeInputPeer; /** * ID of message with game media attachment */ id: number; /** * Get high scores made by a certain user */ userId: tl.TypeInputUser; } /** * Get highscores of a game sent using an inline bot * * RPC method returns {@link tl.messages.TypeHighScores} */ interface RawGetInlineGameHighScoresRequest { _: 'messages.getInlineGameHighScores'; /** * ID of inline message */ id: tl.TypeInputBotInlineMessageID; /** * Get high scores of a certain user */ userId: tl.TypeInputUser; } /** * Get chats in common with a user * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetCommonChatsRequest { _: 'messages.getCommonChats'; /** * User ID */ userId: tl.TypeInputUser; /** * Maximum ID of chat to return (see * pagination) */ maxId: number; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Get instant * view page * * RPC method returns {@link tl.messages.TypeWebPage} */ interface RawGetWebPageRequest { _: 'messages.getWebPage'; /** * URL of IV page to fetch */ url: string; /** * Hash * used for caching, for more info click here. * * Note: the usual hash generation algorithm * cannot be used in this case, please re-use the * {@link RawWebPage}.hash field returned by a * previous call to the method, or pass 0 if this is the first * call or if the previous call did not return a * {@link RawWebPage}. */ hash: number; } /** * Pin/unpin a dialog * * RPC method returns boolean */ interface RawToggleDialogPinRequest { _: 'messages.toggleDialogPin'; /** * Whether to pin or unpin the dialog */ pinned?: boolean; /** * The dialog to pin */ peer: tl.TypeInputDialogPeer; } /** * Reorder pinned dialogs * * RPC method returns boolean */ interface RawReorderPinnedDialogsRequest { _: 'messages.reorderPinnedDialogs'; /** * If set, dialogs pinned server-side but not present in the * order field will be unpinned. */ force?: boolean; /** * Peer * folder ID, for more info click here */ folderId: number; /** * New dialog order */ order: tl.TypeInputDialogPeer[]; } /** * Get pinned dialogs * * RPC method returns {@link tl.messages.TypePeerDialogs} */ interface RawGetPinnedDialogsRequest { _: 'messages.getPinnedDialogs'; /** * Peer * folder ID, for more info click here */ folderId: number; } /** * If you sent an invoice requesting a shipping address and the * parameter is_flexible was specified, the bot will receive an * {@link RawUpdateBotShippingQuery} update. Use this method to * reply to shipping queries. * * RPC method returns boolean */ interface RawSetBotShippingResultsRequest { _: 'messages.setBotShippingResults'; /** * Unique identifier for the query to be answered */ queryId: Long; /** * 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. */ shippingOptions?: tl.TypeShippingOption[]; } /** * Once the user has confirmed their payment and shipping * details, the bot receives an * {@link RawUpdateBotPrecheckoutQuery} 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. * * RPC method returns boolean */ interface RawSetBotPrecheckoutResultsRequest { _: 'messages.setBotPrecheckoutResults'; /** * 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?: boolean; /** * Unique identifier for the query to be answered */ queryId: Long; /** * 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; } /** * Upload a file and associate it to a chat (without actually * sending it to the chat) * * May also be used in a * business * connection, not by wrapping the query in * {@link RawInvokeWithBusinessConnectionRequest}, but rather * by specifying the business connection ID in the * business_connection_id parameter. * * RPC method returns {@link tl.TypeMessageMedia} */ interface RawUploadMediaRequest { _: 'messages.uploadMedia'; /** * Whether the media will be used only in the specified * business * connection », and not directly by the bot. */ businessConnectionId?: string; /** * The chat, can be {@link RawInputPeerEmpty} for bots and * {@link RawInputPeerSelf} for users. */ peer: tl.TypeInputPeer; /** * File uploaded in chunks as described in * files * » */ media: tl.TypeInputMedia; } /** * Notify the other user in a private chat that a screenshot of * the chat was taken * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendScreenshotNotificationRequest { _: 'messages.sendScreenshotNotification'; /** * Other user */ peer: tl.TypeInputPeer; /** * Indicates the message that was screenshotted (the specified * message ID can also be 0 to avoid indicating * any specific message). */ replyTo: tl.TypeInputReplyTo; /** * Random ID to avoid message resending */ randomId: Long; } /** * Get faved stickers * * RPC method returns {@link tl.messages.TypeFavedStickers} */ interface RawGetFavedStickersRequest { _: 'messages.getFavedStickers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Mark or unmark a sticker as favorite * * RPC method returns boolean */ interface RawFaveStickerRequest { _: 'messages.faveSticker'; /** * Sticker in question */ id: tl.TypeInputDocument; /** * Whether to add or remove a sticker from favorites */ unfave: boolean; } /** * Get unread messages where we were mentioned * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetUnreadMentionsRequest { _: 'messages.getUnreadMentions'; /** * Peer where to look for mentions */ peer: tl.TypeInputPeer; /** * If set, considers only messages within the specified * forum * topic */ topMsgId?: number; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Offsets * for pagination, for more info click here */ addOffset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Maximum message ID to return, * see * pagination */ maxId: number; /** * Minimum message ID to return, * see * pagination */ minId: number; } /** * Mark mentions as read * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawReadMentionsRequest { _: 'messages.readMentions'; /** * Dialog */ peer: tl.TypeInputPeer; /** * Mark as read only mentions within the specified * forum * topic */ topMsgId?: number; } /** * Get live location history of a certain user * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetRecentLocationsRequest { _: 'messages.getRecentLocations'; /** * User */ peer: tl.TypeInputPeer; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Send an * album * or grouped media * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendMultiMediaRequest { _: 'messages.sendMultiMedia'; /** * Whether to send the album silently (no notification * triggered) */ silent?: boolean; /** * Send in background? */ background?: boolean; /** * Whether to clear * drafts */ clearDraft?: boolean; /** * Only for bots, disallows forwarding and saving of the * messages, even if the destination chat doesn't have * content * protection enabled */ noforwards?: boolean; /** * Whether to move used stickersets to top, * see * here for more info on this flag » */ updateStickersetsOrder?: boolean; /** * If set, any eventual webpage preview will be shown on top of * the message instead of at the bottom. */ invertMedia?: boolean; /** * Bots only: if set, allows sending up to 1000 messages per * second, ignoring * broadcasting * limits for a fee of 0.1 Telegram Stars per message. The * relevant Stars will be withdrawn from the bot's balance. */ allowPaidFloodskip?: boolean; /** * The destination chat */ peer: tl.TypeInputPeer; /** * If set, indicates that the message should be sent in reply * to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * The medias to send: note that they must be separately * uploaded using {@link messages.RawUploadMediaRequest} first, * using raw inputMediaUploaded* constructors is * not supported. */ multiMedia: tl.TypeInputSingleMedia[]; /** * Scheduled message date for scheduled messages */ scheduleDate?: number; /** * Send this message as the specified peer */ sendAs?: tl.TypeInputPeer; /** * Add the message to the specified * quick * reply shortcut », instead. */ quickReplyShortcut?: tl.TypeInputQuickReplyShortcut; /** * Specifies a * message * effect » to use for the message. */ effect?: Long; /** * For * paid * messages », specifies the amount of * Telegram * Stars the user has agreed to pay in order to send the * message. */ allowPaidStars?: Long; } /** * Upload encrypted file and associate it to a secret chat * (without actually sending it to the chat). * * RPC method returns {@link tl.TypeEncryptedFile} */ interface RawUploadEncryptedFileRequest { _: 'messages.uploadEncryptedFile'; /** * The secret chat to associate the file to */ peer: tl.TypeInputEncryptedChat; /** * The file */ file: tl.TypeInputEncryptedFile; } /** * Search for stickersets * * RPC method returns {@link tl.messages.TypeFoundStickerSets} */ interface RawSearchStickerSetsRequest { _: 'messages.searchStickerSets'; /** * Exclude featured stickersets from results */ excludeFeatured?: boolean; /** * Query string */ q: string; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get message ranges for saving the user's chat history * * RPC method returns {@link tl.TypeMessageRange} array */ interface RawGetSplitRangesRequest { _: 'messages.getSplitRanges'; } /** * Manually mark dialog as unread * * RPC method returns boolean */ interface RawMarkDialogUnreadRequest { _: 'messages.markDialogUnread'; /** * Mark as unread/read */ unread?: boolean; /** * If set, must be equal to the ID of a * monoforum, * and will affect the monoforum topic passed in * peer. */ parentPeer?: tl.TypeInputPeer; /** * Dialog */ peer: tl.TypeInputDialogPeer; } /** * Get dialogs manually marked as unread * * RPC method returns {@link tl.TypeDialogPeer} array */ interface RawGetDialogUnreadMarksRequest { _: 'messages.getDialogUnreadMarks'; /** * Can be equal to the ID of a monoforum, to fetch monoforum * topics manually marked as unread. */ parentPeer?: tl.TypeInputPeer; } /** * Clear all * drafts. * * RPC method returns boolean */ interface RawClearAllDraftsRequest { _: 'messages.clearAllDrafts'; } /** * Pin a message * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdatePinnedMessageRequest { _: 'messages.updatePinnedMessage'; /** * Pin the message silently, without triggering a notification */ silent?: boolean; /** * Whether the message should unpinned or pinned */ unpin?: boolean; /** * Whether the message should only be pinned on the local side * of a one-to-one chat */ pmOneside?: boolean; /** * The peer where to pin the message */ peer: tl.TypeInputPeer; /** * The message to pin or unpin */ id: number; } /** * Vote in a {@link RawPoll} * * Starting from layer 159, the vote will be sent from the peer * specified using * {@link messages.RawSaveDefaultSendAsRequest}. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendVoteRequest { _: 'messages.sendVote'; /** * The chat where the poll was sent */ peer: tl.TypeInputPeer; /** * The message ID of the poll */ msgId: number; /** * The options that were chosen */ options: Uint8Array[]; } /** * Get poll results * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetPollResultsRequest { _: 'messages.getPollResults'; /** * Peer where the poll was found */ peer: tl.TypeInputPeer; /** * Message ID of poll message */ msgId: number; } /** * Get count of online users in a chat * * RPC method returns {@link tl.TypeChatOnlines} */ interface RawGetOnlinesRequest { _: 'messages.getOnlines'; /** * The chat */ peer: tl.TypeInputPeer; } /** * Edit the description of a * group/supergroup/channel. * * RPC method returns boolean */ interface RawEditChatAboutRequest { _: 'messages.editChatAbout'; /** * The * group/supergroup/channel. */ peer: tl.TypeInputPeer; /** * The new description */ about: string; } /** * Edit the default banned rights of a * channel/supergroup/group. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditChatDefaultBannedRightsRequest { _: 'messages.editChatDefaultBannedRights'; /** * The peer */ peer: tl.TypeInputPeer; /** * The new global rights */ bannedRights: tl.TypeChatBannedRights; } /** * Get localized * emoji * keywords ». * * RPC method returns {@link tl.TypeEmojiKeywordsDifference} */ interface RawGetEmojiKeywordsRequest { _: 'messages.getEmojiKeywords'; /** * Language code */ langCode: string; } /** * Get changed * emoji * keywords ». * * RPC method returns {@link tl.TypeEmojiKeywordsDifference} */ interface RawGetEmojiKeywordsDifferenceRequest { _: 'messages.getEmojiKeywordsDifference'; /** * Language code */ langCode: string; /** * Previous stored emoji keyword list version */ fromVersion: number; } /** * Obtain a list of related languages that must be used when * fetching * emoji * keyword lists ». * * Usually the method will return the passed language codes (if * localized) + en + some language codes for * similar languages (if applicable). * * RPC method returns {@link tl.TypeEmojiLanguage} array */ interface RawGetEmojiKeywordsLanguagesRequest { _: 'messages.getEmojiKeywordsLanguages'; /** * The user's language codes */ langCodes: string[]; } /** * Returns an HTTP URL which can be used to automatically log * in into translation platform and suggest new * emoji * keywords ». The URL will be valid for 30 seconds after * generation. * * RPC method returns {@link tl.TypeEmojiURL} */ interface RawGetEmojiURLRequest { _: 'messages.getEmojiURL'; /** * Language code for which the emoji keywords will be suggested */ langCode: string; } /** * Get the number of results that would be found by a * {@link messages.RawSearchRequest} call with the same * parameters * * RPC method returns {@link tl.messages.TypeSearchCounter} * array */ interface RawGetSearchCountersRequest { _: 'messages.getSearchCounters'; /** * Peer where to search */ peer: tl.TypeInputPeer; /** * Search within the * saved * message dialog » with this ID. */ savedPeerId?: tl.TypeInputPeer; /** * If set, consider only messages within the specified * forum * topic */ topMsgId?: number; /** * Search filters */ filters: tl.TypeMessagesFilter[]; } /** * Get more info about a Seamless Telegram Login authorization * request, for more info * click * here » * * RPC method returns {@link tl.TypeUrlAuthResult} */ interface RawRequestUrlAuthRequest { _: 'messages.requestUrlAuth'; /** * Peer where the message is located */ peer?: tl.TypeInputPeer; /** * The message */ msgId?: number; /** * The ID of the button with the authorization request */ buttonId?: number; /** * URL used for * link * URL authorization, click here for more info » */ url?: string; inAppOrigin?: string; } /** * Use this to accept a Seamless Telegram Login authorization * request, for more info * click * here » * * RPC method returns {@link tl.TypeUrlAuthResult} */ interface RawAcceptUrlAuthRequest { _: 'messages.acceptUrlAuth'; /** * Set this flag to allow the bot to send messages to you (if * requested) */ writeAllowed?: boolean; sharePhoneNumber?: boolean; /** * The location of the message */ peer?: tl.TypeInputPeer; /** * Message ID of the message with the login button */ msgId?: number; /** * ID of the login button */ buttonId?: number; /** * URL used for * link * URL authorization, click here for more info » */ url?: string; matchCode?: string; } /** * Should be called after the user hides the * report * spam/add as contact bar of a new chat, effectively * prevents the user from executing the actions specified in * the * action * bar ». * * RPC method returns boolean */ interface RawHidePeerSettingsBarRequest { _: 'messages.hidePeerSettingsBar'; /** * Peer */ peer: tl.TypeInputPeer; } /** * Get scheduled messages * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetScheduledHistoryRequest { _: 'messages.getScheduledHistory'; /** * Peer */ peer: tl.TypeInputPeer; /** * Hash * used for caching, for more info click here. * * To generate the hash, populate the ids array * with the id, edit_date (0 if * unedited) and date (in this order) of the * previously returned messages (in order, i.e. ids = * [id1, (edit_date1 ?? 0), date1, id2, (edit_date2 ?? 0), * date2, ...]). */ hash: Long; } /** * Get scheduled messages * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetScheduledMessagesRequest { _: 'messages.getScheduledMessages'; /** * Peer */ peer: tl.TypeInputPeer; /** * IDs of scheduled messages */ id: number[]; } /** * Send scheduled messages right away * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendScheduledMessagesRequest { _: 'messages.sendScheduledMessages'; /** * Peer */ peer: tl.TypeInputPeer; /** * Scheduled message IDs */ id: number[]; } /** * Delete scheduled messages * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteScheduledMessagesRequest { _: 'messages.deleteScheduledMessages'; /** * Peer */ peer: tl.TypeInputPeer; /** * Scheduled message IDs */ id: number[]; } /** * Get poll results for non-anonymous polls * * RPC method returns {@link tl.messages.TypeVotesList} */ interface RawGetPollVotesRequest { _: 'messages.getPollVotes'; /** * Chat where the poll was sent */ peer: tl.TypeInputPeer; /** * Message ID */ id: number; /** * Get only results for the specified poll option */ option?: Uint8Array; /** * Offset for results, taken from the next_offset * field of {@link messages.RawVotesList}, 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 * {@link messages.RawVotesList} if it is empty, to avoid an * infinite loop. */ offset?: string; /** * Number of results to return */ limit: number; } /** * Apply changes to multiple stickersets * * RPC method returns boolean */ interface RawToggleStickerSetsRequest { _: 'messages.toggleStickerSets'; /** * Uninstall the specified stickersets */ uninstall?: boolean; /** * Archive the specified stickersets */ archive?: boolean; /** * Unarchive the specified stickersets */ unarchive?: boolean; /** * Stickersets to act upon */ stickersets: tl.TypeInputStickerSet[]; } /** * Get * folders * * RPC method returns {@link tl.messages.TypeDialogFilters} */ interface RawGetDialogFiltersRequest { _: 'messages.getDialogFilters'; } /** * Get * suggested * folders * * RPC method returns {@link tl.TypeDialogFilterSuggested} * array */ interface RawGetSuggestedDialogFiltersRequest { _: 'messages.getSuggestedDialogFilters'; } /** * Update * folder * * RPC method returns boolean */ interface RawUpdateDialogFilterRequest { _: 'messages.updateDialogFilter'; /** * Folder * ID */ id: number; /** * Folder * info */ filter?: tl.TypeDialogFilter; } /** * Reorder * folders * * RPC method returns boolean */ interface RawUpdateDialogFiltersOrderRequest { _: 'messages.updateDialogFiltersOrder'; /** * New * folder * order */ order: number[]; } /** * Method for fetching previously featured stickers * * RPC method returns {@link tl.messages.TypeFeaturedStickers} */ interface RawGetOldFeaturedStickersRequest { _: 'messages.getOldFeaturedStickers'; /** * Offset */ offset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get messages in a reply thread * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetRepliesRequest { _: 'messages.getReplies'; /** * Peer */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Offsets * for pagination, for more info click here */ offsetDate: number; /** * Offsets * for pagination, for more info click here */ addOffset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * If a positive value was transferred, the method will return * only messages with ID smaller than max_id */ maxId: number; /** * If a positive value was transferred, the method will return * only messages with ID bigger than min_id */ minId: number; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Get * discussion * message from the * associated * discussion group of a channel to show it on top of the * comment section, without actually joining the group * * RPC method returns {@link tl.messages.TypeDiscussionMessage} */ interface RawGetDiscussionMessageRequest { _: 'messages.getDiscussionMessage'; /** * Channel * ID */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; } /** * Mark a * thread * as read * * RPC method returns boolean */ interface RawReadDiscussionRequest { _: 'messages.readDiscussion'; /** * Group ID */ peer: tl.TypeInputPeer; /** * ID of message that started the thread */ msgId: number; /** * ID up to which thread messages were read */ readMaxId: number; } /** * Unpin * all pinned messages * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawUnpinAllMessagesRequest { _: 'messages.unpinAllMessages'; /** * Chat where to unpin */ peer: tl.TypeInputPeer; /** * Forum * topic where to unpin */ topMsgId?: number; /** * If set, must be equal to the ID of a * monoforum * topic, and will unpin all messages pinned in the passed * monoforum topic. */ savedPeerId?: tl.TypeInputPeer; } /** * Delete a * chat * * RPC method returns boolean */ interface RawDeleteChatRequest { _: 'messages.deleteChat'; /** * Chat ID */ chatId: number; } /** * Delete the entire phone call history. * * RPC method returns * {@link tl.messages.TypeAffectedFoundMessages} */ interface RawDeletePhoneCallHistoryRequest { _: 'messages.deletePhoneCallHistory'; /** * Whether to remove phone call history for participants as * well */ revoke?: boolean; } /** * Obtains information about a chat export file, generated by a * foreign chat app, * click * here for more info about imported chats ». * * RPC method returns * {@link tl.messages.TypeHistoryImportParsed} */ interface RawCheckHistoryImportRequest { _: 'messages.checkHistoryImport'; /** * Beginning of the message file; up to 100 lines. */ importHead: string; } /** * Import chat history from a foreign chat app into a specific * Telegram chat, * click * here for more info about imported chats ». * * RPC method returns {@link tl.messages.TypeHistoryImport} */ interface RawInitHistoryImportRequest { _: 'messages.initHistoryImport'; /** * The Telegram chat where the * history * should be imported. */ peer: tl.TypeInputPeer; /** * File with messages to import. */ file: tl.TypeInputFile; /** * Number of media files associated with the chat that will be * uploaded using * {@link messages.RawUploadImportedMediaRequest}. */ mediaCount: number; } /** * Upload a media file associated with an * imported * chat, click here for more info ». * * RPC method returns {@link tl.TypeMessageMedia} */ interface RawUploadImportedMediaRequest { _: 'messages.uploadImportedMedia'; /** * The Telegram chat where the media will be imported */ peer: tl.TypeInputPeer; /** * Identifier of a * history * import session, returned by * {@link messages.RawInitHistoryImportRequest} */ importId: Long; /** * File name */ fileName: string; /** * Media metadata */ media: tl.TypeInputMedia; } /** * Complete the * history * import process, importing all messages into the chat. * * * To be called only after initializing the import with * {@link messages.RawInitHistoryImportRequest} and uploading * all files using * {@link messages.RawUploadImportedMediaRequest}. * * RPC method returns boolean */ interface RawStartHistoryImportRequest { _: 'messages.startHistoryImport'; /** * The Telegram chat where the messages should be * imported, * click here for more info » */ peer: tl.TypeInputPeer; /** * Identifier of a history import session, returned by * {@link messages.RawInitHistoryImportRequest}. */ importId: Long; } /** * Get info about the chat invites of a specific chat * * RPC method returns * {@link tl.messages.TypeExportedChatInvites} */ interface RawGetExportedChatInvitesRequest { _: 'messages.getExportedChatInvites'; /** * Whether to fetch revoked chat invites */ revoked?: boolean; /** * Chat */ peer: tl.TypeInputPeer; /** * Whether to only fetch chat invites from this admin */ adminId: tl.TypeInputUser; /** * Offsets * for pagination, for more info click here */ offsetDate?: number; /** * Offsets * for pagination, for more info click here */ offsetLink?: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Get info about a chat invite * * RPC method returns * {@link tl.messages.TypeExportedChatInvite} */ interface RawGetExportedChatInviteRequest { _: 'messages.getExportedChatInvite'; /** * Chat */ peer: tl.TypeInputPeer; /** * Invite link */ link: string; } /** * Edit an exported chat invite * * RPC method returns * {@link tl.messages.TypeExportedChatInvite} */ interface RawEditExportedChatInviteRequest { _: 'messages.editExportedChatInvite'; /** * Whether to revoke the chat invite */ revoked?: boolean; /** * Chat */ peer: tl.TypeInputPeer; /** * Invite link */ link: string; /** * New expiration date */ expireDate?: number; /** * Maximum number of users that can join using this link */ usageLimit?: number; /** * Whether admin confirmation is required before admitting each * separate user into the chat */ requestNeeded?: boolean; /** * Description of the invite link, visible only to * administrators */ title?: string; } /** * Delete all revoked chat invites * * RPC method returns boolean */ interface RawDeleteRevokedExportedChatInvitesRequest { _: 'messages.deleteRevokedExportedChatInvites'; /** * Chat */ peer: tl.TypeInputPeer; /** * ID of the admin that originally generated the revoked chat * invites */ adminId: tl.TypeInputUser; } /** * Delete a chat invite * * RPC method returns boolean */ interface RawDeleteExportedChatInviteRequest { _: 'messages.deleteExportedChatInvite'; /** * Peer */ peer: tl.TypeInputPeer; /** * Invite link */ link: string; } /** * Get info about chat invites generated by admins. * * RPC method returns * {@link tl.messages.TypeChatAdminsWithInvites} */ interface RawGetAdminsWithInvitesRequest { _: 'messages.getAdminsWithInvites'; /** * Chat */ peer: tl.TypeInputPeer; } /** * Get info about the users that joined the chat using a * specific chat invite * * RPC method returns * {@link tl.messages.TypeChatInviteImporters} */ interface RawGetChatInviteImportersRequest { _: 'messages.getChatInviteImporters'; /** * If set, only returns info about users with pending * join * requests » */ requested?: boolean; /** * Set this flag if the link is a * Telegram * Star subscription link » and only members with already * expired subscription must be returned. */ subscriptionExpired?: boolean; /** * Chat */ peer: tl.TypeInputPeer; /** * Invite link */ link?: string; /** * Search for a user in the pending * 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 */ offsetDate: number; /** * User ID for * pagination: * if set, offset_date must also be set. */ offsetUser: tl.TypeInputUser; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Set maximum Time-To-Live of all messages in the specified * chat * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetHistoryTTLRequest { _: 'messages.setHistoryTTL'; /** * The dialog */ peer: tl.TypeInputPeer; /** * Automatically delete all messages sent in the chat after * this many seconds */ period: number; } /** * Check whether chat history exported from another chat app * can be * imported * into a specific Telegram chat, click here for more info * ». * * If the check succeeds, and no RPC errors are returned, a * messages.CheckedHistoryImportPeer * constructor will be returned, with a confirmation text to be * shown to the user, before actually initializing the import. * * RPC method returns * {@link tl.messages.TypeCheckedHistoryImportPeer} */ interface RawCheckHistoryImportPeerRequest { _: 'messages.checkHistoryImportPeer'; /** * The chat where we want to * import * history ». */ peer: tl.TypeInputPeer; } /** * Change the chat theme of a certain chat, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetChatThemeRequest { _: 'messages.setChatTheme'; /** * Private chat where to change theme */ peer: tl.TypeInputPeer; /** * The theme to set. */ theme: tl.TypeInputChatTheme; } /** * Get which users read a specific message: only available for * groups and supergroups with less than * chat_read_mark_size_threshold * members, read receipts will be stored for * chat_read_mark_expire_period * seconds after the message was sent, see * client * configuration for more info ». * * RPC method returns {@link tl.TypeReadParticipantDate} array */ interface RawGetMessageReadParticipantsRequest { _: 'messages.getMessageReadParticipants'; /** * Dialog */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; } /** * Returns information about the next messages of the specified * type in the chat split by days. * * Returns the results in reverse chronological order. * * * Can return partial results for the last returned day. * * RPC method returns * {@link tl.messages.TypeSearchResultsCalendar} */ interface RawGetSearchResultsCalendarRequest { _: 'messages.getSearchResultsCalendar'; /** * Peer where to search */ peer: tl.TypeInputPeer; /** * Search within the * saved * message dialog » with this ID. */ savedPeerId?: tl.TypeInputPeer; /** * Message filter, {@link RawInputMessagesFilterEmpty}, * {@link RawInputMessagesFilterMyMentions} filters are not * supported by this method. */ filter: tl.TypeMessagesFilter; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Offsets * for pagination, for more info click here */ offsetDate: number; } /** * Returns sparse positions of messages of the specified type * in the chat to be used for shared media scroll * implementation. * * Returns the results in reverse chronological order (i.e., in * order of decreasing message_id). * * RPC method returns * {@link tl.messages.TypeSearchResultsPositions} */ interface RawGetSearchResultsPositionsRequest { _: 'messages.getSearchResultsPositions'; /** * Peer where to search */ peer: tl.TypeInputPeer; /** * Search within the * saved * message dialog » with this ID. */ savedPeerId?: tl.TypeInputPeer; /** * Message filter, {@link RawInputMessagesFilterEmpty}, * {@link RawInputMessagesFilterMyMentions} filters are not * supported by this method. */ filter: tl.TypeMessagesFilter; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Dismiss or approve a chat * join * request related to a specific chat or channel. * * RPC method returns {@link tl.TypeUpdates} */ interface RawHideChatJoinRequestRequest { _: 'messages.hideChatJoinRequest'; /** * Whether to dismiss or approve the chat * join * request » */ approved?: boolean; /** * The chat or channel */ peer: tl.TypeInputPeer; /** * The user whose * join * request » should be dismissed or approved */ userId: tl.TypeInputUser; } /** * Dismiss or approve all * join * requests related to a specific chat or channel. * * RPC method returns {@link tl.TypeUpdates} */ interface RawHideAllChatJoinRequestsRequest { _: 'messages.hideAllChatJoinRequests'; /** * Whether to dismiss or approve all chat * join * requests » */ approved?: boolean; /** * The chat or channel */ peer: tl.TypeInputPeer; /** * Only dismiss or approve * join * requests » initiated using this invite link */ link?: string; } /** * Enable or disable * content * protection on a channel or chat * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleNoForwardsRequest { _: 'messages.toggleNoForwards'; /** * The chat or channel */ peer: tl.TypeInputPeer; /** * Enable or disable content protection */ enabled: boolean; requestMsgId?: number; } /** * Change the default peer that should be used when sending * messages, reactions, poll votes to a specific group * * RPC method returns boolean */ interface RawSaveDefaultSendAsRequest { _: 'messages.saveDefaultSendAs'; /** * Group */ peer: tl.TypeInputPeer; /** * The default peer that should be used when sending messages * to the group */ sendAs: tl.TypeInputPeer; } /** * React to message. * * Starting from layer 159, the reaction will be sent from the * peer specified using * {@link messages.RawSaveDefaultSendAsRequest}. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendReactionRequest { _: 'messages.sendReaction'; /** * Whether a bigger and longer reaction should be shown */ big?: boolean; /** * Whether to add this reaction to the * recent * reactions list ». */ addToRecent?: boolean; /** * Peer */ peer: tl.TypeInputPeer; /** * Message ID to react to */ msgId: number; /** * A list of reactions (doesn't accept {@link RawReactionPaid} * constructors, use * {@link messages.RawSendPaidReactionRequest} to send paid * reactions, instead). */ reaction?: tl.TypeReaction[]; } /** * Get * message * reactions » * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetMessagesReactionsRequest { _: 'messages.getMessagesReactions'; /** * Peer */ peer: tl.TypeInputPeer; /** * Message IDs */ id: number[]; } /** * Get * message * reaction list, along with the sender of each reaction. * * RPC method returns * {@link tl.messages.TypeMessageReactionsList} */ interface RawGetMessageReactionsListRequest { _: 'messages.getMessageReactionsList'; /** * Peer */ peer: tl.TypeInputPeer; /** * Message ID */ id: number; /** * Get only reactions of this type */ reaction?: tl.TypeReaction; /** * Offset for pagination (taken from the * next_offset field of the returned * messages.MessageReactionsList); * empty in the first request. */ offset?: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Change the set of * message * reactions » that can be used in a certain group, * supergroup or channel * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetChatAvailableReactionsRequest { _: 'messages.setChatAvailableReactions'; /** * Group where to apply changes */ peer: tl.TypeInputPeer; /** * Allowed reaction emojis */ availableReactions: tl.TypeChatReactions; /** * This flag may be used to impose a custom limit of unique * reactions (i.e. a customizable version of * appConfig.reactions_uniq_max); * this field and the other info set by the method will then be * available to users in {@link RawChannelFull} and * {@link RawChatFull}. * * If this flag is not set, the previously configured * reactions_limit will not be altered. */ reactionsLimit?: number; /** * If this flag is set and a * Bool * is passed, the method will enable or disable * paid * message reactions ». If this flag is not set, the * previously stored setting will not be changed. */ paidEnabled?: boolean; } /** * Obtain available * message * reactions » * * RPC method returns * {@link tl.messages.TypeAvailableReactions} */ interface RawGetAvailableReactionsRequest { _: 'messages.getAvailableReactions'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Change default emoji reaction to use in the quick reaction * menu: the value is synced across devices and can be fetched * using {@link help.RawGetConfigRequest}. * * RPC method returns boolean */ interface RawSetDefaultReactionRequest { _: 'messages.setDefaultReaction'; /** * New emoji reaction */ reaction: tl.TypeReaction; } /** * Translate a given text. * * Styled * text entities will only be preserved for * Telegram * Premium users. * * RPC method returns {@link tl.messages.TypeTranslatedText} */ interface RawTranslateTextRequest { _: 'messages.translateText'; /** * If the text is a chat message, the peer ID */ peer?: tl.TypeInputPeer; /** * A list of message IDs to translate */ id?: number[]; /** * A list of styled messages to translate */ text?: tl.TypeTextWithEntities[]; /** * Two-letter ISO 639-1 language code of the language to which * the message is translated */ toLang: string; } /** * Get unread reactions to messages you sent * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetUnreadReactionsRequest { _: 'messages.getUnreadReactions'; /** * Peer */ peer: tl.TypeInputPeer; /** * If set, considers only reactions to messages within the * specified * forum * topic */ topMsgId?: number; /** * If set, must be equal to the ID of a * monoforum * topic: will affect that topic in the monoforum passed in * peer. */ savedPeerId?: tl.TypeInputPeer; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Offsets * for pagination, for more info click here */ addOffset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Only return reactions for messages up until this message ID */ maxId: number; /** * Only return reactions for messages starting from this * message ID */ minId: number; } /** * Mark * message * reactions » as read * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawReadReactionsRequest { _: 'messages.readReactions'; /** * Peer */ peer: tl.TypeInputPeer; /** * Mark as read only reactions to messages within the specified * forum * topic */ topMsgId?: number; /** * If set, must be equal to the ID of a * monoforum * topic: will affect that topic in the monoforum passed in * peer. */ savedPeerId?: tl.TypeInputPeer; } /** * View and search recently sent media. * * * This method does not support pagination. * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawSearchSentMediaRequest { _: 'messages.searchSentMedia'; /** * Optional search query */ q: string; /** * Message filter */ filter: tl.TypeMessagesFilter; /** * Maximum number of results to return (max 100). */ limit: number; } /** * Returns installed attachment menu * bot * mini apps » * * RPC method returns {@link tl.TypeAttachMenuBots} */ interface RawGetAttachMenuBotsRequest { _: 'messages.getAttachMenuBots'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Returns attachment menu entry for a * bot * mini app that can be launched from the attachment menu » * * RPC method returns {@link tl.TypeAttachMenuBotsBot} */ interface RawGetAttachMenuBotRequest { _: 'messages.getAttachMenuBot'; /** * Bot ID */ bot: tl.TypeInputUser; } /** * Enable or disable * web * bot attachment menu » * * RPC method returns boolean */ interface RawToggleBotInAttachMenuRequest { _: 'messages.toggleBotInAttachMenu'; /** * Whether the user authorizes the bot to write messages to * them, if requested by * {@link RawAttachMenuBot}.request_write_access */ writeAllowed?: boolean; /** * Bot ID */ bot: tl.TypeInputUser; /** * Toggle */ enabled: boolean; } /** * Open a * bot * mini app, sending over user information after user * confirmation. * * After calling this method, until the user closes the * webview, {@link messages.RawProlongWebViewRequest} must be * called every 60 seconds. * * RPC method returns {@link tl.TypeWebViewResult} */ interface RawRequestWebViewRequest { _: 'messages.requestWebView'; /** * Whether the webview was opened by clicking on the bot's * menu * button ». */ fromBotMenu?: boolean; /** * Whether the inline message that will be sent by the bot on * behalf of the user once the web app interaction is * {@link messages.RawSendWebViewResultMessageRequest} should * be sent silently (no notifications for the receivers). */ silent?: boolean; /** * If set, requests to open the mini app in compact mode (as * opposed to normal or fullscreen mode). Must be set if the * mode parameter of the * attachment * menu deep link is equal to compact. */ compact?: boolean; /** * If set, requests to open the mini app in fullscreen mode (as * opposed to normal or compact mode). Must be set if the * mode parameter of the * attachment * menu deep link is equal to fullscreen. */ fullscreen?: boolean; /** * Dialog where the web app is being opened, and where the * resulting message will be sent (see the * docs * for more info »). */ peer: tl.TypeInputPeer; /** * Bot that owns the * web * app */ bot: tl.TypeInputUser; /** * Web * app URL */ url?: string; /** * If the web app was opened from the attachment menu using a * attachment * menu deep link, start_param should contain * the data from the startattach * parameter. */ startParam?: string; /** * Theme * parameters » */ themeParams?: tl.TypeDataJSON; /** * 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 * {@link messages.RawSendWebViewResultMessageRequest} should * be sent in reply to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * Open the web app as the specified peer, sending the * resulting the message as the specified peer. */ sendAs?: tl.TypeInputPeer; } /** * Indicate to the server (from the user side) that the user is * still using a web app. * * If the method returns a QUERY_ID_INVALID error, * the webview must be closed. * * RPC method returns boolean */ interface RawProlongWebViewRequest { _: 'messages.prolongWebView'; /** * Whether the inline message that will be sent by the bot on * behalf of the user once the web app interaction is * {@link messages.RawSendWebViewResultMessageRequest} should * be sent silently (no notifications for the receivers). */ silent?: boolean; /** * Dialog where the web app was opened. */ peer: tl.TypeInputPeer; /** * Bot that owns the * web * app */ bot: tl.TypeInputUser; /** * Web app interaction ID obtained from * {@link messages.RawRequestWebViewRequest} */ queryId: Long; /** * 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 * {@link messages.RawSendWebViewResultMessageRequest} should * be sent in reply to the specified message or story. */ replyTo?: tl.TypeInputReplyTo; /** * Open the web app as the specified peer */ sendAs?: tl.TypeInputPeer; } /** * Open a * bot * mini app. * * RPC method returns {@link tl.TypeWebViewResult} */ interface RawRequestSimpleWebViewRequest { _: 'messages.requestSimpleWebView'; /** * Whether the webapp was opened by clicking on the * switch_webview button shown on top of the * inline results list returned by * {@link messages.RawGetInlineBotResultsRequest}. */ fromSwitchWebview?: boolean; /** * Set this flag if opening the Mini App from the installed * side * menu entry ». */ fromSideMenu?: boolean; /** * Deprecated. */ compact?: boolean; /** * Requests to open the app in fullscreen mode. */ fullscreen?: boolean; /** * Bot that owns the mini app */ bot: tl.TypeInputUser; /** * Web app URL, if opening from a keyboard button or inline * result */ url?: string; /** * Deprecated. */ startParam?: string; /** * Theme * parameters » */ themeParams?: tl.TypeDataJSON; /** * Short name of the application; 0-64 English letters, digits, * and underscores */ platform: string; } /** * Terminate webview interaction started with * {@link messages.RawRequestWebViewRequest}, sending the * specified message to the chat on behalf of the user. * * RPC method returns {@link tl.TypeWebViewMessageSent} */ interface RawSendWebViewResultMessageRequest { _: 'messages.sendWebViewResultMessage'; /** * Webview interaction ID obtained from * {@link messages.RawRequestWebViewRequest} */ botQueryId: string; /** * Message to send */ result: tl.TypeInputBotInlineResult; } /** * Used by the user to relay data from an opened * reply * keyboard bot mini app to the bot that owns it. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendWebViewDataRequest { _: 'messages.sendWebViewData'; /** * Bot that owns the web app */ bot: tl.TypeInputUser; /** * Unique client message ID to prevent duplicate sending of the * same event */ randomId: Long; /** * Text of the {@link RawKeyboardButtonSimpleWebView} that was * pressed to open the web app. */ buttonText: string; /** * Data to relay to the bot, obtained from a * web_app_data_send * JS event. */ data: string; } /** * Transcribe * voice message * * RPC method returns {@link tl.messages.TypeTranscribedAudio} */ interface RawTranscribeAudioRequest { _: 'messages.transcribeAudio'; /** * Peer ID where the voice message was sent */ peer: tl.TypeInputPeer; /** * Voice message ID */ msgId: number; } /** * Rate * transcribed * voice message * * RPC method returns boolean */ interface RawRateTranscribedAudioRequest { _: 'messages.rateTranscribedAudio'; /** * Peer where the voice message was sent */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; /** * Transcription ID */ transcriptionId: Long; /** * Whether the transcription was correct */ good: boolean; } /** * Fetch * custom * emoji stickers ». * * Returns a list of {@link RawDocument} with the animated * custom emoji in TGS format, and a * {@link RawDocumentAttributeCustomEmoji} attribute with the * original emoji and info about the emoji stickerset this * custom emoji belongs to. * * RPC method returns {@link tl.TypeDocument} array */ interface RawGetCustomEmojiDocumentsRequest { _: 'messages.getCustomEmojiDocuments'; /** * Custom * emoji IDs from a {@link RawMessageEntityCustomEmoji}. */ documentId: Long[]; } /** * Gets the list of currently installed * custom * emoji stickersets. * * RPC method returns {@link tl.messages.TypeAllStickers} */ interface RawGetEmojiStickersRequest { _: 'messages.getEmojiStickers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Gets featured custom emoji stickersets. * * RPC method returns {@link tl.messages.TypeFeaturedStickers} */ interface RawGetFeaturedEmojiStickersRequest { _: 'messages.getFeaturedEmojiStickers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Report a * message * reaction * * RPC method returns boolean */ interface RawReportReactionRequest { _: 'messages.reportReaction'; /** * Peer where the message was sent */ peer: tl.TypeInputPeer; /** * Message ID */ id: number; /** * Peer that sent the reaction */ reactionPeer: tl.TypeInputPeer; } /** * Got popular * message * reactions * * RPC method returns {@link tl.messages.TypeReactions} */ interface RawGetTopReactionsRequest { _: 'messages.getTopReactions'; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get recently used * message * reactions * * RPC method returns {@link tl.messages.TypeReactions} */ interface RawGetRecentReactionsRequest { _: 'messages.getRecentReactions'; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Clear recently used * message * reactions * * RPC method returns boolean */ interface RawClearRecentReactionsRequest { _: 'messages.clearRecentReactions'; } /** * Fetch updated information about * paid * media, see here » for the full flow. * * This method will return an array of * {@link RawUpdateMessageExtendedMedia} updates, only for * messages containing already bought paid * media. * * * No information will be returned for messages containing not * yet bought paid media. * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetExtendedMediaRequest { _: 'messages.getExtendedMedia'; /** * Peer with visible paid media messages. */ peer: tl.TypeInputPeer; /** * IDs of currently visible messages containing paid media. */ id: number[]; } /** * Changes the default value of the Time-To-Live setting, * applied to all new chats. * * RPC method returns boolean */ interface RawSetDefaultHistoryTTLRequest { _: 'messages.setDefaultHistoryTTL'; /** * The new default Time-To-Live of all messages sent in new * chats, in seconds. */ period: number; } /** * Gets the default value of the Time-To-Live setting, applied * to all new chats. * * RPC method returns {@link tl.TypeDefaultHistoryTTL} */ interface RawGetDefaultHistoryTTLRequest { _: 'messages.getDefaultHistoryTTL'; } /** * Send one or more chosen peers, as requested by a * {@link RawKeyboardButtonRequestPeer} button. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendBotRequestedPeerRequest { _: 'messages.sendBotRequestedPeer'; /** * The bot that sent the {@link RawKeyboardButtonRequestPeer} * button. */ peer: tl.TypeInputPeer; /** * ID of the message that contained the reply keyboard with the * {@link RawKeyboardButtonRequestPeer} button. */ msgId: number; /** * The button_id field from the * {@link RawKeyboardButtonRequestPeer} constructor. */ buttonId: number; /** * The chosen peers. */ requestedPeers: tl.TypeInputPeer[]; } /** * Represents a list of * emoji * categories. * * RPC method returns {@link tl.messages.TypeEmojiGroups} */ interface RawGetEmojiGroupsRequest { _: 'messages.getEmojiGroups'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Represents a list of * emoji * categories, to be used when selecting custom emojis to * set as custom * emoji status. * * RPC method returns {@link tl.messages.TypeEmojiGroups} */ interface RawGetEmojiStatusGroupsRequest { _: 'messages.getEmojiStatusGroups'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Represents a list of * emoji * categories, to be used when selecting custom emojis to * set as * profile * picture. * * RPC method returns {@link tl.messages.TypeEmojiGroups} */ interface RawGetEmojiProfilePhotoGroupsRequest { _: 'messages.getEmojiProfilePhotoGroups'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Look for * custom * emojis associated to a UTF8 emoji * * RPC method returns {@link tl.TypeEmojiList} */ interface RawSearchCustomEmojiRequest { _: 'messages.searchCustomEmoji'; /** * The emoji */ emoticon: string; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Show or hide the * real-time * chat translation popup for a certain chat * * RPC method returns boolean */ interface RawTogglePeerTranslationsRequest { _: 'messages.togglePeerTranslations'; /** * Whether to disable or enable the real-time chat translation * popup */ disabled?: boolean; /** * The peer */ peer: tl.TypeInputPeer; } /** * Obtain information about a * direct * link Mini App * * RPC method returns {@link tl.messages.TypeBotApp} */ interface RawGetBotAppRequest { _: 'messages.getBotApp'; /** * Bot app information obtained from a * Direct * Mini App deep link ». */ app: tl.TypeInputBotApp; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Open a * bot * mini app from a * direct * Mini App deep link, sending over user information after * user confirmation. * * After calling this method, until the user closes the * webview, {@link messages.RawProlongWebViewRequest} must be * called every 60 seconds. * * RPC method returns {@link tl.TypeWebViewResult} */ interface RawRequestAppWebViewRequest { _: 'messages.requestAppWebView'; /** * Set this flag if the bot is asking permission to send * messages to the user as specified in the * direct * Mini App deep link docs, and the user agreed. */ writeAllowed?: boolean; /** * If set, requests to open the mini app in compact mode (as * opposed to normal or fullscreen mode). Must be set if the * mode parameter of the * direct * Mini App deep link is equal to compact. */ compact?: boolean; /** * If set, requests to open the mini app in fullscreen mode (as * opposed to compact or normal mode). Must be set if the * mode parameter of the * direct * Mini App deep link is equal to fullscreen. */ fullscreen?: boolean; /** * 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: tl.TypeInputPeer; /** * The app obtained by invoking * {@link messages.RawGetBotAppRequest} as specified in the * direct * Mini App deep link docs. */ app: tl.TypeInputBotApp; /** * If the startapp query string parameter is * present in the * direct * Mini App deep link, pass it to start_param. */ startParam?: string; /** * Theme * parameters » */ themeParams?: tl.TypeDataJSON; /** * Short name of the application; 0-64 English letters, digits, * and underscores */ platform: string; } /** * Set a custom * wallpaper * » in a specific private chat with another user. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetChatWallPaperRequest { _: 'messages.setChatWallPaper'; /** * Only for * Premium * users, sets the specified wallpaper for both users of the * chat, without requiring confirmation from the other user. */ forBoth?: boolean; /** * 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?: boolean; /** * The private chat where the wallpaper will be set */ peer: tl.TypeInputPeer; /** * The * wallpaper * », obtained as described in the * wallpaper * documentation »; must not be provided * when installing a wallpaper obtained from a * {@link RawMessageActionSetChatWallPaper} service message * (id must be provided, instead). */ wallpaper?: tl.TypeInputWallPaper; /** * Wallpaper settings, obtained as described in the * wallpaper * documentation » or from * {@link RawMessageActionSetChatWallPaper}.wallpaper.settings. */ settings?: tl.TypeWallPaperSettings; /** * If the wallpaper was obtained from a * {@link RawMessageActionSetChatWallPaper} service message, * must contain the ID of that message. */ id?: number; } /** * Search for * custom * emoji stickersets » * * RPC method returns {@link tl.messages.TypeFoundStickerSets} */ interface RawSearchEmojiStickerSetsRequest { _: 'messages.searchEmojiStickerSets'; /** * Exclude featured stickersets from results */ excludeFeatured?: boolean; /** * Query string */ q: string; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Returns the current * saved * dialog list » or * monoforum * topic list ». * * RPC method returns {@link tl.messages.TypeSavedDialogs} */ interface RawGetSavedDialogsRequest { _: 'messages.getSavedDialogs'; /** * Exclude pinned dialogs */ excludePinned?: boolean; /** * If set, fetches the topic list of the passed monoforum, * otherwise fetches the saved dialog list. */ parentPeer?: tl.TypeInputPeer; /** * Offsets * for pagination, for more info click here */ offsetDate: number; /** * Offsets * for pagination, for more info click here * (top_message ID used for pagination) */ offsetId: number; /** * Offset * peer for pagination */ offsetPeer: tl.TypeInputPeer; /** * Number of list elements to be returned */ limit: number; /** * Hash * used for caching, for more info click here */ hash: Long; } /** * Fetch * saved * messages » forwarded from a specific peer, or fetch * messages from a * monoforum * topic ». * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetSavedHistoryRequest { _: 'messages.getSavedHistory'; /** * If set, fetches messages from the specified monoforum, * otherwise fetches from saved messages. */ parentPeer?: tl.TypeInputPeer; /** * Target peer (or topic) */ peer: tl.TypeInputPeer; /** * Only return messages starting from the specified message ID */ offsetId: number; /** * Only return messages sent before the specified date */ offsetDate: number; /** * Number of list elements to be skipped, negative values are * also accepted. */ addOffset: 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 */ maxId: number; /** * If a positive value was transferred, the method will return * only messages with IDs more than min_id */ minId: number; /** * Result * hash */ hash: Long; } /** * Deletes messages from a * monoforum * topic », or deletes messages forwarded from a specific * peer to * saved * messages ». * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawDeleteSavedHistoryRequest { _: 'messages.deleteSavedHistory'; /** * If set, affects the messages of the passed * monoforum * topic », otherwise affects * saved * messages ». */ parentPeer?: tl.TypeInputPeer; /** * Peer, whose messages will be deleted from * saved * messages », or the ID of the topic. */ peer: tl.TypeInputPeer; /** * Maximum ID of message to delete */ maxId: number; /** * Delete all messages newer than this UNIX timestamp */ minDate?: number; /** * Delete all messages older than this UNIX timestamp */ maxDate?: number; } /** * Get pinned * saved * dialogs, see here » for more info. * * RPC method returns {@link tl.messages.TypeSavedDialogs} */ interface RawGetPinnedSavedDialogsRequest { _: 'messages.getPinnedSavedDialogs'; } /** * Pin or unpin a * saved * message dialog ». * * RPC method returns boolean */ interface RawToggleSavedDialogPinRequest { _: 'messages.toggleSavedDialogPin'; /** * Whether to pin or unpin the dialog */ pinned?: boolean; /** * The dialog to pin */ peer: tl.TypeInputDialogPeer; } /** * Reorder pinned * saved * message dialogs ». * * RPC method returns boolean */ interface RawReorderPinnedSavedDialogsRequest { _: 'messages.reorderPinnedSavedDialogs'; /** * If set, dialogs pinned server-side but not present in the * order field will be unpinned. */ force?: boolean; /** * New dialog order */ order: tl.TypeInputDialogPeer[]; } /** * Fetch the full list of * saved * message tags created by the user. * * RPC method returns {@link tl.messages.TypeSavedReactionTags} */ interface RawGetSavedReactionTagsRequest { _: 'messages.getSavedReactionTags'; /** * If set, returns tags only used in the specified * saved * message dialog. */ peer?: tl.TypeInputPeer; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Update the * description * of a saved message tag ». * * RPC method returns boolean */ interface RawUpdateSavedReactionTagRequest { _: 'messages.updateSavedReactionTag'; /** * Reaction * associated to the tag */ reaction: tl.TypeReaction; /** * Tag description, max 12 UTF-8 characters; to remove the * description call the method without setting this flag. */ title?: string; } /** * Fetch a default recommended list of * saved * message tag reactions. * * RPC method returns {@link tl.messages.TypeReactions} */ interface RawGetDefaultTagReactionsRequest { _: 'messages.getDefaultTagReactions'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get the exact read date of one of our messages, sent to a * private chat with another user. * * Can be only done for private outgoing messages not older * than * appConfig.pm_read_date_expire_period * ». * * If the peer's * {@link RawUserFull}.read_dates_private flag is * set, we will not be able to fetch the exact read date of * messages we send to them, and a * USER_PRIVACY_RESTRICTED RPC error will be * emitted. * * * The exact read date of messages might still be unavailable * for other reasons, see {@link RawGlobalPrivacySettings} for * more info. * * * To set {@link RawUserFull}.read_dates_private * for ourselves invoke * {@link account.RawSetGlobalPrivacySettingsRequest}, setting * the settings.hide_read_marks flag. * * RPC method returns {@link tl.TypeOutboxReadDate} */ interface RawGetOutboxReadDateRequest { _: 'messages.getOutboxReadDate'; /** * The user to whom we sent the message. */ peer: tl.TypeInputPeer; /** * The message ID. */ msgId: number; } /** * Fetch basic info about all existing * quick * reply shortcuts. * * RPC method returns {@link tl.messages.TypeQuickReplies} */ interface RawGetQuickRepliesRequest { _: 'messages.getQuickReplies'; /** * Hash for pagination, generated as specified * here * » (not the usual algorithm used for hash generation.) */ hash: Long; } /** * Reorder * quick * reply shortcuts. * * This will emit an {@link RawUpdateQuickReplies} update to * other logged-in sessions. * * RPC method returns boolean */ interface RawReorderQuickRepliesRequest { _: 'messages.reorderQuickReplies'; /** * IDs of all created * quick * reply shortcuts, in the desired order. */ order: number[]; } /** * Before offering the user the choice to add a message to a * quick * reply shortcut, to make sure that none of the limits * specified * here * » were reached. * * RPC method returns boolean */ interface RawCheckQuickReplyShortcutRequest { _: 'messages.checkQuickReplyShortcut'; /** * Shorcut name (not ID!). */ shortcut: string; } /** * Rename a * quick * reply shortcut. * * * This will emit an {@link RawUpdateQuickReplies} update to * other logged-in sessions. * * RPC method returns boolean */ interface RawEditQuickReplyShortcutRequest { _: 'messages.editQuickReplyShortcut'; /** * Shortcut * ID. */ shortcutId: number; /** * New shortcut name. */ shortcut: string; } /** * Completely delete a * quick * reply shortcut. * * * This will also emit an {@link RawUpdateDeleteQuickReply} * update to other logged-in sessions (and no * {@link RawUpdateDeleteQuickReplyMessages} updates, even if * all the messages in the shortcuts are also deleted by this * method). * * RPC method returns boolean */ interface RawDeleteQuickReplyShortcutRequest { _: 'messages.deleteQuickReplyShortcut'; /** * Shortcut * ID */ shortcutId: number; } /** * Fetch (a subset or all) messages in a * quick * reply shortcut ». * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetQuickReplyMessagesRequest { _: 'messages.getQuickReplyMessages'; /** * Quick reply shortcut ID. */ shortcutId: number; /** * IDs of the messages to fetch, if empty fetches all of them. */ id?: number[]; /** * Hash for pagination, generated as specified * here * » (not the usual algorithm used for hash generation). */ hash: Long; } /** * Send a * quick * reply shortcut ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendQuickReplyMessagesRequest { _: 'messages.sendQuickReplyMessages'; /** * The peer where to send the shortcut (users only, for now). */ peer: tl.TypeInputPeer; /** * The ID of the quick reply shortcut to send. */ shortcutId: number; /** * Specify a subset of messages from the shortcut to send; if * empty, defaults to all of them. */ id: number[]; /** * Unique client IDs required to prevent message resending, one * for each message we're sending, may be empty (but not * recommended). */ randomId: Long[]; } /** * Delete one or more messages from a * quick * reply shortcut. This will also emit an * {@link RawUpdateDeleteQuickReplyMessages} update. * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteQuickReplyMessagesRequest { _: 'messages.deleteQuickReplyMessages'; /** * Shortcut * ID. */ shortcutId: number; /** * IDs of shortcut messages to delete. */ id: number[]; } /** * Enable or disable * folder * tags ». * * RPC method returns boolean */ interface RawToggleDialogFilterTagsRequest { _: 'messages.toggleDialogFilterTags'; /** * Enable or disable folder tags. */ enabled: boolean; } /** * Fetch all * stickersets * » owned by the current user. * * RPC method returns {@link tl.messages.TypeMyStickers} */ interface RawGetMyStickersRequest { _: 'messages.getMyStickers'; /** * Offsets * for pagination, for more info click here */ offsetId: Long; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Represents a list of * emoji * categories, to be used when choosing a sticker. * * RPC method returns {@link tl.messages.TypeEmojiGroups} */ interface RawGetEmojiStickerGroupsRequest { _: 'messages.getEmojiStickerGroups'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Fetch the full list of usable * animated * message effects ». * * RPC method returns {@link tl.messages.TypeAvailableEffects} */ interface RawGetAvailableEffectsRequest { _: 'messages.getAvailableEffects'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Edit/create a * fact-check * on a message. * * Can only be used by independent fact-checkers as specified * by the * appConfig.can_edit_factcheck * configuration flag. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditFactCheckRequest { _: 'messages.editFactCheck'; /** * Peer where the message was sent */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; /** * Fact-check (maximum UTF-8 length specified in * appConfig.factcheck_length_limit). */ text: tl.TypeTextWithEntities; } /** * Delete a * fact-check * from a message. * * Can only be used by independent fact-checkers as specified * by the * appConfig.can_edit_factcheck * configuration flag. * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteFactCheckRequest { _: 'messages.deleteFactCheck'; /** * Peer where the message was sent. */ peer: tl.TypeInputPeer; /** * Message ID */ msgId: number; } /** * Fetch one or more * factchecks, * see here » for the full flow. * * RPC method returns {@link tl.TypeFactCheck} array */ interface RawGetFactCheckRequest { _: 'messages.getFactCheck'; /** * Peer where the messages were sent. */ peer: tl.TypeInputPeer; /** * Messages that have associated {@link RawFactCheck} * constructors with the need_check flag set. */ msgId: number[]; } /** * Open a * Main * Mini App. * * RPC method returns {@link tl.TypeWebViewResult} */ interface RawRequestMainWebViewRequest { _: 'messages.requestMainWebView'; /** * If set, requests to open the mini app in compact mode (as * opposed to normal or fullscreen mode). Must be set if the * mode parameter of the * Main * Mini App link is equal to compact. */ compact?: boolean; /** * If set, requests to open the mini app in fullscreen mode (as * opposed to compact or normal mode). Must be set if the * mode parameter of the * Main * Mini App link is equal to fullscreen. */ fullscreen?: boolean; /** * Currently open chat, may be {@link RawInputPeerEmpty} if no * chat is currently open. */ peer: tl.TypeInputPeer; /** * Bot that owns the main mini app. */ bot: tl.TypeInputUser; /** * Start parameter, if opening from a * Main * Mini App link ». */ startParam?: string; /** * Theme * parameters » */ themeParams?: tl.TypeDataJSON; /** * Short name of the application; 0-64 English letters, digits, * and underscores */ platform: string; } /** * Sends one or more * paid * Telegram Star reactions », transferring * Telegram * Stars » to a channel's balance. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendPaidReactionRequest { _: 'messages.sendPaidReaction'; /** * The channel */ peer: tl.TypeInputPeer; /** * The message to react to */ msgId: number; /** * The number of * stars * to send (each will increment the reaction counter by one). */ count: number; /** * Unique client message ID required to prevent message * resending. * * Note: this argument must * be composed of a 64-bit integer where the lower 32 bits are * random, and the higher 32 bits are equal to the * current unixtime, i.e. uint64_t random_id = * (time() << 32) | ((uint64_t)random_uint32_t()): this * differs from the random_id format of all other * methods in the API, which just take 64 random bits. */ randomId: Long; /** * Each post with star reactions has a leaderboard with the top * senders, but users can opt out of appearing there if they * prefer more privacy. Not populating this field will use the * default reaction privacy, stored on the server and synced to * clients using {@link RawUpdatePaidReactionPrivacy} (see * here * for more info). */ private?: tl.TypePaidReactionPrivacy; } /** * Changes the privacy of already sent * paid * reactions on a specific message. * * RPC method returns boolean */ interface RawTogglePaidReactionPrivacyRequest { _: 'messages.togglePaidReactionPrivacy'; /** * The channel */ peer: tl.TypeInputPeer; /** * The ID of the message to which we sent the paid reactions */ msgId: number; /** * If true, makes the current anonymous in the top sender * leaderboard for this message; otherwise, does the opposite. */ private: tl.TypePaidReactionPrivacy; } /** * Fetches an {@link RawUpdatePaidReactionPrivacy} update with * the current * default * paid reaction privacy, see here » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetPaidReactionPrivacyRequest { _: 'messages.getPaidReactionPrivacy'; } /** * Mark a specific * sponsored * message » as read * * RPC method returns boolean */ interface RawViewSponsoredMessageRequest { _: 'messages.viewSponsoredMessage'; /** * The ad's unique ID. */ randomId: Uint8Array; } /** * Informs the server that the user has interacted with a * sponsored message in * one * of the ways listed here ». * * RPC method returns boolean */ interface RawClickSponsoredMessageRequest { _: 'messages.clickSponsoredMessage'; /** * The user clicked on the media */ media?: boolean; /** * The user expanded the video to full screen, and then clicked * on it. */ fullscreen?: boolean; /** * The ad's unique ID. */ randomId: Uint8Array; } /** * Report a * sponsored * message », see * here * » for more info on the full flow. * * RPC method returns * {@link tl.channels.TypeSponsoredMessageReportResult} */ interface RawReportSponsoredMessageRequest { _: 'messages.reportSponsoredMessage'; /** * The ad's unique ID. */ randomId: Uint8Array; /** * Chosen report option, initially an empty string, see * here * » for more info on the full flow. */ option: Uint8Array; } /** * Get a list of * sponsored * messages for a peer, see here » for more info. * * RPC method returns {@link tl.messages.TypeSponsoredMessages} */ interface RawGetSponsoredMessagesRequest { _: 'messages.getSponsoredMessages'; /** * The currently open channel/bot. */ peer: tl.TypeInputPeer; /** * Must be set when fetching * sponsored * messages to show on channel videos ». */ msgId?: number; } /** * Save a * prepared * inline message, to be shared by the user of the mini app * using a * web_app_send_prepared_message * event * * RPC method returns * {@link tl.messages.TypeBotPreparedInlineMessage} */ interface RawSavePreparedInlineMessageRequest { _: 'messages.savePreparedInlineMessage'; /** * The message */ result: tl.TypeInputBotInlineResult; /** * The user to whom the * web_app_send_prepared_message * event event will be sent */ userId: tl.TypeInputUser; /** * Types of chats where this message can be sent */ peerTypes?: tl.TypeInlineQueryPeerType[]; } /** * Obtain a * prepared * inline message generated by a * mini * app: invoked when handling * web_app_send_prepared_message * events * * RPC method returns * {@link tl.messages.TypePreparedInlineMessage} */ interface RawGetPreparedInlineMessageRequest { _: 'messages.getPreparedInlineMessage'; /** * The bot that owns the mini app that emitted the * web_app_send_prepared_message * event */ bot: tl.TypeInputUser; /** * The id from the * web_app_send_prepared_message * event */ id: string; } /** * Search for stickers using AI-powered keyword search * * RPC method returns {@link tl.messages.TypeFoundStickers} */ interface RawSearchStickersRequest { _: 'messages.searchStickers'; /** * If set, returns * custom * emoji stickers */ emojis?: boolean; /** * The search term */ q: string; /** * Space-separated list of emojis to search for */ emoticon: string; /** * List of possible IETF language tags of the user's input * language; may be empty if unknown */ langCode: string[]; /** * Offset * for pagination */ offset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * used for caching, for more info click here. * * The hash may be generated locally by using the * ids of the returned or stored sticker * {@link RawDocument}s. */ hash: Long; } /** * Used for * Telegram * Gateway verification messages »: indicate to the server * that one or more {@link RawMessage}s were received by the * client, if requested by the * {@link RawMessage}.report_delivery_until_date * flag or the equivalent flag in * push * notifications. * * RPC method returns boolean */ interface RawReportMessagesDeliveryRequest { _: 'messages.reportMessagesDelivery'; /** * Must be set if the messages were received from a * push * notification. */ push?: boolean; /** * The peer where the messages were received. */ peer: tl.TypeInputPeer; /** * The IDs of the received messages. */ id: number[]; } /** * Obtain information about specific * saved * message dialogs » or * monoforum * topics ». * * RPC method returns {@link tl.messages.TypeSavedDialogs} */ interface RawGetSavedDialogsByIDRequest { _: 'messages.getSavedDialogsByID'; /** * If set, fetches * monoforum * topics », otherwise fetches * saved * message dialogs ». */ parentPeer?: tl.TypeInputPeer; /** * IDs of dialogs (topics) to fetch. */ ids: tl.TypeInputPeer[]; } /** * Mark messages as read in a * monoforum * topic ». * * RPC method returns boolean */ interface RawReadSavedHistoryRequest { _: 'messages.readSavedHistory'; /** * ID of the monoforum group. */ parentPeer: tl.TypeInputPeer; /** * ID of the topic. */ peer: tl.TypeInputPeer; /** * If a positive value is passed, only messages with * identifiers less or equal than the given one will be read. */ maxId: number; } /** * Mark one or more items of a * todo list * » as completed or not completed. * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleTodoCompletedRequest { _: 'messages.toggleTodoCompleted'; /** * Peer where the todo list was posted. */ peer: tl.TypeInputPeer; /** * ID of the message with the todo list. */ msgId: number; /** * Items to mark as completed. */ completed: number[]; /** * Items to mark as not completed. */ incompleted: number[]; } /** * Appends one or more items to a * todo list * ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawAppendTodoListRequest { _: 'messages.appendTodoList'; /** * Peer where the todo list was posted. */ peer: tl.TypeInputPeer; /** * ID of the message with the todo list. */ msgId: number; /** * Items to append. */ list: tl.TypeTodoItem[]; } /** * Approve or reject a * suggested * post ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleSuggestedPostApprovalRequest { _: 'messages.toggleSuggestedPostApproval'; /** * Reject the suggested post. */ reject?: boolean; /** * Both for users and channels, must contain the ID of the * direct * messages monoforum » (for channels, the topic ID is * extracted automatically from the msg_id). */ peer: tl.TypeInputPeer; /** * ID of the suggestion message. */ msgId: number; /** * Custom scheduling date. */ scheduleDate?: number; /** * Optional comment for rejections (can only be used if * reject is set). */ rejectComment?: string; } /** * RPC method returns {@link tl.messages.TypeForumTopics} */ interface RawGetForumTopicsRequest { _: 'messages.getForumTopics'; peer: tl.TypeInputPeer; q?: string; /** * Offsets * for pagination, for more info click here */ offsetDate: number; /** * Offsets * for pagination, for more info click here */ offsetId: number; offsetTopic: number; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * RPC method returns {@link tl.messages.TypeForumTopics} */ interface RawGetForumTopicsByIDRequest { _: 'messages.getForumTopicsByID'; peer: tl.TypeInputPeer; topics: number[]; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawEditForumTopicRequest { _: 'messages.editForumTopic'; peer: tl.TypeInputPeer; topicId: number; title?: string; iconEmojiId?: Long; closed?: boolean; hidden?: boolean; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdatePinnedForumTopicRequest { _: 'messages.updatePinnedForumTopic'; peer: tl.TypeInputPeer; topicId: number; pinned: boolean; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawReorderPinnedForumTopicsRequest { _: 'messages.reorderPinnedForumTopics'; force?: boolean; peer: tl.TypeInputPeer; order: number[]; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawCreateForumTopicRequest { _: 'messages.createForumTopic'; titleMissing?: boolean; peer: tl.TypeInputPeer; title: string; iconColor?: number; iconEmojiId?: Long; randomId: Long; sendAs?: tl.TypeInputPeer; } /** * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawDeleteTopicHistoryRequest { _: 'messages.deleteTopicHistory'; peer: tl.TypeInputPeer; topMsgId: number; } /** * RPC method returns {@link tl.messages.TypeEmojiGameInfo} */ interface RawGetEmojiGameInfoRequest { _: 'messages.getEmojiGameInfo'; } /** * RPC method returns {@link tl.TypeTextWithEntities} */ interface RawSummarizeTextRequest { _: 'messages.summarizeText'; peer: tl.TypeInputPeer; id: number; toLang?: string; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawEditChatCreatorRequest { _: 'messages.editChatCreator'; peer: tl.TypeInputPeer; userId: tl.TypeInputUser; password: tl.TypeInputCheckPasswordSRP; } /** * RPC method returns {@link tl.TypeUser} */ interface RawGetFutureChatCreatorAfterLeaveRequest { _: 'messages.getFutureChatCreatorAfterLeave'; peer: tl.TypeInputPeer; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawEditChatParticipantRankRequest { _: 'messages.editChatParticipantRank'; peer: tl.TypeInputPeer; participant: tl.TypeInputPeer; rank: string; } /** * RPC method returns boolean */ interface RawDeclineUrlAuthRequest { _: 'messages.declineUrlAuth'; url: string; } /** * RPC method returns boolean */ interface RawCheckUrlAuthMatchCodeRequest { _: 'messages.checkUrlAuthMatchCode'; url: string; matchCode: string; } interface RpcCallReturn { 'messages.getMessages': tl.messages.TypeMessages 'messages.getDialogs': tl.messages.TypeDialogs 'messages.getHistory': tl.messages.TypeMessages 'messages.search': tl.messages.TypeMessages 'messages.readHistory': tl.messages.TypeAffectedMessages 'messages.deleteHistory': tl.messages.TypeAffectedHistory 'messages.deleteMessages': tl.messages.TypeAffectedMessages 'messages.receivedMessages': tl.TypeReceivedNotifyMessage[] 'messages.setTyping': boolean 'messages.sendMessage': tl.TypeUpdates 'messages.sendMedia': tl.TypeUpdates 'messages.forwardMessages': tl.TypeUpdates 'messages.reportSpam': boolean 'messages.getPeerSettings': tl.messages.TypePeerSettings 'messages.report': tl.TypeReportResult 'messages.getChats': tl.messages.TypeChats 'messages.getFullChat': tl.messages.TypeChatFull 'messages.editChatTitle': tl.TypeUpdates 'messages.editChatPhoto': tl.TypeUpdates 'messages.addChatUser': tl.messages.TypeInvitedUsers 'messages.deleteChatUser': tl.TypeUpdates 'messages.createChat': tl.messages.TypeInvitedUsers 'messages.getDhConfig': tl.messages.TypeDhConfig 'messages.requestEncryption': tl.TypeEncryptedChat 'messages.acceptEncryption': tl.TypeEncryptedChat 'messages.discardEncryption': boolean 'messages.setEncryptedTyping': boolean 'messages.readEncryptedHistory': boolean 'messages.sendEncrypted': tl.messages.TypeSentEncryptedMessage 'messages.sendEncryptedFile': tl.messages.TypeSentEncryptedMessage 'messages.sendEncryptedService': tl.messages.TypeSentEncryptedMessage 'messages.receivedQueue': Long[] 'messages.reportEncryptedSpam': boolean 'messages.readMessageContents': tl.messages.TypeAffectedMessages 'messages.getStickers': tl.messages.TypeStickers 'messages.getAllStickers': tl.messages.TypeAllStickers 'messages.getWebPagePreview': tl.messages.TypeWebPagePreview 'messages.exportChatInvite': tl.TypeExportedChatInvite 'messages.checkChatInvite': tl.TypeChatInvite 'messages.importChatInvite': tl.TypeUpdates 'messages.getStickerSet': tl.messages.TypeStickerSet 'messages.installStickerSet': tl.messages.TypeStickerSetInstallResult 'messages.uninstallStickerSet': boolean 'messages.startBot': tl.TypeUpdates 'messages.getMessagesViews': tl.messages.TypeMessageViews 'messages.editChatAdmin': boolean 'messages.migrateChat': tl.TypeUpdates 'messages.searchGlobal': tl.messages.TypeMessages 'messages.reorderStickerSets': boolean 'messages.getDocumentByHash': tl.TypeDocument 'messages.getSavedGifs': tl.messages.TypeSavedGifs 'messages.saveGif': boolean 'messages.getInlineBotResults': tl.messages.TypeBotResults 'messages.setInlineBotResults': boolean 'messages.sendInlineBotResult': tl.TypeUpdates 'messages.getMessageEditData': tl.messages.TypeMessageEditData 'messages.editMessage': tl.TypeUpdates 'messages.editInlineBotMessage': boolean 'messages.getBotCallbackAnswer': tl.messages.TypeBotCallbackAnswer 'messages.setBotCallbackAnswer': boolean 'messages.getPeerDialogs': tl.messages.TypePeerDialogs 'messages.saveDraft': boolean 'messages.getAllDrafts': tl.TypeUpdates 'messages.getFeaturedStickers': tl.messages.TypeFeaturedStickers 'messages.readFeaturedStickers': boolean 'messages.getRecentStickers': tl.messages.TypeRecentStickers 'messages.saveRecentSticker': boolean 'messages.clearRecentStickers': boolean 'messages.getArchivedStickers': tl.messages.TypeArchivedStickers 'messages.getMaskStickers': tl.messages.TypeAllStickers 'messages.getAttachedStickers': tl.TypeStickerSetCovered[] 'messages.setGameScore': tl.TypeUpdates 'messages.setInlineGameScore': boolean 'messages.getGameHighScores': tl.messages.TypeHighScores 'messages.getInlineGameHighScores': tl.messages.TypeHighScores 'messages.getCommonChats': tl.messages.TypeChats 'messages.getWebPage': tl.messages.TypeWebPage 'messages.toggleDialogPin': boolean 'messages.reorderPinnedDialogs': boolean 'messages.getPinnedDialogs': tl.messages.TypePeerDialogs 'messages.setBotShippingResults': boolean 'messages.setBotPrecheckoutResults': boolean 'messages.uploadMedia': tl.TypeMessageMedia 'messages.sendScreenshotNotification': tl.TypeUpdates 'messages.getFavedStickers': tl.messages.TypeFavedStickers 'messages.faveSticker': boolean 'messages.getUnreadMentions': tl.messages.TypeMessages 'messages.readMentions': tl.messages.TypeAffectedHistory 'messages.getRecentLocations': tl.messages.TypeMessages 'messages.sendMultiMedia': tl.TypeUpdates 'messages.uploadEncryptedFile': tl.TypeEncryptedFile 'messages.searchStickerSets': tl.messages.TypeFoundStickerSets 'messages.getSplitRanges': tl.TypeMessageRange[] 'messages.markDialogUnread': boolean 'messages.getDialogUnreadMarks': tl.TypeDialogPeer[] 'messages.clearAllDrafts': boolean 'messages.updatePinnedMessage': tl.TypeUpdates 'messages.sendVote': tl.TypeUpdates 'messages.getPollResults': tl.TypeUpdates 'messages.getOnlines': tl.TypeChatOnlines 'messages.editChatAbout': boolean 'messages.editChatDefaultBannedRights': tl.TypeUpdates 'messages.getEmojiKeywords': tl.TypeEmojiKeywordsDifference 'messages.getEmojiKeywordsDifference': tl.TypeEmojiKeywordsDifference 'messages.getEmojiKeywordsLanguages': tl.TypeEmojiLanguage[] 'messages.getEmojiURL': tl.TypeEmojiURL 'messages.getSearchCounters': tl.messages.TypeSearchCounter[] 'messages.requestUrlAuth': tl.TypeUrlAuthResult 'messages.acceptUrlAuth': tl.TypeUrlAuthResult 'messages.hidePeerSettingsBar': boolean 'messages.getScheduledHistory': tl.messages.TypeMessages 'messages.getScheduledMessages': tl.messages.TypeMessages 'messages.sendScheduledMessages': tl.TypeUpdates 'messages.deleteScheduledMessages': tl.TypeUpdates 'messages.getPollVotes': tl.messages.TypeVotesList 'messages.toggleStickerSets': boolean 'messages.getDialogFilters': tl.messages.TypeDialogFilters 'messages.getSuggestedDialogFilters': tl.TypeDialogFilterSuggested[] 'messages.updateDialogFilter': boolean 'messages.updateDialogFiltersOrder': boolean 'messages.getOldFeaturedStickers': tl.messages.TypeFeaturedStickers 'messages.getReplies': tl.messages.TypeMessages 'messages.getDiscussionMessage': tl.messages.TypeDiscussionMessage 'messages.readDiscussion': boolean 'messages.unpinAllMessages': tl.messages.TypeAffectedHistory 'messages.deleteChat': boolean 'messages.deletePhoneCallHistory': tl.messages.TypeAffectedFoundMessages 'messages.checkHistoryImport': tl.messages.TypeHistoryImportParsed 'messages.initHistoryImport': tl.messages.TypeHistoryImport 'messages.uploadImportedMedia': tl.TypeMessageMedia 'messages.startHistoryImport': boolean 'messages.getExportedChatInvites': tl.messages.TypeExportedChatInvites 'messages.getExportedChatInvite': tl.messages.TypeExportedChatInvite 'messages.editExportedChatInvite': tl.messages.TypeExportedChatInvite 'messages.deleteRevokedExportedChatInvites': boolean 'messages.deleteExportedChatInvite': boolean 'messages.getAdminsWithInvites': tl.messages.TypeChatAdminsWithInvites 'messages.getChatInviteImporters': tl.messages.TypeChatInviteImporters 'messages.setHistoryTTL': tl.TypeUpdates 'messages.checkHistoryImportPeer': tl.messages.TypeCheckedHistoryImportPeer 'messages.setChatTheme': tl.TypeUpdates 'messages.getMessageReadParticipants': tl.TypeReadParticipantDate[] 'messages.getSearchResultsCalendar': tl.messages.TypeSearchResultsCalendar 'messages.getSearchResultsPositions': tl.messages.TypeSearchResultsPositions 'messages.hideChatJoinRequest': tl.TypeUpdates 'messages.hideAllChatJoinRequests': tl.TypeUpdates 'messages.toggleNoForwards': tl.TypeUpdates 'messages.saveDefaultSendAs': boolean 'messages.sendReaction': tl.TypeUpdates 'messages.getMessagesReactions': tl.TypeUpdates 'messages.getMessageReactionsList': tl.messages.TypeMessageReactionsList 'messages.setChatAvailableReactions': tl.TypeUpdates 'messages.getAvailableReactions': tl.messages.TypeAvailableReactions 'messages.setDefaultReaction': boolean 'messages.translateText': tl.messages.TypeTranslatedText 'messages.getUnreadReactions': tl.messages.TypeMessages 'messages.readReactions': tl.messages.TypeAffectedHistory 'messages.searchSentMedia': tl.messages.TypeMessages 'messages.getAttachMenuBots': tl.TypeAttachMenuBots 'messages.getAttachMenuBot': tl.TypeAttachMenuBotsBot 'messages.toggleBotInAttachMenu': boolean 'messages.requestWebView': tl.TypeWebViewResult 'messages.prolongWebView': boolean 'messages.requestSimpleWebView': tl.TypeWebViewResult 'messages.sendWebViewResultMessage': tl.TypeWebViewMessageSent 'messages.sendWebViewData': tl.TypeUpdates 'messages.transcribeAudio': tl.messages.TypeTranscribedAudio 'messages.rateTranscribedAudio': boolean 'messages.getCustomEmojiDocuments': tl.TypeDocument[] 'messages.getEmojiStickers': tl.messages.TypeAllStickers 'messages.getFeaturedEmojiStickers': tl.messages.TypeFeaturedStickers 'messages.reportReaction': boolean 'messages.getTopReactions': tl.messages.TypeReactions 'messages.getRecentReactions': tl.messages.TypeReactions 'messages.clearRecentReactions': boolean 'messages.getExtendedMedia': tl.TypeUpdates 'messages.setDefaultHistoryTTL': boolean 'messages.getDefaultHistoryTTL': tl.TypeDefaultHistoryTTL 'messages.sendBotRequestedPeer': tl.TypeUpdates 'messages.getEmojiGroups': tl.messages.TypeEmojiGroups 'messages.getEmojiStatusGroups': tl.messages.TypeEmojiGroups 'messages.getEmojiProfilePhotoGroups': tl.messages.TypeEmojiGroups 'messages.searchCustomEmoji': tl.TypeEmojiList 'messages.togglePeerTranslations': boolean 'messages.getBotApp': tl.messages.TypeBotApp 'messages.requestAppWebView': tl.TypeWebViewResult 'messages.setChatWallPaper': tl.TypeUpdates 'messages.searchEmojiStickerSets': tl.messages.TypeFoundStickerSets 'messages.getSavedDialogs': tl.messages.TypeSavedDialogs 'messages.getSavedHistory': tl.messages.TypeMessages 'messages.deleteSavedHistory': tl.messages.TypeAffectedHistory 'messages.getPinnedSavedDialogs': tl.messages.TypeSavedDialogs 'messages.toggleSavedDialogPin': boolean 'messages.reorderPinnedSavedDialogs': boolean 'messages.getSavedReactionTags': tl.messages.TypeSavedReactionTags 'messages.updateSavedReactionTag': boolean 'messages.getDefaultTagReactions': tl.messages.TypeReactions 'messages.getOutboxReadDate': tl.TypeOutboxReadDate 'messages.getQuickReplies': tl.messages.TypeQuickReplies 'messages.reorderQuickReplies': boolean 'messages.checkQuickReplyShortcut': boolean 'messages.editQuickReplyShortcut': boolean 'messages.deleteQuickReplyShortcut': boolean 'messages.getQuickReplyMessages': tl.messages.TypeMessages 'messages.sendQuickReplyMessages': tl.TypeUpdates 'messages.deleteQuickReplyMessages': tl.TypeUpdates 'messages.toggleDialogFilterTags': boolean 'messages.getMyStickers': tl.messages.TypeMyStickers 'messages.getEmojiStickerGroups': tl.messages.TypeEmojiGroups 'messages.getAvailableEffects': tl.messages.TypeAvailableEffects 'messages.editFactCheck': tl.TypeUpdates 'messages.deleteFactCheck': tl.TypeUpdates 'messages.getFactCheck': tl.TypeFactCheck[] 'messages.requestMainWebView': tl.TypeWebViewResult 'messages.sendPaidReaction': tl.TypeUpdates 'messages.togglePaidReactionPrivacy': boolean 'messages.getPaidReactionPrivacy': tl.TypeUpdates 'messages.viewSponsoredMessage': boolean 'messages.clickSponsoredMessage': boolean 'messages.reportSponsoredMessage': tl.channels.TypeSponsoredMessageReportResult 'messages.getSponsoredMessages': tl.messages.TypeSponsoredMessages 'messages.savePreparedInlineMessage': tl.messages.TypeBotPreparedInlineMessage 'messages.getPreparedInlineMessage': tl.messages.TypePreparedInlineMessage 'messages.searchStickers': tl.messages.TypeFoundStickers 'messages.reportMessagesDelivery': boolean 'messages.getSavedDialogsByID': tl.messages.TypeSavedDialogs 'messages.readSavedHistory': boolean 'messages.toggleTodoCompleted': tl.TypeUpdates 'messages.appendTodoList': tl.TypeUpdates 'messages.toggleSuggestedPostApproval': tl.TypeUpdates 'messages.getForumTopics': tl.messages.TypeForumTopics 'messages.getForumTopicsByID': tl.messages.TypeForumTopics 'messages.editForumTopic': tl.TypeUpdates 'messages.updatePinnedForumTopic': tl.TypeUpdates 'messages.reorderPinnedForumTopics': tl.TypeUpdates 'messages.createForumTopic': tl.TypeUpdates 'messages.deleteTopicHistory': tl.messages.TypeAffectedHistory 'messages.getEmojiGameInfo': tl.messages.TypeEmojiGameInfo 'messages.summarizeText': tl.TypeTextWithEntities 'messages.editChatCreator': tl.TypeUpdates 'messages.getFutureChatCreatorAfterLeave': tl.TypeUser 'messages.editChatParticipantRank': tl.TypeUpdates 'messages.declineUrlAuth': boolean 'messages.checkUrlAuthMatchCode': boolean } /** * Object contains a list of chats with messages and auxiliary * data. */ type TypeDialogs = tl.messages.RawDialogs | tl.messages.RawDialogsSlice | tl.messages.RawDialogsNotModified function isAnyDialogs(o: object): o is TypeDialogs /** * Object contains information on list of messages with * auxiliary data. */ type TypeMessages = tl.messages.RawMessages | tl.messages.RawMessagesSlice | tl.messages.RawChannelMessages | tl.messages.RawMessagesNotModified function isAnyMessages(o: object): o is TypeMessages /** * Object contains list of chats with auxiliary data. */ type TypeChats = tl.messages.RawChats | tl.messages.RawChatsSlice function isAnyChats(o: object): o is TypeChats /** * Full info about a * channel, * supergroup, * gigagroup * or * basic * group. */ type TypeChatFull = tl.messages.RawChatFull function isAnyChatFull(o: object): o is TypeChatFull /** * Object contains info on affected part of communication * history with the user or in a chat. */ type TypeAffectedHistory = tl.messages.RawAffectedHistory function isAnyAffectedHistory(o: object): o is TypeAffectedHistory /** * Contains Diffie-Hellman key generation protocol parameters. */ type TypeDhConfig = tl.messages.RawDhConfigNotModified | tl.messages.RawDhConfig function isAnyDhConfig(o: object): o is TypeDhConfig /** * Contains info on message sent to an encrypted chat. */ type TypeSentEncryptedMessage = tl.messages.RawSentEncryptedMessage | tl.messages.RawSentEncryptedFile function isAnySentEncryptedMessage(o: object): o is TypeSentEncryptedMessage /** * Stickers */ type TypeStickers = tl.messages.RawStickersNotModified | tl.messages.RawStickers function isAnyStickers(o: object): o is TypeStickers /** * All stickers */ type TypeAllStickers = tl.messages.RawAllStickersNotModified | tl.messages.RawAllStickers function isAnyAllStickers(o: object): o is TypeAllStickers /** * Messages affected by changes */ type TypeAffectedMessages = tl.messages.RawAffectedMessages function isAnyAffectedMessages(o: object): o is TypeAffectedMessages /** * Stickerset */ type TypeStickerSet = tl.messages.RawStickerSet | tl.messages.RawStickerSetNotModified function isAnyStickerSet(o: object): o is TypeStickerSet /** * Saved GIFs */ type TypeSavedGifs = tl.messages.RawSavedGifsNotModified | tl.messages.RawSavedGifs function isAnySavedGifs(o: object): o is TypeSavedGifs /** * Result of a query to an inline bot */ type TypeBotResults = tl.messages.RawBotResults function isAnyBotResults(o: object): o is TypeBotResults /** * Callback answer of bot */ type TypeBotCallbackAnswer = tl.messages.RawBotCallbackAnswer function isAnyBotCallbackAnswer(o: object): o is TypeBotCallbackAnswer /** * Message edit data for media */ type TypeMessageEditData = tl.messages.RawMessageEditData function isAnyMessageEditData(o: object): o is TypeMessageEditData /** * List of dialogs */ type TypePeerDialogs = tl.messages.RawPeerDialogs function isAnyPeerDialogs(o: object): o is TypePeerDialogs /** * Featured stickers */ type TypeFeaturedStickers = tl.messages.RawFeaturedStickersNotModified | tl.messages.RawFeaturedStickers function isAnyFeaturedStickers(o: object): o is TypeFeaturedStickers /** * Recent stickers */ type TypeRecentStickers = tl.messages.RawRecentStickersNotModified | tl.messages.RawRecentStickers function isAnyRecentStickers(o: object): o is TypeRecentStickers /** * Archived stickers */ type TypeArchivedStickers = tl.messages.RawArchivedStickers function isAnyArchivedStickers(o: object): o is TypeArchivedStickers /** * Result of stickerset installation process */ type TypeStickerSetInstallResult = tl.messages.RawStickerSetInstallResultSuccess | tl.messages.RawStickerSetInstallResultArchive function isAnyStickerSetInstallResult(o: object): o is TypeStickerSetInstallResult /** * High scores (in games) */ type TypeHighScores = tl.messages.RawHighScores function isAnyHighScores(o: object): o is TypeHighScores /** * Favorited stickers */ type TypeFavedStickers = tl.messages.RawFavedStickersNotModified | tl.messages.RawFavedStickers function isAnyFavedStickers(o: object): o is TypeFavedStickers /** * Found stickersets */ type TypeFoundStickerSets = tl.messages.RawFoundStickerSetsNotModified | tl.messages.RawFoundStickerSets function isAnyFoundStickerSets(o: object): o is TypeFoundStickerSets /** * Number of results that would be returned by a search */ type TypeSearchCounter = tl.messages.RawSearchCounter function isAnySearchCounter(o: object): o is TypeSearchCounter /** * Inactive chat list */ type TypeInactiveChats = tl.messages.RawInactiveChats function isAnyInactiveChats(o: object): o is TypeInactiveChats /** * How users voted in a poll */ type TypeVotesList = tl.messages.RawVotesList function isAnyVotesList(o: object): o is TypeVotesList /** * View, forward counter + info about replies */ type TypeMessageViews = tl.messages.RawMessageViews function isAnyMessageViews(o: object): o is TypeMessageViews /** * Info about a message thread */ type TypeDiscussionMessage = tl.messages.RawDiscussionMessage function isAnyDiscussionMessage(o: object): o is TypeDiscussionMessage /** * Identifier of a * history * import session, click here for more info ». */ type TypeHistoryImport = tl.messages.RawHistoryImport function isAnyHistoryImport(o: object): o is TypeHistoryImport /** * Contains information about a chat export file, generated by * a foreign chat app. */ type TypeHistoryImportParsed = tl.messages.RawHistoryImportParsed function isAnyHistoryImportParsed(o: object): o is TypeHistoryImportParsed /** * Messages found and affected by changes */ type TypeAffectedFoundMessages = tl.messages.RawAffectedFoundMessages function isAnyAffectedFoundMessages(o: object): o is TypeAffectedFoundMessages /** * Info about chat invites exported by a certain admin. */ type TypeExportedChatInvites = tl.messages.RawExportedChatInvites function isAnyExportedChatInvites(o: object): o is TypeExportedChatInvites /** * Contains info about a chat invite, and eventually a pointer * to the newest chat invite. */ type TypeExportedChatInvite = tl.messages.RawExportedChatInvite | tl.messages.RawExportedChatInviteReplaced function isAnyExportedChatInvite(o: object): o is TypeExportedChatInvite /** * List of users that imported a chat invitation link. */ type TypeChatInviteImporters = tl.messages.RawChatInviteImporters function isAnyChatInviteImporters(o: object): o is TypeChatInviteImporters /** * Info about chat invites generated by admins. */ type TypeChatAdminsWithInvites = tl.messages.RawChatAdminsWithInvites function isAnyChatAdminsWithInvites(o: object): o is TypeChatAdminsWithInvites /** * Contains a confirmation text to be shown to the user, upon * importing * chat history, click here for more info ». */ type TypeCheckedHistoryImportPeer = tl.messages.RawCheckedHistoryImportPeer function isAnyCheckedHistoryImportPeer(o: object): o is TypeCheckedHistoryImportPeer /** * A set of * sponsored * messages associated with a channel */ type TypeSponsoredMessages = tl.messages.RawSponsoredMessages | tl.messages.RawSponsoredMessagesEmpty function isAnySponsoredMessages(o: object): o is TypeSponsoredMessages /** * Information about found messages sent on a specific day */ type TypeSearchResultsCalendar = tl.messages.RawSearchResultsCalendar function isAnySearchResultsCalendar(o: object): o is TypeSearchResultsCalendar /** * Information about sparse positions of messages */ type TypeSearchResultsPositions = tl.messages.RawSearchResultsPositions function isAnySearchResultsPositions(o: object): o is TypeSearchResultsPositions /** * Peer settings */ type TypePeerSettings = tl.messages.RawPeerSettings function isAnyPeerSettings(o: object): o is TypePeerSettings /** * List of peers that reacted to a specific message */ type TypeMessageReactionsList = tl.messages.RawMessageReactionsList function isAnyMessageReactionsList(o: object): o is TypeMessageReactionsList /** * Animations and metadata associated with * message * reactions » */ type TypeAvailableReactions = tl.messages.RawAvailableReactionsNotModified | tl.messages.RawAvailableReactions function isAnyAvailableReactions(o: object): o is TypeAvailableReactions /** * Transcribed * text from a voice message */ type TypeTranscribedAudio = tl.messages.RawTranscribedAudio function isAnyTranscribedAudio(o: object): o is TypeTranscribedAudio /** * A set of * message * reactions */ type TypeReactions = tl.messages.RawReactionsNotModified | tl.messages.RawReactions function isAnyReactions(o: object): o is TypeReactions /** * Contains information about multiple * forum * topics */ type TypeForumTopics = tl.messages.RawForumTopics function isAnyForumTopics(o: object): o is TypeForumTopics /** * Represents a list of * emoji * categories. */ type TypeEmojiGroups = tl.messages.RawEmojiGroupsNotModified | tl.messages.RawEmojiGroups function isAnyEmojiGroups(o: object): o is TypeEmojiGroups /** * Translated text with * entities. */ type TypeTranslatedText = tl.messages.RawTranslateResult function isAnyTranslatedText(o: object): o is TypeTranslatedText /** * Contains information about a * direct * link Mini App */ type TypeBotApp = tl.messages.RawBotApp function isAnyBotApp(o: object): o is TypeBotApp /** * Contains an instant view webpage. */ type TypeWebPage = tl.messages.RawWebPage function isAnyWebPage(o: object): o is TypeWebPage /** * Represents some * saved * message dialogs ». */ type TypeSavedDialogs = tl.messages.RawSavedDialogs | tl.messages.RawSavedDialogsSlice | tl.messages.RawSavedDialogsNotModified function isAnySavedDialogs(o: object): o is TypeSavedDialogs /** * List of * reaction * tag » names assigned by the user. */ type TypeSavedReactionTags = tl.messages.RawSavedReactionTagsNotModified | tl.messages.RawSavedReactionTags function isAnySavedReactionTags(o: object): o is TypeSavedReactionTags /** * Info about * quick * reply shortcuts ». */ type TypeQuickReplies = tl.messages.RawQuickReplies | tl.messages.RawQuickRepliesNotModified function isAnyQuickReplies(o: object): o is TypeQuickReplies /** * Folder * information */ type TypeDialogFilters = tl.messages.RawDialogFilters function isAnyDialogFilters(o: object): o is TypeDialogFilters /** * The list of * stickersets * owned by the current account ». */ type TypeMyStickers = tl.messages.RawMyStickers function isAnyMyStickers(o: object): o is TypeMyStickers /** * Contains info about successfully or unsuccessfully * invited * » users. */ type TypeInvitedUsers = tl.messages.RawInvitedUsers function isAnyInvitedUsers(o: object): o is TypeInvitedUsers /** * Full list of usable * animated * message effects ». */ type TypeAvailableEffects = tl.messages.RawAvailableEffectsNotModified | tl.messages.RawAvailableEffects function isAnyAvailableEffects(o: object): o is TypeAvailableEffects /** * Represents a * prepared * inline message saved by a bot, to be sent to the user via a * web app » */ type TypeBotPreparedInlineMessage = tl.messages.RawBotPreparedInlineMessage function isAnyBotPreparedInlineMessage(o: object): o is TypeBotPreparedInlineMessage /** * Represents a * prepared * inline message received via a bot's mini app, that can be * sent to some chats » */ type TypePreparedInlineMessage = tl.messages.RawPreparedInlineMessage function isAnyPreparedInlineMessage(o: object): o is TypePreparedInlineMessage /** * Found * stickers */ type TypeFoundStickers = tl.messages.RawFoundStickersNotModified | tl.messages.RawFoundStickers function isAnyFoundStickers(o: object): o is TypeFoundStickers /** * Represents a webpage preview. */ type TypeWebPagePreview = tl.messages.RawWebPagePreview function isAnyWebPagePreview(o: object): o is TypeWebPagePreview type TypeEmojiGameOutcome = tl.messages.RawEmojiGameOutcome function isAnyEmojiGameOutcome(o: object): o is TypeEmojiGameOutcome type TypeEmojiGameInfo = tl.messages.RawEmojiGameUnavailable | tl.messages.RawEmojiGameDiceInfo function isAnyEmojiGameInfo(o: object): o is TypeEmojiGameInfo } namespace updates { /** * Updates state. */ interface RawState { _: '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 */ qts: number; /** * Date of condition */ date: number; /** * Number of sent updates */ seq: number; /** * Number of unread messages */ unreadCount: number; } /** * No events. */ interface RawDifferenceEmpty { _: 'updates.differenceEmpty'; /** * Current date */ date: number; /** * Number of sent updates */ seq: number; } /** * Full list of occurred events. */ interface RawDifference { _: 'updates.difference'; /** * List of new messages */ newMessages: tl.TypeMessage[]; /** * List of new encrypted secret chat messages */ newEncryptedMessages: tl.TypeEncryptedMessage[]; /** * List of updates */ otherUpdates: tl.TypeUpdate[]; /** * List of chats mentioned in events */ chats: tl.TypeChat[]; /** * List of users mentioned in events */ users: tl.TypeUser[]; /** * Current state */ state: tl.updates.TypeState; } /** * Incomplete list of occurred events. */ interface RawDifferenceSlice { _: 'updates.differenceSlice'; /** * List of new messages */ newMessages: tl.TypeMessage[]; /** * New messages from the * encrypted * event sequence */ newEncryptedMessages: tl.TypeEncryptedMessage[]; /** * List of updates */ otherUpdates: tl.TypeUpdate[]; /** * List of chats mentioned in events */ chats: tl.TypeChat[]; /** * List of users mentioned in events */ users: tl.TypeUser[]; /** * Intermediary state */ intermediateState: tl.updates.TypeState; } /** * The difference is * too * long, and the specified state must be used to refetch * updates. */ interface RawDifferenceTooLong { _: 'updates.differenceTooLong'; /** * The new state to use. */ pts: number; } /** * There are no new updates */ interface RawChannelDifferenceEmpty { _: 'updates.channelDifferenceEmpty'; /** * Whether there are more updates that must be fetched (always * false) */ final?: boolean; /** * The latest * PTS */ pts: number; /** * Clients are supposed to refetch the channel difference after * timeout seconds have elapsed, if the user is * currently * viewing the chat, see here » for more info. */ timeout?: number; } /** * 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): * * It should be also noted that some messages like live * location messages shouldn't be deleted. */ interface RawChannelDifferenceTooLong { _: 'updates.channelDifferenceTooLong'; /** * Whether there are more updates that must be fetched (always * false) */ final?: boolean; /** * Clients are supposed to refetch the channel difference after * timeout seconds have elapsed */ timeout?: number; /** * Dialog containing the latest * PTS * that can be used to reset the channel state */ dialog: tl.TypeDialog; /** * The latest messages */ messages: tl.TypeMessage[]; /** * Chats from messages */ chats: tl.TypeChat[]; /** * Users from messages */ users: tl.TypeUser[]; } /** * The new updates */ interface RawChannelDifference { _: 'updates.channelDifference'; /** * Whether there are more updates to be fetched using * getDifference, starting from the provided pts */ final?: boolean; /** * The * PTS * from which to start getting updates the next time */ pts: number; /** * Clients are supposed to refetch the channel difference after * timeout seconds have elapsed, if the user is * currently * viewing the chat, see here » for more info. */ timeout?: number; /** * New messages */ newMessages: tl.TypeMessage[]; /** * Other updates */ otherUpdates: tl.TypeUpdate[]; /** * Chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; } /** * Returns a current state of updates. * * RPC method returns {@link tl.updates.TypeState} */ interface RawGetStateRequest { _: 'updates.getState'; } /** * Get new * updates. * * RPC method returns {@link tl.updates.TypeDifference} */ interface RawGetDifferenceRequest { _: 'updates.getDifference'; /** * PTS, see * updates. */ pts: number; /** * PTS limit */ ptsLimit?: number; /** * For fast updating: if provided and pts + * pts_total_limit < remote pts, * {@link updates.RawDifferenceTooLong} 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 */ ptsTotalLimit?: number; /** * date, see * updates. */ date: number; /** * QTS, see * updates. */ qts: number; /** * QTS limit */ qtsLimit?: number; } /** * Returns the difference between the current state of updates * of a certain channel and transmitted. * * RPC method returns {@link tl.updates.TypeChannelDifference} */ interface RawGetChannelDifferenceRequest { _: 'updates.getChannelDifference'; /** * Set to true to skip some possibly unneeded updates and * reduce server-side load */ force?: boolean; /** * The channel */ channel: tl.TypeInputChannel; /** * Messsage filter */ filter: tl.TypeChannelMessagesFilter; /** * Persistent timestamp (see * updates) */ pts: number; /** * How many updates to fetch, max 100000 * * Ordinary (non-bot) users are supposed to pass * 10-100 */ limit: number; } interface RpcCallReturn { 'updates.getState': tl.updates.TypeState 'updates.getDifference': tl.updates.TypeDifference 'updates.getChannelDifference': tl.updates.TypeChannelDifference } /** * Object contains info on state for further updates. */ type TypeState = tl.updates.RawState function isAnyState(o: object): o is TypeState /** * Occurred changes. */ type TypeDifference = tl.updates.RawDifferenceEmpty | tl.updates.RawDifference | tl.updates.RawDifferenceSlice | tl.updates.RawDifferenceTooLong function isAnyDifference(o: object): o is TypeDifference /** * Contains the difference (new messages) between our local * channel state and the remote state */ type TypeChannelDifference = tl.updates.RawChannelDifferenceEmpty | tl.updates.RawChannelDifferenceTooLong | tl.updates.RawChannelDifference function isAnyChannelDifference(o: object): o is TypeChannelDifference } namespace photos { /** * Full list of photos with auxiliary data. */ interface RawPhotos { _: 'photos.photos'; /** * List of photos */ photos: tl.TypePhoto[]; /** * List of mentioned users */ users: tl.TypeUser[]; } /** * Incomplete list of photos with auxiliary data. */ interface RawPhotosSlice { _: 'photos.photosSlice'; /** * Total number of photos */ count: number; /** * List of photos */ photos: tl.TypePhoto[]; /** * List of mentioned users */ users: tl.TypeUser[]; } /** * Photo with auxiliary data. */ interface RawPhoto { _: 'photos.photo'; /** * Photo */ photo: tl.TypePhoto; /** * Users */ users: tl.TypeUser[]; } /** * Installs a previously uploaded photo as a profile photo. * * RPC method returns {@link tl.photos.TypePhoto} */ interface RawUpdateProfilePhotoRequest { _: 'photos.updateProfilePhoto'; /** * 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?: boolean; /** * Can contain info of a bot we own, to change the profile * photo of that bot, instead of the current user. */ bot?: tl.TypeInputUser; /** * Input photo */ id: tl.TypeInputPhoto; } /** * Updates current user profile photo. * * The file, video and * video_emoji_markup flags are mutually * exclusive. * * RPC method returns {@link tl.photos.TypePhoto} */ interface RawUploadProfilePhotoRequest { _: 'photos.uploadProfilePhoto'; /** * 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?: boolean; /** * Can contain info of a bot we own, to change the profile * photo of that bot, instead of the current user. */ bot?: tl.TypeInputUser; /** * Profile photo */ file?: tl.TypeInputFile; /** * Animated * profile picture video */ video?: tl.TypeInputFile; /** * 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. */ videoStartTs?: Double; /** * Animated sticker profile picture, must contain either a * {@link RawVideoSizeEmojiMarkup} or a * {@link RawVideoSizeStickerMarkup} constructor. */ videoEmojiMarkup?: tl.TypeVideoSize; } /** * Deletes profile photos. The method returns a list of * successfully deleted photo IDs. * * RPC method returns Long array */ interface RawDeletePhotosRequest { _: 'photos.deletePhotos'; /** * Input photos to delete */ id: tl.TypeInputPhoto[]; } /** * Returns the list of user photos. * * RPC method returns {@link tl.photos.TypePhotos} */ interface RawGetUserPhotosRequest { _: 'photos.getUserPhotos'; /** * User ID */ userId: tl.TypeInputUser; /** * 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 », as in conjuction with * limit=1 and offset=-1 the * {@link RawPhoto} object with the id specified * in max_id can be fetched. */ maxId: Long; /** * Number of list elements to be returned */ limit: number; } /** * Upload a custom profile picture for a contact, or suggest a * new profile picture to a contact. * * The file, video and * video_emoji_markup flags are mutually * exclusive. * * RPC method returns {@link tl.photos.TypePhoto} */ interface RawUploadContactProfilePhotoRequest { _: 'photos.uploadContactProfilePhoto'; /** * If set, will send a * {@link RawMessageActionSuggestProfilePhoto} 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?: boolean; /** * If set, removes a previously set personal profile picture * (does not affect suggested profile pictures, to remove them * simply delete the * {@link RawMessageActionSuggestProfilePhoto} service message * with {@link messages.RawDeleteMessagesRequest}). */ save?: boolean; /** * The contact */ userId: tl.TypeInputUser; /** * Profile photo */ file?: tl.TypeInputFile; /** * Animated * profile picture video */ video?: tl.TypeInputFile; /** * 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. */ videoStartTs?: Double; /** * Animated sticker profile picture, must contain either a * {@link RawVideoSizeEmojiMarkup} or a * {@link RawVideoSizeStickerMarkup} constructor. */ videoEmojiMarkup?: tl.TypeVideoSize; } interface RpcCallReturn { 'photos.updateProfilePhoto': tl.photos.TypePhoto 'photos.uploadProfilePhoto': tl.photos.TypePhoto 'photos.deletePhotos': Long[] 'photos.getUserPhotos': tl.photos.TypePhotos 'photos.uploadContactProfilePhoto': tl.photos.TypePhoto } /** * Object contains list of photos with auxiliary data. */ type TypePhotos = tl.photos.RawPhotos | tl.photos.RawPhotosSlice function isAnyPhotos(o: object): o is TypePhotos /** * Photo with auxiliary data. */ type TypePhoto = tl.photos.RawPhoto function isAnyPhoto(o: object): o is TypePhoto } namespace upload { /** * File content. */ interface RawFile { _: 'upload.file'; /** * File type */ type: tl.storage.TypeFileType; /** * Modification time */ mtime: number; /** * Binary data, file content */ bytes: Uint8Array; } /** * The file must be downloaded from a * CDN DC. */ interface RawFileCdnRedirect { _: 'upload.fileCdnRedirect'; /** * CDN DC ID */ dcId: number; /** * File token (see * CDN files) */ fileToken: Uint8Array; /** * Encryption key (see * CDN files) */ encryptionKey: Uint8Array; /** * Encryption IV (see * CDN files) */ encryptionIv: Uint8Array; /** * File hashes (see * CDN files) */ fileHashes: tl.TypeFileHash[]; } /** * Represents a chunk of an * HTTP * webfile downloaded through telegram's secure MTProto * servers */ interface RawWebFile { _: 'upload.webFile'; /** * File size */ size: number; /** * Mime type */ mimeType: string; /** * File type */ fileType: tl.storage.TypeFileType; /** * Modified time */ mtime: number; /** * Data */ bytes: Uint8Array; } /** * The file was cleared from the temporary RAM cache of the * CDN and has * to be re-uploaded. */ interface RawCdnFileReuploadNeeded { _: 'upload.cdnFileReuploadNeeded'; /** * Request token (see * CDN) */ requestToken: Uint8Array; } /** * Represent a chunk of a * CDN file. */ interface RawCdnFile { _: 'upload.cdnFile'; /** * The data */ bytes: Uint8Array; } /** * Saves a part of file for further sending to one of the * methods. * * RPC method returns boolean */ interface RawSaveFilePartRequest { _: 'upload.saveFilePart'; /** * Random file identifier created by the client */ fileId: Long; /** * Numerical order of a part */ filePart: number; /** * Binary data, content of a part */ bytes: Uint8Array; } /** * Returns content of a whole file or its part. * * RPC method returns {@link tl.upload.TypeFile} */ interface RawGetFileRequest { _: 'upload.getFile'; /** * Disable some checks on limit and offset values, useful for * example to stream videos by keyframes */ precise?: boolean; /** * Whether the current client supports * CDN * downloads */ cdnSupported?: boolean; /** * File location */ location: tl.TypeInputFileLocation; /** * Number of bytes to be skipped */ offset: number; /** * Number of bytes to be returned */ limit: number; } /** * Saves a part of a large file (over 10 MB in size) to be * later passed to one of the methods. * * RPC method returns boolean */ interface RawSaveBigFilePartRequest { _: 'upload.saveBigFilePart'; /** * Random file id, created by the client */ fileId: Long; /** * Part sequence number */ filePart: number; /** * Total number of parts */ fileTotalParts: number; /** * Binary data, part contents */ bytes: Uint8Array; } /** * Returns content of a web file, by proxying the request * through telegram, see the * webfile * docs for more info. * * Note: the query must be sent to the DC * specified in the webfile_dc_id * MTProto * configuration field. * * RPC method returns {@link tl.upload.TypeWebFile} */ interface RawGetWebFileRequest { _: 'upload.getWebFile'; /** * The file to download */ location: tl.TypeInputWebFileLocation; /** * Number of bytes to be skipped */ offset: number; /** * Number of bytes to be returned */ limit: number; } /** * Download a * CDN file. * * RPC method returns {@link tl.upload.TypeCdnFile} */ interface RawGetCdnFileRequest { _: 'upload.getCdnFile'; /** * File token */ fileToken: Uint8Array; /** * Offset of chunk to download */ offset: number; /** * Length of chunk to download */ limit: number; } /** * Request a reupload of a certain file to a * CDN DC. * * RPC method returns {@link tl.TypeFileHash} array */ interface RawReuploadCdnFileRequest { _: 'upload.reuploadCdnFile'; /** * File token */ fileToken: Uint8Array; /** * Request token */ requestToken: Uint8Array; } /** * Get SHA256 hashes for verifying downloaded * CDN files * * RPC method returns {@link tl.TypeFileHash} array */ interface RawGetCdnFileHashesRequest { _: 'upload.getCdnFileHashes'; /** * File */ fileToken: Uint8Array; /** * Offset from which to start getting hashes */ offset: number; } /** * Get SHA256 hashes for verifying downloaded files * * RPC method returns {@link tl.TypeFileHash} array */ interface RawGetFileHashesRequest { _: 'upload.getFileHashes'; /** * File */ location: tl.TypeInputFileLocation; /** * Offset from which to get file hashes */ offset: number; } interface RpcCallReturn { 'upload.saveFilePart': boolean 'upload.getFile': tl.upload.TypeFile 'upload.saveBigFilePart': boolean 'upload.getWebFile': tl.upload.TypeWebFile 'upload.getCdnFile': tl.upload.TypeCdnFile 'upload.reuploadCdnFile': tl.TypeFileHash[] 'upload.getCdnFileHashes': tl.TypeFileHash[] 'upload.getFileHashes': tl.TypeFileHash[] } /** * Contains info on file. */ type TypeFile = tl.upload.RawFile | tl.upload.RawFileCdnRedirect function isAnyFile(o: object): o is TypeFile /** * Remote file */ type TypeWebFile = tl.upload.RawWebFile function isAnyWebFile(o: object): o is TypeWebFile /** * Represents the download status of a CDN file */ type TypeCdnFile = tl.upload.RawCdnFileReuploadNeeded | tl.upload.RawCdnFile function isAnyCdnFile(o: object): o is TypeCdnFile } namespace help { /** * An update is available for the application. */ interface RawAppUpdate { _: 'help.appUpdate'; /** * Unskippable, the new info must be shown to the user (with a * popup or something else) */ canNotSkip?: boolean; /** * Update ID */ id: number; /** * New version name */ version: string; /** * Text description of the update */ text: string; /** * Message * entities for styled text */ entities: tl.TypeMessageEntity[]; /** * Application binary */ document?: tl.TypeDocument; /** * Application download URL */ url?: string; /** * Associated sticker */ sticker?: tl.TypeDocument; } /** * No updates are available for the application. */ interface RawNoAppUpdate { _: 'help.noAppUpdate'; } /** * Text of a text message with an invitation to install * Telegram. */ interface RawInviteText { _: 'help.inviteText'; /** * Text of the message */ message: string; } /** * Info on support user. */ interface RawSupport { _: 'help.support'; /** * Phone number */ phoneNumber: string; /** * User */ user: tl.TypeUser; } /** * Info about the latest telegram Terms Of Service */ interface RawTermsOfService { _: 'help.termsOfService'; /** * Whether a prompt must be showed to the user, in order to * accept the new terms. */ popup?: boolean; /** * ID of the new terms */ id: tl.TypeDataJSON; /** * Text of the new terms */ text: string; /** * Message * entities for styled text */ entities: tl.TypeMessageEntity[]; /** * Minimum age required to sign up to telegram, the user must * confirm that they is older than the minimum age. */ minAgeConfirm?: number; } /** * Recent t.me URLs */ interface RawRecentMeUrls { _: 'help.recentMeUrls'; /** * URLs */ urls: tl.TypeRecentMeUrl[]; /** * Chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; } /** * No changes were made to telegram's terms of service */ interface RawTermsOfServiceUpdateEmpty { _: 'help.termsOfServiceUpdateEmpty'; /** * New TOS updates will have to be queried using * {@link help.RawGetTermsOfServiceUpdateRequest} in * expires seconds */ expires: number; } /** * Info about an update of telegram's terms of service. If the * terms of service are declined, then the * {@link account.RawDeleteAccountRequest} method should be * called with the reason "Decline ToS update" */ interface RawTermsOfServiceUpdate { _: 'help.termsOfServiceUpdate'; /** * New TOS updates will have to be queried using * {@link help.RawGetTermsOfServiceUpdateRequest} in * expires seconds */ expires: number; /** * New terms of service */ termsOfService: tl.help.TypeTermsOfService; } /** * Deep link info empty */ interface RawDeepLinkInfoEmpty { _: 'help.deepLinkInfoEmpty'; } /** * Deep link info, see * the * here for more details */ interface RawDeepLinkInfo { _: 'help.deepLinkInfo'; /** * An update of the app is required to parse this link */ updateApp?: boolean; /** * Message to show to the user */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; } /** * Password configuration not modified */ interface RawPassportConfigNotModified { _: 'help.passportConfigNotModified'; } /** * Telegram * passport * configuration */ interface RawPassportConfig { _: 'help.passportConfig'; /** * Hash * used for caching, for more info click here */ hash: number; /** * Localization */ countriesLangs: tl.TypeDataJSON; } /** * Localized name for telegram support */ interface RawSupportName { _: 'help.supportName'; /** * Localized name */ name: string; } /** * Internal use */ interface RawUserInfoEmpty { _: 'help.userInfoEmpty'; } /** * Internal use */ interface RawUserInfo { _: 'help.userInfo'; /** * Info */ message: string; /** * Message * entities for styled text */ entities: tl.TypeMessageEntity[]; /** * Author */ author: string; /** * Date */ date: number; } /** * No PSA/MTProxy info is available */ interface RawPromoDataEmpty { _: 'help.promoDataEmpty'; /** * Re-fetch PSA/MTProxy info after the specified number of * seconds */ expires: number; } /** * A set of useful suggestions and a PSA/MTProxy sponsored * peer, see * here * » for more info. */ interface RawPromoData { _: 'help.promoData'; /** * Set when connecting using an MTProxy that has configured an * associated peer (that will be passed in peer, * i.e. the channel that sponsored the MTProxy) that should be * pinned on top of the chat list. */ proxy?: boolean; /** * Unixtime when to re-invoke * {@link help.RawGetPromoDataRequest}. */ expires: number; /** * MTProxy/PSA peer */ peer?: tl.TypePeer; /** * For Public Service Announcement peers, * indicates the type of the PSA. */ psaType?: string; /** * For Public Service Announcement peers, contains * the PSA itself. */ psaMessage?: string; /** * Contains a list of * pending * suggestions ». */ pendingSuggestions: string[]; /** * Contains a list of * inverted * suggestions ». */ dismissedSuggestions: string[]; /** * Contains a list of * custom * pending suggestions ». */ customPendingSuggestion?: tl.TypePendingSuggestion; /** * Chat info */ chats: tl.TypeChat[]; /** * User info */ users: tl.TypeUser[]; } /** * Country code and phone number pattern of a specific country */ interface RawCountryCode { _: 'help.countryCode'; /** * ISO country code */ countryCode: string; /** * Possible phone prefixes */ prefixes?: string[]; /** * Phone patterns: for example, XXX XXX XXX */ patterns?: string[]; } /** * Name, ISO code, localized name and phone codes/patterns of a * specific country */ interface RawCountry { _: 'help.country'; /** * Whether this country should not be shown in the list */ hidden?: boolean; /** * ISO code of country */ iso2: string; /** * Name of the country in the country's language */ defaultName: string; /** * Name of the country in the user's language, if different * from the original name */ name?: string; /** * Phone codes/patterns */ countryCodes: tl.help.TypeCountryCode[]; } /** * The country list has not changed */ interface RawCountriesListNotModified { _: 'help.countriesListNotModified'; } /** * Name, ISO code, localized name and phone codes/patterns of * all available countries */ interface RawCountriesList { _: 'help.countriesList'; /** * Name, ISO code, localized name and phone codes/patterns of * all available countries */ countries: tl.help.TypeCountry[]; /** * Hash * used for caching, for more info click here */ hash: number; } /** * Telegram Premium promotion information * * Note that the * video_sections+videos fields are a * list of videos, and the corresponding premium feature * identifiers. * * * They're equivalent to a section => video dictionary, with * keys from video_section and values from * videos. * * * The keys in video_sections correspond to a * specific feature identifier, and the associated promotional * video should be shown when the associated feature row is * clicked. */ interface RawPremiumPromo { _: 'help.premiumPromo'; /** * Description of the current state of the user's Telegram * Premium subscription */ statusText: string; /** * Message * entities for styled text */ statusEntities: tl.TypeMessageEntity[]; /** * A list of * premium * feature identifiers », associated to each video */ videoSections: string[]; /** * A list of videos */ videos: tl.TypeDocument[]; /** * Telegram Premium subscription options */ periodOptions: tl.TypePremiumSubscriptionOption[]; /** * Related user information */ users: tl.TypeUser[]; } /** * The client configuration parameters haven't changed */ interface RawAppConfigNotModified { _: 'help.appConfigNotModified'; } /** * Contains various * client * configuration parameters */ interface RawAppConfig { _: 'help.appConfig'; /** * Hash * used for caching, for more info click here */ hash: number; /** * Client * configuration parameters */ config: tl.TypeJSONValue; } /** * Represents a * color * palette that can be used in message accents ». */ interface RawPeerColorSet { _: 'help.peerColorSet'; /** * A list of 1-3 colors in RGB format, describing the accent * color. */ colors: number[]; } /** * Represents a * color * palette that can be used in profile pages ». */ interface RawPeerColorProfileSet { _: 'help.peerColorProfileSet'; /** * A list of 1-2 colors in RGB format, shown in the color * palette settings to describe the current palette. */ paletteColors: number[]; /** * A list of 1-2 colors in RGB format describing the colors * used to generate the actual background used in the profile * page. */ bgColors: number[]; /** * 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. */ storyColors: number[]; } /** * Contains info about a * color * palette ». */ interface RawPeerColorOption { _: '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?: boolean; /** * Palette ID. */ colorId: 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 (i.e. the * same colors used for randomized fallback * message * accent colors). */ colors?: tl.help.TypePeerColorSet; /** * Dark mode palette. Optional, defaults to the palette in * colors (or the autogenerated palette for IDs * 0 to 6) if absent. */ darkColors?: tl.help.TypePeerColorSet; /** * Channels can use this palette only after reaching at least * the boost * level specified in this field. */ channelMinLevel?: number; /** * Supergroups can use this palette only after reaching at * least the * boost * level specified in this field. */ groupMinLevel?: number; } /** * The list of color palettes has not changed. */ interface RawPeerColorsNotModified { _: 'help.peerColorsNotModified'; } /** * Contains info about multiple * color * palettes ». */ interface RawPeerColors { _: 'help.peerColors'; /** * Hash * used for caching, for more info click here */ hash: number; /** * Usable * color * palettes. */ colors: tl.help.TypePeerColorOption[]; } /** * The timezone list has not changed. */ interface RawTimezonesListNotModified { _: 'help.timezonesListNotModified'; } /** * Timezone information that may be used elsewhere in the API, * such as to set * Telegram * Business opening hours ». */ interface RawTimezonesList { _: 'help.timezonesList'; /** * Timezones */ timezones: tl.TypeTimezone[]; /** * Hash * used for caching, for more info click here */ hash: number; } /** * Returns current configuration, including data center * configuration. * * RPC method returns {@link tl.TypeConfig} */ interface RawGetConfigRequest { _: 'help.getConfig'; } /** * Returns info on data center nearest to the user. * * RPC method returns {@link tl.TypeNearestDc} */ interface RawGetNearestDcRequest { _: 'help.getNearestDc'; } /** * Returns information on update availability for the current * application. * * RPC method returns {@link tl.help.TypeAppUpdate} */ interface RawGetAppUpdateRequest { _: 'help.getAppUpdate'; /** * Source */ source: string; } /** * Returns localized text of a text message with an invitation. * * RPC method returns {@link tl.help.TypeInviteText} */ interface RawGetInviteTextRequest { _: 'help.getInviteText'; } /** * Returns the support user for the "ask a question" feature. * * RPC method returns {@link tl.help.TypeSupport} */ interface RawGetSupportRequest { _: 'help.getSupport'; } /** * Informs the server about the number of pending bot updates * if they haven't been processed for a long time; for bots * only * * RPC method returns boolean */ interface RawSetBotUpdatesStatusRequest { _: 'help.setBotUpdatesStatus'; /** * Number of pending updates */ pendingUpdatesCount: number; /** * Error message, if present */ message: string; } /** * Get configuration for * CDN file * downloads. * * RPC method returns {@link tl.TypeCdnConfig} */ interface RawGetCdnConfigRequest { _: 'help.getCdnConfig'; } /** * Get recently used t.me links. * * When installing official applications from "Download * Telegram" buttons present in * t.me pages, a referral parameter * is passed to applications after installation. * * * If, after downloading the application, the user creates a * new account (instead of logging into an existing one), the * referral parameter should be imported using this method, * which returns the t.me pages the * user recently opened, before installing Telegram. * * RPC method returns {@link tl.help.TypeRecentMeUrls} */ interface RawGetRecentMeUrlsRequest { _: 'help.getRecentMeUrls'; /** * Referrer */ referer: string; } /** * Look for updates of telegram's terms of service * * RPC method returns {@link tl.help.TypeTermsOfServiceUpdate} */ interface RawGetTermsOfServiceUpdateRequest { _: 'help.getTermsOfServiceUpdate'; } /** * Accept the new terms of service * * RPC method returns boolean */ interface RawAcceptTermsOfServiceRequest { _: 'help.acceptTermsOfService'; /** * ID of terms of service */ id: tl.TypeDataJSON; } /** * Get info about an unsupported deep link, see * here * for more info ». * * RPC method returns {@link tl.help.TypeDeepLinkInfo} */ interface RawGetDeepLinkInfoRequest { _: 'help.getDeepLinkInfo'; /** * Path component of a tg: link */ path: string; } /** * Get app-specific configuration, see * client * configuration for more info on the result. * * RPC method returns {@link tl.help.TypeAppConfig} */ interface RawGetAppConfigRequest { _: 'help.getAppConfig'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Saves logs of application on the server. * * RPC method returns boolean */ interface RawSaveAppLogRequest { _: 'help.saveAppLog'; /** * List of input events */ events: tl.TypeInputAppEvent[]; } /** * Get * passport * configuration * * RPC method returns {@link tl.help.TypePassportConfig} */ interface RawGetPassportConfigRequest { _: 'help.getPassportConfig'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Get localized name of the telegram support user * * RPC method returns {@link tl.help.TypeSupportName} */ interface RawGetSupportNameRequest { _: 'help.getSupportName'; } /** * Can only be used by TSF members to obtain internal * information. * * RPC method returns {@link tl.help.TypeUserInfo} */ interface RawGetUserInfoRequest { _: 'help.getUserInfo'; /** * User ID */ userId: tl.TypeInputUser; } /** * Internal use * * RPC method returns {@link tl.help.TypeUserInfo} */ interface RawEditUserInfoRequest { _: 'help.editUserInfo'; /** * User */ userId: tl.TypeInputUser; /** * Message */ message: string; /** * Message * entities for styled text */ entities: tl.TypeMessageEntity[]; } /** * Returns a set of useful suggestions and PSA/MTProxy * sponsored peers, see * here * » for more info. * * RPC method returns {@link tl.help.TypePromoData} */ interface RawGetPromoDataRequest { _: 'help.getPromoData'; } /** * Hide MTProxy/Public Service Announcement information * * RPC method returns boolean */ interface RawHidePromoDataRequest { _: 'help.hidePromoData'; /** * Peer to hide */ peer: tl.TypeInputPeer; } /** * Dismiss a * suggestion, * see here for more info ». * * RPC method returns boolean */ interface RawDismissSuggestionRequest { _: 'help.dismissSuggestion'; /** * In the case of pending suggestions in * {@link RawChannelFull}, the channel ID. */ peer: tl.TypeInputPeer; /** * Suggestion, * see here for more info ». */ suggestion: string; } /** * Get name, ISO code, localized name and phone codes/patterns * of all available countries * * RPC method returns {@link tl.help.TypeCountriesList} */ interface RawGetCountriesListRequest { _: 'help.getCountriesList'; /** * Language code of the current user */ langCode: string; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Get Telegram Premium promotion information * * RPC method returns {@link tl.help.TypePremiumPromo} */ interface RawGetPremiumPromoRequest { _: 'help.getPremiumPromo'; } /** * Get the set of * accent * color palettes » that can be used for message accents. * * RPC method returns {@link tl.help.TypePeerColors} */ interface RawGetPeerColorsRequest { _: 'help.getPeerColors'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Get the set of * accent * color palettes » that can be used in profile page * backgrounds. * * RPC method returns {@link tl.help.TypePeerColors} */ interface RawGetPeerProfileColorsRequest { _: 'help.getPeerProfileColors'; /** * Hash * used for caching, for more info click here. */ hash: number; } /** * Returns timezone information that may be used elsewhere in * the API, such as to set * Telegram * Business opening hours ». * * RPC method returns {@link tl.help.TypeTimezonesList} */ interface RawGetTimezonesListRequest { _: 'help.getTimezonesList'; /** * Hash * used for caching, for more info click here. */ hash: number; } interface RpcCallReturn { 'help.getConfig': tl.TypeConfig 'help.getNearestDc': tl.TypeNearestDc 'help.getAppUpdate': tl.help.TypeAppUpdate 'help.getInviteText': tl.help.TypeInviteText 'help.getSupport': tl.help.TypeSupport 'help.setBotUpdatesStatus': boolean 'help.getCdnConfig': tl.TypeCdnConfig 'help.getRecentMeUrls': tl.help.TypeRecentMeUrls 'help.getTermsOfServiceUpdate': tl.help.TypeTermsOfServiceUpdate 'help.acceptTermsOfService': boolean 'help.getDeepLinkInfo': tl.help.TypeDeepLinkInfo 'help.getAppConfig': tl.help.TypeAppConfig 'help.saveAppLog': boolean 'help.getPassportConfig': tl.help.TypePassportConfig 'help.getSupportName': tl.help.TypeSupportName 'help.getUserInfo': tl.help.TypeUserInfo 'help.editUserInfo': tl.help.TypeUserInfo 'help.getPromoData': tl.help.TypePromoData 'help.hidePromoData': boolean 'help.dismissSuggestion': boolean 'help.getCountriesList': tl.help.TypeCountriesList 'help.getPremiumPromo': tl.help.TypePremiumPromo 'help.getPeerColors': tl.help.TypePeerColors 'help.getPeerProfileColors': tl.help.TypePeerColors 'help.getTimezonesList': tl.help.TypeTimezonesList } /** * Contains info on app update availability. */ type TypeAppUpdate = tl.help.RawAppUpdate | tl.help.RawNoAppUpdate function isAnyAppUpdate(o: object): o is TypeAppUpdate /** * Object contains info on the text of a message with an * invitation. */ type TypeInviteText = tl.help.RawInviteText function isAnyInviteText(o: object): o is TypeInviteText /** * Info about the support user, relevant to the current user. */ type TypeSupport = tl.help.RawSupport function isAnySupport(o: object): o is TypeSupport /** * Contains info about the latest telegram Terms Of Service. */ type TypeTermsOfService = tl.help.RawTermsOfService function isAnyTermsOfService(o: object): o is TypeTermsOfService /** * Recent t.me URLs */ type TypeRecentMeUrls = tl.help.RawRecentMeUrls function isAnyRecentMeUrls(o: object): o is TypeRecentMeUrls /** * Update of Telegram's terms of service */ type TypeTermsOfServiceUpdate = tl.help.RawTermsOfServiceUpdateEmpty | tl.help.RawTermsOfServiceUpdate function isAnyTermsOfServiceUpdate(o: object): o is TypeTermsOfServiceUpdate /** * Contains information about an unsupported * deep * link » */ type TypeDeepLinkInfo = tl.help.RawDeepLinkInfoEmpty | tl.help.RawDeepLinkInfo function isAnyDeepLinkInfo(o: object): o is TypeDeepLinkInfo /** * Telegram * passport * configuration */ type TypePassportConfig = tl.help.RawPassportConfigNotModified | tl.help.RawPassportConfig function isAnyPassportConfig(o: object): o is TypePassportConfig /** * Get localized name for support user */ type TypeSupportName = tl.help.RawSupportName function isAnySupportName(o: object): o is TypeSupportName /** * User info */ type TypeUserInfo = tl.help.RawUserInfoEmpty | tl.help.RawUserInfo function isAnyUserInfo(o: object): o is TypeUserInfo /** * Info about pinned MTProxy or Public Service Announcement * peers. */ type TypePromoData = tl.help.RawPromoDataEmpty | tl.help.RawPromoData function isAnyPromoData(o: object): o is TypePromoData /** * Country code and phone number pattern of a specific country */ type TypeCountryCode = tl.help.RawCountryCode function isAnyCountryCode(o: object): o is TypeCountryCode /** * Name, ISO code, localized name and phone codes/patterns of a * specific country */ type TypeCountry = tl.help.RawCountry function isAnyCountry(o: object): o is TypeCountry /** * Name, ISO code, localized name and phone codes/patterns of * all available countries */ type TypeCountriesList = tl.help.RawCountriesListNotModified | tl.help.RawCountriesList function isAnyCountriesList(o: object): o is TypeCountriesList /** * Telegram Premium promotion information */ type TypePremiumPromo = tl.help.RawPremiumPromo function isAnyPremiumPromo(o: object): o is TypePremiumPromo /** * Contains various * client * configuration parameters */ type TypeAppConfig = tl.help.RawAppConfigNotModified | tl.help.RawAppConfig function isAnyAppConfig(o: object): o is TypeAppConfig /** * Contains info about a * color * palette ». */ type TypePeerColorSet = tl.help.RawPeerColorSet | tl.help.RawPeerColorProfileSet function isAnyPeerColorSet(o: object): o is TypePeerColorSet /** * Contains info about a * color * palette ». */ type TypePeerColorOption = tl.help.RawPeerColorOption function isAnyPeerColorOption(o: object): o is TypePeerColorOption /** * Contains info about multiple * color * palettes ». */ type TypePeerColors = tl.help.RawPeerColorsNotModified | tl.help.RawPeerColors function isAnyPeerColors(o: object): o is TypePeerColors /** * Timezone information that may be used elsewhere in the API, * such as to set * Telegram * Business opening hours ». */ type TypeTimezonesList = tl.help.RawTimezonesListNotModified | tl.help.RawTimezonesList function isAnyTimezonesList(o: object): o is TypeTimezonesList } namespace account { /** * Privacy rules */ interface RawPrivacyRules { _: 'account.privacyRules'; /** * Privacy rules */ rules: tl.TypePrivacyRule[]; /** * Chats to which the rules apply */ chats: tl.TypeChat[]; /** * Users to which the rules apply */ users: tl.TypeUser[]; } /** * Logged-in sessions */ interface RawAuthorizations { _: 'account.authorizations'; /** * Time-to-live of session */ authorizationTtlDays: number; /** * Logged-in sessions */ authorizations: tl.TypeAuthorization[]; } /** * Configuration for two-factor authorization */ interface RawPassword { _: 'account.password'; /** * Whether the user has a recovery method configured */ hasRecovery?: boolean; /** * Whether telegram * passport * is enabled */ hasSecureValues?: boolean; /** * Whether the user has a password */ hasPassword?: boolean; /** * The KDF * algorithm for SRP two-factor authentication of the * current password */ currentAlgo?: tl.TypePasswordKdfAlgo; /** * Srp B param for * SRP * authorization */ srpB?: Uint8Array; /** * Srp ID param for * SRP * authorization */ srpId?: Long; /** * Text hint for the password */ hint?: string; /** * A * password * recovery email with the specified * pattern * is still awaiting verification */ emailUnconfirmedPattern?: string; /** * The KDF * algorithm for SRP two-factor authentication to use when * creating new passwords */ newAlgo: tl.TypePasswordKdfAlgo; /** * The KDF algorithm for telegram * passport */ newSecureAlgo: tl.TypeSecurePasswordKdfAlgo; /** * Secure random string */ secureRandom: Uint8Array; /** * The 2FA password will be automatically removed at this date, * unless the user cancels the operation */ pendingResetDate?: number; /** * A verified login email with the specified * pattern * is configured */ loginEmailPattern?: string; } /** * Private info associated to the password info (recovery * email, telegram * passport * info & so on) */ interface RawPasswordSettings { _: 'account.passwordSettings'; /** * 2FA * Recovery email */ email?: string; /** * Telegram * passport * settings */ secureSettings?: tl.TypeSecureSecretSettings; } /** * Settings for setting up a new password */ interface RawPasswordInputSettings { _: 'account.passwordInputSettings'; /** * The SRP * algorithm to use */ newAlgo?: tl.TypePasswordKdfAlgo; /** * The computed * password hash */ newPasswordHash?: Uint8Array; /** * Text hint for the password */ hint?: string; /** * Password recovery email */ email?: string; /** * Telegram * passport * settings */ newSecureSettings?: tl.TypeSecureSecretSettings; } /** * Temporary payment password */ interface RawTmpPassword { _: 'account.tmpPassword'; /** * Temporary password */ tmpPassword: Uint8Array; /** * Validity period */ validUntil: number; } /** * Web authorizations */ interface RawWebAuthorizations { _: 'account.webAuthorizations'; /** * Web authorization list */ authorizations: tl.TypeWebAuthorization[]; /** * Users */ users: tl.TypeUser[]; } /** * Telegram * Passport authorization form */ interface RawAuthorizationForm { _: 'account.authorizationForm'; /** * Required * Telegram * Passport documents */ requiredTypes: tl.TypeSecureRequiredType[]; /** * Already submitted * Telegram * Passport documents */ values: tl.TypeSecureValue[]; /** * Telegram * Passport errors */ errors: tl.TypeSecureValueError[]; /** * Info about the bot to which the form will be submitted */ users: tl.TypeUser[]; /** * URL of the service's privacy policy */ privacyPolicyUrl?: string; } /** * The sent email code */ interface RawSentEmailCode { _: 'account.sentEmailCode'; /** * The email (to which the code was sent) must match this * pattern */ emailPattern: string; /** * The length of the verification code */ length: number; } /** * Takeout info */ interface RawTakeout { _: 'account.takeout'; /** * Takeout ID */ id: Long; } /** * No new * wallpapers * were found */ interface RawWallPapersNotModified { _: 'account.wallPapersNotModified'; } /** * Installed * wallpapers */ interface RawWallPapers { _: 'account.wallPapers'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Wallpapers */ wallpapers: tl.TypeWallPaper[]; } /** * Media autodownload settings */ interface RawAutoDownloadSettings { _: 'account.autoDownloadSettings'; /** * Low data usage preset */ low: tl.TypeAutoDownloadSettings; /** * Medium data usage preset */ medium: tl.TypeAutoDownloadSettings; /** * High data usage preset */ high: tl.TypeAutoDownloadSettings; } /** * No new themes were installed */ interface RawThemesNotModified { _: 'account.themesNotModified'; } /** * Installed themes */ interface RawThemes { _: 'account.themes'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Themes */ themes: tl.TypeTheme[]; } /** * Sensitive content settings */ interface RawContentSettings { _: 'account.contentSettings'; /** * Whether viewing of sensitive (NSFW) content is enabled */ sensitiveEnabled?: boolean; /** * Whether the current client can change the sensitive content * settings to view NSFW content */ sensitiveCanChange?: boolean; } /** * You recently requested a password reset that was canceled, * please wait until the specified date before requesting * another reset. */ interface RawResetPasswordFailedWait { _: 'account.resetPasswordFailedWait'; /** * Wait until this date before requesting another reset. */ retryDate: number; } /** * You successfully requested a password reset, please wait * until the specified date before finalizing the reset. */ interface RawResetPasswordRequestedWait { _: 'account.resetPasswordRequestedWait'; /** * Wait until this date before finalizing the reset. */ untilDate: number; } /** * The 2FA password was reset successfully. */ interface RawResetPasswordOk { _: 'account.resetPasswordOk'; } /** * The available chat themes were not modified */ interface RawChatThemesNotModified { _: 'account.chatThemesNotModified'; } /** * Available * chat * themes */ interface RawChatThemes { _: 'account.chatThemes'; /** * Hash to pass to the method that returned this constructor, * to avoid refetching the result if it hasn't changed. */ hash: Long; /** * Themes. */ themes: tl.TypeChatTheme[]; /** * Chats mentioned in the themes field. */ chats: tl.TypeChat[]; /** * Users mentioned in the themes field. */ users: tl.TypeUser[]; /** * Next offset for pagination. */ nextOffset?: string; } /** * The notification sound list hasn't changed. */ interface RawSavedRingtonesNotModified { _: 'account.savedRingtonesNotModified'; } /** * A list of saved notification sounds */ interface RawSavedRingtones { _: 'account.savedRingtones'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Saved notification sounds */ ringtones: tl.TypeDocument[]; } /** * The notification sound was already in MP3 format and was * saved without any modification */ interface RawSavedRingtone { _: 'account.savedRingtone'; } /** * The notification sound was not in MP3 format and was * successfully converted and saved, use the returned * Document * to refer to the notification sound from now on */ interface RawSavedRingtoneConverted { _: 'account.savedRingtoneConverted'; /** * The converted notification sound */ document: tl.TypeDocument; } /** * The server-side list of * emoji * statuses hasn't changed */ interface RawEmojiStatusesNotModified { _: 'account.emojiStatusesNotModified'; } /** * A list of * emoji * statuses */ interface RawEmojiStatuses { _: 'account.emojiStatuses'; /** * Hash * used for caching, for more info click here */ hash: Long; /** * Emoji * statuses */ statuses: tl.TypeEmojiStatus[]; } /** * The email was verified correctly. */ interface RawEmailVerified { _: 'account.emailVerified'; /** * The verified email address. */ email: string; } /** * The email was verified correctly, and a login code was just * sent to it. */ interface RawEmailVerifiedLogin { _: 'account.emailVerifiedLogin'; /** * The verified email address. */ email: string; /** * Info about the sent * login * code */ sentCode: tl.auth.TypeSentCode; } /** * Contains media autosave settings */ interface RawAutoSaveSettings { _: 'account.autoSaveSettings'; /** * Default media autosave settings for private chats */ usersSettings: tl.TypeAutoSaveSettings; /** * Default media autosave settings for * groups * and supergroups */ chatsSettings: tl.TypeAutoSaveSettings; /** * Default media autosave settings for * channels */ broadcastsSettings: tl.TypeAutoSaveSettings; /** * Peer-specific granular autosave settings */ exceptions: tl.TypeAutoSaveException[]; /** * Chats mentioned in the peer-specific granular autosave * settings */ chats: tl.TypeChat[]; /** * Users mentioned in the peer-specific granular autosave * settings */ users: tl.TypeUser[]; } /** * Info about currently connected * business * bots. */ interface RawConnectedBots { _: 'account.connectedBots'; /** * Info about the connected bots */ connectedBots: tl.TypeConnectedBot[]; /** * Bot information */ users: tl.TypeUser[]; } /** * Contains info about * business * chat deep links » created by the current account. */ interface RawBusinessChatLinks { _: 'account.businessChatLinks'; /** * Links */ links: tl.TypeBusinessChatLink[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Contains info about a single resolved * business * chat deep link ». */ interface RawResolvedBusinessChatLinks { _: 'account.resolvedBusinessChatLinks'; /** * Destination peer */ peer: tl.TypePeer; /** * Message to pre-fill in the message input field. */ message: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Total number of non-refunded * Telegram * Stars a user has spent on sending us messages either * directly or through a channel, see * here * » for more info on paid messages. */ interface RawPaidMessagesRevenue { _: 'account.paidMessagesRevenue'; /** * Amount in * Stars. */ starsAmount: Long; } /** * The list of IDs of songs * ({@link RawDocument}.ids) currently pinned on * our profile hasn't changed. */ interface RawSavedMusicIdsNotModified { _: 'account.savedMusicIdsNotModified'; } /** * List of IDs of songs ({@link RawDocument}.ids) * currently pinned on our profile, see * here * » for more info. */ interface RawSavedMusicIds { _: 'account.savedMusicIds'; /** * Full list of {@link RawDocument}.ids */ ids: Long[]; } interface RawPasskeys { _: 'account.passkeys'; passkeys: tl.TypePasskey[]; } interface RawPasskeyRegistrationOptions { _: 'account.passkeyRegistrationOptions'; options: tl.TypeDataJSON; } /** * Register device to receive * PUSH * notifications * * RPC method returns boolean */ interface RawRegisterDeviceRequest { _: 'account.registerDevice'; /** * Avoid receiving (silent and invisible background) * notifications. Useful to save battery. */ noMuted?: boolean; /** * Device token type, see * PUSH * updates for the possible values. */ tokenType: number; /** * Device token, see * PUSH * updates for the possible values. */ token: string; /** * If true is transmitted, a sandbox-certificate will be used * during transmission. */ appSandbox: 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 */ otherUids: number[]; } /** * Deletes a device by its token, stops sending * PUSH-notifications to it. * * RPC method returns boolean */ interface RawUnregisterDeviceRequest { _: 'account.unregisterDevice'; /** * Device token type, see * PUSH * updates for the possible values. */ tokenType: number; /** * Device token, see * PUSH * updates for the possible values. */ token: string; /** * List of user identifiers of other users currently using the * client */ otherUids: number[]; } /** * Edits notification settings from a given user/group, from * all users/all groups. * * RPC method returns boolean */ interface RawUpdateNotifySettingsRequest { _: 'account.updateNotifySettings'; /** * Notification source */ peer: tl.TypeInputNotifyPeer; /** * Notification settings */ settings: tl.TypeInputPeerNotifySettings; } /** * Gets current notification settings for a given user/group, * from all users/all groups. * * RPC method returns {@link tl.TypePeerNotifySettings} */ interface RawGetNotifySettingsRequest { _: 'account.getNotifySettings'; /** * Notification source */ peer: tl.TypeInputNotifyPeer; } /** * Resets all notification settings from users and groups. * * RPC method returns boolean */ interface RawResetNotifySettingsRequest { _: 'account.resetNotifySettings'; } /** * Updates user profile. * * RPC method returns {@link tl.TypeUser} */ interface RawUpdateProfileRequest { _: 'account.updateProfile'; /** * New user first name */ firstName?: string; /** * New user last name */ lastName?: string; /** * New bio */ about?: string; } /** * Updates online user status. * * RPC method returns boolean */ interface RawUpdateStatusRequest { _: 'account.updateStatus'; /** * If true is transmitted, user status will change to * {@link RawUserStatusOffline}. */ offline: boolean; } /** * Returns a list of available * wallpapers. * * RPC method returns {@link tl.account.TypeWallPapers} */ interface RawGetWallPapersRequest { _: 'account.getWallPapers'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Report a peer for violation of telegram's Terms of Service * * RPC method returns boolean */ interface RawReportPeerRequest { _: 'account.reportPeer'; /** * The peer to report */ peer: tl.TypeInputPeer; /** * The reason why this peer is being reported */ reason: tl.TypeReportReason; /** * Comment for report moderation */ message: string; } /** * Validates a username and checks availability. * * RPC method returns boolean */ interface RawCheckUsernameRequest { _: 'account.checkUsername'; /** * username * * Accepted characters: A-z (case-insensitive), 0-9 and * underscores. * * Length: 5-32 characters. */ username: string; } /** * Changes username for the current user. * * RPC method returns {@link tl.TypeUser} */ interface RawUpdateUsernameRequest { _: 'account.updateUsername'; /** * 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; } /** * Get privacy settings of current account * * RPC method returns {@link tl.account.TypePrivacyRules} */ interface RawGetPrivacyRequest { _: 'account.getPrivacy'; /** * Peer category whose privacy settings should be fetched */ key: tl.TypeInputPrivacyKey; } /** * Change privacy settings of current account * * RPC method returns {@link tl.account.TypePrivacyRules} */ interface RawSetPrivacyRequest { _: 'account.setPrivacy'; /** * New privacy rule */ key: tl.TypeInputPrivacyKey; /** * Peers to which the privacy rule will apply. */ rules: tl.TypeInputPrivacyRule[]; } /** * Delete the user's account from the telegram servers. * * Can also be used to delete the account of a user that * provided the login code, but forgot the 2FA password and no * recovery method is configured, see * here * » for more info on password recovery, and * here * » for more info on account deletion. * * RPC method returns boolean */ interface RawDeleteAccountRequest { _: 'account.deleteAccount'; /** * Why is the account being deleted, can be empty */ reason: string; /** * 2FA * password: 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 » */ password?: tl.TypeInputCheckPasswordSRP; } /** * Get days to live of account * * RPC method returns {@link tl.TypeAccountDaysTTL} */ interface RawGetAccountTTLRequest { _: 'account.getAccountTTL'; } /** * Set account self-destruction period * * RPC method returns boolean */ interface RawSetAccountTTLRequest { _: 'account.setAccountTTL'; /** * Time to live in days */ ttl: tl.TypeAccountDaysTTL; } /** * Verify a new phone number to associate to the current * account * * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawSendChangePhoneCodeRequest { _: 'account.sendChangePhoneCode'; /** * New phone number */ phoneNumber: string; /** * Phone code settings */ settings: tl.TypeCodeSettings; } /** * Change the phone number of the current account * * RPC method returns {@link tl.TypeUser} */ interface RawChangePhoneRequest { _: 'account.changePhone'; /** * New phone number */ phoneNumber: string; /** * Phone code hash received when calling * {@link account.RawSendChangePhoneCodeRequest} */ phoneCodeHash: string; /** * Phone code received when calling * {@link account.RawSendChangePhoneCodeRequest} */ phoneCode: string; } /** * When client-side passcode lock feature is enabled, will not * show message texts in incoming * PUSH * notifications. * * RPC method returns boolean */ interface RawUpdateDeviceLockedRequest { _: 'account.updateDeviceLocked'; /** * Inactivity period after which to start hiding message texts * in * PUSH * notifications. */ period: number; } /** * Get logged-in sessions * * RPC method returns {@link tl.account.TypeAuthorizations} */ interface RawGetAuthorizationsRequest { _: 'account.getAuthorizations'; } /** * Log out an active * authorized * session by its hash * * RPC method returns boolean */ interface RawResetAuthorizationRequest { _: 'account.resetAuthorization'; /** * Session hash */ hash: Long; } /** * Obtain configuration for two-factor authorization with * password * * RPC method returns {@link tl.account.TypePassword} */ interface RawGetPasswordRequest { _: 'account.getPassword'; } /** * Get private info associated to the password info (recovery * email, telegram * passport * info & so on) * * RPC method returns {@link tl.account.TypePasswordSettings} */ interface RawGetPasswordSettingsRequest { _: 'account.getPasswordSettings'; /** * The password (see * SRP) */ password: tl.TypeInputCheckPasswordSRP; } /** * Set a new 2FA password * * RPC method returns boolean */ interface RawUpdatePasswordSettingsRequest { _: 'account.updatePasswordSettings'; /** * The old password (see * SRP) */ password: tl.TypeInputCheckPasswordSRP; /** * The new password (see * SRP) */ newSettings: tl.account.TypePasswordInputSettings; } /** * Send confirmation code to cancel account deletion, for more * info * click * here » * * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawSendConfirmPhoneCodeRequest { _: 'account.sendConfirmPhoneCode'; /** * The hash from the service notification, for more info * click * here » */ hash: string; /** * Phone code settings */ settings: tl.TypeCodeSettings; } /** * Confirm a phone number to cancel account deletion, for more * info * click * here » * * RPC method returns boolean */ interface RawConfirmPhoneRequest { _: 'account.confirmPhone'; /** * Phone code hash, for more info * click * here » */ phoneCodeHash: string; /** * SMS code, for more info * click * here » */ phoneCode: string; } /** * Get temporary payment password * * RPC method returns {@link tl.account.TypeTmpPassword} */ interface RawGetTmpPasswordRequest { _: 'account.getTmpPassword'; /** * SRP password parameters */ password: tl.TypeInputCheckPasswordSRP; /** * Time during which the temporary password will be valid, in * seconds; should be between 60 and 86400 */ period: number; } /** * Get web * login * widget authorizations * * RPC method returns {@link tl.account.TypeWebAuthorizations} */ interface RawGetWebAuthorizationsRequest { _: 'account.getWebAuthorizations'; } /** * Log out an active web * telegram * login session * * RPC method returns boolean */ interface RawResetWebAuthorizationRequest { _: 'account.resetWebAuthorization'; /** * {@link RawWebAuthorization} hash */ hash: Long; } /** * Reset all active web * telegram * login sessions * * RPC method returns boolean */ interface RawResetWebAuthorizationsRequest { _: 'account.resetWebAuthorizations'; } /** * Get all saved * Telegram * Passport documents, * for * more info see the passport docs » * * RPC method returns {@link tl.TypeSecureValue} array */ interface RawGetAllSecureValuesRequest { _: 'account.getAllSecureValues'; } /** * Get saved * Telegram * Passport document, * for * more info see the passport docs » * * RPC method returns {@link tl.TypeSecureValue} array */ interface RawGetSecureValueRequest { _: 'account.getSecureValue'; /** * Requested value types */ types: tl.TypeSecureValueType[]; } /** * Securely save * Telegram * Passport document, * for * more info see the passport docs » * * RPC method returns {@link tl.TypeSecureValue} */ interface RawSaveSecureValueRequest { _: 'account.saveSecureValue'; /** * Secure value, * for * more info see the passport docs » */ value: tl.TypeInputSecureValue; /** * Passport secret hash, * for * more info see the passport docs » */ secureSecretId: Long; } /** * Delete stored * Telegram * Passport documents, * for * more info see the passport docs » * * RPC method returns boolean */ interface RawDeleteSecureValueRequest { _: 'account.deleteSecureValue'; /** * Document types to delete */ types: tl.TypeSecureValueType[]; } /** * Returns a Telegram Passport authorization form for sharing * data with a service * * RPC method returns {@link tl.account.TypeAuthorizationForm} */ interface RawGetAuthorizationFormRequest { _: 'account.getAuthorizationForm'; /** * User identifier of the service's bot */ botId: number; /** * Telegram Passport element types requested by the service */ scope: string; /** * Service's public key */ publicKey: string; } /** * Sends a Telegram Passport authorization form, effectively * sharing data with the service * * RPC method returns boolean */ interface RawAcceptAuthorizationRequest { _: 'account.acceptAuthorization'; /** * Bot ID */ botId: number; /** * Telegram Passport element types requested by the service */ scope: string; /** * Service's public key */ publicKey: string; /** * Types of values sent and their hashes */ valueHashes: tl.TypeSecureValueHash[]; /** * Encrypted values */ credentials: tl.TypeSecureCredentialsEncrypted; } /** * Send the verification phone code for telegram * passport. * * RPC method returns {@link tl.auth.TypeSentCode} */ interface RawSendVerifyPhoneCodeRequest { _: 'account.sendVerifyPhoneCode'; /** * The phone number to verify */ phoneNumber: string; /** * Phone code settings */ settings: tl.TypeCodeSettings; } /** * Verify a phone number for telegram * passport. * * RPC method returns boolean */ interface RawVerifyPhoneRequest { _: 'account.verifyPhone'; /** * Phone number */ phoneNumber: string; /** * Phone code hash received from the call to * {@link account.RawSendVerifyPhoneCodeRequest} */ phoneCodeHash: string; /** * Code received after the call to * {@link account.RawSendVerifyPhoneCodeRequest} */ phoneCode: string; } /** * Send an email verification code. * * RPC method returns {@link tl.account.TypeSentEmailCode} */ interface RawSendVerifyEmailCodeRequest { _: 'account.sendVerifyEmailCode'; /** * Verification purpose. */ purpose: tl.TypeEmailVerifyPurpose; /** * The email where to send the code. */ email: string; } /** * Verify an email address. * * RPC method returns {@link tl.account.TypeEmailVerified} */ interface RawVerifyEmailRequest { _: 'account.verifyEmail'; /** * Verification purpose */ purpose: tl.TypeEmailVerifyPurpose; /** * Email verification code or token */ verification: tl.TypeEmailVerification; } /** * Initialize a * takeout * session, see here » for more info. * * RPC method returns {@link tl.account.TypeTakeout} */ interface RawInitTakeoutSessionRequest { _: 'account.initTakeoutSession'; /** * Whether to export contacts */ contacts?: boolean; /** * Whether to export messages in private chats */ messageUsers?: boolean; /** * Whether to export messages in * basic * groups */ messageChats?: boolean; /** * Whether to export messages in * supergroups */ messageMegagroups?: boolean; /** * Whether to export messages in * channels */ messageChannels?: boolean; /** * Whether to export files */ files?: boolean; /** * Maximum size of files to export */ fileMaxSize?: number; } /** * Terminate a * takeout * session, see here » for more info. * * RPC method returns boolean */ interface RawFinishTakeoutSessionRequest { _: 'account.finishTakeoutSession'; /** * Data exported successfully */ success?: boolean; } /** * Verify an email to use as * 2FA recovery * method. * * RPC method returns boolean */ interface RawConfirmPasswordEmailRequest { _: 'account.confirmPasswordEmail'; /** * The phone code that was received after * setting * a recovery email */ code: string; } /** * Resend the code to verify an email to use as * 2FA recovery * method. * * RPC method returns boolean */ interface RawResendPasswordEmailRequest { _: 'account.resendPasswordEmail'; } /** * Cancel the code that was sent to verify an email to use as * 2FA recovery * method. * * RPC method returns boolean */ interface RawCancelPasswordEmailRequest { _: 'account.cancelPasswordEmail'; } /** * Whether the user will receive notifications when contacts * sign up * * RPC method returns boolean */ interface RawGetContactSignUpNotificationRequest { _: 'account.getContactSignUpNotification'; } /** * Toggle contact sign up notifications * * RPC method returns boolean */ interface RawSetContactSignUpNotificationRequest { _: 'account.setContactSignUpNotification'; /** * Whether to disable contact sign up notifications */ silent: boolean; } /** * Returns list of chats with non-default notification settings * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetNotifyExceptionsRequest { _: 'account.getNotifyExceptions'; /** * If set, chats with non-default sound will be returned */ compareSound?: boolean; /** * If set, chats with non-default notification settings for * stories will be returned */ compareStories?: boolean; /** * If specified, only chats of the specified category will be * returned */ peer?: tl.TypeInputNotifyPeer; } /** * Get info about a certain * wallpaper * * RPC method returns {@link tl.TypeWallPaper} */ interface RawGetWallPaperRequest { _: 'account.getWallPaper'; /** * The * wallpaper * to get info about */ wallpaper: tl.TypeInputWallPaper; } /** * Create and upload a new * wallpaper * * RPC method returns {@link tl.TypeWallPaper} */ interface RawUploadWallPaperRequest { _: 'account.uploadWallPaper'; /** * Set this flag when uploading wallpapers to be passed to * {@link messages.RawSetChatWallPaperRequest}. */ forChat?: boolean; /** * The JPG/PNG wallpaper */ file: tl.TypeInputFile; /** * MIME type of uploaded wallpaper */ mimeType: string; /** * Wallpaper settings */ settings: tl.TypeWallPaperSettings; } /** * Install/uninstall * wallpaper * * RPC method returns boolean */ interface RawSaveWallPaperRequest { _: 'account.saveWallPaper'; /** * Wallpaper * to install or uninstall */ wallpaper: tl.TypeInputWallPaper; /** * Uninstall wallpaper? */ unsave: boolean; /** * Wallpaper settings */ settings: tl.TypeWallPaperSettings; } /** * Install * wallpaper * * RPC method returns boolean */ interface RawInstallWallPaperRequest { _: 'account.installWallPaper'; /** * Wallpaper * to install */ wallpaper: tl.TypeInputWallPaper; /** * Wallpaper * settings */ settings: tl.TypeWallPaperSettings; } /** * Delete all installed * wallpapers, * reverting to the default wallpaper set. * * RPC method returns boolean */ interface RawResetWallPapersRequest { _: 'account.resetWallPapers'; } /** * Get media autodownload settings * * RPC method returns * {@link tl.account.TypeAutoDownloadSettings} */ interface RawGetAutoDownloadSettingsRequest { _: 'account.getAutoDownloadSettings'; } /** * Change media autodownload settings * * RPC method returns boolean */ interface RawSaveAutoDownloadSettingsRequest { _: 'account.saveAutoDownloadSettings'; /** * Whether to save media in the low data usage preset */ low?: boolean; /** * Whether to save media in the high data usage preset */ high?: boolean; /** * Media autodownload settings */ settings: tl.TypeAutoDownloadSettings; } /** * Upload theme * * RPC method returns {@link tl.TypeDocument} */ interface RawUploadThemeRequest { _: 'account.uploadTheme'; /** * Previously * uploaded 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: tl.TypeInputFile; /** * Thumbnail */ thumb?: tl.TypeInputFile; /** * File name */ fileName: string; /** * MIME type, must be * application/x-tgtheme-{format}, where * format depends on the client */ mimeType: string; } /** * Create a theme * * RPC method returns {@link tl.TypeTheme} */ interface RawCreateThemeRequest { _: 'account.createTheme'; /** * Unique theme ID used to generate * theme * deep links, can be empty to autogenerate a random ID. */ slug: string; /** * Theme name */ title: string; /** * Theme file */ document?: tl.TypeInputDocument; /** * Theme settings, multiple values can be provided for the * different base themes (day/night mode, etc). */ settings?: tl.TypeInputThemeSettings[]; } /** * Update theme * * RPC method returns {@link tl.TypeTheme} */ interface RawUpdateThemeRequest { _: 'account.updateTheme'; /** * Theme format, a string that identifies the theming engines * supported by the client */ format: string; /** * Theme to update */ theme: tl.TypeInputTheme; /** * Unique theme ID */ slug?: string; /** * Theme name */ title?: string; /** * Theme file */ document?: tl.TypeInputDocument; /** * Theme settings */ settings?: tl.TypeInputThemeSettings[]; } /** * Save a theme * * RPC method returns boolean */ interface RawSaveThemeRequest { _: 'account.saveTheme'; /** * Theme to save */ theme: tl.TypeInputTheme; /** * Unsave */ unsave: boolean; } /** * Install a theme * * RPC method returns boolean */ interface RawInstallThemeRequest { _: 'account.installTheme'; /** * Whether to install the dark version */ dark?: boolean; /** * Theme to install */ theme?: tl.TypeInputTheme; /** * Theme format, a string that identifies the theming engines * supported by the client */ format?: string; /** * Indicates a basic theme provided by all clients */ baseTheme?: tl.TypeBaseTheme; } /** * Get theme information * * RPC method returns {@link tl.TypeTheme} */ interface RawGetThemeRequest { _: 'account.getTheme'; /** * Theme format, a string that identifies the theming engines * supported by the client */ format: string; /** * Theme */ theme: tl.TypeInputTheme; } /** * Get installed themes * * RPC method returns {@link tl.account.TypeThemes} */ interface RawGetThemesRequest { _: 'account.getThemes'; /** * Theme format, a string that identifies the theming engines * supported by the client */ format: string; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Set sensitive content settings (for viewing or hiding NSFW * content) * * RPC method returns boolean */ interface RawSetContentSettingsRequest { _: 'account.setContentSettings'; /** * Enable NSFW content */ sensitiveEnabled?: boolean; } /** * Get sensitive content settings * * RPC method returns {@link tl.account.TypeContentSettings} */ interface RawGetContentSettingsRequest { _: 'account.getContentSettings'; } /** * Get info about multiple * wallpapers * * RPC method returns {@link tl.TypeWallPaper} array */ interface RawGetMultiWallPapersRequest { _: 'account.getMultiWallPapers'; /** * Wallpapers * to fetch info about */ wallpapers: tl.TypeInputWallPaper[]; } /** * Get global privacy settings * * RPC method returns {@link tl.TypeGlobalPrivacySettings} */ interface RawGetGlobalPrivacySettingsRequest { _: 'account.getGlobalPrivacySettings'; } /** * Set global privacy settings * * RPC method returns {@link tl.TypeGlobalPrivacySettings} */ interface RawSetGlobalPrivacySettingsRequest { _: 'account.setGlobalPrivacySettings'; /** * Global privacy settings */ settings: tl.TypeGlobalPrivacySettings; } /** * Report a profile photo of a dialog * * RPC method returns boolean */ interface RawReportProfilePhotoRequest { _: 'account.reportProfilePhoto'; /** * The dialog */ peer: tl.TypeInputPeer; /** * Dialog photo ID */ photoId: tl.TypeInputPhoto; /** * Report reason */ reason: tl.TypeReportReason; /** * Comment for report moderation */ message: string; } /** * Initiate a 2FA password reset: can only be used if the user * is already logged-in, * see * here for more info » * * RPC method returns * {@link tl.account.TypeResetPasswordResult} */ interface RawResetPasswordRequest { _: 'account.resetPassword'; } /** * Abort a pending 2FA password reset, * see * here for more info » * * RPC method returns boolean */ interface RawDeclinePasswordResetRequest { _: 'account.declinePasswordReset'; } /** * Get all available chat * themes * ». * * RPC method returns {@link tl.account.TypeThemes} */ interface RawGetChatThemesRequest { _: 'account.getChatThemes'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Set time-to-live of current session * * RPC method returns boolean */ interface RawSetAuthorizationTTLRequest { _: 'account.setAuthorizationTTL'; /** * Time-to-live of current session in days */ authorizationTtlDays: number; } /** * Change settings related to a session. * * RPC method returns boolean */ interface RawChangeAuthorizationSettingsRequest { _: 'account.changeAuthorizationSettings'; /** * If set, * confirms * a newly logged in session ». */ confirmed?: boolean; /** * Session ID from the {@link RawAuthorization} constructor, * fetchable using {@link account.RawGetAuthorizationsRequest} */ hash: Long; /** * Whether to enable or disable receiving encrypted chats: if * the flag is not set, the previous setting is not changed */ encryptedRequestsDisabled?: boolean; /** * Whether to enable or disable receiving calls: if the flag is * not set, the previous setting is not changed */ callRequestsDisabled?: boolean; } /** * Fetch saved notification sounds * * RPC method returns {@link tl.account.TypeSavedRingtones} */ interface RawGetSavedRingtonesRequest { _: 'account.getSavedRingtones'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Save or remove saved notification sound. * * If the notification sound is already in MP3 format, * {@link account.RawSavedRingtone} will be returned. * * * Otherwise, it will be automatically converted and a * {@link account.RawSavedRingtoneConverted} will be returned, * containing a new {@link RawDocument} object that should be * used to refer to the ringtone from now on (ie when deleting * it using the unsave parameter, or when * downloading it). * * RPC method returns {@link tl.account.TypeSavedRingtone} */ interface RawSaveRingtoneRequest { _: 'account.saveRingtone'; /** * Notification sound uploaded using * {@link account.RawUploadRingtoneRequest} */ id: tl.TypeInputDocument; /** * Whether to add or delete the notification sound */ unsave: boolean; } /** * Upload notification sound, use * {@link account.RawSaveRingtoneRequest} to convert it and add * it to the list of saved notification sounds. * * RPC method returns {@link tl.TypeDocument} */ interface RawUploadRingtoneRequest { _: 'account.uploadRingtone'; /** * Notification sound */ file: tl.TypeInputFile; /** * File name */ fileName: string; /** * MIME type of file */ mimeType: string; } /** * Set an * emoji * status * * RPC method returns boolean */ interface RawUpdateEmojiStatusRequest { _: 'account.updateEmojiStatus'; /** * Emoji * status to set */ emojiStatus: tl.TypeEmojiStatus; } /** * Get a list of default suggested * emoji * statuses * * RPC method returns {@link tl.account.TypeEmojiStatuses} */ interface RawGetDefaultEmojiStatusesRequest { _: 'account.getDefaultEmojiStatuses'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get recently used * emoji * statuses * * RPC method returns {@link tl.account.TypeEmojiStatuses} */ interface RawGetRecentEmojiStatusesRequest { _: 'account.getRecentEmojiStatuses'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Clears list of recently used * emoji * statuses * * RPC method returns boolean */ interface RawClearRecentEmojiStatusesRequest { _: 'account.clearRecentEmojiStatuses'; } /** * Reorder usernames associated with the currently logged-in * user. * * RPC method returns boolean */ interface RawReorderUsernamesRequest { _: 'account.reorderUsernames'; /** * The new order for active usernames. All active usernames * must be specified. */ order: string[]; } /** * Activate or deactivate a purchased * fragment.com username * associated to the currently logged-in user. * * RPC method returns boolean */ interface RawToggleUsernameRequest { _: 'account.toggleUsername'; /** * Username */ username: string; /** * Whether to activate or deactivate it */ active: boolean; } /** * Get a set of suggested * custom * emoji stickers that can be * used * as profile picture * * RPC method returns {@link tl.TypeEmojiList} */ interface RawGetDefaultProfilePhotoEmojisRequest { _: 'account.getDefaultProfilePhotoEmojis'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get a set of suggested * custom * emoji stickers that can be * used * as group picture * * RPC method returns {@link tl.TypeEmojiList} */ interface RawGetDefaultGroupPhotoEmojisRequest { _: 'account.getDefaultGroupPhotoEmojis'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get autosave settings * * RPC method returns {@link tl.account.TypeAutoSaveSettings} */ interface RawGetAutoSaveSettingsRequest { _: 'account.getAutoSaveSettings'; } /** * Modify autosave settings * * RPC method returns boolean */ interface RawSaveAutoSaveSettingsRequest { _: 'account.saveAutoSaveSettings'; /** * Whether the new settings should affect all private chats */ users?: boolean; /** * Whether the new settings should affect all groups */ chats?: boolean; /** * Whether the new settings should affect all * channels */ broadcasts?: boolean; /** * Whether the new settings should affect a specific peer */ peer?: tl.TypeInputPeer; /** * The new autosave settings */ settings: tl.TypeAutoSaveSettings; } /** * Clear all peer-specific autosave settings. * * RPC method returns boolean */ interface RawDeleteAutoSaveExceptionsRequest { _: 'account.deleteAutoSaveExceptions'; } /** * Invalidate the specified login codes, see * here * » for more info. * * RPC method returns boolean */ interface RawInvalidateSignInCodesRequest { _: 'account.invalidateSignInCodes'; /** * The login codes to invalidate. */ codes: string[]; } /** * Update the * accent * color and background custom emoji » of the current * account. * * RPC method returns boolean */ interface RawUpdateColorRequest { _: 'account.updateColor'; /** * Whether to change the accent color emoji pattern of the * profile page; otherwise, the accent color and emoji pattern * of messages will be changed. */ forProfile?: boolean; /** * ID of the * accent color palette » to use (not RGB24, see * here * » for more info). */ color?: tl.TypePeerColor; } /** * Get a set of suggested * custom * emoji stickers that can be used in an * accent * color pattern. * * RPC method returns {@link tl.TypeEmojiList} */ interface RawGetDefaultBackgroundEmojisRequest { _: 'account.getDefaultBackgroundEmojis'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Get a list of default suggested * channel * emoji statuses. * * RPC method returns {@link tl.account.TypeEmojiStatuses} */ interface RawGetChannelDefaultEmojiStatusesRequest { _: 'account.getChannelDefaultEmojiStatuses'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Returns fetch the full list of * custom * emoji IDs » that cannot be used in * channel * emoji statuses ». * * RPC method returns {@link tl.TypeEmojiList} */ interface RawGetChannelRestrictedStatusEmojisRequest { _: 'account.getChannelRestrictedStatusEmojis'; /** * Hash * used for caching, for more info click here. */ hash: Long; } /** * Specify a set of * Telegram * Business opening hours. * * * This info will be contained in * {@link RawUserFull}.business_work_hours. * * To remove all opening hours, invoke the method without * setting the business_work_hours field. * * Note that the opening hours specified by the user must be * appropriately validated and transformed before invoking the * method, as specified * here * ». * * RPC method returns boolean */ interface RawUpdateBusinessWorkHoursRequest { _: 'account.updateBusinessWorkHours'; /** * Opening hours (optional, if not set removes all opening * hours). */ businessWorkHours?: tl.TypeBusinessWorkHours; } /** * Businesses * » may advertise their location using this method, see * here * » for more info. * * To remove business location information invoke the method * without setting any of the parameters. * * RPC method returns boolean */ interface RawUpdateBusinessLocationRequest { _: 'account.updateBusinessLocation'; /** * Optional, contains a set of geographical coordinates. */ geoPoint?: tl.TypeInputGeoPoint; /** * Mandatory when setting/updating the location, contains a * textual description of the address (max 96 UTF-8 chars). */ address?: string; } /** * Set a list of * Telegram * Business greeting messages. * * RPC method returns boolean */ interface RawUpdateBusinessGreetingMessageRequest { _: 'account.updateBusinessGreetingMessage'; /** * Greeting message configuration and contents. */ message?: tl.TypeInputBusinessGreetingMessage; } /** * Set a list of * Telegram * Business away messages. * * RPC method returns boolean */ interface RawUpdateBusinessAwayMessageRequest { _: 'account.updateBusinessAwayMessage'; /** * Away message configuration and contents. */ message?: tl.TypeInputBusinessAwayMessage; } /** * Connect a * business * bot » to the current account, or to change the current * connection settings. * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdateConnectedBotRequest { _: 'account.updateConnectedBot'; /** * Whether to fully disconnect the bot from the current * account. */ deleted?: boolean; /** * Business bot rights. */ rights?: tl.TypeBusinessBotRights; /** * The bot to connect or disconnect */ bot: tl.TypeInputUser; /** * Configuration for the business connection */ recipients: tl.TypeInputBusinessBotRecipients; } /** * List all currently connected * business * bots » * * RPC method returns {@link tl.account.TypeConnectedBots} */ interface RawGetConnectedBotsRequest { _: 'account.getConnectedBots'; } /** * Bots may invoke this method to re-fetch the * {@link RawUpdateBotBusinessConnect} constructor associated * with a specific * business * connection_id, see here » for more info on * connected business bots. * * * This is needed for example for freshly logged in bots that * are receiving some {@link RawUpdateBotNewBusinessMessage}, * etc. updates because some users have already connected to * the bot before it could login. * * * In this case, the bot is receiving messages from the * business connection, but it hasn't cached the associated * {@link RawUpdateBotBusinessConnect} with info about the * connection (can it reply to messages? etc.) yet, and cannot * receive the old ones because they were sent when the bot * wasn't logged into the session yet. * * * This method can be used to fetch info about a not-yet-cached * business connection, and should not be invoked if the info * is already cached or to fetch changes, as eventual changes * will automatically be sent as new * {@link RawUpdateBotBusinessConnect} updates to the bot using * the usual * update * delivery methods ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetBotBusinessConnectionRequest { _: 'account.getBotBusinessConnection'; /** * Business * connection ID ». */ connectionId: string; } /** * Set or remove the * Telegram * Business introduction ». * * RPC method returns boolean */ interface RawUpdateBusinessIntroRequest { _: 'account.updateBusinessIntro'; /** * Telegram Business introduction, to remove it call the method * without setting this flag. */ intro?: tl.TypeInputBusinessIntro; } /** * Pause or unpause a specific chat, temporarily disconnecting * it from all * business * bots ». * * RPC method returns boolean */ interface RawToggleConnectedBotPausedRequest { _: 'account.toggleConnectedBotPaused'; /** * The chat to pause */ peer: tl.TypeInputPeer; /** * Whether to pause or unpause the chat */ paused: boolean; } /** * Permanently disconnect a specific chat from all * business * bots » (equivalent to specifying it in * recipients.exclude_users during initial * configuration with * {@link account.RawUpdateConnectedBotRequest}); to reconnect * of a chat disconnected using this method the user must * reconnect the entire bot by invoking * {@link account.RawUpdateConnectedBotRequest}. * * RPC method returns boolean */ interface RawDisablePeerConnectedBotRequest { _: 'account.disablePeerConnectedBot'; /** * The chat to disconnect */ peer: tl.TypeInputPeer; } /** * Update our * birthday, * see here » for more info. * * RPC method returns boolean */ interface RawUpdateBirthdayRequest { _: 'account.updateBirthday'; /** * Birthday. */ birthday?: tl.TypeBirthday; } /** * Create a * business * chat deep link ». * * RPC method returns {@link tl.TypeBusinessChatLink} */ interface RawCreateBusinessChatLinkRequest { _: 'account.createBusinessChatLink'; /** * Info about the link to create. */ link: tl.TypeInputBusinessChatLink; } /** * Edit a created * business * chat deep link ». * * RPC method returns {@link tl.TypeBusinessChatLink} */ interface RawEditBusinessChatLinkRequest { _: 'account.editBusinessChatLink'; /** * Slug of the link, obtained as specified * here * ». */ slug: string; /** * New link information. */ link: tl.TypeInputBusinessChatLink; } /** * Delete a * business * chat deep link ». * * RPC method returns boolean */ interface RawDeleteBusinessChatLinkRequest { _: 'account.deleteBusinessChatLink'; /** * Slug of the link, obtained as specified * here * ». */ slug: string; } /** * List all created * business * chat deep links ». * * RPC method returns {@link tl.account.TypeBusinessChatLinks} */ interface RawGetBusinessChatLinksRequest { _: 'account.getBusinessChatLinks'; } /** * Resolve a * business * chat deep link ». * * RPC method returns * {@link tl.account.TypeResolvedBusinessChatLinks} */ interface RawResolveBusinessChatLinkRequest { _: 'account.resolveBusinessChatLink'; /** * Slug of the link, obtained as specified * here * ». */ slug: string; } /** * Associate (or remove) a personal * channel * », that will be listed on our personal * profile * page ». * * Changing it will emit an {@link RawUpdateUser} update. * * RPC method returns boolean */ interface RawUpdatePersonalChannelRequest { _: 'account.updatePersonalChannel'; /** * The channel, pass {@link RawInputChannelEmpty} to remove it. */ channel: tl.TypeInputChannel; } /** * Disable or re-enable Telegram ads for the current * Premium * account. * * Useful for business owners that may want to launch and view * their own Telegram ads via the * Telegram ad platform * ». * * RPC method returns boolean */ interface RawToggleSponsoredMessagesRequest { _: 'account.toggleSponsoredMessages'; /** * Enable or disable ads. */ enabled: boolean; } /** * Get the current * reaction * notification settings ». * * RPC method returns {@link tl.TypeReactionsNotifySettings} */ interface RawGetReactionsNotifySettingsRequest { _: 'account.getReactionsNotifySettings'; } /** * Change the * reaction * notification settings ». * * RPC method returns {@link tl.TypeReactionsNotifySettings} */ interface RawSetReactionsNotifySettingsRequest { _: 'account.setReactionsNotifySettings'; /** * New reaction notification settings. */ settings: tl.TypeReactionsNotifySettings; } /** * Obtain a list of * emoji * statuses » for owned * collectible * gifts. * * RPC method returns {@link tl.account.TypeEmojiStatuses} */ interface RawGetCollectibleEmojiStatusesRequest { _: 'account.getCollectibleEmojiStatuses'; /** * Hash for * pagination */ hash: Long; } /** * Get the number of stars we have received from the specified * user thanks to * paid * messages »; the received amount will be equal to the * sent amount multiplied by * stars_paid_message_commission_permille * divided by 1000. * * RPC method returns * {@link tl.account.TypePaidMessagesRevenue} */ interface RawGetPaidMessagesRevenueRequest { _: 'account.getPaidMessagesRevenue'; /** * If set, can contain the ID of a * monoforum * (channel direct messages) to obtain the number of stars * the user has spent to send us direct messages via the * channel. */ parentPeer?: tl.TypeInputPeer; /** * The user that paid to send us messages. */ userId: tl.TypeInputUser; } /** * Allow a user to send us messages without paying if * paid * messages » are enabled. * * RPC method returns boolean */ interface RawToggleNoPaidMessagesExceptionRequest { _: 'account.toggleNoPaidMessagesException'; /** * If set and require_payment is not set, refunds * the amounts the user has already paid us to send us messages * (directly or via a monoforum). */ refundCharged?: boolean; /** * If set, requires the user to pay in order to send us * messages. * * Can only be set by monoforums, not users, * i.e. parent_peer must be set if this flag is * set; users must instead use the * {@link RawInputPrivacyKeyNoPaidMessages} privacy setting to * remove a previously added exemption. * * If not set, allows the user to send us messages without * paying (can be unset by both monoforums and * users). */ requirePayment?: boolean; /** * If set, applies the setting within the * monoforum * aka direct messages » (pass the ID of the monoforum, * not the ID of the associated channel). */ parentPeer?: tl.TypeInputPeer; /** * The user to exempt or unexempt. */ userId: tl.TypeInputUser; } /** * Changes the main profile tab of the current user, see * here * » for more info. * * RPC method returns boolean */ interface RawSetMainProfileTabRequest { _: 'account.setMainProfileTab'; /** * The tab to set as main tab. */ tab: tl.TypeProfileTab; } /** * Adds or removes a song from the current user's profile * see * here » for more info on the music tab of the profile * page. * * RPC method returns boolean */ interface RawSaveMusicRequest { _: 'account.saveMusic'; /** * If set, removes the song. */ unsave?: boolean; /** * The song to add or remove; can be an already added song when * reordering songs with after_id. Adding an * already added song will never re-add it, only move it to the * top of the song list (or after the song passed in * after_id). */ id: tl.TypeInputDocument; /** * If set, the song will be added after the passed song (must * be already pinned on the profile). */ afterId?: tl.TypeInputDocument; } /** * Fetch the full list of only the IDs of * songs * currently added to the profile, see here » for more * info. * * RPC method returns {@link tl.account.TypeSavedMusicIds} */ interface RawGetSavedMusicIdsRequest { _: 'account.getSavedMusicIds'; /** * Hash * generated * » from the previously returned list of IDs. */ hash: Long; } /** * Obtain all * chat * themes » associated to owned * collectible * gifts ». * * RPC method returns {@link tl.account.TypeChatThemes} */ interface RawGetUniqueGiftChatThemesRequest { _: 'account.getUniqueGiftChatThemes'; /** * Offset for * pagination. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash from a previously returned * {@link account.RawChatThemes} constructor, to avoid * returning any result if the theme list hasn't changed. */ hash: Long; } /** * RPC method returns * {@link tl.account.TypePasskeyRegistrationOptions} */ interface RawInitPasskeyRegistrationRequest { _: 'account.initPasskeyRegistration'; } /** * RPC method returns {@link tl.TypePasskey} */ interface RawRegisterPasskeyRequest { _: 'account.registerPasskey'; credential: tl.TypeInputPasskeyCredential; } /** * RPC method returns {@link tl.account.TypePasskeys} */ interface RawGetPasskeysRequest { _: 'account.getPasskeys'; } /** * RPC method returns boolean */ interface RawDeletePasskeyRequest { _: 'account.deletePasskey'; id: string; } interface RpcCallReturn { 'account.registerDevice': boolean 'account.unregisterDevice': boolean 'account.updateNotifySettings': boolean 'account.getNotifySettings': tl.TypePeerNotifySettings 'account.resetNotifySettings': boolean 'account.updateProfile': tl.TypeUser 'account.updateStatus': boolean 'account.getWallPapers': tl.account.TypeWallPapers 'account.reportPeer': boolean 'account.checkUsername': boolean 'account.updateUsername': tl.TypeUser 'account.getPrivacy': tl.account.TypePrivacyRules 'account.setPrivacy': tl.account.TypePrivacyRules 'account.deleteAccount': boolean 'account.getAccountTTL': tl.TypeAccountDaysTTL 'account.setAccountTTL': boolean 'account.sendChangePhoneCode': tl.auth.TypeSentCode 'account.changePhone': tl.TypeUser 'account.updateDeviceLocked': boolean 'account.getAuthorizations': tl.account.TypeAuthorizations 'account.resetAuthorization': boolean 'account.getPassword': tl.account.TypePassword 'account.getPasswordSettings': tl.account.TypePasswordSettings 'account.updatePasswordSettings': boolean 'account.sendConfirmPhoneCode': tl.auth.TypeSentCode 'account.confirmPhone': boolean 'account.getTmpPassword': tl.account.TypeTmpPassword 'account.getWebAuthorizations': tl.account.TypeWebAuthorizations 'account.resetWebAuthorization': boolean 'account.resetWebAuthorizations': boolean 'account.getAllSecureValues': tl.TypeSecureValue[] 'account.getSecureValue': tl.TypeSecureValue[] 'account.saveSecureValue': tl.TypeSecureValue 'account.deleteSecureValue': boolean 'account.getAuthorizationForm': tl.account.TypeAuthorizationForm 'account.acceptAuthorization': boolean 'account.sendVerifyPhoneCode': tl.auth.TypeSentCode 'account.verifyPhone': boolean 'account.sendVerifyEmailCode': tl.account.TypeSentEmailCode 'account.verifyEmail': tl.account.TypeEmailVerified 'account.initTakeoutSession': tl.account.TypeTakeout 'account.finishTakeoutSession': boolean 'account.confirmPasswordEmail': boolean 'account.resendPasswordEmail': boolean 'account.cancelPasswordEmail': boolean 'account.getContactSignUpNotification': boolean 'account.setContactSignUpNotification': boolean 'account.getNotifyExceptions': tl.TypeUpdates 'account.getWallPaper': tl.TypeWallPaper 'account.uploadWallPaper': tl.TypeWallPaper 'account.saveWallPaper': boolean 'account.installWallPaper': boolean 'account.resetWallPapers': boolean 'account.getAutoDownloadSettings': tl.account.TypeAutoDownloadSettings 'account.saveAutoDownloadSettings': boolean 'account.uploadTheme': tl.TypeDocument 'account.createTheme': tl.TypeTheme 'account.updateTheme': tl.TypeTheme 'account.saveTheme': boolean 'account.installTheme': boolean 'account.getTheme': tl.TypeTheme 'account.getThemes': tl.account.TypeThemes 'account.setContentSettings': boolean 'account.getContentSettings': tl.account.TypeContentSettings 'account.getMultiWallPapers': tl.TypeWallPaper[] 'account.getGlobalPrivacySettings': tl.TypeGlobalPrivacySettings 'account.setGlobalPrivacySettings': tl.TypeGlobalPrivacySettings 'account.reportProfilePhoto': boolean 'account.resetPassword': tl.account.TypeResetPasswordResult 'account.declinePasswordReset': boolean 'account.getChatThemes': tl.account.TypeThemes 'account.setAuthorizationTTL': boolean 'account.changeAuthorizationSettings': boolean 'account.getSavedRingtones': tl.account.TypeSavedRingtones 'account.saveRingtone': tl.account.TypeSavedRingtone 'account.uploadRingtone': tl.TypeDocument 'account.updateEmojiStatus': boolean 'account.getDefaultEmojiStatuses': tl.account.TypeEmojiStatuses 'account.getRecentEmojiStatuses': tl.account.TypeEmojiStatuses 'account.clearRecentEmojiStatuses': boolean 'account.reorderUsernames': boolean 'account.toggleUsername': boolean 'account.getDefaultProfilePhotoEmojis': tl.TypeEmojiList 'account.getDefaultGroupPhotoEmojis': tl.TypeEmojiList 'account.getAutoSaveSettings': tl.account.TypeAutoSaveSettings 'account.saveAutoSaveSettings': boolean 'account.deleteAutoSaveExceptions': boolean 'account.invalidateSignInCodes': boolean 'account.updateColor': boolean 'account.getDefaultBackgroundEmojis': tl.TypeEmojiList 'account.getChannelDefaultEmojiStatuses': tl.account.TypeEmojiStatuses 'account.getChannelRestrictedStatusEmojis': tl.TypeEmojiList 'account.updateBusinessWorkHours': boolean 'account.updateBusinessLocation': boolean 'account.updateBusinessGreetingMessage': boolean 'account.updateBusinessAwayMessage': boolean 'account.updateConnectedBot': tl.TypeUpdates 'account.getConnectedBots': tl.account.TypeConnectedBots 'account.getBotBusinessConnection': tl.TypeUpdates 'account.updateBusinessIntro': boolean 'account.toggleConnectedBotPaused': boolean 'account.disablePeerConnectedBot': boolean 'account.updateBirthday': boolean 'account.createBusinessChatLink': tl.TypeBusinessChatLink 'account.editBusinessChatLink': tl.TypeBusinessChatLink 'account.deleteBusinessChatLink': boolean 'account.getBusinessChatLinks': tl.account.TypeBusinessChatLinks 'account.resolveBusinessChatLink': tl.account.TypeResolvedBusinessChatLinks 'account.updatePersonalChannel': boolean 'account.toggleSponsoredMessages': boolean 'account.getReactionsNotifySettings': tl.TypeReactionsNotifySettings 'account.setReactionsNotifySettings': tl.TypeReactionsNotifySettings 'account.getCollectibleEmojiStatuses': tl.account.TypeEmojiStatuses 'account.getPaidMessagesRevenue': tl.account.TypePaidMessagesRevenue 'account.toggleNoPaidMessagesException': boolean 'account.setMainProfileTab': boolean 'account.saveMusic': boolean 'account.getSavedMusicIds': tl.account.TypeSavedMusicIds 'account.getUniqueGiftChatThemes': tl.account.TypeChatThemes 'account.initPasskeyRegistration': tl.account.TypePasskeyRegistrationOptions 'account.registerPasskey': tl.TypePasskey 'account.getPasskeys': tl.account.TypePasskeys 'account.deletePasskey': boolean } /** * Privacy rules */ type TypePrivacyRules = tl.account.RawPrivacyRules function isAnyPrivacyRules(o: object): o is TypePrivacyRules /** * Logged-in sessions */ type TypeAuthorizations = tl.account.RawAuthorizations function isAnyAuthorizations(o: object): o is TypeAuthorizations /** * Configuration for two-factor authorization */ type TypePassword = tl.account.RawPassword function isAnyPassword(o: object): o is TypePassword /** * Private info associated to the password info (recovery * email, telegram * passport * info & so on) */ type TypePasswordSettings = tl.account.RawPasswordSettings function isAnyPasswordSettings(o: object): o is TypePasswordSettings /** * Constructor for setting up a new * 2FA SRP * password */ type TypePasswordInputSettings = tl.account.RawPasswordInputSettings function isAnyPasswordInputSettings(o: object): o is TypePasswordInputSettings /** * Temporary password */ type TypeTmpPassword = tl.account.RawTmpPassword function isAnyTmpPassword(o: object): o is TypeTmpPassword /** * Web authorizations */ type TypeWebAuthorizations = tl.account.RawWebAuthorizations function isAnyWebAuthorizations(o: object): o is TypeWebAuthorizations /** * Authorization form */ type TypeAuthorizationForm = tl.account.RawAuthorizationForm function isAnyAuthorizationForm(o: object): o is TypeAuthorizationForm /** * The email code that was sent */ type TypeSentEmailCode = tl.account.RawSentEmailCode function isAnySentEmailCode(o: object): o is TypeSentEmailCode /** * Takeout info */ type TypeTakeout = tl.account.RawTakeout function isAnyTakeout(o: object): o is TypeTakeout /** * Wallpapers */ type TypeWallPapers = tl.account.RawWallPapersNotModified | tl.account.RawWallPapers function isAnyWallPapers(o: object): o is TypeWallPapers /** * Media autodownload settings */ type TypeAutoDownloadSettings = tl.account.RawAutoDownloadSettings function isAnyAutoDownloadSettings(o: object): o is TypeAutoDownloadSettings /** * Installed themes */ type TypeThemes = tl.account.RawThemesNotModified | tl.account.RawThemes function isAnyThemes(o: object): o is TypeThemes /** * Sensitive content settings */ type TypeContentSettings = tl.account.RawContentSettings function isAnyContentSettings(o: object): o is TypeContentSettings /** * Result of an {@link account.RawResetPasswordRequest} * request. */ type TypeResetPasswordResult = tl.account.RawResetPasswordFailedWait | tl.account.RawResetPasswordRequestedWait | tl.account.RawResetPasswordOk function isAnyResetPasswordResult(o: object): o is TypeResetPasswordResult /** * Available chat themes */ type TypeChatThemes = tl.account.RawChatThemesNotModified | tl.account.RawChatThemes function isAnyChatThemes(o: object): o is TypeChatThemes /** * Contains a list of saved notification sounds */ type TypeSavedRingtones = tl.account.RawSavedRingtonesNotModified | tl.account.RawSavedRingtones function isAnySavedRingtones(o: object): o is TypeSavedRingtones /** * Contains information about a saved notification sound */ type TypeSavedRingtone = tl.account.RawSavedRingtone | tl.account.RawSavedRingtoneConverted function isAnySavedRingtone(o: object): o is TypeSavedRingtone /** * A list of * emoji * statuses */ type TypeEmojiStatuses = tl.account.RawEmojiStatusesNotModified | tl.account.RawEmojiStatuses function isAnyEmojiStatuses(o: object): o is TypeEmojiStatuses /** * Email verification status */ type TypeEmailVerified = tl.account.RawEmailVerified | tl.account.RawEmailVerifiedLogin function isAnyEmailVerified(o: object): o is TypeEmailVerified /** * Contains media autosave settings */ type TypeAutoSaveSettings = tl.account.RawAutoSaveSettings function isAnyAutoSaveSettings(o: object): o is TypeAutoSaveSettings /** * Info about currently connected * business * bots. */ type TypeConnectedBots = tl.account.RawConnectedBots function isAnyConnectedBots(o: object): o is TypeConnectedBots /** * Contains info about * business * chat deep links » created by the current account. */ type TypeBusinessChatLinks = tl.account.RawBusinessChatLinks function isAnyBusinessChatLinks(o: object): o is TypeBusinessChatLinks /** * Contains info about a single resolved * business * chat deep link ». */ type TypeResolvedBusinessChatLinks = tl.account.RawResolvedBusinessChatLinks function isAnyResolvedBusinessChatLinks(o: object): o is TypeResolvedBusinessChatLinks /** * Total number of non-refunded * Telegram * Stars a user has spent on sending us messages either * directly or through a channel, see * here * » for more info on paid messages. */ type TypePaidMessagesRevenue = tl.account.RawPaidMessagesRevenue function isAnyPaidMessagesRevenue(o: object): o is TypePaidMessagesRevenue /** * List of IDs of songs ({@link RawDocument}.ids) * currently pinned on our profile, see * here * » for more info. */ type TypeSavedMusicIds = tl.account.RawSavedMusicIdsNotModified | tl.account.RawSavedMusicIds function isAnySavedMusicIds(o: object): o is TypeSavedMusicIds type TypePasskeys = tl.account.RawPasskeys function isAnyPasskeys(o: object): o is TypePasskeys type TypePasskeyRegistrationOptions = tl.account.RawPasskeyRegistrationOptions function isAnyPasskeyRegistrationOptions(o: object): o is TypePasskeyRegistrationOptions } namespace channels { /** * Represents multiple channel participants */ interface RawChannelParticipants { _: 'channels.channelParticipants'; /** * Total number of participants that correspond to the given * query */ count: number; /** * Participants */ participants: tl.TypeChannelParticipant[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Users mentioned in participant info */ users: tl.TypeUser[]; } /** * No new participant info could be found */ interface RawChannelParticipantsNotModified { _: 'channels.channelParticipantsNotModified'; } /** * Represents a channel participant */ interface RawChannelParticipant { _: 'channels.channelParticipant'; /** * The channel participant */ participant: tl.TypeChannelParticipant; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Users */ users: tl.TypeUser[]; } /** * Admin log events */ interface RawAdminLogResults { _: 'channels.adminLogResults'; /** * Admin log events */ events: tl.TypeChannelAdminLogEvent[]; /** * Chats mentioned in events */ chats: tl.TypeChat[]; /** * Users mentioned in events */ users: tl.TypeUser[]; } /** * A list of peers that can be used to send messages in a * specific group */ interface RawSendAsPeers { _: 'channels.sendAsPeers'; /** * Peers that can be used to send messages to the group */ peers: tl.TypeSendAsPeer[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * The user must choose a report option from the localized * options available in options, and after * selection, {@link messages.RawReportSponsoredMessageRequest} * must be invoked again, passing the option's * option field to the option param * of the method. */ interface RawSponsoredMessageReportResultChooseOption { _: 'channels.sponsoredMessageReportResultChooseOption'; /** * Title of the option selection popup. */ title: string; /** * Localized list of options. */ options: tl.TypeSponsoredMessageReportOption[]; } /** * Sponsored messages were hidden for the user in all chats. */ interface RawSponsoredMessageReportResultAdsHidden { _: 'channels.sponsoredMessageReportResultAdsHidden'; } /** * The sponsored message was reported successfully. */ interface RawSponsoredMessageReportResultReported { _: 'channels.sponsoredMessageReportResultReported'; } /** * Mark * channel/supergroup * history as read * * RPC method returns boolean */ interface RawReadHistoryRequest { _: 'channels.readHistory'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * ID of message up to which messages should be marked as read */ maxId: number; } /** * Delete messages in a * channel/supergroup * * RPC method returns {@link tl.messages.TypeAffectedMessages} */ interface RawDeleteMessagesRequest { _: 'channels.deleteMessages'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * IDs of messages to delete */ id: number[]; } /** * Reports some messages from a user in a supergroup as spam; * requires administrator rights in the supergroup * * RPC method returns boolean */ interface RawReportSpamRequest { _: 'channels.reportSpam'; /** * Supergroup */ channel: tl.TypeInputChannel; /** * Participant whose messages should be reported */ participant: tl.TypeInputPeer; /** * IDs of spam messages */ id: number[]; } /** * Get * channel/supergroup * messages * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawGetMessagesRequest { _: 'channels.getMessages'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * IDs of messages to get */ id: tl.TypeInputMessage[]; } /** * Get the participants of a * supergroup/channel * * RPC method returns * {@link tl.channels.TypeChannelParticipants} */ interface RawGetParticipantsRequest { _: 'channels.getParticipants'; /** * Channel */ channel: tl.TypeInputChannel; /** * Which participant types to fetch */ filter: tl.TypeChannelParticipantsFilter; /** * Offset */ offset: number; /** * Limit */ limit: number; /** * Hash */ hash: Long; } /** * Get info about a * channel/supergroup * participant * * RPC method returns * {@link tl.channels.TypeChannelParticipant} */ interface RawGetParticipantRequest { _: 'channels.getParticipant'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * Participant to get info about */ participant: tl.TypeInputPeer; } /** * Get info about * channels/supergroups * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetChannelsRequest { _: 'channels.getChannels'; /** * IDs of channels/supergroups to get info about */ id: tl.TypeInputChannel[]; } /** * Get full info about a * supergroup, * gigagroup * or * channel * * RPC method returns {@link tl.messages.TypeChatFull} */ interface RawGetFullChannelRequest { _: 'channels.getFullChannel'; /** * The * channel, * supergroup * or * gigagroup * to get info about */ channel: tl.TypeInputChannel; } /** * Create a * supergroup/channel. * * RPC method returns {@link tl.TypeUpdates} */ interface RawCreateChannelRequest { _: 'channels.createChannel'; /** * Whether to create a * channel */ broadcast?: boolean; /** * Whether to create a * supergroup */ megagroup?: boolean; /** * Whether the supergroup is being created to import messages * from a foreign chat service using * {@link messages.RawInitHistoryImportRequest} */ forImport?: boolean; /** * Whether to create a * forum */ forum?: boolean; /** * Channel title */ title: string; /** * Channel description */ about: string; /** * Geogroup location, see * here * » for more info on geogroups. */ geoPoint?: tl.TypeInputGeoPoint; /** * Geogroup address, see * here * » 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 * {@link messages.RawSetDefaultHistoryTTLRequest} to edit this * value later. */ ttlPeriod?: number; } /** * Modify the admin rights of a user in a * supergroup/channel. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditAdminRequest { _: 'channels.editAdmin'; /** * The * supergroup/channel. */ channel: tl.TypeInputChannel; /** * The ID of the user whose admin rights should be modified */ userId: tl.TypeInputUser; /** * The admin rights */ adminRights: tl.TypeChatAdminRights; /** * Indicates the role (rank) of the admin in the group: just an * arbitrary string */ rank?: string; } /** * Edit the name of a * channel/supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditTitleRequest { _: 'channels.editTitle'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * New name */ title: string; } /** * Change the photo of a * channel/supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditPhotoRequest { _: 'channels.editPhoto'; /** * Channel/supergroup whose photo should be edited */ channel: tl.TypeInputChannel; /** * New photo */ photo: tl.TypeInputChatPhoto; } /** * Check if a username is free and can be assigned to a * channel/supergroup * * RPC method returns boolean */ interface RawCheckUsernameRequest { _: 'channels.checkUsername'; /** * The * channel/supergroup * that will assigned the specified username */ channel: tl.TypeInputChannel; /** * The username to check */ username: string; } /** * Change or remove the username of a supergroup/channel * * RPC method returns boolean */ interface RawUpdateUsernameRequest { _: 'channels.updateUsername'; /** * Channel */ channel: tl.TypeInputChannel; /** * New username, pass an empty string to remove the username */ username: string; } /** * Join a channel/supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawJoinChannelRequest { _: 'channels.joinChannel'; /** * Channel/supergroup to join */ channel: tl.TypeInputChannel; } /** * Leave a * channel/supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawLeaveChannelRequest { _: 'channels.leaveChannel'; /** * Channel/supergroup * to leave */ channel: tl.TypeInputChannel; } /** * Invite users to a channel/supergroup * * RPC method returns {@link tl.messages.TypeInvitedUsers} */ interface RawInviteToChannelRequest { _: 'channels.inviteToChannel'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * Users to invite */ users: tl.TypeInputUser[]; } /** * Delete a * channel/supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteChannelRequest { _: 'channels.deleteChannel'; /** * Channel/supergroup * to delete */ channel: tl.TypeInputChannel; } /** * Get link and embed info of a message in a * channel/supergroup * * RPC method returns {@link tl.TypeExportedMessageLink} */ interface RawExportMessageLinkRequest { _: 'channels.exportMessageLink'; /** * Whether to include other grouped media (for albums) */ grouped?: boolean; /** * Whether to also include a thread ID, if available, inside of * the link */ thread?: boolean; /** * Channel */ channel: tl.TypeInputChannel; /** * Message ID */ id: number; } /** * Enable/disable message signatures in channels * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleSignaturesRequest { _: 'channels.toggleSignatures'; /** * If set, enables message signatures. */ signaturesEnabled?: boolean; /** * If set, messages from channel admins will link to their * profiles, just like for group messages: can only be set if * the signatures_enabled flag is set. */ profilesEnabled?: boolean; /** * Channel */ channel: tl.TypeInputChannel; } /** * Get * channels/supergroups/geogroups * we're admin in. Usually called when the user exceeds the * {@link RawConfig} for owned public * channels/supergroups/geogroups, * and the user is given the choice to remove one of their * channels/supergroups/geogroups. * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetAdminedPublicChannelsRequest { _: 'channels.getAdminedPublicChannels'; /** * Get geogroups */ byLocation?: boolean; /** * If set and the user has reached the limit of owned public * channels/supergroups/geogroups, * instead of returning the channel list one of the specified * 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 * {@link channels.RawCheckUsernameRequest}/{@linkƒchannels.RawUpdateUsernameRequest}. */ checkLimit?: boolean; /** * Set this flag to only fetch the full list of channels that * may be passed to * {@link account.RawUpdatePersonalChannelRequest} to * display * them on our profile page. */ forPersonal?: boolean; } /** * Ban/unban/kick a user in a * supergroup/channel. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditBannedRequest { _: 'channels.editBanned'; /** * The * supergroup/channel. */ channel: tl.TypeInputChannel; /** * Participant to ban */ participant: tl.TypeInputPeer; /** * The banned rights */ bannedRights: tl.TypeChatBannedRights; } /** * Get the admin log of a * channel/supergroup * * RPC method returns {@link tl.channels.TypeAdminLogResults} */ interface RawGetAdminLogRequest { _: 'channels.getAdminLog'; /** * Channel */ channel: tl.TypeInputChannel; /** * Search query, can be empty */ q: string; /** * Event filter */ eventsFilter?: tl.TypeChannelAdminLogEventsFilter; /** * Only show events from these admins */ admins?: tl.TypeInputUser[]; /** * Maximum ID of message to return (see * pagination) */ maxId: Long; /** * Minimum ID of message to return (see * pagination) */ minId: Long; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Associate a stickerset to the supergroup * * RPC method returns boolean */ interface RawSetStickersRequest { _: 'channels.setStickers'; /** * Supergroup */ channel: tl.TypeInputChannel; /** * The stickerset to associate */ stickerset: tl.TypeInputStickerSet; } /** * Mark * channel/supergroup * message contents as read, emitting an * {@link RawUpdateChannelReadMessagesContents}. * * RPC method returns boolean */ interface RawReadMessageContentsRequest { _: 'channels.readMessageContents'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * IDs of messages whose contents should be marked as read */ id: number[]; } /** * Delete the history of a * supergroup * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteHistoryRequest { _: 'channels.deleteHistory'; /** * Whether the history should be deleted for everyone */ forEveryone?: boolean; /** * Supergroup * whose history must be deleted */ channel: tl.TypeInputChannel; /** * ID of message up to which the history must * be deleted */ maxId: number; } /** * Hide/unhide message history for new channel/supergroup users * * RPC method returns {@link tl.TypeUpdates} */ interface RawTogglePreHistoryHiddenRequest { _: 'channels.togglePreHistoryHidden'; /** * Channel/supergroup */ channel: tl.TypeInputChannel; /** * Hide/unhide */ enabled: boolean; } /** * Get a list of * channels/supergroups * we left, requires a * takeout * session, see here » for more info. * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetLeftChannelsRequest { _: 'channels.getLeftChannels'; /** * Offset for * pagination */ offset: number; } /** * Get all groups that can be used as * discussion * groups. * * Returned * basic * group chats must be first upgraded to * supergroups * before they can be set as a discussion group. * * * To set a returned supergroup as a discussion group, access * to its old messages must be enabled using * {@link channels.RawTogglePreHistoryHiddenRequest}, first. * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetGroupsForDiscussionRequest { _: 'channels.getGroupsForDiscussion'; } /** * Associate a group to a channel as * discussion * group for that channel * * RPC method returns boolean */ interface RawSetDiscussionGroupRequest { _: 'channels.setDiscussionGroup'; /** * Channel */ broadcast: tl.TypeInputChannel; /** * Discussion * group to associate to the channel */ group: tl.TypeInputChannel; } /** * Edit location of geo group, see * here * » for more info on geogroups. * * RPC method returns boolean */ interface RawEditLocationRequest { _: 'channels.editLocation'; /** * Geogroup */ channel: tl.TypeInputChannel; /** * New geolocation */ geoPoint: tl.TypeInputGeoPoint; /** * Address string */ address: string; } /** * Toggle supergroup slow mode: if enabled, users will only be * able to send one message every seconds seconds * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleSlowModeRequest { _: 'channels.toggleSlowMode'; /** * The * supergroup */ channel: tl.TypeInputChannel; /** * Users will only be able to send one message every * seconds seconds, 0 to disable the * limitation */ seconds: number; } /** * Get inactive channels and supergroups * * RPC method returns {@link tl.messages.TypeInactiveChats} */ interface RawGetInactiveChannelsRequest { _: 'channels.getInactiveChannels'; } /** * Convert a * supergroup * to a * gigagroup, * when requested by * channel * suggestions. * * RPC method returns {@link tl.TypeUpdates} */ interface RawConvertToGigagroupRequest { _: 'channels.convertToGigagroup'; /** * The * supergroup * to convert */ channel: tl.TypeInputChannel; } /** * Obtains a list of peers that can be used to send messages in * a specific group * * RPC method returns {@link tl.channels.TypeSendAsPeers} */ interface RawGetSendAsRequest { _: 'channels.getSendAs'; /** * If set, fetches the list of peers that can be used to send * paid * reactions to messages of a specific peer. */ forPaidReactions?: boolean; forLiveStories?: boolean; /** * The group where we intend to send messages */ peer: tl.TypeInputPeer; } /** * Delete all messages sent by a specific participant of a * given supergroup * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawDeleteParticipantHistoryRequest { _: 'channels.deleteParticipantHistory'; /** * Supergroup */ channel: tl.TypeInputChannel; /** * The participant whose messages should be deleted */ participant: tl.TypeInputPeer; } /** * Set whether all users * should * join a discussion group in order to comment on a post » * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleJoinToSendRequest { _: 'channels.toggleJoinToSend'; /** * Discussion group */ channel: tl.TypeInputChannel; /** * Toggle */ enabled: boolean; } /** * Set whether all users should * request * admin approval to join the group ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleJoinRequestRequest { _: 'channels.toggleJoinRequest'; /** * Group */ channel: tl.TypeInputChannel; /** * Toggle */ enabled: boolean; } /** * Reorder active usernames * * RPC method returns boolean */ interface RawReorderUsernamesRequest { _: 'channels.reorderUsernames'; /** * The supergroup or channel */ channel: tl.TypeInputChannel; /** * The new order for active usernames. All active usernames * must be specified. */ order: string[]; } /** * Activate or deactivate a purchased * fragment.com username * associated to a * supergroup * or channel we own. * * RPC method returns boolean */ interface RawToggleUsernameRequest { _: 'channels.toggleUsername'; /** * Supergroup * or channel */ channel: tl.TypeInputChannel; /** * Username */ username: string; /** * Whether to activate or deactivate the username */ active: boolean; } /** * Disable all purchased usernames of a supergroup or channel * * RPC method returns boolean */ interface RawDeactivateAllUsernamesRequest { _: 'channels.deactivateAllUsernames'; /** * Supergroup or channel */ channel: tl.TypeInputChannel; } /** * Enable or disable * forum * functionality in a supergroup. * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleForumRequest { _: 'channels.toggleForum'; /** * Supergroup ID */ channel: tl.TypeInputChannel; /** * Enable or disable forum functionality */ enabled: boolean; /** * If true enables the tabbed forum UI, otherwise enables the * list-based forum UI. */ tabs: boolean; } /** * Enable or disable the * native * antispam system. * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleAntiSpamRequest { _: 'channels.toggleAntiSpam'; /** * 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. */ channel: tl.TypeInputChannel; /** * Enable or disable the native antispam system. */ enabled: boolean; } /** * Report a * native * antispam false positive * * RPC method returns boolean */ interface RawReportAntiSpamFalsePositiveRequest { _: 'channels.reportAntiSpamFalsePositive'; /** * Supergroup ID */ channel: tl.TypeInputChannel; /** * Message ID that was mistakenly deleted by the * native * antispam system, taken from the * admin * log */ msgId: number; } /** * Hide or display the participants list in a * supergroup. * * The supergroup must have at least * hidden_members_group_size_min participants in * order to use this method, as specified by the * client * configuration parameters ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleParticipantsHiddenRequest { _: 'channels.toggleParticipantsHidden'; /** * Supergroup ID */ channel: tl.TypeInputChannel; /** * If true, will hide the participants list; otherwise will * unhide it. */ enabled: boolean; } /** * Update the * accent * color and background custom emoji » of a channel. * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdateColorRequest { _: 'channels.updateColor'; /** * Whether to change the accent color emoji pattern of the * profile page; otherwise, the accent color and emoji pattern * of messages will be changed. * * Channels can change both message and profile palettes; * supergroups can only change the profile palette, of course * after reaching the * appropriate * boost level. */ forProfile?: boolean; /** * Channel whose accent color should be changed. */ channel: tl.TypeInputChannel; /** * ID of the * accent color palette » to use (not RGB24, see * here * » for more info); if not set, the default palette is * used. */ color?: number; /** * Custom emoji ID used in the accent color pattern. */ backgroundEmojiId?: Long; } /** * Users may also choose to display messages from all topics of * a * 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. * * Invoking this method will update the value of the * view_forum_as_messages flag of * {@link RawChannelFull} or {@linkƒRawDialog} and emit an * {@link RawUpdateChannelViewForumAsMessages}. * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleViewForumAsMessagesRequest { _: 'channels.toggleViewForumAsMessages'; /** * The forum */ channel: tl.TypeInputChannel; /** * The new value of the view_forum_as_messages * flag. */ enabled: boolean; } /** * Obtain a list of similarly themed public channels, selected * based on similarities in their subscriber * bases. * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetChannelRecommendationsRequest { _: 'channels.getChannelRecommendations'; /** * The method will return channels related to the passed * channel. If not set, the method will returns * channels related to channels the user has joined. */ channel?: tl.TypeInputChannel; } /** * Set an * emoji * status for a channel or supergroup. * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdateEmojiStatusRequest { _: 'channels.updateEmojiStatus'; /** * The channel/supergroup, must have at least * channel_emoji_status_level_min/group_emoji_status_level_min * boosts. */ channel: tl.TypeInputChannel; /** * Emoji * status to set */ emojiStatus: tl.TypeEmojiStatus; } /** * Admins with {@link RawChatAdminRights} may allow users that * apply a certain number of * booosts * » to the group to bypass * {@link channels.RawToggleSlowModeRequest} and * other * » supergroup restrictions, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetBoostsToUnblockRestrictionsRequest { _: 'channels.setBoostsToUnblockRestrictions'; /** * The supergroup. */ channel: tl.TypeInputChannel; /** * The number of required boosts (1-8, 0 to disable). */ boosts: number; } /** * Set a * custom * emoji stickerset for supergroups. Only usable after * reaching at least the * boost * level » specified in the * group_emoji_stickers_level_min * » config parameter. * * RPC method returns boolean */ interface RawSetEmojiStickersRequest { _: 'channels.setEmojiStickers'; /** * The supergroup */ channel: tl.TypeInputChannel; /** * The custom emoji stickerset to associate to the supergroup */ stickerset: tl.TypeInputStickerSet; } /** * Disable ads on the specified channel, for all users. * * Available only after reaching at least the * boost * level » specified in the * channel_restrict_sponsored_level_min * » config parameter. * * RPC method returns {@link tl.TypeUpdates} */ interface RawRestrictSponsoredMessagesRequest { _: 'channels.restrictSponsoredMessages'; /** * The channel. */ channel: tl.TypeInputChannel; /** * Whether to disable or re-enable ads. */ restricted: boolean; } /** * Globally search for posts from public * channels * » (including those we aren't a member of) * containing either a specific hashtag, or a full * text query. * * Exactly one of query and hashtag * must be set. * * RPC method returns {@link tl.messages.TypeMessages} */ interface RawSearchPostsRequest { _: 'channels.searchPosts'; /** * The hashtag to search, without the # character. */ hashtag?: string; /** * The full text query: each user has a limited amount of free * full text search slots, after which payment is required, see * here * » for more info on the full flow. */ query?: string; /** * Initially 0, then set to the * {@link messages.RawMessagesSlice}, or if that is absent, the * date of the last returned message. */ offsetRate: number; /** * Offsets * for pagination, for more info click here */ offsetPeer: tl.TypeInputPeer; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * For full text post searches (query), allows * payment of the specified amount of Stars for the search, see * here * » for more info on the full flow. */ allowPaidStars?: Long; } /** * Enable or disable * paid * messages » in this * supergroup * or * monoforum. * * Also used to * enable * or disable monoforums aka direct messages in a channel. * * Note that passing the ID of the monoforum itself to * channel will return a * CHANNEL_MONOFORUM_UNSUPPORTED error: pass the * ID of the associated channel to edit the settings of the * associated monoforum, instead. * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdatePaidMessagesPriceRequest { _: 'channels.updatePaidMessagesPrice'; /** * Only usable for channels, enables or disables the associated * monoforum * aka direct messages. */ broadcastMessagesAllowed?: boolean; /** * Pass the supergroup ID for supergroups and the ID of the * channel * to modify the setting in the associated monoforum. */ channel: tl.TypeInputChannel; /** * Specifies the required amount of * Telegram * Stars users must pay to send messages to the supergroup * or monoforum. */ sendPaidMessagesStars: Long; } /** * Toggle autotranslation in a channel, for all users: see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleAutotranslationRequest { _: 'channels.toggleAutotranslation'; /** * The channel where to toggle autotranslation. */ channel: tl.TypeInputChannel; /** * Whether to enable or disable autotranslation. */ enabled: boolean; } /** * Can only be invoked by non-bot admins of a * monoforum * », obtains the original sender of a message sent by * other monoforum admins to the monoforum, on behalf of the * channel associated to the monoforum. * * RPC method returns {@link tl.TypeUser} */ interface RawGetMessageAuthorRequest { _: 'channels.getMessageAuthor'; /** * ID of the monoforum. */ channel: tl.TypeInputChannel; /** * ID of the message sent by a monoforum admin. */ id: number; } /** * Check if the specified * global * post search » requires payment. * * RPC method returns {@link tl.TypeSearchPostsFlood} */ interface RawCheckSearchPostsFloodRequest { _: 'channels.checkSearchPostsFlood'; /** * The query. */ query?: string; } /** * Changes the main profile tab of a channel, see * here * » for more info. * * RPC method returns boolean */ interface RawSetMainProfileTabRequest { _: 'channels.setMainProfileTab'; /** * The channel. */ channel: tl.TypeInputChannel; /** * The tab to set as main tab. */ tab: tl.TypeProfileTab; } /** * Transfer channel ownership * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditCreatorRequest { _: 'channels.editCreator'; /** * Channel */ channel: tl.TypeInputChannel; /** * New channel owner */ userId: tl.TypeInputUser; /** * 2FA * password of account */ password: tl.TypeInputCheckPasswordSRP; } /** * Create a * forum * topic; requires * manage_topics * rights. * * RPC method returns {@link tl.TypeUpdates} */ interface RawCreateForumTopicRequest { _: 'channels.createForumTopic'; /** * The * forum */ channel: tl.TypeInputChannel; /** * 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. */ iconColor?: number; /** * ID of the * custom * emoji used as topic icon. * Telegram * Premium users can use any custom emoji, other users can * only use the custom emojis contained in the * {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack. */ iconEmojiId?: Long; /** * Unique client message ID to prevent duplicate sending of the * same event */ randomId: Long; /** * Create the topic as the specified peer */ sendAs?: tl.TypeInputPeer; } /** * Get topics * of a forum * * RPC method returns {@link tl.messages.TypeForumTopics} */ interface RawGetForumTopicsRequest { _: 'channels.getForumTopics'; /** * Supergroup */ channel: tl.TypeInputChannel; /** * Search query */ q?: string; /** * Offsets * for pagination, for more info click here, 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. */ offsetDate: number; /** * Offsets * for pagination, for more info click here, ID of the last * message of the last found topic (or initially * 0). */ offsetId: number; /** * Offsets * for pagination, for more info click here, ID of the last * found topic (or initially 0). */ offsetTopic: number; /** * Maximum number of results to return, * see * pagination. For optimal performance, the number of * returned topics is chosen by the server and can be smaller * than the specified limit. */ limit: number; } /** * Get forum topics by their ID * * RPC method returns {@link tl.messages.TypeForumTopics} */ interface RawGetForumTopicsByIDRequest { _: 'channels.getForumTopicsByID'; /** * Forum */ channel: tl.TypeInputChannel; /** * Topic IDs */ topics: number[]; } /** * Edit forum * topic; requires * manage_topics * rights. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditForumTopicRequest { _: 'channels.editForumTopic'; /** * Supergroup */ channel: tl.TypeInputChannel; /** * Topic ID */ topicId: number; /** * If present, will update the topic title (maximum UTF-8 * length: 128). */ title?: string; /** * If present, updates the * custom * emoji used as topic icon. * Telegram * Premium users can use any custom emoji, other users can * only use the custom emojis contained in the * {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack. * Pass 0 to switch to the fallback topic icon. */ iconEmojiId?: Long; /** * 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; } /** * Pin or unpin * forum * topics * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdatePinnedForumTopicRequest { _: 'channels.updatePinnedForumTopic'; /** * Supergroup ID */ channel: tl.TypeInputChannel; /** * Forum * topic ID */ topicId: number; /** * Whether to pin or unpin the topic */ pinned: boolean; } /** * Delete message history of a * forum * topic * * RPC method returns {@link tl.messages.TypeAffectedHistory} */ interface RawDeleteTopicHistoryRequest { _: 'channels.deleteTopicHistory'; /** * Forum */ channel: tl.TypeInputChannel; /** * Topic ID */ topMsgId: number; } /** * Reorder pinned forum topics * * RPC method returns {@link tl.TypeUpdates} */ interface RawReorderPinnedForumTopicsRequest { _: 'channels.reorderPinnedForumTopics'; /** * 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?: boolean; /** * Supergroup ID */ channel: tl.TypeInputChannel; /** * Topic IDs * » */ order: number[]; } /** * RPC method returns {@link tl.TypeUser} */ interface RawGetFutureCreatorAfterLeaveRequest { _: 'channels.getFutureCreatorAfterLeave'; channel: tl.TypeInputChannel; } interface RpcCallReturn { 'channels.readHistory': boolean 'channels.deleteMessages': tl.messages.TypeAffectedMessages 'channels.reportSpam': boolean 'channels.getMessages': tl.messages.TypeMessages 'channels.getParticipants': tl.channels.TypeChannelParticipants 'channels.getParticipant': tl.channels.TypeChannelParticipant 'channels.getChannels': tl.messages.TypeChats 'channels.getFullChannel': tl.messages.TypeChatFull 'channels.createChannel': tl.TypeUpdates 'channels.editAdmin': tl.TypeUpdates 'channels.editTitle': tl.TypeUpdates 'channels.editPhoto': tl.TypeUpdates 'channels.checkUsername': boolean 'channels.updateUsername': boolean 'channels.joinChannel': tl.TypeUpdates 'channels.leaveChannel': tl.TypeUpdates 'channels.inviteToChannel': tl.messages.TypeInvitedUsers 'channels.deleteChannel': tl.TypeUpdates 'channels.exportMessageLink': tl.TypeExportedMessageLink 'channels.toggleSignatures': tl.TypeUpdates 'channels.getAdminedPublicChannels': tl.messages.TypeChats 'channels.editBanned': tl.TypeUpdates 'channels.getAdminLog': tl.channels.TypeAdminLogResults 'channels.setStickers': boolean 'channels.readMessageContents': boolean 'channels.deleteHistory': tl.TypeUpdates 'channels.togglePreHistoryHidden': tl.TypeUpdates 'channels.getLeftChannels': tl.messages.TypeChats 'channels.getGroupsForDiscussion': tl.messages.TypeChats 'channels.setDiscussionGroup': boolean 'channels.editLocation': boolean 'channels.toggleSlowMode': tl.TypeUpdates 'channels.getInactiveChannels': tl.messages.TypeInactiveChats 'channels.convertToGigagroup': tl.TypeUpdates 'channels.getSendAs': tl.channels.TypeSendAsPeers 'channels.deleteParticipantHistory': tl.messages.TypeAffectedHistory 'channels.toggleJoinToSend': tl.TypeUpdates 'channels.toggleJoinRequest': tl.TypeUpdates 'channels.reorderUsernames': boolean 'channels.toggleUsername': boolean 'channels.deactivateAllUsernames': boolean 'channels.toggleForum': tl.TypeUpdates 'channels.toggleAntiSpam': tl.TypeUpdates 'channels.reportAntiSpamFalsePositive': boolean 'channels.toggleParticipantsHidden': tl.TypeUpdates 'channels.updateColor': tl.TypeUpdates 'channels.toggleViewForumAsMessages': tl.TypeUpdates 'channels.getChannelRecommendations': tl.messages.TypeChats 'channels.updateEmojiStatus': tl.TypeUpdates 'channels.setBoostsToUnblockRestrictions': tl.TypeUpdates 'channels.setEmojiStickers': boolean 'channels.restrictSponsoredMessages': tl.TypeUpdates 'channels.searchPosts': tl.messages.TypeMessages 'channels.updatePaidMessagesPrice': tl.TypeUpdates 'channels.toggleAutotranslation': tl.TypeUpdates 'channels.getMessageAuthor': tl.TypeUser 'channels.checkSearchPostsFlood': tl.TypeSearchPostsFlood 'channels.setMainProfileTab': boolean 'channels.editCreator': tl.TypeUpdates 'channels.createForumTopic': tl.TypeUpdates 'channels.getForumTopics': tl.messages.TypeForumTopics 'channels.getForumTopicsByID': tl.messages.TypeForumTopics 'channels.editForumTopic': tl.TypeUpdates 'channels.updatePinnedForumTopic': tl.TypeUpdates 'channels.deleteTopicHistory': tl.messages.TypeAffectedHistory 'channels.reorderPinnedForumTopics': tl.TypeUpdates 'channels.getFutureCreatorAfterLeave': tl.TypeUser } /** * Channel/supergroup participants */ type TypeChannelParticipants = tl.channels.RawChannelParticipants | tl.channels.RawChannelParticipantsNotModified function isAnyChannelParticipants(o: object): o is TypeChannelParticipants /** * Channel participant */ type TypeChannelParticipant = tl.channels.RawChannelParticipant function isAnyChannelParticipant(o: object): o is TypeChannelParticipant /** * Admin log events */ type TypeAdminLogResults = tl.channels.RawAdminLogResults function isAnyAdminLogResults(o: object): o is TypeAdminLogResults /** * A list of peers that can be used to send messages in a * specific group */ type TypeSendAsPeers = tl.channels.RawSendAsPeers function isAnySendAsPeers(o: object): o is TypeSendAsPeers /** * Status of the method call used to report a * sponsored * message ». */ type TypeSponsoredMessageReportResult = tl.channels.RawSponsoredMessageReportResultChooseOption | tl.channels.RawSponsoredMessageReportResultAdsHidden | tl.channels.RawSponsoredMessageReportResultReported function isAnySponsoredMessageReportResult(o: object): o is TypeSponsoredMessageReportResult } namespace payments { /** * Payment form */ interface RawPaymentForm { _: 'payments.paymentForm'; /** * Whether the user can choose to save credentials. */ canSaveCredentials?: boolean; /** * Indicates that the user can save payment credentials, but * only after setting up a * 2FA * password (currently the account doesn't have a * 2FA * password) */ passwordMissing?: boolean; /** * Form ID */ formId: Long; /** * Bot ID */ botId: number; /** * Form title */ title: string; /** * Description */ description: string; /** * Product photo */ photo?: tl.TypeWebDocument; /** * Invoice */ invoice: tl.TypeInvoice; /** * Payment provider ID. */ providerId: Long; /** * Payment form URL */ url: string; /** * Payment provider name. * * One of the following: * * - stripe */ nativeProvider?: 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 * * */ nativeParams?: tl.TypeDataJSON; /** * Additional payment methods */ additionalMethods?: tl.TypePaymentFormMethod[]; /** * Saved server-side order information */ savedInfo?: tl.TypePaymentRequestedInfo; /** * Contains information about saved card credentials */ savedCredentials?: tl.TypePaymentSavedCredentials[]; /** * Users */ users: tl.TypeUser[]; } /** * Represents a payment form, for payments to be using * Telegram * Stars, see here » for more info. */ interface RawPaymentFormStars { _: 'payments.paymentFormStars'; /** * Form ID. */ formId: Long; /** * Bot ID. */ botId: number; /** * Form title */ title: string; /** * Description */ description: string; /** * Product photo */ photo?: tl.TypeWebDocument; /** * Invoice */ invoice: tl.TypeInvoice; /** * Info about users mentioned in the other fields. */ users: tl.TypeUser[]; } /** * Represents a payment form for a * gift, see * here » for more info. */ interface RawPaymentFormStarGift { _: 'payments.paymentFormStarGift'; /** * Form ID. */ formId: Long; /** * Invoice */ invoice: tl.TypeInvoice; } /** * Validated user-provided info */ interface RawValidatedRequestedInfo { _: 'payments.validatedRequestedInfo'; /** * ID */ id?: string; /** * Shipping options */ shippingOptions?: tl.TypeShippingOption[]; } /** * Payment result */ interface RawPaymentResult { _: 'payments.paymentResult'; /** * Info about the payment */ updates: tl.TypeUpdates; } /** * Payment was not successful, additional verification is * needed */ interface RawPaymentVerificationNeeded { _: 'payments.paymentVerificationNeeded'; /** * URL for additional payment credentials verification */ url: string; } /** * Receipt */ interface RawPaymentReceipt { _: 'payments.paymentReceipt'; /** * Date of generation */ date: number; /** * Bot ID */ botId: number; /** * Provider ID */ providerId: Long; /** * Title */ title: string; /** * Description */ description: string; /** * Photo */ photo?: tl.TypeWebDocument; /** * Invoice */ invoice: tl.TypeInvoice; /** * Info */ info?: tl.TypePaymentRequestedInfo; /** * Selected shipping option */ shipping?: tl.TypeShippingOption; /** * Tipped amount */ tipAmount?: Long; /** * Three-letter ISO 4217 * currency * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ totalAmount: Long; /** * Payment credential name */ credentialsTitle: string; /** * Users */ users: tl.TypeUser[]; } /** * Receipt for * payment * made using Telegram Stars. */ interface RawPaymentReceiptStars { _: 'payments.paymentReceiptStars'; /** * Date of generation */ date: number; /** * Bot ID */ botId: number; /** * Title */ title: string; /** * Description */ description: string; /** * Product photo */ photo?: tl.TypeWebDocument; /** * Invoice */ invoice: tl.TypeInvoice; /** * Currency, always XTR. */ currency: string; /** * Amount of * Telegram * Stars. */ totalAmount: Long; /** * Transaction ID */ transactionId: string; /** * Info about users mentioned in the other fields. */ users: tl.TypeUser[]; } /** * Saved server-side order information */ interface RawSavedInfo { _: 'payments.savedInfo'; /** * Whether the user has some saved payment credentials */ hasSavedCredentials?: boolean; /** * Saved server-side order information */ savedInfo?: tl.TypePaymentRequestedInfo; } /** * Credit card info, provided by the card's bank(s) */ interface RawBankCardData { _: 'payments.bankCardData'; /** * Credit card title */ title: string; /** * Info URL(s) provided by the card's bank(s) */ openUrls: tl.TypeBankCardOpenUrl[]; } /** * Exported * invoice * deep link */ interface RawExportedInvoice { _: 'payments.exportedInvoice'; /** * Exported * invoice * deep link */ url: string; } /** * Contains info about a * Telegram * Premium giftcode link. */ interface RawCheckedGiftCode { _: 'payments.checkedGiftCode'; /** * Whether this giftcode was created by a * giveaway. */ viaGiveaway?: boolean; /** * The peer that created the gift code. */ fromId?: tl.TypePeer; /** * Message ID of the giveaway in the channel specified in * from_id. */ giveawayMsgId?: number; /** * The destination user of the gift. */ toId?: Long; /** * Creation date of the gift code. */ date: number; days: number; /** * When was the giftcode imported, if it was imported. */ usedDate?: number; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Contains info about an ongoing * giveaway. * * If neither the participating, * joined_too_early_date, * admin_disallowed_chat_id or * disallowed_country flags are set, the user is * not currently participating in the giveaway but could * participate by joining all the channels specified in the * {@link RawMessageMediaGiveaway}.channels field. */ interface RawGiveawayInfo { _: 'payments.giveawayInfo'; /** * The current user is participating in the giveaway. */ participating?: boolean; /** * If set, the giveaway has ended and the results are being * prepared. */ preparingResults?: boolean; /** * When was the giveaway started */ startDate: 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. */ joinedTooEarlyDate?: 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. */ adminDisallowedChatId?: Long; /** * 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). */ disallowedCountry?: string; } /** * A * giveaway * has ended. */ interface RawGiveawayInfoResults { _: 'payments.giveawayInfoResults'; /** * Whether we're one of the winners of this giveaway. */ winner?: boolean; /** * Whether the giveaway was canceled and was fully refunded. */ refunded?: boolean; /** * Start date of the giveaway */ startDate: number; /** * If we're one of the winners of this giveaway, contains the * Premium * gift code, see * here * » for more info on the full giveaway flow. */ giftCodeSlug?: string; /** * If we're one of the winners of this * Telegram * Star giveaway, the number * Telegram * Stars we won. */ starsPrize?: Long; /** * End date of the giveaway. May be bigger than the end date * specified in parameters of the giveaway. */ finishDate: number; /** * Number of winners in the giveaway */ winnersCount: number; /** * Number of winners, which activated their * gift * codes. */ activatedCount?: number; } /** * Info about the current * Telegram * Star subscriptions, balance and transaction history ». */ interface RawStarsStatus { _: 'payments.starsStatus'; /** * Current Telegram Star balance. */ balance: tl.TypeStarsAmount; /** * Info about current Telegram Star subscriptions, only * returned when invoking * {@link payments.RawGetStarsTransactionsRequest} and * {@link payments.RawGetStarsSubscriptionsRequest}. */ subscriptions?: tl.TypeStarsSubscription[]; /** * Offset for pagination of subscriptions: only usable and * returned when invoking * {@link payments.RawGetStarsSubscriptionsRequest}. */ subscriptionsNextOffset?: string; /** * The number of Telegram Stars the user should buy to be able * to extend expired subscriptions soon (i.e. the current * balance is not enough to extend all expired subscriptions). */ subscriptionsMissingBalance?: Long; /** * List of Telegram Star transactions (partial if * next_offset is set). */ history?: tl.TypeStarsTransaction[]; /** * Offset to use to fetch more transactions from the * transaction history using * {@link payments.RawGetStarsTransactionsRequest}. */ nextOffset?: string; /** * Chats mentioned in history. */ chats: tl.TypeChat[]; /** * Users mentioned in history. */ users: tl.TypeUser[]; } /** * Star * revenue statistics, see here » for more info. * * Note that all balances and currency amounts and graph values * are in Stars. */ interface RawStarsRevenueStats { _: 'payments.starsRevenueStats'; /** * For ad revenue statistics, ad impressions graph */ topHoursGraph?: tl.TypeStatsGraph; /** * Star revenue graph (number of earned stars) */ revenueGraph: tl.TypeStatsGraph; /** * Current balance, current withdrawable balance and overall * earned Telegram Stars */ status: tl.TypeStarsRevenueStatus; /** * Current conversion rate of Telegram Stars to USD */ usdRate: Double; } /** * Contains the URL to use to * withdraw * Telegram Star revenue. */ interface RawStarsRevenueWithdrawalUrl { _: 'payments.starsRevenueWithdrawalUrl'; /** * Contains the URL to use to * withdraw * Telegram Star revenue. */ url: string; } /** * Contains a URL leading to a page where the user will be able * to place ads for the channel/bot, paying using * Telegram * Stars. */ interface RawStarsRevenueAdsAccountUrl { _: 'payments.starsRevenueAdsAccountUrl'; /** * URL to open. */ url: string; } /** * The list of available * gifts * » hasn't changed. */ interface RawStarGiftsNotModified { _: 'payments.starGiftsNotModified'; } /** * Available * gifts * ». */ interface RawStarGifts { _: 'payments.starGifts'; /** * Hash * used for caching, for more info click here */ hash: number; /** * List of available gifts. */ gifts: tl.TypeStarGift[]; /** * Chats mentioned in the gifts field. */ chats: tl.TypeChat[]; /** * Users mentioned in the gifts field. */ users: tl.TypeUser[]; } /** * Active * affiliations */ interface RawConnectedStarRefBots { _: 'payments.connectedStarRefBots'; /** * Total number of active affiliations */ count: number; /** * The affiliations */ connectedBots: tl.TypeConnectedBotStarRef[]; /** * Peers mentioned in connected_bots */ users: tl.TypeUser[]; } /** * A list of suggested * mini * apps with available * affiliate * programs */ interface RawSuggestedStarRefBots { _: 'payments.suggestedStarRefBots'; /** * Total number of results (for pagination) */ count: number; /** * Suggested affiliate programs (full or partial list to be * fetched using pagination) */ suggestedBots: tl.TypeStarRefProgram[]; /** * Peers mentioned in suggested_bots */ users: tl.TypeUser[]; /** * Next offset for * pagination */ nextOffset?: string; } /** * A preview of the possible attributes (chosen randomly) a * gift » * can receive after upgrading it to a * collectible * gift », see * here * » for more info. */ interface RawStarGiftUpgradePreview { _: 'payments.starGiftUpgradePreview'; /** * Possible gift attributes */ sampleAttributes: tl.TypeStarGiftAttribute[]; prices: tl.TypeStarGiftUpgradePrice[]; nextPrices: tl.TypeStarGiftUpgradePrice[]; } /** * Represents a * collectible * gift ». */ interface RawUniqueStarGift { _: 'payments.uniqueStarGift'; /** * The {@link RawStarGiftUnique} constructor. */ gift: tl.TypeStarGift; /** * Chats mentioned in the gift field. */ chats: tl.TypeChat[]; /** * Users mentioned in the gift field. */ users: tl.TypeUser[]; } /** * Represents a list of * gifts. */ interface RawSavedStarGifts { _: 'payments.savedStarGifts'; /** * Total number of results (can be less than the returned * gifts, in which case next_offset * will be set). */ count: number; /** * Ternary value: can be not set, set&true, set&false. * * Can only be set for channels we own: the value indicates * whether we * enabled * gift notifications for this channel. */ chatNotificationsEnabled?: boolean; /** * Gifts */ gifts: tl.TypeSavedStarGift[]; /** * Offset to pass to * {@link payments.RawGetSavedStarGiftsRequest} to fetch the * next page of results. */ nextOffset?: string; /** * Channels mentioned in gifts */ chats: tl.TypeChat[]; /** * Users mentioned in gifts */ users: tl.TypeUser[]; } /** * A URL that can be used to import the exported NFT on * Fragment. */ interface RawStarGiftWithdrawalUrl { _: 'payments.starGiftWithdrawalUrl'; /** * The URL to open. */ url: string; } /** * List of gifts currently on * resale * ». */ interface RawResaleStarGifts { _: 'payments.resaleStarGifts'; /** * Total number of results. */ count: number; /** * Collectible gifts on resale (may be less than * count, in which case next_offset * will be set). */ gifts: tl.TypeStarGift[]; /** * Offset for pagination, pass this to * {@link payments.RawGetResaleStarGiftsRequest}.offset * to fetch the next results. */ nextOffset?: string; /** * Possible gift attributes, only set if * {@link payments.RawGetResaleStarGiftsRequest}.attributes_hash * is set (on the first call, it must be equal to * 0). */ attributes?: tl.TypeStarGiftAttribute[]; /** * Hash of the attributes field, pass this to * {@link payments.RawGetResaleStarGiftsRequest}.attributes_hash * to avoid returning any attributes (flag not set) if they * haven't changed. */ attributesHash?: Long; /** * Chats mentioned in the attributes. */ chats: tl.TypeChat[]; /** * Indicates the total number of gifts that have a specific * attribute, only set if * {@link payments.RawGetResaleStarGiftsRequest}.offset * is empty (since this field is not related to the current * result page but to all of them, it's only returned on the * first page). */ counters?: tl.TypeStarGiftAttributeCounter[]; /** * Users mentioned in the attributes. */ users: tl.TypeUser[]; } /** * The list of * star * gift collections » hasn't changed. */ interface RawStarGiftCollectionsNotModified { _: 'payments.starGiftCollectionsNotModified'; } /** * Represents a list of * star * gift collections ». */ interface RawStarGiftCollections { _: 'payments.starGiftCollections'; /** * Star gift collections. */ collections: tl.TypeStarGiftCollection[]; } /** * Information about the value of a * collectible * gift ». */ interface RawUniqueStarGiftValueInfo { _: 'payments.uniqueStarGiftValueInfo'; /** * If set, the last sale was completed on Fragment. */ lastSaleOnFragment?: boolean; /** * If set, the value is calculated from the * average value of sold gifts of the same type. Otherwise, it * is based on the sale price of the gift. */ valueIsAverage?: boolean; /** * Three-letter ISO 4217 * currency * code (a localized fiat currency used to represent prices and * price estimations in this constructor). */ currency: string; /** * Estimated value of the gift, in the smallest unit of the * currency specified in currency. */ value: Long; /** * Initial purchase date of the gift. */ initialSaleDate: number; /** * Initial purchase price in Stars. */ initialSaleStars: Long; /** * Initial purchase price in the smallest unit of the currency * specified in currency (automatically converted * from initial_sale_stars). */ initialSalePrice: Long; /** * Last resale date of the gift. */ lastSaleDate?: number; /** * Last resale price, in the smallest unit of the currency * specified in currency. */ lastSalePrice?: Long; /** * The current minimum price of collectible gifts of the same * type, in the smallest unit of the currency specified in * currency. */ floorPrice?: Long; /** * The current average sale price of collectible gifts of the * same type, in the smallest unit of the currency specified in * currency. */ averagePrice?: Long; /** * Number of gifts of the same type currently being resold on * Telegram. */ listedCount?: number; /** * Number of gifts of the same type currently being resold on * fragment. */ fragmentListedCount?: number; /** * Fragment link to the listing of gifts of the same type * currently being resold on fragment. */ fragmentListedUrl?: string; } /** * The specified gift can be sent. */ interface RawCheckCanSendGiftResultOk { _: 'payments.checkCanSendGiftResultOk'; } /** * The specified gift cannot be sent yet for the specified * reason. */ interface RawCheckCanSendGiftResultFail { _: 'payments.checkCanSendGiftResultFail'; /** * The reason why it can't be sent yet. */ reason: tl.TypeTextWithEntities; } interface RawStarGiftAuctionState { _: 'payments.starGiftAuctionState'; gift: tl.TypeStarGift; state: tl.TypeStarGiftAuctionState; userState: tl.TypeStarGiftAuctionUserState; timeout: number; users: tl.TypeUser[]; chats: tl.TypeChat[]; } interface RawStarGiftAuctionAcquiredGifts { _: 'payments.starGiftAuctionAcquiredGifts'; gifts: tl.TypeStarGiftAuctionAcquiredGift[]; users: tl.TypeUser[]; chats: tl.TypeChat[]; } interface RawStarGiftActiveAuctionsNotModified { _: 'payments.starGiftActiveAuctionsNotModified'; } interface RawStarGiftActiveAuctions { _: 'payments.starGiftActiveAuctions'; auctions: tl.TypeStarGiftActiveAuctionState[]; users: tl.TypeUser[]; chats: tl.TypeChat[]; } interface RawStarGiftUpgradeAttributes { _: 'payments.starGiftUpgradeAttributes'; attributes: tl.TypeStarGiftAttribute[]; } /** * Get a payment form * * RPC method returns {@link tl.payments.TypePaymentForm} */ interface RawGetPaymentFormRequest { _: 'payments.getPaymentForm'; /** * Invoice */ invoice: tl.TypeInputInvoice; /** * Theme * parameters » */ themeParams?: tl.TypeDataJSON; } /** * Get payment receipt * * RPC method returns {@link tl.payments.TypePaymentReceipt} */ interface RawGetPaymentReceiptRequest { _: 'payments.getPaymentReceipt'; /** * The peer where the payment receipt was sent */ peer: tl.TypeInputPeer; /** * Message ID of receipt */ msgId: number; } /** * Submit requested order information for validation * * RPC method returns * {@link tl.payments.TypeValidatedRequestedInfo} */ interface RawValidateRequestedInfoRequest { _: 'payments.validateRequestedInfo'; /** * Save order information to re-use it for future orders */ save?: boolean; /** * Invoice */ invoice: tl.TypeInputInvoice; /** * Requested order information */ info: tl.TypePaymentRequestedInfo; } /** * Send compiled payment form * * RPC method returns {@link tl.payments.TypePaymentResult} */ interface RawSendPaymentFormRequest { _: 'payments.sendPaymentForm'; /** * Form ID */ formId: Long; /** * Invoice */ invoice: tl.TypeInputInvoice; /** * ID of saved and validated * {@link payments.RawValidatedRequestedInfo} */ requestedInfoId?: string; /** * Chosen shipping option ID */ shippingOptionId?: string; /** * Payment credentials */ credentials: tl.TypeInputPaymentCredentials; /** * 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ tipAmount?: Long; } /** * Get saved payment information * * RPC method returns {@link tl.payments.TypeSavedInfo} */ interface RawGetSavedInfoRequest { _: 'payments.getSavedInfo'; } /** * Clear saved payment information * * RPC method returns boolean */ interface RawClearSavedInfoRequest { _: 'payments.clearSavedInfo'; /** * Remove saved payment credentials */ credentials?: boolean; /** * Clear the last order settings saved by the user */ info?: boolean; } /** * Get info about a credit card * * RPC method returns {@link tl.payments.TypeBankCardData} */ interface RawGetBankCardDataRequest { _: 'payments.getBankCardData'; /** * Credit card number */ number: string; } /** * Generate an * invoice * deep link * * RPC method returns {@link tl.payments.TypeExportedInvoice} */ interface RawExportInvoiceRequest { _: 'payments.exportInvoice'; /** * Invoice */ invoiceMedia: tl.TypeInputMedia; } /** * Informs server about a purchase made through the App Store: * for official applications only. * * RPC method returns {@link tl.TypeUpdates} */ interface RawAssignAppStoreTransactionRequest { _: 'payments.assignAppStoreTransaction'; /** * Receipt */ receipt: Uint8Array; /** * Payment purpose */ purpose: tl.TypeInputStorePaymentPurpose; } /** * Informs server about a purchase made through the Play Store: * for official applications only. * * RPC method returns {@link tl.TypeUpdates} */ interface RawAssignPlayMarketTransactionRequest { _: 'payments.assignPlayMarketTransaction'; /** * Receipt */ receipt: tl.TypeDataJSON; /** * Payment purpose */ purpose: tl.TypeInputStorePaymentPurpose; } /** * Obtain a list of Telegram Premium * giveaway/gift * code » options. * * RPC method returns {@link tl.TypePremiumGiftCodeOption} * array */ interface RawGetPremiumGiftCodeOptionsRequest { _: 'payments.getPremiumGiftCodeOptions'; /** * The channel that will start the giveaway */ boostPeer?: tl.TypeInputPeer; } /** * Obtain information about a * Telegram * Premium giftcode » * * RPC method returns {@link tl.payments.TypeCheckedGiftCode} */ interface RawCheckGiftCodeRequest { _: 'payments.checkGiftCode'; /** * The giftcode to check */ slug: string; } /** * Apply a * Telegram * Premium giftcode » * * RPC method returns {@link tl.TypeUpdates} */ interface RawApplyGiftCodeRequest { _: 'payments.applyGiftCode'; /** * The code to apply */ slug: string; } /** * Obtain information about a * Telegram * Premium giveaway ». * * RPC method returns {@link tl.payments.TypeGiveawayInfo} */ interface RawGetGiveawayInfoRequest { _: 'payments.getGiveawayInfo'; /** * The peer where the giveaway was posted. */ peer: tl.TypeInputPeer; /** * Message ID of the {@link RawMessageActionGiveawayLaunch} * service message */ msgId: number; } /** * Launch a * prepaid * giveaway ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawLaunchPrepaidGiveawayRequest { _: 'payments.launchPrepaidGiveaway'; /** * The peer where to launch the giveaway. */ peer: tl.TypeInputPeer; /** * The prepaid giveaway ID. */ giveawayId: Long; /** * Giveway parameters */ purpose: tl.TypeInputStorePaymentPurpose; } /** * Obtain a list of * Telegram * Stars topup options » as {@link RawStarsTopupOption} * constructors. * * RPC method returns {@link tl.TypeStarsTopupOption} array */ interface RawGetStarsTopupOptionsRequest { _: 'payments.getStarsTopupOptions'; } /** * Get the current * Telegram * Stars balance of the current account (with * peer={@link RawInputPeerSelf}), or the stars balance of the * bot specified in peer. * * RPC method returns {@link tl.payments.TypeStarsStatus} */ interface RawGetStarsStatusRequest { _: 'payments.getStarsStatus'; /** * If set, returns the channel/ad revenue balance in nanotons. */ ton?: boolean; /** * Peer of which to get the balance. */ peer: tl.TypeInputPeer; } /** * Fetch * Telegram * Stars transactions. * * The inbound and outbound flags are * mutually exclusive: if none of the two are set, both * incoming and outgoing transactions are fetched. * * RPC method returns {@link tl.payments.TypeStarsStatus} */ interface RawGetStarsTransactionsRequest { _: 'payments.getStarsTransactions'; /** * If set, fetches only incoming transactions. */ inbound?: boolean; /** * If set, fetches only outgoing transactions. */ outbound?: boolean; /** * Return transactions in ascending order by date (instead of * descending order by date). */ ascending?: boolean; /** * If set, returns the channel/ad revenue transactions in * nanotons, instead. */ ton?: boolean; /** * If set, fetches only transactions for the specified * Telegram * Star subscription ». */ subscriptionId?: string; /** * Fetch the transaction history of the peer * ({@link RawInputPeerSelf} or a bot we own). */ peer: tl.TypeInputPeer; /** * Offset * for pagination, obtained from the returned * next_offset, initially an empty string ». */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Make a payment using * Telegram * Stars, see here » for more info. * * RPC method returns {@link tl.payments.TypePaymentResult} */ interface RawSendStarsFormRequest { _: 'payments.sendStarsForm'; /** * Payment form ID */ formId: Long; /** * Invoice */ invoice: tl.TypeInputInvoice; } /** * Refund a * Telegram * Stars transaction, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawRefundStarsChargeRequest { _: 'payments.refundStarsCharge'; /** * User to refund. */ userId: tl.TypeInputUser; /** * Transaction ID. */ chargeId: string; } /** * Get * Telegram * Star revenue statistics ». * * RPC method returns {@link tl.payments.TypeStarsRevenueStats} */ interface RawGetStarsRevenueStatsRequest { _: 'payments.getStarsRevenueStats'; /** * Whether to enable dark theme for graph colors */ dark?: boolean; /** * If set, fetches channel/bot ad revenue statistics in TON. */ ton?: boolean; /** * Get statistics for the specified bot, channel or ourselves * ({@link RawInputPeerSelf}). */ peer: tl.TypeInputPeer; } /** * Withdraw funds from a channel or bot's * star * balance ». * * RPC method returns * {@link tl.payments.TypeStarsRevenueWithdrawalUrl} */ interface RawGetStarsRevenueWithdrawalUrlRequest { _: 'payments.getStarsRevenueWithdrawalUrl'; /** * If set, withdraws channel/ad revenue in TON. */ ton?: boolean; /** * Channel or bot from which to withdraw funds. */ peer: tl.TypeInputPeer; /** * The amount of stars or nanotons to withdraw. */ amount?: Long; /** * 2FA password, see * here * » for more info. */ password: tl.TypeInputCheckPasswordSRP; } /** * Returns a URL for a Telegram Ad platform account that can be * used to set up advertisements for channel/bot in * peer, paid using the Telegram Stars owned by * the specified peer, see * here * » for more info. * * RPC method returns * {@link tl.payments.TypeStarsRevenueAdsAccountUrl} */ interface RawGetStarsRevenueAdsAccountUrlRequest { _: 'payments.getStarsRevenueAdsAccountUrl'; /** * Channel or bot that owns the stars. */ peer: tl.TypeInputPeer; } /** * Obtain info about * Telegram * Star transactions » using specific transaction IDs. * * RPC method returns {@link tl.payments.TypeStarsStatus} */ interface RawGetStarsTransactionsByIDRequest { _: 'payments.getStarsTransactionsByID'; /** * If set, returns channel/bot ad revenue transactions in * nanotons. */ ton?: boolean; /** * Channel or bot. */ peer: tl.TypeInputPeer; /** * Transaction IDs. */ id: tl.TypeInputStarsTransaction[]; } /** * Obtain a list of * Telegram * Stars gift options » as {@link RawStarsGiftOption} * constructors. * * RPC method returns {@link tl.TypeStarsGiftOption} array */ interface RawGetStarsGiftOptionsRequest { _: 'payments.getStarsGiftOptions'; /** * Receiver of the gift (optional). */ userId?: tl.TypeInputUser; } /** * Obtain a list of active, expired or cancelled * Telegram * Star subscriptions ». * * RPC method returns {@link tl.payments.TypeStarsStatus} */ interface RawGetStarsSubscriptionsRequest { _: 'payments.getStarsSubscriptions'; /** * Whether to return only subscriptions expired due to an * excessively low Telegram Star balance. */ missingBalance?: boolean; /** * Always pass {@link RawInputPeerSelf}. */ peer: tl.TypeInputPeer; /** * Offset for pagination, taken from * {@link payments.RawStarsStatus}.subscriptions_next_offset. */ offset: string; } /** * Activate or deactivate a * Telegram * Star subscription ». * * RPC method returns boolean */ interface RawChangeStarsSubscriptionRequest { _: 'payments.changeStarsSubscription'; /** * Always pass {@link RawInputPeerSelf}. */ peer: tl.TypeInputPeer; /** * ID of the subscription. */ subscriptionId: string; /** * Whether to cancel or reactivate the subscription. */ canceled?: boolean; } /** * Re-join a private channel associated to an active * Telegram * Star subscription ». * * RPC method returns boolean */ interface RawFulfillStarsSubscriptionRequest { _: 'payments.fulfillStarsSubscription'; /** * Always pass {@link RawInputPeerSelf}. */ peer: tl.TypeInputPeer; /** * ID of the subscription. */ subscriptionId: string; } /** * Fetch a list of * star * giveaway options ». * * RPC method returns {@link tl.TypeStarsGiveawayOption} array */ interface RawGetStarsGiveawayOptionsRequest { _: 'payments.getStarsGiveawayOptions'; } /** * Get a list of available * gifts, see * here » for more info. * * RPC method returns {@link tl.payments.TypeStarGifts} */ interface RawGetStarGiftsRequest { _: 'payments.getStarGifts'; /** * Hash * used for caching, for more info click here. * * The hash may be generated locally by using the * ids of the returned or stored sticker * {@link RawStarGift}s. */ hash: number; } /** * Display or remove a * received * gift » from our profile. * * RPC method returns boolean */ interface RawSaveStarGiftRequest { _: 'payments.saveStarGift'; /** * If set, hides the gift from our profile. */ unsave?: boolean; /** * The gift to display or remove. */ stargift: tl.TypeInputSavedStarGift; } /** * Convert a * received * gift » into Telegram Stars: this will permanently * destroy the gift, converting it into * {@link RawStarGift}.convert_stars * Telegram * Stars, added to the user's balance. * * Note that {@link RawStarGift}.convert_stars * will be less than the buying price * ({@link RawStarGift}.stars) of the gift if it * was originally bought using Telegram Stars bought a long * time ago. * * RPC method returns boolean */ interface RawConvertStarGiftRequest { _: 'payments.convertStarGift'; /** * The gift to convert. */ stargift: tl.TypeInputSavedStarGift; } /** * Cancel a * bot * subscription * * RPC method returns boolean */ interface RawBotCancelStarsSubscriptionRequest { _: 'payments.botCancelStarsSubscription'; /** * If not set, disables autorenewal of the * subscriptions, and prevents the user from reactivating the * subscription once the current period expires: a subscription * cancelled by the bot will have the * {@link RawStarsSubscription}.bot_canceled flag * set. * * The bot can can partially undo this operation by setting * this flag: this will allow the user to reactivate the * subscription. */ restore?: boolean; /** * The ID of the user whose subscription should be * (un)cancelled */ userId: tl.TypeInputUser; /** * The provider_charge_id from the * {@link RawMessageActionPaymentSentMe} service message sent * to the bot for the first subscription payment. */ chargeId: string; } /** * Fetch all affiliations we have created for a certain peer * * RPC method returns * {@link tl.payments.TypeConnectedStarRefBots} */ interface RawGetConnectedStarRefBotsRequest { _: 'payments.getConnectedStarRefBots'; /** * The affiliated peer */ peer: tl.TypeInputPeer; /** * If set, returns only results older than the specified * unixtime */ offsetDate?: number; /** * Offset for * pagination, * taken from the last returned * {@link RawConnectedBotStarRef}.url (initially * empty) */ offsetLink?: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Fetch info about a specific * bot * affiliation » * * RPC method returns * {@link tl.payments.TypeConnectedStarRefBots} */ interface RawGetConnectedStarRefBotRequest { _: 'payments.getConnectedStarRefBot'; /** * The affiliated peer */ peer: tl.TypeInputPeer; /** * The bot that offers the affiliate program */ bot: tl.TypeInputUser; } /** * Obtain a list of suggested * mini * apps with available * affiliate * programs * * order_by_revenue and order_by_date * are mutually exclusive: if neither is set, results are * sorted by profitability. * * RPC method returns * {@link tl.payments.TypeSuggestedStarRefBots} */ interface RawGetSuggestedStarRefBotsRequest { _: 'payments.getSuggestedStarRefBots'; /** * If set, orders results by the expected revenue */ orderByRevenue?: boolean; /** * If set, orders results by the creation date of the affiliate * program */ orderByDate?: boolean; /** * The peer that will become the affiliate: star commissions * will be transferred to this peer's star balance. */ peer: tl.TypeInputPeer; /** * Offset for pagination, taken from * {@link payments.RawSuggestedStarRefBots}.next_offset, * initially empty. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Join a bot's * affiliate * program, becoming an affiliate » * * RPC method returns * {@link tl.payments.TypeConnectedStarRefBots} */ interface RawConnectStarRefBotRequest { _: 'payments.connectStarRefBot'; /** * The peer that will become the affiliate: star commissions * will be transferred to this peer's star balance. */ peer: tl.TypeInputPeer; /** * The bot that offers the affiliate program */ bot: tl.TypeInputUser; } /** * Leave a bot's * affiliate * program » * * RPC method returns * {@link tl.payments.TypeConnectedStarRefBots} */ interface RawEditConnectedStarRefBotRequest { _: 'payments.editConnectedStarRefBot'; /** * If set, leaves the bot's affiliate program */ revoked?: boolean; /** * The peer that was affiliated */ peer: tl.TypeInputPeer; /** * The affiliate link to revoke */ link: string; } /** * Obtain a preview of the possible attributes (chosen * randomly) a * gift » * can receive after upgrading it to a * collectible * gift », see * here * » for more info. * * RPC method returns * {@link tl.payments.TypeStarGiftUpgradePreview} */ interface RawGetStarGiftUpgradePreviewRequest { _: 'payments.getStarGiftUpgradePreview'; /** * The gift to upgrade. */ giftId: Long; } /** * Upgrade a * gift * to a * collectible * gift: can only be used if the upgrade was already paid * by the gift sender; see * here * » for more info on the full flow (including the * different flow to use in case the upgrade was not paid by * the gift sender). * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpgradeStarGiftRequest { _: 'payments.upgradeStarGift'; /** * Set this flag to keep the original gift text, sender and * receiver in the upgraded gift as a * {@link RawStarGiftAttributeOriginalDetails} attribute. */ keepOriginalDetails?: boolean; /** * The gift to upgrade */ stargift: tl.TypeInputSavedStarGift; } /** * Transfer a * collectible * gift to another user or channel: can only be used if * transfer is free (i.e. * {@link RawMessageActionStarGiftUnique}.transfer_stars * is not set); see * here * » for more info on the full flow (including the * different flow to use in case the transfer isn't free). * * RPC method returns {@link tl.TypeUpdates} */ interface RawTransferStarGiftRequest { _: 'payments.transferStarGift'; /** * The gift to transfer. */ stargift: tl.TypeInputSavedStarGift; /** * Destination peer. */ toId: tl.TypeInputPeer; } /** * Obtain info about a * collectible * gift » using a slug obtained from a * collectible * gift link ». * * RPC method returns {@link tl.payments.TypeUniqueStarGift} */ interface RawGetUniqueStarGiftRequest { _: 'payments.getUniqueStarGift'; /** * The slug. */ slug: string; } /** * Fetch the full list of * gifts * owned by a peer. * * Note that unlike what the name suggests, the method can be * used to fetch both "saved" and "unsaved" gifts (aka gifts * both pinned and not pinned) to the profile, depending on the * passed flags. * * RPC method returns {@link tl.payments.TypeSavedStarGifts} */ interface RawGetSavedStarGiftsRequest { _: 'payments.getSavedStarGifts'; /** * Exclude gifts not pinned on the profile. */ excludeUnsaved?: boolean; /** * Exclude gifts pinned on the profile. */ excludeSaved?: boolean; /** * Exclude gifts that do not have the * {@link RawStarGift}.limited flag set. */ excludeUnlimited?: boolean; /** * Exclude * collectible * gifts ». */ excludeUnique?: boolean; /** * If set, sorts the gifts by price instead of reception date. */ sortByValue?: boolean; /** * Exclude gifts that can be * upgraded * to collectible gifts ». */ excludeUpgradable?: boolean; /** * Exclude gifts that cannot be * upgraded * to collectible gifts ». */ excludeUnupgradable?: boolean; peerColorAvailable?: boolean; excludeHosted?: boolean; /** * Fetch only gifts owned by the specified peer, such as: a * user, with peer={@link RawInputPeerUser}; a channel, with * peer={@link RawInputPeerChannel}; a * connected * business user (when executing the method as a bot, over * the business connection), with * peer={@link RawInputPeerUser}. */ peer: tl.TypeInputPeer; /** * Only returns gifts within the specified * collection * ». */ collectionId?: number; /** * Offset * for pagination. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Fetch info about specific * gifts * owned by a peer we control. * * Note that unlike what the name suggests, the method can be * used to fetch both "saved" and "unsaved" gifts (aka gifts * both pinned and not pinned to the profile). * * RPC method returns {@link tl.payments.TypeSavedStarGifts} */ interface RawGetSavedStarGiftRequest { _: 'payments.getSavedStarGift'; /** * List of gifts to fetch info about. */ stargift: tl.TypeInputSavedStarGift[]; } /** * Convert a * collectible * gift » to an NFT on the TON blockchain. * * RPC method returns * {@link tl.payments.TypeStarGiftWithdrawalUrl} */ interface RawGetStarGiftWithdrawalUrlRequest { _: 'payments.getStarGiftWithdrawalUrl'; /** * The collectible gift to export. */ stargift: tl.TypeInputSavedStarGift; /** * The current user's 2FA password, passed as * specified * here ». */ password: tl.TypeInputCheckPasswordSRP; } /** * Enables or disables the reception of notifications every * time a * gift » * is received by the specified channel, can only be invoked by * admins with post_messages * {@link RawChatAdminRights}. * * RPC method returns boolean */ interface RawToggleChatStarGiftNotificationsRequest { _: 'payments.toggleChatStarGiftNotifications'; /** * Whether to enable or disable reception of notifications in * the form of {@link RawMessageActionStarGiftUnique} and * {@link RawMessageActionStarGift} service messages from the * channel. */ enabled?: boolean; /** * The channel for which to receive or not receive * notifications. */ peer: tl.TypeInputPeer; } /** * Pins a received gift on top of the profile of the user or * owned channels by using * {@link payments.RawToggleStarGiftsPinnedToTopRequest}. * * RPC method returns boolean */ interface RawToggleStarGiftsPinnedToTopRequest { _: 'payments.toggleStarGiftsPinnedToTop'; /** * The peer where to pin the gift. */ peer: tl.TypeInputPeer; /** * The gift to pin. */ stargift: tl.TypeInputSavedStarGift[]; } /** * Checks whether a purchase is possible. Must be called before * in-store purchase, official apps only. * * RPC method returns boolean */ interface RawCanPurchaseStoreRequest { _: 'payments.canPurchaseStore'; /** * Payment purpose. */ purpose: tl.TypeInputStorePaymentPurpose; } /** * Get * collectible * gifts of a specific type currently on resale, see * here * » for more info. * * sort_by_price and sort_by_num are * mutually exclusive, if neither are set results are sorted by * the unixtime (descending) when their resell price was last * changed. * * See * here * » for detailed documentation on this method. * * RPC method returns {@link tl.payments.TypeResaleStarGifts} */ interface RawGetResaleStarGiftsRequest { _: 'payments.getResaleStarGifts'; /** * Sort gifts by price (ascending). */ sortByPrice?: boolean; /** * Sort gifts by number (ascending). */ sortByNum?: boolean; forCraft?: boolean; /** * If a previous call to the method was made and * {@link payments.RawResaleStarGifts}.attributes_hash * was set, pass it here to avoid returning any results if they * haven't changed. * * Otherwise, set this flag and pass 0 to return * {@link payments.RawResaleStarGifts}.attributes_hash * and * {@link payments.RawResaleStarGifts}.attributes, * these two fields will not be set if this * flag is not set. */ attributesHash?: Long; /** * Mandatory identifier of the base gift from which the * collectible gift was upgraded. */ giftId: Long; /** * Optionally filter gifts with the specified attributes. If no * attributes of a specific type are specified, all attributes * of that type are allowed. */ attributes?: tl.TypeStarGiftAttributeId[]; /** * Offset for pagination. If not equal to an empty string, * {@link payments.RawResaleStarGifts}.counters * will not be set to avoid returning the counters every time a * new page is fetched. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * A * collectible * gift we own » can be put up for sale on the * gift * marketplace » with this method, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawUpdateStarGiftPriceRequest { _: 'payments.updateStarGiftPrice'; /** * The gift to resell. */ stargift: tl.TypeInputSavedStarGift; /** * Resale price of the gift. */ resellAmount: tl.TypeStarsAmount; } /** * Create a * star * gift collection ». * * RPC method returns {@link tl.TypeStarGiftCollection} */ interface RawCreateStarGiftCollectionRequest { _: 'payments.createStarGiftCollection'; /** * Peer where to create the collection. */ peer: tl.TypeInputPeer; /** * Title of the collection. */ title: string; /** * Gifts added to the collection. */ stargift: tl.TypeInputSavedStarGift[]; } /** * Add or remove gifts from a * star * gift collection », or rename the collection. * * RPC method returns {@link tl.TypeStarGiftCollection} */ interface RawUpdateStarGiftCollectionRequest { _: 'payments.updateStarGiftCollection'; /** * Peer that owns the collection. */ peer: tl.TypeInputPeer; /** * Collection ID. */ collectionId: number; /** * Title of the collection, to rename the collection. */ title?: string; /** * Can contain a list of gifts to remove from the collection. */ deleteStargift?: tl.TypeInputSavedStarGift[]; /** * Can contain a list of gifts to add to the collection. */ addStargift?: tl.TypeInputSavedStarGift[]; /** * Can contain the new gift order. */ order?: tl.TypeInputSavedStarGift[]; } /** * Reorder the * star * gift collections » on an owned peer's profile. * * RPC method returns boolean */ interface RawReorderStarGiftCollectionsRequest { _: 'payments.reorderStarGiftCollections'; /** * The owned peer. */ peer: tl.TypeInputPeer; /** * New collection order. */ order: number[]; } /** * Delete a * star * gift collection ». * * RPC method returns boolean */ interface RawDeleteStarGiftCollectionRequest { _: 'payments.deleteStarGiftCollection'; /** * Peer that owns the collection. */ peer: tl.TypeInputPeer; /** * ID of the collection. */ collectionId: number; } /** * Fetches all * star * gift collections » of a peer. * * RPC method returns * {@link tl.payments.TypeStarGiftCollections} */ interface RawGetStarGiftCollectionsRequest { _: 'payments.getStarGiftCollections'; /** * The peer. */ peer: tl.TypeInputPeer; /** * Hash * (generated * as specified here ») using the * {@link RawStarGiftCollection}.hash field * (not the collection_id field) * of all collections returned by a previous method call, to * avoid refetching the result if it hasn't changed. */ hash: Long; } /** * Get information about the value of a * collectible * gift ». * * RPC method returns * {@link tl.payments.TypeUniqueStarGiftValueInfo} */ interface RawGetUniqueStarGiftValueInfoRequest { _: 'payments.getUniqueStarGiftValueInfo'; /** * slug from a {@link RawStarGiftUnique}. */ slug: string; } /** * Check if the specified * gift » * can be sent. * * RPC method returns * {@link tl.payments.TypeCheckCanSendGiftResult} */ interface RawCheckCanSendGiftRequest { _: 'payments.checkCanSendGift'; /** * Gift ID. */ giftId: Long; } /** * RPC method returns * {@link tl.payments.TypeStarGiftAuctionState} */ interface RawGetStarGiftAuctionStateRequest { _: 'payments.getStarGiftAuctionState'; auction: tl.TypeInputStarGiftAuction; version: number; } /** * RPC method returns * {@link tl.payments.TypeStarGiftAuctionAcquiredGifts} */ interface RawGetStarGiftAuctionAcquiredGiftsRequest { _: 'payments.getStarGiftAuctionAcquiredGifts'; giftId: Long; } /** * RPC method returns * {@link tl.payments.TypeStarGiftActiveAuctions} */ interface RawGetStarGiftActiveAuctionsRequest { _: 'payments.getStarGiftActiveAuctions'; hash: Long; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawResolveStarGiftOfferRequest { _: 'payments.resolveStarGiftOffer'; decline?: boolean; offerMsgId: number; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawSendStarGiftOfferRequest { _: 'payments.sendStarGiftOffer'; peer: tl.TypeInputPeer; slug: string; price: tl.TypeStarsAmount; duration: number; randomId: Long; allowPaidStars?: Long; } /** * RPC method returns * {@link tl.payments.TypeStarGiftUpgradeAttributes} */ interface RawGetStarGiftUpgradeAttributesRequest { _: 'payments.getStarGiftUpgradeAttributes'; giftId: Long; } /** * RPC method returns {@link tl.payments.TypeSavedStarGifts} */ interface RawGetCraftStarGiftsRequest { _: 'payments.getCraftStarGifts'; giftId: Long; offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawCraftStarGiftRequest { _: 'payments.craftStarGift'; stargift: tl.TypeInputSavedStarGift[]; } interface RpcCallReturn { 'payments.getPaymentForm': tl.payments.TypePaymentForm 'payments.getPaymentReceipt': tl.payments.TypePaymentReceipt 'payments.validateRequestedInfo': tl.payments.TypeValidatedRequestedInfo 'payments.sendPaymentForm': tl.payments.TypePaymentResult 'payments.getSavedInfo': tl.payments.TypeSavedInfo 'payments.clearSavedInfo': boolean 'payments.getBankCardData': tl.payments.TypeBankCardData 'payments.exportInvoice': tl.payments.TypeExportedInvoice 'payments.assignAppStoreTransaction': tl.TypeUpdates 'payments.assignPlayMarketTransaction': tl.TypeUpdates 'payments.getPremiumGiftCodeOptions': tl.TypePremiumGiftCodeOption[] 'payments.checkGiftCode': tl.payments.TypeCheckedGiftCode 'payments.applyGiftCode': tl.TypeUpdates 'payments.getGiveawayInfo': tl.payments.TypeGiveawayInfo 'payments.launchPrepaidGiveaway': tl.TypeUpdates 'payments.getStarsTopupOptions': tl.TypeStarsTopupOption[] 'payments.getStarsStatus': tl.payments.TypeStarsStatus 'payments.getStarsTransactions': tl.payments.TypeStarsStatus 'payments.sendStarsForm': tl.payments.TypePaymentResult 'payments.refundStarsCharge': tl.TypeUpdates 'payments.getStarsRevenueStats': tl.payments.TypeStarsRevenueStats 'payments.getStarsRevenueWithdrawalUrl': tl.payments.TypeStarsRevenueWithdrawalUrl 'payments.getStarsRevenueAdsAccountUrl': tl.payments.TypeStarsRevenueAdsAccountUrl 'payments.getStarsTransactionsByID': tl.payments.TypeStarsStatus 'payments.getStarsGiftOptions': tl.TypeStarsGiftOption[] 'payments.getStarsSubscriptions': tl.payments.TypeStarsStatus 'payments.changeStarsSubscription': boolean 'payments.fulfillStarsSubscription': boolean 'payments.getStarsGiveawayOptions': tl.TypeStarsGiveawayOption[] 'payments.getStarGifts': tl.payments.TypeStarGifts 'payments.saveStarGift': boolean 'payments.convertStarGift': boolean 'payments.botCancelStarsSubscription': boolean 'payments.getConnectedStarRefBots': tl.payments.TypeConnectedStarRefBots 'payments.getConnectedStarRefBot': tl.payments.TypeConnectedStarRefBots 'payments.getSuggestedStarRefBots': tl.payments.TypeSuggestedStarRefBots 'payments.connectStarRefBot': tl.payments.TypeConnectedStarRefBots 'payments.editConnectedStarRefBot': tl.payments.TypeConnectedStarRefBots 'payments.getStarGiftUpgradePreview': tl.payments.TypeStarGiftUpgradePreview 'payments.upgradeStarGift': tl.TypeUpdates 'payments.transferStarGift': tl.TypeUpdates 'payments.getUniqueStarGift': tl.payments.TypeUniqueStarGift 'payments.getSavedStarGifts': tl.payments.TypeSavedStarGifts 'payments.getSavedStarGift': tl.payments.TypeSavedStarGifts 'payments.getStarGiftWithdrawalUrl': tl.payments.TypeStarGiftWithdrawalUrl 'payments.toggleChatStarGiftNotifications': boolean 'payments.toggleStarGiftsPinnedToTop': boolean 'payments.canPurchaseStore': boolean 'payments.getResaleStarGifts': tl.payments.TypeResaleStarGifts 'payments.updateStarGiftPrice': tl.TypeUpdates 'payments.createStarGiftCollection': tl.TypeStarGiftCollection 'payments.updateStarGiftCollection': tl.TypeStarGiftCollection 'payments.reorderStarGiftCollections': boolean 'payments.deleteStarGiftCollection': boolean 'payments.getStarGiftCollections': tl.payments.TypeStarGiftCollections 'payments.getUniqueStarGiftValueInfo': tl.payments.TypeUniqueStarGiftValueInfo 'payments.checkCanSendGift': tl.payments.TypeCheckCanSendGiftResult 'payments.getStarGiftAuctionState': tl.payments.TypeStarGiftAuctionState 'payments.getStarGiftAuctionAcquiredGifts': tl.payments.TypeStarGiftAuctionAcquiredGifts 'payments.getStarGiftActiveAuctions': tl.payments.TypeStarGiftActiveAuctions 'payments.resolveStarGiftOffer': tl.TypeUpdates 'payments.sendStarGiftOffer': tl.TypeUpdates 'payments.getStarGiftUpgradeAttributes': tl.payments.TypeStarGiftUpgradeAttributes 'payments.getCraftStarGifts': tl.payments.TypeSavedStarGifts 'payments.craftStarGift': tl.TypeUpdates } /** * Payment form */ type TypePaymentForm = tl.payments.RawPaymentForm | tl.payments.RawPaymentFormStars | tl.payments.RawPaymentFormStarGift function isAnyPaymentForm(o: object): o is TypePaymentForm /** * Validated requested info */ type TypeValidatedRequestedInfo = tl.payments.RawValidatedRequestedInfo function isAnyValidatedRequestedInfo(o: object): o is TypeValidatedRequestedInfo /** * Payment result */ type TypePaymentResult = tl.payments.RawPaymentResult | tl.payments.RawPaymentVerificationNeeded function isAnyPaymentResult(o: object): o is TypePaymentResult /** * Payment receipt */ type TypePaymentReceipt = tl.payments.RawPaymentReceipt | tl.payments.RawPaymentReceiptStars function isAnyPaymentReceipt(o: object): o is TypePaymentReceipt /** * Saved payment info */ type TypeSavedInfo = tl.payments.RawSavedInfo function isAnySavedInfo(o: object): o is TypeSavedInfo /** * Credit card info, provided by the card's bank(s) */ type TypeBankCardData = tl.payments.RawBankCardData function isAnyBankCardData(o: object): o is TypeBankCardData /** * Exported invoice */ type TypeExportedInvoice = tl.payments.RawExportedInvoice function isAnyExportedInvoice(o: object): o is TypeExportedInvoice /** * Info about a * Telegram * Premium Giftcode. */ type TypeCheckedGiftCode = tl.payments.RawCheckedGiftCode function isAnyCheckedGiftCode(o: object): o is TypeCheckedGiftCode /** * Info about a * Telegram * Premium Giveaway. */ type TypeGiveawayInfo = tl.payments.RawGiveawayInfo | tl.payments.RawGiveawayInfoResults function isAnyGiveawayInfo(o: object): o is TypeGiveawayInfo /** * Info about the current * Telegram * Star subscriptions, balance and transaction history ». */ type TypeStarsStatus = tl.payments.RawStarsStatus function isAnyStarsStatus(o: object): o is TypeStarsStatus /** * Star * revenue statistics, see here » for more info. * * Note that all balances and currency amounts and graph values * are in Stars. */ type TypeStarsRevenueStats = tl.payments.RawStarsRevenueStats function isAnyStarsRevenueStats(o: object): o is TypeStarsRevenueStats /** * Contains the URL to use to * withdraw * Telegram Star revenue. */ type TypeStarsRevenueWithdrawalUrl = tl.payments.RawStarsRevenueWithdrawalUrl function isAnyStarsRevenueWithdrawalUrl(o: object): o is TypeStarsRevenueWithdrawalUrl /** * Contains a URL leading to a page where the user will be able * to place ads for the channel/bot, paying using * Telegram * Stars. */ type TypeStarsRevenueAdsAccountUrl = tl.payments.RawStarsRevenueAdsAccountUrl function isAnyStarsRevenueAdsAccountUrl(o: object): o is TypeStarsRevenueAdsAccountUrl /** * Available * gifts * ». */ type TypeStarGifts = tl.payments.RawStarGiftsNotModified | tl.payments.RawStarGifts function isAnyStarGifts(o: object): o is TypeStarGifts /** * Active * affiliations */ type TypeConnectedStarRefBots = tl.payments.RawConnectedStarRefBots function isAnyConnectedStarRefBots(o: object): o is TypeConnectedStarRefBots /** * A list of suggested * mini * apps with available * affiliate * programs */ type TypeSuggestedStarRefBots = tl.payments.RawSuggestedStarRefBots function isAnySuggestedStarRefBots(o: object): o is TypeSuggestedStarRefBots /** * A preview of the possible attributes (chosen randomly) a * gift » * can receive after upgrading it to a * collectible * gift », see * here * » for more info. */ type TypeStarGiftUpgradePreview = tl.payments.RawStarGiftUpgradePreview function isAnyStarGiftUpgradePreview(o: object): o is TypeStarGiftUpgradePreview /** * Represents a * collectible * gift ». */ type TypeUniqueStarGift = tl.payments.RawUniqueStarGift function isAnyUniqueStarGift(o: object): o is TypeUniqueStarGift /** * Represents a list of * gifts. */ type TypeSavedStarGifts = tl.payments.RawSavedStarGifts function isAnySavedStarGifts(o: object): o is TypeSavedStarGifts /** * A URL that can be used to import the exported NFT on * Fragment. */ type TypeStarGiftWithdrawalUrl = tl.payments.RawStarGiftWithdrawalUrl function isAnyStarGiftWithdrawalUrl(o: object): o is TypeStarGiftWithdrawalUrl /** * List of gifts currently on * resale * ». */ type TypeResaleStarGifts = tl.payments.RawResaleStarGifts function isAnyResaleStarGifts(o: object): o is TypeResaleStarGifts /** * Represents a list of * star * gift collections ». */ type TypeStarGiftCollections = tl.payments.RawStarGiftCollectionsNotModified | tl.payments.RawStarGiftCollections function isAnyStarGiftCollections(o: object): o is TypeStarGiftCollections /** * Information about the value of a * collectible * gift ». */ type TypeUniqueStarGiftValueInfo = tl.payments.RawUniqueStarGiftValueInfo function isAnyUniqueStarGiftValueInfo(o: object): o is TypeUniqueStarGiftValueInfo /** * Specifies if a gift can or cannot be sent. */ type TypeCheckCanSendGiftResult = tl.payments.RawCheckCanSendGiftResultOk | tl.payments.RawCheckCanSendGiftResultFail function isAnyCheckCanSendGiftResult(o: object): o is TypeCheckCanSendGiftResult type TypeStarGiftAuctionState = tl.payments.RawStarGiftAuctionState function isAnyStarGiftAuctionState(o: object): o is TypeStarGiftAuctionState type TypeStarGiftAuctionAcquiredGifts = tl.payments.RawStarGiftAuctionAcquiredGifts function isAnyStarGiftAuctionAcquiredGifts(o: object): o is TypeStarGiftAuctionAcquiredGifts type TypeStarGiftActiveAuctions = tl.payments.RawStarGiftActiveAuctionsNotModified | tl.payments.RawStarGiftActiveAuctions function isAnyStarGiftActiveAuctions(o: object): o is TypeStarGiftActiveAuctions type TypeStarGiftUpgradeAttributes = tl.payments.RawStarGiftUpgradeAttributes function isAnyStarGiftUpgradeAttributes(o: object): o is TypeStarGiftUpgradeAttributes } namespace phone { /** * A VoIP phone call */ interface RawPhoneCall { _: 'phone.phoneCall'; /** * The VoIP phone call */ phoneCall: tl.TypePhoneCall; /** * VoIP phone call participants */ users: tl.TypeUser[]; } /** * Contains info about a group call, and partial info about its * participants. */ interface RawGroupCall { _: 'phone.groupCall'; /** * Info about the group call */ call: tl.TypeGroupCall; /** * A partial list of participants. */ participants: tl.TypeGroupCallParticipant[]; /** * Next offset to use when fetching the remaining participants * using {@link phone.RawGetGroupParticipantsRequest} */ participantsNextOffset: string; /** * Chats mentioned in the participants vector */ chats: tl.TypeChat[]; /** * Users mentioned in the participants vector */ users: tl.TypeUser[]; } /** * Info about the participants of a group call or livestream */ interface RawGroupParticipants { _: 'phone.groupParticipants'; /** * Number of participants */ count: number; /** * List of participants */ participants: tl.TypeGroupCallParticipant[]; /** * If not empty, the specified list of participants is partial, * and more participants can be fetched specifying this * parameter as offset in * {@link phone.RawGetGroupParticipantsRequest}. */ nextOffset: string; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; /** * Version info */ version: number; } /** * A list of peers that can be used to join a group call, * presenting yourself as a specific user/channel. */ interface RawJoinAsPeers { _: 'phone.joinAsPeers'; /** * Peers */ peers: tl.TypePeer[]; /** * Chats mentioned in the peers vector */ chats: tl.TypeChat[]; /** * Users mentioned in the peers vector */ users: tl.TypeUser[]; } /** * An invite to a group call or livestream */ interface RawExportedGroupCallInvite { _: 'phone.exportedGroupCallInvite'; /** * Invite link */ link: string; } /** * Info about RTMP streams in a group call or livestream */ interface RawGroupCallStreamChannels { _: 'phone.groupCallStreamChannels'; /** * RTMP streams */ channels: tl.TypeGroupCallStreamChannel[]; } /** * RTMP URL and stream key to be used in streaming software */ interface RawGroupCallStreamRtmpUrl { _: 'phone.groupCallStreamRtmpUrl'; /** * RTMP URL */ url: string; /** * Stream key */ key: string; } interface RawGroupCallStars { _: 'phone.groupCallStars'; totalStars: Long; topDonors: tl.TypeGroupCallDonor[]; chats: tl.TypeChat[]; users: tl.TypeUser[]; } /** * Get phone call configuration to be passed to libtgvoip's * shared config * * RPC method returns {@link tl.TypeDataJSON} */ interface RawGetCallConfigRequest { _: 'phone.getCallConfig'; } /** * Start a telegram phone call * * RPC method returns {@link tl.phone.TypePhoneCall} */ interface RawRequestCallRequest { _: 'phone.requestCall'; /** * Whether to start a video call */ video?: boolean; /** * Destination of the phone call */ userId: tl.TypeInputUser; /** * Random ID to avoid resending the same object */ randomId: number; /** * Parameter * for E2E encryption key exchange » */ gAHash: Uint8Array; /** * Phone call settings */ protocol: tl.TypePhoneCallProtocol; } /** * Accept incoming call * * RPC method returns {@link tl.phone.TypePhoneCall} */ interface RawAcceptCallRequest { _: 'phone.acceptCall'; /** * The call to accept */ peer: tl.TypeInputPhoneCall; /** * Parameter * for E2E encryption key exchange » */ gB: Uint8Array; /** * Phone call settings */ protocol: tl.TypePhoneCallProtocol; } /** * Complete * phone call E2E encryption key exchange » * * RPC method returns {@link tl.phone.TypePhoneCall} */ interface RawConfirmCallRequest { _: 'phone.confirmCall'; /** * The phone call */ peer: tl.TypeInputPhoneCall; /** * Parameter * for E2E encryption key exchange » */ gA: Uint8Array; /** * Key fingerprint */ keyFingerprint: Long; /** * Phone call settings */ protocol: tl.TypePhoneCallProtocol; } /** * 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. * * RPC method returns boolean */ interface RawReceivedCallRequest { _: 'phone.receivedCall'; /** * The phone call we're currently in */ peer: tl.TypeInputPhoneCall; } /** * Refuse or end running call * * RPC method returns {@link tl.TypeUpdates} */ interface RawDiscardCallRequest { _: 'phone.discardCall'; /** * Whether this is a video call */ video?: boolean; /** * The phone call */ peer: tl.TypeInputPhoneCall; /** * Call duration */ duration: number; /** * Why was the call discarded */ reason: tl.TypePhoneCallDiscardReason; /** * Preferred libtgvoip relay ID */ connectionId: Long; } /** * Rate a call, returns info about the rating message sent to * the official VoIP bot. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSetCallRatingRequest { _: 'phone.setCallRating'; /** * Whether the user decided on their own initiative to rate the * call */ userInitiative?: boolean; /** * The call to rate */ peer: tl.TypeInputPhoneCall; /** * Rating in 1-5 stars */ rating: number; /** * An additional comment */ comment: string; } /** * Send phone call debug data to server * * RPC method returns boolean */ interface RawSaveCallDebugRequest { _: 'phone.saveCallDebug'; /** * Phone call */ peer: tl.TypeInputPhoneCall; /** * Debug statistics obtained from libtgvoip */ debug: tl.TypeDataJSON; } /** * Send VoIP signaling data * * RPC method returns boolean */ interface RawSendSignalingDataRequest { _: 'phone.sendSignalingData'; /** * Phone call */ peer: tl.TypeInputPhoneCall; /** * Signaling payload */ data: Uint8Array; } /** * Create a group call or livestream * * RPC method returns {@link tl.TypeUpdates} */ interface RawCreateGroupCallRequest { _: 'phone.createGroupCall'; /** * Whether RTMP stream support should be enabled: only the * group/supergroup/channel * owner can use this flag. */ rtmpStream?: boolean; /** * Associate the group call or livestream to the provided * group/supergroup/channel */ peer: tl.TypeInputPeer; /** * Unique client message ID required to prevent creation of * duplicate group calls */ randomId: number; /** * Call title */ title?: string; /** * For scheduled group call or livestreams, the absolute date * when the group call will start */ scheduleDate?: number; } /** * Join a group call * * RPC method returns {@link tl.TypeUpdates} */ interface RawJoinGroupCallRequest { _: 'phone.joinGroupCall'; /** * If set, the user will be muted by default upon joining. */ muted?: boolean; /** * If set, the user's video will be disabled by default upon * joining. */ videoStopped?: boolean; /** * The group call */ call: tl.TypeInputGroupCall; /** * Join the group call, presenting yourself as the specified * user/channel */ joinAs: tl.TypeInputPeer; /** * The invitation hash from the * invite * link », if provided allows speaking in a livestream or * muted group chat. */ inviteHash?: string; /** * For conference calls, your public key. */ publicKey?: Int256; /** * The * block * containing an appropriate e2e.chain.changeSetGroupState * event. */ block?: Uint8Array; /** * WebRTC parameters */ params: tl.TypeDataJSON; } /** * Leave a group call * * RPC method returns {@link tl.TypeUpdates} */ interface RawLeaveGroupCallRequest { _: 'phone.leaveGroupCall'; /** * The group call */ call: tl.TypeInputGroupCall; /** * Your source ID */ source: number; } /** * Invite a set of users to a group call. * * RPC method returns {@link tl.TypeUpdates} */ interface RawInviteToGroupCallRequest { _: 'phone.inviteToGroupCall'; /** * The group call */ call: tl.TypeInputGroupCall; /** * The users to invite. */ users: tl.TypeInputUser[]; } /** * Terminate a group call * * RPC method returns {@link tl.TypeUpdates} */ interface RawDiscardGroupCallRequest { _: 'phone.discardGroupCall'; /** * The group call to terminate */ call: tl.TypeInputGroupCall; } /** * Change group call settings * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleGroupCallSettingsRequest { _: 'phone.toggleGroupCallSettings'; /** * Invalidate existing invite links */ resetInviteHash?: boolean; /** * Group call */ call: tl.TypeInputGroupCall; /** * Whether all users will that join this group call are muted * by default upon joining the group call */ joinMuted?: boolean; messagesEnabled?: boolean; sendPaidMessagesStars?: Long; } /** * Get info about a group call * * RPC method returns {@link tl.phone.TypeGroupCall} */ interface RawGetGroupCallRequest { _: 'phone.getGroupCall'; /** * The group call */ call: tl.TypeInputGroupCall; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Get group call participants * * RPC method returns {@link tl.phone.TypeGroupParticipants} */ interface RawGetGroupParticipantsRequest { _: 'phone.getGroupParticipants'; /** * Group call */ call: tl.TypeInputGroupCall; /** * If specified, will fetch group participant info about the * specified peers */ ids: tl.TypeInputPeer[]; /** * If specified, will fetch group participant info about the * specified WebRTC source IDs */ sources: number[]; /** * Offset for results, taken from the next_offset * field of {@link phone.RawGroupParticipants}, 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 * {@link phone.RawGroupParticipants} if it is empty, to avoid * an infinite loop. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * 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. * * RPC method returns number array */ interface RawCheckGroupCallRequest { _: 'phone.checkGroupCall'; /** * Group call */ call: tl.TypeInputGroupCall; /** * Source IDs */ sources: number[]; } /** * Start or stop recording a group call: the recorded audio and * video streams will be automatically sent to Saved * messages (the chat with ourselves). * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleGroupCallRecordRequest { _: 'phone.toggleGroupCallRecord'; /** * Whether to start or stop recording */ start?: boolean; /** * Whether to also record video streams */ video?: boolean; /** * The group call or livestream */ call: tl.TypeInputGroupCall; /** * Recording title */ title?: string; /** * If video stream recording is enabled, whether to record in * portrait or landscape mode */ videoPortrait?: boolean; } /** * Edit information about a given group call participant * * Note: * flags.N?Bool * parameters can have three possible values: * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditGroupCallParticipantRequest { _: 'phone.editGroupCallParticipant'; /** * The group call */ call: tl.TypeInputGroupCall; /** * The group call participant (can also be the user itself) */ participant: tl.TypeInputPeer; /** * Whether to mute or unmute the specified participant */ muted?: boolean; /** * New volume */ volume?: number; /** * Raise or lower hand */ raiseHand?: boolean; /** * Start or stop the video stream */ videoStopped?: boolean; /** * Pause or resume the video stream */ videoPaused?: boolean; /** * Pause or resume the screen sharing stream */ presentationPaused?: boolean; } /** * Edit the title of a group call or livestream * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditGroupCallTitleRequest { _: 'phone.editGroupCallTitle'; /** * Group call */ call: tl.TypeInputGroupCall; /** * New title */ title: string; } /** * Get a list of peers that can be used to join a group call, * presenting yourself as a specific user/channel. * * RPC method returns {@link tl.phone.TypeJoinAsPeers} */ interface RawGetGroupCallJoinAsRequest { _: 'phone.getGroupCallJoinAs'; /** * The dialog whose group call or livestream we're trying to * join */ peer: tl.TypeInputPeer; } /** * Get an * invite * link for a group call or livestream * * RPC method returns * {@link tl.phone.TypeExportedGroupCallInvite} */ interface RawExportGroupCallInviteRequest { _: 'phone.exportGroupCallInvite'; /** * 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). */ canSelfUnmute?: boolean; /** * The group call */ call: tl.TypeInputGroupCall; } /** * Subscribe or unsubscribe to a scheduled group call * * RPC method returns {@link tl.TypeUpdates} */ interface RawToggleGroupCallStartSubscriptionRequest { _: 'phone.toggleGroupCallStartSubscription'; /** * Scheduled group call */ call: tl.TypeInputGroupCall; /** * Enable or disable subscription */ subscribed: boolean; } /** * Start a scheduled group call. * * RPC method returns {@link tl.TypeUpdates} */ interface RawStartScheduledGroupCallRequest { _: 'phone.startScheduledGroupCall'; /** * The scheduled group call */ call: tl.TypeInputGroupCall; } /** * Set the default peer that will be used to join a group call * in a specific dialog. * * RPC method returns boolean */ interface RawSaveDefaultGroupCallJoinAsRequest { _: 'phone.saveDefaultGroupCallJoinAs'; /** * The dialog */ peer: tl.TypeInputPeer; /** * The default peer that will be used to join group calls in * this dialog, presenting yourself as a specific user/channel. */ joinAs: tl.TypeInputPeer; } /** * Start screen sharing in a call * * RPC method returns {@link tl.TypeUpdates} */ interface RawJoinGroupCallPresentationRequest { _: 'phone.joinGroupCallPresentation'; /** * The group call */ call: tl.TypeInputGroupCall; /** * WebRTC parameters */ params: tl.TypeDataJSON; } /** * Stop screen sharing in a group call * * RPC method returns {@link tl.TypeUpdates} */ interface RawLeaveGroupCallPresentationRequest { _: 'phone.leaveGroupCallPresentation'; /** * The group call */ call: tl.TypeInputGroupCall; } /** * 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. * * * As usual, the media DC is preferred, if available. * * RPC method returns * {@link tl.phone.TypeGroupCallStreamChannels} */ interface RawGetGroupCallStreamChannelsRequest { _: 'phone.getGroupCallStreamChannels'; /** * Group call or livestream */ call: tl.TypeInputGroupCall; } /** * Get RTMP URL and stream key for RTMP livestreams. Can be * used even before creating the actual RTMP livestream with * {@link phone.RawCreateGroupCallRequest} (the * rtmp_stream flag must be set). * * RPC method returns * {@link tl.phone.TypeGroupCallStreamRtmpUrl} */ interface RawGetGroupCallStreamRtmpUrlRequest { _: 'phone.getGroupCallStreamRtmpUrl'; liveStory?: boolean; /** * Peer to livestream into */ peer: tl.TypeInputPeer; /** * Whether to revoke the previous stream key or simply return * the existing one */ revoke: boolean; } /** * Save phone call debug information * * RPC method returns boolean */ interface RawSaveCallLogRequest { _: 'phone.saveCallLog'; /** * Phone call */ peer: tl.TypeInputPhoneCall; /** * Logs */ file: tl.TypeInputFile; } /** * Create and optionally join a new conference call. * * RPC method returns {@link tl.TypeUpdates} */ interface RawCreateConferenceCallRequest { _: 'phone.createConferenceCall'; /** * If set, mute our microphone when joining the call (can only * be used if join is set). */ muted?: boolean; /** * If set, our video stream is disabled (can only be used if * join is set). */ videoStopped?: boolean; /** * If set, also join the call, otherwise just create the call * link. */ join?: boolean; /** * Unique client message ID required to prevent creation of * duplicate group calls. */ randomId: number; /** * Public key (can only be used if join is set). */ publicKey?: Int256; /** * Initial blockchain block (can only be used if * join is set). */ block?: Uint8Array; /** * Parameters from tgcalls (can only be used if * join is set). */ params?: tl.TypeDataJSON; } /** * Remove participants from a conference call. * * Exactly one of the only_left and * kick flags must be set. * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteConferenceCallParticipantsRequest { _: 'phone.deleteConferenceCallParticipants'; /** * Whether this is a removal of members that already left the * conference call. */ onlyLeft?: boolean; /** * Whether this is a forced removal of active members in a * conference call. */ kick?: boolean; /** * The conference call. */ call: tl.TypeInputGroupCall; /** * IDs of users to remove. */ ids: Long[]; /** * The * block * containing an appropriate e2e.chain.changeSetGroupState * event */ block: Uint8Array; } /** * Broadcast a blockchain block to all members of a conference * call, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendConferenceCallBroadcastRequest { _: 'phone.sendConferenceCallBroadcast'; /** * The conference where to broadcast the block. */ call: tl.TypeInputGroupCall; /** * The block to broadcast. */ block: Uint8Array; } /** * Invite a user to a conference call. * * RPC method returns {@link tl.TypeUpdates} */ interface RawInviteConferenceCallParticipantRequest { _: 'phone.inviteConferenceCallParticipant'; /** * Invite the user to also turn on their video feed. */ video?: boolean; /** * The conference call. */ call: tl.TypeInputGroupCall; /** * The user to invite. */ userId: tl.TypeInputUser; } /** * Declines a conference call invite. * * RPC method returns {@link tl.TypeUpdates} */ interface RawDeclineConferenceCallInviteRequest { _: 'phone.declineConferenceCallInvite'; /** * The ID of the {@link RawMessageActionConferenceCall} to * decline. */ msgId: number; } /** * Fetch the blocks of a * conference * blockchain ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetGroupCallChainBlocksRequest { _: 'phone.getGroupCallChainBlocks'; /** * The conference. */ call: tl.TypeInputGroupCall; /** * Subchain ID. */ subChainId: number; /** * Offset for pagination. */ offset: number; /** * Maximum number of blocks to return in this call, * see * pagination */ limit: number; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawSendGroupCallMessageRequest { _: 'phone.sendGroupCallMessage'; call: tl.TypeInputGroupCall; randomId: Long; message: tl.TypeTextWithEntities; allowPaidStars?: Long; sendAs?: tl.TypeInputPeer; } /** * RPC method returns boolean */ interface RawSendGroupCallEncryptedMessageRequest { _: 'phone.sendGroupCallEncryptedMessage'; call: tl.TypeInputGroupCall; encryptedMessage: Uint8Array; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteGroupCallMessagesRequest { _: 'phone.deleteGroupCallMessages'; reportSpam?: boolean; call: tl.TypeInputGroupCall; messages: number[]; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawDeleteGroupCallParticipantMessagesRequest { _: 'phone.deleteGroupCallParticipantMessages'; reportSpam?: boolean; call: tl.TypeInputGroupCall; participant: tl.TypeInputPeer; } /** * RPC method returns {@link tl.phone.TypeGroupCallStars} */ interface RawGetGroupCallStarsRequest { _: 'phone.getGroupCallStars'; call: tl.TypeInputGroupCall; } /** * RPC method returns boolean */ interface RawSaveDefaultSendAsRequest { _: 'phone.saveDefaultSendAs'; call: tl.TypeInputGroupCall; sendAs: tl.TypeInputPeer; } interface RpcCallReturn { 'phone.getCallConfig': tl.TypeDataJSON 'phone.requestCall': tl.phone.TypePhoneCall 'phone.acceptCall': tl.phone.TypePhoneCall 'phone.confirmCall': tl.phone.TypePhoneCall 'phone.receivedCall': boolean 'phone.discardCall': tl.TypeUpdates 'phone.setCallRating': tl.TypeUpdates 'phone.saveCallDebug': boolean 'phone.sendSignalingData': boolean 'phone.createGroupCall': tl.TypeUpdates 'phone.joinGroupCall': tl.TypeUpdates 'phone.leaveGroupCall': tl.TypeUpdates 'phone.inviteToGroupCall': tl.TypeUpdates 'phone.discardGroupCall': tl.TypeUpdates 'phone.toggleGroupCallSettings': tl.TypeUpdates 'phone.getGroupCall': tl.phone.TypeGroupCall 'phone.getGroupParticipants': tl.phone.TypeGroupParticipants 'phone.checkGroupCall': number[] 'phone.toggleGroupCallRecord': tl.TypeUpdates 'phone.editGroupCallParticipant': tl.TypeUpdates 'phone.editGroupCallTitle': tl.TypeUpdates 'phone.getGroupCallJoinAs': tl.phone.TypeJoinAsPeers 'phone.exportGroupCallInvite': tl.phone.TypeExportedGroupCallInvite 'phone.toggleGroupCallStartSubscription': tl.TypeUpdates 'phone.startScheduledGroupCall': tl.TypeUpdates 'phone.saveDefaultGroupCallJoinAs': boolean 'phone.joinGroupCallPresentation': tl.TypeUpdates 'phone.leaveGroupCallPresentation': tl.TypeUpdates 'phone.getGroupCallStreamChannels': tl.phone.TypeGroupCallStreamChannels 'phone.getGroupCallStreamRtmpUrl': tl.phone.TypeGroupCallStreamRtmpUrl 'phone.saveCallLog': boolean 'phone.createConferenceCall': tl.TypeUpdates 'phone.deleteConferenceCallParticipants': tl.TypeUpdates 'phone.sendConferenceCallBroadcast': tl.TypeUpdates 'phone.inviteConferenceCallParticipant': tl.TypeUpdates 'phone.declineConferenceCallInvite': tl.TypeUpdates 'phone.getGroupCallChainBlocks': tl.TypeUpdates 'phone.sendGroupCallMessage': tl.TypeUpdates 'phone.sendGroupCallEncryptedMessage': boolean 'phone.deleteGroupCallMessages': tl.TypeUpdates 'phone.deleteGroupCallParticipantMessages': tl.TypeUpdates 'phone.getGroupCallStars': tl.phone.TypeGroupCallStars 'phone.saveDefaultSendAs': boolean } /** * Phone call */ type TypePhoneCall = tl.phone.RawPhoneCall function isAnyPhoneCall(o: object): o is TypePhoneCall /** * Contains info about a group call, and partial info about its * participants. */ type TypeGroupCall = tl.phone.RawGroupCall function isAnyGroupCall(o: object): o is TypeGroupCall /** * Info about the participants of a group call or livestream */ type TypeGroupParticipants = tl.phone.RawGroupParticipants function isAnyGroupParticipants(o: object): o is TypeGroupParticipants /** * A list of peers that can be used to join a group call, * presenting yourself as a specific user/channel. */ type TypeJoinAsPeers = tl.phone.RawJoinAsPeers function isAnyJoinAsPeers(o: object): o is TypeJoinAsPeers /** * An exported group call invitation. */ type TypeExportedGroupCallInvite = tl.phone.RawExportedGroupCallInvite function isAnyExportedGroupCallInvite(o: object): o is TypeExportedGroupCallInvite /** * Info about RTMP streams in a group call or livestream */ type TypeGroupCallStreamChannels = tl.phone.RawGroupCallStreamChannels function isAnyGroupCallStreamChannels(o: object): o is TypeGroupCallStreamChannels /** * RTMP URL and stream key to be used in streaming software */ type TypeGroupCallStreamRtmpUrl = tl.phone.RawGroupCallStreamRtmpUrl function isAnyGroupCallStreamRtmpUrl(o: object): o is TypeGroupCallStreamRtmpUrl type TypeGroupCallStars = tl.phone.RawGroupCallStars function isAnyGroupCallStars(o: object): o is TypeGroupCallStars } namespace stats { /** * Channel * statistics. */ interface RawBroadcastStats { _: 'stats.broadcastStats'; /** * Period in consideration */ period: tl.TypeStatsDateRangeDays; /** * Follower count change for period in consideration */ followers: tl.TypeStatsAbsValueAndPrev; /** * 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). */ viewsPerPost: tl.TypeStatsAbsValueAndPrev; /** * 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) */ sharesPerPost: tl.TypeStatsAbsValueAndPrev; /** * 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) */ reactionsPerPost: tl.TypeStatsAbsValueAndPrev; /** * 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) */ viewsPerStory: tl.TypeStatsAbsValueAndPrev; /** * 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) */ sharesPerStory: tl.TypeStatsAbsValueAndPrev; /** * 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) */ reactionsPerStory: tl.TypeStatsAbsValueAndPrev; /** * Percentage of subscribers with enabled notifications */ enabledNotifications: tl.TypeStatsPercentValue; /** * Channel growth graph (absolute subscriber count) */ growthGraph: tl.TypeStatsGraph; /** * Followers growth graph (relative subscriber count) */ followersGraph: tl.TypeStatsGraph; /** * Muted users graph (relative) */ muteGraph: tl.TypeStatsGraph; /** * Views per hour graph (absolute) */ topHoursGraph: tl.TypeStatsGraph; /** * Interactions graph (absolute) */ interactionsGraph: tl.TypeStatsGraph; /** * IV interactions graph (absolute) */ ivInteractionsGraph: tl.TypeStatsGraph; /** * Views by source graph (absolute) */ viewsBySourceGraph: tl.TypeStatsGraph; /** * New followers by source graph (absolute) */ newFollowersBySourceGraph: tl.TypeStatsGraph; /** * Subscriber language graph (pie chart) */ languagesGraph: tl.TypeStatsGraph; /** * A graph containing the number of reactions on posts * categorized by emotion */ reactionsByEmotionGraph: tl.TypeStatsGraph; /** * A graph containing the number of story views and shares */ storyInteractionsGraph: tl.TypeStatsGraph; /** * A graph containing the number of reactions on stories * categorized by emotion */ storyReactionsByEmotionGraph: tl.TypeStatsGraph; /** * Detailed statistics about number of views and shares of * recently sent messages and stories */ recentPostsInteractions: tl.TypePostInteractionCounters[]; } /** * Supergroup * statistics */ interface RawMegagroupStats { _: 'stats.megagroupStats'; /** * Period in consideration */ period: tl.TypeStatsDateRangeDays; /** * Member count change for period in consideration */ members: tl.TypeStatsAbsValueAndPrev; /** * Message number change for period in consideration */ messages: tl.TypeStatsAbsValueAndPrev; /** * Number of users that viewed messages, for range in * consideration */ viewers: tl.TypeStatsAbsValueAndPrev; /** * Number of users that posted messages, for range in * consideration */ posters: tl.TypeStatsAbsValueAndPrev; /** * Supergroup growth graph (absolute subscriber count) */ growthGraph: tl.TypeStatsGraph; /** * Members growth (relative subscriber count) */ membersGraph: tl.TypeStatsGraph; /** * New members by source graph */ newMembersBySourceGraph: tl.TypeStatsGraph; /** * Subscriber language graph (pie chart) */ languagesGraph: tl.TypeStatsGraph; /** * Message activity graph (stacked bar graph, message type) */ messagesGraph: tl.TypeStatsGraph; /** * Group activity graph (deleted, modified messages, blocked * users) */ actionsGraph: tl.TypeStatsGraph; /** * Activity per hour graph (absolute) */ topHoursGraph: tl.TypeStatsGraph; /** * Activity per day of week graph (absolute) */ weekdaysGraph: tl.TypeStatsGraph; /** * Info about most active group members */ topPosters: tl.TypeStatsGroupTopPoster[]; /** * Info about most active group admins */ topAdmins: tl.TypeStatsGroupTopAdmin[]; /** * Info about most active group inviters */ topInviters: tl.TypeStatsGroupTopInviter[]; /** * Info about users mentioned in statistics */ users: tl.TypeUser[]; } /** * Message statistics */ interface RawMessageStats { _: 'stats.messageStats'; /** * Message view graph */ viewsGraph: tl.TypeStatsGraph; /** * A graph containing the number of reactions on stories * categorized by emotion */ reactionsByEmotionGraph: tl.TypeStatsGraph; } /** * Contains * statistics * about a * story. */ interface RawStoryStats { _: 'stats.storyStats'; /** * A graph containing the number of story views and shares */ viewsGraph: tl.TypeStatsGraph; /** * A bar graph containing the number of story reactions * categorized by "emotion" (i.e. Positive, Negative, Other, * etc...) */ reactionsByEmotionGraph: tl.TypeStatsGraph; } /** * Contains info about the forwards of a * story * as a message to public chats and reposts by public channels. */ interface RawPublicForwards { _: 'stats.publicForwards'; /** * Total number of results */ count: number; /** * Info about the forwards of a story. */ forwards: tl.TypePublicForward[]; /** * Offset used for * pagination. */ nextOffset?: string; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Get * channel * statistics * * RPC method returns {@link tl.stats.TypeBroadcastStats} */ interface RawGetBroadcastStatsRequest { _: 'stats.getBroadcastStats'; /** * Whether to enable dark theme for graph colors */ dark?: boolean; /** * The channel */ channel: tl.TypeInputChannel; } /** * Load * channel * statistics graph asynchronously * * RPC method returns {@link tl.TypeStatsGraph} */ interface RawLoadAsyncGraphRequest { _: 'stats.loadAsyncGraph'; /** * Graph token from {@link RawStatsGraphAsync} constructor */ token: string; /** * Zoom value, if required */ x?: Long; } /** * Get * supergroup * statistics * * RPC method returns {@link tl.stats.TypeMegagroupStats} */ interface RawGetMegagroupStatsRequest { _: 'stats.getMegagroupStats'; /** * Whether to enable dark theme for graph colors */ dark?: boolean; /** * Supergroup * ID */ channel: tl.TypeInputChannel; } /** * Obtains a list of messages, indicating to which other public * channels was a channel message forwarded. * * * Will return a list of {@link RawMessage} with * peer_id equal to the public channel to which * this message was forwarded. * * RPC method returns {@link tl.stats.TypePublicForwards} */ interface RawGetMessagePublicForwardsRequest { _: 'stats.getMessagePublicForwards'; /** * Source channel */ channel: tl.TypeInputChannel; /** * Source message ID */ msgId: number; /** * Offset for * pagination, * 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 */ limit: number; } /** * Get * message * statistics * * RPC method returns {@link tl.stats.TypeMessageStats} */ interface RawGetMessageStatsRequest { _: 'stats.getMessageStats'; /** * Whether to enable dark theme for graph colors */ dark?: boolean; /** * Channel ID */ channel: tl.TypeInputChannel; /** * Message ID */ msgId: number; } /** * Get * statistics * for a certain * story. * * RPC method returns {@link tl.stats.TypeStoryStats} */ interface RawGetStoryStatsRequest { _: 'stats.getStoryStats'; /** * Whether to enable the dark theme for graph colors */ dark?: boolean; /** * The peer that posted the story */ peer: tl.TypeInputPeer; /** * Story ID */ id: number; } /** * Obtain forwards of a * story * as a message to public chats and reposts by public channels. * * RPC method returns {@link tl.stats.TypePublicForwards} */ interface RawGetStoryPublicForwardsRequest { _: 'stats.getStoryPublicForwards'; /** * Peer where the story was originally posted */ peer: tl.TypeInputPeer; /** * Story * ID */ id: number; /** * Offset for pagination, from * {@link stats.RawPublicForwards}.next_offset. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } interface RpcCallReturn { 'stats.getBroadcastStats': tl.stats.TypeBroadcastStats 'stats.loadAsyncGraph': tl.TypeStatsGraph 'stats.getMegagroupStats': tl.stats.TypeMegagroupStats 'stats.getMessagePublicForwards': tl.stats.TypePublicForwards 'stats.getMessageStats': tl.stats.TypeMessageStats 'stats.getStoryStats': tl.stats.TypeStoryStats 'stats.getStoryPublicForwards': tl.stats.TypePublicForwards } /** * Channel statistics */ type TypeBroadcastStats = tl.stats.RawBroadcastStats function isAnyBroadcastStats(o: object): o is TypeBroadcastStats /** * Supergroup statistics */ type TypeMegagroupStats = tl.stats.RawMegagroupStats function isAnyMegagroupStats(o: object): o is TypeMegagroupStats /** * Message statistics */ type TypeMessageStats = tl.stats.RawMessageStats function isAnyMessageStats(o: object): o is TypeMessageStats /** * Contains * statistics * about a * story. */ type TypeStoryStats = tl.stats.RawStoryStats function isAnyStoryStats(o: object): o is TypeStoryStats /** * Contains info about the forwards of a * story * as a message to public chats and reposts by public channels. */ type TypePublicForwards = tl.stats.RawPublicForwards function isAnyPublicForwards(o: object): o is TypePublicForwards } namespace stickers { /** * A suggested short name for a stickerpack */ interface RawSuggestedShortName { _: 'stickers.suggestedShortName'; /** * Suggested short name */ shortName: string; } /** * Create a stickerset. * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawCreateStickerSetRequest { _: 'stickers.createStickerSet'; /** * Whether this is a mask stickerset */ masks?: boolean; /** * Whether this is a * custom * emoji stickerset. */ emojis?: boolean; /** * 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. */ textColor?: boolean; /** * Stickerset owner */ userId: tl.TypeInputUser; /** * Stickerset name, 1-64 chars */ title: string; /** * Short name of sticker set, to be used in * sticker * deep 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. */ shortName: string; /** * Thumbnail */ thumb?: tl.TypeInputDocument; /** * Stickers */ stickers: tl.TypeInputStickerSetItem[]; /** * Used when * importing * stickers using the sticker import SDKs, specifies the * name of the software that created the stickers */ software?: string; } /** * Remove a sticker from the set where it belongs. The sticker * set must have been created by the current user/bot. * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawRemoveStickerFromSetRequest { _: 'stickers.removeStickerFromSet'; /** * The sticker to remove */ sticker: tl.TypeInputDocument; } /** * Changes the absolute position of a sticker in the set to * which it belongs. The sticker set must have been created by * the current user/bot. * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawChangeStickerPositionRequest { _: 'stickers.changeStickerPosition'; /** * The sticker */ sticker: tl.TypeInputDocument; /** * The new position of the sticker, zero-based */ position: number; } /** * Add a sticker to a stickerset. The sticker set must have * been created by the current user/bot. * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawAddStickerToSetRequest { _: 'stickers.addStickerToSet'; /** * The stickerset */ stickerset: tl.TypeInputStickerSet; /** * The sticker */ sticker: tl.TypeInputStickerSetItem; } /** * Set stickerset thumbnail * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawSetStickerSetThumbRequest { _: 'stickers.setStickerSetThumb'; /** * Stickerset */ stickerset: tl.TypeInputStickerSet; /** * Thumbnail (only for normal stickersets, not custom emoji * stickersets). */ thumb?: tl.TypeInputDocument; /** * Only for * custom * emoji stickersets, 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. */ thumbDocumentId?: Long; } /** * Check whether the given short name is available * * RPC method returns boolean */ interface RawCheckShortNameRequest { _: 'stickers.checkShortName'; /** * Short name */ shortName: string; } /** * Suggests a short name for a given stickerpack name * * RPC method returns * {@link tl.stickers.TypeSuggestedShortName} */ interface RawSuggestShortNameRequest { _: 'stickers.suggestShortName'; /** * Sticker pack name */ title: string; } /** * Update the keywords, emojis or * mask * coordinates of a sticker. * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawChangeStickerRequest { _: 'stickers.changeSticker'; /** * The sticker */ sticker: tl.TypeInputDocument; /** * If set, updates the emoji list associated to the sticker */ emoji?: string; /** * If set, updates the * mask * coordinates */ maskCoords?: tl.TypeMaskCoords; /** * If set, updates the sticker keywords (separated by commas). * Can't be provided for mask stickers. */ keywords?: string; } /** * Renames a stickerset. * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawRenameStickerSetRequest { _: 'stickers.renameStickerSet'; /** * Stickerset to rename */ stickerset: tl.TypeInputStickerSet; /** * New stickerset title */ title: string; } /** * Deletes a stickerset we created. * * RPC method returns boolean */ interface RawDeleteStickerSetRequest { _: 'stickers.deleteStickerSet'; /** * Stickerset to delete */ stickerset: tl.TypeInputStickerSet; } /** * Replace a sticker in a * stickerset * ». * * RPC method returns {@link tl.messages.TypeStickerSet} */ interface RawReplaceStickerRequest { _: 'stickers.replaceSticker'; /** * Old sticker document. */ sticker: tl.TypeInputDocument; /** * New sticker. */ newSticker: tl.TypeInputStickerSetItem; } interface RpcCallReturn { 'stickers.createStickerSet': tl.messages.TypeStickerSet 'stickers.removeStickerFromSet': tl.messages.TypeStickerSet 'stickers.changeStickerPosition': tl.messages.TypeStickerSet 'stickers.addStickerToSet': tl.messages.TypeStickerSet 'stickers.setStickerSetThumb': tl.messages.TypeStickerSet 'stickers.checkShortName': boolean 'stickers.suggestShortName': tl.stickers.TypeSuggestedShortName 'stickers.changeSticker': tl.messages.TypeStickerSet 'stickers.renameStickerSet': tl.messages.TypeStickerSet 'stickers.deleteStickerSet': boolean 'stickers.replaceSticker': tl.messages.TypeStickerSet } /** * A suggested short name for the specified stickerpack */ type TypeSuggestedShortName = tl.stickers.RawSuggestedShortName function isAnySuggestedShortName(o: object): o is TypeSuggestedShortName } namespace users { /** * Full user information */ interface RawUserFull { _: 'users.userFull'; /** * Full user information */ fullUser: tl.TypeUserFull; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Describes a list of users (or bots). */ interface RawUsers { _: 'users.users'; /** * Users */ users: tl.TypeUser[]; } /** * Describes a partial list of users. */ interface RawUsersSlice { _: 'users.usersSlice'; /** * Total number of users (bigger than the users specified in * users) */ count: number; /** * Subset of users. */ users: tl.TypeUser[]; } /** * This subset of the songs currently pinned on a user's * profile hasn't changed, see * here * » for more info. */ interface RawSavedMusicNotModified { _: 'users.savedMusicNotModified'; /** * Total number of songs on the user's profile. */ count: number; } /** * List of songs currently pinned on a user's profile, see * here * » for more info. */ interface RawSavedMusic { _: 'users.savedMusic'; /** * Total number of songs (can be bigger than * documents depending on the passed * limit, and the default maximum * limit in which case pagination is required). */ count: number; /** * Songs. */ documents: tl.TypeDocument[]; } /** * Returns basic user info according to their identifiers. * * RPC method returns {@link tl.TypeUser} array */ interface RawGetUsersRequest { _: 'users.getUsers'; /** * List of user identifiers */ id: tl.TypeInputUser[]; } /** * Returns extended user info by ID. * * RPC method returns {@link tl.users.TypeUserFull} */ interface RawGetFullUserRequest { _: 'users.getFullUser'; /** * User ID */ id: tl.TypeInputUser; } /** * Notify the user that the sent * 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). * * Use this if the data submitted by the user doesn't satisfy * the standards your service requires for any reason. For * example, if a birthday date seems invalid, a submitted * document is blurry, a scan shows evidence of tampering, etc. * Supply some details in the error message to make sure the * user knows how to correct the issues. * * RPC method returns boolean */ interface RawSetSecureValueErrorsRequest { _: 'users.setSecureValueErrors'; /** * The user */ id: tl.TypeInputUser; /** * Errors */ errors: tl.TypeSecureValueError[]; } /** * Check whether we can write to the specified users, used to * implement bulk checks for * Premium-only * messages » and * paid * messages ». * * For each input user, returns a * RequirementToContact * constructor (at the same offset in the vector) containing * requirements to contact them. * * RPC method returns {@link tl.TypeRequirementToContact} array */ interface RawGetRequirementsToContactRequest { _: 'users.getRequirementsToContact'; /** * Users to check. */ id: tl.TypeInputUser[]; } /** * Get songs * pinned * to the user's profile, see here » for more info. * * RPC method returns {@link tl.users.TypeSavedMusic} */ interface RawGetSavedMusicRequest { _: 'users.getSavedMusic'; /** * The ID of the user. */ id: tl.TypeInputUser; /** * Offset for pagination. */ offset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; /** * Hash * » of the IDs of previously added songs, to avoid * returning any result if there was no change. */ hash: Long; } /** * Check if the passed songs are still pinned to the user's * profile, or refresh the file references of songs pinned on a * user's profile * see * here » for more info. * * RPC method returns {@link tl.users.TypeSavedMusic} */ interface RawGetSavedMusicByIDRequest { _: 'users.getSavedMusicByID'; /** * The ID of the user. */ id: tl.TypeInputUser; /** * The songs (here, file_reference can be empty to * refresh file references). */ documents: tl.TypeInputDocument[]; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawSuggestBirthdayRequest { _: 'users.suggestBirthday'; id: tl.TypeInputUser; birthday: tl.TypeBirthday; } interface RpcCallReturn { 'users.getUsers': tl.TypeUser[] 'users.getFullUser': tl.users.TypeUserFull 'users.setSecureValueErrors': boolean 'users.getRequirementsToContact': tl.TypeRequirementToContact[] 'users.getSavedMusic': tl.users.TypeSavedMusic 'users.getSavedMusicByID': tl.users.TypeSavedMusic 'users.suggestBirthday': tl.TypeUpdates } /** * Full user information, with attached context peers for * reactions */ type TypeUserFull = tl.users.RawUserFull function isAnyUserFull(o: object): o is TypeUserFull /** * Describes a list of users (or bots). */ type TypeUsers = tl.users.RawUsers | tl.users.RawUsersSlice function isAnyUsers(o: object): o is TypeUsers /** * List of songs ({@link RawDocument}.ids) * currently pinned on a user's profile, see * here * » for more info. */ type TypeSavedMusic = tl.users.RawSavedMusicNotModified | tl.users.RawSavedMusic function isAnySavedMusic(o: object): o is TypeSavedMusic } namespace chatlists { /** * Info about an exported * chat * folder deep link ». */ interface RawExportedChatlistInvite { _: 'chatlists.exportedChatlistInvite'; /** * Folder ID */ filter: tl.TypeDialogFilter; /** * The exported * chat * folder deep link ». */ invite: tl.TypeExportedChatlistInvite; } /** * Info about multiple * chat * folder deep links ». */ interface RawExportedInvites { _: 'chatlists.exportedInvites'; /** * The * chat * folder deep links ». */ invites: tl.TypeExportedChatlistInvite[]; /** * Related chat information */ chats: tl.TypeChat[]; /** * Related user information */ users: tl.TypeUser[]; } /** * Updated info about a * chat * folder deep link » we already imported. */ interface RawChatlistInviteAlready { _: 'chatlists.chatlistInviteAlready'; /** * ID of the imported folder */ filterId: number; /** * New peers to be imported */ missingPeers: tl.TypePeer[]; /** * Peers that were already imported */ alreadyPeers: tl.TypePeer[]; /** * Related chat information */ chats: tl.TypeChat[]; /** * Related user information */ users: tl.TypeUser[]; } /** * Info about a * chat * folder deep link ». */ interface RawChatlistInvite { _: 'chatlists.chatlistInvite'; /** * If set, any animated emojis present in title * should not be animated and should be instead frozen on the * first frame. */ titleNoanimate?: boolean; /** * Name of the link */ title: tl.TypeTextWithEntities; /** * Emoji to use as icon for the folder. */ emoticon?: string; /** * Supergroups and channels to join */ peers: tl.TypePeer[]; /** * Related chat information */ chats: tl.TypeChat[]; /** * Related user information */ users: tl.TypeUser[]; } /** * Updated information about a * chat * folder deep link ». */ interface RawChatlistUpdates { _: 'chatlists.chatlistUpdates'; /** * New peers to join */ missingPeers: tl.TypePeer[]; /** * Related chat information */ chats: tl.TypeChat[]; /** * Related user information */ users: tl.TypeUser[]; } /** * Export a * folder * », creating a * chat * folder deep link ». * * RPC method returns * {@link tl.chatlists.TypeExportedChatlistInvite} */ interface RawExportChatlistInviteRequest { _: 'chatlists.exportChatlistInvite'; /** * The folder to export */ chatlist: tl.TypeInputChatlist; /** * 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 when invoking the method. */ peers: tl.TypeInputPeer[]; } /** * Delete a previously created * chat * folder deep link ». * * RPC method returns boolean */ interface RawDeleteExportedInviteRequest { _: 'chatlists.deleteExportedInvite'; /** * The related folder */ chatlist: tl.TypeInputChatlist; /** * slug obtained from the * chat * folder deep link ». */ slug: string; } /** * Edit a * chat * folder deep link ». * * RPC method returns {@link tl.TypeExportedChatlistInvite} */ interface RawEditExportedInviteRequest { _: 'chatlists.editExportedInvite'; /** * Folder ID */ chatlist: tl.TypeInputChatlist; /** * slug obtained from the * chat * folder deep link ». */ 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?: tl.TypeInputPeer[]; } /** * List all * chat * folder deep links » associated to a folder * * RPC method returns {@link tl.chatlists.TypeExportedInvites} */ interface RawGetExportedInvitesRequest { _: 'chatlists.getExportedInvites'; /** * The folder */ chatlist: tl.TypeInputChatlist; } /** * Obtain information about a * chat * folder deep link ». * * RPC method returns {@link tl.chatlists.TypeChatlistInvite} */ interface RawCheckChatlistInviteRequest { _: 'chatlists.checkChatlistInvite'; /** * slug obtained from the * chat * folder deep link » */ slug: string; } /** * Import a * chat * folder deep link », joining some or all the chats in the * folder. * * RPC method returns {@link tl.TypeUpdates} */ interface RawJoinChatlistInviteRequest { _: 'chatlists.joinChatlistInvite'; /** * slug obtained from a * chat * folder deep link ». */ slug: string; /** * List of new chats to join, fetched using * {@link chatlists.RawCheckChatlistInviteRequest} and filtered * as specified in the * documentation * ». */ peers: tl.TypeInputPeer[]; } /** * Fetch new chats associated with an imported * chat * folder deep link ». Must be invoked at most every * chatlist_update_period seconds (as per the * related * client * configuration parameter »). * * RPC method returns {@link tl.chatlists.TypeChatlistUpdates} */ interface RawGetChatlistUpdatesRequest { _: 'chatlists.getChatlistUpdates'; /** * The folder */ chatlist: tl.TypeInputChatlist; } /** * Join channels and supergroups recently added to a * chat * folder deep link ». * * RPC method returns {@link tl.TypeUpdates} */ interface RawJoinChatlistUpdatesRequest { _: 'chatlists.joinChatlistUpdates'; /** * The folder */ chatlist: tl.TypeInputChatlist; /** * List of new chats to join, fetched using * {@link chatlists.RawGetChatlistUpdatesRequest} and filtered * as specified in the * documentation * ». */ peers: tl.TypeInputPeer[]; } /** * Dismiss new pending peers recently added to a * chat * folder deep link ». * * RPC method returns boolean */ interface RawHideChatlistUpdatesRequest { _: 'chatlists.hideChatlistUpdates'; /** * The folder */ chatlist: tl.TypeInputChatlist; } /** * Returns identifiers of pinned or always included chats from * a chat folder imported using a * chat * folder deep link », which are suggested to be left when * the chat folder is deleted. * * RPC method returns {@link tl.TypePeer} array */ interface RawGetLeaveChatlistSuggestionsRequest { _: 'chatlists.getLeaveChatlistSuggestions'; /** * Folder ID */ chatlist: tl.TypeInputChatlist; } /** * Delete a folder imported using a * chat * folder deep link » * * RPC method returns {@link tl.TypeUpdates} */ interface RawLeaveChatlistRequest { _: 'chatlists.leaveChatlist'; /** * Folder ID */ chatlist: tl.TypeInputChatlist; /** * Also leave the specified channels and groups */ peers: tl.TypeInputPeer[]; } interface RpcCallReturn { 'chatlists.exportChatlistInvite': tl.chatlists.TypeExportedChatlistInvite 'chatlists.deleteExportedInvite': boolean 'chatlists.editExportedInvite': tl.TypeExportedChatlistInvite 'chatlists.getExportedInvites': tl.chatlists.TypeExportedInvites 'chatlists.checkChatlistInvite': tl.chatlists.TypeChatlistInvite 'chatlists.joinChatlistInvite': tl.TypeUpdates 'chatlists.getChatlistUpdates': tl.chatlists.TypeChatlistUpdates 'chatlists.joinChatlistUpdates': tl.TypeUpdates 'chatlists.hideChatlistUpdates': boolean 'chatlists.getLeaveChatlistSuggestions': tl.TypePeer[] 'chatlists.leaveChatlist': tl.TypeUpdates } /** * Exported * chat * folder deep link ». */ type TypeExportedChatlistInvite = tl.chatlists.RawExportedChatlistInvite function isAnyExportedChatlistInvite(o: object): o is TypeExportedChatlistInvite /** * A list of exported * chat * folder deep links ». */ type TypeExportedInvites = tl.chatlists.RawExportedInvites function isAnyExportedInvites(o: object): o is TypeExportedInvites /** * Info about a * chat * folder deep link ». */ type TypeChatlistInvite = tl.chatlists.RawChatlistInviteAlready | tl.chatlists.RawChatlistInvite function isAnyChatlistInvite(o: object): o is TypeChatlistInvite /** * Updated info about a * chat * folder deep link ». */ type TypeChatlistUpdates = tl.chatlists.RawChatlistUpdates function isAnyChatlistUpdates(o: object): o is TypeChatlistUpdates } namespace bots { /** * Localized information about a bot. */ interface RawBotInfo { _: 'bots.botInfo'; /** * Bot name */ name: string; /** * Bot about text */ about: string; /** * Bot description */ description: string; } /** * Popular * Main * Mini Apps, to be used in the * apps * tab of global search ». */ interface RawPopularAppBots { _: 'bots.popularAppBots'; /** * Offset for * pagination. */ nextOffset?: string; /** * The bots associated to each * Main * Mini App, see here » for more info. */ users: tl.TypeUser[]; } /** * Contains info about * Main * Mini App previews, see here » for more info. */ interface RawPreviewInfo { _: 'bots.previewInfo'; /** * All preview medias for the language code passed to * {@link bots.RawGetPreviewInfoRequest}. */ media: tl.TypeBotPreviewMedia[]; /** * All available language codes for which preview medias were * uploaded (regardless of the language code passed to * {@link bots.RawGetPreviewInfoRequest}). */ langCodes: string[]; } /** * Sends a custom request; for bots only * * RPC method returns {@link tl.TypeDataJSON} */ interface RawSendCustomRequestRequest { _: 'bots.sendCustomRequest'; /** * The method name */ customMethod: string; /** * JSON-serialized method parameters */ params: tl.TypeDataJSON; } /** * Answers a custom query; for bots only * * RPC method returns boolean */ interface RawAnswerWebhookJSONQueryRequest { _: 'bots.answerWebhookJSONQuery'; /** * Identifier of a custom query */ queryId: Long; /** * JSON-serialized answer to the query */ data: tl.TypeDataJSON; } /** * Set bot command list * * RPC method returns boolean */ interface RawSetBotCommandsRequest { _: 'bots.setBotCommands'; /** * Command scope */ scope: tl.TypeBotCommandScope; /** * Language code */ langCode: string; /** * Bot commands */ commands: tl.TypeBotCommand[]; } /** * Clear bot commands for the specified bot scope and language * code * * RPC method returns boolean */ interface RawResetBotCommandsRequest { _: 'bots.resetBotCommands'; /** * Command scope */ scope: tl.TypeBotCommandScope; /** * Language code */ langCode: string; } /** * Obtain a list of bot commands for the specified bot scope * and language code * * RPC method returns {@link tl.TypeBotCommand} array */ interface RawGetBotCommandsRequest { _: 'bots.getBotCommands'; /** * Command scope */ scope: tl.TypeBotCommandScope; /** * Language code */ langCode: string; } /** * Sets the * menu * button action » for a given user or for all users * * RPC method returns boolean */ interface RawSetBotMenuButtonRequest { _: 'bots.setBotMenuButton'; /** * User ID */ userId: tl.TypeInputUser; /** * Bot menu button action */ button: tl.TypeBotMenuButton; } /** * Gets the menu button action for a given user or for all * users, previously set using * {@link bots.RawSetBotMenuButtonRequest}; users can see this * information in the {@link RawBotInfo} constructor. * * RPC method returns {@link tl.TypeBotMenuButton} */ interface RawGetBotMenuButtonRequest { _: 'bots.getBotMenuButton'; /** * User ID or empty for the default menu button. */ userId: tl.TypeInputUser; } /** * Set the default * suggested * admin rights for bots being added as admins to channels, * see * here * for more info on how to handle them ». * * RPC method returns boolean */ interface RawSetBotBroadcastDefaultAdminRightsRequest { _: 'bots.setBotBroadcastDefaultAdminRights'; /** * Admin rights */ adminRights: tl.TypeChatAdminRights; } /** * Set the default * suggested * admin rights for bots being added as admins to groups, * see * here * for more info on how to handle them ». * * RPC method returns boolean */ interface RawSetBotGroupDefaultAdminRightsRequest { _: 'bots.setBotGroupDefaultAdminRights'; /** * Admin rights */ adminRights: tl.TypeChatAdminRights; } /** * Set localized name, about text and description of a bot (or * of the current account, if called by a bot). * * RPC method returns boolean */ interface RawSetBotInfoRequest { _: 'bots.setBotInfo'; /** * If called by a user, must contain the peer * of a bot we own. */ bot?: tl.TypeInputUser; /** * Language code, if left empty update the fallback about text * and description */ langCode: string; /** * New bot name */ name?: string; /** * New about text */ about?: string; /** * New description */ description?: string; } /** * Get localized name, about text and description of a bot (or * of the current account, if called by a bot). * * RPC method returns {@link tl.bots.TypeBotInfo} */ interface RawGetBotInfoRequest { _: 'bots.getBotInfo'; /** * If called by a user, must contain the peer * of a bot we own. */ bot?: tl.TypeInputUser; /** * Language code, if left empty this method will return the * fallback about text and description. */ langCode: string; } /** * Reorder usernames associated to a bot we own. * * RPC method returns boolean */ interface RawReorderUsernamesRequest { _: 'bots.reorderUsernames'; /** * The bot */ bot: tl.TypeInputUser; /** * The new order for active usernames. All active usernames * must be specified. */ order: string[]; } /** * Activate or deactivate a purchased * fragment.com username * associated to a bot we own. * * RPC method returns boolean */ interface RawToggleUsernameRequest { _: 'bots.toggleUsername'; /** * The bot */ bot: tl.TypeInputUser; /** * Username */ username: string; /** * Whether to activate or deactivate it */ active: boolean; } /** * Check whether the specified bot can send us messages * * RPC method returns boolean */ interface RawCanSendMessageRequest { _: 'bots.canSendMessage'; /** * The bot */ bot: tl.TypeInputUser; } /** * Allow the specified bot to send us messages * * RPC method returns {@link tl.TypeUpdates} */ interface RawAllowSendMessageRequest { _: 'bots.allowSendMessage'; /** * The bot */ bot: tl.TypeInputUser; } /** * Send a custom request from a * mini * bot app, triggered by a * web_app_invoke_custom_method * event ». * * The response should be sent using a * custom_method_invoked * event, * see * here » for more info on the flow. * * RPC method returns {@link tl.TypeDataJSON} */ interface RawInvokeWebViewCustomMethodRequest { _: 'bots.invokeWebViewCustomMethod'; /** * Identifier of the bot associated to the * mini * bot app */ bot: tl.TypeInputUser; /** * Identifier of the custom method to invoke */ customMethod: string; /** * Method parameters */ params: tl.TypeDataJSON; } /** * Fetch popular * Main * Mini Apps, to be used in the * apps * tab of global search ». * * RPC method returns {@link tl.bots.TypePopularAppBots} */ interface RawGetPopularAppBotsRequest { _: 'bots.getPopularAppBots'; /** * Offset for * pagination, * initially an empty string, then re-use the * next_offset returned by the previous query. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Add a * main * mini app preview, see here » for more info. * * Only owners of bots with a configured Main Mini App can use * this method, see * see * here » for more info on how to check if you can invoke * this method. * * RPC method returns {@link tl.TypeBotPreviewMedia} */ interface RawAddPreviewMediaRequest { _: 'bots.addPreviewMedia'; /** * The bot that owns the Main Mini App. */ bot: tl.TypeInputUser; /** * ISO 639-1 language code, indicating the localization of the * preview to add. */ langCode: string; /** * The photo/video preview, uploaded using * {@link messages.RawUploadMediaRequest}. */ media: tl.TypeInputMedia; } /** * Edit a * main * mini app preview, see here » for more info. * * Only owners of bots with a configured Main Mini App can use * this method, see * see * here » for more info on how to check if you can invoke * this method. * * RPC method returns {@link tl.TypeBotPreviewMedia} */ interface RawEditPreviewMediaRequest { _: 'bots.editPreviewMedia'; /** * The bot that owns the Main Mini App. */ bot: tl.TypeInputUser; /** * ISO 639-1 language code, indicating the localization of the * preview to edit. */ langCode: string; /** * The photo/video preview to replace, previously fetched as * specified * here * ». */ media: tl.TypeInputMedia; /** * The new photo/video preview, uploaded using * {@link messages.RawUploadMediaRequest}. */ newMedia: tl.TypeInputMedia; } /** * Delete a * main * mini app preview, see here » for more info. * * Only owners of bots with a configured Main Mini App can use * this method, see * see * here » for more info on how to check if you can invoke * this method. * * RPC method returns boolean */ interface RawDeletePreviewMediaRequest { _: 'bots.deletePreviewMedia'; /** * The bot that owns the Main Mini App. */ bot: tl.TypeInputUser; /** * ISO 639-1 language code, indicating the localization of the * preview to delete. */ langCode: string; /** * The photo/video preview to delete, previously fetched as * specified * here * ». */ media: tl.TypeInputMedia[]; } /** * Reorder a * main * mini app previews, see here » for more info. * * Only owners of bots with a configured Main Mini App can use * this method, see * see * here » for more info on how to check if you can invoke * this method. * * RPC method returns boolean */ interface RawReorderPreviewMediasRequest { _: 'bots.reorderPreviewMedias'; /** * The bot that owns the Main Mini App. */ bot: tl.TypeInputUser; /** * ISO 639-1 language code, indicating the localization of the * previews to reorder. */ langCode: string; /** * New order of the previews. */ order: tl.TypeInputMedia[]; } /** * Bot owners only, fetch * main * mini app preview information, see here » for more info. * * Note: technically non-owners may also invoke this method, * but it will always behave exactly as * {@link bots.RawGetPreviewMediasRequest}, returning only * previews for the current language and an empty * lang_codes array, regardless of the passed * lang_code, so please only use * {@link bots.RawGetPreviewMediasRequest} if you're not the * owner of the bot. * * RPC method returns {@link tl.bots.TypePreviewInfo} */ interface RawGetPreviewInfoRequest { _: 'bots.getPreviewInfo'; /** * The bot that owns the Main Mini App. */ bot: tl.TypeInputUser; /** * Fetch previews for the specified ISO 639-1 language code. */ langCode: string; } /** * Fetch * main * mini app previews, see here » for more info. * * RPC method returns {@link tl.TypeBotPreviewMedia} array */ interface RawGetPreviewMediasRequest { _: 'bots.getPreviewMedias'; /** * The bot that owns the Main Mini App. */ bot: tl.TypeInputUser; } /** * Change the emoji status of a user (invoked by bots, see * here * » for more info on the full flow) * * RPC method returns boolean */ interface RawUpdateUserEmojiStatusRequest { _: 'bots.updateUserEmojiStatus'; /** * The user whose emoji status should be changed */ userId: tl.TypeInputUser; /** * The emoji status */ emojiStatus: tl.TypeEmojiStatus; } /** * Allow or prevent a bot from * changing * our emoji status » * * RPC method returns boolean */ interface RawToggleUserEmojiStatusPermissionRequest { _: 'bots.toggleUserEmojiStatusPermission'; /** * The bot */ bot: tl.TypeInputUser; /** * Whether to allow or prevent the bot from changing our emoji * status */ enabled: boolean; } /** * Check if a * mini * app can request the download of a specific file: called * when handling * web_app_request_file_download * events » * * RPC method returns boolean */ interface RawCheckDownloadFileParamsRequest { _: 'bots.checkDownloadFileParams'; /** * The bot that owns the * mini * app that requested the download */ bot: tl.TypeInputUser; /** * The filename from the * web_app_request_file_download * event » */ fileName: string; /** * The url from the * web_app_request_file_download * event » */ url: string; } /** * Get a list of bots owned by the current user * * RPC method returns {@link tl.TypeUser} array */ interface RawGetAdminedBotsRequest { _: 'bots.getAdminedBots'; } /** * Create, edit or delete the * affiliate * program of a bot we own * * RPC method returns {@link tl.TypeStarRefProgram} */ interface RawUpdateStarRefProgramRequest { _: 'bots.updateStarRefProgram'; /** * The bot */ bot: tl.TypeInputUser; /** * The permille commission rate: it indicates the share of * Telegram Stars received by affiliates for every transaction * made by users they referred inside of the bot. * * The minimum and maximum values for this parameter are * contained in the * starref_min_commission_permille * and * starref_max_commission_permille * client configuration parameters. * * Can be 0 to terminate the affiliate program. * * Both the duration and the commission may only be raised * after creation of the program: to lower them, the program * must first be terminated and a new one created. */ commissionPermille: number; /** * Indicates the duration of the affiliate program; if not set, * there is no expiration date. */ durationMonths?: number; } /** * Verify a user or chat * on * behalf of an organization ». * * RPC method returns boolean */ interface RawSetCustomVerificationRequest { _: 'bots.setCustomVerification'; /** * If set, adds the verification; otherwise removes * verification. */ enabled?: boolean; /** * Must not be set if invoked by a bot, * must be set to the ID of an owned bot if * invoked by a user. */ bot?: tl.TypeInputUser; /** * The peer to verify */ peer: tl.TypeInputPeer; /** * Custom description for the verification, the UTF-8 length * limit for this field is contained in * bot_verification_description_length_limit * ». * * If not set, Was verified by organization * "organization_name" will be used as description. */ customDescription?: string; } /** * Obtain a list of similarly themed bots, selected based on * similarities in their subscriber bases, see * here * » for more info. * * RPC method returns {@link tl.users.TypeUsers} */ interface RawGetBotRecommendationsRequest { _: 'bots.getBotRecommendations'; /** * The method will return bots related to the passed bot. */ bot: tl.TypeInputUser; } interface RpcCallReturn { 'bots.sendCustomRequest': tl.TypeDataJSON 'bots.answerWebhookJSONQuery': boolean 'bots.setBotCommands': boolean 'bots.resetBotCommands': boolean 'bots.getBotCommands': tl.TypeBotCommand[] 'bots.setBotMenuButton': boolean 'bots.getBotMenuButton': tl.TypeBotMenuButton 'bots.setBotBroadcastDefaultAdminRights': boolean 'bots.setBotGroupDefaultAdminRights': boolean 'bots.setBotInfo': boolean 'bots.getBotInfo': tl.bots.TypeBotInfo 'bots.reorderUsernames': boolean 'bots.toggleUsername': boolean 'bots.canSendMessage': boolean 'bots.allowSendMessage': tl.TypeUpdates 'bots.invokeWebViewCustomMethod': tl.TypeDataJSON 'bots.getPopularAppBots': tl.bots.TypePopularAppBots 'bots.addPreviewMedia': tl.TypeBotPreviewMedia 'bots.editPreviewMedia': tl.TypeBotPreviewMedia 'bots.deletePreviewMedia': boolean 'bots.reorderPreviewMedias': boolean 'bots.getPreviewInfo': tl.bots.TypePreviewInfo 'bots.getPreviewMedias': tl.TypeBotPreviewMedia[] 'bots.updateUserEmojiStatus': boolean 'bots.toggleUserEmojiStatusPermission': boolean 'bots.checkDownloadFileParams': boolean 'bots.getAdminedBots': tl.TypeUser[] 'bots.updateStarRefProgram': tl.TypeStarRefProgram 'bots.setCustomVerification': boolean 'bots.getBotRecommendations': tl.users.TypeUsers } /** * Localized name, about text and description of a bot. */ type TypeBotInfo = tl.bots.RawBotInfo function isAnyBotInfo(o: object): o is TypeBotInfo /** * Popular * Main * Mini Apps, to be used in the * apps * tab of global search ». */ type TypePopularAppBots = tl.bots.RawPopularAppBots function isAnyPopularAppBots(o: object): o is TypePopularAppBots /** * Contains info about * Main * Mini App previews, see here » for more info. */ type TypePreviewInfo = tl.bots.RawPreviewInfo function isAnyPreviewInfo(o: object): o is TypePreviewInfo } namespace stories { /** * The list of active (or active and hidden) * stories * has not changed. */ interface RawAllStoriesNotModified { _: 'stories.allStoriesNotModified'; /** * State to use to ask for updates */ state: string; /** * Current * stealth * mode information */ stealthMode: tl.TypeStoriesStealthMode; } /** * Full list of active (or active and hidden) * stories. */ interface RawAllStories { _: 'stories.allStories'; /** * Whether more results can be fetched as * described * here ». */ hasMore?: boolean; /** * Total number of active (or active and hidden) stories */ count: number; /** * State to use for pagination */ state: string; /** * Stories */ peerStories: tl.TypePeerStories[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; /** * Current * stealth * mode information */ stealthMode: tl.TypeStoriesStealthMode; } /** * List of * stories */ interface RawStories { _: 'stories.stories'; /** * Total number of stories that can be fetched */ count: number; /** * Stories */ stories: tl.TypeStoryItem[]; /** * IDs of pinned stories. */ pinnedToTop?: number[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Reaction and view counters for a * story */ interface RawStoryViewsList { _: 'stories.storyViewsList'; /** * Total number of results that can be fetched */ count: number; /** * Total number of story views */ viewsCount: number; /** * Total number of story forwards/reposts */ forwardsCount: number; /** * Number of reactions that were added to the story */ reactionsCount: number; /** * Story view date and reaction information */ views: tl.TypeStoryView[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; /** * Offset for pagination */ nextOffset?: string; } /** * Reaction and view counters for a list of * stories */ interface RawStoryViews { _: 'stories.storyViews'; /** * View date and reaction information of multiple stories */ views: tl.TypeStoryViews[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Active * story list of a specific peer. */ interface RawPeerStories { _: 'stories.peerStories'; /** * Stories */ stories: tl.TypePeerStories; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * List of peers that reacted to or intercated with a specific * story */ interface RawStoryReactionsList { _: 'stories.storyReactionsList'; /** * Total number of reactions matching query */ count: number; /** * List of peers that reacted to or interacted with a specific * story */ reactions: tl.TypeStoryReaction[]; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; /** * If set, indicates the next offset to use to load more * results by invoking * {@link stories.RawGetStoryReactionsListRequest}. */ nextOffset?: string; } /** * Stories found using * global * story search ». */ interface RawFoundStories { _: 'stories.foundStories'; /** * Total number of results found for the query. */ count: number; /** * Matching stories. */ stories: tl.TypeFoundStory[]; /** * Offset used to fetch the next page, if not set this is the * final page. */ nextOffset?: string; /** * Mentioned chats */ chats: tl.TypeChat[]; /** * Mentioned users */ users: tl.TypeUser[]; } /** * Contains the number of available active story slots (equal * to the value of the * story_expiring_limit_* * client configuration parameter minus the number of * currently active stories). */ interface RawCanSendStoryCount { _: 'stories.canSendStoryCount'; /** * Remaining active story slots. */ countRemains: number; } /** * The * story * album list » hasn't changed. */ interface RawAlbumsNotModified { _: 'stories.albumsNotModified'; } /** * Story * albums ». */ interface RawAlbums { _: 'stories.albums'; /** * Hash to pass to {@link stories.RawGetAlbumsRequest} to avoid * returning any results if they haven't changed. */ hash: Long; /** * The albums. */ albums: tl.TypeStoryAlbum[]; } /** * Check whether we can post stories as the specified peer. * * RPC method returns {@link tl.stories.TypeCanSendStoryCount} */ interface RawCanSendStoryRequest { _: 'stories.canSendStory'; /** * The peer from which we wish to post stories. */ peer: tl.TypeInputPeer; } /** * Uploads a * Telegram * Story. * * May also be used in a * business * connection, not by wrapping the query in * {@link RawInvokeWithBusinessConnectionRequest}, but rather * by specifying the ID of a controlled business user in * peer. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendStoryRequest { _: 'stories.sendStory'; /** * 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 * » for more info. */ pinned?: boolean; /** * If set, disables forwards, screenshots, and downloads. */ noforwards?: boolean; /** * Set this flag when reposting stories with * fwd_from_id+fwd_from_id, if the * media was modified before reposting. */ fwdModified?: boolean; /** * The peer to send the story as. */ peer: tl.TypeInputPeer; /** * The story media. */ media: tl.TypeInputMedia; /** * Media * areas associated to the story, see * here * » for more info. */ mediaAreas?: tl.TypeMediaArea[]; /** * Story caption. */ caption?: string; /** * Message * entities for styled text, if allowed by the * stories_entities * client configuration parameter ». */ entities?: tl.TypeMessageEntity[]; /** * Privacy * rules for the story, indicating who can or can't view * the story. */ privacyRules: tl.TypeInputPrivacyRule[]; /** * Unique client message ID required to prevent message * resending. */ randomId: Long; /** * 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. */ fwdFromId?: tl.TypeInputPeer; /** * If set, indicates that this story is a repost of story with * ID fwd_from_story posted by the peer in * fwd_from_id. */ fwdFromStory?: number; /** * If set, adds the story to the specified albums. */ albums?: number[]; } /** * Edit an uploaded * story * * May also be used in a * business * connection, not by wrapping the query in * {@link RawInvokeWithBusinessConnectionRequest}, but rather * by specifying the ID of a controlled business user in * peer: in this context, the method can only be * used to edit stories posted by the same business bot on * behalf of the user with {@link stories.RawSendStoryRequest}. * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditStoryRequest { _: 'stories.editStory'; /** * Peer where the story was posted. */ peer: tl.TypeInputPeer; /** * ID of story to edit. */ id: number; /** * If specified, replaces the story media. */ media?: tl.TypeInputMedia; /** * Media * areas associated to the story, see * here * » for more info. */ mediaAreas?: tl.TypeMediaArea[]; /** * If specified, replaces the story caption. */ caption?: string; /** * Message * entities for styled text in the caption, if allowed by * the * stories_entities * client configuration parameter ». */ entities?: tl.TypeMessageEntity[]; /** * If specified, alters the * privacy * settings » of the story, changing who can or can't view * the story. */ privacyRules?: tl.TypeInputPrivacyRule[]; } /** * Deletes some posted * stories. * * RPC method returns number array */ interface RawDeleteStoriesRequest { _: 'stories.deleteStories'; /** * Channel/user from where to delete stories. */ peer: tl.TypeInputPeer; /** * IDs of stories to delete. */ id: number[]; } /** * Pin or unpin one or more stories * * RPC method returns number array */ interface RawTogglePinnedRequest { _: 'stories.togglePinned'; /** * Peer where to pin or unpin stories */ peer: tl.TypeInputPeer; /** * IDs of stories to pin or unpin */ id: number[]; /** * Whether to pin or unpin the stories */ pinned: boolean; } /** * Fetch the List of active (or active and hidden) stories, see * here * » for more info on watching stories. * * RPC method returns {@link tl.stories.TypeAllStories} */ interface RawGetAllStoriesRequest { _: 'stories.getAllStories'; /** * 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 * » for more info on the full flow. */ next?: boolean; /** * If set, fetches the hidden active story list, otherwise * fetches the active story list, see * here * » for more info on the full flow. */ hidden?: boolean; /** * 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 * » for more info on the full flow. */ state?: string; } /** * Fetch the * stories * pinned on a peer's profile. * * RPC method returns {@link tl.stories.TypeStories} */ interface RawGetPinnedStoriesRequest { _: 'stories.getPinnedStories'; /** * Peer whose pinned stories should be fetched */ peer: tl.TypeInputPeer; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Fetch the * story * archive » of a peer we control. * * RPC method returns {@link tl.stories.TypeStories} */ interface RawGetStoriesArchiveRequest { _: 'stories.getStoriesArchive'; /** * Peer whose archived stories should be fetched */ peer: tl.TypeInputPeer; /** * Offsets * for pagination, for more info click here */ offsetId: number; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Obtain full info about a set of * stories * by their IDs. * * RPC method returns {@link tl.stories.TypeStories} */ interface RawGetStoriesByIDRequest { _: 'stories.getStoriesByID'; /** * Peer where the stories were posted */ peer: tl.TypeInputPeer; /** * Story IDs */ id: number[]; } /** * Hide the active stories of a specific peer, preventing them * from being displayed on the action bar on the homescreen. * * RPC method returns boolean */ interface RawToggleAllStoriesHiddenRequest { _: 'stories.toggleAllStoriesHidden'; /** * Whether to hide or unhide all active stories of the peer */ hidden: boolean; } /** * Mark all stories up to a certain ID as read, for a given * peer; will emit an {@link RawUpdateReadStories} update to * all logged-in sessions. * * RPC method returns number array */ interface RawReadStoriesRequest { _: 'stories.readStories'; /** * The peer whose stories should be marked as read. */ peer: tl.TypeInputPeer; /** * Mark all stories up to and including this ID as read */ maxId: number; } /** * Increment the view counter of one or more stories. * * RPC method returns boolean */ interface RawIncrementStoryViewsRequest { _: 'stories.incrementStoryViews'; /** * Peer where the stories were posted. */ peer: tl.TypeInputPeer; /** * IDs of the stories (maximum 200 at a time). */ id: number[]; } /** * Obtain the list of users that have viewed a specific * story we * posted * * RPC method returns {@link tl.stories.TypeStoryViewsList} */ interface RawGetStoryViewsListRequest { _: 'stories.getStoryViewsList'; /** * Whether to only fetch view reaction/views made by our * contacts */ justContacts?: boolean; /** * Whether to return {@link RawStoryView} 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 {@link RawStoryView}s * with an associated reaction first in the list). Ignored if * forwards_first is set. */ reactionsFirst?: boolean; /** * If set, returns forwards and reposts first, then reactions, * then other views; otherwise returns interactions sorted just * by interaction date. */ forwardsFirst?: boolean; /** * Peer where the story was posted */ peer: tl.TypeInputPeer; /** * Search for specific peers */ q?: string; /** * Story ID */ id: number; /** * Offset for pagination, obtained from * {@link stories.RawStoryViewsList}.next_offset */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Obtain info about the view count, forward count, reactions * and recent viewers of one or more * stories. * * RPC method returns {@link tl.stories.TypeStoryViews} */ interface RawGetStoriesViewsRequest { _: 'stories.getStoriesViews'; /** * Peer whose stories should be fetched */ peer: tl.TypeInputPeer; /** * Story IDs */ id: number[]; } /** * Generate a * story * deep link for a specific story * * RPC method returns {@link tl.TypeExportedStoryLink} */ interface RawExportStoryLinkRequest { _: 'stories.exportStoryLink'; /** * Peer where the story was posted */ peer: tl.TypeInputPeer; /** * Story ID */ id: number; } /** * Report a story. * * RPC method returns {@link tl.TypeReportResult} */ interface RawReportRequest { _: 'stories.report'; /** * The peer that uploaded the story. */ peer: tl.TypeInputPeer; /** * IDs of the stories to report. */ id: number[]; /** * Menu option, intially empty */ option: Uint8Array; /** * Comment for report moderation */ message: string; } /** * Activates * stories * stealth mode, see * here * » for more info. * * Will return an {@link RawUpdateStoriesStealthMode}. * * RPC method returns {@link tl.TypeUpdates} */ interface RawActivateStealthModeRequest { _: 'stories.activateStealthMode'; /** * Whether to erase views from any stories opened in the past * stories_stealth_past_period * seconds », as specified by the * client * configuration. */ past?: boolean; /** * Whether to hide future story views for the next * stories_stealth_future_period * seconds », as specified by the * client * configuration. */ future?: boolean; } /** * React to a story. * * RPC method returns {@link tl.TypeUpdates} */ interface RawSendReactionRequest { _: 'stories.sendReaction'; /** * Whether to add this reaction to the * recent * reactions list ». */ addToRecent?: boolean; /** * The peer that sent the story */ peer: tl.TypeInputPeer; /** * ID of the story to react to */ storyId: number; /** * Reaction */ reaction: tl.TypeReaction; } /** * Fetch the full active * story * list of a specific peer. * * RPC method returns {@link tl.stories.TypePeerStories} */ interface RawGetPeerStoriesRequest { _: 'stories.getPeerStories'; /** * Peer whose stories should be fetched */ peer: tl.TypeInputPeer; } /** * Obtain the latest read story ID for all peers when first * logging in, returned as a list of * {@link RawUpdateReadStories} updates, see * here * » for more info. * * RPC method returns {@link tl.TypeUpdates} */ interface RawGetAllReadPeerStoriesRequest { _: 'stories.getAllReadPeerStories'; } /** * Get the IDs of the maximum read stories for a set of peers. * * RPC method returns {@link tl.TypeRecentStory} array */ interface RawGetPeerMaxIDsRequest { _: 'stories.getPeerMaxIDs'; /** * Peers */ id: tl.TypeInputPeer[]; } /** * Obtain a list of channels where the user can post * stories * * RPC method returns {@link tl.messages.TypeChats} */ interface RawGetChatsToSendRequest { _: 'stories.getChatsToSend'; } /** * Hide the active stories of a user, preventing them from * being displayed on the action bar on the homescreen, see * here * » for more info. * * RPC method returns boolean */ interface RawTogglePeerStoriesHiddenRequest { _: 'stories.togglePeerStoriesHidden'; /** * Peer whose stories should be (un)hidden. */ peer: tl.TypeInputPeer; /** * Whether to hide or unhide stories. */ hidden: boolean; } /** * Get the * reaction * and interaction list of a * story * posted to a channel, along with the sender of each reaction. * * Can only be used by channel admins. * * RPC method returns {@link tl.stories.TypeStoryReactionsList} */ interface RawGetStoryReactionsListRequest { _: 'stories.getStoryReactionsList'; /** * If set, returns forwards and reposts first, then reactions, * then other views; otherwise returns interactions sorted just * by interaction date. */ forwardsFirst?: boolean; /** * Channel */ peer: tl.TypeInputPeer; /** * Story * ID */ id: number; /** * Get only reactions of this type */ reaction?: tl.TypeReaction; /** * Offset for pagination (taken from the * next_offset field of the returned * stories.StoryReactionsList); * empty in the first request. */ offset?: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Pin some stories to the top of the profile, see * here * » for more info. * * RPC method returns boolean */ interface RawTogglePinnedToTopRequest { _: 'stories.togglePinnedToTop'; /** * Peer where to pin stories. */ peer: tl.TypeInputPeer; /** * IDs of the stories to pin (max * stories_pinned_to_top_count_max). */ id: number[]; } /** * Globally search for * stories * using a hashtag or a * location * media area, see * here * » for more info on the full flow. * * Either hashtag or * area must be set when invoking * the method. * * RPC method returns {@link tl.stories.TypeFoundStories} */ interface RawSearchPostsRequest { _: 'stories.searchPosts'; /** * Hashtag (without the #) */ hashtag?: string; /** * A {@link RawMediaAreaGeoPoint} or a * {@link RawMediaAreaVenue}. * * Note {@link RawMediaAreaGeoPoint} areas may be searched only * if they have an associated address. */ area?: tl.TypeMediaArea; /** * If set, returns only stories posted by this peer. */ peer?: tl.TypeInputPeer; /** * Offset for * pagination: * initially an empty string, then the next_offset * from the previously returned * {@link stories.RawFoundStories}. */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Creates a * story * album. * * RPC method returns {@link tl.TypeStoryAlbum} */ interface RawCreateAlbumRequest { _: 'stories.createAlbum'; /** * The owned peer where to create the album. */ peer: tl.TypeInputPeer; /** * Album name. */ title: string; /** * Stories to add to the album. */ stories: number[]; } /** * Rename a * story * albums », or add, delete or reorder stories in it. * * RPC method returns {@link tl.TypeStoryAlbum} */ interface RawUpdateAlbumRequest { _: 'stories.updateAlbum'; /** * Peer where the album is posted. */ peer: tl.TypeInputPeer; /** * Album ID. */ albumId: number; /** * New album title. */ title?: string; /** * If set, deletes the specified stories from the album. */ deleteStories?: number[]; /** * If set, adds the specified stories to the album. */ addStories?: number[]; /** * If set, reorders the stories in the album by their IDs. */ order?: number[]; } /** * Reorder * story * albums on a profile ». * * RPC method returns boolean */ interface RawReorderAlbumsRequest { _: 'stories.reorderAlbums'; /** * Peer where the albums are located. */ peer: tl.TypeInputPeer; /** * New order of the albums. */ order: number[]; } /** * Delete a * story * album. * * RPC method returns boolean */ interface RawDeleteAlbumRequest { _: 'stories.deleteAlbum'; /** * Owned peer where the album is located. */ peer: tl.TypeInputPeer; /** * ID of the album to delete. */ albumId: number; } /** * Get * story * albums created by a peer. * * RPC method returns {@link tl.stories.TypeAlbums} */ interface RawGetAlbumsRequest { _: 'stories.getAlbums'; /** * The peer. */ peer: tl.TypeInputPeer; /** * The hash from a previously returned * {@link stories.RawAlbums}, to avoid returning any results if * they haven't changed. */ hash: Long; } /** * Get stories in a * story * album ». * * RPC method returns {@link tl.stories.TypeStories} */ interface RawGetAlbumStoriesRequest { _: 'stories.getAlbumStories'; /** * Peer where the album is posted. */ peer: tl.TypeInputPeer; /** * ID of the album. */ albumId: number; /** * Offset for * pagination. */ offset: number; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * RPC method returns {@link tl.TypeUpdates} */ interface RawStartLiveRequest { _: 'stories.startLive'; pinned?: boolean; noforwards?: boolean; rtmpStream?: boolean; peer: tl.TypeInputPeer; caption?: string; /** * Message * entities for styled text */ entities?: tl.TypeMessageEntity[]; privacyRules: tl.TypeInputPrivacyRule[]; randomId: Long; messagesEnabled?: boolean; sendPaidMessagesStars?: Long; } interface RpcCallReturn { 'stories.canSendStory': tl.stories.TypeCanSendStoryCount 'stories.sendStory': tl.TypeUpdates 'stories.editStory': tl.TypeUpdates 'stories.deleteStories': number[] 'stories.togglePinned': number[] 'stories.getAllStories': tl.stories.TypeAllStories 'stories.getPinnedStories': tl.stories.TypeStories 'stories.getStoriesArchive': tl.stories.TypeStories 'stories.getStoriesByID': tl.stories.TypeStories 'stories.toggleAllStoriesHidden': boolean 'stories.readStories': number[] 'stories.incrementStoryViews': boolean 'stories.getStoryViewsList': tl.stories.TypeStoryViewsList 'stories.getStoriesViews': tl.stories.TypeStoryViews 'stories.exportStoryLink': tl.TypeExportedStoryLink 'stories.report': tl.TypeReportResult 'stories.activateStealthMode': tl.TypeUpdates 'stories.sendReaction': tl.TypeUpdates 'stories.getPeerStories': tl.stories.TypePeerStories 'stories.getAllReadPeerStories': tl.TypeUpdates 'stories.getPeerMaxIDs': tl.TypeRecentStory[] 'stories.getChatsToSend': tl.messages.TypeChats 'stories.togglePeerStoriesHidden': boolean 'stories.getStoryReactionsList': tl.stories.TypeStoryReactionsList 'stories.togglePinnedToTop': boolean 'stories.searchPosts': tl.stories.TypeFoundStories 'stories.createAlbum': tl.TypeStoryAlbum 'stories.updateAlbum': tl.TypeStoryAlbum 'stories.reorderAlbums': boolean 'stories.deleteAlbum': boolean 'stories.getAlbums': tl.stories.TypeAlbums 'stories.getAlbumStories': tl.stories.TypeStories 'stories.startLive': tl.TypeUpdates } /** * Full list of active (or active and hidden) * stories. */ type TypeAllStories = tl.stories.RawAllStoriesNotModified | tl.stories.RawAllStories function isAnyAllStories(o: object): o is TypeAllStories /** * List of * stories */ type TypeStories = tl.stories.RawStories function isAnyStories(o: object): o is TypeStories /** * Reaction and view counters for a * story */ type TypeStoryViewsList = tl.stories.RawStoryViewsList function isAnyStoryViewsList(o: object): o is TypeStoryViewsList /** * Reaction and view counters for a list of * stories */ type TypeStoryViews = tl.stories.RawStoryViews function isAnyStoryViews(o: object): o is TypeStoryViews /** * Active * story list of a specific peer. */ type TypePeerStories = tl.stories.RawPeerStories function isAnyPeerStories(o: object): o is TypePeerStories /** * List of peers that reacted to a specific * story */ type TypeStoryReactionsList = tl.stories.RawStoryReactionsList function isAnyStoryReactionsList(o: object): o is TypeStoryReactionsList /** * Stories found using * global * story search ». */ type TypeFoundStories = tl.stories.RawFoundStories function isAnyFoundStories(o: object): o is TypeFoundStories /** * Contains the number of available active story slots (equal * to the value of the * story_expiring_limit_* * client configuration parameter minus the number of * currently active stories). */ type TypeCanSendStoryCount = tl.stories.RawCanSendStoryCount function isAnyCanSendStoryCount(o: object): o is TypeCanSendStoryCount /** * Represents a list of * story * albums ». */ type TypeAlbums = tl.stories.RawAlbumsNotModified | tl.stories.RawAlbums function isAnyAlbums(o: object): o is TypeAlbums } namespace premium { /** * List of * boosts * that were applied to a peer by multiple users. */ interface RawBoostsList { _: 'premium.boostsList'; /** * Total number of results */ count: number; /** * Boosts */ boosts: tl.TypeBoost[]; /** * Offset that can be used for * pagination. */ nextOffset?: string; /** * Mentioned users */ users: tl.TypeUser[]; } /** * A list of peers we are currently * boosting, * and how many * boost * slots we have left. */ interface RawMyBoosts { _: 'premium.myBoosts'; /** * Info about boosted peers and remaining boost slots. */ myBoosts: tl.TypeMyBoost[]; /** * Referenced chats */ chats: tl.TypeChat[]; /** * Referenced users */ users: tl.TypeUser[]; } /** * Contains info about the current * boost * status of a peer. */ interface RawBoostsStatus { _: 'premium.boostsStatus'; /** * Whether we're currently boosting this channel/supergroup, * my_boost_slots will also be set. */ myBoost?: boolean; /** * The current boost level of the channel/supergroup. */ level: number; /** * The number of boosts acquired so far in the current level. */ currentLevelBoosts: number; /** * Total number of boosts acquired so far. */ boosts: number; /** * The number of boosts acquired from created Telegram Premium * gift * codes and * giveaways; * only returned to channel/supergroup admins. */ giftBoosts?: number; /** * Total number of boosts needed to reach the next level; if * absent, the next level isn't available. */ nextLevelBoosts?: number; /** * Only returned to channel/supergroup admins: contains the * approximated number of Premium users subscribed to the * channel/supergroup, related to the total number of * subscribers. */ premiumAudience?: tl.TypeStatsPercentValue; /** * Boost * deep link » that can be used to boost the chat. */ boostUrl: string; /** * A list of prepaid * giveaways * available for the chat; only returned to channel/supergroup * admins. */ prepaidGiveaways?: tl.TypePrepaidGiveaway[]; /** * Indicates which of our * boost * slots we've assigned to this peer (populated if * my_boost is set). */ myBoostSlots?: number[]; } /** * Obtains info about the boosts that were applied to a certain * channel or supergroup (admins only) * * RPC method returns {@link tl.premium.TypeBoostsList} */ interface RawGetBoostsListRequest { _: 'premium.getBoostsList'; /** * Whether to return only info about boosts received from * gift * codes and giveaways created by the channel/supergroup » */ gifts?: boolean; /** * The channel/supergroup */ peer: tl.TypeInputPeer; /** * Offset for pagination, obtained from * {@link premium.RawBoostsList}.next_offset */ offset: string; /** * Maximum number of results to return, * see * pagination */ limit: number; } /** * Obtain which peers are we currently * boosting, * and how many * boost * slots we have left. * * RPC method returns {@link tl.premium.TypeMyBoosts} */ interface RawGetMyBoostsRequest { _: 'premium.getMyBoosts'; } /** * Apply one or more * boosts * » to a peer. * * RPC method returns {@link tl.premium.TypeMyBoosts} */ interface RawApplyBoostRequest { _: 'premium.applyBoost'; /** * Which * boost * slots to assign to this peer. */ slots?: number[]; /** * The peer to boost. */ peer: tl.TypeInputPeer; } /** * Gets the current * number of * boosts of a channel/supergroup. * * RPC method returns {@link tl.premium.TypeBoostsStatus} */ interface RawGetBoostsStatusRequest { _: 'premium.getBoostsStatus'; /** * The peer. */ peer: tl.TypeInputPeer; } /** * Returns the lists of boost that were applied to a * channel/supergroup by a specific user (admins only) * * RPC method returns {@link tl.premium.TypeBoostsList} */ interface RawGetUserBoostsRequest { _: 'premium.getUserBoosts'; /** * The channel/supergroup */ peer: tl.TypeInputPeer; /** * The user */ userId: tl.TypeInputUser; } interface RpcCallReturn { 'premium.getBoostsList': tl.premium.TypeBoostsList 'premium.getMyBoosts': tl.premium.TypeMyBoosts 'premium.applyBoost': tl.premium.TypeMyBoosts 'premium.getBoostsStatus': tl.premium.TypeBoostsStatus 'premium.getUserBoosts': tl.premium.TypeBoostsList } /** * List of * boosts * that were applied to a peer by multiple users. */ type TypeBoostsList = tl.premium.RawBoostsList function isAnyBoostsList(o: object): o is TypeBoostsList /** * A list of peers we are currently * boosting, * and how many * boost * slots we have left. */ type TypeMyBoosts = tl.premium.RawMyBoosts function isAnyMyBoosts(o: object): o is TypeMyBoosts /** * Contains info about the current * boost * status of a peer. */ type TypeBoostsStatus = tl.premium.RawBoostsStatus function isAnyBoostsStatus(o: object): o is TypeBoostsStatus } namespace smsjobs { /** * SMS jobs eligibility */ interface RawEligibleToJoin { _: 'smsjobs.eligibleToJoin'; /** * Terms of service URL */ termsUrl: string; /** * Monthly sent SMSes */ monthlySentSms: number; } /** * Status */ interface RawStatus { _: 'smsjobs.status'; /** * Allow international numbers */ allowInternational?: boolean; /** * Recently sent */ recentSent: number; /** * Since */ recentSince: number; /** * Remaining */ recentRemains: number; /** * Total sent */ totalSent: number; /** * Total since */ totalSince: number; /** * Last gift deep link */ lastGiftSlug?: string; /** * Terms of service URL */ termsUrl: string; } /** * Check if we can process SMS jobs (official clients only). * * RPC method returns {@link tl.smsjobs.TypeEligibilityToJoin} */ interface RawIsEligibleToJoinRequest { _: 'smsjobs.isEligibleToJoin'; } /** * Enable SMS jobs (official clients only). * * RPC method returns boolean */ interface RawJoinRequest { _: 'smsjobs.join'; } /** * Disable SMS jobs (official clients only). * * RPC method returns boolean */ interface RawLeaveRequest { _: 'smsjobs.leave'; } /** * Update SMS job settings (official clients only). * * RPC method returns boolean */ interface RawUpdateSettingsRequest { _: 'smsjobs.updateSettings'; /** * Allow international numbers? */ allowInternational?: boolean; } /** * Get SMS jobs status (official clients only). * * RPC method returns {@link tl.smsjobs.TypeStatus} */ interface RawGetStatusRequest { _: 'smsjobs.getStatus'; } /** * Get info about an SMS job (official clients only). * * RPC method returns {@link tl.TypeSmsJob} */ interface RawGetSmsJobRequest { _: 'smsjobs.getSmsJob'; /** * Job ID */ jobId: string; } /** * Finish an SMS job (official clients only). * * RPC method returns boolean */ interface RawFinishJobRequest { _: 'smsjobs.finishJob'; /** * Job ID. */ jobId: string; /** * If failed, the error. */ error?: string; } interface RpcCallReturn { 'smsjobs.isEligibleToJoin': tl.smsjobs.TypeEligibilityToJoin 'smsjobs.join': boolean 'smsjobs.leave': boolean 'smsjobs.updateSettings': boolean 'smsjobs.getStatus': tl.smsjobs.TypeStatus 'smsjobs.getSmsJob': tl.TypeSmsJob 'smsjobs.finishJob': boolean } /** * SMS jobs eligibility */ type TypeEligibilityToJoin = tl.smsjobs.RawEligibleToJoin function isAnyEligibilityToJoin(o: object): o is TypeEligibilityToJoin /** * Status */ type TypeStatus = tl.smsjobs.RawStatus function isAnyStatus(o: object): o is TypeStatus } namespace fragment { /** * Info about a * fragment * collectible. */ interface RawCollectibleInfo { _: 'fragment.collectibleInfo'; /** * Purchase date (unixtime) */ purchaseDate: number; /** * Three-letter ISO 4217 * currency * code for amount */ 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, * it shows the number of digits past the decimal point for * each currency (2 for the majority of currencies). */ amount: Long; /** * Cryptocurrency name. */ cryptoCurrency: string; /** * Price, in the smallest units of the cryptocurrency. */ cryptoAmount: Long; /** * Fragment URL with more * info about the collectible */ url: string; } /** * Fetch information about a * fragment * collectible, see here » for more info on the full flow. * * RPC method returns {@link tl.fragment.TypeCollectibleInfo} */ interface RawGetCollectibleInfoRequest { _: 'fragment.getCollectibleInfo'; /** * Collectible to fetch info about. */ collectible: tl.TypeInputCollectible; } interface RpcCallReturn { 'fragment.getCollectibleInfo': tl.fragment.TypeCollectibleInfo } /** * Info about a * fragment * collectible. */ type TypeCollectibleInfo = tl.fragment.RawCollectibleInfo function isAnyCollectibleInfo(o: object): o is TypeCollectibleInfo } namespace mtcute { interface RawDummyUpdate { _: 'mtcute.dummyUpdate'; pts: number; ptsCount: number; channelId: number; } interface RawDummyInputPeerMinUser { _: 'mtcute.dummyInputPeerMinUser'; userId: number; } interface RawDummyInputPeerMinChannel { _: 'mtcute.dummyInputPeerMinChannel'; channelId: number; } /** * temporary solution to allow users to call arbitrary methods * not present in the schema, without having to override * client's schema readers/writers map. will become redundant * after esm tl rewrite * * RPC method returns Uint8Array */ interface RawCustomMethodRequest { _: 'mtcute.customMethod'; bytes: Uint8Array; } interface RpcCallReturn { 'mtcute.customMethod': Uint8Array } /** * Object contains info on events occurred. */ type TypeUpdate = tl.RawUpdateNewMessage | tl.RawUpdateMessageID | tl.RawUpdateDeleteMessages | tl.RawUpdateUserTyping | tl.RawUpdateChatUserTyping | tl.RawUpdateChatParticipants | tl.RawUpdateUserStatus | tl.RawUpdateUserName | tl.RawUpdateNewAuthorization | tl.RawUpdateNewEncryptedMessage | tl.RawUpdateEncryptedChatTyping | tl.RawUpdateEncryption | tl.RawUpdateEncryptedMessagesRead | tl.RawUpdateChatParticipantAdd | tl.RawUpdateChatParticipantDelete | tl.RawUpdateDcOptions | tl.RawUpdateNotifySettings | tl.RawUpdateServiceNotification | tl.RawUpdatePrivacy | tl.RawUpdateUserPhone | tl.RawUpdateReadHistoryInbox | tl.RawUpdateReadHistoryOutbox | tl.RawUpdateWebPage | tl.RawUpdateReadMessagesContents | tl.RawUpdateChannelTooLong | tl.RawUpdateChannel | tl.RawUpdateNewChannelMessage | tl.RawUpdateReadChannelInbox | tl.RawUpdateDeleteChannelMessages | tl.RawUpdateChannelMessageViews | tl.RawUpdateChatParticipantAdmin | tl.RawUpdateNewStickerSet | tl.RawUpdateStickerSetsOrder | tl.RawUpdateStickerSets | tl.RawUpdateSavedGifs | tl.RawUpdateBotInlineQuery | tl.RawUpdateBotInlineSend | tl.RawUpdateEditChannelMessage | tl.RawUpdateBotCallbackQuery | tl.RawUpdateEditMessage | tl.RawUpdateInlineBotCallbackQuery | tl.RawUpdateReadChannelOutbox | tl.RawUpdateDraftMessage | tl.RawUpdateReadFeaturedStickers | tl.RawUpdateRecentStickers | tl.RawUpdateConfig | tl.RawUpdatePtsChanged | tl.RawUpdateChannelWebPage | tl.RawUpdateDialogPinned | tl.RawUpdatePinnedDialogs | tl.RawUpdateBotWebhookJSON | tl.RawUpdateBotWebhookJSONQuery | tl.RawUpdateBotShippingQuery | tl.RawUpdateBotPrecheckoutQuery | tl.RawUpdatePhoneCall | tl.RawUpdateLangPackTooLong | tl.RawUpdateLangPack | tl.RawUpdateFavedStickers | tl.RawUpdateChannelReadMessagesContents | tl.RawUpdateContactsReset | tl.RawUpdateChannelAvailableMessages | tl.RawUpdateDialogUnreadMark | tl.RawUpdateMessagePoll | tl.RawUpdateChatDefaultBannedRights | tl.RawUpdateFolderPeers | tl.RawUpdatePeerSettings | tl.RawUpdatePeerLocated | tl.RawUpdateNewScheduledMessage | tl.RawUpdateDeleteScheduledMessages | tl.RawUpdateTheme | tl.RawUpdateGeoLiveViewed | tl.RawUpdateLoginToken | tl.RawUpdateMessagePollVote | tl.RawUpdateDialogFilter | tl.RawUpdateDialogFilterOrder | tl.RawUpdateDialogFilters | tl.RawUpdatePhoneCallSignalingData | tl.RawUpdateChannelMessageForwards | tl.RawUpdateReadChannelDiscussionInbox | tl.RawUpdateReadChannelDiscussionOutbox | tl.RawUpdatePeerBlocked | tl.RawUpdateChannelUserTyping | tl.RawUpdatePinnedMessages | tl.RawUpdatePinnedChannelMessages | tl.RawUpdateChat | tl.RawUpdateGroupCallParticipants | tl.RawUpdateGroupCall | tl.RawUpdatePeerHistoryTTL | tl.RawUpdateChatParticipant | tl.RawUpdateChannelParticipant | tl.RawUpdateBotStopped | tl.RawUpdateGroupCallConnection | tl.RawUpdateBotCommands | tl.RawUpdatePendingJoinRequests | tl.RawUpdateBotChatInviteRequester | tl.RawUpdateMessageReactions | tl.RawUpdateAttachMenuBots | tl.RawUpdateWebViewResultSent | tl.RawUpdateBotMenuButton | tl.RawUpdateSavedRingtones | tl.RawUpdateTranscribedAudio | tl.RawUpdateReadFeaturedEmojiStickers | tl.RawUpdateUserEmojiStatus | tl.RawUpdateRecentEmojiStatuses | tl.RawUpdateRecentReactions | tl.RawUpdateMoveStickerSetToTop | tl.RawUpdateMessageExtendedMedia | tl.RawUpdateUser | tl.RawUpdateAutoSaveSettings | tl.RawUpdateStory | tl.RawUpdateReadStories | tl.RawUpdateStoryID | tl.RawUpdateStoriesStealthMode | tl.RawUpdateSentStoryReaction | tl.RawUpdateBotChatBoost | tl.RawUpdateChannelViewForumAsMessages | tl.RawUpdatePeerWallpaper | tl.RawUpdateBotMessageReaction | tl.RawUpdateBotMessageReactions | tl.RawUpdateSavedDialogPinned | tl.RawUpdatePinnedSavedDialogs | tl.RawUpdateSavedReactionTags | tl.RawUpdateSmsJob | tl.RawUpdateQuickReplies | tl.RawUpdateNewQuickReply | tl.RawUpdateDeleteQuickReply | tl.RawUpdateQuickReplyMessage | tl.RawUpdateDeleteQuickReplyMessages | tl.RawUpdateBotBusinessConnect | tl.RawUpdateBotNewBusinessMessage | tl.RawUpdateBotEditBusinessMessage | tl.RawUpdateBotDeleteBusinessMessage | tl.RawUpdateNewStoryReaction | tl.RawUpdateStarsBalance | tl.RawUpdateBusinessBotCallbackQuery | tl.RawUpdateStarsRevenueStatus | tl.RawUpdateBotPurchasedPaidMedia | tl.RawUpdatePaidReactionPrivacy | tl.RawUpdateSentPhoneCode | tl.RawUpdateGroupCallChainBlocks | tl.RawUpdateReadMonoForumInbox | tl.RawUpdateReadMonoForumOutbox | tl.RawUpdateMonoForumNoPaidException | tl.RawUpdateGroupCallMessage | tl.RawUpdateGroupCallEncryptedMessage | tl.RawUpdatePinnedForumTopic | tl.RawUpdatePinnedForumTopics | tl.RawUpdateDeleteGroupCallMessages | tl.RawUpdateStarGiftAuctionState | tl.RawUpdateStarGiftAuctionUserState | tl.RawUpdateEmojiGameInfo | tl.RawUpdateStarGiftCraftFail | tl.RawUpdateChatParticipantRank | tl.RawUpdateChannelPinnedTopic | tl.RawUpdateChannelPinnedTopics | tl.mtcute.RawDummyUpdate function isAnyUpdate(o: object): o is TypeUpdate /** * Peer */ type TypeInputPeer = tl.RawInputPeerEmpty | tl.RawInputPeerSelf | tl.RawInputPeerChat | tl.RawInputPeerUser | tl.RawInputPeerChannel | tl.RawInputPeerUserFromMessage | tl.RawInputPeerChannelFromMessage | tl.mtcute.RawDummyInputPeerMinUser | tl.mtcute.RawDummyInputPeerMinChannel function isAnyInputPeer(o: object): o is TypeInputPeer } namespace langpack { /** * Get localization pack strings * * RPC method returns {@link tl.TypeLangPackDifference} */ interface RawGetLangPackRequest { _: 'langpack.getLangPack'; /** * Platform identifier (i.e. android, * tdesktop, etc). */ langPack: string; /** * Either an ISO 639-1 language code or a language pack name * obtained from a * language * pack link. */ langCode: string; } /** * Get strings from a language pack * * RPC method returns {@link tl.TypeLangPackString} array */ interface RawGetStringsRequest { _: 'langpack.getStrings'; /** * Platform identifier (i.e. android, * tdesktop, etc). */ langPack: string; /** * Either an ISO 639-1 language code or a language pack name * obtained from a * language * pack link. */ langCode: string; /** * Strings to get */ keys: string[]; } /** * Get new strings in language pack * * RPC method returns {@link tl.TypeLangPackDifference} */ interface RawGetDifferenceRequest { _: 'langpack.getDifference'; /** * Platform identifier (i.e. android, * tdesktop, etc). */ langPack: string; /** * Either an ISO 639-1 language code or a language pack name * obtained from a * language * pack link. */ langCode: string; /** * Previous localization pack version */ fromVersion: number; } /** * Get information about all languages in a localization pack * * RPC method returns {@link tl.TypeLangPackLanguage} array */ interface RawGetLanguagesRequest { _: 'langpack.getLanguages'; /** * Platform identifier (i.e. android, * tdesktop, etc). */ langPack: string; } /** * Get information about a language in a localization pack * * RPC method returns {@link tl.TypeLangPackLanguage} */ interface RawGetLanguageRequest { _: 'langpack.getLanguage'; /** * Platform identifier (i.e. android, * tdesktop, etc). */ langPack: string; /** * Either an ISO 639-1 language code or a language pack name * obtained from a * language * pack link. */ langCode: string; } interface RpcCallReturn { 'langpack.getLangPack': tl.TypeLangPackDifference 'langpack.getStrings': tl.TypeLangPackString[] 'langpack.getDifference': tl.TypeLangPackDifference 'langpack.getLanguages': tl.TypeLangPackLanguage[] 'langpack.getLanguage': tl.TypeLangPackLanguage } } namespace folders { /** * Edit peers in * peer * folder * * RPC method returns {@link tl.TypeUpdates} */ interface RawEditPeerFoldersRequest { _: 'folders.editPeerFolders'; /** * New peer list */ folderPeers: tl.TypeInputFolderPeer[]; } interface RpcCallReturn { 'folders.editPeerFolders': tl.TypeUpdates } } type RpcMethod = | tl.RawInvokeAfterMsgRequest | tl.RawInvokeAfterMsgsRequest | tl.RawInitConnectionRequest | tl.RawInvokeWithLayerRequest | tl.RawInvokeWithoutUpdatesRequest | tl.RawInvokeWithMessagesRangeRequest | tl.RawInvokeWithTakeoutRequest | tl.RawInvokeWithBusinessConnectionRequest | tl.RawInvokeWithGooglePlayIntegrityRequest | tl.RawInvokeWithApnsSecretRequest | tl.RawInvokeWithReCaptchaRequest | tl.auth.RawSendCodeRequest | tl.auth.RawSignUpRequest | tl.auth.RawSignInRequest | tl.auth.RawLogOutRequest | tl.auth.RawResetAuthorizationsRequest | tl.auth.RawExportAuthorizationRequest | tl.auth.RawImportAuthorizationRequest | tl.auth.RawBindTempAuthKeyRequest | tl.auth.RawImportBotAuthorizationRequest | tl.auth.RawCheckPasswordRequest | tl.auth.RawRequestPasswordRecoveryRequest | tl.auth.RawRecoverPasswordRequest | tl.auth.RawResendCodeRequest | tl.auth.RawCancelCodeRequest | tl.auth.RawDropTempAuthKeysRequest | tl.auth.RawExportLoginTokenRequest | tl.auth.RawImportLoginTokenRequest | tl.auth.RawAcceptLoginTokenRequest | tl.auth.RawCheckRecoveryPasswordRequest | tl.auth.RawImportWebTokenAuthorizationRequest | tl.auth.RawRequestFirebaseSmsRequest | tl.auth.RawResetLoginEmailRequest | tl.auth.RawReportMissingCodeRequest | tl.auth.RawCheckPaidAuthRequest | tl.auth.RawInitPasskeyLoginRequest | tl.auth.RawFinishPasskeyLoginRequest | tl.account.RawRegisterDeviceRequest | tl.account.RawUnregisterDeviceRequest | tl.account.RawUpdateNotifySettingsRequest | tl.account.RawGetNotifySettingsRequest | tl.account.RawResetNotifySettingsRequest | tl.account.RawUpdateProfileRequest | tl.account.RawUpdateStatusRequest | tl.account.RawGetWallPapersRequest | tl.account.RawReportPeerRequest | tl.account.RawCheckUsernameRequest | tl.account.RawUpdateUsernameRequest | tl.account.RawGetPrivacyRequest | tl.account.RawSetPrivacyRequest | tl.account.RawDeleteAccountRequest | tl.account.RawGetAccountTTLRequest | tl.account.RawSetAccountTTLRequest | tl.account.RawSendChangePhoneCodeRequest | tl.account.RawChangePhoneRequest | tl.account.RawUpdateDeviceLockedRequest | tl.account.RawGetAuthorizationsRequest | tl.account.RawResetAuthorizationRequest | tl.account.RawGetPasswordRequest | tl.account.RawGetPasswordSettingsRequest | tl.account.RawUpdatePasswordSettingsRequest | tl.account.RawSendConfirmPhoneCodeRequest | tl.account.RawConfirmPhoneRequest | tl.account.RawGetTmpPasswordRequest | tl.account.RawGetWebAuthorizationsRequest | tl.account.RawResetWebAuthorizationRequest | tl.account.RawResetWebAuthorizationsRequest | tl.account.RawGetAllSecureValuesRequest | tl.account.RawGetSecureValueRequest | tl.account.RawSaveSecureValueRequest | tl.account.RawDeleteSecureValueRequest | tl.account.RawGetAuthorizationFormRequest | tl.account.RawAcceptAuthorizationRequest | tl.account.RawSendVerifyPhoneCodeRequest | tl.account.RawVerifyPhoneRequest | tl.account.RawSendVerifyEmailCodeRequest | tl.account.RawVerifyEmailRequest | tl.account.RawInitTakeoutSessionRequest | tl.account.RawFinishTakeoutSessionRequest | tl.account.RawConfirmPasswordEmailRequest | tl.account.RawResendPasswordEmailRequest | tl.account.RawCancelPasswordEmailRequest | tl.account.RawGetContactSignUpNotificationRequest | tl.account.RawSetContactSignUpNotificationRequest | tl.account.RawGetNotifyExceptionsRequest | tl.account.RawGetWallPaperRequest | tl.account.RawUploadWallPaperRequest | tl.account.RawSaveWallPaperRequest | tl.account.RawInstallWallPaperRequest | tl.account.RawResetWallPapersRequest | tl.account.RawGetAutoDownloadSettingsRequest | tl.account.RawSaveAutoDownloadSettingsRequest | tl.account.RawUploadThemeRequest | tl.account.RawCreateThemeRequest | tl.account.RawUpdateThemeRequest | tl.account.RawSaveThemeRequest | tl.account.RawInstallThemeRequest | tl.account.RawGetThemeRequest | tl.account.RawGetThemesRequest | tl.account.RawSetContentSettingsRequest | tl.account.RawGetContentSettingsRequest | tl.account.RawGetMultiWallPapersRequest | tl.account.RawGetGlobalPrivacySettingsRequest | tl.account.RawSetGlobalPrivacySettingsRequest | tl.account.RawReportProfilePhotoRequest | tl.account.RawResetPasswordRequest | tl.account.RawDeclinePasswordResetRequest | tl.account.RawGetChatThemesRequest | tl.account.RawSetAuthorizationTTLRequest | tl.account.RawChangeAuthorizationSettingsRequest | tl.account.RawGetSavedRingtonesRequest | tl.account.RawSaveRingtoneRequest | tl.account.RawUploadRingtoneRequest | tl.account.RawUpdateEmojiStatusRequest | tl.account.RawGetDefaultEmojiStatusesRequest | tl.account.RawGetRecentEmojiStatusesRequest | tl.account.RawClearRecentEmojiStatusesRequest | tl.account.RawReorderUsernamesRequest | tl.account.RawToggleUsernameRequest | tl.account.RawGetDefaultProfilePhotoEmojisRequest | tl.account.RawGetDefaultGroupPhotoEmojisRequest | tl.account.RawGetAutoSaveSettingsRequest | tl.account.RawSaveAutoSaveSettingsRequest | tl.account.RawDeleteAutoSaveExceptionsRequest | tl.account.RawInvalidateSignInCodesRequest | tl.account.RawUpdateColorRequest | tl.account.RawGetDefaultBackgroundEmojisRequest | tl.account.RawGetChannelDefaultEmojiStatusesRequest | tl.account.RawGetChannelRestrictedStatusEmojisRequest | tl.account.RawUpdateBusinessWorkHoursRequest | tl.account.RawUpdateBusinessLocationRequest | tl.account.RawUpdateBusinessGreetingMessageRequest | tl.account.RawUpdateBusinessAwayMessageRequest | tl.account.RawUpdateConnectedBotRequest | tl.account.RawGetConnectedBotsRequest | tl.account.RawGetBotBusinessConnectionRequest | tl.account.RawUpdateBusinessIntroRequest | tl.account.RawToggleConnectedBotPausedRequest | tl.account.RawDisablePeerConnectedBotRequest | tl.account.RawUpdateBirthdayRequest | tl.account.RawCreateBusinessChatLinkRequest | tl.account.RawEditBusinessChatLinkRequest | tl.account.RawDeleteBusinessChatLinkRequest | tl.account.RawGetBusinessChatLinksRequest | tl.account.RawResolveBusinessChatLinkRequest | tl.account.RawUpdatePersonalChannelRequest | tl.account.RawToggleSponsoredMessagesRequest | tl.account.RawGetReactionsNotifySettingsRequest | tl.account.RawSetReactionsNotifySettingsRequest | tl.account.RawGetCollectibleEmojiStatusesRequest | tl.account.RawGetPaidMessagesRevenueRequest | tl.account.RawToggleNoPaidMessagesExceptionRequest | tl.account.RawSetMainProfileTabRequest | tl.account.RawSaveMusicRequest | tl.account.RawGetSavedMusicIdsRequest | tl.account.RawGetUniqueGiftChatThemesRequest | tl.account.RawInitPasskeyRegistrationRequest | tl.account.RawRegisterPasskeyRequest | tl.account.RawGetPasskeysRequest | tl.account.RawDeletePasskeyRequest | tl.users.RawGetUsersRequest | tl.users.RawGetFullUserRequest | tl.users.RawSetSecureValueErrorsRequest | tl.users.RawGetRequirementsToContactRequest | tl.users.RawGetSavedMusicRequest | tl.users.RawGetSavedMusicByIDRequest | tl.users.RawSuggestBirthdayRequest | tl.contacts.RawGetContactIDsRequest | tl.contacts.RawGetStatusesRequest | tl.contacts.RawGetContactsRequest | tl.contacts.RawImportContactsRequest | tl.contacts.RawDeleteContactsRequest | tl.contacts.RawDeleteByPhonesRequest | tl.contacts.RawBlockRequest | tl.contacts.RawUnblockRequest | tl.contacts.RawGetBlockedRequest | tl.contacts.RawSearchRequest | tl.contacts.RawResolveUsernameRequest | tl.contacts.RawGetTopPeersRequest | tl.contacts.RawResetTopPeerRatingRequest | tl.contacts.RawResetSavedRequest | tl.contacts.RawGetSavedRequest | tl.contacts.RawToggleTopPeersRequest | tl.contacts.RawAddContactRequest | tl.contacts.RawAcceptContactRequest | tl.contacts.RawGetLocatedRequest | tl.contacts.RawBlockFromRepliesRequest | tl.contacts.RawResolvePhoneRequest | tl.contacts.RawExportContactTokenRequest | tl.contacts.RawImportContactTokenRequest | tl.contacts.RawEditCloseFriendsRequest | tl.contacts.RawSetBlockedRequest | tl.contacts.RawGetBirthdaysRequest | tl.contacts.RawGetSponsoredPeersRequest | tl.contacts.RawUpdateContactNoteRequest | tl.messages.RawGetMessagesRequest | tl.messages.RawGetDialogsRequest | tl.messages.RawGetHistoryRequest | tl.messages.RawSearchRequest | tl.messages.RawReadHistoryRequest | tl.messages.RawDeleteHistoryRequest | tl.messages.RawDeleteMessagesRequest | tl.messages.RawReceivedMessagesRequest | tl.messages.RawSetTypingRequest | tl.messages.RawSendMessageRequest | tl.messages.RawSendMediaRequest | tl.messages.RawForwardMessagesRequest | tl.messages.RawReportSpamRequest | tl.messages.RawGetPeerSettingsRequest | tl.messages.RawReportRequest | tl.messages.RawGetChatsRequest | tl.messages.RawGetFullChatRequest | tl.messages.RawEditChatTitleRequest | tl.messages.RawEditChatPhotoRequest | tl.messages.RawAddChatUserRequest | tl.messages.RawDeleteChatUserRequest | tl.messages.RawCreateChatRequest | tl.messages.RawGetDhConfigRequest | tl.messages.RawRequestEncryptionRequest | tl.messages.RawAcceptEncryptionRequest | tl.messages.RawDiscardEncryptionRequest | tl.messages.RawSetEncryptedTypingRequest | tl.messages.RawReadEncryptedHistoryRequest | tl.messages.RawSendEncryptedRequest | tl.messages.RawSendEncryptedFileRequest | tl.messages.RawSendEncryptedServiceRequest | tl.messages.RawReceivedQueueRequest | tl.messages.RawReportEncryptedSpamRequest | tl.messages.RawReadMessageContentsRequest | tl.messages.RawGetStickersRequest | tl.messages.RawGetAllStickersRequest | tl.messages.RawGetWebPagePreviewRequest | tl.messages.RawExportChatInviteRequest | tl.messages.RawCheckChatInviteRequest | tl.messages.RawImportChatInviteRequest | tl.messages.RawGetStickerSetRequest | tl.messages.RawInstallStickerSetRequest | tl.messages.RawUninstallStickerSetRequest | tl.messages.RawStartBotRequest | tl.messages.RawGetMessagesViewsRequest | tl.messages.RawEditChatAdminRequest | tl.messages.RawMigrateChatRequest | tl.messages.RawSearchGlobalRequest | tl.messages.RawReorderStickerSetsRequest | tl.messages.RawGetDocumentByHashRequest | tl.messages.RawGetSavedGifsRequest | tl.messages.RawSaveGifRequest | tl.messages.RawGetInlineBotResultsRequest | tl.messages.RawSetInlineBotResultsRequest | tl.messages.RawSendInlineBotResultRequest | tl.messages.RawGetMessageEditDataRequest | tl.messages.RawEditMessageRequest | tl.messages.RawEditInlineBotMessageRequest | tl.messages.RawGetBotCallbackAnswerRequest | tl.messages.RawSetBotCallbackAnswerRequest | tl.messages.RawGetPeerDialogsRequest | tl.messages.RawSaveDraftRequest | tl.messages.RawGetAllDraftsRequest | tl.messages.RawGetFeaturedStickersRequest | tl.messages.RawReadFeaturedStickersRequest | tl.messages.RawGetRecentStickersRequest | tl.messages.RawSaveRecentStickerRequest | tl.messages.RawClearRecentStickersRequest | tl.messages.RawGetArchivedStickersRequest | tl.messages.RawGetMaskStickersRequest | tl.messages.RawGetAttachedStickersRequest | tl.messages.RawSetGameScoreRequest | tl.messages.RawSetInlineGameScoreRequest | tl.messages.RawGetGameHighScoresRequest | tl.messages.RawGetInlineGameHighScoresRequest | tl.messages.RawGetCommonChatsRequest | tl.messages.RawGetWebPageRequest | tl.messages.RawToggleDialogPinRequest | tl.messages.RawReorderPinnedDialogsRequest | tl.messages.RawGetPinnedDialogsRequest | tl.messages.RawSetBotShippingResultsRequest | tl.messages.RawSetBotPrecheckoutResultsRequest | tl.messages.RawUploadMediaRequest | tl.messages.RawSendScreenshotNotificationRequest | tl.messages.RawGetFavedStickersRequest | tl.messages.RawFaveStickerRequest | tl.messages.RawGetUnreadMentionsRequest | tl.messages.RawReadMentionsRequest | tl.messages.RawGetRecentLocationsRequest | tl.messages.RawSendMultiMediaRequest | tl.messages.RawUploadEncryptedFileRequest | tl.messages.RawSearchStickerSetsRequest | tl.messages.RawGetSplitRangesRequest | tl.messages.RawMarkDialogUnreadRequest | tl.messages.RawGetDialogUnreadMarksRequest | tl.messages.RawClearAllDraftsRequest | tl.messages.RawUpdatePinnedMessageRequest | tl.messages.RawSendVoteRequest | tl.messages.RawGetPollResultsRequest | tl.messages.RawGetOnlinesRequest | tl.messages.RawEditChatAboutRequest | tl.messages.RawEditChatDefaultBannedRightsRequest | tl.messages.RawGetEmojiKeywordsRequest | tl.messages.RawGetEmojiKeywordsDifferenceRequest | tl.messages.RawGetEmojiKeywordsLanguagesRequest | tl.messages.RawGetEmojiURLRequest | tl.messages.RawGetSearchCountersRequest | tl.messages.RawRequestUrlAuthRequest | tl.messages.RawAcceptUrlAuthRequest | tl.messages.RawHidePeerSettingsBarRequest | tl.messages.RawGetScheduledHistoryRequest | tl.messages.RawGetScheduledMessagesRequest | tl.messages.RawSendScheduledMessagesRequest | tl.messages.RawDeleteScheduledMessagesRequest | tl.messages.RawGetPollVotesRequest | tl.messages.RawToggleStickerSetsRequest | tl.messages.RawGetDialogFiltersRequest | tl.messages.RawGetSuggestedDialogFiltersRequest | tl.messages.RawUpdateDialogFilterRequest | tl.messages.RawUpdateDialogFiltersOrderRequest | tl.messages.RawGetOldFeaturedStickersRequest | tl.messages.RawGetRepliesRequest | tl.messages.RawGetDiscussionMessageRequest | tl.messages.RawReadDiscussionRequest | tl.messages.RawUnpinAllMessagesRequest | tl.messages.RawDeleteChatRequest | tl.messages.RawDeletePhoneCallHistoryRequest | tl.messages.RawCheckHistoryImportRequest | tl.messages.RawInitHistoryImportRequest | tl.messages.RawUploadImportedMediaRequest | tl.messages.RawStartHistoryImportRequest | tl.messages.RawGetExportedChatInvitesRequest | tl.messages.RawGetExportedChatInviteRequest | tl.messages.RawEditExportedChatInviteRequest | tl.messages.RawDeleteRevokedExportedChatInvitesRequest | tl.messages.RawDeleteExportedChatInviteRequest | tl.messages.RawGetAdminsWithInvitesRequest | tl.messages.RawGetChatInviteImportersRequest | tl.messages.RawSetHistoryTTLRequest | tl.messages.RawCheckHistoryImportPeerRequest | tl.messages.RawSetChatThemeRequest | tl.messages.RawGetMessageReadParticipantsRequest | tl.messages.RawGetSearchResultsCalendarRequest | tl.messages.RawGetSearchResultsPositionsRequest | tl.messages.RawHideChatJoinRequestRequest | tl.messages.RawHideAllChatJoinRequestsRequest | tl.messages.RawToggleNoForwardsRequest | tl.messages.RawSaveDefaultSendAsRequest | tl.messages.RawSendReactionRequest | tl.messages.RawGetMessagesReactionsRequest | tl.messages.RawGetMessageReactionsListRequest | tl.messages.RawSetChatAvailableReactionsRequest | tl.messages.RawGetAvailableReactionsRequest | tl.messages.RawSetDefaultReactionRequest | tl.messages.RawTranslateTextRequest | tl.messages.RawGetUnreadReactionsRequest | tl.messages.RawReadReactionsRequest | tl.messages.RawSearchSentMediaRequest | tl.messages.RawGetAttachMenuBotsRequest | tl.messages.RawGetAttachMenuBotRequest | tl.messages.RawToggleBotInAttachMenuRequest | tl.messages.RawRequestWebViewRequest | tl.messages.RawProlongWebViewRequest | tl.messages.RawRequestSimpleWebViewRequest | tl.messages.RawSendWebViewResultMessageRequest | tl.messages.RawSendWebViewDataRequest | tl.messages.RawTranscribeAudioRequest | tl.messages.RawRateTranscribedAudioRequest | tl.messages.RawGetCustomEmojiDocumentsRequest | tl.messages.RawGetEmojiStickersRequest | tl.messages.RawGetFeaturedEmojiStickersRequest | tl.messages.RawReportReactionRequest | tl.messages.RawGetTopReactionsRequest | tl.messages.RawGetRecentReactionsRequest | tl.messages.RawClearRecentReactionsRequest | tl.messages.RawGetExtendedMediaRequest | tl.messages.RawSetDefaultHistoryTTLRequest | tl.messages.RawGetDefaultHistoryTTLRequest | tl.messages.RawSendBotRequestedPeerRequest | tl.messages.RawGetEmojiGroupsRequest | tl.messages.RawGetEmojiStatusGroupsRequest | tl.messages.RawGetEmojiProfilePhotoGroupsRequest | tl.messages.RawSearchCustomEmojiRequest | tl.messages.RawTogglePeerTranslationsRequest | tl.messages.RawGetBotAppRequest | tl.messages.RawRequestAppWebViewRequest | tl.messages.RawSetChatWallPaperRequest | tl.messages.RawSearchEmojiStickerSetsRequest | tl.messages.RawGetSavedDialogsRequest | tl.messages.RawGetSavedHistoryRequest | tl.messages.RawDeleteSavedHistoryRequest | tl.messages.RawGetPinnedSavedDialogsRequest | tl.messages.RawToggleSavedDialogPinRequest | tl.messages.RawReorderPinnedSavedDialogsRequest | tl.messages.RawGetSavedReactionTagsRequest | tl.messages.RawUpdateSavedReactionTagRequest | tl.messages.RawGetDefaultTagReactionsRequest | tl.messages.RawGetOutboxReadDateRequest | tl.messages.RawGetQuickRepliesRequest | tl.messages.RawReorderQuickRepliesRequest | tl.messages.RawCheckQuickReplyShortcutRequest | tl.messages.RawEditQuickReplyShortcutRequest | tl.messages.RawDeleteQuickReplyShortcutRequest | tl.messages.RawGetQuickReplyMessagesRequest | tl.messages.RawSendQuickReplyMessagesRequest | tl.messages.RawDeleteQuickReplyMessagesRequest | tl.messages.RawToggleDialogFilterTagsRequest | tl.messages.RawGetMyStickersRequest | tl.messages.RawGetEmojiStickerGroupsRequest | tl.messages.RawGetAvailableEffectsRequest | tl.messages.RawEditFactCheckRequest | tl.messages.RawDeleteFactCheckRequest | tl.messages.RawGetFactCheckRequest | tl.messages.RawRequestMainWebViewRequest | tl.messages.RawSendPaidReactionRequest | tl.messages.RawTogglePaidReactionPrivacyRequest | tl.messages.RawGetPaidReactionPrivacyRequest | tl.messages.RawViewSponsoredMessageRequest | tl.messages.RawClickSponsoredMessageRequest | tl.messages.RawReportSponsoredMessageRequest | tl.messages.RawGetSponsoredMessagesRequest | tl.messages.RawSavePreparedInlineMessageRequest | tl.messages.RawGetPreparedInlineMessageRequest | tl.messages.RawSearchStickersRequest | tl.messages.RawReportMessagesDeliveryRequest | tl.messages.RawGetSavedDialogsByIDRequest | tl.messages.RawReadSavedHistoryRequest | tl.messages.RawToggleTodoCompletedRequest | tl.messages.RawAppendTodoListRequest | tl.messages.RawToggleSuggestedPostApprovalRequest | tl.messages.RawGetForumTopicsRequest | tl.messages.RawGetForumTopicsByIDRequest | tl.messages.RawEditForumTopicRequest | tl.messages.RawUpdatePinnedForumTopicRequest | tl.messages.RawReorderPinnedForumTopicsRequest | tl.messages.RawCreateForumTopicRequest | tl.messages.RawDeleteTopicHistoryRequest | tl.messages.RawGetEmojiGameInfoRequest | tl.messages.RawSummarizeTextRequest | tl.messages.RawEditChatCreatorRequest | tl.messages.RawGetFutureChatCreatorAfterLeaveRequest | tl.messages.RawEditChatParticipantRankRequest | tl.messages.RawDeclineUrlAuthRequest | tl.messages.RawCheckUrlAuthMatchCodeRequest | tl.updates.RawGetStateRequest | tl.updates.RawGetDifferenceRequest | tl.updates.RawGetChannelDifferenceRequest | tl.photos.RawUpdateProfilePhotoRequest | tl.photos.RawUploadProfilePhotoRequest | tl.photos.RawDeletePhotosRequest | tl.photos.RawGetUserPhotosRequest | tl.photos.RawUploadContactProfilePhotoRequest | tl.upload.RawSaveFilePartRequest | tl.upload.RawGetFileRequest | tl.upload.RawSaveBigFilePartRequest | tl.upload.RawGetWebFileRequest | tl.upload.RawGetCdnFileRequest | tl.upload.RawReuploadCdnFileRequest | tl.upload.RawGetCdnFileHashesRequest | tl.upload.RawGetFileHashesRequest | tl.help.RawGetConfigRequest | tl.help.RawGetNearestDcRequest | tl.help.RawGetAppUpdateRequest | tl.help.RawGetInviteTextRequest | tl.help.RawGetSupportRequest | tl.help.RawSetBotUpdatesStatusRequest | tl.help.RawGetCdnConfigRequest | tl.help.RawGetRecentMeUrlsRequest | tl.help.RawGetTermsOfServiceUpdateRequest | tl.help.RawAcceptTermsOfServiceRequest | tl.help.RawGetDeepLinkInfoRequest | tl.help.RawGetAppConfigRequest | tl.help.RawSaveAppLogRequest | tl.help.RawGetPassportConfigRequest | tl.help.RawGetSupportNameRequest | tl.help.RawGetUserInfoRequest | tl.help.RawEditUserInfoRequest | tl.help.RawGetPromoDataRequest | tl.help.RawHidePromoDataRequest | tl.help.RawDismissSuggestionRequest | tl.help.RawGetCountriesListRequest | tl.help.RawGetPremiumPromoRequest | tl.help.RawGetPeerColorsRequest | tl.help.RawGetPeerProfileColorsRequest | tl.help.RawGetTimezonesListRequest | tl.channels.RawReadHistoryRequest | tl.channels.RawDeleteMessagesRequest | tl.channels.RawReportSpamRequest | tl.channels.RawGetMessagesRequest | tl.channels.RawGetParticipantsRequest | tl.channels.RawGetParticipantRequest | tl.channels.RawGetChannelsRequest | tl.channels.RawGetFullChannelRequest | tl.channels.RawCreateChannelRequest | tl.channels.RawEditAdminRequest | tl.channels.RawEditTitleRequest | tl.channels.RawEditPhotoRequest | tl.channels.RawCheckUsernameRequest | tl.channels.RawUpdateUsernameRequest | tl.channels.RawJoinChannelRequest | tl.channels.RawLeaveChannelRequest | tl.channels.RawInviteToChannelRequest | tl.channels.RawDeleteChannelRequest | tl.channels.RawExportMessageLinkRequest | tl.channels.RawToggleSignaturesRequest | tl.channels.RawGetAdminedPublicChannelsRequest | tl.channels.RawEditBannedRequest | tl.channels.RawGetAdminLogRequest | tl.channels.RawSetStickersRequest | tl.channels.RawReadMessageContentsRequest | tl.channels.RawDeleteHistoryRequest | tl.channels.RawTogglePreHistoryHiddenRequest | tl.channels.RawGetLeftChannelsRequest | tl.channels.RawGetGroupsForDiscussionRequest | tl.channels.RawSetDiscussionGroupRequest | tl.channels.RawEditLocationRequest | tl.channels.RawToggleSlowModeRequest | tl.channels.RawGetInactiveChannelsRequest | tl.channels.RawConvertToGigagroupRequest | tl.channels.RawGetSendAsRequest | tl.channels.RawDeleteParticipantHistoryRequest | tl.channels.RawToggleJoinToSendRequest | tl.channels.RawToggleJoinRequestRequest | tl.channels.RawReorderUsernamesRequest | tl.channels.RawToggleUsernameRequest | tl.channels.RawDeactivateAllUsernamesRequest | tl.channels.RawToggleForumRequest | tl.channels.RawToggleAntiSpamRequest | tl.channels.RawReportAntiSpamFalsePositiveRequest | tl.channels.RawToggleParticipantsHiddenRequest | tl.channels.RawUpdateColorRequest | tl.channels.RawToggleViewForumAsMessagesRequest | tl.channels.RawGetChannelRecommendationsRequest | tl.channels.RawUpdateEmojiStatusRequest | tl.channels.RawSetBoostsToUnblockRestrictionsRequest | tl.channels.RawSetEmojiStickersRequest | tl.channels.RawRestrictSponsoredMessagesRequest | tl.channels.RawSearchPostsRequest | tl.channels.RawUpdatePaidMessagesPriceRequest | tl.channels.RawToggleAutotranslationRequest | tl.channels.RawGetMessageAuthorRequest | tl.channels.RawCheckSearchPostsFloodRequest | tl.channels.RawSetMainProfileTabRequest | tl.bots.RawSendCustomRequestRequest | tl.bots.RawAnswerWebhookJSONQueryRequest | tl.bots.RawSetBotCommandsRequest | tl.bots.RawResetBotCommandsRequest | tl.bots.RawGetBotCommandsRequest | tl.bots.RawSetBotMenuButtonRequest | tl.bots.RawGetBotMenuButtonRequest | tl.bots.RawSetBotBroadcastDefaultAdminRightsRequest | tl.bots.RawSetBotGroupDefaultAdminRightsRequest | tl.bots.RawSetBotInfoRequest | tl.bots.RawGetBotInfoRequest | tl.bots.RawReorderUsernamesRequest | tl.bots.RawToggleUsernameRequest | tl.bots.RawCanSendMessageRequest | tl.bots.RawAllowSendMessageRequest | tl.bots.RawInvokeWebViewCustomMethodRequest | tl.bots.RawGetPopularAppBotsRequest | tl.bots.RawAddPreviewMediaRequest | tl.bots.RawEditPreviewMediaRequest | tl.bots.RawDeletePreviewMediaRequest | tl.bots.RawReorderPreviewMediasRequest | tl.bots.RawGetPreviewInfoRequest | tl.bots.RawGetPreviewMediasRequest | tl.bots.RawUpdateUserEmojiStatusRequest | tl.bots.RawToggleUserEmojiStatusPermissionRequest | tl.bots.RawCheckDownloadFileParamsRequest | tl.bots.RawGetAdminedBotsRequest | tl.bots.RawUpdateStarRefProgramRequest | tl.bots.RawSetCustomVerificationRequest | tl.bots.RawGetBotRecommendationsRequest | tl.payments.RawGetPaymentFormRequest | tl.payments.RawGetPaymentReceiptRequest | tl.payments.RawValidateRequestedInfoRequest | tl.payments.RawSendPaymentFormRequest | tl.payments.RawGetSavedInfoRequest | tl.payments.RawClearSavedInfoRequest | tl.payments.RawGetBankCardDataRequest | tl.payments.RawExportInvoiceRequest | tl.payments.RawAssignAppStoreTransactionRequest | tl.payments.RawAssignPlayMarketTransactionRequest | tl.payments.RawGetPremiumGiftCodeOptionsRequest | tl.payments.RawCheckGiftCodeRequest | tl.payments.RawApplyGiftCodeRequest | tl.payments.RawGetGiveawayInfoRequest | tl.payments.RawLaunchPrepaidGiveawayRequest | tl.payments.RawGetStarsTopupOptionsRequest | tl.payments.RawGetStarsStatusRequest | tl.payments.RawGetStarsTransactionsRequest | tl.payments.RawSendStarsFormRequest | tl.payments.RawRefundStarsChargeRequest | tl.payments.RawGetStarsRevenueStatsRequest | tl.payments.RawGetStarsRevenueWithdrawalUrlRequest | tl.payments.RawGetStarsRevenueAdsAccountUrlRequest | tl.payments.RawGetStarsTransactionsByIDRequest | tl.payments.RawGetStarsGiftOptionsRequest | tl.payments.RawGetStarsSubscriptionsRequest | tl.payments.RawChangeStarsSubscriptionRequest | tl.payments.RawFulfillStarsSubscriptionRequest | tl.payments.RawGetStarsGiveawayOptionsRequest | tl.payments.RawGetStarGiftsRequest | tl.payments.RawSaveStarGiftRequest | tl.payments.RawConvertStarGiftRequest | tl.payments.RawBotCancelStarsSubscriptionRequest | tl.payments.RawGetConnectedStarRefBotsRequest | tl.payments.RawGetConnectedStarRefBotRequest | tl.payments.RawGetSuggestedStarRefBotsRequest | tl.payments.RawConnectStarRefBotRequest | tl.payments.RawEditConnectedStarRefBotRequest | tl.payments.RawGetStarGiftUpgradePreviewRequest | tl.payments.RawUpgradeStarGiftRequest | tl.payments.RawTransferStarGiftRequest | tl.payments.RawGetUniqueStarGiftRequest | tl.payments.RawGetSavedStarGiftsRequest | tl.payments.RawGetSavedStarGiftRequest | tl.payments.RawGetStarGiftWithdrawalUrlRequest | tl.payments.RawToggleChatStarGiftNotificationsRequest | tl.payments.RawToggleStarGiftsPinnedToTopRequest | tl.payments.RawCanPurchaseStoreRequest | tl.payments.RawGetResaleStarGiftsRequest | tl.payments.RawUpdateStarGiftPriceRequest | tl.payments.RawCreateStarGiftCollectionRequest | tl.payments.RawUpdateStarGiftCollectionRequest | tl.payments.RawReorderStarGiftCollectionsRequest | tl.payments.RawDeleteStarGiftCollectionRequest | tl.payments.RawGetStarGiftCollectionsRequest | tl.payments.RawGetUniqueStarGiftValueInfoRequest | tl.payments.RawCheckCanSendGiftRequest | tl.payments.RawGetStarGiftAuctionStateRequest | tl.payments.RawGetStarGiftAuctionAcquiredGiftsRequest | tl.payments.RawGetStarGiftActiveAuctionsRequest | tl.payments.RawResolveStarGiftOfferRequest | tl.payments.RawSendStarGiftOfferRequest | tl.payments.RawGetStarGiftUpgradeAttributesRequest | tl.payments.RawGetCraftStarGiftsRequest | tl.payments.RawCraftStarGiftRequest | tl.stickers.RawCreateStickerSetRequest | tl.stickers.RawRemoveStickerFromSetRequest | tl.stickers.RawChangeStickerPositionRequest | tl.stickers.RawAddStickerToSetRequest | tl.stickers.RawSetStickerSetThumbRequest | tl.stickers.RawCheckShortNameRequest | tl.stickers.RawSuggestShortNameRequest | tl.stickers.RawChangeStickerRequest | tl.stickers.RawRenameStickerSetRequest | tl.stickers.RawDeleteStickerSetRequest | tl.stickers.RawReplaceStickerRequest | tl.phone.RawGetCallConfigRequest | tl.phone.RawRequestCallRequest | tl.phone.RawAcceptCallRequest | tl.phone.RawConfirmCallRequest | tl.phone.RawReceivedCallRequest | tl.phone.RawDiscardCallRequest | tl.phone.RawSetCallRatingRequest | tl.phone.RawSaveCallDebugRequest | tl.phone.RawSendSignalingDataRequest | tl.phone.RawCreateGroupCallRequest | tl.phone.RawJoinGroupCallRequest | tl.phone.RawLeaveGroupCallRequest | tl.phone.RawInviteToGroupCallRequest | tl.phone.RawDiscardGroupCallRequest | tl.phone.RawToggleGroupCallSettingsRequest | tl.phone.RawGetGroupCallRequest | tl.phone.RawGetGroupParticipantsRequest | tl.phone.RawCheckGroupCallRequest | tl.phone.RawToggleGroupCallRecordRequest | tl.phone.RawEditGroupCallParticipantRequest | tl.phone.RawEditGroupCallTitleRequest | tl.phone.RawGetGroupCallJoinAsRequest | tl.phone.RawExportGroupCallInviteRequest | tl.phone.RawToggleGroupCallStartSubscriptionRequest | tl.phone.RawStartScheduledGroupCallRequest | tl.phone.RawSaveDefaultGroupCallJoinAsRequest | tl.phone.RawJoinGroupCallPresentationRequest | tl.phone.RawLeaveGroupCallPresentationRequest | tl.phone.RawGetGroupCallStreamChannelsRequest | tl.phone.RawGetGroupCallStreamRtmpUrlRequest | tl.phone.RawSaveCallLogRequest | tl.phone.RawCreateConferenceCallRequest | tl.phone.RawDeleteConferenceCallParticipantsRequest | tl.phone.RawSendConferenceCallBroadcastRequest | tl.phone.RawInviteConferenceCallParticipantRequest | tl.phone.RawDeclineConferenceCallInviteRequest | tl.phone.RawGetGroupCallChainBlocksRequest | tl.phone.RawSendGroupCallMessageRequest | tl.phone.RawSendGroupCallEncryptedMessageRequest | tl.phone.RawDeleteGroupCallMessagesRequest | tl.phone.RawDeleteGroupCallParticipantMessagesRequest | tl.phone.RawGetGroupCallStarsRequest | tl.phone.RawSaveDefaultSendAsRequest | tl.langpack.RawGetLangPackRequest | tl.langpack.RawGetStringsRequest | tl.langpack.RawGetDifferenceRequest | tl.langpack.RawGetLanguagesRequest | tl.langpack.RawGetLanguageRequest | tl.folders.RawEditPeerFoldersRequest | tl.stats.RawGetBroadcastStatsRequest | tl.stats.RawLoadAsyncGraphRequest | tl.stats.RawGetMegagroupStatsRequest | tl.stats.RawGetMessagePublicForwardsRequest | tl.stats.RawGetMessageStatsRequest | tl.stats.RawGetStoryStatsRequest | tl.stats.RawGetStoryPublicForwardsRequest | tl.chatlists.RawExportChatlistInviteRequest | tl.chatlists.RawDeleteExportedInviteRequest | tl.chatlists.RawEditExportedInviteRequest | tl.chatlists.RawGetExportedInvitesRequest | tl.chatlists.RawCheckChatlistInviteRequest | tl.chatlists.RawJoinChatlistInviteRequest | tl.chatlists.RawGetChatlistUpdatesRequest | tl.chatlists.RawJoinChatlistUpdatesRequest | tl.chatlists.RawHideChatlistUpdatesRequest | tl.chatlists.RawGetLeaveChatlistSuggestionsRequest | tl.chatlists.RawLeaveChatlistRequest | tl.stories.RawCanSendStoryRequest | tl.stories.RawSendStoryRequest | tl.stories.RawEditStoryRequest | tl.stories.RawDeleteStoriesRequest | tl.stories.RawTogglePinnedRequest | tl.stories.RawGetAllStoriesRequest | tl.stories.RawGetPinnedStoriesRequest | tl.stories.RawGetStoriesArchiveRequest | tl.stories.RawGetStoriesByIDRequest | tl.stories.RawToggleAllStoriesHiddenRequest | tl.stories.RawReadStoriesRequest | tl.stories.RawIncrementStoryViewsRequest | tl.stories.RawGetStoryViewsListRequest | tl.stories.RawGetStoriesViewsRequest | tl.stories.RawExportStoryLinkRequest | tl.stories.RawReportRequest | tl.stories.RawActivateStealthModeRequest | tl.stories.RawSendReactionRequest | tl.stories.RawGetPeerStoriesRequest | tl.stories.RawGetAllReadPeerStoriesRequest | tl.stories.RawGetPeerMaxIDsRequest | tl.stories.RawGetChatsToSendRequest | tl.stories.RawTogglePeerStoriesHiddenRequest | tl.stories.RawGetStoryReactionsListRequest | tl.stories.RawTogglePinnedToTopRequest | tl.stories.RawSearchPostsRequest | tl.stories.RawCreateAlbumRequest | tl.stories.RawUpdateAlbumRequest | tl.stories.RawReorderAlbumsRequest | tl.stories.RawDeleteAlbumRequest | tl.stories.RawGetAlbumsRequest | tl.stories.RawGetAlbumStoriesRequest | tl.stories.RawStartLiveRequest | tl.premium.RawGetBoostsListRequest | tl.premium.RawGetMyBoostsRequest | tl.premium.RawApplyBoostRequest | tl.premium.RawGetBoostsStatusRequest | tl.premium.RawGetUserBoostsRequest | tl.smsjobs.RawIsEligibleToJoinRequest | tl.smsjobs.RawJoinRequest | tl.smsjobs.RawLeaveRequest | tl.smsjobs.RawUpdateSettingsRequest | tl.smsjobs.RawGetStatusRequest | tl.smsjobs.RawGetSmsJobRequest | tl.smsjobs.RawFinishJobRequest | tl.fragment.RawGetCollectibleInfoRequest | tl.channels.RawEditCreatorRequest | tl.channels.RawCreateForumTopicRequest | tl.channels.RawGetForumTopicsRequest | tl.channels.RawGetForumTopicsByIDRequest | tl.channels.RawEditForumTopicRequest | tl.channels.RawUpdatePinnedForumTopicRequest | tl.channels.RawDeleteTopicHistoryRequest | tl.channels.RawReorderPinnedForumTopicsRequest | tl.channels.RawGetFutureCreatorAfterLeaveRequest | tl.mtcute.RawCustomMethodRequest type TlObject = | tl.RawError | tl.RawInputPeerPhotoFileLocationLegacy | tl.RawInputStickerSetThumbLegacy | tl.RawInputPeerEmpty | tl.RawInputPeerSelf | tl.RawInputPeerChat | tl.RawInputPeerUser | tl.RawInputPeerChannel | tl.RawInputPeerUserFromMessage | tl.RawInputPeerChannelFromMessage | tl.RawInputUserEmpty | tl.RawInputUserSelf | tl.RawInputUser | tl.RawInputUserFromMessage | tl.RawInputPhoneContact | tl.RawInputFile | tl.RawInputFileBig | tl.RawInputFileStoryDocument | tl.RawInputMediaEmpty | tl.RawInputMediaUploadedPhoto | tl.RawInputMediaPhoto | tl.RawInputMediaGeoPoint | tl.RawInputMediaContact | tl.RawInputMediaUploadedDocument | tl.RawInputMediaDocument | tl.RawInputMediaVenue | tl.RawInputMediaPhotoExternal | tl.RawInputMediaDocumentExternal | tl.RawInputMediaGame | tl.RawInputMediaInvoice | tl.RawInputMediaGeoLive | tl.RawInputMediaPoll | tl.RawInputMediaDice | tl.RawInputMediaStory | tl.RawInputMediaWebPage | tl.RawInputMediaPaidMedia | tl.RawInputMediaTodo | tl.RawInputMediaStakeDice | tl.RawInputChatPhotoEmpty | tl.RawInputChatUploadedPhoto | tl.RawInputChatPhoto | tl.RawInputGeoPointEmpty | tl.RawInputGeoPoint | tl.RawInputPhotoEmpty | tl.RawInputPhoto | tl.RawInputFileLocation | tl.RawInputEncryptedFileLocation | tl.RawInputDocumentFileLocation | tl.RawInputSecureFileLocation | tl.RawInputTakeoutFileLocation | tl.RawInputPhotoFileLocation | tl.RawInputPhotoLegacyFileLocation | tl.RawInputPeerPhotoFileLocation | tl.RawInputStickerSetThumb | tl.RawInputGroupCallStream | tl.RawPeerUser | tl.RawPeerChat | tl.RawPeerChannel | tl.storage.RawFileUnknown | tl.storage.RawFilePartial | tl.storage.RawFileJpeg | tl.storage.RawFileGif | tl.storage.RawFilePng | tl.storage.RawFilePdf | tl.storage.RawFileMp3 | tl.storage.RawFileMov | tl.storage.RawFileMp4 | tl.storage.RawFileWebp | tl.RawUserEmpty | tl.RawUser | tl.RawUserProfilePhotoEmpty | tl.RawUserProfilePhoto | tl.RawUserStatusEmpty | tl.RawUserStatusOnline | tl.RawUserStatusOffline | tl.RawUserStatusRecently | tl.RawUserStatusLastWeek | tl.RawUserStatusLastMonth | tl.RawChatEmpty | tl.RawChat | tl.RawChatForbidden | tl.RawChannel | tl.RawChannelForbidden | tl.RawChatFull | tl.RawChannelFull | tl.RawChatParticipant | tl.RawChatParticipantCreator | tl.RawChatParticipantAdmin | tl.RawChatParticipantsForbidden | tl.RawChatParticipants | tl.RawChatPhotoEmpty | tl.RawChatPhoto | tl.RawMessageEmpty | tl.RawMessage | tl.RawMessageService | tl.RawMessageMediaEmpty | tl.RawMessageMediaPhoto | tl.RawMessageMediaGeo | tl.RawMessageMediaContact | tl.RawMessageMediaUnsupported | tl.RawMessageMediaDocument | tl.RawMessageMediaWebPage | tl.RawMessageMediaVenue | tl.RawMessageMediaGame | tl.RawMessageMediaInvoice | tl.RawMessageMediaGeoLive | tl.RawMessageMediaPoll | tl.RawMessageMediaDice | tl.RawMessageMediaStory | tl.RawMessageMediaGiveaway | tl.RawMessageMediaGiveawayResults | tl.RawMessageMediaPaidMedia | tl.RawMessageMediaToDo | tl.RawMessageMediaVideoStream | tl.RawMessageActionEmpty | tl.RawMessageActionChatCreate | tl.RawMessageActionChatEditTitle | tl.RawMessageActionChatEditPhoto | tl.RawMessageActionChatDeletePhoto | tl.RawMessageActionChatAddUser | tl.RawMessageActionChatDeleteUser | tl.RawMessageActionChatJoinedByLink | tl.RawMessageActionChannelCreate | tl.RawMessageActionChatMigrateTo | tl.RawMessageActionChannelMigrateFrom | tl.RawMessageActionPinMessage | tl.RawMessageActionHistoryClear | tl.RawMessageActionGameScore | tl.RawMessageActionPaymentSentMe | tl.RawMessageActionPaymentSent | tl.RawMessageActionPhoneCall | tl.RawMessageActionScreenshotTaken | tl.RawMessageActionCustomAction | tl.RawMessageActionBotAllowed | tl.RawMessageActionSecureValuesSentMe | tl.RawMessageActionSecureValuesSent | tl.RawMessageActionContactSignUp | tl.RawMessageActionGeoProximityReached | tl.RawMessageActionGroupCall | tl.RawMessageActionInviteToGroupCall | tl.RawMessageActionSetMessagesTTL | tl.RawMessageActionGroupCallScheduled | tl.RawMessageActionSetChatTheme | tl.RawMessageActionChatJoinedByRequest | tl.RawMessageActionWebViewDataSentMe | tl.RawMessageActionWebViewDataSent | tl.RawMessageActionGiftPremium | tl.RawMessageActionTopicCreate | tl.RawMessageActionTopicEdit | tl.RawMessageActionSuggestProfilePhoto | tl.RawMessageActionRequestedPeer | tl.RawMessageActionSetChatWallPaper | tl.RawMessageActionGiftCode | tl.RawMessageActionGiveawayLaunch | tl.RawMessageActionGiveawayResults | tl.RawMessageActionBoostApply | tl.RawMessageActionRequestedPeerSentMe | tl.RawMessageActionPaymentRefunded | tl.RawMessageActionGiftStars | tl.RawMessageActionPrizeStars | tl.RawMessageActionStarGift | tl.RawMessageActionStarGiftUnique | tl.RawMessageActionPaidMessagesRefunded | tl.RawMessageActionPaidMessagesPrice | tl.RawMessageActionConferenceCall | tl.RawMessageActionTodoCompletions | tl.RawMessageActionTodoAppendTasks | tl.RawMessageActionSuggestedPostApproval | tl.RawMessageActionSuggestedPostSuccess | tl.RawMessageActionSuggestedPostRefund | tl.RawMessageActionGiftTon | tl.RawMessageActionSuggestBirthday | tl.RawMessageActionStarGiftPurchaseOffer | tl.RawMessageActionStarGiftPurchaseOfferDeclined | tl.RawMessageActionNewCreatorPending | tl.RawMessageActionChangeCreator | tl.RawMessageActionNoForwardsToggle | tl.RawMessageActionNoForwardsRequest | tl.RawDialog | tl.RawDialogFolder | tl.RawPhotoEmpty | tl.RawPhoto | tl.RawPhotoSizeEmpty | tl.RawPhotoSize | tl.RawPhotoCachedSize | tl.RawPhotoStrippedSize | tl.RawPhotoSizeProgressive | tl.RawPhotoPathSize | tl.RawGeoPointEmpty | tl.RawGeoPoint | tl.auth.RawSentCode | tl.auth.RawSentCodeSuccess | tl.auth.RawSentCodePaymentRequired | tl.auth.RawAuthorization | tl.auth.RawAuthorizationSignUpRequired | tl.auth.RawExportedAuthorization | tl.RawInputNotifyPeer | tl.RawInputNotifyUsers | tl.RawInputNotifyChats | tl.RawInputNotifyBroadcasts | tl.RawInputNotifyForumTopic | tl.RawInputPeerNotifySettings | tl.RawPeerNotifySettings | tl.RawPeerSettings | tl.RawWallPaper | tl.RawWallPaperNoFile | tl.RawInputReportReasonSpam | tl.RawInputReportReasonViolence | tl.RawInputReportReasonPornography | tl.RawInputReportReasonChildAbuse | tl.RawInputReportReasonOther | tl.RawInputReportReasonCopyright | tl.RawInputReportReasonGeoIrrelevant | tl.RawInputReportReasonFake | tl.RawInputReportReasonIllegalDrugs | tl.RawInputReportReasonPersonalDetails | tl.RawUserFull | tl.RawContact | tl.RawImportedContact | tl.RawContactStatus | tl.contacts.RawContactsNotModified | tl.contacts.RawContacts | tl.contacts.RawImportedContacts | tl.contacts.RawBlocked | tl.contacts.RawBlockedSlice | tl.messages.RawDialogs | tl.messages.RawDialogsSlice | tl.messages.RawDialogsNotModified | tl.messages.RawMessages | tl.messages.RawMessagesSlice | tl.messages.RawChannelMessages | tl.messages.RawMessagesNotModified | tl.messages.RawChats | tl.messages.RawChatsSlice | tl.messages.RawChatFull | tl.messages.RawAffectedHistory | tl.RawInputMessagesFilterEmpty | tl.RawInputMessagesFilterPhotos | tl.RawInputMessagesFilterVideo | tl.RawInputMessagesFilterPhotoVideo | tl.RawInputMessagesFilterDocument | tl.RawInputMessagesFilterUrl | tl.RawInputMessagesFilterGif | tl.RawInputMessagesFilterVoice | tl.RawInputMessagesFilterMusic | tl.RawInputMessagesFilterChatPhotos | tl.RawInputMessagesFilterPhoneCalls | tl.RawInputMessagesFilterRoundVoice | tl.RawInputMessagesFilterRoundVideo | tl.RawInputMessagesFilterMyMentions | tl.RawInputMessagesFilterGeo | tl.RawInputMessagesFilterContacts | tl.RawInputMessagesFilterPinned | tl.RawUpdateNewMessage | tl.RawUpdateMessageID | tl.RawUpdateDeleteMessages | tl.RawUpdateUserTyping | tl.RawUpdateChatUserTyping | tl.RawUpdateChatParticipants | tl.RawUpdateUserStatus | tl.RawUpdateUserName | tl.RawUpdateNewAuthorization | tl.RawUpdateNewEncryptedMessage | tl.RawUpdateEncryptedChatTyping | tl.RawUpdateEncryption | tl.RawUpdateEncryptedMessagesRead | tl.RawUpdateChatParticipantAdd | tl.RawUpdateChatParticipantDelete | tl.RawUpdateDcOptions | tl.RawUpdateNotifySettings | tl.RawUpdateServiceNotification | tl.RawUpdatePrivacy | tl.RawUpdateUserPhone | tl.RawUpdateReadHistoryInbox | tl.RawUpdateReadHistoryOutbox | tl.RawUpdateWebPage | tl.RawUpdateReadMessagesContents | tl.RawUpdateChannelTooLong | tl.RawUpdateChannel | tl.RawUpdateNewChannelMessage | tl.RawUpdateReadChannelInbox | tl.RawUpdateDeleteChannelMessages | tl.RawUpdateChannelMessageViews | tl.RawUpdateChatParticipantAdmin | tl.RawUpdateNewStickerSet | tl.RawUpdateStickerSetsOrder | tl.RawUpdateStickerSets | tl.RawUpdateSavedGifs | tl.RawUpdateBotInlineQuery | tl.RawUpdateBotInlineSend | tl.RawUpdateEditChannelMessage | tl.RawUpdateBotCallbackQuery | tl.RawUpdateEditMessage | tl.RawUpdateInlineBotCallbackQuery | tl.RawUpdateReadChannelOutbox | tl.RawUpdateDraftMessage | tl.RawUpdateReadFeaturedStickers | tl.RawUpdateRecentStickers | tl.RawUpdateConfig | tl.RawUpdatePtsChanged | tl.RawUpdateChannelWebPage | tl.RawUpdateDialogPinned | tl.RawUpdatePinnedDialogs | tl.RawUpdateBotWebhookJSON | tl.RawUpdateBotWebhookJSONQuery | tl.RawUpdateBotShippingQuery | tl.RawUpdateBotPrecheckoutQuery | tl.RawUpdatePhoneCall | tl.RawUpdateLangPackTooLong | tl.RawUpdateLangPack | tl.RawUpdateFavedStickers | tl.RawUpdateChannelReadMessagesContents | tl.RawUpdateContactsReset | tl.RawUpdateChannelAvailableMessages | tl.RawUpdateDialogUnreadMark | tl.RawUpdateMessagePoll | tl.RawUpdateChatDefaultBannedRights | tl.RawUpdateFolderPeers | tl.RawUpdatePeerSettings | tl.RawUpdatePeerLocated | tl.RawUpdateNewScheduledMessage | tl.RawUpdateDeleteScheduledMessages | tl.RawUpdateTheme | tl.RawUpdateGeoLiveViewed | tl.RawUpdateLoginToken | tl.RawUpdateMessagePollVote | tl.RawUpdateDialogFilter | tl.RawUpdateDialogFilterOrder | tl.RawUpdateDialogFilters | tl.RawUpdatePhoneCallSignalingData | tl.RawUpdateChannelMessageForwards | tl.RawUpdateReadChannelDiscussionInbox | tl.RawUpdateReadChannelDiscussionOutbox | tl.RawUpdatePeerBlocked | tl.RawUpdateChannelUserTyping | tl.RawUpdatePinnedMessages | tl.RawUpdatePinnedChannelMessages | tl.RawUpdateChat | tl.RawUpdateGroupCallParticipants | tl.RawUpdateGroupCall | tl.RawUpdatePeerHistoryTTL | tl.RawUpdateChatParticipant | tl.RawUpdateChannelParticipant | tl.RawUpdateBotStopped | tl.RawUpdateGroupCallConnection | tl.RawUpdateBotCommands | tl.RawUpdatePendingJoinRequests | tl.RawUpdateBotChatInviteRequester | tl.RawUpdateMessageReactions | tl.RawUpdateAttachMenuBots | tl.RawUpdateWebViewResultSent | tl.RawUpdateBotMenuButton | tl.RawUpdateSavedRingtones | tl.RawUpdateTranscribedAudio | tl.RawUpdateReadFeaturedEmojiStickers | tl.RawUpdateUserEmojiStatus | tl.RawUpdateRecentEmojiStatuses | tl.RawUpdateRecentReactions | tl.RawUpdateMoveStickerSetToTop | tl.RawUpdateMessageExtendedMedia | tl.RawUpdateUser | tl.RawUpdateAutoSaveSettings | tl.RawUpdateStory | tl.RawUpdateReadStories | tl.RawUpdateStoryID | tl.RawUpdateStoriesStealthMode | tl.RawUpdateSentStoryReaction | tl.RawUpdateBotChatBoost | tl.RawUpdateChannelViewForumAsMessages | tl.RawUpdatePeerWallpaper | tl.RawUpdateBotMessageReaction | tl.RawUpdateBotMessageReactions | tl.RawUpdateSavedDialogPinned | tl.RawUpdatePinnedSavedDialogs | tl.RawUpdateSavedReactionTags | tl.RawUpdateSmsJob | tl.RawUpdateQuickReplies | tl.RawUpdateNewQuickReply | tl.RawUpdateDeleteQuickReply | tl.RawUpdateQuickReplyMessage | tl.RawUpdateDeleteQuickReplyMessages | tl.RawUpdateBotBusinessConnect | tl.RawUpdateBotNewBusinessMessage | tl.RawUpdateBotEditBusinessMessage | tl.RawUpdateBotDeleteBusinessMessage | tl.RawUpdateNewStoryReaction | tl.RawUpdateStarsBalance | tl.RawUpdateBusinessBotCallbackQuery | tl.RawUpdateStarsRevenueStatus | tl.RawUpdateBotPurchasedPaidMedia | tl.RawUpdatePaidReactionPrivacy | tl.RawUpdateSentPhoneCode | tl.RawUpdateGroupCallChainBlocks | tl.RawUpdateReadMonoForumInbox | tl.RawUpdateReadMonoForumOutbox | tl.RawUpdateMonoForumNoPaidException | tl.RawUpdateGroupCallMessage | tl.RawUpdateGroupCallEncryptedMessage | tl.RawUpdatePinnedForumTopic | tl.RawUpdatePinnedForumTopics | tl.RawUpdateDeleteGroupCallMessages | tl.RawUpdateStarGiftAuctionState | tl.RawUpdateStarGiftAuctionUserState | tl.RawUpdateEmojiGameInfo | tl.RawUpdateStarGiftCraftFail | tl.RawUpdateChatParticipantRank | tl.updates.RawState | tl.updates.RawDifferenceEmpty | tl.updates.RawDifference | tl.updates.RawDifferenceSlice | tl.updates.RawDifferenceTooLong | tl.RawUpdatesTooLong | tl.RawUpdateShortMessage | tl.RawUpdateShortChatMessage | tl.RawUpdateShort | tl.RawUpdatesCombined | tl.RawUpdates | tl.RawUpdateShortSentMessage | tl.photos.RawPhotos | tl.photos.RawPhotosSlice | tl.photos.RawPhoto | tl.upload.RawFile | tl.upload.RawFileCdnRedirect | tl.RawDcOption | tl.RawConfig | tl.RawNearestDc | tl.help.RawAppUpdate | tl.help.RawNoAppUpdate | tl.help.RawInviteText | tl.RawEncryptedChatEmpty | tl.RawEncryptedChatWaiting | tl.RawEncryptedChatRequested | tl.RawEncryptedChat | tl.RawEncryptedChatDiscarded | tl.RawInputEncryptedChat | tl.RawEncryptedFileEmpty | tl.RawEncryptedFile | tl.RawInputEncryptedFileEmpty | tl.RawInputEncryptedFileUploaded | tl.RawInputEncryptedFile | tl.RawInputEncryptedFileBigUploaded | tl.RawEncryptedMessage | tl.RawEncryptedMessageService | tl.messages.RawDhConfigNotModified | tl.messages.RawDhConfig | tl.messages.RawSentEncryptedMessage | tl.messages.RawSentEncryptedFile | tl.RawInputDocumentEmpty | tl.RawInputDocument | tl.RawDocumentEmpty | tl.RawDocument | tl.help.RawSupport | tl.RawNotifyPeer | tl.RawNotifyUsers | tl.RawNotifyChats | tl.RawNotifyBroadcasts | tl.RawNotifyForumTopic | tl.RawSendMessageTypingAction | tl.RawSendMessageCancelAction | tl.RawSendMessageRecordVideoAction | tl.RawSendMessageUploadVideoAction | tl.RawSendMessageRecordAudioAction | tl.RawSendMessageUploadAudioAction | tl.RawSendMessageUploadPhotoAction | tl.RawSendMessageUploadDocumentAction | tl.RawSendMessageGeoLocationAction | tl.RawSendMessageChooseContactAction | tl.RawSendMessageGamePlayAction | tl.RawSendMessageRecordRoundAction | tl.RawSendMessageUploadRoundAction | tl.RawSpeakingInGroupCallAction | tl.RawSendMessageHistoryImportAction | tl.RawSendMessageChooseStickerAction | tl.RawSendMessageEmojiInteraction | tl.RawSendMessageEmojiInteractionSeen | tl.RawSendMessageTextDraftAction | tl.contacts.RawFound | tl.RawInputPrivacyKeyStatusTimestamp | tl.RawInputPrivacyKeyChatInvite | tl.RawInputPrivacyKeyPhoneCall | tl.RawInputPrivacyKeyPhoneP2P | tl.RawInputPrivacyKeyForwards | tl.RawInputPrivacyKeyProfilePhoto | tl.RawInputPrivacyKeyPhoneNumber | tl.RawInputPrivacyKeyAddedByPhone | tl.RawInputPrivacyKeyVoiceMessages | tl.RawInputPrivacyKeyAbout | tl.RawInputPrivacyKeyBirthday | tl.RawInputPrivacyKeyStarGiftsAutoSave | tl.RawInputPrivacyKeyNoPaidMessages | tl.RawInputPrivacyKeySavedMusic | tl.RawPrivacyKeyStatusTimestamp | tl.RawPrivacyKeyChatInvite | tl.RawPrivacyKeyPhoneCall | tl.RawPrivacyKeyPhoneP2P | tl.RawPrivacyKeyForwards | tl.RawPrivacyKeyProfilePhoto | tl.RawPrivacyKeyPhoneNumber | tl.RawPrivacyKeyAddedByPhone | tl.RawPrivacyKeyVoiceMessages | tl.RawPrivacyKeyAbout | tl.RawPrivacyKeyBirthday | tl.RawPrivacyKeyStarGiftsAutoSave | tl.RawPrivacyKeyNoPaidMessages | tl.RawPrivacyKeySavedMusic | tl.RawInputPrivacyValueAllowContacts | tl.RawInputPrivacyValueAllowAll | tl.RawInputPrivacyValueAllowUsers | tl.RawInputPrivacyValueDisallowContacts | tl.RawInputPrivacyValueDisallowAll | tl.RawInputPrivacyValueDisallowUsers | tl.RawInputPrivacyValueAllowChatParticipants | tl.RawInputPrivacyValueDisallowChatParticipants | tl.RawInputPrivacyValueAllowCloseFriends | tl.RawInputPrivacyValueAllowPremium | tl.RawInputPrivacyValueAllowBots | tl.RawInputPrivacyValueDisallowBots | tl.RawPrivacyValueAllowContacts | tl.RawPrivacyValueAllowAll | tl.RawPrivacyValueAllowUsers | tl.RawPrivacyValueDisallowContacts | tl.RawPrivacyValueDisallowAll | tl.RawPrivacyValueDisallowUsers | tl.RawPrivacyValueAllowChatParticipants | tl.RawPrivacyValueDisallowChatParticipants | tl.RawPrivacyValueAllowCloseFriends | tl.RawPrivacyValueAllowPremium | tl.RawPrivacyValueAllowBots | tl.RawPrivacyValueDisallowBots | tl.account.RawPrivacyRules | tl.RawAccountDaysTTL | tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeAnimated | tl.RawDocumentAttributeSticker | tl.RawDocumentAttributeVideo | tl.RawDocumentAttributeAudio | tl.RawDocumentAttributeFilename | tl.RawDocumentAttributeHasStickers | tl.RawDocumentAttributeCustomEmoji | tl.messages.RawStickersNotModified | tl.messages.RawStickers | tl.RawStickerPack | tl.messages.RawAllStickersNotModified | tl.messages.RawAllStickers | tl.messages.RawAffectedMessages | tl.RawWebPageEmpty | tl.RawWebPagePending | tl.RawWebPage | tl.RawWebPageNotModified | tl.RawAuthorization | tl.account.RawAuthorizations | tl.account.RawPassword | tl.account.RawPasswordSettings | tl.account.RawPasswordInputSettings | tl.auth.RawPasswordRecovery | tl.RawReceivedNotifyMessage | tl.RawChatInviteExported | tl.RawChatInvitePublicJoinRequests | tl.RawChatInviteAlready | tl.RawChatInvite | tl.RawChatInvitePeek | tl.RawInputStickerSetEmpty | tl.RawInputStickerSetID | tl.RawInputStickerSetShortName | tl.RawInputStickerSetAnimatedEmoji | tl.RawInputStickerSetDice | tl.RawInputStickerSetAnimatedEmojiAnimations | tl.RawInputStickerSetPremiumGifts | tl.RawInputStickerSetEmojiGenericAnimations | tl.RawInputStickerSetEmojiDefaultStatuses | tl.RawInputStickerSetEmojiDefaultTopicIcons | tl.RawInputStickerSetEmojiChannelDefaultStatuses | tl.RawInputStickerSetTonGifts | tl.RawStickerSet | tl.messages.RawStickerSet | tl.messages.RawStickerSetNotModified | tl.RawBotCommand | tl.RawBotInfo | tl.RawKeyboardButton | tl.RawKeyboardButtonUrl | tl.RawKeyboardButtonCallback | tl.RawKeyboardButtonRequestPhone | tl.RawKeyboardButtonRequestGeoLocation | tl.RawKeyboardButtonSwitchInline | tl.RawKeyboardButtonGame | tl.RawKeyboardButtonBuy | tl.RawKeyboardButtonUrlAuth | tl.RawInputKeyboardButtonUrlAuth | tl.RawKeyboardButtonRequestPoll | tl.RawInputKeyboardButtonUserProfile | tl.RawKeyboardButtonUserProfile | tl.RawKeyboardButtonWebView | tl.RawKeyboardButtonSimpleWebView | tl.RawKeyboardButtonRequestPeer | tl.RawInputKeyboardButtonRequestPeer | tl.RawKeyboardButtonCopy | tl.RawKeyboardButtonRow | tl.RawReplyKeyboardHide | tl.RawReplyKeyboardForceReply | tl.RawReplyKeyboardMarkup | tl.RawReplyInlineMarkup | tl.RawMessageEntityUnknown | tl.RawMessageEntityMention | tl.RawMessageEntityHashtag | tl.RawMessageEntityBotCommand | tl.RawMessageEntityUrl | tl.RawMessageEntityEmail | tl.RawMessageEntityBold | tl.RawMessageEntityItalic | tl.RawMessageEntityCode | tl.RawMessageEntityPre | tl.RawMessageEntityTextUrl | tl.RawMessageEntityMentionName | tl.RawInputMessageEntityMentionName | tl.RawMessageEntityPhone | tl.RawMessageEntityCashtag | tl.RawMessageEntityUnderline | tl.RawMessageEntityStrike | tl.RawMessageEntityBankCard | tl.RawMessageEntitySpoiler | tl.RawMessageEntityCustomEmoji | tl.RawMessageEntityBlockquote | tl.RawMessageEntityFormattedDate | tl.RawInputChannelEmpty | tl.RawInputChannel | tl.RawInputChannelFromMessage | tl.contacts.RawResolvedPeer | tl.RawMessageRange | tl.updates.RawChannelDifferenceEmpty | tl.updates.RawChannelDifferenceTooLong | tl.updates.RawChannelDifference | tl.RawChannelMessagesFilterEmpty | tl.RawChannelMessagesFilter | tl.RawChannelParticipant | tl.RawChannelParticipantSelf | tl.RawChannelParticipantCreator | tl.RawChannelParticipantAdmin | tl.RawChannelParticipantBanned | tl.RawChannelParticipantLeft | tl.RawChannelParticipantsRecent | tl.RawChannelParticipantsAdmins | tl.RawChannelParticipantsKicked | tl.RawChannelParticipantsBots | tl.RawChannelParticipantsBanned | tl.RawChannelParticipantsSearch | tl.RawChannelParticipantsContacts | tl.RawChannelParticipantsMentions | tl.channels.RawChannelParticipants | tl.channels.RawChannelParticipantsNotModified | tl.channels.RawChannelParticipant | tl.help.RawTermsOfService | tl.messages.RawSavedGifsNotModified | tl.messages.RawSavedGifs | tl.RawInputBotInlineMessageMediaAuto | tl.RawInputBotInlineMessageText | tl.RawInputBotInlineMessageMediaGeo | tl.RawInputBotInlineMessageMediaVenue | tl.RawInputBotInlineMessageMediaContact | tl.RawInputBotInlineMessageGame | tl.RawInputBotInlineMessageMediaInvoice | tl.RawInputBotInlineMessageMediaWebPage | tl.RawInputBotInlineResult | tl.RawInputBotInlineResultPhoto | tl.RawInputBotInlineResultDocument | tl.RawInputBotInlineResultGame | tl.RawBotInlineMessageMediaAuto | tl.RawBotInlineMessageText | tl.RawBotInlineMessageMediaGeo | tl.RawBotInlineMessageMediaVenue | tl.RawBotInlineMessageMediaContact | tl.RawBotInlineMessageMediaInvoice | tl.RawBotInlineMessageMediaWebPage | tl.RawBotInlineResult | tl.RawBotInlineMediaResult | tl.messages.RawBotResults | tl.RawExportedMessageLink | tl.RawMessageFwdHeader | tl.auth.RawCodeTypeSms | tl.auth.RawCodeTypeCall | tl.auth.RawCodeTypeFlashCall | tl.auth.RawCodeTypeMissedCall | tl.auth.RawCodeTypeFragmentSms | tl.auth.RawSentCodeTypeApp | tl.auth.RawSentCodeTypeSms | tl.auth.RawSentCodeTypeCall | tl.auth.RawSentCodeTypeFlashCall | tl.auth.RawSentCodeTypeMissedCall | tl.auth.RawSentCodeTypeEmailCode | tl.auth.RawSentCodeTypeSetUpEmailRequired | tl.auth.RawSentCodeTypeFragmentSms | tl.auth.RawSentCodeTypeFirebaseSms | tl.auth.RawSentCodeTypeSmsWord | tl.auth.RawSentCodeTypeSmsPhrase | tl.messages.RawBotCallbackAnswer | tl.messages.RawMessageEditData | tl.RawInputBotInlineMessageID | tl.RawInputBotInlineMessageID64 | tl.RawInlineBotSwitchPM | tl.messages.RawPeerDialogs | tl.RawTopPeer | tl.RawTopPeerCategoryBotsPM | tl.RawTopPeerCategoryBotsInline | tl.RawTopPeerCategoryCorrespondents | tl.RawTopPeerCategoryGroups | tl.RawTopPeerCategoryChannels | tl.RawTopPeerCategoryPhoneCalls | tl.RawTopPeerCategoryForwardUsers | tl.RawTopPeerCategoryForwardChats | tl.RawTopPeerCategoryBotsApp | tl.RawTopPeerCategoryPeers | tl.contacts.RawTopPeersNotModified | tl.contacts.RawTopPeers | tl.contacts.RawTopPeersDisabled | tl.RawDraftMessageEmpty | tl.RawDraftMessage | tl.messages.RawFeaturedStickersNotModified | tl.messages.RawFeaturedStickers | tl.messages.RawRecentStickersNotModified | tl.messages.RawRecentStickers | tl.messages.RawArchivedStickers | tl.messages.RawStickerSetInstallResultSuccess | tl.messages.RawStickerSetInstallResultArchive | tl.RawStickerSetCovered | tl.RawStickerSetMultiCovered | tl.RawStickerSetFullCovered | tl.RawStickerSetNoCovered | tl.RawMaskCoords | tl.RawInputStickeredMediaPhoto | tl.RawInputStickeredMediaDocument | tl.RawGame | tl.RawInputGameID | tl.RawInputGameShortName | tl.RawHighScore | tl.messages.RawHighScores | tl.RawTextEmpty | tl.RawTextPlain | tl.RawTextBold | tl.RawTextItalic | tl.RawTextUnderline | tl.RawTextStrike | tl.RawTextFixed | tl.RawTextUrl | tl.RawTextEmail | tl.RawTextConcat | tl.RawTextSubscript | tl.RawTextSuperscript | tl.RawTextMarked | tl.RawTextPhone | tl.RawTextImage | tl.RawTextAnchor | tl.RawPageBlockUnsupported | tl.RawPageBlockTitle | tl.RawPageBlockSubtitle | tl.RawPageBlockAuthorDate | tl.RawPageBlockHeader | tl.RawPageBlockSubheader | tl.RawPageBlockParagraph | tl.RawPageBlockPreformatted | tl.RawPageBlockFooter | tl.RawPageBlockDivider | tl.RawPageBlockAnchor | tl.RawPageBlockList | tl.RawPageBlockBlockquote | tl.RawPageBlockPullquote | tl.RawPageBlockPhoto | tl.RawPageBlockVideo | tl.RawPageBlockCover | tl.RawPageBlockEmbed | tl.RawPageBlockEmbedPost | tl.RawPageBlockCollage | tl.RawPageBlockSlideshow | tl.RawPageBlockChannel | tl.RawPageBlockAudio | tl.RawPageBlockKicker | tl.RawPageBlockTable | tl.RawPageBlockOrderedList | tl.RawPageBlockDetails | tl.RawPageBlockRelatedArticles | tl.RawPageBlockMap | tl.RawPhoneCallDiscardReasonMissed | tl.RawPhoneCallDiscardReasonDisconnect | tl.RawPhoneCallDiscardReasonHangup | tl.RawPhoneCallDiscardReasonBusy | tl.RawPhoneCallDiscardReasonMigrateConferenceCall | tl.RawDataJSON | tl.RawLabeledPrice | tl.RawInvoice | tl.RawPaymentCharge | tl.RawPostAddress | tl.RawPaymentRequestedInfo | tl.RawPaymentSavedCredentialsCard | tl.RawWebDocument | tl.RawWebDocumentNoProxy | tl.RawInputWebDocument | tl.RawInputWebFileLocation | tl.RawInputWebFileGeoPointLocation | tl.RawInputWebFileAudioAlbumThumbLocation | tl.upload.RawWebFile | tl.payments.RawPaymentForm | tl.payments.RawPaymentFormStars | tl.payments.RawPaymentFormStarGift | tl.payments.RawValidatedRequestedInfo | tl.payments.RawPaymentResult | tl.payments.RawPaymentVerificationNeeded | tl.payments.RawPaymentReceipt | tl.payments.RawPaymentReceiptStars | tl.payments.RawSavedInfo | tl.RawInputPaymentCredentialsSaved | tl.RawInputPaymentCredentials | tl.RawInputPaymentCredentialsApplePay | tl.RawInputPaymentCredentialsGooglePay | tl.account.RawTmpPassword | tl.RawShippingOption | tl.RawInputStickerSetItem | tl.RawInputPhoneCall | tl.RawPhoneCallEmpty | tl.RawPhoneCallWaiting | tl.RawPhoneCallRequested | tl.RawPhoneCallAccepted | tl.RawPhoneCall | tl.RawPhoneCallDiscarded | tl.RawPhoneConnection | tl.RawPhoneConnectionWebrtc | tl.RawPhoneCallProtocol | tl.phone.RawPhoneCall | tl.upload.RawCdnFileReuploadNeeded | tl.upload.RawCdnFile | tl.RawCdnPublicKey | tl.RawCdnConfig | tl.RawLangPackString | tl.RawLangPackStringPluralized | tl.RawLangPackStringDeleted | tl.RawLangPackDifference | tl.RawLangPackLanguage | tl.RawChannelAdminLogEventActionChangeTitle | tl.RawChannelAdminLogEventActionChangeAbout | tl.RawChannelAdminLogEventActionChangeUsername | tl.RawChannelAdminLogEventActionChangePhoto | tl.RawChannelAdminLogEventActionToggleInvites | tl.RawChannelAdminLogEventActionToggleSignatures | tl.RawChannelAdminLogEventActionUpdatePinned | tl.RawChannelAdminLogEventActionEditMessage | tl.RawChannelAdminLogEventActionDeleteMessage | tl.RawChannelAdminLogEventActionParticipantJoin | tl.RawChannelAdminLogEventActionParticipantLeave | tl.RawChannelAdminLogEventActionParticipantInvite | tl.RawChannelAdminLogEventActionParticipantToggleBan | tl.RawChannelAdminLogEventActionParticipantToggleAdmin | tl.RawChannelAdminLogEventActionChangeStickerSet | tl.RawChannelAdminLogEventActionTogglePreHistoryHidden | tl.RawChannelAdminLogEventActionDefaultBannedRights | tl.RawChannelAdminLogEventActionStopPoll | tl.RawChannelAdminLogEventActionChangeLinkedChat | tl.RawChannelAdminLogEventActionChangeLocation | tl.RawChannelAdminLogEventActionToggleSlowMode | tl.RawChannelAdminLogEventActionStartGroupCall | tl.RawChannelAdminLogEventActionDiscardGroupCall | tl.RawChannelAdminLogEventActionParticipantMute | tl.RawChannelAdminLogEventActionParticipantUnmute | tl.RawChannelAdminLogEventActionToggleGroupCallSetting | tl.RawChannelAdminLogEventActionParticipantJoinByInvite | tl.RawChannelAdminLogEventActionExportedInviteDelete | tl.RawChannelAdminLogEventActionExportedInviteRevoke | tl.RawChannelAdminLogEventActionExportedInviteEdit | tl.RawChannelAdminLogEventActionParticipantVolume | tl.RawChannelAdminLogEventActionChangeHistoryTTL | tl.RawChannelAdminLogEventActionParticipantJoinByRequest | tl.RawChannelAdminLogEventActionToggleNoForwards | tl.RawChannelAdminLogEventActionSendMessage | tl.RawChannelAdminLogEventActionChangeAvailableReactions | tl.RawChannelAdminLogEventActionChangeUsernames | tl.RawChannelAdminLogEventActionToggleForum | tl.RawChannelAdminLogEventActionCreateTopic | tl.RawChannelAdminLogEventActionEditTopic | tl.RawChannelAdminLogEventActionDeleteTopic | tl.RawChannelAdminLogEventActionPinTopic | tl.RawChannelAdminLogEventActionToggleAntiSpam | tl.RawChannelAdminLogEventActionChangePeerColor | tl.RawChannelAdminLogEventActionChangeProfilePeerColor | tl.RawChannelAdminLogEventActionChangeWallpaper | tl.RawChannelAdminLogEventActionChangeEmojiStatus | tl.RawChannelAdminLogEventActionChangeEmojiStickerSet | tl.RawChannelAdminLogEventActionToggleSignatureProfiles | tl.RawChannelAdminLogEventActionParticipantSubExtend | tl.RawChannelAdminLogEventActionToggleAutotranslation | tl.RawChannelAdminLogEventActionParticipantEditRank | tl.RawChannelAdminLogEvent | tl.channels.RawAdminLogResults | tl.RawChannelAdminLogEventsFilter | tl.RawPopularContact | tl.messages.RawFavedStickersNotModified | tl.messages.RawFavedStickers | tl.RawRecentMeUrlUnknown | tl.RawRecentMeUrlUser | tl.RawRecentMeUrlChat | tl.RawRecentMeUrlChatInvite | tl.RawRecentMeUrlStickerSet | tl.help.RawRecentMeUrls | tl.RawInputSingleMedia | tl.RawWebAuthorization | tl.account.RawWebAuthorizations | tl.RawInputMessageID | tl.RawInputMessageReplyTo | tl.RawInputMessagePinned | tl.RawInputMessageCallbackQuery | tl.RawInputDialogPeer | tl.RawInputDialogPeerFolder | tl.RawDialogPeer | tl.RawDialogPeerFolder | tl.messages.RawFoundStickerSetsNotModified | tl.messages.RawFoundStickerSets | tl.RawFileHash | tl.RawInputClientProxy | tl.help.RawTermsOfServiceUpdateEmpty | tl.help.RawTermsOfServiceUpdate | tl.RawInputSecureFileUploaded | tl.RawInputSecureFile | tl.RawSecureFileEmpty | tl.RawSecureFile | tl.RawSecureData | tl.RawSecurePlainPhone | tl.RawSecurePlainEmail | tl.RawSecureValueTypePersonalDetails | tl.RawSecureValueTypePassport | tl.RawSecureValueTypeDriverLicense | tl.RawSecureValueTypeIdentityCard | tl.RawSecureValueTypeInternalPassport | tl.RawSecureValueTypeAddress | tl.RawSecureValueTypeUtilityBill | tl.RawSecureValueTypeBankStatement | tl.RawSecureValueTypeRentalAgreement | tl.RawSecureValueTypePassportRegistration | tl.RawSecureValueTypeTemporaryRegistration | tl.RawSecureValueTypePhone | tl.RawSecureValueTypeEmail | tl.RawSecureValue | tl.RawInputSecureValue | tl.RawSecureValueHash | tl.RawSecureValueErrorData | tl.RawSecureValueErrorFrontSide | tl.RawSecureValueErrorReverseSide | tl.RawSecureValueErrorSelfie | tl.RawSecureValueErrorFile | tl.RawSecureValueErrorFiles | tl.RawSecureValueError | tl.RawSecureValueErrorTranslationFile | tl.RawSecureValueErrorTranslationFiles | tl.RawSecureCredentialsEncrypted | tl.account.RawAuthorizationForm | tl.account.RawSentEmailCode | tl.help.RawDeepLinkInfoEmpty | tl.help.RawDeepLinkInfo | tl.RawSavedPhoneContact | tl.account.RawTakeout | tl.RawPasswordKdfAlgoUnknown | tl.RawPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow | tl.RawSecurePasswordKdfAlgoUnknown | tl.RawSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 | tl.RawSecurePasswordKdfAlgoSHA512 | tl.RawSecureSecretSettings | tl.RawInputCheckPasswordEmpty | tl.RawInputCheckPasswordSRP | tl.RawSecureRequiredType | tl.RawSecureRequiredTypeOneOf | tl.help.RawPassportConfigNotModified | tl.help.RawPassportConfig | tl.RawInputAppEvent | tl.RawJsonObjectValue | tl.RawJsonNull | tl.RawJsonBool | tl.RawJsonNumber | tl.RawJsonString | tl.RawJsonArray | tl.RawJsonObject | tl.RawPageTableCell | tl.RawPageTableRow | tl.RawPageCaption | tl.RawPageListItemText | tl.RawPageListItemBlocks | tl.RawPageListOrderedItemText | tl.RawPageListOrderedItemBlocks | tl.RawPageRelatedArticle | tl.RawPage | tl.help.RawSupportName | tl.help.RawUserInfoEmpty | tl.help.RawUserInfo | tl.RawPollAnswer | tl.RawPoll | tl.RawPollAnswerVoters | tl.RawPollResults | tl.RawChatOnlines | tl.RawStatsURL | tl.RawChatAdminRights | tl.RawChatBannedRights | tl.RawInputWallPaper | tl.RawInputWallPaperSlug | tl.RawInputWallPaperNoFile | tl.account.RawWallPapersNotModified | tl.account.RawWallPapers | tl.RawCodeSettings | tl.RawWallPaperSettings | tl.RawAutoDownloadSettings | tl.account.RawAutoDownloadSettings | tl.RawEmojiKeyword | tl.RawEmojiKeywordDeleted | tl.RawEmojiKeywordsDifference | tl.RawEmojiURL | tl.RawEmojiLanguage | tl.RawFolder | tl.RawInputFolderPeer | tl.RawFolderPeer | tl.messages.RawSearchCounter | tl.RawUrlAuthResultRequest | tl.RawUrlAuthResultAccepted | tl.RawUrlAuthResultDefault | tl.RawChannelLocationEmpty | tl.RawChannelLocation | tl.RawPeerLocated | tl.RawPeerSelfLocated | tl.RawRestrictionReason | tl.RawInputTheme | tl.RawInputThemeSlug | tl.RawTheme | tl.account.RawThemesNotModified | tl.account.RawThemes | tl.auth.RawLoginToken | tl.auth.RawLoginTokenMigrateTo | tl.auth.RawLoginTokenSuccess | tl.account.RawContentSettings | tl.messages.RawInactiveChats | tl.RawBaseThemeClassic | tl.RawBaseThemeDay | tl.RawBaseThemeNight | tl.RawBaseThemeTinted | tl.RawBaseThemeArctic | tl.RawInputThemeSettings | tl.RawThemeSettings | tl.RawWebPageAttributeTheme | tl.RawWebPageAttributeStory | tl.RawWebPageAttributeStickerSet | tl.RawWebPageAttributeUniqueStarGift | tl.RawWebPageAttributeStarGiftCollection | tl.RawWebPageAttributeStarGiftAuction | tl.messages.RawVotesList | tl.RawBankCardOpenUrl | tl.payments.RawBankCardData | tl.RawDialogFilter | tl.RawDialogFilterDefault | tl.RawDialogFilterChatlist | tl.RawDialogFilterSuggested | tl.RawStatsDateRangeDays | tl.RawStatsAbsValueAndPrev | tl.RawStatsPercentValue | tl.RawStatsGraphAsync | tl.RawStatsGraphError | tl.RawStatsGraph | tl.stats.RawBroadcastStats | tl.help.RawPromoDataEmpty | tl.help.RawPromoData | tl.RawVideoSize | tl.RawVideoSizeEmojiMarkup | tl.RawVideoSizeStickerMarkup | tl.RawStatsGroupTopPoster | tl.RawStatsGroupTopAdmin | tl.RawStatsGroupTopInviter | tl.stats.RawMegagroupStats | tl.RawGlobalPrivacySettings | tl.help.RawCountryCode | tl.help.RawCountry | tl.help.RawCountriesListNotModified | tl.help.RawCountriesList | tl.RawMessageViews | tl.messages.RawMessageViews | tl.messages.RawDiscussionMessage | tl.RawMessageReplyHeader | tl.RawMessageReplyStoryHeader | tl.RawMessageReplies | tl.RawPeerBlocked | tl.stats.RawMessageStats | tl.RawGroupCallDiscarded | tl.RawGroupCall | tl.RawInputGroupCall | tl.RawInputGroupCallSlug | tl.RawInputGroupCallInviteMessage | tl.RawGroupCallParticipant | tl.phone.RawGroupCall | tl.phone.RawGroupParticipants | tl.RawInlineQueryPeerTypeSameBotPM | tl.RawInlineQueryPeerTypePM | tl.RawInlineQueryPeerTypeChat | tl.RawInlineQueryPeerTypeMegagroup | tl.RawInlineQueryPeerTypeBroadcast | tl.RawInlineQueryPeerTypeBotPM | tl.messages.RawHistoryImport | tl.messages.RawHistoryImportParsed | tl.messages.RawAffectedFoundMessages | tl.RawChatInviteImporter | tl.messages.RawExportedChatInvites | tl.messages.RawExportedChatInvite | tl.messages.RawExportedChatInviteReplaced | tl.messages.RawChatInviteImporters | tl.RawChatAdminWithInvites | tl.messages.RawChatAdminsWithInvites | tl.messages.RawCheckedHistoryImportPeer | tl.phone.RawJoinAsPeers | tl.phone.RawExportedGroupCallInvite | tl.RawGroupCallParticipantVideoSourceGroup | tl.RawGroupCallParticipantVideo | tl.stickers.RawSuggestedShortName | tl.RawBotCommandScopeDefault | tl.RawBotCommandScopeUsers | tl.RawBotCommandScopeChats | tl.RawBotCommandScopeChatAdmins | tl.RawBotCommandScopePeer | tl.RawBotCommandScopePeerAdmins | tl.RawBotCommandScopePeerUser | tl.account.RawResetPasswordFailedWait | tl.account.RawResetPasswordRequestedWait | tl.account.RawResetPasswordOk | tl.RawChatTheme | tl.RawChatThemeUniqueGift | tl.account.RawChatThemesNotModified | tl.account.RawChatThemes | tl.RawSponsoredMessage | tl.messages.RawSponsoredMessages | tl.messages.RawSponsoredMessagesEmpty | tl.RawSearchResultsCalendarPeriod | tl.messages.RawSearchResultsCalendar | tl.RawSearchResultPosition | tl.messages.RawSearchResultsPositions | tl.channels.RawSendAsPeers | tl.users.RawUserFull | tl.messages.RawPeerSettings | tl.auth.RawLoggedOut | tl.RawReactionCount | tl.RawMessageReactions | tl.messages.RawMessageReactionsList | tl.RawAvailableReaction | tl.messages.RawAvailableReactionsNotModified | tl.messages.RawAvailableReactions | tl.RawMessagePeerReaction | tl.RawGroupCallStreamChannel | tl.phone.RawGroupCallStreamChannels | tl.phone.RawGroupCallStreamRtmpUrl | tl.RawAttachMenuBotIconColor | tl.RawAttachMenuBotIcon | tl.RawAttachMenuBot | tl.RawAttachMenuBotsNotModified | tl.RawAttachMenuBots | tl.RawAttachMenuBotsBot | tl.RawWebViewResultUrl | tl.RawWebViewMessageSent | tl.RawBotMenuButtonDefault | tl.RawBotMenuButtonCommands | tl.RawBotMenuButton | tl.account.RawSavedRingtonesNotModified | tl.account.RawSavedRingtones | tl.RawNotificationSoundDefault | tl.RawNotificationSoundNone | tl.RawNotificationSoundLocal | tl.RawNotificationSoundRingtone | tl.account.RawSavedRingtone | tl.account.RawSavedRingtoneConverted | tl.RawAttachMenuPeerTypeSameBotPM | tl.RawAttachMenuPeerTypeBotPM | tl.RawAttachMenuPeerTypePM | tl.RawAttachMenuPeerTypeChat | tl.RawAttachMenuPeerTypeBroadcast | tl.RawInputInvoiceMessage | tl.RawInputInvoiceSlug | tl.RawInputInvoicePremiumGiftCode | tl.RawInputInvoiceStars | tl.RawInputInvoiceChatInviteSubscription | tl.RawInputInvoiceStarGift | tl.RawInputInvoiceStarGiftUpgrade | tl.RawInputInvoiceStarGiftTransfer | tl.RawInputInvoicePremiumGiftStars | tl.RawInputInvoiceBusinessBotTransferStars | tl.RawInputInvoiceStarGiftResale | tl.RawInputInvoiceStarGiftPrepaidUpgrade | tl.RawInputInvoicePremiumAuthCode | tl.RawInputInvoiceStarGiftDropOriginalDetails | tl.RawInputInvoiceStarGiftAuctionBid | tl.payments.RawExportedInvoice | tl.messages.RawTranscribedAudio | tl.help.RawPremiumPromo | tl.RawInputStorePaymentPremiumSubscription | tl.RawInputStorePaymentGiftPremium | tl.RawInputStorePaymentPremiumGiftCode | tl.RawInputStorePaymentPremiumGiveaway | tl.RawInputStorePaymentStarsTopup | tl.RawInputStorePaymentStarsGift | tl.RawInputStorePaymentStarsGiveaway | tl.RawInputStorePaymentAuthCode | tl.RawPaymentFormMethod | tl.RawEmojiStatusEmpty | tl.RawEmojiStatus | tl.RawEmojiStatusCollectible | tl.RawInputEmojiStatusCollectible | tl.account.RawEmojiStatusesNotModified | tl.account.RawEmojiStatuses | tl.RawReactionEmpty | tl.RawReactionEmoji | tl.RawReactionCustomEmoji | tl.RawReactionPaid | tl.RawChatReactionsNone | tl.RawChatReactionsAll | tl.RawChatReactionsSome | tl.messages.RawReactionsNotModified | tl.messages.RawReactions | tl.RawEmailVerifyPurposeLoginSetup | tl.RawEmailVerifyPurposeLoginChange | tl.RawEmailVerifyPurposePassport | tl.RawEmailVerificationCode | tl.RawEmailVerificationGoogle | tl.RawEmailVerificationApple | tl.account.RawEmailVerified | tl.account.RawEmailVerifiedLogin | tl.RawPremiumSubscriptionOption | tl.RawSendAsPeer | tl.RawMessageExtendedMediaPreview | tl.RawMessageExtendedMedia | tl.RawStickerKeyword | tl.RawUsername | tl.RawForumTopicDeleted | tl.RawForumTopic | tl.messages.RawForumTopics | tl.RawDefaultHistoryTTL | tl.RawExportedContactToken | tl.RawRequestPeerTypeUser | tl.RawRequestPeerTypeChat | tl.RawRequestPeerTypeBroadcast | tl.RawEmojiListNotModified | tl.RawEmojiList | tl.RawEmojiGroup | tl.RawEmojiGroupGreeting | tl.RawEmojiGroupPremium | tl.messages.RawEmojiGroupsNotModified | tl.messages.RawEmojiGroups | tl.RawTextWithEntities | tl.messages.RawTranslateResult | tl.RawAutoSaveSettings | tl.RawAutoSaveException | tl.account.RawAutoSaveSettings | tl.help.RawAppConfigNotModified | tl.help.RawAppConfig | tl.RawInputBotAppID | tl.RawInputBotAppShortName | tl.RawBotAppNotModified | tl.RawBotApp | tl.messages.RawBotApp | tl.RawInlineBotWebView | tl.RawReadParticipantDate | tl.RawInputChatlistDialogFilter | tl.RawExportedChatlistInvite | tl.chatlists.RawExportedChatlistInvite | tl.chatlists.RawExportedInvites | tl.chatlists.RawChatlistInviteAlready | tl.chatlists.RawChatlistInvite | tl.chatlists.RawChatlistUpdates | tl.bots.RawBotInfo | tl.RawMessagePeerVote | tl.RawMessagePeerVoteInputOption | tl.RawMessagePeerVoteMultiple | tl.RawStoryViews | tl.RawStoryItemDeleted | tl.RawStoryItemSkipped | tl.RawStoryItem | tl.stories.RawAllStoriesNotModified | tl.stories.RawAllStories | tl.stories.RawStories | tl.RawStoryView | tl.RawStoryViewPublicForward | tl.RawStoryViewPublicRepost | tl.stories.RawStoryViewsList | tl.stories.RawStoryViews | tl.RawInputReplyToMessage | tl.RawInputReplyToStory | tl.RawInputReplyToMonoForum | tl.RawExportedStoryLink | tl.RawStoriesStealthMode | tl.RawMediaAreaCoordinates | tl.RawMediaAreaVenue | tl.RawInputMediaAreaVenue | tl.RawMediaAreaGeoPoint | tl.RawMediaAreaSuggestedReaction | tl.RawMediaAreaChannelPost | tl.RawInputMediaAreaChannelPost | tl.RawMediaAreaUrl | tl.RawMediaAreaWeather | tl.RawMediaAreaStarGift | tl.RawPeerStories | tl.stories.RawPeerStories | tl.messages.RawWebPage | tl.RawPremiumGiftCodeOption | tl.payments.RawCheckedGiftCode | tl.payments.RawGiveawayInfo | tl.payments.RawGiveawayInfoResults | tl.RawPrepaidGiveaway | tl.RawPrepaidStarsGiveaway | tl.RawBoost | tl.premium.RawBoostsList | tl.RawMyBoost | tl.premium.RawMyBoosts | tl.premium.RawBoostsStatus | tl.RawStoryFwdHeader | tl.RawPostInteractionCountersMessage | tl.RawPostInteractionCountersStory | tl.stats.RawStoryStats | tl.RawPublicForwardMessage | tl.RawPublicForwardStory | tl.stats.RawPublicForwards | tl.RawPeerColor | tl.RawPeerColorCollectible | tl.RawInputPeerColorCollectible | tl.help.RawPeerColorSet | tl.help.RawPeerColorProfileSet | tl.help.RawPeerColorOption | tl.help.RawPeerColorsNotModified | tl.help.RawPeerColors | tl.RawStoryReaction | tl.RawStoryReactionPublicForward | tl.RawStoryReactionPublicRepost | tl.stories.RawStoryReactionsList | tl.RawSavedDialog | tl.RawMonoForumDialog | tl.messages.RawSavedDialogs | tl.messages.RawSavedDialogsSlice | tl.messages.RawSavedDialogsNotModified | tl.RawSavedReactionTag | tl.messages.RawSavedReactionTagsNotModified | tl.messages.RawSavedReactionTags | tl.RawOutboxReadDate | tl.smsjobs.RawEligibleToJoin | tl.smsjobs.RawStatus | tl.RawSmsJob | tl.RawBusinessWeeklyOpen | tl.RawBusinessWorkHours | tl.RawBusinessLocation | tl.RawInputBusinessRecipients | tl.RawBusinessRecipients | tl.RawBusinessAwayMessageScheduleAlways | tl.RawBusinessAwayMessageScheduleOutsideWorkHours | tl.RawBusinessAwayMessageScheduleCustom | tl.RawInputBusinessGreetingMessage | tl.RawBusinessGreetingMessage | tl.RawInputBusinessAwayMessage | tl.RawBusinessAwayMessage | tl.RawTimezone | tl.help.RawTimezonesListNotModified | tl.help.RawTimezonesList | tl.RawQuickReply | tl.RawInputQuickReplyShortcut | tl.RawInputQuickReplyShortcutId | tl.messages.RawQuickReplies | tl.messages.RawQuickRepliesNotModified | tl.RawConnectedBot | tl.account.RawConnectedBots | tl.messages.RawDialogFilters | tl.RawBirthday | tl.RawBotBusinessConnection | tl.RawInputBusinessIntro | tl.RawBusinessIntro | tl.messages.RawMyStickers | tl.RawInputCollectibleUsername | tl.RawInputCollectiblePhone | tl.fragment.RawCollectibleInfo | tl.RawInputBusinessBotRecipients | tl.RawBusinessBotRecipients | tl.RawContactBirthday | tl.contacts.RawContactBirthdays | tl.RawMissingInvitee | tl.messages.RawInvitedUsers | tl.RawInputBusinessChatLink | tl.RawBusinessChatLink | tl.account.RawBusinessChatLinks | tl.account.RawResolvedBusinessChatLinks | tl.RawRequestedPeerUser | tl.RawRequestedPeerChat | tl.RawRequestedPeerChannel | tl.RawSponsoredMessageReportOption | tl.channels.RawSponsoredMessageReportResultChooseOption | tl.channels.RawSponsoredMessageReportResultAdsHidden | tl.channels.RawSponsoredMessageReportResultReported | tl.RawReactionNotificationsFromContacts | tl.RawReactionNotificationsFromAll | tl.RawReactionsNotifySettings | tl.RawAvailableEffect | tl.messages.RawAvailableEffectsNotModified | tl.messages.RawAvailableEffects | tl.RawFactCheck | tl.RawStarsTransactionPeerUnsupported | tl.RawStarsTransactionPeerAppStore | tl.RawStarsTransactionPeerPlayMarket | tl.RawStarsTransactionPeerPremiumBot | tl.RawStarsTransactionPeerFragment | tl.RawStarsTransactionPeer | tl.RawStarsTransactionPeerAds | tl.RawStarsTransactionPeerAPI | tl.RawStarsTopupOption | tl.RawStarsTransaction | tl.payments.RawStarsStatus | tl.RawFoundStory | tl.stories.RawFoundStories | tl.RawGeoPointAddress | tl.RawStarsRevenueStatus | tl.payments.RawStarsRevenueStats | tl.payments.RawStarsRevenueWithdrawalUrl | tl.payments.RawStarsRevenueAdsAccountUrl | tl.RawInputStarsTransaction | tl.RawStarsGiftOption | tl.bots.RawPopularAppBots | tl.RawBotPreviewMedia | tl.bots.RawPreviewInfo | tl.RawStarsSubscriptionPricing | tl.RawStarsSubscription | tl.RawMessageReactor | tl.RawStarsGiveawayOption | tl.RawStarsGiveawayWinnersOption | tl.RawStarGift | tl.RawStarGiftUnique | tl.payments.RawStarGiftsNotModified | tl.payments.RawStarGifts | tl.RawMessageReportOption | tl.RawReportResultChooseOption | tl.RawReportResultAddComment | tl.RawReportResultReported | tl.messages.RawBotPreparedInlineMessage | tl.messages.RawPreparedInlineMessage | tl.RawBotAppSettings | tl.RawStarRefProgram | tl.RawConnectedBotStarRef | tl.payments.RawConnectedStarRefBots | tl.payments.RawSuggestedStarRefBots | tl.RawStarsAmount | tl.RawStarsTonAmount | tl.messages.RawFoundStickersNotModified | tl.messages.RawFoundStickers | tl.RawBotVerifierSettings | tl.RawBotVerification | tl.RawStarGiftAttributeModel | tl.RawStarGiftAttributePattern | tl.RawStarGiftAttributeBackdrop | tl.RawStarGiftAttributeOriginalDetails | tl.payments.RawStarGiftUpgradePreview | tl.users.RawUsers | tl.users.RawUsersSlice | tl.payments.RawUniqueStarGift | tl.messages.RawWebPagePreview | tl.RawSavedStarGift | tl.payments.RawSavedStarGifts | tl.RawInputSavedStarGiftUser | tl.RawInputSavedStarGiftChat | tl.RawInputSavedStarGiftSlug | tl.payments.RawStarGiftWithdrawalUrl | tl.RawPaidReactionPrivacyDefault | tl.RawPaidReactionPrivacyAnonymous | tl.RawPaidReactionPrivacyPeer | tl.account.RawPaidMessagesRevenue | tl.RawRequirementToContactEmpty | tl.RawRequirementToContactPremium | tl.RawRequirementToContactPaidMessages | tl.RawBusinessBotRights | tl.RawDisallowedGiftsSettings | tl.RawSponsoredPeer | tl.contacts.RawSponsoredPeersEmpty | tl.contacts.RawSponsoredPeers | tl.RawStarGiftAttributeIdModel | tl.RawStarGiftAttributeIdPattern | tl.RawStarGiftAttributeIdBackdrop | tl.RawStarGiftAttributeCounter | tl.payments.RawResaleStarGifts | tl.stories.RawCanSendStoryCount | tl.RawPendingSuggestion | tl.RawTodoItem | tl.RawTodoList | tl.RawTodoCompletion | tl.RawSuggestedPost | tl.RawStarsRating | tl.RawStarGiftCollection | tl.payments.RawStarGiftCollectionsNotModified | tl.payments.RawStarGiftCollections | tl.RawStoryAlbum | tl.stories.RawAlbumsNotModified | tl.stories.RawAlbums | tl.RawSearchPostsFlood | tl.payments.RawUniqueStarGiftValueInfo | tl.RawProfileTabPosts | tl.RawProfileTabGifts | tl.RawProfileTabMedia | tl.RawProfileTabFiles | tl.RawProfileTabMusic | tl.RawProfileTabVoice | tl.RawProfileTabLinks | tl.RawProfileTabGifs | tl.users.RawSavedMusicNotModified | tl.users.RawSavedMusic | tl.account.RawSavedMusicIdsNotModified | tl.account.RawSavedMusicIds | tl.payments.RawCheckCanSendGiftResultOk | tl.payments.RawCheckCanSendGiftResultFail | tl.RawInputChatThemeEmpty | tl.RawInputChatTheme | tl.RawInputChatThemeUniqueGift | tl.RawStarGiftUpgradePrice | tl.RawGroupCallMessage | tl.RawGroupCallDonor | tl.phone.RawGroupCallStars | tl.RawRecentStory | tl.RawAuctionBidLevel | tl.RawStarGiftAuctionStateNotModified | tl.RawStarGiftAuctionState | tl.RawStarGiftAuctionStateFinished | tl.RawStarGiftAuctionUserState | tl.payments.RawStarGiftAuctionState | tl.RawStarGiftAuctionAcquiredGift | tl.payments.RawStarGiftAuctionAcquiredGifts | tl.RawStarGiftActiveAuctionState | tl.payments.RawStarGiftActiveAuctionsNotModified | tl.payments.RawStarGiftActiveAuctions | tl.RawInputStarGiftAuction | tl.RawInputStarGiftAuctionSlug | tl.RawPasskey | tl.account.RawPasskeys | tl.account.RawPasskeyRegistrationOptions | tl.auth.RawPasskeyLoginOptions | tl.RawInputPasskeyResponseRegister | tl.RawInputPasskeyResponseLogin | tl.RawInputPasskeyCredentialPublicKey | tl.RawInputPasskeyCredentialFirebasePNV | tl.RawStarGiftBackground | tl.RawStarGiftAuctionRound | tl.RawStarGiftAuctionRoundExtendable | tl.payments.RawStarGiftUpgradeAttributes | tl.messages.RawEmojiGameOutcome | tl.messages.RawEmojiGameUnavailable | tl.messages.RawEmojiGameDiceInfo | tl.RawStarGiftAttributeRarity | tl.RawStarGiftAttributeRarityUncommon | tl.RawStarGiftAttributeRarityRare | tl.RawStarGiftAttributeRarityEpic | tl.RawStarGiftAttributeRarityLegendary | tl.RawKeyboardButtonStyle | tl.RawUpdateChannelPinnedTopic | tl.RawUpdateChannelPinnedTopics | tl.mtcute.RawDummyUpdate | tl.mtcute.RawDummyInputPeerMinUser | tl.mtcute.RawDummyInputPeerMinChannel | tl.RawInvokeAfterMsgRequest | tl.RawInvokeAfterMsgsRequest | tl.RawInitConnectionRequest | tl.RawInvokeWithLayerRequest | tl.RawInvokeWithoutUpdatesRequest | tl.RawInvokeWithMessagesRangeRequest | tl.RawInvokeWithTakeoutRequest | tl.RawInvokeWithBusinessConnectionRequest | tl.RawInvokeWithGooglePlayIntegrityRequest | tl.RawInvokeWithApnsSecretRequest | tl.RawInvokeWithReCaptchaRequest | tl.auth.RawSendCodeRequest | tl.auth.RawSignUpRequest | tl.auth.RawSignInRequest | tl.auth.RawLogOutRequest | tl.auth.RawResetAuthorizationsRequest | tl.auth.RawExportAuthorizationRequest | tl.auth.RawImportAuthorizationRequest | tl.auth.RawBindTempAuthKeyRequest | tl.auth.RawImportBotAuthorizationRequest | tl.auth.RawCheckPasswordRequest | tl.auth.RawRequestPasswordRecoveryRequest | tl.auth.RawRecoverPasswordRequest | tl.auth.RawResendCodeRequest | tl.auth.RawCancelCodeRequest | tl.auth.RawDropTempAuthKeysRequest | tl.auth.RawExportLoginTokenRequest | tl.auth.RawImportLoginTokenRequest | tl.auth.RawAcceptLoginTokenRequest | tl.auth.RawCheckRecoveryPasswordRequest | tl.auth.RawImportWebTokenAuthorizationRequest | tl.auth.RawRequestFirebaseSmsRequest | tl.auth.RawResetLoginEmailRequest | tl.auth.RawReportMissingCodeRequest | tl.auth.RawCheckPaidAuthRequest | tl.auth.RawInitPasskeyLoginRequest | tl.auth.RawFinishPasskeyLoginRequest | tl.account.RawRegisterDeviceRequest | tl.account.RawUnregisterDeviceRequest | tl.account.RawUpdateNotifySettingsRequest | tl.account.RawGetNotifySettingsRequest | tl.account.RawResetNotifySettingsRequest | tl.account.RawUpdateProfileRequest | tl.account.RawUpdateStatusRequest | tl.account.RawGetWallPapersRequest | tl.account.RawReportPeerRequest | tl.account.RawCheckUsernameRequest | tl.account.RawUpdateUsernameRequest | tl.account.RawGetPrivacyRequest | tl.account.RawSetPrivacyRequest | tl.account.RawDeleteAccountRequest | tl.account.RawGetAccountTTLRequest | tl.account.RawSetAccountTTLRequest | tl.account.RawSendChangePhoneCodeRequest | tl.account.RawChangePhoneRequest | tl.account.RawUpdateDeviceLockedRequest | tl.account.RawGetAuthorizationsRequest | tl.account.RawResetAuthorizationRequest | tl.account.RawGetPasswordRequest | tl.account.RawGetPasswordSettingsRequest | tl.account.RawUpdatePasswordSettingsRequest | tl.account.RawSendConfirmPhoneCodeRequest | tl.account.RawConfirmPhoneRequest | tl.account.RawGetTmpPasswordRequest | tl.account.RawGetWebAuthorizationsRequest | tl.account.RawResetWebAuthorizationRequest | tl.account.RawResetWebAuthorizationsRequest | tl.account.RawGetAllSecureValuesRequest | tl.account.RawGetSecureValueRequest | tl.account.RawSaveSecureValueRequest | tl.account.RawDeleteSecureValueRequest | tl.account.RawGetAuthorizationFormRequest | tl.account.RawAcceptAuthorizationRequest | tl.account.RawSendVerifyPhoneCodeRequest | tl.account.RawVerifyPhoneRequest | tl.account.RawSendVerifyEmailCodeRequest | tl.account.RawVerifyEmailRequest | tl.account.RawInitTakeoutSessionRequest | tl.account.RawFinishTakeoutSessionRequest | tl.account.RawConfirmPasswordEmailRequest | tl.account.RawResendPasswordEmailRequest | tl.account.RawCancelPasswordEmailRequest | tl.account.RawGetContactSignUpNotificationRequest | tl.account.RawSetContactSignUpNotificationRequest | tl.account.RawGetNotifyExceptionsRequest | tl.account.RawGetWallPaperRequest | tl.account.RawUploadWallPaperRequest | tl.account.RawSaveWallPaperRequest | tl.account.RawInstallWallPaperRequest | tl.account.RawResetWallPapersRequest | tl.account.RawGetAutoDownloadSettingsRequest | tl.account.RawSaveAutoDownloadSettingsRequest | tl.account.RawUploadThemeRequest | tl.account.RawCreateThemeRequest | tl.account.RawUpdateThemeRequest | tl.account.RawSaveThemeRequest | tl.account.RawInstallThemeRequest | tl.account.RawGetThemeRequest | tl.account.RawGetThemesRequest | tl.account.RawSetContentSettingsRequest | tl.account.RawGetContentSettingsRequest | tl.account.RawGetMultiWallPapersRequest | tl.account.RawGetGlobalPrivacySettingsRequest | tl.account.RawSetGlobalPrivacySettingsRequest | tl.account.RawReportProfilePhotoRequest | tl.account.RawResetPasswordRequest | tl.account.RawDeclinePasswordResetRequest | tl.account.RawGetChatThemesRequest | tl.account.RawSetAuthorizationTTLRequest | tl.account.RawChangeAuthorizationSettingsRequest | tl.account.RawGetSavedRingtonesRequest | tl.account.RawSaveRingtoneRequest | tl.account.RawUploadRingtoneRequest | tl.account.RawUpdateEmojiStatusRequest | tl.account.RawGetDefaultEmojiStatusesRequest | tl.account.RawGetRecentEmojiStatusesRequest | tl.account.RawClearRecentEmojiStatusesRequest | tl.account.RawReorderUsernamesRequest | tl.account.RawToggleUsernameRequest | tl.account.RawGetDefaultProfilePhotoEmojisRequest | tl.account.RawGetDefaultGroupPhotoEmojisRequest | tl.account.RawGetAutoSaveSettingsRequest | tl.account.RawSaveAutoSaveSettingsRequest | tl.account.RawDeleteAutoSaveExceptionsRequest | tl.account.RawInvalidateSignInCodesRequest | tl.account.RawUpdateColorRequest | tl.account.RawGetDefaultBackgroundEmojisRequest | tl.account.RawGetChannelDefaultEmojiStatusesRequest | tl.account.RawGetChannelRestrictedStatusEmojisRequest | tl.account.RawUpdateBusinessWorkHoursRequest | tl.account.RawUpdateBusinessLocationRequest | tl.account.RawUpdateBusinessGreetingMessageRequest | tl.account.RawUpdateBusinessAwayMessageRequest | tl.account.RawUpdateConnectedBotRequest | tl.account.RawGetConnectedBotsRequest | tl.account.RawGetBotBusinessConnectionRequest | tl.account.RawUpdateBusinessIntroRequest | tl.account.RawToggleConnectedBotPausedRequest | tl.account.RawDisablePeerConnectedBotRequest | tl.account.RawUpdateBirthdayRequest | tl.account.RawCreateBusinessChatLinkRequest | tl.account.RawEditBusinessChatLinkRequest | tl.account.RawDeleteBusinessChatLinkRequest | tl.account.RawGetBusinessChatLinksRequest | tl.account.RawResolveBusinessChatLinkRequest | tl.account.RawUpdatePersonalChannelRequest | tl.account.RawToggleSponsoredMessagesRequest | tl.account.RawGetReactionsNotifySettingsRequest | tl.account.RawSetReactionsNotifySettingsRequest | tl.account.RawGetCollectibleEmojiStatusesRequest | tl.account.RawGetPaidMessagesRevenueRequest | tl.account.RawToggleNoPaidMessagesExceptionRequest | tl.account.RawSetMainProfileTabRequest | tl.account.RawSaveMusicRequest | tl.account.RawGetSavedMusicIdsRequest | tl.account.RawGetUniqueGiftChatThemesRequest | tl.account.RawInitPasskeyRegistrationRequest | tl.account.RawRegisterPasskeyRequest | tl.account.RawGetPasskeysRequest | tl.account.RawDeletePasskeyRequest | tl.users.RawGetUsersRequest | tl.users.RawGetFullUserRequest | tl.users.RawSetSecureValueErrorsRequest | tl.users.RawGetRequirementsToContactRequest | tl.users.RawGetSavedMusicRequest | tl.users.RawGetSavedMusicByIDRequest | tl.users.RawSuggestBirthdayRequest | tl.contacts.RawGetContactIDsRequest | tl.contacts.RawGetStatusesRequest | tl.contacts.RawGetContactsRequest | tl.contacts.RawImportContactsRequest | tl.contacts.RawDeleteContactsRequest | tl.contacts.RawDeleteByPhonesRequest | tl.contacts.RawBlockRequest | tl.contacts.RawUnblockRequest | tl.contacts.RawGetBlockedRequest | tl.contacts.RawSearchRequest | tl.contacts.RawResolveUsernameRequest | tl.contacts.RawGetTopPeersRequest | tl.contacts.RawResetTopPeerRatingRequest | tl.contacts.RawResetSavedRequest | tl.contacts.RawGetSavedRequest | tl.contacts.RawToggleTopPeersRequest | tl.contacts.RawAddContactRequest | tl.contacts.RawAcceptContactRequest | tl.contacts.RawGetLocatedRequest | tl.contacts.RawBlockFromRepliesRequest | tl.contacts.RawResolvePhoneRequest | tl.contacts.RawExportContactTokenRequest | tl.contacts.RawImportContactTokenRequest | tl.contacts.RawEditCloseFriendsRequest | tl.contacts.RawSetBlockedRequest | tl.contacts.RawGetBirthdaysRequest | tl.contacts.RawGetSponsoredPeersRequest | tl.contacts.RawUpdateContactNoteRequest | tl.messages.RawGetMessagesRequest | tl.messages.RawGetDialogsRequest | tl.messages.RawGetHistoryRequest | tl.messages.RawSearchRequest | tl.messages.RawReadHistoryRequest | tl.messages.RawDeleteHistoryRequest | tl.messages.RawDeleteMessagesRequest | tl.messages.RawReceivedMessagesRequest | tl.messages.RawSetTypingRequest | tl.messages.RawSendMessageRequest | tl.messages.RawSendMediaRequest | tl.messages.RawForwardMessagesRequest | tl.messages.RawReportSpamRequest | tl.messages.RawGetPeerSettingsRequest | tl.messages.RawReportRequest | tl.messages.RawGetChatsRequest | tl.messages.RawGetFullChatRequest | tl.messages.RawEditChatTitleRequest | tl.messages.RawEditChatPhotoRequest | tl.messages.RawAddChatUserRequest | tl.messages.RawDeleteChatUserRequest | tl.messages.RawCreateChatRequest | tl.messages.RawGetDhConfigRequest | tl.messages.RawRequestEncryptionRequest | tl.messages.RawAcceptEncryptionRequest | tl.messages.RawDiscardEncryptionRequest | tl.messages.RawSetEncryptedTypingRequest | tl.messages.RawReadEncryptedHistoryRequest | tl.messages.RawSendEncryptedRequest | tl.messages.RawSendEncryptedFileRequest | tl.messages.RawSendEncryptedServiceRequest | tl.messages.RawReceivedQueueRequest | tl.messages.RawReportEncryptedSpamRequest | tl.messages.RawReadMessageContentsRequest | tl.messages.RawGetStickersRequest | tl.messages.RawGetAllStickersRequest | tl.messages.RawGetWebPagePreviewRequest | tl.messages.RawExportChatInviteRequest | tl.messages.RawCheckChatInviteRequest | tl.messages.RawImportChatInviteRequest | tl.messages.RawGetStickerSetRequest | tl.messages.RawInstallStickerSetRequest | tl.messages.RawUninstallStickerSetRequest | tl.messages.RawStartBotRequest | tl.messages.RawGetMessagesViewsRequest | tl.messages.RawEditChatAdminRequest | tl.messages.RawMigrateChatRequest | tl.messages.RawSearchGlobalRequest | tl.messages.RawReorderStickerSetsRequest | tl.messages.RawGetDocumentByHashRequest | tl.messages.RawGetSavedGifsRequest | tl.messages.RawSaveGifRequest | tl.messages.RawGetInlineBotResultsRequest | tl.messages.RawSetInlineBotResultsRequest | tl.messages.RawSendInlineBotResultRequest | tl.messages.RawGetMessageEditDataRequest | tl.messages.RawEditMessageRequest | tl.messages.RawEditInlineBotMessageRequest | tl.messages.RawGetBotCallbackAnswerRequest | tl.messages.RawSetBotCallbackAnswerRequest | tl.messages.RawGetPeerDialogsRequest | tl.messages.RawSaveDraftRequest | tl.messages.RawGetAllDraftsRequest | tl.messages.RawGetFeaturedStickersRequest | tl.messages.RawReadFeaturedStickersRequest | tl.messages.RawGetRecentStickersRequest | tl.messages.RawSaveRecentStickerRequest | tl.messages.RawClearRecentStickersRequest | tl.messages.RawGetArchivedStickersRequest | tl.messages.RawGetMaskStickersRequest | tl.messages.RawGetAttachedStickersRequest | tl.messages.RawSetGameScoreRequest | tl.messages.RawSetInlineGameScoreRequest | tl.messages.RawGetGameHighScoresRequest | tl.messages.RawGetInlineGameHighScoresRequest | tl.messages.RawGetCommonChatsRequest | tl.messages.RawGetWebPageRequest | tl.messages.RawToggleDialogPinRequest | tl.messages.RawReorderPinnedDialogsRequest | tl.messages.RawGetPinnedDialogsRequest | tl.messages.RawSetBotShippingResultsRequest | tl.messages.RawSetBotPrecheckoutResultsRequest | tl.messages.RawUploadMediaRequest | tl.messages.RawSendScreenshotNotificationRequest | tl.messages.RawGetFavedStickersRequest | tl.messages.RawFaveStickerRequest | tl.messages.RawGetUnreadMentionsRequest | tl.messages.RawReadMentionsRequest | tl.messages.RawGetRecentLocationsRequest | tl.messages.RawSendMultiMediaRequest | tl.messages.RawUploadEncryptedFileRequest | tl.messages.RawSearchStickerSetsRequest | tl.messages.RawGetSplitRangesRequest | tl.messages.RawMarkDialogUnreadRequest | tl.messages.RawGetDialogUnreadMarksRequest | tl.messages.RawClearAllDraftsRequest | tl.messages.RawUpdatePinnedMessageRequest | tl.messages.RawSendVoteRequest | tl.messages.RawGetPollResultsRequest | tl.messages.RawGetOnlinesRequest | tl.messages.RawEditChatAboutRequest | tl.messages.RawEditChatDefaultBannedRightsRequest | tl.messages.RawGetEmojiKeywordsRequest | tl.messages.RawGetEmojiKeywordsDifferenceRequest | tl.messages.RawGetEmojiKeywordsLanguagesRequest | tl.messages.RawGetEmojiURLRequest | tl.messages.RawGetSearchCountersRequest | tl.messages.RawRequestUrlAuthRequest | tl.messages.RawAcceptUrlAuthRequest | tl.messages.RawHidePeerSettingsBarRequest | tl.messages.RawGetScheduledHistoryRequest | tl.messages.RawGetScheduledMessagesRequest | tl.messages.RawSendScheduledMessagesRequest | tl.messages.RawDeleteScheduledMessagesRequest | tl.messages.RawGetPollVotesRequest | tl.messages.RawToggleStickerSetsRequest | tl.messages.RawGetDialogFiltersRequest | tl.messages.RawGetSuggestedDialogFiltersRequest | tl.messages.RawUpdateDialogFilterRequest | tl.messages.RawUpdateDialogFiltersOrderRequest | tl.messages.RawGetOldFeaturedStickersRequest | tl.messages.RawGetRepliesRequest | tl.messages.RawGetDiscussionMessageRequest | tl.messages.RawReadDiscussionRequest | tl.messages.RawUnpinAllMessagesRequest | tl.messages.RawDeleteChatRequest | tl.messages.RawDeletePhoneCallHistoryRequest | tl.messages.RawCheckHistoryImportRequest | tl.messages.RawInitHistoryImportRequest | tl.messages.RawUploadImportedMediaRequest | tl.messages.RawStartHistoryImportRequest | tl.messages.RawGetExportedChatInvitesRequest | tl.messages.RawGetExportedChatInviteRequest | tl.messages.RawEditExportedChatInviteRequest | tl.messages.RawDeleteRevokedExportedChatInvitesRequest | tl.messages.RawDeleteExportedChatInviteRequest | tl.messages.RawGetAdminsWithInvitesRequest | tl.messages.RawGetChatInviteImportersRequest | tl.messages.RawSetHistoryTTLRequest | tl.messages.RawCheckHistoryImportPeerRequest | tl.messages.RawSetChatThemeRequest | tl.messages.RawGetMessageReadParticipantsRequest | tl.messages.RawGetSearchResultsCalendarRequest | tl.messages.RawGetSearchResultsPositionsRequest | tl.messages.RawHideChatJoinRequestRequest | tl.messages.RawHideAllChatJoinRequestsRequest | tl.messages.RawToggleNoForwardsRequest | tl.messages.RawSaveDefaultSendAsRequest | tl.messages.RawSendReactionRequest | tl.messages.RawGetMessagesReactionsRequest | tl.messages.RawGetMessageReactionsListRequest | tl.messages.RawSetChatAvailableReactionsRequest | tl.messages.RawGetAvailableReactionsRequest | tl.messages.RawSetDefaultReactionRequest | tl.messages.RawTranslateTextRequest | tl.messages.RawGetUnreadReactionsRequest | tl.messages.RawReadReactionsRequest | tl.messages.RawSearchSentMediaRequest | tl.messages.RawGetAttachMenuBotsRequest | tl.messages.RawGetAttachMenuBotRequest | tl.messages.RawToggleBotInAttachMenuRequest | tl.messages.RawRequestWebViewRequest | tl.messages.RawProlongWebViewRequest | tl.messages.RawRequestSimpleWebViewRequest | tl.messages.RawSendWebViewResultMessageRequest | tl.messages.RawSendWebViewDataRequest | tl.messages.RawTranscribeAudioRequest | tl.messages.RawRateTranscribedAudioRequest | tl.messages.RawGetCustomEmojiDocumentsRequest | tl.messages.RawGetEmojiStickersRequest | tl.messages.RawGetFeaturedEmojiStickersRequest | tl.messages.RawReportReactionRequest | tl.messages.RawGetTopReactionsRequest | tl.messages.RawGetRecentReactionsRequest | tl.messages.RawClearRecentReactionsRequest | tl.messages.RawGetExtendedMediaRequest | tl.messages.RawSetDefaultHistoryTTLRequest | tl.messages.RawGetDefaultHistoryTTLRequest | tl.messages.RawSendBotRequestedPeerRequest | tl.messages.RawGetEmojiGroupsRequest | tl.messages.RawGetEmojiStatusGroupsRequest | tl.messages.RawGetEmojiProfilePhotoGroupsRequest | tl.messages.RawSearchCustomEmojiRequest | tl.messages.RawTogglePeerTranslationsRequest | tl.messages.RawGetBotAppRequest | tl.messages.RawRequestAppWebViewRequest | tl.messages.RawSetChatWallPaperRequest | tl.messages.RawSearchEmojiStickerSetsRequest | tl.messages.RawGetSavedDialogsRequest | tl.messages.RawGetSavedHistoryRequest | tl.messages.RawDeleteSavedHistoryRequest | tl.messages.RawGetPinnedSavedDialogsRequest | tl.messages.RawToggleSavedDialogPinRequest | tl.messages.RawReorderPinnedSavedDialogsRequest | tl.messages.RawGetSavedReactionTagsRequest | tl.messages.RawUpdateSavedReactionTagRequest | tl.messages.RawGetDefaultTagReactionsRequest | tl.messages.RawGetOutboxReadDateRequest | tl.messages.RawGetQuickRepliesRequest | tl.messages.RawReorderQuickRepliesRequest | tl.messages.RawCheckQuickReplyShortcutRequest | tl.messages.RawEditQuickReplyShortcutRequest | tl.messages.RawDeleteQuickReplyShortcutRequest | tl.messages.RawGetQuickReplyMessagesRequest | tl.messages.RawSendQuickReplyMessagesRequest | tl.messages.RawDeleteQuickReplyMessagesRequest | tl.messages.RawToggleDialogFilterTagsRequest | tl.messages.RawGetMyStickersRequest | tl.messages.RawGetEmojiStickerGroupsRequest | tl.messages.RawGetAvailableEffectsRequest | tl.messages.RawEditFactCheckRequest | tl.messages.RawDeleteFactCheckRequest | tl.messages.RawGetFactCheckRequest | tl.messages.RawRequestMainWebViewRequest | tl.messages.RawSendPaidReactionRequest | tl.messages.RawTogglePaidReactionPrivacyRequest | tl.messages.RawGetPaidReactionPrivacyRequest | tl.messages.RawViewSponsoredMessageRequest | tl.messages.RawClickSponsoredMessageRequest | tl.messages.RawReportSponsoredMessageRequest | tl.messages.RawGetSponsoredMessagesRequest | tl.messages.RawSavePreparedInlineMessageRequest | tl.messages.RawGetPreparedInlineMessageRequest | tl.messages.RawSearchStickersRequest | tl.messages.RawReportMessagesDeliveryRequest | tl.messages.RawGetSavedDialogsByIDRequest | tl.messages.RawReadSavedHistoryRequest | tl.messages.RawToggleTodoCompletedRequest | tl.messages.RawAppendTodoListRequest | tl.messages.RawToggleSuggestedPostApprovalRequest | tl.messages.RawGetForumTopicsRequest | tl.messages.RawGetForumTopicsByIDRequest | tl.messages.RawEditForumTopicRequest | tl.messages.RawUpdatePinnedForumTopicRequest | tl.messages.RawReorderPinnedForumTopicsRequest | tl.messages.RawCreateForumTopicRequest | tl.messages.RawDeleteTopicHistoryRequest | tl.messages.RawGetEmojiGameInfoRequest | tl.messages.RawSummarizeTextRequest | tl.messages.RawEditChatCreatorRequest | tl.messages.RawGetFutureChatCreatorAfterLeaveRequest | tl.messages.RawEditChatParticipantRankRequest | tl.messages.RawDeclineUrlAuthRequest | tl.messages.RawCheckUrlAuthMatchCodeRequest | tl.updates.RawGetStateRequest | tl.updates.RawGetDifferenceRequest | tl.updates.RawGetChannelDifferenceRequest | tl.photos.RawUpdateProfilePhotoRequest | tl.photos.RawUploadProfilePhotoRequest | tl.photos.RawDeletePhotosRequest | tl.photos.RawGetUserPhotosRequest | tl.photos.RawUploadContactProfilePhotoRequest | tl.upload.RawSaveFilePartRequest | tl.upload.RawGetFileRequest | tl.upload.RawSaveBigFilePartRequest | tl.upload.RawGetWebFileRequest | tl.upload.RawGetCdnFileRequest | tl.upload.RawReuploadCdnFileRequest | tl.upload.RawGetCdnFileHashesRequest | tl.upload.RawGetFileHashesRequest | tl.help.RawGetConfigRequest | tl.help.RawGetNearestDcRequest | tl.help.RawGetAppUpdateRequest | tl.help.RawGetInviteTextRequest | tl.help.RawGetSupportRequest | tl.help.RawSetBotUpdatesStatusRequest | tl.help.RawGetCdnConfigRequest | tl.help.RawGetRecentMeUrlsRequest | tl.help.RawGetTermsOfServiceUpdateRequest | tl.help.RawAcceptTermsOfServiceRequest | tl.help.RawGetDeepLinkInfoRequest | tl.help.RawGetAppConfigRequest | tl.help.RawSaveAppLogRequest | tl.help.RawGetPassportConfigRequest | tl.help.RawGetSupportNameRequest | tl.help.RawGetUserInfoRequest | tl.help.RawEditUserInfoRequest | tl.help.RawGetPromoDataRequest | tl.help.RawHidePromoDataRequest | tl.help.RawDismissSuggestionRequest | tl.help.RawGetCountriesListRequest | tl.help.RawGetPremiumPromoRequest | tl.help.RawGetPeerColorsRequest | tl.help.RawGetPeerProfileColorsRequest | tl.help.RawGetTimezonesListRequest | tl.channels.RawReadHistoryRequest | tl.channels.RawDeleteMessagesRequest | tl.channels.RawReportSpamRequest | tl.channels.RawGetMessagesRequest | tl.channels.RawGetParticipantsRequest | tl.channels.RawGetParticipantRequest | tl.channels.RawGetChannelsRequest | tl.channels.RawGetFullChannelRequest | tl.channels.RawCreateChannelRequest | tl.channels.RawEditAdminRequest | tl.channels.RawEditTitleRequest | tl.channels.RawEditPhotoRequest | tl.channels.RawCheckUsernameRequest | tl.channels.RawUpdateUsernameRequest | tl.channels.RawJoinChannelRequest | tl.channels.RawLeaveChannelRequest | tl.channels.RawInviteToChannelRequest | tl.channels.RawDeleteChannelRequest | tl.channels.RawExportMessageLinkRequest | tl.channels.RawToggleSignaturesRequest | tl.channels.RawGetAdminedPublicChannelsRequest | tl.channels.RawEditBannedRequest | tl.channels.RawGetAdminLogRequest | tl.channels.RawSetStickersRequest | tl.channels.RawReadMessageContentsRequest | tl.channels.RawDeleteHistoryRequest | tl.channels.RawTogglePreHistoryHiddenRequest | tl.channels.RawGetLeftChannelsRequest | tl.channels.RawGetGroupsForDiscussionRequest | tl.channels.RawSetDiscussionGroupRequest | tl.channels.RawEditLocationRequest | tl.channels.RawToggleSlowModeRequest | tl.channels.RawGetInactiveChannelsRequest | tl.channels.RawConvertToGigagroupRequest | tl.channels.RawGetSendAsRequest | tl.channels.RawDeleteParticipantHistoryRequest | tl.channels.RawToggleJoinToSendRequest | tl.channels.RawToggleJoinRequestRequest | tl.channels.RawReorderUsernamesRequest | tl.channels.RawToggleUsernameRequest | tl.channels.RawDeactivateAllUsernamesRequest | tl.channels.RawToggleForumRequest | tl.channels.RawToggleAntiSpamRequest | tl.channels.RawReportAntiSpamFalsePositiveRequest | tl.channels.RawToggleParticipantsHiddenRequest | tl.channels.RawUpdateColorRequest | tl.channels.RawToggleViewForumAsMessagesRequest | tl.channels.RawGetChannelRecommendationsRequest | tl.channels.RawUpdateEmojiStatusRequest | tl.channels.RawSetBoostsToUnblockRestrictionsRequest | tl.channels.RawSetEmojiStickersRequest | tl.channels.RawRestrictSponsoredMessagesRequest | tl.channels.RawSearchPostsRequest | tl.channels.RawUpdatePaidMessagesPriceRequest | tl.channels.RawToggleAutotranslationRequest | tl.channels.RawGetMessageAuthorRequest | tl.channels.RawCheckSearchPostsFloodRequest | tl.channels.RawSetMainProfileTabRequest | tl.bots.RawSendCustomRequestRequest | tl.bots.RawAnswerWebhookJSONQueryRequest | tl.bots.RawSetBotCommandsRequest | tl.bots.RawResetBotCommandsRequest | tl.bots.RawGetBotCommandsRequest | tl.bots.RawSetBotMenuButtonRequest | tl.bots.RawGetBotMenuButtonRequest | tl.bots.RawSetBotBroadcastDefaultAdminRightsRequest | tl.bots.RawSetBotGroupDefaultAdminRightsRequest | tl.bots.RawSetBotInfoRequest | tl.bots.RawGetBotInfoRequest | tl.bots.RawReorderUsernamesRequest | tl.bots.RawToggleUsernameRequest | tl.bots.RawCanSendMessageRequest | tl.bots.RawAllowSendMessageRequest | tl.bots.RawInvokeWebViewCustomMethodRequest | tl.bots.RawGetPopularAppBotsRequest | tl.bots.RawAddPreviewMediaRequest | tl.bots.RawEditPreviewMediaRequest | tl.bots.RawDeletePreviewMediaRequest | tl.bots.RawReorderPreviewMediasRequest | tl.bots.RawGetPreviewInfoRequest | tl.bots.RawGetPreviewMediasRequest | tl.bots.RawUpdateUserEmojiStatusRequest | tl.bots.RawToggleUserEmojiStatusPermissionRequest | tl.bots.RawCheckDownloadFileParamsRequest | tl.bots.RawGetAdminedBotsRequest | tl.bots.RawUpdateStarRefProgramRequest | tl.bots.RawSetCustomVerificationRequest | tl.bots.RawGetBotRecommendationsRequest | tl.payments.RawGetPaymentFormRequest | tl.payments.RawGetPaymentReceiptRequest | tl.payments.RawValidateRequestedInfoRequest | tl.payments.RawSendPaymentFormRequest | tl.payments.RawGetSavedInfoRequest | tl.payments.RawClearSavedInfoRequest | tl.payments.RawGetBankCardDataRequest | tl.payments.RawExportInvoiceRequest | tl.payments.RawAssignAppStoreTransactionRequest | tl.payments.RawAssignPlayMarketTransactionRequest | tl.payments.RawGetPremiumGiftCodeOptionsRequest | tl.payments.RawCheckGiftCodeRequest | tl.payments.RawApplyGiftCodeRequest | tl.payments.RawGetGiveawayInfoRequest | tl.payments.RawLaunchPrepaidGiveawayRequest | tl.payments.RawGetStarsTopupOptionsRequest | tl.payments.RawGetStarsStatusRequest | tl.payments.RawGetStarsTransactionsRequest | tl.payments.RawSendStarsFormRequest | tl.payments.RawRefundStarsChargeRequest | tl.payments.RawGetStarsRevenueStatsRequest | tl.payments.RawGetStarsRevenueWithdrawalUrlRequest | tl.payments.RawGetStarsRevenueAdsAccountUrlRequest | tl.payments.RawGetStarsTransactionsByIDRequest | tl.payments.RawGetStarsGiftOptionsRequest | tl.payments.RawGetStarsSubscriptionsRequest | tl.payments.RawChangeStarsSubscriptionRequest | tl.payments.RawFulfillStarsSubscriptionRequest | tl.payments.RawGetStarsGiveawayOptionsRequest | tl.payments.RawGetStarGiftsRequest | tl.payments.RawSaveStarGiftRequest | tl.payments.RawConvertStarGiftRequest | tl.payments.RawBotCancelStarsSubscriptionRequest | tl.payments.RawGetConnectedStarRefBotsRequest | tl.payments.RawGetConnectedStarRefBotRequest | tl.payments.RawGetSuggestedStarRefBotsRequest | tl.payments.RawConnectStarRefBotRequest | tl.payments.RawEditConnectedStarRefBotRequest | tl.payments.RawGetStarGiftUpgradePreviewRequest | tl.payments.RawUpgradeStarGiftRequest | tl.payments.RawTransferStarGiftRequest | tl.payments.RawGetUniqueStarGiftRequest | tl.payments.RawGetSavedStarGiftsRequest | tl.payments.RawGetSavedStarGiftRequest | tl.payments.RawGetStarGiftWithdrawalUrlRequest | tl.payments.RawToggleChatStarGiftNotificationsRequest | tl.payments.RawToggleStarGiftsPinnedToTopRequest | tl.payments.RawCanPurchaseStoreRequest | tl.payments.RawGetResaleStarGiftsRequest | tl.payments.RawUpdateStarGiftPriceRequest | tl.payments.RawCreateStarGiftCollectionRequest | tl.payments.RawUpdateStarGiftCollectionRequest | tl.payments.RawReorderStarGiftCollectionsRequest | tl.payments.RawDeleteStarGiftCollectionRequest | tl.payments.RawGetStarGiftCollectionsRequest | tl.payments.RawGetUniqueStarGiftValueInfoRequest | tl.payments.RawCheckCanSendGiftRequest | tl.payments.RawGetStarGiftAuctionStateRequest | tl.payments.RawGetStarGiftAuctionAcquiredGiftsRequest | tl.payments.RawGetStarGiftActiveAuctionsRequest | tl.payments.RawResolveStarGiftOfferRequest | tl.payments.RawSendStarGiftOfferRequest | tl.payments.RawGetStarGiftUpgradeAttributesRequest | tl.payments.RawGetCraftStarGiftsRequest | tl.payments.RawCraftStarGiftRequest | tl.stickers.RawCreateStickerSetRequest | tl.stickers.RawRemoveStickerFromSetRequest | tl.stickers.RawChangeStickerPositionRequest | tl.stickers.RawAddStickerToSetRequest | tl.stickers.RawSetStickerSetThumbRequest | tl.stickers.RawCheckShortNameRequest | tl.stickers.RawSuggestShortNameRequest | tl.stickers.RawChangeStickerRequest | tl.stickers.RawRenameStickerSetRequest | tl.stickers.RawDeleteStickerSetRequest | tl.stickers.RawReplaceStickerRequest | tl.phone.RawGetCallConfigRequest | tl.phone.RawRequestCallRequest | tl.phone.RawAcceptCallRequest | tl.phone.RawConfirmCallRequest | tl.phone.RawReceivedCallRequest | tl.phone.RawDiscardCallRequest | tl.phone.RawSetCallRatingRequest | tl.phone.RawSaveCallDebugRequest | tl.phone.RawSendSignalingDataRequest | tl.phone.RawCreateGroupCallRequest | tl.phone.RawJoinGroupCallRequest | tl.phone.RawLeaveGroupCallRequest | tl.phone.RawInviteToGroupCallRequest | tl.phone.RawDiscardGroupCallRequest | tl.phone.RawToggleGroupCallSettingsRequest | tl.phone.RawGetGroupCallRequest | tl.phone.RawGetGroupParticipantsRequest | tl.phone.RawCheckGroupCallRequest | tl.phone.RawToggleGroupCallRecordRequest | tl.phone.RawEditGroupCallParticipantRequest | tl.phone.RawEditGroupCallTitleRequest | tl.phone.RawGetGroupCallJoinAsRequest | tl.phone.RawExportGroupCallInviteRequest | tl.phone.RawToggleGroupCallStartSubscriptionRequest | tl.phone.RawStartScheduledGroupCallRequest | tl.phone.RawSaveDefaultGroupCallJoinAsRequest | tl.phone.RawJoinGroupCallPresentationRequest | tl.phone.RawLeaveGroupCallPresentationRequest | tl.phone.RawGetGroupCallStreamChannelsRequest | tl.phone.RawGetGroupCallStreamRtmpUrlRequest | tl.phone.RawSaveCallLogRequest | tl.phone.RawCreateConferenceCallRequest | tl.phone.RawDeleteConferenceCallParticipantsRequest | tl.phone.RawSendConferenceCallBroadcastRequest | tl.phone.RawInviteConferenceCallParticipantRequest | tl.phone.RawDeclineConferenceCallInviteRequest | tl.phone.RawGetGroupCallChainBlocksRequest | tl.phone.RawSendGroupCallMessageRequest | tl.phone.RawSendGroupCallEncryptedMessageRequest | tl.phone.RawDeleteGroupCallMessagesRequest | tl.phone.RawDeleteGroupCallParticipantMessagesRequest | tl.phone.RawGetGroupCallStarsRequest | tl.phone.RawSaveDefaultSendAsRequest | tl.langpack.RawGetLangPackRequest | tl.langpack.RawGetStringsRequest | tl.langpack.RawGetDifferenceRequest | tl.langpack.RawGetLanguagesRequest | tl.langpack.RawGetLanguageRequest | tl.folders.RawEditPeerFoldersRequest | tl.stats.RawGetBroadcastStatsRequest | tl.stats.RawLoadAsyncGraphRequest | tl.stats.RawGetMegagroupStatsRequest | tl.stats.RawGetMessagePublicForwardsRequest | tl.stats.RawGetMessageStatsRequest | tl.stats.RawGetStoryStatsRequest | tl.stats.RawGetStoryPublicForwardsRequest | tl.chatlists.RawExportChatlistInviteRequest | tl.chatlists.RawDeleteExportedInviteRequest | tl.chatlists.RawEditExportedInviteRequest | tl.chatlists.RawGetExportedInvitesRequest | tl.chatlists.RawCheckChatlistInviteRequest | tl.chatlists.RawJoinChatlistInviteRequest | tl.chatlists.RawGetChatlistUpdatesRequest | tl.chatlists.RawJoinChatlistUpdatesRequest | tl.chatlists.RawHideChatlistUpdatesRequest | tl.chatlists.RawGetLeaveChatlistSuggestionsRequest | tl.chatlists.RawLeaveChatlistRequest | tl.stories.RawCanSendStoryRequest | tl.stories.RawSendStoryRequest | tl.stories.RawEditStoryRequest | tl.stories.RawDeleteStoriesRequest | tl.stories.RawTogglePinnedRequest | tl.stories.RawGetAllStoriesRequest | tl.stories.RawGetPinnedStoriesRequest | tl.stories.RawGetStoriesArchiveRequest | tl.stories.RawGetStoriesByIDRequest | tl.stories.RawToggleAllStoriesHiddenRequest | tl.stories.RawReadStoriesRequest | tl.stories.RawIncrementStoryViewsRequest | tl.stories.RawGetStoryViewsListRequest | tl.stories.RawGetStoriesViewsRequest | tl.stories.RawExportStoryLinkRequest | tl.stories.RawReportRequest | tl.stories.RawActivateStealthModeRequest | tl.stories.RawSendReactionRequest | tl.stories.RawGetPeerStoriesRequest | tl.stories.RawGetAllReadPeerStoriesRequest | tl.stories.RawGetPeerMaxIDsRequest | tl.stories.RawGetChatsToSendRequest | tl.stories.RawTogglePeerStoriesHiddenRequest | tl.stories.RawGetStoryReactionsListRequest | tl.stories.RawTogglePinnedToTopRequest | tl.stories.RawSearchPostsRequest | tl.stories.RawCreateAlbumRequest | tl.stories.RawUpdateAlbumRequest | tl.stories.RawReorderAlbumsRequest | tl.stories.RawDeleteAlbumRequest | tl.stories.RawGetAlbumsRequest | tl.stories.RawGetAlbumStoriesRequest | tl.stories.RawStartLiveRequest | tl.premium.RawGetBoostsListRequest | tl.premium.RawGetMyBoostsRequest | tl.premium.RawApplyBoostRequest | tl.premium.RawGetBoostsStatusRequest | tl.premium.RawGetUserBoostsRequest | tl.smsjobs.RawIsEligibleToJoinRequest | tl.smsjobs.RawJoinRequest | tl.smsjobs.RawLeaveRequest | tl.smsjobs.RawUpdateSettingsRequest | tl.smsjobs.RawGetStatusRequest | tl.smsjobs.RawGetSmsJobRequest | tl.smsjobs.RawFinishJobRequest | tl.fragment.RawGetCollectibleInfoRequest | tl.channels.RawEditCreatorRequest | tl.channels.RawCreateForumTopicRequest | tl.channels.RawGetForumTopicsRequest | tl.channels.RawGetForumTopicsByIDRequest | tl.channels.RawEditForumTopicRequest | tl.channels.RawUpdatePinnedForumTopicRequest | tl.channels.RawDeleteTopicHistoryRequest | tl.channels.RawReorderPinnedForumTopicsRequest | tl.channels.RawGetFutureCreatorAfterLeaveRequest | tl.mtcute.RawCustomMethodRequest } export declare namespace mtp { const LAYER = 0; function $extendTypes(types: Record): void type Long = _Long; type RawLong = Uint8Array; type Int128 = Uint8Array; type Int256 = Uint8Array; type Double = number; type FindByName = Extract type Mutable = { -readonly [P in keyof T]: T[P] } interface RawMt_resPQ { _: 'mt_resPQ'; nonce: Int128; serverNonce: Int128; pq: Uint8Array; serverPublicKeyFingerprints: Long[]; } interface RawMt_p_q_inner_data_dc { _: 'mt_p_q_inner_data_dc'; pq: Uint8Array; p: Uint8Array; q: Uint8Array; nonce: Int128; serverNonce: Int128; newNonce: Int256; dc: number; } interface RawMt_p_q_inner_data_temp_dc { _: 'mt_p_q_inner_data_temp_dc'; pq: Uint8Array; p: Uint8Array; q: Uint8Array; nonce: Int128; serverNonce: Int128; newNonce: Int256; dc: number; expiresIn: number; } interface RawMt_server_DH_params_ok { _: 'mt_server_DH_params_ok'; nonce: Int128; serverNonce: Int128; encryptedAnswer: Uint8Array; } interface RawMt_server_DH_inner_data { _: 'mt_server_DH_inner_data'; nonce: Int128; serverNonce: Int128; g: number; dhPrime: Uint8Array; gA: Uint8Array; serverTime: number; } interface RawMt_client_DH_inner_data { _: 'mt_client_DH_inner_data'; nonce: Int128; serverNonce: Int128; retryId: Long; gB: Uint8Array; } interface RawMt_dh_gen_ok { _: 'mt_dh_gen_ok'; nonce: Int128; serverNonce: Int128; newNonceHash1: Int128; } interface RawMt_dh_gen_retry { _: 'mt_dh_gen_retry'; nonce: Int128; serverNonce: Int128; newNonceHash2: Int128; } interface RawMt_dh_gen_fail { _: 'mt_dh_gen_fail'; nonce: Int128; serverNonce: Int128; newNonceHash3: Int128; } interface RawMt_bind_auth_key_inner { _: 'mt_bind_auth_key_inner'; nonce: Long; tempAuthKeyId: Long; permAuthKeyId: Long; tempSessionId: Long; expiresAt: number; } interface RawMt_rpc_error { _: 'mt_rpc_error'; errorCode: number; errorMessage: string; } interface RawMt_rpc_answer_unknown { _: 'mt_rpc_answer_unknown'; } interface RawMt_rpc_answer_dropped_running { _: 'mt_rpc_answer_dropped_running'; } interface RawMt_rpc_answer_dropped { _: 'mt_rpc_answer_dropped'; msgId: Long; seqNo: number; bytes: number; } interface RawMt_future_salt { _: 'mt_future_salt'; validSince: number; validUntil: number; salt: Long; } interface RawMt_future_salts { _: 'mt_future_salts'; reqMsgId: Long; now: number; salts: mtp.RawMt_future_salt[]; } interface RawMt_pong { _: 'mt_pong'; msgId: Long; pingId: Long; } interface RawMt_destroy_session_ok { _: 'mt_destroy_session_ok'; sessionId: Long; } interface RawMt_destroy_session_none { _: 'mt_destroy_session_none'; sessionId: Long; } interface RawMt_new_session_created { _: 'mt_new_session_created'; firstMsgId: Long; uniqueId: Long; serverSalt: Long; } interface RawMt_msgs_ack { _: 'mt_msgs_ack'; msgIds: Long[]; } interface RawMt_bad_msg_notification { _: 'mt_bad_msg_notification'; badMsgId: Long; badMsgSeqno: number; errorCode: number; } interface RawMt_bad_server_salt { _: 'mt_bad_server_salt'; badMsgId: Long; badMsgSeqno: number; errorCode: number; newServerSalt: Long; } interface RawMt_msg_resend_req { _: 'mt_msg_resend_req'; msgIds: Long[]; } interface RawMt_msgs_state_req { _: 'mt_msgs_state_req'; msgIds: Long[]; } interface RawMt_msgs_state_info { _: 'mt_msgs_state_info'; reqMsgId: Long; info: Uint8Array; } interface RawMt_msgs_all_info { _: 'mt_msgs_all_info'; msgIds: Long[]; info: Uint8Array; } interface RawMt_msg_detailed_info { _: 'mt_msg_detailed_info'; msgId: Long; answerMsgId: Long; bytes: number; status: number; } interface RawMt_msg_new_detailed_info { _: 'mt_msg_new_detailed_info'; answerMsgId: Long; bytes: number; status: number; } interface RawMt_destroy_auth_key_ok { _: 'mt_destroy_auth_key_ok'; } interface RawMt_destroy_auth_key_none { _: 'mt_destroy_auth_key_none'; } interface RawMt_destroy_auth_key_fail { _: 'mt_destroy_auth_key_fail'; } interface RawMt_http_wait { _: 'mt_http_wait'; maxDelay: number; waitAfter: number; maxWait: number; } interface RawMt_req_pq_multi { _: 'mt_req_pq_multi'; nonce: Int128; } interface RawMt_req_DH_params { _: 'mt_req_DH_params'; nonce: Int128; serverNonce: Int128; p: Uint8Array; q: Uint8Array; publicKeyFingerprint: Long; encryptedData: Uint8Array; } interface RawMt_set_client_DH_params { _: 'mt_set_client_DH_params'; nonce: Int128; serverNonce: Int128; encryptedData: Uint8Array; } interface RawMt_rpc_drop_answer { _: 'mt_rpc_drop_answer'; reqMsgId: Long; } interface RawMt_get_future_salts { _: 'mt_get_future_salts'; num: number; } interface RawMt_ping { _: 'mt_ping'; pingId: Long; } interface RawMt_ping_delay_disconnect { _: 'mt_ping_delay_disconnect'; pingId: Long; disconnectDelay: number; } interface RawMt_destroy_session { _: 'mt_destroy_session'; sessionId: Long; } interface RawMt_destroy_auth_key { _: 'mt_destroy_auth_key'; } interface RpcCallReturn { } type TypeResPQ = mtp.RawMt_resPQ | mtp.RawMt_req_pq_multi function isAnyResPQ(o: object): o is TypeResPQ type TypeP_Q_inner_data = mtp.RawMt_p_q_inner_data_dc | mtp.RawMt_p_q_inner_data_temp_dc function isAnyP_Q_inner_data(o: object): o is TypeP_Q_inner_data type TypeServer_DH_Params = mtp.RawMt_server_DH_params_ok | mtp.RawMt_req_DH_params function isAnyServer_DH_Params(o: object): o is TypeServer_DH_Params type TypeServer_DH_inner_data = mtp.RawMt_server_DH_inner_data function isAnyServer_DH_inner_data(o: object): o is TypeServer_DH_inner_data type TypeClient_DH_Inner_Data = mtp.RawMt_client_DH_inner_data function isAnyClient_DH_Inner_Data(o: object): o is TypeClient_DH_Inner_Data type TypeSet_client_DH_params_answer = mtp.RawMt_dh_gen_ok | mtp.RawMt_dh_gen_retry | mtp.RawMt_dh_gen_fail | mtp.RawMt_set_client_DH_params function isAnySet_client_DH_params_answer(o: object): o is TypeSet_client_DH_params_answer type TypeBindAuthKeyInner = mtp.RawMt_bind_auth_key_inner function isAnyBindAuthKeyInner(o: object): o is TypeBindAuthKeyInner type TypeRpcError = mtp.RawMt_rpc_error function isAnyRpcError(o: object): o is TypeRpcError type TypeRpcDropAnswer = mtp.RawMt_rpc_answer_unknown | mtp.RawMt_rpc_answer_dropped_running | mtp.RawMt_rpc_answer_dropped | mtp.RawMt_rpc_drop_answer function isAnyRpcDropAnswer(o: object): o is TypeRpcDropAnswer type TypeFutureSalt = mtp.RawMt_future_salt function isAnyFutureSalt(o: object): o is TypeFutureSalt type TypeFutureSalts = mtp.RawMt_future_salts | mtp.RawMt_get_future_salts function isAnyFutureSalts(o: object): o is TypeFutureSalts type TypePong = mtp.RawMt_pong | mtp.RawMt_ping | mtp.RawMt_ping_delay_disconnect function isAnyPong(o: object): o is TypePong type TypeDestroySessionRes = mtp.RawMt_destroy_session_ok | mtp.RawMt_destroy_session_none | mtp.RawMt_destroy_session function isAnyDestroySessionRes(o: object): o is TypeDestroySessionRes type TypeNewSession = mtp.RawMt_new_session_created function isAnyNewSession(o: object): o is TypeNewSession type TypeMsgsAck = mtp.RawMt_msgs_ack function isAnyMsgsAck(o: object): o is TypeMsgsAck type TypeBadMsgNotification = mtp.RawMt_bad_msg_notification | mtp.RawMt_bad_server_salt function isAnyBadMsgNotification(o: object): o is TypeBadMsgNotification type TypeMsgResendReq = mtp.RawMt_msg_resend_req function isAnyMsgResendReq(o: object): o is TypeMsgResendReq type TypeMsgsStateReq = mtp.RawMt_msgs_state_req function isAnyMsgsStateReq(o: object): o is TypeMsgsStateReq type TypeMsgsStateInfo = mtp.RawMt_msgs_state_info function isAnyMsgsStateInfo(o: object): o is TypeMsgsStateInfo type TypeMsgsAllInfo = mtp.RawMt_msgs_all_info function isAnyMsgsAllInfo(o: object): o is TypeMsgsAllInfo type TypeMsgDetailedInfo = mtp.RawMt_msg_detailed_info | mtp.RawMt_msg_new_detailed_info function isAnyMsgDetailedInfo(o: object): o is TypeMsgDetailedInfo type TypeDestroyAuthKeyRes = mtp.RawMt_destroy_auth_key_ok | mtp.RawMt_destroy_auth_key_none | mtp.RawMt_destroy_auth_key_fail | mtp.RawMt_destroy_auth_key function isAnyDestroyAuthKeyRes(o: object): o is TypeDestroyAuthKeyRes type TypeHttpWait = mtp.RawMt_http_wait function isAnyHttpWait(o: object): o is TypeHttpWait type TlObject = | mtp.RawMt_resPQ | mtp.RawMt_p_q_inner_data_dc | mtp.RawMt_p_q_inner_data_temp_dc | mtp.RawMt_server_DH_params_ok | mtp.RawMt_server_DH_inner_data | mtp.RawMt_client_DH_inner_data | mtp.RawMt_dh_gen_ok | mtp.RawMt_dh_gen_retry | mtp.RawMt_dh_gen_fail | mtp.RawMt_bind_auth_key_inner | mtp.RawMt_rpc_error | mtp.RawMt_rpc_answer_unknown | mtp.RawMt_rpc_answer_dropped_running | mtp.RawMt_rpc_answer_dropped | mtp.RawMt_future_salt | mtp.RawMt_future_salts | mtp.RawMt_pong | mtp.RawMt_destroy_session_ok | mtp.RawMt_destroy_session_none | mtp.RawMt_new_session_created | mtp.RawMt_msgs_ack | mtp.RawMt_bad_msg_notification | mtp.RawMt_bad_server_salt | mtp.RawMt_msg_resend_req | mtp.RawMt_msgs_state_req | mtp.RawMt_msgs_state_info | mtp.RawMt_msgs_all_info | mtp.RawMt_msg_detailed_info | mtp.RawMt_msg_new_detailed_info | mtp.RawMt_destroy_auth_key_ok | mtp.RawMt_destroy_auth_key_none | mtp.RawMt_destroy_auth_key_fail | mtp.RawMt_http_wait | mtp.RawMt_req_pq_multi | mtp.RawMt_req_DH_params | mtp.RawMt_set_client_DH_params | mtp.RawMt_rpc_drop_answer | mtp.RawMt_get_future_salts | mtp.RawMt_ping | mtp.RawMt_ping_delay_disconnect | mtp.RawMt_destroy_session | mtp.RawMt_destroy_auth_key }