@mtkruto/node 0.69.0 → 0.70.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_deps.d.ts +3 -1
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +3 -1
- package/esm/3_types.d.ts +35 -35
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +35 -35
- package/esm/_dnt.polyfills.d.ts +20 -13
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +120 -11
- package/esm/client/0_abortable_loop.d.ts +27 -0
- package/esm/client/0_abortable_loop.d.ts.map +1 -0
- package/esm/client/0_abortable_loop.js +49 -0
- package/esm/client/0_client_abstract.d.ts +1 -0
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +3 -0
- package/esm/client/0_filters.d.ts +9 -3
- package/esm/client/0_filters.d.ts.map +1 -1
- package/esm/client/0_filters.js +4 -1
- package/esm/client/0_params.d.ts +1 -1
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_storage_operations.d.ts +53 -71
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +241 -238
- package/esm/client/0_update_processor.d.ts +2 -2
- package/esm/client/0_update_processor.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +2 -2
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/1_types.d.ts +2 -2
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +5 -5
- package/esm/client/2_business_connection_manager.d.ts +1 -1
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +3 -3
- package/esm/client/2_client_encrypted.d.ts +1 -1
- package/esm/client/2_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_client_encrypted.js +26 -23
- package/esm/client/2_file_manager.js +2 -2
- package/esm/client/2_network_statistics_manager.d.ts +2 -2
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_network_statistics_manager.js +30 -4
- package/esm/client/2_payment_manager.d.ts +1 -1
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +2 -2
- package/esm/client/2_reaction_manager.d.ts +1 -1
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +2 -2
- package/esm/client/2_translations_manager.d.ts +1 -1
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +15 -11
- package/esm/client/2_update_manager.d.ts +4 -2
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +62 -80
- package/esm/client/3_message_manager.d.ts +2 -2
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +5 -5
- package/esm/client/3_video_chat_manager.d.ts +1 -1
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.d.ts +1 -1
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +1 -1
- package/esm/client/4_chat_list_manager.d.ts +2 -3
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +10 -265
- package/esm/client/4_chat_manager.d.ts +2 -2
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +7 -7
- package/esm/client/4_gift_manager.js +3 -3
- package/esm/client/4_inline_query_manager.d.ts +1 -1
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +3 -3
- package/esm/client/4_link_preview_manager.d.ts +1 -1
- package/esm/client/4_link_preview_manager.d.ts.map +1 -1
- package/esm/client/4_link_preview_manager.js +3 -3
- package/esm/client/4_poll_manager.d.ts +1 -1
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +1 -1
- package/esm/client/4_story_manager.d.ts +1 -1
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +7 -7
- package/esm/client/5_client.d.ts +15 -9
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +420 -382
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +69 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +140 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.js +82 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.js +109 -0
- package/esm/session/1_session.d.ts +1 -0
- package/esm/session/1_session.d.ts.map +1 -1
- package/esm/session/1_session.js +3 -0
- package/esm/session/2_session_encrypted.d.ts +2 -2
- package/esm/session/2_session_encrypted.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.js +198 -135
- package/esm/storage/0_storage.d.ts +1 -0
- package/esm/storage/0_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.d.ts +1 -0
- package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +3 -0
- package/esm/storage/2_storage_local_storage.node.d.ts +1 -0
- package/esm/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.node.js +3 -0
- package/esm/storage/2_storage_memory.d.ts +1 -0
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +3 -0
- package/esm/storage/2_storage_session_storage.d.ts +1 -0
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +3 -0
- package/esm/tl/0_utilities.d.ts +1 -0
- package/esm/tl/0_utilities.d.ts.map +1 -1
- package/esm/tl/0_utilities.js +20 -1
- package/esm/tl/1_telegram_api.d.ts +810 -254
- package/esm/tl/1_telegram_api.d.ts.map +1 -1
- package/esm/tl/1_telegram_api.js +912 -213
- package/esm/tl/1_tl_reader.d.ts +2 -2
- package/esm/tl/1_tl_reader.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.d.ts +2 -2
- package/esm/tl/1_tl_writer.d.ts.map +1 -1
- package/esm/tl/2_mtproto.d.ts +1 -1
- package/esm/tl/2_mtproto.d.ts.map +1 -1
- package/esm/tl/2_telegram.d.ts +1 -1
- package/esm/tl/2_telegram.d.ts.map +1 -1
- package/esm/types/0_file_source.d.ts +1 -1
- package/esm/types/0_file_source.d.ts.map +1 -1
- package/esm/types/1_chat_p.d.ts +10 -0
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +4 -0
- package/esm/types/2_chat.d.ts +2 -5
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +10 -15
- package/esm/types/{0_message_entity.d.ts → 2_message_entity.d.ts} +3 -3
- package/esm/types/{0_message_entity.d.ts.map → 2_message_entity.d.ts.map} +1 -1
- package/esm/types/{0_message_entity.js → 2_message_entity.js} +7 -7
- package/esm/types/2_message_reaction_count.d.ts +2 -3
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.js +4 -6
- package/esm/types/2_poll_answer.d.ts +2 -3
- package/esm/types/2_poll_answer.d.ts.map +1 -1
- package/esm/types/2_poll_answer.js +4 -5
- package/esm/types/2_story_interactive_area.d.ts +2 -2
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +2 -2
- package/esm/types/{1_story_privacy.d.ts → 2_story_privacy.d.ts} +3 -3
- package/esm/types/{1_story_privacy.d.ts.map → 2_story_privacy.d.ts.map} +1 -1
- package/esm/types/{1_story_privacy.js → 2_story_privacy.js} +10 -10
- package/{script/types/1_user.d.ts → esm/types/2_user.d.ts} +5 -1
- package/esm/types/2_user.d.ts.map +1 -0
- package/esm/types/{1_user.js → 2_user.js} +24 -0
- package/esm/types/{2_business_connection.d.ts → 3_business_connection.d.ts} +4 -4
- package/esm/types/3_business_connection.d.ts.map +1 -0
- package/esm/types/{2_business_connection.js → 3_business_connection.js} +10 -3
- package/{script/types/2_chat_member.d.ts → esm/types/3_chat_member.d.ts} +6 -4
- package/esm/types/{2_chat_member.d.ts.map → 3_chat_member.d.ts.map} +1 -1
- package/esm/types/{2_chat_member.js → 3_chat_member.js} +5 -5
- package/esm/types/{2_chat_settings.d.ts → 3_chat_settings.d.ts} +2 -2
- package/{script/types/2_chat_settings.d.ts.map → esm/types/3_chat_settings.d.ts.map} +1 -1
- package/esm/types/{2_chat_settings.js → 3_chat_settings.js} +1 -1
- package/esm/types/{2_chosen_inline_result.d.ts → 3_chosen_inline_result.d.ts} +4 -4
- package/esm/types/3_chosen_inline_result.d.ts.map +1 -0
- package/esm/types/{2_chosen_inline_result.js → 3_chosen_inline_result.js} +3 -3
- package/esm/types/{2_forward_header.d.ts → 3_forward_header.d.ts} +4 -5
- package/esm/types/3_forward_header.d.ts.map +1 -0
- package/esm/types/{2_forward_header.js → 3_forward_header.js} +11 -12
- package/{script/types/2_game.d.ts → esm/types/3_game.d.ts} +2 -2
- package/esm/types/3_game.d.ts.map +1 -0
- package/esm/types/{2_gift_upgraded_component.d.ts → 3_gift_upgraded_component.d.ts} +2 -2
- package/esm/types/{2_gift_upgraded_component.d.ts.map → 3_gift_upgraded_component.d.ts.map} +1 -1
- package/esm/types/{2_gift_upgraded_component.js → 3_gift_upgraded_component.js} +1 -1
- package/esm/types/{2_inline_query.d.ts → 3_inline_query.d.ts} +4 -4
- package/esm/types/3_inline_query.d.ts.map +1 -0
- package/esm/types/{2_inline_query.js → 3_inline_query.js} +5 -5
- package/{script/types/1_input_media.d.ts → esm/types/3_input_media.d.ts} +2 -2
- package/esm/types/{1_input_media.d.ts.map → 3_input_media.d.ts.map} +1 -1
- package/{script/types/2_invite_link.d.ts → esm/types/3_invite_link.d.ts} +4 -4
- package/{script/types/2_invite_link.d.ts.map → esm/types/3_invite_link.d.ts.map} +1 -1
- package/esm/types/{2_invite_link.js → 3_invite_link.js} +5 -5
- package/{script/types/2_message_reactions.d.ts → esm/types/3_message_reactions.d.ts} +5 -6
- package/esm/types/3_message_reactions.d.ts.map +1 -0
- package/esm/types/{2_message_reactions.js → 3_message_reactions.js} +10 -12
- package/esm/types/{1_poll_option.d.ts → 3_poll_option.d.ts} +2 -2
- package/esm/types/{1_poll_option.d.ts.map → 3_poll_option.d.ts.map} +1 -1
- package/esm/types/{1_poll_option.js → 3_poll_option.js} +1 -1
- package/esm/types/{2_pre_checkout_query.d.ts → 3_pre_checkout_query.d.ts} +4 -4
- package/esm/types/3_pre_checkout_query.d.ts.map +1 -0
- package/esm/types/{2_pre_checkout_query.js → 3_pre_checkout_query.js} +5 -5
- package/{script/types/1_reply_quote.d.ts → esm/types/3_reply_quote.d.ts} +2 -2
- package/esm/types/{1_reply_quote.d.ts.map → 3_reply_quote.d.ts.map} +1 -1
- package/esm/types/{1_reply_quote.js → 3_reply_quote.js} +1 -1
- package/esm/types/3_story.d.ts +4 -5
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/3_story.js +6 -7
- package/esm/types/{3_chat_member_updated.d.ts → 4_chat_member_updated.d.ts} +6 -7
- package/esm/types/4_chat_member_updated.d.ts.map +1 -0
- package/esm/types/{3_chat_member_updated.js → 4_chat_member_updated.js} +13 -14
- package/esm/types/{3_gift.d.ts → 4_gift.d.ts} +6 -6
- package/esm/types/{3_gift.d.ts.map → 4_gift.d.ts.map} +1 -1
- package/esm/types/{3_gift.js → 4_gift.js} +7 -7
- package/esm/types/{3_join_request.d.ts → 4_join_request.d.ts} +6 -7
- package/esm/types/4_join_request.d.ts.map +1 -0
- package/esm/types/{3_join_request.js → 4_join_request.js} +17 -18
- package/esm/types/{2_poll.d.ts → 4_poll.d.ts} +3 -3
- package/esm/types/{2_poll.d.ts.map → 4_poll.d.ts.map} +1 -1
- package/esm/types/{2_poll.js → 4_poll.js} +2 -2
- package/{script/types/2_reply_to.d.ts → esm/types/4_reply_to.d.ts} +2 -2
- package/esm/types/{2_reply_to.d.ts.map → 4_reply_to.d.ts.map} +1 -1
- package/esm/types/{4_claimed_gift.d.ts → 5_claimed_gift.d.ts} +5 -6
- package/esm/types/5_claimed_gift.d.ts.map +1 -0
- package/esm/types/{4_claimed_gift.js → 5_claimed_gift.js} +4 -4
- package/esm/types/{4_link_preview.d.ts → 5_link_preview.d.ts} +4 -4
- package/{script/types/4_link_preview.d.ts.map → esm/types/5_link_preview.d.ts.map} +1 -1
- package/esm/types/{4_link_preview.js → 5_link_preview.js} +3 -3
- package/esm/types/{5_claimed_gifts.d.ts → 6_claimed_gifts.d.ts} +4 -4
- package/esm/types/6_claimed_gifts.d.ts.map +1 -0
- package/esm/types/{5_claimed_gifts.js → 6_claimed_gifts.js} +4 -4
- package/esm/types/{5_message.d.ts → 6_message.d.ts} +10 -11
- package/esm/types/6_message.d.ts.map +1 -0
- package/esm/types/{5_message.js → 6_message.js} +41 -66
- package/{script/types/5_message_content.d.ts → esm/types/6_message_content.d.ts} +3 -3
- package/esm/types/{5_message_content.d.ts.map → 6_message_content.d.ts.map} +1 -1
- package/{script/types/6_callback_query.d.ts → esm/types/7_callback_query.d.ts} +5 -5
- package/esm/types/{6_callback_query.d.ts.map → 7_callback_query.d.ts.map} +1 -1
- package/esm/types/{6_callback_query.js → 7_callback_query.js} +5 -5
- package/{script/types/6_chat_list_item.d.ts → esm/types/7_chat_list_item.d.ts} +6 -7
- package/esm/types/7_chat_list_item.d.ts.map +1 -0
- package/esm/types/{6_chat_list_item.js → 7_chat_list_item.js} +11 -11
- package/{script/types/6_inline_query_result.d.ts → esm/types/7_inline_query_result.d.ts} +3 -3
- package/esm/types/{6_inline_query_result.d.ts.map → 7_inline_query_result.d.ts.map} +1 -1
- package/esm/types/{6_inline_query_result.js → 7_inline_query_result.js} +1 -1
- package/esm/types/{6_saved_chat.d.ts → 7_saved_chat.d.ts} +4 -5
- package/esm/types/7_saved_chat.d.ts.map +1 -0
- package/esm/types/{6_saved_chat.js → 7_saved_chat.js} +4 -4
- package/esm/types/{6_topic.d.ts → 7_topic.d.ts} +2 -2
- package/esm/types/{6_topic.d.ts.map → 7_topic.d.ts.map} +1 -1
- package/esm/types/{7_inline_query_answer.d.ts → 8_inline_query_answer.d.ts} +2 -2
- package/esm/types/{7_inline_query_answer.d.ts.map → 8_inline_query_answer.d.ts.map} +1 -1
- package/esm/types/{7_inline_query_answer.js → 8_inline_query_answer.js} +1 -1
- package/{script/types/7_saved_chats.d.ts → esm/types/8_saved_chats.d.ts} +5 -5
- package/esm/types/8_saved_chats.d.ts.map +1 -0
- package/esm/types/{7_saved_chats.js → 8_saved_chats.js} +3 -3
- package/esm/types/{7_update.d.ts → 8_update.d.ts} +35 -16
- package/esm/types/8_update.d.ts.map +1 -0
- package/esm/types/_file_id.d.ts +1 -1
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_getters.d.ts +0 -7
- package/esm/types/_getters.d.ts.map +1 -1
- package/esm/utilities/0_hash.d.ts +2 -2
- package/esm/utilities/0_hash.d.ts.map +1 -1
- package/esm/utilities/0_misc.d.ts +1 -0
- package/esm/utilities/0_misc.d.ts.map +1 -1
- package/esm/utilities/0_misc.js +14 -1
- package/esm/utilities/0_part_stream.d.ts +1 -1
- package/esm/utilities/0_part_stream.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +3 -1
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +6 -1
- package/script/3_types.d.ts +35 -35
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +35 -35
- package/script/_dnt.polyfills.d.ts +20 -13
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +120 -11
- package/script/client/0_abortable_loop.d.ts +27 -0
- package/script/client/0_abortable_loop.d.ts.map +1 -0
- package/script/client/0_abortable_loop.js +53 -0
- package/script/client/0_client_abstract.d.ts +1 -0
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +3 -0
- package/script/client/0_filters.d.ts +9 -3
- package/script/client/0_filters.d.ts.map +1 -1
- package/script/client/0_filters.js +4 -1
- package/script/client/0_params.d.ts +1 -1
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_storage_operations.d.ts +53 -71
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +239 -236
- package/script/client/0_update_processor.d.ts +2 -2
- package/script/client/0_update_processor.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +2 -2
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/1_types.d.ts +2 -2
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.js +5 -5
- package/script/client/2_business_connection_manager.d.ts +1 -1
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +3 -3
- package/script/client/2_client_encrypted.d.ts +1 -1
- package/script/client/2_client_encrypted.d.ts.map +1 -1
- package/script/client/2_client_encrypted.js +26 -23
- package/script/client/2_file_manager.js +2 -2
- package/script/client/2_network_statistics_manager.d.ts +2 -2
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_network_statistics_manager.js +30 -4
- package/script/client/2_payment_manager.d.ts +1 -1
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +2 -2
- package/script/client/2_reaction_manager.d.ts +1 -1
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +2 -2
- package/script/client/2_translations_manager.d.ts +1 -1
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +15 -11
- package/script/client/2_update_manager.d.ts +4 -2
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +62 -80
- package/script/client/3_message_manager.d.ts +2 -2
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +5 -5
- package/script/client/3_video_chat_manager.d.ts +1 -1
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.d.ts +1 -1
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +1 -1
- package/script/client/4_chat_list_manager.d.ts +2 -3
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +9 -264
- package/script/client/4_chat_manager.d.ts +2 -2
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +7 -7
- package/script/client/4_gift_manager.js +3 -3
- package/script/client/4_inline_query_manager.d.ts +1 -1
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +3 -3
- package/script/client/4_link_preview_manager.d.ts +1 -1
- package/script/client/4_link_preview_manager.d.ts.map +1 -1
- package/script/client/4_link_preview_manager.js +3 -3
- package/script/client/4_poll_manager.d.ts +1 -1
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +1 -1
- package/script/client/4_story_manager.d.ts +1 -1
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +7 -7
- package/script/client/5_client.d.ts +15 -9
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +418 -380
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +72 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +144 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.js +85 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +113 -0
- package/script/session/1_session.d.ts +1 -0
- package/script/session/1_session.d.ts.map +1 -1
- package/script/session/1_session.js +3 -0
- package/script/session/2_session_encrypted.d.ts +2 -2
- package/script/session/2_session_encrypted.d.ts.map +1 -1
- package/script/session/2_session_encrypted.js +197 -134
- package/script/storage/0_storage.d.ts +1 -0
- package/script/storage/0_storage.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.d.ts +1 -0
- package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +3 -0
- package/script/storage/2_storage_local_storage.node.d.ts +1 -0
- package/script/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.node.js +3 -0
- package/script/storage/2_storage_memory.d.ts +1 -0
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +3 -0
- package/script/storage/2_storage_session_storage.d.ts +1 -0
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +3 -0
- package/script/tl/0_utilities.d.ts +1 -0
- package/script/tl/0_utilities.d.ts.map +1 -1
- package/script/tl/0_utilities.js +20 -0
- package/script/tl/1_telegram_api.d.ts +810 -254
- package/script/tl/1_telegram_api.d.ts.map +1 -1
- package/script/tl/1_telegram_api.js +912 -213
- package/script/tl/1_tl_reader.d.ts +2 -2
- package/script/tl/1_tl_reader.d.ts.map +1 -1
- package/script/tl/1_tl_writer.d.ts +2 -2
- package/script/tl/1_tl_writer.d.ts.map +1 -1
- package/script/tl/2_mtproto.d.ts +1 -1
- package/script/tl/2_mtproto.d.ts.map +1 -1
- package/script/tl/2_telegram.d.ts +1 -1
- package/script/tl/2_telegram.d.ts.map +1 -1
- package/script/types/0_file_source.d.ts +1 -1
- package/script/types/0_file_source.d.ts.map +1 -1
- package/script/types/1_chat_p.d.ts +10 -0
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +5 -0
- package/script/types/2_chat.d.ts +2 -5
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +10 -15
- package/script/types/{0_message_entity.d.ts → 2_message_entity.d.ts} +3 -3
- package/script/types/{0_message_entity.d.ts.map → 2_message_entity.d.ts.map} +1 -1
- package/script/types/{0_message_entity.js → 2_message_entity.js} +7 -7
- package/script/types/2_message_reaction_count.d.ts +2 -3
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.js +4 -6
- package/script/types/2_poll_answer.d.ts +2 -3
- package/script/types/2_poll_answer.d.ts.map +1 -1
- package/script/types/2_poll_answer.js +4 -5
- package/script/types/2_story_interactive_area.d.ts +2 -2
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +2 -2
- package/script/types/{1_story_privacy.d.ts → 2_story_privacy.d.ts} +3 -3
- package/script/types/{1_story_privacy.d.ts.map → 2_story_privacy.d.ts.map} +1 -1
- package/script/types/{1_story_privacy.js → 2_story_privacy.js} +10 -10
- package/{esm/types/1_user.d.ts → script/types/2_user.d.ts} +5 -1
- package/script/types/2_user.d.ts.map +1 -0
- package/script/types/{1_user.js → 2_user.js} +25 -0
- package/script/types/{2_business_connection.d.ts → 3_business_connection.d.ts} +4 -4
- package/script/types/3_business_connection.d.ts.map +1 -0
- package/script/types/{2_business_connection.js → 3_business_connection.js} +10 -3
- package/{esm/types/2_chat_member.d.ts → script/types/3_chat_member.d.ts} +6 -4
- package/script/types/{2_chat_member.d.ts.map → 3_chat_member.d.ts.map} +1 -1
- package/script/types/{2_chat_member.js → 3_chat_member.js} +5 -5
- package/script/types/{2_chat_settings.d.ts → 3_chat_settings.d.ts} +2 -2
- package/{esm/types/2_chat_settings.d.ts.map → script/types/3_chat_settings.d.ts.map} +1 -1
- package/script/types/{2_chat_settings.js → 3_chat_settings.js} +2 -2
- package/script/types/{2_chosen_inline_result.d.ts → 3_chosen_inline_result.d.ts} +4 -4
- package/script/types/3_chosen_inline_result.d.ts.map +1 -0
- package/script/types/{2_chosen_inline_result.js → 3_chosen_inline_result.js} +4 -4
- package/script/types/{2_forward_header.d.ts → 3_forward_header.d.ts} +4 -5
- package/script/types/3_forward_header.d.ts.map +1 -0
- package/script/types/{2_forward_header.js → 3_forward_header.js} +11 -12
- package/{esm/types/2_game.d.ts → script/types/3_game.d.ts} +2 -2
- package/script/types/3_game.d.ts.map +1 -0
- package/script/types/{2_gift_upgraded_component.d.ts → 3_gift_upgraded_component.d.ts} +2 -2
- package/script/types/{2_gift_upgraded_component.d.ts.map → 3_gift_upgraded_component.d.ts.map} +1 -1
- package/script/types/{2_gift_upgraded_component.js → 3_gift_upgraded_component.js} +2 -2
- package/script/types/{2_inline_query.d.ts → 3_inline_query.d.ts} +4 -4
- package/script/types/3_inline_query.d.ts.map +1 -0
- package/script/types/{2_inline_query.js → 3_inline_query.js} +5 -5
- package/{esm/types/1_input_media.d.ts → script/types/3_input_media.d.ts} +2 -2
- package/script/types/{1_input_media.d.ts.map → 3_input_media.d.ts.map} +1 -1
- package/{esm/types/2_invite_link.d.ts → script/types/3_invite_link.d.ts} +4 -4
- package/{esm/types/2_invite_link.d.ts.map → script/types/3_invite_link.d.ts.map} +1 -1
- package/script/types/{2_invite_link.js → 3_invite_link.js} +5 -5
- package/{esm/types/2_message_reactions.d.ts → script/types/3_message_reactions.d.ts} +5 -6
- package/script/types/3_message_reactions.d.ts.map +1 -0
- package/script/types/{2_message_reactions.js → 3_message_reactions.js} +10 -12
- package/script/types/{1_poll_option.d.ts → 3_poll_option.d.ts} +2 -2
- package/script/types/{1_poll_option.d.ts.map → 3_poll_option.d.ts.map} +1 -1
- package/script/types/{1_poll_option.js → 3_poll_option.js} +2 -2
- package/script/types/{2_pre_checkout_query.d.ts → 3_pre_checkout_query.d.ts} +4 -4
- package/script/types/3_pre_checkout_query.d.ts.map +1 -0
- package/script/types/{2_pre_checkout_query.js → 3_pre_checkout_query.js} +5 -5
- package/{esm/types/1_reply_quote.d.ts → script/types/3_reply_quote.d.ts} +2 -2
- package/script/types/{1_reply_quote.d.ts.map → 3_reply_quote.d.ts.map} +1 -1
- package/script/types/{1_reply_quote.js → 3_reply_quote.js} +2 -2
- package/script/types/3_story.d.ts +4 -5
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/3_story.js +8 -9
- package/script/types/{3_chat_member_updated.d.ts → 4_chat_member_updated.d.ts} +6 -7
- package/script/types/4_chat_member_updated.d.ts.map +1 -0
- package/script/types/{3_chat_member_updated.js → 4_chat_member_updated.js} +13 -14
- package/script/types/{3_gift.d.ts → 4_gift.d.ts} +6 -6
- package/script/types/{3_gift.d.ts.map → 4_gift.d.ts.map} +1 -1
- package/script/types/{3_gift.js → 4_gift.js} +9 -9
- package/script/types/{3_join_request.d.ts → 4_join_request.d.ts} +6 -7
- package/script/types/4_join_request.d.ts.map +1 -0
- package/script/types/{3_join_request.js → 4_join_request.js} +17 -18
- package/script/types/{2_poll.d.ts → 4_poll.d.ts} +3 -3
- package/script/types/{2_poll.d.ts.map → 4_poll.d.ts.map} +1 -1
- package/script/types/{2_poll.js → 4_poll.js} +5 -5
- package/{esm/types/2_reply_to.d.ts → script/types/4_reply_to.d.ts} +2 -2
- package/script/types/{2_reply_to.d.ts.map → 4_reply_to.d.ts.map} +1 -1
- package/script/types/{4_claimed_gift.d.ts → 5_claimed_gift.d.ts} +5 -6
- package/script/types/5_claimed_gift.d.ts.map +1 -0
- package/script/types/{4_claimed_gift.js → 5_claimed_gift.js} +5 -5
- package/script/types/{4_link_preview.d.ts → 5_link_preview.d.ts} +4 -4
- package/{esm/types/4_link_preview.d.ts.map → script/types/5_link_preview.d.ts.map} +1 -1
- package/script/types/{4_link_preview.js → 5_link_preview.js} +3 -3
- package/script/types/{5_claimed_gifts.d.ts → 6_claimed_gifts.d.ts} +4 -4
- package/script/types/6_claimed_gifts.d.ts.map +1 -0
- package/script/types/{5_claimed_gifts.js → 6_claimed_gifts.js} +4 -4
- package/script/types/{5_message.d.ts → 6_message.d.ts} +10 -11
- package/script/types/6_message.d.ts.map +1 -0
- package/script/types/{5_message.js → 6_message.js} +45 -70
- package/{esm/types/5_message_content.d.ts → script/types/6_message_content.d.ts} +3 -3
- package/script/types/{5_message_content.d.ts.map → 6_message_content.d.ts.map} +1 -1
- package/{esm/types/6_callback_query.d.ts → script/types/7_callback_query.d.ts} +5 -5
- package/script/types/{6_callback_query.d.ts.map → 7_callback_query.d.ts.map} +1 -1
- package/script/types/{6_callback_query.js → 7_callback_query.js} +5 -5
- package/{esm/types/6_chat_list_item.d.ts → script/types/7_chat_list_item.d.ts} +6 -7
- package/script/types/7_chat_list_item.d.ts.map +1 -0
- package/script/types/{6_chat_list_item.js → 7_chat_list_item.js} +11 -11
- package/{esm/types/6_inline_query_result.d.ts → script/types/7_inline_query_result.d.ts} +3 -3
- package/script/types/{6_inline_query_result.d.ts.map → 7_inline_query_result.d.ts.map} +1 -1
- package/script/types/{6_inline_query_result.js → 7_inline_query_result.js} +3 -3
- package/script/types/{6_saved_chat.d.ts → 7_saved_chat.d.ts} +4 -5
- package/script/types/7_saved_chat.d.ts.map +1 -0
- package/script/types/{6_saved_chat.js → 7_saved_chat.js} +4 -4
- package/script/types/{6_topic.d.ts → 7_topic.d.ts} +2 -2
- package/script/types/{6_topic.d.ts.map → 7_topic.d.ts.map} +1 -1
- package/script/types/{7_inline_query_answer.d.ts → 8_inline_query_answer.d.ts} +2 -2
- package/script/types/{7_inline_query_answer.d.ts.map → 8_inline_query_answer.d.ts.map} +1 -1
- package/script/types/{7_inline_query_answer.js → 8_inline_query_answer.js} +2 -2
- package/{esm/types/7_saved_chats.d.ts → script/types/8_saved_chats.d.ts} +5 -5
- package/script/types/8_saved_chats.d.ts.map +1 -0
- package/script/types/{7_saved_chats.js → 8_saved_chats.js} +3 -3
- package/script/types/{7_update.d.ts → 8_update.d.ts} +35 -16
- package/script/types/8_update.d.ts.map +1 -0
- package/script/types/_file_id.d.ts +1 -1
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_getters.d.ts +0 -7
- package/script/types/_getters.d.ts.map +1 -1
- package/script/utilities/0_hash.d.ts +2 -2
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_misc.d.ts +1 -0
- package/script/utilities/0_misc.d.ts.map +1 -1
- package/script/utilities/0_misc.js +14 -0
- package/script/utilities/0_part_stream.d.ts +1 -1
- package/script/utilities/0_part_stream.d.ts.map +1 -1
- package/esm/types/1_user.d.ts.map +0 -1
- package/esm/types/2_business_connection.d.ts.map +0 -1
- package/esm/types/2_chosen_inline_result.d.ts.map +0 -1
- package/esm/types/2_forward_header.d.ts.map +0 -1
- package/esm/types/2_game.d.ts.map +0 -1
- package/esm/types/2_inline_query.d.ts.map +0 -1
- package/esm/types/2_message_reactions.d.ts.map +0 -1
- package/esm/types/2_pre_checkout_query.d.ts.map +0 -1
- package/esm/types/3_chat_member_updated.d.ts.map +0 -1
- package/esm/types/3_join_request.d.ts.map +0 -1
- package/esm/types/4_claimed_gift.d.ts.map +0 -1
- package/esm/types/5_claimed_gifts.d.ts.map +0 -1
- package/esm/types/5_message.d.ts.map +0 -1
- package/esm/types/6_chat_list_item.d.ts.map +0 -1
- package/esm/types/6_saved_chat.d.ts.map +0 -1
- package/esm/types/7_saved_chats.d.ts.map +0 -1
- package/esm/types/7_update.d.ts.map +0 -1
- package/script/types/1_user.d.ts.map +0 -1
- package/script/types/2_business_connection.d.ts.map +0 -1
- package/script/types/2_chosen_inline_result.d.ts.map +0 -1
- package/script/types/2_forward_header.d.ts.map +0 -1
- package/script/types/2_game.d.ts.map +0 -1
- package/script/types/2_inline_query.d.ts.map +0 -1
- package/script/types/2_message_reactions.d.ts.map +0 -1
- package/script/types/2_pre_checkout_query.d.ts.map +0 -1
- package/script/types/3_chat_member_updated.d.ts.map +0 -1
- package/script/types/3_join_request.d.ts.map +0 -1
- package/script/types/4_claimed_gift.d.ts.map +0 -1
- package/script/types/5_claimed_gifts.d.ts.map +0 -1
- package/script/types/5_message.d.ts.map +0 -1
- package/script/types/6_chat_list_item.d.ts.map +0 -1
- package/script/types/6_saved_chat.d.ts.map +0 -1
- package/script/types/7_saved_chats.d.ts.map +0 -1
- package/script/types/7_update.d.ts.map +0 -1
- /package/esm/types/{2_game.js → 3_game.js} +0 -0
- /package/esm/types/{1_input_media.js → 3_input_media.js} +0 -0
- /package/esm/types/{2_reply_to.js → 4_reply_to.js} +0 -0
- /package/esm/types/{5_message_content.js → 6_message_content.js} +0 -0
- /package/esm/types/{6_topic.js → 7_topic.js} +0 -0
- /package/esm/types/{7_update.js → 8_update.js} +0 -0
- /package/script/types/{2_game.js → 3_game.js} +0 -0
- /package/script/types/{1_input_media.js → 3_input_media.js} +0 -0
- /package/script/types/{2_reply_to.js → 4_reply_to.js} +0 -0
- /package/script/types/{5_message_content.js → 6_message_content.js} +0 -0
- /package/script/types/{6_topic.js → 7_topic.js} +0 -0
- /package/script/types/{7_update.js → 8_update.js} +0 -0
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructUser = constructUser;
|
|
23
|
+
exports.constructUser2 = constructUser2;
|
|
23
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
26
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
@@ -44,9 +45,33 @@ function constructUser(user_) {
|
|
|
44
45
|
isRestricted: user_.restricted || false,
|
|
45
46
|
restrictionReason: user_.restriction_reason,
|
|
46
47
|
addedToAttachmentMenu: user_.bot ? user_.attach_menu_enabled || false : undefined,
|
|
48
|
+
hasMainMiniApp: user_.bot ? user_.bot_has_main_app || false : undefined,
|
|
47
49
|
};
|
|
48
50
|
if (_2_tl_js_1.Api.is("userProfilePhoto", user_.photo)) {
|
|
49
51
|
user.photo = (0, _0_chat_photo_js_1.constructChatPhoto)(user_.photo, user.id, user_.access_hash ?? 0n);
|
|
50
52
|
}
|
|
51
53
|
return (0, _1_utilities_js_1.cleanObject)(user);
|
|
52
54
|
}
|
|
55
|
+
function constructUser2(chatP) {
|
|
56
|
+
const user = {
|
|
57
|
+
id: chatP.id,
|
|
58
|
+
color: chatP.color,
|
|
59
|
+
isBot: chatP.isBot,
|
|
60
|
+
firstName: chatP.firstName,
|
|
61
|
+
lastName: chatP.lastName,
|
|
62
|
+
username: chatP.username,
|
|
63
|
+
also: chatP.also,
|
|
64
|
+
photo: chatP.photo,
|
|
65
|
+
languageCode: chatP.languageCode,
|
|
66
|
+
isScam: chatP.isScam,
|
|
67
|
+
isFake: chatP.isFake,
|
|
68
|
+
isPremium: chatP.isPremium,
|
|
69
|
+
isVerified: chatP.isVerified,
|
|
70
|
+
isSupport: chatP.isSupport,
|
|
71
|
+
isRestricted: chatP.isRestricted,
|
|
72
|
+
restrictionReason: chatP.restrictionReason,
|
|
73
|
+
addedToAttachmentMenu: chatP.addedToAttachmentMenu,
|
|
74
|
+
hasMainMiniApp: chatP.hasMainMiniApp,
|
|
75
|
+
};
|
|
76
|
+
return (0, _1_utilities_js_1.cleanObject)(user);
|
|
77
|
+
}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
|
-
import type
|
|
22
|
-
import { type User } from "./
|
|
21
|
+
import { type PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type User } from "./2_user.js";
|
|
23
23
|
/** A business connection. */
|
|
24
24
|
export interface BusinessConnection {
|
|
25
25
|
/** The business connection's unique identifier. */
|
|
@@ -33,5 +33,5 @@ export interface BusinessConnection {
|
|
|
33
33
|
/** Whether the connection is active. */
|
|
34
34
|
isEnabled: boolean;
|
|
35
35
|
}
|
|
36
|
-
export declare function constructBusinessConnection(connection: Api.botBusinessConnection,
|
|
37
|
-
//# sourceMappingURL=
|
|
36
|
+
export declare function constructBusinessConnection(connection: Api.botBusinessConnection, getPeer: PeerGetter): BusinessConnection;
|
|
37
|
+
//# sourceMappingURL=3_business_connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_business_connection.d.ts","sourceRoot":"","sources":["../../src/types/3_business_connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,6BAA6B;AAC7B,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,IAAI,EAAE,IAAI,CAAC;IACX,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,GAAG,CAAC,qBAAqB,EAAE,OAAO,EAAE,UAAU,GAAG,kBAAkB,CAa1H"}
|
|
@@ -20,11 +20,18 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructBusinessConnection = constructBusinessConnection;
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
|
+
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
25
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
26
|
+
function constructBusinessConnection(connection, getPeer) {
|
|
27
|
+
const peer = getPeer({ ...connection, _: "peerUser" });
|
|
28
|
+
if (!peer || !(0, _1_chat_p_js_1.isChatPUser)(peer[0])) {
|
|
29
|
+
(0, _0_deps_js_1.unreachable)();
|
|
30
|
+
}
|
|
31
|
+
const user = (0, _2_user_js_1.constructUser2)(peer[0]);
|
|
25
32
|
return {
|
|
26
33
|
id: connection.connection_id,
|
|
27
|
-
user
|
|
34
|
+
user,
|
|
28
35
|
date: connection.date,
|
|
29
36
|
canReply: !!connection.rights?.reply,
|
|
30
37
|
isEnabled: !connection.disabled,
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import type { EntityGetter } from "./_getters.js";
|
|
22
21
|
import { type ChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
23
22
|
import { type ChatMemberRights } from "./0_chat_member_rights.js";
|
|
24
|
-
import {
|
|
23
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
24
|
+
import { type User } from "./2_user.js";
|
|
25
25
|
/** @unlisted */
|
|
26
26
|
export type ChatMemberStatus = "creator" | "administrator" | "member" | "restricted" | "left" | "banned";
|
|
27
27
|
/** @unlisted */
|
|
@@ -64,5 +64,7 @@ export interface ChatMemberBanned extends _ChatMemberBase {
|
|
|
64
64
|
}
|
|
65
65
|
/** A chat member. */
|
|
66
66
|
export type ChatMember = ChatMemberCreator | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
|
|
67
|
-
export declare function constructChatMember(participant: Api.ChannelParticipant | Api.ChatParticipant,
|
|
68
|
-
|
|
67
|
+
export declare function constructChatMember(participant: Api.ChannelParticipant | Api.ChatParticipant | (Omit<Api.ChannelParticipant, "peer"> & {
|
|
68
|
+
peer: ReturnType<typeof getPeer>;
|
|
69
|
+
}), getPeer: PeerGetter): ChatMember;
|
|
70
|
+
//# sourceMappingURL=3_chat_member.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/3_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,uBAAuB,EAAoC,MAAM,kCAAkC,CAAC;AAClH,OAAO,EAAE,KAAK,gBAAgB,EAA6B,MAAM,2BAA2B,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzG,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAqB;AACrB,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,uBAAuB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEnJ,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,GAAG,GAAG,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;CAAE,CAAC,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CA+E9M"}
|
|
@@ -25,12 +25,12 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
26
|
const _0_chat_administrator_rights_js_1 = require("./0_chat_administrator_rights.js");
|
|
27
27
|
const _0_chat_member_rights_js_1 = require("./0_chat_member_rights.js");
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
28
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
29
|
+
function constructChatMember(participant, getPeer) {
|
|
30
|
+
const peer = "user_id" in participant ? getPeer({ ...participant, _: "peerUser" }) : "peer" in participant ? Array.isArray(participant.peer) ? participant.peer : _2_tl_js_1.Api.is("peerUser", participant.peer) ? getPeer(participant.peer) : (0, _0_deps_js_1.unreachable)() : (0, _0_deps_js_1.unreachable)(); // TODO: support other peer types
|
|
31
|
+
if (peer === null || peer[0].type !== "private")
|
|
32
32
|
(0, _0_deps_js_1.unreachable)();
|
|
33
|
-
const user = (0,
|
|
33
|
+
const user = (0, _2_user_js_1.constructUser2)(peer[0]);
|
|
34
34
|
if (_2_tl_js_1.Api.is("channelParticipant", participant) || _2_tl_js_1.Api.is("chatParticipant", participant)) {
|
|
35
35
|
return {
|
|
36
36
|
status: "member",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import { type User } from "./
|
|
21
|
+
import { type User } from "./2_user.js";
|
|
22
22
|
export interface ChatSettings {
|
|
23
23
|
report: boolean;
|
|
24
24
|
addToContacts: boolean;
|
|
@@ -43,4 +43,4 @@ export interface ChatSettings {
|
|
|
43
43
|
photoChangeDate?: number;
|
|
44
44
|
}
|
|
45
45
|
export declare function constructChatSettings(settings_: Api.messages_peerSettings): ChatSettings;
|
|
46
|
-
//# sourceMappingURL=
|
|
46
|
+
//# sourceMappingURL=3_chat_settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_chat_settings.d.ts","sourceRoot":"","sources":["../../src/types/3_chat_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,GAAG,CAAC,qBAAqB,GAAG,YAAY,CA4BxF"}
|
|
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.constructChatSettings = constructChatSettings;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
|
-
const
|
|
25
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
26
26
|
function constructChatSettings(settings_) {
|
|
27
27
|
const settings = {
|
|
28
28
|
report: settings_.settings.report_spam || false,
|
|
@@ -48,7 +48,7 @@ function constructChatSettings(settings_) {
|
|
|
48
48
|
};
|
|
49
49
|
const bot = settings_.users.find((v) => v.id === settings_.settings.business_bot_id);
|
|
50
50
|
if (_2_tl_js_1.Api.is("user", bot)) {
|
|
51
|
-
settings.businessBot = (0,
|
|
51
|
+
settings.businessBot = (0, _2_user_js_1.constructUser)(bot);
|
|
52
52
|
}
|
|
53
53
|
return (0, _1_utilities_js_1.cleanObject)(settings);
|
|
54
54
|
}
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import type { EntityGetter } from "./_getters.js";
|
|
22
21
|
import { type Location } from "./0_location.js";
|
|
23
|
-
import {
|
|
22
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
23
|
+
import { type User } from "./2_user.js";
|
|
24
24
|
/** A chosen inline result. */
|
|
25
25
|
export interface ChosenInlineResult {
|
|
26
26
|
/** The identifier of the inline result that was chosen. */
|
|
@@ -34,5 +34,5 @@ export interface ChosenInlineResult {
|
|
|
34
34
|
/** The query that was used to obtain the result. */
|
|
35
35
|
query: string;
|
|
36
36
|
}
|
|
37
|
-
export declare function constructChosenInlineResult(ubis: Api.updateBotInlineSend,
|
|
38
|
-
//# sourceMappingURL=
|
|
37
|
+
export declare function constructChosenInlineResult(ubis: Api.updateBotInlineSend, getPeer: PeerGetter): ChosenInlineResult;
|
|
38
|
+
//# sourceMappingURL=3_chosen_inline_result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_chosen_inline_result.d.ts","sourceRoot":"","sources":["../../src/types/3_chosen_inline_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,GAAG,CAAC,mBAAmB,EAAE,OAAO,EAAE,UAAU,GAAG,kBAAkB,CAYlH"}
|
|
@@ -24,15 +24,15 @@ const _0_deps_js_1 = require("../0_deps.js");
|
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
26
|
const _0_location_js_1 = require("./0_location.js");
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const entity =
|
|
27
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
28
|
+
function constructChosenInlineResult(ubis, getPeer) {
|
|
29
|
+
const entity = getPeer({ ...ubis, _: "peerUser" });
|
|
30
30
|
if (!entity || !(_2_tl_js_1.Api.is("user", entity))) {
|
|
31
31
|
(0, _0_deps_js_1.unreachable)();
|
|
32
32
|
}
|
|
33
33
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
34
34
|
resultId: ubis.id,
|
|
35
|
-
from: (0,
|
|
35
|
+
from: (0, _2_user_js_1.constructUser)(entity),
|
|
36
36
|
location: _2_tl_js_1.Api.is("geoPoint", ubis.geo) ? (0, _0_location_js_1.constructLocation)(ubis.geo) : undefined,
|
|
37
37
|
inlineMessageId: ubis.msg_id === undefined ? undefined : (0, _1_utilities_js_1.base64EncodeUrlSafe)(_2_tl_js_1.Api.serializeObject(ubis.msg_id)),
|
|
38
38
|
query: ubis.query,
|
|
@@ -18,9 +18,8 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
|
-
import type {
|
|
22
|
-
import { type
|
|
23
|
-
import { type User } from "./1_user.js";
|
|
21
|
+
import type { ChatPChannel, ChatPSupergroup, PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type User } from "./2_user.js";
|
|
24
23
|
/** @unlisted */
|
|
25
24
|
export interface _ForwardHeaderCommon {
|
|
26
25
|
date: number;
|
|
@@ -55,5 +54,5 @@ export interface ForwardHeaderUnsupported extends _ForwardHeaderCommon {
|
|
|
55
54
|
type: "unsupported";
|
|
56
55
|
}
|
|
57
56
|
export type ForwardHeader = ForwardHeaderUser | ForwardHeaderChannel | ForwardHeaderSupergroup | ForwardHeaderHidden | ForwardHeaderUnsupported;
|
|
58
|
-
export declare function constructForwardHeader(fwdHeader: Api.MessageFwdHeader,
|
|
59
|
-
//# sourceMappingURL=
|
|
57
|
+
export declare function constructForwardHeader(fwdHeader: Api.MessageFwdHeader, getPeer: PeerGetter): ForwardHeader;
|
|
58
|
+
//# sourceMappingURL=3_forward_header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_forward_header.d.ts","sourceRoot":"","sources":["../../src/types/3_forward_header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;AAEhJ,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,GAAG,CAAC,gBAAgB,EAAE,OAAO,EAAE,UAAU,GAAG,aAAa,CA8C1G"}
|
|
@@ -22,43 +22,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.constructForwardHeader = constructForwardHeader;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
async function constructForwardHeader(fwdHeader, getEntity) {
|
|
25
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
26
|
+
function constructForwardHeader(fwdHeader, getPeer) {
|
|
28
27
|
if (fwdHeader.channel_post && fwdHeader.from_id?._ === "peerChannel") {
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
28
|
+
const peer = getPeer(fwdHeader.from_id);
|
|
29
|
+
if (peer === null) {
|
|
31
30
|
(0, _0_deps_js_1.unreachable)();
|
|
32
31
|
}
|
|
33
32
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
34
33
|
type: "channel",
|
|
35
34
|
date: fwdHeader.date,
|
|
36
|
-
chat:
|
|
35
|
+
chat: peer[0],
|
|
37
36
|
messageId: fwdHeader.channel_post,
|
|
38
37
|
authorSignature: fwdHeader.post_author,
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
else if (fwdHeader.from_id?._ === "peerChannel") {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
41
|
+
const peer = getPeer(fwdHeader.from_id);
|
|
42
|
+
if (peer === null) {
|
|
44
43
|
(0, _0_deps_js_1.unreachable)();
|
|
45
44
|
}
|
|
46
45
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
47
46
|
type: "supergroup",
|
|
48
47
|
date: fwdHeader.date,
|
|
49
|
-
chat:
|
|
48
|
+
chat: peer[0],
|
|
50
49
|
title: fwdHeader.post_author,
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
52
|
else if (fwdHeader.from_id?._ === "peerUser") {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
53
|
+
const peer = getPeer(fwdHeader.from_id);
|
|
54
|
+
if (peer === null || peer[0].type !== "private") {
|
|
56
55
|
(0, _0_deps_js_1.unreachable)();
|
|
57
56
|
}
|
|
58
57
|
return {
|
|
59
58
|
type: "user",
|
|
60
59
|
date: fwdHeader.date,
|
|
61
|
-
user: (0,
|
|
60
|
+
user: (0, _2_user_js_1.constructUser2)(peer[0]),
|
|
62
61
|
};
|
|
63
62
|
}
|
|
64
63
|
else if (fwdHeader.from_name) {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import type { MessageEntity } from "./0_message_entity.js";
|
|
22
21
|
import { type Animation } from "./1_animation.js";
|
|
23
22
|
import { type Photo } from "./1_photo.js";
|
|
23
|
+
import type { MessageEntity } from "./2_message_entity.js";
|
|
24
24
|
/** A game. */
|
|
25
25
|
export interface Game {
|
|
26
26
|
/** The title of the game. */
|
|
@@ -37,4 +37,4 @@ export interface Game {
|
|
|
37
37
|
animation?: Animation;
|
|
38
38
|
}
|
|
39
39
|
export declare function constructGame(media_: Api.messageMediaGame): Game;
|
|
40
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=3_game.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_game.d.ts","sourceRoot":"","sources":["../../src/types/3_game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CA0BhE"}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import { type MessageEntity } from "./0_message_entity.js";
|
|
22
21
|
import { type Sticker } from "./1_sticker.js";
|
|
22
|
+
import { type MessageEntity } from "./2_message_entity.js";
|
|
23
23
|
/**
|
|
24
24
|
* The model of an upgraded gift.
|
|
25
25
|
*
|
|
@@ -92,4 +92,4 @@ export interface GiftUpgradedComponentOriginalDetails {
|
|
|
92
92
|
*/
|
|
93
93
|
export type GiftUpgradedComponent = GiftUpgradedComponentModel | GiftUpgradedComponentPattern | GiftUpgradedComponentBackdrop | GiftUpgradedComponentOriginalDetails;
|
|
94
94
|
export declare function constructGiftUpgradedComponent(attribute: Api.StarGiftAttribute): GiftUpgradedComponent;
|
|
95
|
-
//# sourceMappingURL=
|
|
95
|
+
//# sourceMappingURL=3_gift_upgraded_component.d.ts.map
|
package/script/types/{2_gift_upgraded_component.d.ts.map → 3_gift_upgraded_component.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/3_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACnD,qBAAqB;IACrB,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,4BAA4B,GAAG,6BAA6B,GAAG,oCAAoC,CAAC;AAErK,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAAG,qBAAqB,CA+DtG"}
|
|
@@ -24,8 +24,8 @@ const _0_deps_js_1 = require("../0_deps.js");
|
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
26
|
const _file_id_js_1 = require("./_file_id.js");
|
|
27
|
-
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
28
27
|
const _1_sticker_js_1 = require("./1_sticker.js");
|
|
28
|
+
const _2_message_entity_js_1 = require("./2_message_entity.js");
|
|
29
29
|
function constructGiftUpgradedComponent(attribute) {
|
|
30
30
|
const name = "name" in attribute ? attribute.name : "";
|
|
31
31
|
const rarityLevel = "rarity_permille" in attribute ? attribute.rarity_permille : 0;
|
|
@@ -83,7 +83,7 @@ function constructGiftUpgradedComponent(attribute) {
|
|
|
83
83
|
recipientId: Number(attribute.recipient_id),
|
|
84
84
|
date: attribute.date,
|
|
85
85
|
message: attribute.message?.text,
|
|
86
|
-
entities: attribute.message ? attribute.message.entities.map(
|
|
86
|
+
entities: attribute.message ? attribute.message.entities.map(_2_message_entity_js_1.constructMessageEntity).filter((v) => !!v) : undefined,
|
|
87
87
|
});
|
|
88
88
|
default:
|
|
89
89
|
(0, _0_deps_js_1.unreachable)();
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import type { EntityGetter } from "./_getters.js";
|
|
22
21
|
import { type Location } from "./0_location.js";
|
|
23
|
-
import {
|
|
22
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
23
|
+
import { type User } from "./2_user.js";
|
|
24
24
|
/** An incoming inline query. */
|
|
25
25
|
export interface InlineQuery {
|
|
26
26
|
/** The identifier of the inline query. */
|
|
@@ -36,5 +36,5 @@ export interface InlineQuery {
|
|
|
36
36
|
/** The location of the user who made the inline query. */
|
|
37
37
|
location?: Location;
|
|
38
38
|
}
|
|
39
|
-
export declare function constructInlineQuery(query_: Api.updateBotInlineQuery,
|
|
40
|
-
//# sourceMappingURL=
|
|
39
|
+
export declare function constructInlineQuery(query_: Api.updateBotInlineQuery, getPeer: PeerGetter): InlineQuery;
|
|
40
|
+
//# sourceMappingURL=3_inline_query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/3_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAmCvG"}
|
|
@@ -23,13 +23,13 @@ exports.constructInlineQuery = constructInlineQuery;
|
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _0_location_js_1 = require("./0_location.js");
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
26
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
27
|
+
function constructInlineQuery(query_, getPeer) {
|
|
28
|
+
const peer = getPeer({ _: "peerUser", user_id: query_.user_id });
|
|
29
|
+
if (peer === null) {
|
|
30
30
|
(0, _0_deps_js_1.unreachable)();
|
|
31
31
|
}
|
|
32
|
-
const user = (0,
|
|
32
|
+
const user = (0, _2_user_js_1.constructUser2)(peer[0]);
|
|
33
33
|
let chatType;
|
|
34
34
|
if (query_.peer_type !== undefined) {
|
|
35
35
|
if (_2_tl_js_1.Api.is("inlineQueryPeerTypeSameBotPM", query_.peer_type)) {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { FileSource } from "./0_file_source.js";
|
|
21
|
-
import type { MessageEntity } from "./0_message_entity.js";
|
|
22
21
|
import type { ParseMode } from "./0_parse_mode.js";
|
|
23
22
|
import type { SelfDestructOption } from "./0_self_destruct_option.js";
|
|
23
|
+
import type { MessageEntity } from "./2_message_entity.js";
|
|
24
24
|
/** @unlisted */
|
|
25
25
|
export interface _InputMediaCommon {
|
|
26
26
|
/** The file name to assign if applicable. */
|
|
@@ -119,4 +119,4 @@ export interface InputMediaVideo extends _InputMediaCommon {
|
|
|
119
119
|
selfDestruct?: SelfDestructOption;
|
|
120
120
|
}
|
|
121
121
|
export type InputMedia = InputMediaAnimation | InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo;
|
|
122
|
-
//# sourceMappingURL=
|
|
122
|
+
//# sourceMappingURL=3_input_media.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_input_media.d.ts","sourceRoot":"","sources":["../../src/types/3_input_media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,eAAe,CAAC,EAAE,aAAa,EAAE,CAAC;IAClC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D;;;OAGG;IACH,SAAS,EAAE,UAAU,CAAC;IACtB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D;;;OAGG;IACH,QAAQ,EAAE,UAAU,CAAC;IACrB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC;AAED,gBAAgB;AAChB,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC;AAED,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,eAAe,GAAG,kBAAkB,GAAG,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
|
-
import type {
|
|
22
|
-
import { type User } from "./
|
|
21
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type User } from "./2_user.js";
|
|
23
23
|
/** A chat invite link. */
|
|
24
24
|
export interface InviteLink {
|
|
25
25
|
/** The link itself. */
|
|
@@ -43,5 +43,5 @@ export interface InviteLink {
|
|
|
43
43
|
/** The remaining duration (in seconds) until the subscription expires. */
|
|
44
44
|
subscriptionExpiresIn?: number;
|
|
45
45
|
}
|
|
46
|
-
export declare function constructInviteLink(inviteLink_: Api.chatInviteExported,
|
|
47
|
-
//# sourceMappingURL=
|
|
46
|
+
export declare function constructInviteLink(inviteLink_: Api.chatInviteExported, getPeer: PeerGetter): InviteLink;
|
|
47
|
+
//# sourceMappingURL=3_invite_link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_invite_link.d.ts","sourceRoot":"","sources":["../../src/types/3_invite_link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,0BAA0B;AAC1B,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,OAAO,EAAE,IAAI,CAAC;IACd,gGAAgG;IAChG,gBAAgB,EAAE,OAAO,CAAC;IAE1B,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CAyBxG"}
|
|
@@ -22,14 +22,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.constructInviteLink = constructInviteLink;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
25
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
26
|
+
function constructInviteLink(inviteLink_, getPeer) {
|
|
27
|
+
const peer = getPeer({ _: "peerUser", user_id: inviteLink_.admin_id });
|
|
28
|
+
if (!peer) {
|
|
29
29
|
(0, _0_deps_js_1.unreachable)();
|
|
30
30
|
}
|
|
31
31
|
const inviteLink = inviteLink_.link;
|
|
32
|
-
const creator = (0,
|
|
32
|
+
const creator = (0, _2_user_js_1.constructUser2)(peer[0]);
|
|
33
33
|
const requiresApproval = inviteLink_.request_needed ? true : false;
|
|
34
34
|
const revoked = inviteLink_.revoked ? true : false;
|
|
35
35
|
const title = inviteLink_.title;
|
|
@@ -17,11 +17,10 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import { Api } from "../2_tl.js";
|
|
21
|
-
import type { EntityGetter } from "./_getters.js";
|
|
20
|
+
import type { Api } from "../2_tl.js";
|
|
22
21
|
import { type Reaction } from "./0_reaction.js";
|
|
23
|
-
import {
|
|
24
|
-
import { type User } from "./
|
|
22
|
+
import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
23
|
+
import { type User } from "./2_user.js";
|
|
25
24
|
/** The reactions of a user to a messages in a group. */
|
|
26
25
|
export interface MessageReactions {
|
|
27
26
|
/** The chat containing the message the user reacted to. */
|
|
@@ -39,5 +38,5 @@ export interface MessageReactions {
|
|
|
39
38
|
/** The current reactions. */
|
|
40
39
|
newReactions: Reaction[];
|
|
41
40
|
}
|
|
42
|
-
export declare function constructMessageReactions(update: Api.updateBotMessageReaction,
|
|
43
|
-
//# sourceMappingURL=
|
|
41
|
+
export declare function constructMessageReactions(update: Api.updateBotMessageReaction, getPeer: PeerGetter): MessageReactions | null;
|
|
42
|
+
//# sourceMappingURL=3_message_reactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_message_reactions.d.ts","sourceRoot":"","sources":["../../src/types/3_message_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,IAAI,EAAE,KAAK,CAAC;IACZ,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,6FAA6F;IAC7F,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,6BAA6B;IAC7B,YAAY,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,EAAE,OAAO,EAAE,UAAU,GAAG,gBAAgB,GAAG,IAAI,CAkC5H"}
|
|
@@ -21,31 +21,29 @@
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructMessageReactions = constructMessageReactions;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
-
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
24
|
const _0_reaction_js_1 = require("./0_reaction.js");
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
async function constructMessageReactions(update, getEntity) {
|
|
25
|
+
const _2_user_js_1 = require("./2_user.js");
|
|
26
|
+
function constructMessageReactions(update, getPeer) {
|
|
29
27
|
const date = update.date;
|
|
30
28
|
const oldReactions = update.old_reactions.map((v) => (0, _0_reaction_js_1.constructReaction)(v));
|
|
31
29
|
const newReactions = update.new_reactions.map((v) => (0, _0_reaction_js_1.constructReaction)(v));
|
|
32
30
|
const messageId = update.msg_id;
|
|
33
|
-
let
|
|
34
|
-
if (!
|
|
31
|
+
let peer = getPeer(update.peer);
|
|
32
|
+
if (!peer) {
|
|
35
33
|
return null;
|
|
36
34
|
}
|
|
37
|
-
const chat =
|
|
35
|
+
const chat = peer[0];
|
|
38
36
|
let user = undefined;
|
|
39
37
|
let actorChat = undefined;
|
|
40
|
-
|
|
41
|
-
if (!
|
|
38
|
+
peer = getPeer(update.actor);
|
|
39
|
+
if (!peer) {
|
|
42
40
|
return null;
|
|
43
41
|
}
|
|
44
|
-
if (
|
|
45
|
-
user = (0,
|
|
42
|
+
if (peer[0].type === "private") {
|
|
43
|
+
user = (0, _2_user_js_1.constructUser2)(peer[0]);
|
|
46
44
|
}
|
|
47
45
|
else {
|
|
48
|
-
actorChat =
|
|
46
|
+
actorChat = peer[0];
|
|
49
47
|
}
|
|
50
48
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
51
49
|
chat,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
|
-
import { type MessageEntity } from "./
|
|
21
|
+
import { type MessageEntity } from "./2_message_entity.js";
|
|
22
22
|
/** A poll option. */
|
|
23
23
|
export interface PollOption {
|
|
24
24
|
/** The option's text (1-100 characters). */
|
|
@@ -31,4 +31,4 @@ export interface PollOption {
|
|
|
31
31
|
chosen: boolean;
|
|
32
32
|
}
|
|
33
33
|
export declare function constructPollOption(option: Api.PollAnswer, results: Array<Api.PollAnswerVoters>): PollOption;
|
|
34
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=3_poll_option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_poll_option.d.ts","sourceRoot":"","sources":["../../src/types/3_poll_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,qBAAqB;AACrB,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAQ5G"}
|