@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,13 +20,13 @@
|
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject, decodeText } from "../1_utilities.js";
|
|
22
22
|
import { constructOrderInfo } from "./1_order_info.js";
|
|
23
|
-
import {
|
|
24
|
-
export
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
23
|
+
import { constructUser2 } from "./2_user.js";
|
|
24
|
+
export function constructPreCheckoutQuery(query, getPeer) {
|
|
25
|
+
const peer = getPeer({ _: "peerUser", user_id: query.user_id });
|
|
26
|
+
if (!peer) {
|
|
27
27
|
unreachable();
|
|
28
28
|
}
|
|
29
|
-
const from =
|
|
29
|
+
const from = constructUser2(peer[0]);
|
|
30
30
|
return cleanObject({
|
|
31
31
|
id: String(query.query_id),
|
|
32
32
|
from,
|
|
@@ -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 reference to a specific part of a message that is being replied to. */
|
|
23
23
|
export interface ReplyQuote {
|
|
24
24
|
/** The byte offset of the quoted text. */
|
|
@@ -29,4 +29,4 @@ export interface ReplyQuote {
|
|
|
29
29
|
entities: MessageEntity[];
|
|
30
30
|
}
|
|
31
31
|
export declare function constructReplyQuote(quoteText: string | undefined, quoteOffset: number | undefined, quoteEntities: Api.MessageEntity[] | undefined): ReplyQuote;
|
|
32
|
-
//# sourceMappingURL=
|
|
32
|
+
//# sourceMappingURL=3_reply_quote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"3_reply_quote.d.ts","sourceRoot":"","sources":["../../src/types/3_reply_quote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,SAAS,GAAG,UAAU,CAS9J"}
|
|
@@ -17,7 +17,7 @@
|
|
|
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 { constructMessageEntity } from "./
|
|
20
|
+
import { constructMessageEntity } from "./2_message_entity.js";
|
|
21
21
|
export function constructReplyQuote(quoteText, quoteOffset, quoteEntities) {
|
|
22
22
|
quoteText ??= "";
|
|
23
23
|
quoteOffset ??= 0;
|
package/esm/types/3_story.d.ts
CHANGED
|
@@ -18,13 +18,12 @@
|
|
|
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 MessageEntity } from "./
|
|
23
|
-
import { type ChatP } from "./1_chat_p.js";
|
|
24
|
-
import { type StoryPrivacy } from "./1_story_privacy.js";
|
|
21
|
+
import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type MessageEntity } from "./2_message_entity.js";
|
|
25
23
|
import { type StoryContent } from "./2_story_content.js";
|
|
26
24
|
import { type StoryInteractions } from "./2_story_interactions.js";
|
|
27
25
|
import { type StoryInteractiveArea } from "./2_story_interactive_area.js";
|
|
26
|
+
import { type StoryPrivacy } from "./2_story_privacy.js";
|
|
28
27
|
/** A story. */
|
|
29
28
|
export interface Story {
|
|
30
29
|
out: boolean;
|
|
@@ -40,5 +39,5 @@ export interface Story {
|
|
|
40
39
|
caption?: string;
|
|
41
40
|
captionEntities?: MessageEntity[];
|
|
42
41
|
}
|
|
43
|
-
export declare function constructStory(story: Api.storyItem, peer: Api.peerUser | Api.peerChat | Api.peerChannel,
|
|
42
|
+
export declare function constructStory(story: Api.storyItem, peer: Api.peerUser | Api.peerChat | Api.peerChannel, getPeer: PeerGetter): Story;
|
|
44
43
|
//# sourceMappingURL=3_story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_story.d.ts","sourceRoot":"","sources":["../../src/types/3_story.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"3_story.d.ts","sourceRoot":"","sources":["../../src/types/3_story.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAiC,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACzG,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEhF,eAAe;AACf,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,aAAa,EAAE,CAAC;CACnC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,GAAG,KAAK,CA8BpI"}
|
package/esm/types/3_story.js
CHANGED
|
@@ -19,19 +19,18 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject } from "../1_utilities.js";
|
|
22
|
-
import { constructMessageEntity } from "./
|
|
23
|
-
import { constructChatP } from "./1_chat_p.js";
|
|
24
|
-
import { constructStoryPrivacy } from "./1_story_privacy.js";
|
|
22
|
+
import { constructMessageEntity } from "./2_message_entity.js";
|
|
25
23
|
import { constructStoryContent } from "./2_story_content.js";
|
|
26
24
|
import { constructStoryInteractions } from "./2_story_interactions.js";
|
|
27
25
|
import { constructStoryInteractiveArea } from "./2_story_interactive_area.js";
|
|
28
|
-
|
|
26
|
+
import { constructStoryPrivacy } from "./2_story_privacy.js";
|
|
27
|
+
export function constructStory(story, peer, getPeer) {
|
|
29
28
|
const id = story.id;
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
29
|
+
const peer_ = getPeer(peer);
|
|
30
|
+
if (!peer_) {
|
|
32
31
|
unreachable();
|
|
33
32
|
}
|
|
34
|
-
const chat =
|
|
33
|
+
const chat = peer_[0];
|
|
35
34
|
const date = story.date;
|
|
36
35
|
const interactiveAreas = (story.media_areas ?? []).map(constructStoryInteractiveArea);
|
|
37
36
|
const highlighted = story.pinned ? true : false;
|
|
@@ -18,11 +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 {
|
|
22
|
-
import { type
|
|
23
|
-
import { type
|
|
24
|
-
import { type
|
|
25
|
-
import { type InviteLink } from "./2_invite_link.js";
|
|
21
|
+
import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type User } from "./2_user.js";
|
|
23
|
+
import { type ChatMember } from "./3_chat_member.js";
|
|
24
|
+
import { type InviteLink } from "./3_invite_link.js";
|
|
26
25
|
/** Changes made to a chat member. */
|
|
27
26
|
export interface ChatMemberUpdated {
|
|
28
27
|
/** The chat in which the change was made. */
|
|
@@ -40,5 +39,5 @@ export interface ChatMemberUpdated {
|
|
|
40
39
|
/** Whether the user joined from a shared folder. */
|
|
41
40
|
viaSharedFolder?: boolean;
|
|
42
41
|
}
|
|
43
|
-
export declare function constructChatMemberUpdated(update: Api.updateChannelParticipant | Api.updateChatParticipant,
|
|
44
|
-
//# sourceMappingURL=
|
|
42
|
+
export declare function constructChatMemberUpdated(update: Api.updateChannelParticipant | Api.updateChatParticipant, getPeer: PeerGetter): ChatMemberUpdated;
|
|
43
|
+
//# sourceMappingURL=4_chat_member_updated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4_chat_member_updated.d.ts","sourceRoot":"","sources":["../../src/types/4_chat_member_updated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,IAAI,EAAE,KAAK,CAAC;IACZ,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,aAAa,EAAE,UAAU,CAAC;IAC1B,yCAAyC;IACzC,aAAa,EAAE,UAAU,CAAC;IAC1B,oCAAoC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,GAAG,GAAG,CAAC,qBAAqB,EAAE,OAAO,EAAE,UAAU,GAAG,iBAAiB,CA0BnJ"}
|
|
@@ -20,27 +20,26 @@
|
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject } from "../1_utilities.js";
|
|
22
22
|
import { Api } from "../2_tl.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
export async function constructChatMemberUpdated(update, getEntity) {
|
|
23
|
+
import { constructUser2 } from "./2_user.js";
|
|
24
|
+
import { constructChatMember } from "./3_chat_member.js";
|
|
25
|
+
import { constructInviteLink } from "./3_invite_link.js";
|
|
26
|
+
export function constructChatMemberUpdated(update, getPeer) {
|
|
28
27
|
if (!update.prev_participant && !update.new_participant) {
|
|
29
28
|
unreachable();
|
|
30
29
|
}
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
30
|
+
const peer = getPeer("channel_id" in update ? { channel_id: update.channel_id, _: "peerChannel" } : { chat_id: update.chat_id, _: "peerChat" });
|
|
31
|
+
const userPeer = getPeer({ _: "peerUser", user_id: update.actor_id });
|
|
32
|
+
if (!peer || !userPeer) {
|
|
34
33
|
unreachable();
|
|
35
34
|
}
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const from = constructUser(from_);
|
|
35
|
+
const chat = peer[0];
|
|
36
|
+
const from = constructUser2(userPeer[0]);
|
|
39
37
|
const date = update.date;
|
|
40
|
-
|
|
41
|
-
const
|
|
38
|
+
// TODO
|
|
39
|
+
const oldChatMember = constructChatMember(update.prev_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getPeer);
|
|
40
|
+
const newChatMember = constructChatMember(update.new_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getPeer);
|
|
42
41
|
const viaSharedFolder = "via_chatlist" in update ? update.via_chatlist ? true : update.invite ? false : undefined : undefined;
|
|
43
|
-
const inviteLink = (update.invite && Api.is("chatInviteExported", update.invite)) ?
|
|
42
|
+
const inviteLink = (update.invite && Api.is("chatInviteExported", update.invite)) ? constructInviteLink(update.invite, getPeer) : undefined;
|
|
44
43
|
return cleanObject({
|
|
45
44
|
chat,
|
|
46
45
|
from,
|
|
@@ -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 {
|
|
21
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
22
22
|
import { type Sticker } from "./1_sticker.js";
|
|
23
|
-
import { type User } from "./
|
|
24
|
-
import { type GiftUpgradedComponent } from "./
|
|
23
|
+
import { type User } from "./2_user.js";
|
|
24
|
+
import { type GiftUpgradedComponent } from "./3_gift_upgraded_component.js";
|
|
25
25
|
/**
|
|
26
26
|
* An non-upgraded gift.
|
|
27
27
|
*
|
|
@@ -88,7 +88,7 @@ export interface GiftUpgraded {
|
|
|
88
88
|
}
|
|
89
89
|
/** A gift. */
|
|
90
90
|
export type Gift = GiftNonUpgraded | GiftUpgraded;
|
|
91
|
-
export declare function constructGift(gift: Api.StarGift,
|
|
92
|
-
export declare function constructGiftUpgraded(gift: Api.starGiftUnique,
|
|
91
|
+
export declare function constructGift(gift: Api.StarGift, getPeer: PeerGetter): Gift;
|
|
92
|
+
export declare function constructGiftUpgraded(gift: Api.starGiftUnique, getPeer: PeerGetter): GiftUpgraded;
|
|
93
93
|
export declare function constructGiftNonUpgraded(gift: Api.starGift): Gift;
|
|
94
|
-
//# sourceMappingURL=
|
|
94
|
+
//# sourceMappingURL=4_gift.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"4_gift.d.ts","sourceRoot":"","sources":["../../src/types/4_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAkC,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5G;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,cAAc;AACd,MAAM,MAAM,IAAI,GAAG,eAAe,GAAG,YAAY,CAAC;AAElD,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAM3E;AACD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,GAAG,YAAY,CAgCjG;AACD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAqCjE"}
|
|
@@ -22,23 +22,23 @@ import { cleanObject } from "../1_utilities.js";
|
|
|
22
22
|
import { Api } from "../2_tl.js";
|
|
23
23
|
import { FileType, serializeFileId, toUniqueFileId } from "./_file_id.js";
|
|
24
24
|
import { constructSticker2 } from "./1_sticker.js";
|
|
25
|
-
import { constructUser } from "./
|
|
26
|
-
import { constructGiftUpgradedComponent } from "./
|
|
27
|
-
export
|
|
25
|
+
import { constructUser } from "./2_user.js";
|
|
26
|
+
import { constructGiftUpgradedComponent } from "./3_gift_upgraded_component.js";
|
|
27
|
+
export function constructGift(gift, getPeer) {
|
|
28
28
|
if (Api.is("starGiftUnique", gift)) {
|
|
29
|
-
return
|
|
29
|
+
return constructGiftUpgraded(gift, getPeer);
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
return constructGiftNonUpgraded(gift);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export function constructGiftUpgraded(gift, getPeer) {
|
|
36
36
|
const id = String(gift.id);
|
|
37
37
|
const title = gift.title;
|
|
38
38
|
const index = gift.num;
|
|
39
39
|
let owner;
|
|
40
40
|
if (gift.owner_id) {
|
|
41
|
-
const entity =
|
|
41
|
+
const entity = getPeer(gift.owner_id);
|
|
42
42
|
if (Api.is("user", entity)) {
|
|
43
43
|
owner = constructUser(entity);
|
|
44
44
|
}
|
|
@@ -49,7 +49,7 @@ export async function constructGiftUpgraded(gift, getEntity) {
|
|
|
49
49
|
const maxUpgrades = gift.availability_total;
|
|
50
50
|
const components = gift.attributes.map(constructGiftUpgradedComponent);
|
|
51
51
|
const address = gift.gift_address;
|
|
52
|
-
const price = gift.
|
|
52
|
+
const price = gift.resell_amount !== undefined ? Number(gift.resell_amount) : undefined;
|
|
53
53
|
return cleanObject({
|
|
54
54
|
type: "upgraded",
|
|
55
55
|
id,
|
|
@@ -18,10 +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 {
|
|
22
|
-
import { type
|
|
23
|
-
import { type
|
|
24
|
-
import { type InviteLink } from "./2_invite_link.js";
|
|
21
|
+
import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type User } from "./2_user.js";
|
|
23
|
+
import { type InviteLink } from "./3_invite_link.js";
|
|
25
24
|
/** A join request. */
|
|
26
25
|
export interface JoinRequest {
|
|
27
26
|
/** The chat that the user requested to join. */
|
|
@@ -35,6 +34,6 @@ export interface JoinRequest {
|
|
|
35
34
|
/** The invite link that the user used to make the join request. Bot-only. */
|
|
36
35
|
inviteLink?: InviteLink;
|
|
37
36
|
}
|
|
38
|
-
export declare function constructJoinRequest(update: Api.updateBotChatInviteRequester,
|
|
39
|
-
export declare function constructJoinRequest2(peer: Api.Peer, inviteImporter: Api.ChatInviteImporter,
|
|
40
|
-
//# sourceMappingURL=
|
|
37
|
+
export declare function constructJoinRequest(update: Api.updateBotChatInviteRequester, getPeer: PeerGetter): JoinRequest;
|
|
38
|
+
export declare function constructJoinRequest2(peer: Api.Peer, inviteImporter: Api.ChatInviteImporter, getPeer: PeerGetter): JoinRequest;
|
|
39
|
+
//# sourceMappingURL=4_join_request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4_join_request.d.ts","sourceRoot":"","sources":["../../src/types/4_join_request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,sBAAsB;AACtB,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,IAAI,EAAE,KAAK,CAAC;IACZ,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,4BAA4B,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAmB/G;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,kBAAkB,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAiB9H"}
|
|
@@ -20,21 +20,20 @@
|
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject } from "../1_utilities.js";
|
|
22
22
|
import { Api } from "../2_tl.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (!chat_) {
|
|
23
|
+
import { constructUser2 } from "./2_user.js";
|
|
24
|
+
import { constructInviteLink } from "./3_invite_link.js";
|
|
25
|
+
export function constructJoinRequest(update, getPeer) {
|
|
26
|
+
const peer = getPeer(update.peer);
|
|
27
|
+
if (!peer) {
|
|
29
28
|
unreachable();
|
|
30
29
|
}
|
|
31
|
-
const chat =
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
30
|
+
const chat = peer[0];
|
|
31
|
+
const userPeer = getPeer({ _: "peerUser", user_id: update.user_id });
|
|
32
|
+
if (!userPeer) {
|
|
34
33
|
unreachable();
|
|
35
34
|
}
|
|
36
|
-
const from =
|
|
37
|
-
const inviteLink = update.invite && Api.is("chatInviteExported", update.invite) ?
|
|
35
|
+
const from = constructUser2(userPeer[0]);
|
|
36
|
+
const inviteLink = update.invite && Api.is("chatInviteExported", update.invite) ? constructInviteLink(update.invite, getPeer) : undefined;
|
|
38
37
|
return cleanObject({
|
|
39
38
|
chat,
|
|
40
39
|
from,
|
|
@@ -43,17 +42,17 @@ export async function constructJoinRequest(update, getEntity) {
|
|
|
43
42
|
inviteLink,
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
|
-
export
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
45
|
+
export function constructJoinRequest2(peer, inviteImporter, getPeer) {
|
|
46
|
+
const peer_ = getPeer(peer);
|
|
47
|
+
if (!peer_) {
|
|
49
48
|
unreachable();
|
|
50
49
|
}
|
|
51
|
-
const chat =
|
|
52
|
-
const
|
|
53
|
-
if (!
|
|
50
|
+
const chat = peer_[0];
|
|
51
|
+
const userPeer = getPeer({ _: "peerUser", user_id: inviteImporter.user_id });
|
|
52
|
+
if (!userPeer) {
|
|
54
53
|
unreachable();
|
|
55
54
|
}
|
|
56
|
-
const from =
|
|
55
|
+
const from = constructUser2(userPeer[0]);
|
|
57
56
|
return cleanObject({
|
|
58
57
|
chat,
|
|
59
58
|
from,
|
|
@@ -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 MessageEntity } from "./
|
|
22
|
-
import { type PollOption } from "./
|
|
21
|
+
import { type MessageEntity } from "./2_message_entity.js";
|
|
22
|
+
import { type PollOption } from "./3_poll_option.js";
|
|
23
23
|
/** A poll. */
|
|
24
24
|
export interface Poll {
|
|
25
25
|
/** The identifier of the poll. */
|
|
@@ -52,4 +52,4 @@ export interface Poll {
|
|
|
52
52
|
closeDate?: number;
|
|
53
53
|
}
|
|
54
54
|
export declare function constructPoll(media_: Api.messageMediaPoll): Poll;
|
|
55
|
-
//# sourceMappingURL=
|
|
55
|
+
//# sourceMappingURL=4_poll.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"4_poll.d.ts","sourceRoot":"","sources":["../../src/types/4_poll.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,gBAAgB,EAAE,aAAa,EAAE,CAAC;IAClC,0BAA0B;IAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,6DAA6D;IAC7D,eAAe,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,gDAAgD;IAChD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,mBAAmB,CAAC,EAAE,aAAa,EAAE,CAAC;IACtC,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAoBhE"}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { cleanObject } from "../1_utilities.js";
|
|
21
|
-
import { constructMessageEntity } from "./
|
|
22
|
-
import { constructPollOption } from "./
|
|
21
|
+
import { constructMessageEntity } from "./2_message_entity.js";
|
|
22
|
+
import { constructPollOption } from "./3_poll_option.js";
|
|
23
23
|
export function constructPoll(media_) {
|
|
24
24
|
const poll = media_.poll;
|
|
25
25
|
const correctOption = media_.results.results?.find((v) => v.correct)?.option;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { ID } from "./0_id.js";
|
|
21
|
-
import type { ReplyQuote } from "./
|
|
21
|
+
import type { ReplyQuote } from "./3_reply_quote.js";
|
|
22
22
|
/** @unlisted */
|
|
23
23
|
export interface ReplyToMessage {
|
|
24
24
|
/** @discriminator */
|
|
@@ -32,4 +32,4 @@ export interface ReplyToStory {
|
|
|
32
32
|
storyId: number;
|
|
33
33
|
}
|
|
34
34
|
export type ReplyTo = ReplyToMessage | ReplyToStory;
|
|
35
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=4_reply_to.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"4_reply_to.d.ts","sourceRoot":"","sources":["../../src/types/4_reply_to.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,gBAAgB;AAChB,MAAM,WAAW,cAAc;IAC7B,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,EAAE,CAAC;IACX,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC"}
|
|
@@ -18,10 +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
|
|
22
|
-
import { type MessageEntity } from "./
|
|
23
|
-
import { type
|
|
24
|
-
import { type Gift } from "./3_gift.js";
|
|
21
|
+
import { type ChatP, type PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type MessageEntity } from "./2_message_entity.js";
|
|
23
|
+
import { type Gift } from "./4_gift.js";
|
|
25
24
|
/** A gift claimed by a user or a channel. */
|
|
26
25
|
export interface ClaimedGift {
|
|
27
26
|
/** The time when the gift was claimed. */
|
|
@@ -41,5 +40,5 @@ export interface ClaimedGift {
|
|
|
41
40
|
/** The amount of stars the gift would be worth. */
|
|
42
41
|
convertionStars?: number;
|
|
43
42
|
}
|
|
44
|
-
export declare function constructClaimedGift(savedStarGift: Api.SavedStarGift, fromPeer: Api.User | Api.Chat | undefined,
|
|
45
|
-
//# sourceMappingURL=
|
|
43
|
+
export declare function constructClaimedGift(savedStarGift: Api.SavedStarGift, fromPeer: Api.User | Api.Chat | undefined, getPeer: PeerGetter): ClaimedGift;
|
|
44
|
+
//# sourceMappingURL=5_claimed_gift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5_claimed_gift.d.ts","sourceRoot":"","sources":["../../src/types/5_claimed_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,4CAA4C;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAsBlJ"}
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject } from "../1_utilities.js";
|
|
22
22
|
import { Api } from "../2_tl.js";
|
|
23
|
-
import { constructMessageEntity } from "./0_message_entity.js";
|
|
24
23
|
import { constructChatP } from "./1_chat_p.js";
|
|
25
|
-
import {
|
|
26
|
-
|
|
24
|
+
import { constructMessageEntity } from "./2_message_entity.js";
|
|
25
|
+
import { constructGift } from "./4_gift.js";
|
|
26
|
+
export function constructClaimedGift(savedStarGift, fromPeer, getPeer) {
|
|
27
27
|
if (fromPeer && !Api.isOneOf(["user", "chat", "channel"], fromPeer)) {
|
|
28
28
|
unreachable();
|
|
29
29
|
}
|
|
30
|
-
const gift =
|
|
30
|
+
const gift = constructGift(savedStarGift.gift, getPeer);
|
|
31
31
|
const date = savedStarGift.date;
|
|
32
32
|
const public_ = !!savedStarGift.unsaved;
|
|
33
33
|
const sender = fromPeer ? constructChatP(fromPeer) : undefined;
|
|
@@ -18,11 +18,11 @@
|
|
|
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 Audio } from "./1_audio.js";
|
|
22
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
23
23
|
import { type Document } from "./1_document.js";
|
|
24
24
|
import { type Photo } from "./1_photo.js";
|
|
25
|
-
import { type Gift } from "./
|
|
25
|
+
import { type Gift } from "./4_gift.js";
|
|
26
26
|
/**
|
|
27
27
|
* A link preview to be passed as an input.
|
|
28
28
|
* @unlisted
|
|
@@ -184,5 +184,5 @@ export interface LinkPreviewGift extends _LinkPreviewLoadedBase {
|
|
|
184
184
|
*/
|
|
185
185
|
export type LinkPreviewLoaded = LinkPreviewUnknown | LinkPreviewPhoto | LinkPreviewEmbeddedVideo | LinkPreviewExternalVideo | LinkPreviewVideo | LinkPreviewEmbeddedAudio | LinkPreviewExternalAudio | LinkPreviewAudio | LinkPreviewGift;
|
|
186
186
|
export type LinkPreview = InputLinkPreview | LinkPreviewLoading | LinkPreviewNotLoaded | LinkPreviewLoaded;
|
|
187
|
-
export declare function constructLinkPreview(media: Api.messageMediaWebPage, invert: boolean | undefined,
|
|
188
|
-
//# sourceMappingURL=
|
|
187
|
+
export declare function constructLinkPreview(media: Api.messageMediaWebPage, invert: boolean | undefined, getPeer: PeerGetter): LinkPreview;
|
|
188
|
+
//# sourceMappingURL=5_link_preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"5_link_preview.d.ts","sourceRoot":"","sources":["../../src/types/5_link_preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,KAAK,EAAkB,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,qBAAqB;IACrB,IAAI,EAAE,WAAW,CAAC;IAClB,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AAEH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAChE,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;GAGG;AAEH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AAEH,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AAEH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,qBAAqB;IACrB,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED;;;GAGG;AAEH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,qBAAqB;IACrB,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,qBAAqB;IACrB,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,qBAAqB;IACrB,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB,kBAAkB,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,wBAAwB,GACxB,gBAAgB,GAChB,wBAAwB,GACxB,wBAAwB,GACxB,gBAAgB,GAChB,eAAe,CAAC;AAEpB,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;AAE3G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,mBAAmB,EAAE,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CA4LlI"}
|
|
@@ -24,8 +24,8 @@ import { FileType, serializeFileId, toUniqueFileId } from "./_file_id.js";
|
|
|
24
24
|
import { constructAudio } from "./1_audio.js";
|
|
25
25
|
import { constructDocument } from "./1_document.js";
|
|
26
26
|
import { constructPhoto } from "./1_photo.js";
|
|
27
|
-
import { constructGift } from "./
|
|
28
|
-
export
|
|
27
|
+
import { constructGift } from "./4_gift.js";
|
|
28
|
+
export function constructLinkPreview(media, invert, getPeer) {
|
|
29
29
|
if (Api.is("webPageNotModified", media.webpage)) {
|
|
30
30
|
unreachable();
|
|
31
31
|
}
|
|
@@ -208,7 +208,7 @@ export async function constructLinkPreview(media, invert, getEntity) {
|
|
|
208
208
|
smallMedia,
|
|
209
209
|
largeMedia,
|
|
210
210
|
aboveText,
|
|
211
|
-
gift:
|
|
211
|
+
gift: constructGift(gift, getPeer),
|
|
212
212
|
};
|
|
213
213
|
break;
|
|
214
214
|
}
|
|
@@ -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 {
|
|
22
|
-
import { type ClaimedGift } from "./
|
|
21
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
22
|
+
import { type ClaimedGift } from "./5_claimed_gift.js";
|
|
23
23
|
/** Gifts claimed by a user or a channel. */
|
|
24
24
|
export interface ClaimedGifts {
|
|
25
25
|
/** The number of all gifts claimed by the user. */
|
|
@@ -29,5 +29,5 @@ export interface ClaimedGifts {
|
|
|
29
29
|
/** Gifts claimed by the user. */
|
|
30
30
|
gifts: ClaimedGift[];
|
|
31
31
|
}
|
|
32
|
-
export declare function constructClaimedGifts(savedStarGifts: Api.payments_SavedStarGifts,
|
|
33
|
-
//# sourceMappingURL=
|
|
32
|
+
export declare function constructClaimedGifts(savedStarGifts: Api.payments_SavedStarGifts, getPeer: PeerGetter): ClaimedGifts;
|
|
33
|
+
//# sourceMappingURL=6_claimed_gifts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6_claimed_gifts.d.ts","sourceRoot":"","sources":["../../src/types/6_claimed_gifts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AAE7E,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,GAAG,CAAC,uBAAuB,EAAE,OAAO,EAAE,UAAU,GAAG,YAAY,CAiBpH"}
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { cleanObject } from "../1_utilities.js";
|
|
21
21
|
import { Api } from "../2_tl.js";
|
|
22
|
-
import { constructClaimedGift } from "./
|
|
23
|
-
export
|
|
22
|
+
import { constructClaimedGift } from "./5_claimed_gift.js";
|
|
23
|
+
export function constructClaimedGifts(savedStarGifts, getPeer) {
|
|
24
24
|
return cleanObject({
|
|
25
25
|
all: savedStarGifts.count,
|
|
26
26
|
offset: savedStarGifts.next_offset,
|
|
27
|
-
gifts:
|
|
27
|
+
gifts: savedStarGifts.gifts.map((v) => {
|
|
28
28
|
const fromId = v.from_id;
|
|
29
29
|
if (Api.is("peerUser", fromId)) {
|
|
30
30
|
return [v, savedStarGifts.users.find((u) => Api.is("user", u) && u.id === fromId.user_id)];
|
|
@@ -38,6 +38,6 @@ export async function constructClaimedGifts(savedStarGifts, getEntity) {
|
|
|
38
38
|
else {
|
|
39
39
|
return [v, undefined];
|
|
40
40
|
}
|
|
41
|
-
}).map((v) => constructClaimedGift(v[0], v[1],
|
|
41
|
+
}).map((v) => constructClaimedGift(v[0], v[1], getPeer)),
|
|
42
42
|
});
|
|
43
43
|
}
|