@mtkruto/node 0.1.800 → 0.2.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 +2 -0
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +2 -1
- package/esm/2_tl.d.ts +7 -8
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +7 -8
- package/esm/3_errors.d.ts +519 -515
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +527 -512
- package/esm/3_transport.d.ts +1 -0
- package/esm/3_transport.d.ts.map +1 -1
- package/esm/3_transport.js +1 -0
- package/esm/4_errors.d.ts +7 -7
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/4_errors.js +5 -5
- package/esm/client/0_client_abstract.d.ts +1 -21
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +17 -15
- package/esm/client/0_message.d.ts +3 -3
- package/esm/client/0_message.d.ts.map +1 -1
- package/esm/client/0_message.js +4 -20
- package/esm/client/0_params.d.ts +1 -1
- package/esm/client/0_params.d.ts.map +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_password.js +3 -8
- package/esm/client/0_storage_operations.d.ts +23 -23
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +13 -12
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +13 -10
- package/esm/client/1_client_encrypted.d.ts +3 -5
- package/esm/client/1_client_encrypted.d.ts.map +1 -1
- package/esm/client/1_client_encrypted.js +44 -28
- package/esm/client/1_client_plain.d.ts +2 -2
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +27 -19
- package/esm/client/1_types.d.ts +9 -22
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.d.ts +2 -2
- package/esm/client/2_account_manager.js +16 -16
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.js +7 -6
- package/esm/client/2_business_connection_manager.d.ts +3 -3
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +6 -5
- package/esm/client/2_file_manager.d.ts +4 -4
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +26 -23
- package/esm/client/2_reaction_manager.d.ts +3 -3
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +16 -10
- package/esm/client/2_update_manager.d.ts +11 -11
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +185 -164
- package/esm/client/3_message_manager.d.ts +8 -9
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +205 -474
- package/esm/client/3_video_chat_manager.d.ts +3 -3
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +26 -36
- package/esm/client/4_callback_query_manager.d.ts +3 -3
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +5 -16
- package/esm/client/4_chat_list_manager.d.ts +5 -4
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +56 -34
- package/esm/client/4_inline_query_manager.d.ts +3 -3
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +6 -15
- package/esm/client/4_story_manager.d.ts +3 -3
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +15 -32
- package/esm/client/5_client.d.ts +10 -12
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +60 -114
- package/esm/{tl/7_message.d.ts → connection/1_connection_tcp.d.ts} +14 -12
- package/esm/connection/1_connection_tcp.d.ts.map +1 -0
- package/esm/connection/1_connection_tcp.js +169 -0
- package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/_constants.js +4 -0
- package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
- package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.js +86 -0
- package/esm/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
- package/esm/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/types.js +3 -0
- package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
- package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/write_all.js +49 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +253 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +13 -0
- package/esm/mod.d.ts +0 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +0 -1
- package/esm/tl/0_api.d.ts +14813 -0
- package/esm/tl/0_api.d.ts.map +1 -0
- package/esm/tl/0_api.js +23222 -0
- package/esm/tl/1_utilities.d.ts +32 -0
- package/esm/tl/1_utilities.d.ts.map +1 -0
- package/esm/tl/1_utilities.js +65 -0
- package/esm/tl/1_utilities_test.d.ts.map +1 -0
- package/esm/tl/2_deserialize.d.ts +23 -0
- package/esm/tl/2_deserialize.d.ts.map +1 -0
- package/esm/tl/{3_deserialize.js → 2_deserialize.js} +16 -17
- package/esm/tl/2_serialize.d.ts +22 -0
- package/esm/tl/2_serialize.d.ts.map +1 -0
- package/esm/tl/2_serialize.js +160 -0
- package/esm/tl/2_serialize_test.d.ts.map +1 -0
- package/esm/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
- package/esm/tl/3_tl_reader.d.ts.map +1 -0
- package/esm/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
- package/esm/tl/3_utilities.d.ts +5 -5
- package/esm/tl/3_utilities.d.ts.map +1 -1
- package/esm/tl/3_utilities.js +9 -10
- package/esm/tl/4_rpc_result.d.ts +27 -0
- package/esm/tl/4_rpc_result.d.ts.map +1 -0
- package/esm/tl/4_rpc_result.js +28 -0
- package/{script/tl/5_tl_writer.d.ts → esm/tl/4_tl_writer.d.ts} +2 -2
- package/esm/tl/4_tl_writer.d.ts.map +1 -0
- package/esm/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
- package/esm/tl/5_message.d.ts +39 -0
- package/esm/tl/5_message.d.ts.map +1 -0
- package/esm/tl/5_message.js +98 -0
- package/esm/tl/5_message_test.d.ts.map +1 -0
- package/esm/transport/3_transport_provider_tcp.d.ts +14 -0
- package/esm/transport/3_transport_provider_tcp.d.ts.map +1 -0
- package/esm/transport/3_transport_provider_tcp.js +15 -0
- package/esm/types/0_birthday.d.ts +2 -2
- package/esm/types/0_birthday.d.ts.map +1 -1
- package/esm/types/0_callback_query_answer.d.ts +2 -2
- package/esm/types/0_callback_query_answer.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +3 -3
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.js +1 -11
- package/esm/types/0_chat_member_rights.d.ts +3 -3
- package/esm/types/0_chat_member_rights.d.ts.map +1 -1
- package/esm/types/0_chat_member_rights.js +3 -3
- package/esm/types/0_chat_photo.d.ts +2 -2
- package/esm/types/0_chat_photo.d.ts.map +1 -1
- package/esm/types/0_chat_photo.js +2 -2
- package/esm/types/0_contact.d.ts +2 -2
- package/esm/types/0_contact.d.ts.map +1 -1
- package/esm/types/0_dice.d.ts +2 -2
- package/esm/types/0_dice.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.d.ts +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_link_preview.d.ts +2 -2
- package/esm/types/0_link_preview.d.ts.map +1 -1
- package/esm/types/0_live_stream_channel.d.ts +2 -2
- package/esm/types/0_live_stream_channel.d.ts.map +1 -1
- package/esm/types/0_location.d.ts +2 -2
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_location.js +5 -5
- package/esm/types/0_mask_position.d.ts +2 -2
- package/esm/types/0_mask_position.d.ts.map +1 -1
- package/esm/types/0_message_entity.d.ts +3 -3
- package/esm/types/0_message_entity.d.ts.map +1 -1
- package/esm/types/0_message_entity.js +42 -42
- package/esm/types/0_message_search_filter.d.ts +2 -2
- package/esm/types/0_message_search_filter.d.ts.map +1 -1
- package/esm/types/0_message_search_filter.js +14 -15
- package/esm/types/0_opening_hours.d.ts +2 -2
- package/esm/types/0_opening_hours.d.ts.map +1 -1
- package/esm/types/0_poll_option.d.ts +2 -2
- package/esm/types/0_poll_option.d.ts.map +1 -1
- package/esm/types/0_reaction.d.ts +3 -3
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_reaction.js +4 -4
- package/esm/types/0_restriction_reason.d.ts +2 -2
- package/esm/types/0_restriction_reason.d.ts.map +1 -1
- package/esm/types/0_thumbnail.d.ts +2 -2
- package/esm/types/0_thumbnail.d.ts.map +1 -1
- package/esm/types/0_thumbnail.js +3 -3
- package/esm/types/0_video_chat.d.ts +2 -2
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/0_video_chat.js +2 -2
- package/esm/types/0_voice.d.ts +2 -2
- package/esm/types/0_voice.d.ts.map +1 -1
- package/esm/types/1_animation.d.ts +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 +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 +9 -2
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.js +9 -9
- package/esm/types/1_chat_p.d.ts +5 -5
- 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 +2 -2
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_document.js +2 -2
- package/esm/types/1_giveaway.d.ts +2 -2
- package/esm/types/1_giveaway.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +3 -3
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +18 -45
- package/esm/types/1_message_reaction.d.ts +2 -2
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +5 -5
- package/esm/types/1_photo.d.ts +5 -5
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_photo.js +4 -4
- package/esm/types/1_poll.d.ts +2 -2
- package/esm/types/1_poll.d.ts.map +1 -1
- package/esm/types/1_reaction_count.d.ts +2 -2
- package/esm/types/1_reaction_count.d.ts.map +1 -1
- package/esm/types/1_reply_quote.d.ts +2 -2
- package/esm/types/1_reply_quote.d.ts.map +1 -1
- package/esm/types/1_sticker.d.ts +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +9 -9
- package/esm/types/1_story_privacy.d.ts +3 -3
- package/esm/types/1_story_privacy.d.ts.map +1 -1
- package/esm/types/1_story_privacy.js +14 -14
- package/esm/types/1_story_reaction.d.ts +2 -2
- package/esm/types/1_story_reaction.d.ts.map +1 -1
- package/esm/types/1_user.d.ts +2 -2
- 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 +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 +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 +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_business_connection.d.ts +2 -2
- package/esm/types/2_business_connection.d.ts.map +1 -1
- package/esm/types/2_business_connection.js +1 -2
- package/esm/types/2_chat.d.ts +2 -2
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +11 -11
- package/esm/types/2_chat_member.d.ts +2 -2
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +10 -10
- package/esm/types/2_chosen_inline_result.d.ts +2 -2
- package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
- package/esm/types/2_chosen_inline_result.js +5 -5
- package/esm/types/2_game.d.ts +2 -2
- package/esm/types/2_game.d.ts.map +1 -1
- package/esm/types/2_game.js +4 -4
- package/esm/types/2_inactive_chat.d.ts +2 -2
- 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 +3 -3
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +15 -21
- package/esm/types/2_inline_query.d.ts +2 -2
- package/esm/types/2_inline_query.d.ts.map +1 -1
- package/esm/types/2_inline_query.js +8 -8
- package/esm/types/2_invite_link.d.ts +2 -2
- package/esm/types/2_invite_link.d.ts.map +1 -1
- package/esm/types/2_invite_link.js +1 -2
- package/esm/types/2_message_reaction_count.d.ts +2 -2
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reactions.d.ts +2 -2
- 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 +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_interactions.d.ts +2 -2
- package/esm/types/2_story_interactions.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.d.ts +3 -3
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +19 -29
- package/esm/types/3_chat_member_updated.d.ts +2 -2
- package/esm/types/3_chat_member_updated.d.ts.map +1 -1
- package/esm/types/3_chat_member_updated.js +7 -7
- package/esm/types/3_reply_markup.d.ts +3 -3
- package/esm/types/3_reply_markup.d.ts.map +1 -1
- package/esm/types/3_reply_markup.js +12 -22
- package/esm/types/3_story.d.ts +2 -2
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/4_inline_query_result.d.ts +3 -3
- package/esm/types/4_inline_query_result.d.ts.map +1 -1
- package/esm/types/4_inline_query_result.js +53 -161
- package/esm/types/4_message.d.ts +3 -3
- package/esm/types/4_message.d.ts.map +1 -1
- package/esm/types/4_message.js +68 -59
- package/esm/types/5_callback_query.d.ts +3 -3
- package/esm/types/5_callback_query.d.ts.map +1 -1
- package/esm/types/5_callback_query.js +5 -5
- package/esm/types/5_chat_list_item.d.ts +3 -3
- package/esm/types/5_chat_list_item.d.ts.map +1 -1
- package/esm/types/5_chat_list_item.js +2 -2
- package/esm/types/5_inline_query_answer.d.ts +2 -2
- package/esm/types/5_inline_query_answer.d.ts.map +1 -1
- package/esm/types/_file_id.d.ts +2 -2
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +4 -4
- package/esm/types/_getters.d.ts +7 -7
- package/esm/types/_getters.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +2 -0
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +5 -2
- package/script/2_tl.d.ts +7 -8
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +20 -11
- package/script/3_errors.d.ts +519 -515
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +543 -514
- package/script/3_transport.d.ts +1 -0
- package/script/3_transport.d.ts.map +1 -1
- package/script/3_transport.js +1 -0
- package/script/4_errors.d.ts +7 -7
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_errors.js +6 -6
- package/script/client/0_client_abstract.d.ts +1 -21
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +41 -16
- package/script/client/0_message.d.ts +3 -3
- package/script/client/0_message.d.ts.map +1 -1
- package/script/client/0_message.js +3 -19
- package/script/client/0_params.d.ts +1 -1
- package/script/client/0_params.d.ts.map +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_password.js +2 -7
- package/script/client/0_storage_operations.d.ts +23 -23
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +12 -11
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +12 -9
- package/script/client/1_client_encrypted.d.ts +3 -5
- package/script/client/1_client_encrypted.d.ts.map +1 -1
- package/script/client/1_client_encrypted.js +42 -26
- package/script/client/1_client_plain.d.ts +2 -2
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +25 -17
- package/script/client/1_types.d.ts +9 -22
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.d.ts +2 -2
- package/script/client/2_account_manager.js +15 -15
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.js +7 -6
- package/script/client/2_business_connection_manager.d.ts +3 -3
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +5 -4
- package/script/client/2_file_manager.d.ts +4 -4
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +25 -22
- package/script/client/2_reaction_manager.d.ts +3 -3
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +15 -9
- package/script/client/2_update_manager.d.ts +11 -11
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +183 -162
- package/script/client/3_message_manager.d.ts +8 -9
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +204 -473
- package/script/client/3_video_chat_manager.d.ts +3 -3
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +25 -35
- package/script/client/4_callback_query_manager.d.ts +3 -3
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +4 -15
- package/script/client/4_chat_list_manager.d.ts +5 -4
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +54 -32
- package/script/client/4_inline_query_manager.d.ts +3 -3
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +5 -14
- package/script/client/4_story_manager.d.ts +3 -3
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +14 -31
- package/script/client/5_client.d.ts +10 -12
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +59 -113
- package/{esm/tl/6_rpc_result.d.ts → script/connection/1_connection_tcp.d.ts} +14 -10
- package/script/connection/1_connection_tcp.d.ts.map +1 -0
- package/script/connection/1_connection_tcp.js +196 -0
- package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
- package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/_constants.js +7 -0
- package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
- package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/iterate_reader.js +91 -0
- package/script/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
- package/script/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/types.js +4 -0
- package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
- package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/write_all.js +54 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +280 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +5 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +40 -0
- package/script/mod.d.ts +0 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +0 -1
- package/script/tl/0_api.d.ts +14813 -0
- package/script/tl/0_api.d.ts.map +1 -0
- package/script/tl/0_api.js +23248 -0
- package/script/tl/1_utilities.d.ts +32 -0
- package/script/tl/1_utilities.d.ts.map +1 -0
- package/script/tl/1_utilities.js +76 -0
- package/script/tl/1_utilities_test.d.ts.map +1 -0
- package/script/tl/2_deserialize.d.ts +23 -0
- package/script/tl/2_deserialize.d.ts.map +1 -0
- package/script/tl/{3_deserialize.js → 2_deserialize.js} +19 -20
- package/script/tl/2_serialize.d.ts +22 -0
- package/script/tl/2_serialize.d.ts.map +1 -0
- package/script/tl/2_serialize.js +164 -0
- package/script/tl/2_serialize_test.d.ts.map +1 -0
- package/script/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
- package/script/tl/3_tl_reader.d.ts.map +1 -0
- package/script/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
- package/script/tl/3_utilities.d.ts +5 -5
- package/script/tl/3_utilities.d.ts.map +1 -1
- package/script/tl/3_utilities.js +9 -10
- package/script/tl/4_rpc_result.d.ts +27 -0
- package/script/tl/4_rpc_result.d.ts.map +1 -0
- package/{esm/tl/8_message_container.d.ts → script/tl/4_rpc_result.js} +12 -12
- package/{esm/tl/5_tl_writer.d.ts → script/tl/4_tl_writer.d.ts} +2 -2
- package/script/tl/4_tl_writer.d.ts.map +1 -0
- package/script/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
- package/script/tl/5_message.d.ts +39 -0
- package/script/tl/5_message.d.ts.map +1 -0
- package/script/tl/5_message.js +106 -0
- package/script/tl/5_message_test.d.ts.map +1 -0
- package/script/transport/3_transport_provider_tcp.d.ts +14 -0
- package/script/transport/3_transport_provider_tcp.d.ts.map +1 -0
- package/script/transport/3_transport_provider_tcp.js +19 -0
- package/script/types/0_birthday.d.ts +2 -2
- package/script/types/0_birthday.d.ts.map +1 -1
- package/script/types/0_callback_query_answer.d.ts +2 -2
- package/script/types/0_callback_query_answer.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +3 -3
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.js +1 -11
- package/script/types/0_chat_member_rights.d.ts +3 -3
- package/script/types/0_chat_member_rights.d.ts.map +1 -1
- package/script/types/0_chat_member_rights.js +3 -3
- package/script/types/0_chat_photo.d.ts +2 -2
- package/script/types/0_chat_photo.d.ts.map +1 -1
- package/script/types/0_chat_photo.js +1 -1
- package/script/types/0_contact.d.ts +2 -2
- package/script/types/0_contact.d.ts.map +1 -1
- package/script/types/0_dice.d.ts +2 -2
- package/script/types/0_dice.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.d.ts +2 -2
- package/script/types/0_giveaway_parameters.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.js +2 -2
- package/script/types/0_link_preview.d.ts +2 -2
- package/script/types/0_link_preview.d.ts.map +1 -1
- package/script/types/0_live_stream_channel.d.ts +2 -2
- package/script/types/0_live_stream_channel.d.ts.map +1 -1
- package/script/types/0_location.d.ts +2 -2
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_location.js +4 -4
- package/script/types/0_mask_position.d.ts +2 -2
- package/script/types/0_mask_position.d.ts.map +1 -1
- package/script/types/0_message_entity.d.ts +3 -3
- package/script/types/0_message_entity.d.ts.map +1 -1
- package/script/types/0_message_entity.js +41 -41
- package/script/types/0_message_search_filter.d.ts +2 -2
- package/script/types/0_message_search_filter.d.ts.map +1 -1
- package/script/types/0_message_search_filter.js +14 -15
- package/script/types/0_opening_hours.d.ts +2 -2
- package/script/types/0_opening_hours.d.ts.map +1 -1
- package/script/types/0_poll_option.d.ts +2 -2
- package/script/types/0_poll_option.d.ts.map +1 -1
- package/script/types/0_reaction.d.ts +3 -3
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_reaction.js +3 -3
- package/script/types/0_restriction_reason.d.ts +2 -2
- package/script/types/0_restriction_reason.d.ts.map +1 -1
- package/script/types/0_thumbnail.d.ts +2 -2
- package/script/types/0_thumbnail.d.ts.map +1 -1
- package/script/types/0_thumbnail.js +2 -2
- package/script/types/0_video_chat.d.ts +2 -2
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/0_video_chat.js +1 -1
- package/script/types/0_voice.d.ts +2 -2
- package/script/types/0_voice.d.ts.map +1 -1
- package/script/types/1_animation.d.ts +2 -2
- 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 +2 -2
- 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 +9 -2
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.js +8 -8
- package/script/types/1_chat_p.d.ts +5 -5
- 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 +2 -2
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_document.js +1 -1
- package/script/types/1_giveaway.d.ts +2 -2
- package/script/types/1_giveaway.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +3 -3
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +17 -44
- package/script/types/1_message_reaction.d.ts +2 -2
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +4 -4
- package/script/types/1_photo.d.ts +5 -5
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_photo.js +3 -3
- package/script/types/1_poll.d.ts +2 -2
- package/script/types/1_poll.d.ts.map +1 -1
- package/script/types/1_reaction_count.d.ts +2 -2
- package/script/types/1_reaction_count.d.ts.map +1 -1
- package/script/types/1_reply_quote.d.ts +2 -2
- package/script/types/1_reply_quote.d.ts.map +1 -1
- package/script/types/1_sticker.d.ts +3 -3
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +8 -8
- package/script/types/1_story_privacy.d.ts +3 -3
- package/script/types/1_story_privacy.d.ts.map +1 -1
- package/script/types/1_story_privacy.js +13 -13
- package/script/types/1_story_reaction.d.ts +2 -2
- package/script/types/1_story_reaction.d.ts.map +1 -1
- package/script/types/1_user.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/1_video_note.js +1 -1
- package/script/types/2_business_connection.d.ts +2 -2
- package/script/types/2_business_connection.d.ts.map +1 -1
- package/script/types/2_business_connection.js +1 -2
- package/script/types/2_chat.d.ts +2 -2
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +10 -10
- package/script/types/2_chat_member.d.ts +2 -2
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +9 -9
- package/script/types/2_chosen_inline_result.d.ts +2 -2
- package/script/types/2_chosen_inline_result.d.ts.map +1 -1
- package/script/types/2_chosen_inline_result.js +4 -4
- package/script/types/2_game.d.ts +2 -2
- package/script/types/2_game.d.ts.map +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_inactive_chat.d.ts +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 +3 -3
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +14 -20
- package/script/types/2_inline_query.d.ts +2 -2
- package/script/types/2_inline_query.d.ts.map +1 -1
- package/script/types/2_inline_query.js +7 -7
- package/script/types/2_invite_link.d.ts +2 -2
- package/script/types/2_invite_link.d.ts.map +1 -1
- package/script/types/2_invite_link.js +1 -2
- package/script/types/2_message_reaction_count.d.ts +2 -2
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reactions.d.ts +2 -2
- 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 +2 -2
- 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_interactions.d.ts +2 -2
- package/script/types/2_story_interactions.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.d.ts +3 -3
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +18 -28
- package/script/types/3_chat_member_updated.d.ts +2 -2
- package/script/types/3_chat_member_updated.d.ts.map +1 -1
- package/script/types/3_chat_member_updated.js +6 -6
- package/script/types/3_reply_markup.d.ts +3 -3
- package/script/types/3_reply_markup.d.ts.map +1 -1
- package/script/types/3_reply_markup.js +11 -21
- package/script/types/3_story.d.ts +2 -2
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/4_inline_query_result.d.ts +3 -3
- package/script/types/4_inline_query_result.d.ts.map +1 -1
- package/script/types/4_inline_query_result.js +52 -160
- package/script/types/4_message.d.ts +3 -3
- package/script/types/4_message.d.ts.map +1 -1
- package/script/types/4_message.js +67 -58
- package/script/types/5_callback_query.d.ts +3 -3
- package/script/types/5_callback_query.d.ts.map +1 -1
- package/script/types/5_callback_query.js +4 -4
- package/script/types/5_chat_list_item.d.ts +3 -3
- package/script/types/5_chat_list_item.d.ts.map +1 -1
- package/script/types/5_chat_list_item.js +1 -1
- package/script/types/5_inline_query_answer.d.ts +2 -2
- package/script/types/5_inline_query_answer.d.ts.map +1 -1
- package/script/types/_file_id.d.ts +2 -2
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +3 -3
- package/script/types/_getters.d.ts +7 -7
- package/script/types/_getters.d.ts.map +1 -1
- package/esm/tl/1_tl_object.d.ts +0 -64
- package/esm/tl/1_tl_object.d.ts.map +0 -1
- package/esm/tl/1_tl_object.js +0 -221
- package/esm/tl/1_tl_object_test.d.ts.map +0 -1
- package/esm/tl/2_types.d.ts +0 -28060
- package/esm/tl/2_types.d.ts.map +0 -1
- package/esm/tl/2_types.js +0 -68685
- package/esm/tl/2_types_test.d.ts.map +0 -1
- package/esm/tl/3_deserialize.d.ts +0 -23
- package/esm/tl/3_deserialize.d.ts.map +0 -1
- package/esm/tl/3_functions.d.ts +0 -14094
- package/esm/tl/3_functions.d.ts.map +0 -1
- package/esm/tl/3_functions.js +0 -28475
- package/esm/tl/3_functions_test.d.ts.map +0 -1
- package/esm/tl/4_tl_reader.d.ts.map +0 -1
- package/esm/tl/5_tl_writer.d.ts.map +0 -1
- package/esm/tl/6_rpc_result.d.ts.map +0 -1
- package/esm/tl/6_rpc_result.js +0 -49
- package/esm/tl/7_message.d.ts.map +0 -1
- package/esm/tl/7_message.js +0 -90
- package/esm/tl/7_message_test.d.ts.map +0 -1
- package/esm/tl/8_message_container.d.ts.map +0 -1
- package/esm/tl/8_message_container.js +0 -72
- package/script/tl/1_tl_object.d.ts +0 -64
- package/script/tl/1_tl_object.d.ts.map +0 -1
- package/script/tl/1_tl_object.js +0 -228
- package/script/tl/1_tl_object_test.d.ts.map +0 -1
- package/script/tl/2_types.d.ts +0 -28060
- package/script/tl/2_types.d.ts.map +0 -1
- package/script/tl/2_types.js +0 -70558
- package/script/tl/2_types_test.d.ts.map +0 -1
- package/script/tl/3_deserialize.d.ts +0 -23
- package/script/tl/3_deserialize.d.ts.map +0 -1
- package/script/tl/3_functions.d.ts +0 -14094
- package/script/tl/3_functions.d.ts.map +0 -1
- package/script/tl/3_functions.js +0 -29121
- package/script/tl/3_functions_test.d.ts.map +0 -1
- package/script/tl/4_tl_reader.d.ts.map +0 -1
- package/script/tl/5_tl_writer.d.ts.map +0 -1
- package/script/tl/6_rpc_result.d.ts +0 -30
- package/script/tl/6_rpc_result.d.ts.map +0 -1
- package/script/tl/6_rpc_result.js +0 -53
- package/script/tl/7_message.d.ts +0 -32
- package/script/tl/7_message.d.ts.map +0 -1
- package/script/tl/7_message.js +0 -95
- package/script/tl/7_message_test.d.ts.map +0 -1
- package/script/tl/8_message_container.d.ts +0 -32
- package/script/tl/8_message_container.d.ts.map +0 -1
- package/script/tl/8_message_container.js +0 -76
|
@@ -18,63 +18,63 @@
|
|
|
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 { is } from "../2_tl.js";
|
|
22
22
|
export function constructMessageEntity(obj) {
|
|
23
|
-
if (obj
|
|
23
|
+
if (is("messageEntityMention", obj)) {
|
|
24
24
|
return { type: "mention", offset: obj.offset, length: obj.length };
|
|
25
25
|
}
|
|
26
|
-
else if (obj
|
|
26
|
+
else if (is("messageEntityHashtag", obj)) {
|
|
27
27
|
return { type: "hashtag", offset: obj.offset, length: obj.length };
|
|
28
28
|
}
|
|
29
|
-
else if (obj
|
|
29
|
+
else if (is("messageEntityBotCommand", obj)) {
|
|
30
30
|
return { type: "botCommand", offset: obj.offset ?? 0, length: obj.length };
|
|
31
31
|
}
|
|
32
|
-
else if (obj
|
|
32
|
+
else if (is("messageEntityUrl", obj)) {
|
|
33
33
|
return { type: "url", offset: obj.offset, length: obj.length };
|
|
34
34
|
}
|
|
35
|
-
else if (obj
|
|
35
|
+
else if (is("messageEntityEmail", obj)) {
|
|
36
36
|
return { type: "email", offset: obj.offset, length: obj.length };
|
|
37
37
|
}
|
|
38
|
-
else if (obj
|
|
38
|
+
else if (is("messageEntityBold", obj)) {
|
|
39
39
|
return { type: "bold", offset: obj.offset, length: obj.length };
|
|
40
40
|
}
|
|
41
|
-
else if (obj
|
|
41
|
+
else if (is("messageEntityItalic", obj)) {
|
|
42
42
|
return { type: "italic", offset: obj.offset, length: obj.length };
|
|
43
43
|
}
|
|
44
|
-
else if (obj
|
|
44
|
+
else if (is("messageEntityCode", obj)) {
|
|
45
45
|
return { type: "code", offset: obj.offset, length: obj.length };
|
|
46
46
|
}
|
|
47
|
-
else if (obj
|
|
47
|
+
else if (is("messageEntityPre", obj)) {
|
|
48
48
|
return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
|
|
49
49
|
}
|
|
50
|
-
else if (obj
|
|
50
|
+
else if (is("messageEntityTextUrl", obj)) {
|
|
51
51
|
return { type: "textLink", offset: obj.offset, length: obj.length, url: obj.url };
|
|
52
52
|
}
|
|
53
|
-
else if (obj
|
|
53
|
+
else if (is("messageEntityMentionName", obj)) {
|
|
54
54
|
return { type: "textMention", offset: obj.offset, length: obj.length, userId: Number(obj.user_id) };
|
|
55
55
|
}
|
|
56
|
-
else if (obj
|
|
56
|
+
else if (is("messageEntityCashtag", obj)) {
|
|
57
57
|
return { type: "cashtag", offset: obj.offset, length: obj.length };
|
|
58
58
|
}
|
|
59
|
-
else if (obj
|
|
59
|
+
else if (is("messageEntityPhone", obj)) {
|
|
60
60
|
return { type: "phoneNumber", offset: obj.offset, length: obj.length };
|
|
61
61
|
}
|
|
62
|
-
else if (obj
|
|
62
|
+
else if (is("messageEntityUnderline", obj)) {
|
|
63
63
|
return { type: "underline", offset: obj.offset, length: obj.length };
|
|
64
64
|
}
|
|
65
|
-
else if (obj
|
|
65
|
+
else if (is("messageEntityStrike", obj)) {
|
|
66
66
|
return { type: "strikethrough", offset: obj.offset, length: obj.length };
|
|
67
67
|
}
|
|
68
|
-
else if (obj
|
|
68
|
+
else if (is("messageEntityBlockquote", obj)) {
|
|
69
69
|
return { type: "blockquote", offset: obj.offset, length: obj.length };
|
|
70
70
|
}
|
|
71
|
-
else if (obj
|
|
71
|
+
else if (is("messageEntityBankCard", obj)) {
|
|
72
72
|
return { type: "bankCard", offset: obj.offset, length: obj.length };
|
|
73
73
|
}
|
|
74
|
-
else if (obj
|
|
74
|
+
else if (is("messageEntitySpoiler", obj)) {
|
|
75
75
|
return { type: "spoiler", offset: obj.offset, length: obj.length };
|
|
76
76
|
}
|
|
77
|
-
else if (obj
|
|
77
|
+
else if (is("messageEntityCustomEmoji", obj)) {
|
|
78
78
|
return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.document_id) };
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
@@ -85,65 +85,65 @@ export async function messageEntityToTlObject(entity, getEntity) {
|
|
|
85
85
|
const { offset, length } = entity;
|
|
86
86
|
switch (entity.type) {
|
|
87
87
|
case "mention":
|
|
88
|
-
return
|
|
88
|
+
return { _: "messageEntityMention", offset, length };
|
|
89
89
|
case "hashtag":
|
|
90
|
-
return
|
|
90
|
+
return { _: "messageEntityHashtag", offset, length };
|
|
91
91
|
case "botCommand":
|
|
92
|
-
return
|
|
92
|
+
return { _: "messageEntityBotCommand", offset, length };
|
|
93
93
|
case "url":
|
|
94
|
-
return
|
|
94
|
+
return { _: "messageEntityUrl", offset, length };
|
|
95
95
|
case "email":
|
|
96
|
-
return
|
|
96
|
+
return { _: "messageEntityEmail", offset, length };
|
|
97
97
|
case "bold":
|
|
98
|
-
return
|
|
98
|
+
return { _: "messageEntityBold", offset, length };
|
|
99
99
|
case "italic":
|
|
100
|
-
return
|
|
100
|
+
return { _: "messageEntityItalic", offset, length };
|
|
101
101
|
case "code":
|
|
102
|
-
return
|
|
102
|
+
return { _: "messageEntityCode", offset, length };
|
|
103
103
|
case "pre":
|
|
104
|
-
return
|
|
104
|
+
return { _: "messageEntityPre", offset, length, language: entity.language };
|
|
105
105
|
case "textLink": {
|
|
106
106
|
try {
|
|
107
107
|
const url = new URL(entity.url);
|
|
108
108
|
if (url.protocol == "tg:" && url.hostname == "user" && (url.pathname == "/" || url.pathname == "")) {
|
|
109
109
|
const id = Number(url.searchParams.get("id"));
|
|
110
110
|
if (!isNaN(id)) {
|
|
111
|
-
const entity_ = await getEntity(
|
|
111
|
+
const entity_ = await getEntity({ _: "peerUser", user_id: BigInt(id) });
|
|
112
112
|
if (!entity_) {
|
|
113
113
|
unreachable();
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return { _: "inputMessageEntityMentionName", offset, length, user_id: ({ _: "inputUser", user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) };
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
catch {
|
|
120
120
|
//
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return { _: "messageEntityTextUrl", offset, length, url: entity.url };
|
|
123
123
|
}
|
|
124
124
|
case "textMention": {
|
|
125
|
-
const entity_ = await getEntity(
|
|
125
|
+
const entity_ = await getEntity({ _: "peerUser", user_id: BigInt(entity.userId) });
|
|
126
126
|
if (!entity_) {
|
|
127
127
|
unreachable();
|
|
128
128
|
}
|
|
129
|
-
return
|
|
129
|
+
return { _: "inputMessageEntityMentionName", offset, length, user_id: ({ _: "inputUser", user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) };
|
|
130
130
|
}
|
|
131
131
|
case "cashtag":
|
|
132
|
-
return
|
|
132
|
+
return { _: "messageEntityCashtag", offset, length };
|
|
133
133
|
case "phoneNumber":
|
|
134
|
-
return
|
|
134
|
+
return { _: "messageEntityPhone", offset, length };
|
|
135
135
|
case "underline":
|
|
136
|
-
return
|
|
136
|
+
return { _: "messageEntityUnderline", offset, length };
|
|
137
137
|
case "strikethrough":
|
|
138
|
-
return
|
|
138
|
+
return { _: "messageEntityStrike", offset, length };
|
|
139
139
|
case "blockquote":
|
|
140
|
-
return
|
|
140
|
+
return { _: "messageEntityBlockquote", offset, length };
|
|
141
141
|
case "bankCard":
|
|
142
|
-
return
|
|
142
|
+
return { _: "messageEntityBankCard", offset, length };
|
|
143
143
|
case "spoiler":
|
|
144
|
-
return
|
|
144
|
+
return { _: "messageEntitySpoiler", offset, length };
|
|
145
145
|
case "customEmoji":
|
|
146
|
-
return
|
|
146
|
+
return { _: "messageEntityCustomEmoji", offset, length, document_id: BigInt(entity.customEmojiId) };
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
const priorities = {
|
|
@@ -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
|
export type MessageSearchFilter = "empty" | "animations" | "audios" | "documents" | "photos" | "videos" | "voiceMessages" | "photosAndVideos" | "links" | "chatPhotos" | "videoNotes" | "voiceMessagesAndVideoNotes" | "mentions" | "pinned";
|
|
22
|
-
export declare function messageSearchFilterToTlObject(filter: MessageSearchFilter):
|
|
22
|
+
export declare function messageSearchFilterToTlObject(filter: MessageSearchFilter): Api.MessagesFilter;
|
|
23
23
|
//# sourceMappingURL=0_message_search_filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_message_search_filter.d.ts","sourceRoot":"","sources":["../../src/types/0_message_search_filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_message_search_filter.d.ts","sourceRoot":"","sources":["../../src/types/0_message_search_filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAC3B,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,iBAAiB,GACjB,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,4BAA4B,GAC5B,UAAU,GACV,QAAQ,CAAC;AAEb,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAAC,cAAc,CAiC7F"}
|
|
@@ -18,37 +18,36 @@
|
|
|
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 { types } from "../2_tl.js";
|
|
22
21
|
export function messageSearchFilterToTlObject(filter) {
|
|
23
22
|
switch (filter) {
|
|
24
23
|
case "empty":
|
|
25
|
-
return
|
|
24
|
+
return { _: "inputMessagesFilterEmpty" };
|
|
26
25
|
case "animations":
|
|
27
|
-
return
|
|
26
|
+
return { _: "inputMessagesFilterGif" };
|
|
28
27
|
case "audios":
|
|
29
|
-
return
|
|
28
|
+
return { _: "inputMessagesFilterMusic" };
|
|
30
29
|
case "documents":
|
|
31
|
-
return
|
|
30
|
+
return { _: "inputMessagesFilterDocument" };
|
|
32
31
|
case "photos":
|
|
33
|
-
return
|
|
32
|
+
return { _: "inputMessagesFilterPhotos" };
|
|
34
33
|
case "videos":
|
|
35
|
-
return
|
|
34
|
+
return { _: "inputMessagesFilterVideo" };
|
|
36
35
|
case "voiceMessages":
|
|
37
|
-
return
|
|
36
|
+
return { _: "inputMessagesFilterVoice" };
|
|
38
37
|
case "photosAndVideos":
|
|
39
|
-
return
|
|
38
|
+
return { _: "inputMessagesFilterPhotoVideo" };
|
|
40
39
|
case "links":
|
|
41
|
-
return
|
|
40
|
+
return { _: "inputMessagesFilterUrl" };
|
|
42
41
|
case "chatPhotos":
|
|
43
|
-
return
|
|
42
|
+
return { _: "inputMessagesFilterChatPhotos" };
|
|
44
43
|
case "videoNotes":
|
|
45
|
-
return
|
|
44
|
+
return { _: "inputMessagesFilterRoundVideo" };
|
|
46
45
|
case "voiceMessagesAndVideoNotes":
|
|
47
|
-
return
|
|
46
|
+
return { _: "inputMessagesFilterRoundVoice" };
|
|
48
47
|
case "mentions":
|
|
49
|
-
return
|
|
48
|
+
return { _: "inputMessagesFilterMyMentions" };
|
|
50
49
|
case "pinned":
|
|
51
|
-
return
|
|
50
|
+
return { _: "inputMessagesFilterPinned" };
|
|
52
51
|
default:
|
|
53
52
|
unreachable();
|
|
54
53
|
}
|
|
@@ -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
|
export interface OpeningHours {
|
|
22
22
|
timezone: string;
|
|
23
23
|
intervals: [number, number][];
|
|
24
24
|
}
|
|
25
|
-
export declare function constructOpeningHours(hours:
|
|
25
|
+
export declare function constructOpeningHours(hours: Api.businessWorkHours): OpeningHours;
|
|
26
26
|
//# sourceMappingURL=0_opening_hours.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_opening_hours.d.ts","sourceRoot":"","sources":["../../src/types/0_opening_hours.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_opening_hours.d.ts","sourceRoot":"","sources":["../../src/types/0_opening_hours.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,iBAAiB,GAAG,YAAY,CAKhF"}
|
|
@@ -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
|
/** A poll option. */
|
|
22
22
|
export interface PollOption {
|
|
23
23
|
/** The option's text (1-100 characters). */
|
|
@@ -25,5 +25,5 @@ export interface PollOption {
|
|
|
25
25
|
/** Number of users that voted this option. */
|
|
26
26
|
voterCount: number;
|
|
27
27
|
}
|
|
28
|
-
export declare function constructPollOption(option:
|
|
28
|
+
export declare function constructPollOption(option: Api.PollAnswer, results: Array<Api.PollAnswerVoters>): PollOption;
|
|
29
29
|
//# sourceMappingURL=0_poll_option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_poll_option.d.ts","sourceRoot":"","sources":["../../src/types/0_poll_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_poll_option.d.ts","sourceRoot":"","sources":["../../src/types/0_poll_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,qBAAqB;AACrB,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAK5G"}
|
|
@@ -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
|
/** @unlisted */
|
|
22
22
|
export interface ReactionEmoji {
|
|
23
23
|
type: "emoji";
|
|
@@ -30,7 +30,7 @@ export interface ReactionCustomEmoji {
|
|
|
30
30
|
}
|
|
31
31
|
/** A reaction type. */
|
|
32
32
|
export type Reaction = ReactionEmoji | ReactionCustomEmoji;
|
|
33
|
-
export declare function constructReaction(reaction:
|
|
34
|
-
export declare function reactionToTlObject(reaction: Reaction):
|
|
33
|
+
export declare function constructReaction(reaction: Api.Reaction): Reaction;
|
|
34
|
+
export declare function reactionToTlObject(reaction: Reaction): Api.Reaction;
|
|
35
35
|
export declare function reactionEqual(left: Reaction, right: Reaction): boolean;
|
|
36
36
|
//# sourceMappingURL=0_reaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_reaction.d.ts","sourceRoot":"","sources":["../../src/types/0_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_reaction.d.ts","sourceRoot":"","sources":["../../src/types/0_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAErC,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,uBAAuB;AACvB,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAE3D,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAQlE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAEnE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAWtE"}
|
package/esm/types/0_reaction.js
CHANGED
|
@@ -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 { is } from "../2_tl.js";
|
|
22
22
|
export function constructReaction(reaction) {
|
|
23
|
-
if (reaction
|
|
23
|
+
if (is("reactionEmoji", reaction)) {
|
|
24
24
|
return { type: "emoji", emoji: reaction.emoticon };
|
|
25
25
|
}
|
|
26
|
-
else if (reaction
|
|
26
|
+
else if (is("reactionCustomEmoji", reaction)) {
|
|
27
27
|
return { type: "customEmoji", id: String(reaction.document_id) };
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
@@ -31,7 +31,7 @@ export function constructReaction(reaction) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export function reactionToTlObject(reaction) {
|
|
34
|
-
return reaction.type == "emoji" ?
|
|
34
|
+
return reaction.type == "emoji" ? ({ _: "reactionEmoji", emoticon: reaction.emoji }) : ({ _: "reactionCustomEmoji", document_id: BigInt(reaction.id) });
|
|
35
35
|
}
|
|
36
36
|
export function reactionEqual(left, right) {
|
|
37
37
|
if (left.type == "emoji") {
|
|
@@ -17,12 +17,12 @@
|
|
|
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
|
/** The reason for restricting an entity. */
|
|
22
22
|
export interface RestrictionReason {
|
|
23
23
|
platform: string;
|
|
24
24
|
reason: string;
|
|
25
25
|
text: string;
|
|
26
26
|
}
|
|
27
|
-
export declare function constructRestrictionReason(rr:
|
|
27
|
+
export declare function constructRestrictionReason(rr: Api.RestrictionReason): RestrictionReason;
|
|
28
28
|
//# sourceMappingURL=0_restriction_reason.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_restriction_reason.d.ts","sourceRoot":"","sources":["../../src/types/0_restriction_reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_restriction_reason.d.ts","sourceRoot":"","sources":["../../src/types/0_restriction_reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAEvF"}
|
|
@@ -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
|
/** A file or sticker thumbnail. */
|
|
22
22
|
export interface Thumbnail {
|
|
23
23
|
/** A file identifier that can be used to download or reuse the thumbnail. */
|
|
@@ -31,5 +31,5 @@ export interface Thumbnail {
|
|
|
31
31
|
/** Size of the file in bytes. */
|
|
32
32
|
fileSize: number;
|
|
33
33
|
}
|
|
34
|
-
export declare function constructThumbnail(size:
|
|
34
|
+
export declare function constructThumbnail(size: Api.photoSize, file: Api.document | Api.photo): Thumbnail;
|
|
35
35
|
//# sourceMappingURL=0_thumbnail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_thumbnail.d.ts","sourceRoot":"","sources":["../../src/types/0_thumbnail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_thumbnail.d.ts","sourceRoot":"","sources":["../../src/types/0_thumbnail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAGrC,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,KAAK,GAAG,SAAS,CAkBjG"}
|
package/esm/types/0_thumbnail.js
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
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 { is } from "../2_tl.js";
|
|
21
21
|
import { FileType, PhotoSourceType, serializeFileId, toUniqueFileId } from "./_file_id.js";
|
|
22
22
|
export function constructThumbnail(size, file) {
|
|
23
|
-
const type = file
|
|
24
|
-
const fileType = file
|
|
23
|
+
const type = is("photo", file) ? FileType.Photo : FileType.Thumbnail;
|
|
24
|
+
const fileType = is("photo", file) ? FileType.Photo : FileType.Document;
|
|
25
25
|
const fileId_ = {
|
|
26
26
|
type,
|
|
27
27
|
dcId: file.dc_id,
|
|
@@ -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
|
/** @unlisted */
|
|
22
22
|
export interface _VideoChatCommon {
|
|
23
23
|
/** The video chat's unique identifier. */
|
|
@@ -60,5 +60,5 @@ export interface VideoChatEnded extends _VideoChatCommon {
|
|
|
60
60
|
duration: number;
|
|
61
61
|
}
|
|
62
62
|
export type VideoChat = VideoChatActive | VideoChatScheduled | VideoChatEnded;
|
|
63
|
-
export declare function constructVideoChat(call:
|
|
63
|
+
export declare function constructVideoChat(call: Api.GroupCall): VideoChat;
|
|
64
64
|
//# sourceMappingURL=0_video_chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_video_chat.d.ts","sourceRoot":"","sources":["../../src/types/0_video_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_video_chat.d.ts","sourceRoot":"","sources":["../../src/types/0_video_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAErC,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,wBAAwB;IACjF,IAAI,EAAE,QAAQ,CAAC;IACf,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB,EAAE,wBAAwB;IACpF,IAAI,EAAE,WAAW,CAAC;IAClB,iEAAiE;IACjE,YAAY,EAAE,IAAI,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,IAAI,EAAE,OAAO,CAAC;IACd,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE9E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,GAAG,SAAS,CAgCjE"}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { fromUnixTimestamp } from "../1_utilities.js";
|
|
21
|
-
import {
|
|
21
|
+
import { is } from "../2_tl.js";
|
|
22
22
|
export function constructVideoChat(call) {
|
|
23
23
|
const id = String(call.id);
|
|
24
|
-
if (call
|
|
24
|
+
if (is("groupCallDiscarded", call)) {
|
|
25
25
|
return {
|
|
26
26
|
type: "ended",
|
|
27
27
|
id,
|
package/esm/types/0_voice.d.ts
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
|
/** A voice note. */
|
|
22
22
|
export interface Voice {
|
|
23
23
|
/** A file identifier that can be used to download or reuse this file. */
|
|
@@ -31,5 +31,5 @@ export interface Voice {
|
|
|
31
31
|
/** Size of the file in bytes. */
|
|
32
32
|
fileSize: number;
|
|
33
33
|
}
|
|
34
|
-
export declare function constructVoice(document:
|
|
34
|
+
export declare function constructVoice(document: Api.document, audioAttributes: Api.documentAttributeAudio, fileId: string, fileUniqueId: string): Voice;
|
|
35
35
|
//# sourceMappingURL=0_voice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_voice.d.ts","sourceRoot":"","sources":["../../src/types/0_voice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_voice.d.ts","sourceRoot":"","sources":["../../src/types/0_voice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,oBAAoB;AACpB,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,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAQ/I"}
|
|
@@ -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 { Thumbnail } from "./0_thumbnail.js";
|
|
22
22
|
/** An animation file (GIF or H.264/MPEG-4 AVC video without sound). */
|
|
23
23
|
export interface Animation {
|
|
@@ -40,5 +40,5 @@ export interface Animation {
|
|
|
40
40
|
/** Size of the file in bytes. */
|
|
41
41
|
fileSize: number;
|
|
42
42
|
}
|
|
43
|
-
export declare function constructAnimation(document:
|
|
43
|
+
export declare function constructAnimation(document: Api.document, videoAttribute: Api.documentAttributeVideo | undefined, fileAttribute: Api.documentAttributeFilename | undefined, fileId: string, fileUniqueId: string): Animation;
|
|
44
44
|
//# sourceMappingURL=1_animation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_animation.d.ts","sourceRoot":"","sources":["../../src/types/1_animation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_animation.d.ts","sourceRoot":"","sources":["../../src/types/1_animation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,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
|
@@ -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 { is } from "../2_tl.js";
|
|
21
21
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
22
22
|
export function constructAnimation(document, videoAttribute, fileAttribute, fileId, fileUniqueId) {
|
|
23
23
|
return {
|
|
@@ -26,7 +26,7 @@ export function constructAnimation(document, videoAttribute, fileAttribute, file
|
|
|
26
26
|
width: videoAttribute?.w ?? 0,
|
|
27
27
|
height: videoAttribute?.h ?? 0,
|
|
28
28
|
duration: videoAttribute?.duration ?? 0,
|
|
29
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => v
|
|
29
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
30
30
|
fileName: fileAttribute?.file_name,
|
|
31
31
|
mimeType: document.mime_type,
|
|
32
32
|
fileSize: Number(document.size),
|
package/esm/types/1_audio.d.ts
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 { Thumbnail } from "./0_thumbnail.js";
|
|
22
22
|
/** An audio file. */
|
|
23
23
|
export interface Audio {
|
|
@@ -38,5 +38,5 @@ export interface Audio {
|
|
|
38
38
|
/** Thumbnails of the album cover to which the music file belongs. */
|
|
39
39
|
thumbnails: Thumbnail[];
|
|
40
40
|
}
|
|
41
|
-
export declare function constructAudio(document:
|
|
41
|
+
export declare function constructAudio(document: Api.document, audioAttribute: Api.documentAttributeAudio | undefined, fileId: string, fileUniqueId: string): Audio;
|
|
42
42
|
//# sourceMappingURL=1_audio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_audio.d.ts","sourceRoot":"","sources":["../../src/types/1_audio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_audio.d.ts","sourceRoot":"","sources":["../../src/types/1_audio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,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
|
@@ -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 { is } from "../2_tl.js";
|
|
21
21
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
22
22
|
export function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
23
23
|
return {
|
|
@@ -28,6 +28,6 @@ export function constructAudio(document, audioAttribute, fileId, fileUniqueId) {
|
|
|
28
28
|
title: audioAttribute?.title,
|
|
29
29
|
mimeType: document.mime_type,
|
|
30
30
|
fileSize: Number(document.size),
|
|
31
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => v
|
|
31
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -17,42 +17,49 @@
|
|
|
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 { InputPeerGetter } from "./_getters.js";
|
|
22
22
|
import { ID } from "./0_id.js";
|
|
23
23
|
/** @unlisted */
|
|
24
24
|
export interface BotCommandScopeDefault {
|
|
25
|
+
/** @discriminator */
|
|
25
26
|
type: "default";
|
|
26
27
|
}
|
|
27
28
|
/** @unlisted */
|
|
28
29
|
export interface BotCommandScopeAllPrivateChats {
|
|
30
|
+
/** @discriminator */
|
|
29
31
|
type: "allPrivateChats";
|
|
30
32
|
}
|
|
31
33
|
/** @unlisted */
|
|
32
34
|
export interface BotCommandScopeAllGroupChats {
|
|
35
|
+
/** @discriminator */
|
|
33
36
|
type: "allGroupChats";
|
|
34
37
|
}
|
|
35
38
|
/** @unlisted */
|
|
36
39
|
export interface BotCommandScopeAllChatAdministrators {
|
|
40
|
+
/** @discriminator */
|
|
37
41
|
type: "allChatAdministrators";
|
|
38
42
|
}
|
|
39
43
|
/** @unlisted */
|
|
40
44
|
export interface BotCommandScopeChat {
|
|
45
|
+
/** @discriminator */
|
|
41
46
|
type: "chat";
|
|
42
47
|
chatId: ID;
|
|
43
48
|
}
|
|
44
49
|
/** @unlisted */
|
|
45
50
|
export interface BotCommandScopeChatAdministrators {
|
|
51
|
+
/** @discriminator */
|
|
46
52
|
type: "chatAdministrators";
|
|
47
53
|
chatId: ID;
|
|
48
54
|
}
|
|
49
55
|
/** @unlisted */
|
|
50
56
|
export interface BotCommandScopeChatMember {
|
|
57
|
+
/** @discriminator */
|
|
51
58
|
type: "chatMember";
|
|
52
59
|
chatId: ID;
|
|
53
60
|
userId: number;
|
|
54
61
|
}
|
|
55
62
|
/** A type specifying where bot commads are available. */
|
|
56
63
|
export type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember;
|
|
57
|
-
export declare function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise<
|
|
64
|
+
export declare function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise<Api.BotCommandScope>;
|
|
58
65
|
//# sourceMappingURL=1_bot_command_scope.d.ts.map
|
|
@@ -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,
|
|
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,EAAM,MAAM,YAAY,CAAC;AACrC,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"}
|