@mtkruto/node 0.62.1 → 0.63.0
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/2_tl.d.ts +6 -6
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +6 -6
- package/esm/3_errors.d.ts +1 -2
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +2 -1
- package/esm/4_constants.d.ts +0 -1
- package/esm/4_constants.d.ts.map +1 -1
- package/esm/4_constants.js +0 -1
- package/esm/4_errors.d.ts +2 -2
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/4_session.d.ts +24 -0
- package/esm/4_session.d.ts.map +1 -0
- package/esm/4_session.js +23 -0
- package/esm/5_client.d.ts +1 -1
- package/esm/5_client.js +1 -1
- package/esm/client/0_client_abstract.d.ts +28 -26
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +16 -88
- package/esm/client/0_params.d.ts +5 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +2 -2
- package/esm/client/0_storage_operations.d.ts +4 -4
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +14 -14
- package/esm/client/0_update_processor.d.ts +19 -0
- package/esm/client/0_update_processor.d.ts.map +1 -1
- package/esm/client/0_update_processor.js +19 -0
- package/esm/client/0_utilities.d.ts +6 -2
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +21 -23
- package/esm/client/1_client_plain.d.ts +9 -6
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +26 -41
- package/esm/client/1_types.d.ts +4 -23
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +10 -10
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +4 -4
- package/esm/client/2_client_encrypted.d.ts +58 -0
- package/esm/client/2_client_encrypted.d.ts.map +1 -0
- package/esm/client/2_client_encrypted.js +265 -0
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +54 -74
- package/esm/client/2_network_statistics_manager.d.ts +1 -1
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_network_statistics_manager.js +3 -3
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +3 -3
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +10 -10
- package/esm/client/2_translations_manager.d.ts +19 -0
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +24 -5
- package/esm/client/2_update_manager.d.ts +4 -4
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +69 -79
- package/esm/client/3_client_encrypted_pool.d.ts +30 -0
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/esm/client/3_client_encrypted_pool.js +70 -0
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +96 -70
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +15 -20
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +2 -2
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +33 -33
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +25 -25
- package/esm/client/4_gift_manager.js +2 -2
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +4 -4
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +5 -5
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +10 -10
- package/esm/client/5_client.d.ts +3 -9
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +290 -306
- package/esm/connection/0_connection.d.ts +5 -4
- package/esm/connection/0_connection.d.ts.map +1 -1
- package/esm/connection/1_connection_web_socket.js +2 -2
- package/esm/mod.d.ts +1 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/{script/tl/2_tl_reader.d.ts → esm/session/0_session_error.d.ts} +4 -7
- package/esm/session/0_session_error.d.ts.map +1 -0
- package/esm/{tl/2_tl_reader.d.ts → session/0_session_error.js} +5 -7
- package/esm/{tl/2_tl_writer.d.ts → session/0_session_state.d.ts} +7 -5
- package/esm/session/0_session_state.d.ts.map +1 -0
- package/esm/session/0_session_state.js +77 -0
- package/esm/session/1_session.d.ts +31 -0
- package/esm/session/1_session.d.ts.map +1 -0
- package/esm/session/1_session.js +149 -0
- package/esm/session/2_session_encrypted.d.ts +40 -0
- package/esm/session/2_session_encrypted.d.ts.map +1 -0
- package/esm/session/2_session_encrypted.js +416 -0
- package/esm/session/2_session_plain.d.ts +25 -0
- package/esm/session/2_session_plain.d.ts.map +1 -0
- package/esm/session/2_session_plain.js +56 -0
- package/esm/tl/0_tl_error.d.ts +22 -0
- package/esm/tl/0_tl_error.d.ts.map +1 -0
- package/esm/tl/0_tl_error.js +21 -0
- package/esm/tl/0_types.d.ts +25 -0
- package/esm/tl/0_types.d.ts.map +1 -0
- package/esm/tl/0_types.js +20 -0
- package/esm/tl/0_utilities.d.ts +32 -0
- package/esm/tl/0_utilities.d.ts.map +1 -0
- package/esm/tl/0_utilities.js +51 -0
- package/esm/tl/0_utilities_test.d.ts.map +1 -0
- package/esm/tl/1_mtproto_api.d.ts +371 -0
- package/esm/tl/1_mtproto_api.d.ts.map +1 -0
- package/esm/tl/1_mtproto_api.js +416 -0
- package/esm/tl/{0_api.d.ts → 1_telegram_api.d.ts} +23 -340
- package/esm/tl/1_telegram_api.d.ts.map +1 -0
- package/esm/tl/{0_api.js → 1_telegram_api.js} +4945 -11109
- package/{script/tl/0_tl_raw_reader.d.ts → esm/tl/1_tl_reader.d.ts} +5 -2
- package/esm/tl/1_tl_reader.d.ts.map +1 -0
- package/esm/tl/{2_tl_reader.js → 1_tl_reader.js} +107 -40
- package/esm/tl/1_tl_reader_test.d.ts.map +1 -0
- package/esm/tl/{0_tl_raw_writer.d.ts → 1_tl_writer.d.ts} +5 -2
- package/esm/tl/1_tl_writer.d.ts.map +1 -0
- package/esm/tl/{2_tl_writer.js → 1_tl_writer.js} +80 -23
- package/esm/tl/1_tl_writer_test.d.ts.map +1 -0
- package/esm/tl/1_utilities.d.ts +9 -24
- package/esm/tl/1_utilities.d.ts.map +1 -1
- package/esm/tl/1_utilities.js +18 -64
- package/esm/tl/2_message.d.ts +2 -2
- package/esm/tl/2_message.d.ts.map +1 -1
- package/esm/tl/2_message.js +7 -7
- package/esm/tl/2_mtproto.d.ts +33 -0
- package/esm/tl/2_mtproto.d.ts.map +1 -0
- package/esm/tl/2_mtproto.js +53 -0
- package/{script/tl/2_utilities.d.ts → esm/tl/2_telegram.d.ts} +16 -2
- package/esm/tl/2_telegram.d.ts.map +1 -0
- package/esm/tl/{2_utilities.js → 2_telegram.js} +46 -1
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.d.ts.map +1 -1
- package/esm/types/0_chat_photo.d.ts.map +1 -1
- package/esm/types/0_chat_photo.js +2 -2
- package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.js +3 -3
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_location.js +5 -5
- package/esm/types/0_message_entity.d.ts.map +1 -1
- package/esm/types/0_message_entity.js +20 -20
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_reaction.js +4 -4
- package/esm/types/0_slow_mode_duration.d.ts +19 -0
- package/esm/types/0_slow_mode_duration.d.ts.map +1 -1
- package/esm/types/0_slow_mode_duration.js +19 -0
- package/esm/types/0_thumbnail.d.ts.map +1 -1
- package/esm/types/0_thumbnail.js +3 -3
- package/esm/types/0_translation.d.ts +19 -0
- package/esm/types/0_translation.d.ts.map +1 -1
- package/esm/types/0_translation.js +22 -3
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/0_video_chat.js +2 -2
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_animation.js +2 -2
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_audio.js +2 -2
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.js +2 -2
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +6 -6
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_document.js +2 -2
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +10 -10
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +6 -6
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_photo.js +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +8 -8
- package/esm/types/1_story_privacy.d.ts.map +1 -1
- package/esm/types/1_story_privacy.js +7 -7
- package/esm/types/1_user.d.ts.map +1 -1
- package/esm/types/1_user.js +2 -2
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_venue.js +2 -2
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video.js +2 -2
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/1_video_note.js +2 -2
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +8 -8
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +10 -10
- package/esm/types/2_chat_settings.d.ts +19 -0
- package/esm/types/2_chat_settings.d.ts.map +1 -1
- package/esm/types/2_chat_settings.js +21 -2
- package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
- package/esm/types/2_chosen_inline_result.js +4 -4
- package/esm/types/2_game.d.ts.map +1 -1
- package/esm/types/2_game.js +4 -4
- package/esm/types/2_gift_upgraded_component.d.ts.map +1 -1
- package/esm/types/2_gift_upgraded_component.js +3 -3
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_inactive_chat.js +2 -2
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +10 -10
- package/esm/types/2_inline_query.d.ts.map +1 -1
- package/esm/types/2_inline_query.js +7 -7
- package/esm/types/2_message_reactions.d.ts.map +1 -1
- package/esm/types/2_message_reactions.js +2 -2
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_content.js +6 -6
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +9 -9
- package/esm/types/3_chat_member_updated.d.ts.map +1 -1
- package/esm/types/3_chat_member_updated.js +2 -2
- package/esm/types/3_gift.d.ts.map +1 -1
- package/esm/types/3_gift.js +3 -3
- package/esm/types/3_join_request.d.ts.map +1 -1
- package/esm/types/3_join_request.js +2 -2
- package/esm/types/3_reply_markup.d.ts.map +1 -1
- package/esm/types/3_reply_markup.js +5 -5
- package/esm/types/4_claimed_gift.d.ts.map +1 -1
- package/esm/types/4_claimed_gift.js +2 -2
- package/esm/types/4_inline_query_result.d.ts.map +1 -1
- package/esm/types/4_inline_query_result.js +14 -14
- package/esm/types/4_message.d.ts.map +1 -1
- package/esm/types/4_message.js +57 -57
- package/esm/types/5_callback_query.d.ts.map +1 -1
- package/esm/types/5_callback_query.js +6 -7
- package/esm/types/5_chat_list_item.d.ts.map +1 -1
- package/esm/types/5_chat_list_item.js +5 -5
- package/esm/types/5_claimed_gifts.d.ts.map +1 -1
- package/esm/types/5_claimed_gifts.js +6 -6
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +3 -3
- package/package.json +1 -1
- package/script/2_tl.d.ts +6 -6
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +11 -11
- package/script/3_errors.d.ts +1 -2
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +2 -1
- package/script/4_constants.d.ts +0 -1
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_constants.js +1 -2
- package/script/4_errors.d.ts +2 -2
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_session.d.ts +24 -0
- package/script/4_session.d.ts.map +1 -0
- package/script/4_session.js +39 -0
- package/script/5_client.d.ts +1 -1
- package/script/5_client.js +1 -1
- package/script/client/0_client_abstract.d.ts +28 -26
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +18 -113
- package/script/client/0_params.d.ts +5 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +1 -1
- package/script/client/0_storage_operations.d.ts +4 -4
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +13 -13
- package/script/client/0_update_processor.d.ts +19 -0
- package/script/client/0_update_processor.d.ts.map +1 -1
- package/script/client/0_update_processor.js +19 -0
- package/script/client/0_utilities.d.ts +6 -2
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +22 -24
- package/script/client/1_client_plain.d.ts +9 -6
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +25 -40
- package/script/client/1_types.d.ts +4 -23
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.js +9 -9
- 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 +58 -0
- package/script/client/2_client_encrypted.d.ts.map +1 -0
- package/script/client/2_client_encrypted.js +269 -0
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +52 -72
- package/script/client/2_network_statistics_manager.d.ts +1 -1
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_network_statistics_manager.js +3 -3
- 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.map +1 -1
- package/script/client/2_reaction_manager.js +9 -9
- package/script/client/2_translations_manager.d.ts +19 -0
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +23 -4
- package/script/client/2_update_manager.d.ts +4 -4
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +68 -78
- package/script/client/3_client_encrypted_pool.d.ts +30 -0
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/script/client/3_client_encrypted_pool.js +74 -0
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +95 -69
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +14 -19
- 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.map +1 -1
- package/script/client/4_chat_list_manager.js +32 -32
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +24 -24
- package/script/client/4_gift_manager.js +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_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +4 -4
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +9 -9
- package/script/client/5_client.d.ts +3 -9
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +284 -300
- package/script/connection/0_connection.d.ts +5 -4
- package/script/connection/0_connection.d.ts.map +1 -1
- package/script/connection/1_connection_web_socket.js +2 -2
- package/script/mod.d.ts +1 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -2
- package/script/session/0_session_error.d.ts +24 -0
- package/script/session/0_session_error.d.ts.map +1 -0
- package/script/session/0_session_error.js +29 -0
- package/script/{tl/2_tl_writer.d.ts → session/0_session_state.d.ts} +7 -5
- package/script/session/0_session_state.d.ts.map +1 -0
- package/script/session/0_session_state.js +81 -0
- package/script/session/1_session.d.ts +31 -0
- package/script/session/1_session.d.ts.map +1 -0
- package/script/session/1_session.js +176 -0
- package/script/session/2_session_encrypted.d.ts +40 -0
- package/script/session/2_session_encrypted.d.ts.map +1 -0
- package/script/session/2_session_encrypted.js +420 -0
- package/script/session/2_session_plain.d.ts +25 -0
- package/script/session/2_session_plain.d.ts.map +1 -0
- package/script/session/2_session_plain.js +60 -0
- package/script/tl/0_tl_error.d.ts +22 -0
- package/script/tl/0_tl_error.d.ts.map +1 -0
- package/script/tl/0_tl_error.js +25 -0
- package/script/tl/0_types.d.ts +25 -0
- package/script/tl/0_types.d.ts.map +1 -0
- package/script/tl/0_types.js +21 -0
- package/script/tl/0_utilities.d.ts +32 -0
- package/script/tl/0_utilities.d.ts.map +1 -0
- package/script/tl/0_utilities.js +59 -0
- package/script/tl/0_utilities_test.d.ts.map +1 -0
- package/script/tl/1_mtproto_api.d.ts +371 -0
- package/script/tl/1_mtproto_api.d.ts.map +1 -0
- package/script/tl/1_mtproto_api.js +419 -0
- package/script/tl/{0_api.d.ts → 1_telegram_api.d.ts} +23 -340
- package/script/tl/1_telegram_api.d.ts.map +1 -0
- package/script/tl/{0_api.js → 1_telegram_api.js} +4947 -11134
- package/{esm/tl/0_tl_raw_reader.d.ts → script/tl/1_tl_reader.d.ts} +5 -2
- package/script/tl/1_tl_reader.d.ts.map +1 -0
- package/script/tl/1_tl_reader.js +218 -0
- package/script/tl/1_tl_reader_test.d.ts.map +1 -0
- package/script/tl/{0_tl_raw_writer.d.ts → 1_tl_writer.d.ts} +5 -2
- package/script/tl/1_tl_writer.d.ts.map +1 -0
- package/script/tl/{2_tl_writer.js → 1_tl_writer.js} +102 -45
- package/script/tl/1_tl_writer_test.d.ts.map +1 -0
- package/script/tl/1_utilities.d.ts +9 -24
- package/script/tl/1_utilities.d.ts.map +1 -1
- package/script/tl/1_utilities.js +19 -72
- package/script/tl/2_message.d.ts +2 -2
- package/script/tl/2_message.d.ts.map +1 -1
- package/script/tl/2_message.js +7 -7
- package/script/tl/2_mtproto.d.ts +33 -0
- package/script/tl/2_mtproto.d.ts.map +1 -0
- package/script/tl/2_mtproto.js +78 -0
- package/{esm/tl/2_utilities.d.ts → script/tl/2_telegram.d.ts} +16 -2
- package/script/tl/2_telegram.d.ts.map +1 -0
- package/script/tl/2_telegram.js +167 -0
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/types/0_chat_photo.d.ts.map +1 -1
- package/script/types/0_chat_photo.js +1 -1
- package/script/types/0_giveaway_parameters.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.js +2 -2
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_location.js +4 -4
- package/script/types/0_message_entity.d.ts.map +1 -1
- package/script/types/0_message_entity.js +19 -19
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_reaction.js +3 -3
- package/script/types/0_slow_mode_duration.d.ts +19 -0
- package/script/types/0_slow_mode_duration.d.ts.map +1 -1
- package/script/types/0_slow_mode_duration.js +19 -0
- package/script/types/0_thumbnail.d.ts.map +1 -1
- package/script/types/0_thumbnail.js +2 -2
- package/script/types/0_translation.d.ts +19 -0
- package/script/types/0_translation.d.ts.map +1 -1
- package/script/types/0_translation.js +21 -2
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/0_video_chat.js +1 -1
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_animation.js +1 -1
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_audio.js +1 -1
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.js +1 -1
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +5 -5
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_document.js +1 -1
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +9 -9
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +5 -5
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_photo.js +2 -2
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +7 -7
- package/script/types/1_story_privacy.d.ts.map +1 -1
- package/script/types/1_story_privacy.js +6 -6
- package/script/types/1_user.d.ts.map +1 -1
- package/script/types/1_user.js +1 -1
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_venue.js +1 -1
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video.js +1 -1
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/1_video_note.js +1 -1
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +7 -7
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +9 -9
- package/script/types/2_chat_settings.d.ts +19 -0
- package/script/types/2_chat_settings.d.ts.map +1 -1
- package/script/types/2_chat_settings.js +20 -1
- package/script/types/2_chosen_inline_result.d.ts.map +1 -1
- package/script/types/2_chosen_inline_result.js +3 -3
- package/script/types/2_game.d.ts.map +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_gift_upgraded_component.d.ts.map +1 -1
- package/script/types/2_gift_upgraded_component.js +2 -2
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_inactive_chat.js +1 -1
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +9 -9
- package/script/types/2_inline_query.d.ts.map +1 -1
- package/script/types/2_inline_query.js +6 -6
- package/script/types/2_message_reactions.d.ts.map +1 -1
- package/script/types/2_message_reactions.js +1 -1
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_content.js +5 -5
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +8 -8
- package/script/types/3_chat_member_updated.d.ts.map +1 -1
- package/script/types/3_chat_member_updated.js +1 -1
- package/script/types/3_gift.d.ts.map +1 -1
- package/script/types/3_gift.js +2 -2
- package/script/types/3_join_request.d.ts.map +1 -1
- package/script/types/3_join_request.js +1 -1
- package/script/types/3_reply_markup.d.ts.map +1 -1
- package/script/types/3_reply_markup.js +4 -4
- package/script/types/4_claimed_gift.d.ts.map +1 -1
- package/script/types/4_claimed_gift.js +1 -1
- package/script/types/4_inline_query_result.d.ts.map +1 -1
- package/script/types/4_inline_query_result.js +13 -13
- package/script/types/4_message.d.ts.map +1 -1
- package/script/types/4_message.js +56 -56
- package/script/types/5_callback_query.d.ts.map +1 -1
- package/script/types/5_callback_query.js +5 -6
- package/script/types/5_chat_list_item.d.ts.map +1 -1
- package/script/types/5_chat_list_item.js +4 -4
- package/script/types/5_claimed_gifts.d.ts.map +1 -1
- package/script/types/5_claimed_gifts.js +5 -5
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +2 -2
- package/esm/client/0_message.d.ts +0 -29
- package/esm/client/0_message.d.ts.map +0 -1
- package/esm/client/0_message.js +0 -83
- package/esm/client/1_client_encrypted.d.ts +0 -52
- package/esm/client/1_client_encrypted.d.ts.map +0 -1
- package/esm/client/1_client_encrypted.js +0 -381
- package/esm/tl/0_api.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_reader.js +0 -97
- package/esm/tl/0_tl_raw_reader_test.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_writer.js +0 -86
- package/esm/tl/0_tl_raw_writer_test.d.ts.map +0 -1
- package/esm/tl/1_utilities_test.d.ts.map +0 -1
- package/esm/tl/2_tl_reader.d.ts.map +0 -1
- package/esm/tl/2_tl_reader_test.d.ts.map +0 -1
- package/esm/tl/2_tl_writer.d.ts.map +0 -1
- package/esm/tl/2_tl_writer_test.d.ts.map +0 -1
- package/esm/tl/2_utilities.d.ts.map +0 -1
- package/script/client/0_message.d.ts +0 -29
- package/script/client/0_message.d.ts.map +0 -1
- package/script/client/0_message.js +0 -90
- package/script/client/1_client_encrypted.d.ts +0 -52
- package/script/client/1_client_encrypted.d.ts.map +0 -1
- package/script/client/1_client_encrypted.js +0 -385
- package/script/tl/0_api.d.ts.map +0 -1
- package/script/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/script/tl/0_tl_raw_reader.js +0 -102
- package/script/tl/0_tl_raw_reader_test.d.ts.map +0 -1
- package/script/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/script/tl/0_tl_raw_writer.js +0 -90
- package/script/tl/0_tl_raw_writer_test.d.ts.map +0 -1
- package/script/tl/1_utilities_test.d.ts.map +0 -1
- package/script/tl/2_tl_reader.d.ts.map +0 -1
- package/script/tl/2_tl_reader.js +0 -150
- package/script/tl/2_tl_reader_test.d.ts.map +0 -1
- package/script/tl/2_tl_writer.d.ts.map +0 -1
- package/script/tl/2_tl_writer_test.d.ts.map +0 -1
- package/script/tl/2_utilities.d.ts.map +0 -1
- package/script/tl/2_utilities.js +0 -98
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_animation.d.ts","sourceRoot":"","sources":["../../src/types/1_animation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_animation.d.ts","sourceRoot":"","sources":["../../src/types/1_animation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,uEAAuE;AACvE,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,GAAG,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,yBAAyB,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAY5N"}
|
package/esm/types/1_animation.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
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 {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
23
23
|
export function constructAnimation(document, videoAttribute, fileAttribute, fileId, fileUniqueId) {
|
|
24
24
|
return cleanObject({
|
|
@@ -27,7 +27,7 @@ export function constructAnimation(document, videoAttribute, fileAttribute, file
|
|
|
27
27
|
width: videoAttribute?.w ?? 0,
|
|
28
28
|
height: videoAttribute?.h ?? 0,
|
|
29
29
|
duration: videoAttribute?.duration ?? 0,
|
|
30
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
30
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => Api.is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
31
31
|
fileName: fileAttribute?.file_name,
|
|
32
32
|
mimeType: document.mime_type,
|
|
33
33
|
fileSize: Number(document.size),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_audio.d.ts","sourceRoot":"","sources":["../../src/types/1_audio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_audio.d.ts","sourceRoot":"","sources":["../../src/types/1_audio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,qBAAqB;AACrB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAW1J"}
|
package/esm/types/1_audio.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
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 {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
23
23
|
export function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
24
24
|
return cleanObject({
|
|
@@ -29,6 +29,6 @@ export function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
|
29
29
|
title: audioAttribute?.title,
|
|
30
30
|
mimeType: document.mime_type,
|
|
31
31
|
fileSize: Number(document.size),
|
|
32
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
32
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => Api.is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_bot_command_scope.d.ts","sourceRoot":"","sources":["../../src/types/1_bot_command_scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_bot_command_scope.d.ts","sourceRoot":"","sources":["../../src/types/1_bot_command_scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAE/B,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC7C,qBAAqB;IACrB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA4B;IAC3C,qBAAqB;IACrB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,oCAAoC;IACnD,qBAAqB;IACrB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,EAAE,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,iCAAiC;IAChD,qBAAqB;IACrB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,EAAE,EAAE,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACxC,qBAAqB;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,EAAE,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yDAAyD;AACzD,MAAM,MAAM,eAAe,GAAG,sBAAsB,GAAG,8BAA8B,GAAG,4BAA4B,GAAG,oCAAoC,GAAG,mBAAmB,GAAG,iCAAiC,GAAG,yBAAyB,CAAC;AAElP,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAwBnI"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
export async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
23
23
|
switch (scope.type) {
|
|
24
24
|
case "default":
|
|
@@ -35,7 +35,7 @@ export async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
|
35
35
|
return { _: "botCommandScopePeerAdmins", peer: await getInputPeer(scope.chatId) };
|
|
36
36
|
case "chatMember": {
|
|
37
37
|
const user = await getInputPeer(scope.userId);
|
|
38
|
-
if (!is("inputPeerUser", user)) {
|
|
38
|
+
if (!Api.is("inputPeerUser", user)) {
|
|
39
39
|
unreachable();
|
|
40
40
|
}
|
|
41
41
|
return { _: "botCommandScopePeerUser", peer: await getInputPeer(scope.chatId), user_id: ({ _: "inputUser", user_id: user.user_id, access_hash: user.access_hash }) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA8B,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,gBAAgB;AAChB,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,OAAO,GACP,YAAY,GACZ,SAAS,CAAC;AAEd,gBAAgB;AAChB,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,4CAA4C;IA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AAI,GAAG,YAAY,CAAC;AAC7D,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,GAAG,UAAU,CAAC;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAC;AACzG,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,GAAG,KAAK,CAAC"}
|
package/esm/types/1_chat_p.js
CHANGED
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject, getColorFromPeerId, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
22
|
-
import {
|
|
22
|
+
import { Api } from "../2_tl.js";
|
|
23
23
|
import { constructRestrictionReason } from "./0_restriction_reason.js";
|
|
24
24
|
export function constructChatP(chat) {
|
|
25
|
-
if (is("user", chat)) {
|
|
25
|
+
if (Api.is("user", chat)) {
|
|
26
26
|
const id = Number(chat.id);
|
|
27
27
|
const chat_ = {
|
|
28
28
|
id,
|
|
@@ -42,7 +42,7 @@ export function constructChatP(chat) {
|
|
|
42
42
|
}
|
|
43
43
|
return cleanObject(chat_);
|
|
44
44
|
}
|
|
45
|
-
else if (is("chat", chat) || is("chatForbidden", chat)) {
|
|
45
|
+
else if (Api.is("chat", chat) || Api.is("chatForbidden", chat)) {
|
|
46
46
|
const id = Number(-chat.id);
|
|
47
47
|
const chat_ = {
|
|
48
48
|
id,
|
|
@@ -51,15 +51,15 @@ export function constructChatP(chat) {
|
|
|
51
51
|
title: chat.title,
|
|
52
52
|
isCreator: false,
|
|
53
53
|
};
|
|
54
|
-
if (is("chat", chat)) {
|
|
54
|
+
if (Api.is("chat", chat)) {
|
|
55
55
|
chat_.isCreator = chat.creator || false;
|
|
56
56
|
}
|
|
57
57
|
return cleanObject(chat_);
|
|
58
58
|
}
|
|
59
|
-
else if (is("channel", chat) || is("channelForbidden", chat)) {
|
|
59
|
+
else if (Api.is("channel", chat) || Api.is("channelForbidden", chat)) {
|
|
60
60
|
let chat_;
|
|
61
61
|
const id = ZERO_CHANNEL_ID + -Number(chat.id);
|
|
62
|
-
if (is("channelForbidden", chat)) {
|
|
62
|
+
if (Api.is("channelForbidden", chat)) {
|
|
63
63
|
const { title } = chat;
|
|
64
64
|
if (chat.megagroup) {
|
|
65
65
|
return { id, color: getColorFromPeerId(id), title, type: "supergroup", isScam: false, isFake: false, isVerified: false, isRestricted: false, isForum: false };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_document.d.ts","sourceRoot":"","sources":["../../src/types/1_document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_document.d.ts","sourceRoot":"","sources":["../../src/types/1_document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,kBAAkB;AAClB,MAAM,WAAW,QAAQ;IACvB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,CAAC,yBAAyB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,CAS1J"}
|
package/esm/types/1_document.js
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
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 {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
22
22
|
export function constructDocument(document, fileNameAttribute, fileId, fileUniqueId) {
|
|
23
23
|
return {
|
|
24
24
|
fileId,
|
|
25
25
|
fileUniqueId,
|
|
26
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
26
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => Api.is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
27
27
|
fileName: fileNameAttribute.file_name,
|
|
28
28
|
mimeType: document.mime_type,
|
|
29
29
|
fileSize: Number(document.size),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/1_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/1_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAuE,MAAM,kCAAkC,CAAC;AAChJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,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B,GACzB,qBAAqB,CAAC;AAE1B,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,GAAG,cAAc,CAqEnF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,cAAc,GAAG,GAAG,CAAC,cAAc,CAoBnF"}
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { chatAdministratorRightsToTlObject, constructChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
23
23
|
export function constructKeyboardButton(button_) {
|
|
24
|
-
if (is("keyboardButton", button_)) {
|
|
24
|
+
if (Api.is("keyboardButton", button_)) {
|
|
25
25
|
return { text: button_.text };
|
|
26
26
|
}
|
|
27
|
-
else if (is("keyboardButtonRequestPeer", button_)) {
|
|
28
|
-
if (is("requestPeerTypeUser", button_.peer_type)) {
|
|
27
|
+
else if (Api.is("keyboardButtonRequestPeer", button_)) {
|
|
28
|
+
if (Api.is("requestPeerTypeUser", button_.peer_type)) {
|
|
29
29
|
return {
|
|
30
30
|
text: button_.text,
|
|
31
31
|
requestUser: {
|
|
@@ -35,7 +35,7 @@ export function constructKeyboardButton(button_) {
|
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
else if (is("requestPeerTypeChat", button_.peer_type)) {
|
|
38
|
+
else if (Api.is("requestPeerTypeChat", button_.peer_type)) {
|
|
39
39
|
const button = {
|
|
40
40
|
text: button_.text,
|
|
41
41
|
requestChat: {
|
|
@@ -55,7 +55,7 @@ export function constructKeyboardButton(button_) {
|
|
|
55
55
|
}
|
|
56
56
|
return button;
|
|
57
57
|
}
|
|
58
|
-
else if (is("requestPeerTypeBroadcast", button_.peer_type)) {
|
|
58
|
+
else if (Api.is("requestPeerTypeBroadcast", button_.peer_type)) {
|
|
59
59
|
const button = {
|
|
60
60
|
text: button_.text,
|
|
61
61
|
requestChat: {
|
|
@@ -77,20 +77,20 @@ export function constructKeyboardButton(button_) {
|
|
|
77
77
|
unreachable();
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
else if (is("keyboardButtonRequestPhone", button_)) {
|
|
80
|
+
else if (Api.is("keyboardButtonRequestPhone", button_)) {
|
|
81
81
|
return { text: button_.text, requestContact: true };
|
|
82
82
|
}
|
|
83
|
-
else if (is("keyboardButtonRequestGeoLocation", button_)) {
|
|
83
|
+
else if (Api.is("keyboardButtonRequestGeoLocation", button_)) {
|
|
84
84
|
return { text: button_.text, requestLocation: true };
|
|
85
85
|
}
|
|
86
|
-
else if (is("keyboardButtonRequestPoll", button_)) {
|
|
86
|
+
else if (Api.is("keyboardButtonRequestPoll", button_)) {
|
|
87
87
|
const button = { text: button_.text, requestPoll: {} };
|
|
88
88
|
if (button_.quiz) {
|
|
89
89
|
button.requestPoll.type = "quiz";
|
|
90
90
|
}
|
|
91
91
|
return button;
|
|
92
92
|
}
|
|
93
|
-
else if (is("keyboardButtonWebView", button_) || is("keyboardButtonSimpleWebView", button_)) {
|
|
93
|
+
else if (Api.is("keyboardButtonWebView", button_) || Api.is("keyboardButtonSimpleWebView", button_)) {
|
|
94
94
|
return { text: button_.text, miniApp: { url: button_.url } };
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_message_reaction.d.ts","sourceRoot":"","sources":["../../src/types/1_message_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_message_reaction.d.ts","sourceRoot":"","sources":["../../src/types/1_message_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,GAAG,CAAC,mBAAmB,EAAE,GAAG,eAAe,CAgBlI"}
|
|
@@ -18,22 +18,22 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { constructReaction } from "./0_reaction.js";
|
|
23
23
|
export function constructMessageReaction(reaction_, recentReactions) {
|
|
24
24
|
const choosers = recentReactions
|
|
25
25
|
.filter((v) => {
|
|
26
|
-
if (is("reactionEmoji", reaction_.reaction)) {
|
|
27
|
-
return is("reactionEmoji", v.reaction) && v.reaction.emoticon == reaction_.reaction.emoticon;
|
|
26
|
+
if (Api.is("reactionEmoji", reaction_.reaction)) {
|
|
27
|
+
return Api.is("reactionEmoji", v.reaction) && v.reaction.emoticon == reaction_.reaction.emoticon;
|
|
28
28
|
}
|
|
29
|
-
else if (is("reactionCustomEmoji", reaction_.reaction)) {
|
|
30
|
-
return is("reactionCustomEmoji", v.reaction) && v.reaction.document_id == reaction_.reaction.document_id;
|
|
29
|
+
else if (Api.is("reactionCustomEmoji", reaction_.reaction)) {
|
|
30
|
+
return Api.is("reactionCustomEmoji", v.reaction) && v.reaction.document_id == reaction_.reaction.document_id;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
unreachable();
|
|
34
34
|
}
|
|
35
35
|
})
|
|
36
|
-
.map((v) => peerToChatId(v.peer_id));
|
|
36
|
+
.map((v) => Api.peerToChatId(v.peer_id));
|
|
37
37
|
const reaction = constructReaction(reaction_.reaction);
|
|
38
38
|
const count = reaction_.count;
|
|
39
39
|
const chosen = reaction_.chosen_order !== undefined ? true : false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_photo.d.ts","sourceRoot":"","sources":["../../src/types/1_photo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_photo.d.ts","sourceRoot":"","sources":["../../src/types/1_photo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,eAAe;AACf,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,KAAK,CAStD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC,SAAS,CAAA;CAAE,CAalG"}
|
package/esm/types/1_photo.js
CHANGED
|
@@ -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 {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { getPhotoFileId } from "./_file_id.js";
|
|
22
22
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
23
23
|
export function constructPhoto(photo) {
|
|
@@ -33,14 +33,14 @@ export function constructPhoto(photo) {
|
|
|
33
33
|
export function getPhotoSizes(photo) {
|
|
34
34
|
const sizes = photo.sizes
|
|
35
35
|
.map((v) => {
|
|
36
|
-
if (is("photoSizeProgressive", v)) {
|
|
36
|
+
if (Api.is("photoSizeProgressive", v)) {
|
|
37
37
|
return { _: "photoSize", type: v.type, w: v.w, h: v.h, size: Math.max(...v.sizes) };
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
40
|
return v;
|
|
41
41
|
}
|
|
42
42
|
})
|
|
43
|
-
.filter((v) => is("photoSize", v))
|
|
43
|
+
.filter((v) => Api.is("photoSize", v))
|
|
44
44
|
.sort((a, b) => a.size - b.size);
|
|
45
45
|
const largest = sizes.slice(-1)[0];
|
|
46
46
|
return { sizes, largest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAyB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,iBAAiB;AACjB,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E,aAAa,SAAK,GAAG,OAAO,CAuBxJ"}
|
package/esm/types/1_sticker.js
CHANGED
|
@@ -18,19 +18,19 @@
|
|
|
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 {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { constructMaskPosition } from "./0_mask_position.js";
|
|
23
23
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
24
24
|
export async function constructSticker(document, fileId, fileUniqueId, getStickerSetName, customEmojiId = "") {
|
|
25
|
-
const stickerAttribute = document.attributes.find((v) => is("documentAttributeSticker", v));
|
|
26
|
-
const setName = is("inputStickerSetID", stickerAttribute.stickerset) ? await getStickerSetName(stickerAttribute.stickerset) : undefined;
|
|
25
|
+
const stickerAttribute = document.attributes.find((v) => Api.is("documentAttributeSticker", v));
|
|
26
|
+
const setName = Api.is("inputStickerSetID", stickerAttribute.stickerset) ? await getStickerSetName(stickerAttribute.stickerset) : undefined;
|
|
27
27
|
return constructSticker2(document, fileId, fileUniqueId, setName, customEmojiId);
|
|
28
28
|
}
|
|
29
29
|
export function constructSticker2(document, fileId, fileUniqueId, setName, customEmojiId = "") {
|
|
30
|
-
const stickerAttribute = document.attributes.find((v) => is("documentAttributeSticker", v));
|
|
31
|
-
const imageSizeAttribute = document.attributes.find((v) => is("documentAttributeImageSize", v));
|
|
32
|
-
const customEmojiAttribute = document.attributes.find((v) => is("documentAttributeCustomEmoji", v));
|
|
33
|
-
const videoAttribute = document.attributes.find((v) => is("documentAttributeVideo", v));
|
|
30
|
+
const stickerAttribute = document.attributes.find((v) => Api.is("documentAttributeSticker", v));
|
|
31
|
+
const imageSizeAttribute = document.attributes.find((v) => Api.is("documentAttributeImageSize", v));
|
|
32
|
+
const customEmojiAttribute = document.attributes.find((v) => Api.is("documentAttributeCustomEmoji", v));
|
|
33
|
+
const videoAttribute = document.attributes.find((v) => Api.is("documentAttributeVideo", v));
|
|
34
34
|
return cleanObject({
|
|
35
35
|
fileId,
|
|
36
36
|
fileUniqueId,
|
|
@@ -39,7 +39,7 @@ export function constructSticker2(document, fileId, fileUniqueId, setName, custo
|
|
|
39
39
|
height: imageSizeAttribute ? imageSizeAttribute.h : videoAttribute ? videoAttribute.h : 512,
|
|
40
40
|
isAnimated: document.mime_type == "application/x-tgsticker",
|
|
41
41
|
isVideo: document.mime_type == "video/webm",
|
|
42
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
42
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => Api.is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
43
43
|
emoji: (customEmojiAttribute ? customEmojiAttribute.alt : stickerAttribute.alt) || undefined,
|
|
44
44
|
setName,
|
|
45
45
|
premiumAnimation: undefined, // TODO
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/1_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/1_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,qBAAqB;IACrB,YAAY,EAAE,IAAI,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,gCAAgC;AAChC,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,CAAC;AAqBrB,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAkB5H;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,GAAG,YAAY,CAY9E"}
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
async function resolveUsers(ids, getEntity) {
|
|
23
23
|
const users = new Array();
|
|
24
24
|
for (const id of ids) {
|
|
25
25
|
const entity = await getEntity({ _: "peerUser", user_id: BigInt(id) });
|
|
26
|
-
if (!(is("user", entity))) {
|
|
26
|
+
if (!(Api.is("user", entity))) {
|
|
27
27
|
unreachable();
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
@@ -61,16 +61,16 @@ export async function storyPrivacyToTlObject(privacy, getEntity) {
|
|
|
61
61
|
return rules;
|
|
62
62
|
}
|
|
63
63
|
export function constructStoryPrivacy(privacy) {
|
|
64
|
-
const except = privacy.find((v) => is("privacyValueDisallowUsers", v))?.users?.map(Number) ?? [];
|
|
65
|
-
if (privacy.some((v) => is("privacyValueAllowAll", v))) {
|
|
64
|
+
const except = privacy.find((v) => Api.is("privacyValueDisallowUsers", v))?.users?.map(Number) ?? [];
|
|
65
|
+
if (privacy.some((v) => Api.is("privacyValueAllowAll", v))) {
|
|
66
66
|
return { everyoneExcept: except };
|
|
67
67
|
}
|
|
68
|
-
else if (privacy.some((v) => is("privacyValueAllowContacts", v))) {
|
|
68
|
+
else if (privacy.some((v) => Api.is("privacyValueAllowContacts", v))) {
|
|
69
69
|
return { contactsExcept: except };
|
|
70
70
|
}
|
|
71
|
-
else if (privacy.some((v) => is("privacyValueAllowCloseFriends", v))) {
|
|
71
|
+
else if (privacy.some((v) => Api.is("privacyValueAllowCloseFriends", v))) {
|
|
72
72
|
return { closeFriends: true };
|
|
73
73
|
}
|
|
74
|
-
const only = privacy.find((v) => is("privacyValueAllowUsers", v))?.users?.map(Number) ?? [];
|
|
74
|
+
const only = privacy.find((v) => Api.is("privacyValueAllowUsers", v))?.users?.map(Number) ?? [];
|
|
75
75
|
return { only };
|
|
76
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_user.d.ts","sourceRoot":"","sources":["../../src/types/1_user.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_user.d.ts","sourceRoot":"","sources":["../../src/types/1_user.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,SAAS,EAAsB,MAAM,mBAAmB,CAAC;AAElE,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,gCAAgC;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,gGAAgG;IAChG,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAyBnD"}
|
package/esm/types/1_user.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { cleanObject, getColorFromPeerId } from "../1_utilities.js";
|
|
21
|
-
import {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { constructChatPhoto } from "./0_chat_photo.js";
|
|
23
23
|
export function constructUser(user_) {
|
|
24
24
|
const id = Number(user_.id);
|
|
@@ -40,7 +40,7 @@ export function constructUser(user_) {
|
|
|
40
40
|
isSupport: user_.support || false,
|
|
41
41
|
addedToAttachmentMenu: user_.attach_menu_enabled || false,
|
|
42
42
|
};
|
|
43
|
-
if (is("userProfilePhoto", user_.photo)) {
|
|
43
|
+
if (Api.is("userProfilePhoto", user_.photo)) {
|
|
44
44
|
user.photo = constructChatPhoto(user_.photo, user.id, user_.access_hash ?? 0n);
|
|
45
45
|
}
|
|
46
46
|
return cleanObject(user);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_venue.d.ts","sourceRoot":"","sources":["../../src/types/1_venue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_venue.d.ts","sourceRoot":"","sources":["../../src/types/1_venue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,sBAAsB;AACtB,MAAM,WAAW,KAAK;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,cAAc,GAAG,KAAK,CASxF"}
|
package/esm/types/1_venue.js
CHANGED
|
@@ -17,10 +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 {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { constructLocation } from "./0_location.js";
|
|
22
22
|
export function constructVenue(media_) {
|
|
23
|
-
const geo = as("geoPoint", media_.geo);
|
|
23
|
+
const geo = Api.as("geoPoint", media_.geo);
|
|
24
24
|
return {
|
|
25
25
|
location: constructLocation(geo),
|
|
26
26
|
title: media_.title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAY5K"}
|
package/esm/types/1_video.js
CHANGED
|
@@ -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 {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
22
22
|
export function constructVideo(document, videoAttribute, fileName, fileId, fileUniqueId) {
|
|
23
23
|
return {
|
|
@@ -26,7 +26,7 @@ export function constructVideo(document, videoAttribute, fileName, fileId, fileU
|
|
|
26
26
|
width: videoAttribute.w,
|
|
27
27
|
height: videoAttribute.h,
|
|
28
28
|
duration: videoAttribute.duration,
|
|
29
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
29
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => Api.is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
30
30
|
fileName,
|
|
31
31
|
mimeType: document.mime_type,
|
|
32
32
|
fileSize: Number(document.size),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAStJ"}
|
|
@@ -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 {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
22
22
|
export function constructVideoNote(document, videoAttribute, fileId, fileUniqueId) {
|
|
23
23
|
return {
|
|
@@ -25,7 +25,7 @@ export function constructVideoNote(document, videoAttribute, fileId, fileUniqueI
|
|
|
25
25
|
fileUniqueId,
|
|
26
26
|
length: videoAttribute.w,
|
|
27
27
|
duration: videoAttribute.duration,
|
|
28
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
28
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => Api.is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
29
29
|
fileSize: Number(document.size),
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAqB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAyB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,e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|
|
21
21
|
import { cleanObject } from "../1_utilities.js";
|
|
22
|
-
import {
|
|
22
|
+
import { Api } from "../2_tl.js";
|
|
23
23
|
import { constructBirthday } from "./0_birthday.js";
|
|
24
24
|
import { constructLocation } from "./0_location.js";
|
|
25
25
|
import { constructOpeningHours } from "./0_opening_hours.js";
|
|
26
26
|
import { constructChatP } from "./1_chat_p.js";
|
|
27
27
|
import { constructPhoto } from "./1_photo.js";
|
|
28
28
|
export async function constructChat(fullChat, getEntity) {
|
|
29
|
-
if (is("userFull", fullChat)) {
|
|
29
|
+
if (Api.is("userFull", fullChat)) {
|
|
30
30
|
const user = await getEntity({ _: "peerUser", user_id: fullChat.id });
|
|
31
31
|
if (user == null)
|
|
32
32
|
unreachable();
|
|
@@ -34,32 +34,32 @@ export async function constructChat(fullChat, getEntity) {
|
|
|
34
34
|
return cleanObject({
|
|
35
35
|
...chatP,
|
|
36
36
|
birthday: fullChat.birthday ? constructBirthday(fullChat.birthday) : undefined,
|
|
37
|
-
photo: fullChat.profile_photo && is("photo", fullChat.profile_photo) ? constructPhoto(fullChat.profile_photo) : undefined,
|
|
37
|
+
photo: fullChat.profile_photo && Api.is("photo", fullChat.profile_photo) ? constructPhoto(fullChat.profile_photo) : undefined,
|
|
38
38
|
address: fullChat.business_location?.address,
|
|
39
|
-
location: fullChat.business_location?.geo_point && is("geoPoint", fullChat.business_location.geo_point) ? constructLocation(fullChat.business_location.geo_point) : undefined,
|
|
39
|
+
location: fullChat.business_location?.geo_point && Api.is("geoPoint", fullChat.business_location.geo_point) ? constructLocation(fullChat.business_location.geo_point) : undefined,
|
|
40
40
|
openingHours: fullChat.business_work_hours ? constructOpeningHours(fullChat.business_work_hours) : undefined,
|
|
41
41
|
hasMainMiniApp: user.bot ? user.bot_has_main_app : undefined,
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
else if (is("chatFull", fullChat)) {
|
|
44
|
+
else if (Api.is("chatFull", fullChat)) {
|
|
45
45
|
const chat = await getEntity({ _: "peerChat", chat_id: fullChat.id });
|
|
46
46
|
if (chat == null)
|
|
47
47
|
unreachable();
|
|
48
48
|
const chatP = constructChatP(chat);
|
|
49
49
|
return cleanObject({
|
|
50
50
|
...chatP,
|
|
51
|
-
photo: fullChat.chat_photo && is("photo", fullChat.chat_photo) ? constructPhoto(fullChat.chat_photo) : undefined,
|
|
51
|
+
photo: fullChat.chat_photo && Api.is("photo", fullChat.chat_photo) ? constructPhoto(fullChat.chat_photo) : undefined,
|
|
52
52
|
videoChatId: fullChat.call ? String(fullChat.call.id) : undefined,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
else if (is("channelFull", fullChat)) {
|
|
55
|
+
else if (Api.is("channelFull", fullChat)) {
|
|
56
56
|
const chat = await getEntity({ _: "peerChannel", channel_id: fullChat.id });
|
|
57
57
|
if (chat == null)
|
|
58
58
|
unreachable();
|
|
59
59
|
const chatP = constructChatP(chat);
|
|
60
60
|
return cleanObject({
|
|
61
61
|
...chatP,
|
|
62
|
-
photo: fullChat.chat_photo && is("photo", fullChat.chat_photo) ? constructPhoto(fullChat.chat_photo) : undefined,
|
|
62
|
+
photo: fullChat.chat_photo && Api.is("photo", fullChat.chat_photo) ? constructPhoto(fullChat.chat_photo) : undefined,
|
|
63
63
|
videoChatId: fullChat.call ? String(fullChat.call.id) : undefined,
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,C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