@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
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { fromUnixTimestamp } from "../1_utilities.js";
|
|
22
|
-
import {
|
|
22
|
+
import { is } from "../2_tl.js";
|
|
23
23
|
import { constructChatP } from "./1_chat_p.js";
|
|
24
24
|
export function constructInactiveChat(chat_, lastActivity) {
|
|
25
|
-
if (chat_
|
|
25
|
+
if (is("chatEmpty", chat_)) {
|
|
26
26
|
unreachable();
|
|
27
27
|
}
|
|
28
28
|
const chat = constructChatP(chat_);
|
|
@@ -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 { UsernameResolver } from "./_getters.js";
|
|
22
22
|
import { LoginUrl } from "./0_login_url.js";
|
|
23
23
|
import { MiniAppInfo } from "./0_mini_app_info.js";
|
|
@@ -67,6 +67,6 @@ export interface InlineKeyboardButtonPay extends _InlineKeyboardButtonBase {
|
|
|
67
67
|
}
|
|
68
68
|
/** A button of an inline keyboard. */
|
|
69
69
|
export type InlineKeyboardButton = InlineKeyboardButtonURL | InlineKeyboardButtonCallback | InlineKeyboardButtonMiniApp | InlineKeyboardButtonLogin | InlineKeyboardButtonSwitchInline | InlineKeyboardButtonSwitchInlineCurrent | InlineKeyboardButtonGame | InlineKeyboardButtonPay;
|
|
70
|
-
export declare function constructInlineKeyboardButton(button_:
|
|
71
|
-
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise<
|
|
70
|
+
export declare function constructInlineKeyboardButton(button_: Api.KeyboardButton): InlineKeyboardButton;
|
|
71
|
+
export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise<Api.KeyboardButton>;
|
|
72
72
|
//# sourceMappingURL=2_inline_keyboard_button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_inline_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"2_inline_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAwB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEzE,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,yBAAyB;IAC7E,qBAAqB;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA4B,SAAQ,yBAAyB;IAC5E,qBAAqB;IACrB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB;IAC1E,qBAAqB;IACrB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gCAAiC,SAAQ,yBAAyB;IACjF,qBAAqB;IACrB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,gBAAgB;AAChB,MAAM,WAAW,uCAAwC,SAAQ,yBAAyB;IACxF,qBAAqB;IACrB,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,qBAAqB;IACrB,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CACpC;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,qBAAqB;IACrB,GAAG,EAAE,OAAO,CAAC;CACd;AAED,sCAAsC;AACtC,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,4BAA4B,GAC5B,2BAA2B,GAC3B,yBAAyB,GACzB,gCAAgC,GAChC,uCAAuC,GACvC,wBAAwB,GACxB,uBAAuB,CAAC;AAE5B,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,GAAG,oBAAoB,CAsB/F;AAED,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAkBlJ"}
|
|
@@ -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 { is } from "../2_tl.js";
|
|
22
22
|
import { constructMiniAppInfo } from "./0_mini_app_info.js";
|
|
23
23
|
export function constructInlineKeyboardButton(button_) {
|
|
24
|
-
if (button_
|
|
24
|
+
if (is("keyboardButtonUrl", button_)) {
|
|
25
25
|
return { text: button_.text, url: button_.url };
|
|
26
26
|
}
|
|
27
|
-
else if (button_
|
|
27
|
+
else if (is("keyboardButtonCallback", button_)) {
|
|
28
28
|
return { text: button_.text, callbackData: new TextDecoder().decode(button_.data) };
|
|
29
29
|
}
|
|
30
|
-
else if (button_
|
|
30
|
+
else if (is("keyboardButtonWebView", button_) || is("keyboardButtonSimpleWebView", button_)) {
|
|
31
31
|
return { text: button_.text, miniApp: constructMiniAppInfo(button_.url) };
|
|
32
32
|
}
|
|
33
|
-
else if (button_
|
|
33
|
+
else if (is("keyboardButtonUrlAuth", button_)) {
|
|
34
34
|
return { text: button_.text, loginUrl: { url: button_.url, forwardText: button_.fwd_text } };
|
|
35
35
|
}
|
|
36
|
-
else if (button_
|
|
36
|
+
else if (is("keyboardButtonSwitchInline", button_)) {
|
|
37
37
|
if (button_.same_peer) {
|
|
38
38
|
return { text: button_.text, switchInlineQueryCurrentChat: button_.query };
|
|
39
39
|
}
|
|
@@ -41,10 +41,10 @@ export function constructInlineKeyboardButton(button_) {
|
|
|
41
41
|
return { text: button_.text, switchInlineQuery: button_.query };
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
else if (button_
|
|
44
|
+
else if (is("keyboardButtonBuy", button_)) {
|
|
45
45
|
return { text: button_.text, pay: true };
|
|
46
46
|
}
|
|
47
|
-
else if (button_
|
|
47
|
+
else if (is("keyboardButtonGame", button_)) {
|
|
48
48
|
return { text: button_.text, callbackGame: {} };
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
@@ -53,31 +53,25 @@ export function constructInlineKeyboardButton(button_) {
|
|
|
53
53
|
}
|
|
54
54
|
export async function inlineKeyboardButtonToTlObject(button, usernameResolver) {
|
|
55
55
|
if ("url" in button) {
|
|
56
|
-
return
|
|
56
|
+
return { _: "keyboardButtonUrl", text: button.text, url: button.url };
|
|
57
57
|
}
|
|
58
58
|
else if ("callbackData" in button) {
|
|
59
|
-
return
|
|
59
|
+
return { _: "keyboardButtonCallback", text: button.text, data: new TextEncoder().encode(button.callbackData) };
|
|
60
60
|
}
|
|
61
61
|
else if ("miniApp" in button) {
|
|
62
|
-
return
|
|
62
|
+
return { _: "keyboardButtonWebView", text: button.text, url: button.miniApp.url };
|
|
63
63
|
}
|
|
64
64
|
else if ("loginUrl" in button) {
|
|
65
|
-
return
|
|
66
|
-
text: button.text,
|
|
67
|
-
url: button.loginUrl.url,
|
|
68
|
-
fwd_text: button.loginUrl.forwardText,
|
|
69
|
-
bot: button.loginUrl.botUsername ? await usernameResolver(button.loginUrl.botUsername) : new types.InputUserSelf(),
|
|
70
|
-
request_write_access: button.loginUrl.requestWriteAccess || undefined,
|
|
71
|
-
});
|
|
65
|
+
return { _: "inputKeyboardButtonUrlAuth", text: button.text, url: button.loginUrl.url, fwd_text: button.loginUrl.forwardText, bot: button.loginUrl.botUsername ? await usernameResolver(button.loginUrl.botUsername) : { _: "inputUserSelf" }, request_write_access: button.loginUrl.requestWriteAccess || undefined };
|
|
72
66
|
}
|
|
73
67
|
else if ("switchInlineQuery" in button) {
|
|
74
|
-
return
|
|
68
|
+
return { _: "keyboardButtonSwitchInline", text: button.text, query: button.switchInlineQuery };
|
|
75
69
|
}
|
|
76
70
|
else if ("switchInlineQueryCurrentChat" in button) {
|
|
77
|
-
return
|
|
71
|
+
return { _: "keyboardButtonSwitchInline", text: button.text, query: button.switchInlineQueryCurrentChat, same_peer: true };
|
|
78
72
|
}
|
|
79
73
|
else if ("pay" in button) {
|
|
80
|
-
return
|
|
74
|
+
return { _: "keyboardButtonBuy", text: button.text };
|
|
81
75
|
}
|
|
82
76
|
else {
|
|
83
77
|
unreachable();
|
|
@@ -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 { EntityGetter } from "./_getters.js";
|
|
22
22
|
import { Location } from "./0_location.js";
|
|
23
23
|
import { User } from "./1_user.js";
|
|
@@ -36,5 +36,5 @@ export interface InlineQuery {
|
|
|
36
36
|
/** The location of the user who made the inline query. */
|
|
37
37
|
location?: Location;
|
|
38
38
|
}
|
|
39
|
-
export declare function constructInlineQuery(query_:
|
|
39
|
+
export declare function constructInlineQuery(query_: Api.updateBotInlineQuery, getEntity: EntityGetter): Promise<InlineQuery>;
|
|
40
40
|
//# sourceMappingURL=2_inline_query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"2_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAmC1H"}
|
|
@@ -18,37 +18,37 @@
|
|
|
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
|
import { constructLocation } from "./0_location.js";
|
|
23
23
|
import { constructUser } from "./1_user.js";
|
|
24
24
|
export async function constructInlineQuery(query_, getEntity) {
|
|
25
|
-
const user_ = await getEntity(
|
|
25
|
+
const user_ = await getEntity({ _: "peerUser", user_id: query_.user_id });
|
|
26
26
|
if (user_ == null) {
|
|
27
27
|
unreachable();
|
|
28
28
|
}
|
|
29
29
|
const user = constructUser(user_);
|
|
30
30
|
let chatType;
|
|
31
31
|
if (query_.peer_type !== undefined) {
|
|
32
|
-
if (query_.peer_type
|
|
32
|
+
if (is("inlineQueryPeerTypeSameBotPM", query_.peer_type)) {
|
|
33
33
|
chatType = "private";
|
|
34
34
|
}
|
|
35
|
-
else if (query_.peer_type
|
|
35
|
+
else if (is("inlineQueryPeerTypeBotPM", query_.peer_type) || is("inlineQueryPeerTypePM", query_.peer_type)) {
|
|
36
36
|
chatType = "sender";
|
|
37
37
|
}
|
|
38
|
-
else if (query_.peer_type
|
|
38
|
+
else if (is("inlineQueryPeerTypeChat", query_.peer_type)) {
|
|
39
39
|
chatType = "group";
|
|
40
40
|
}
|
|
41
|
-
else if (query_.peer_type
|
|
41
|
+
else if (is("inlineQueryPeerTypeMegagroup", query_.peer_type)) {
|
|
42
42
|
chatType = "supergroup";
|
|
43
43
|
}
|
|
44
|
-
else if (query_.peer_type
|
|
44
|
+
else if (is("inlineQueryPeerTypeBroadcast", query_.peer_type)) {
|
|
45
45
|
chatType = "channel";
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
unreachable();
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
const location = query_.geo !== undefined && query_.geo
|
|
51
|
+
const location = query_.geo !== undefined && is("geoPoint", query_.geo) ? constructLocation(query_.geo) : undefined;
|
|
52
52
|
return {
|
|
53
53
|
id: String(query_.query_id),
|
|
54
54
|
from: user,
|
|
@@ -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 { EntityGetter } from "./_getters.js";
|
|
22
22
|
import { User } from "./1_user.js";
|
|
23
23
|
/** A chat invite link. */
|
|
@@ -39,5 +39,5 @@ export interface InviteLink {
|
|
|
39
39
|
/** The number of pending join requests originating from this invite link. */
|
|
40
40
|
pendingJoinRequestCount?: number;
|
|
41
41
|
}
|
|
42
|
-
export declare function constructInviteLink(inviteLink_:
|
|
42
|
+
export declare function constructInviteLink(inviteLink_: Api.chatInviteExported, getEntity: EntityGetter): Promise<InviteLink>;
|
|
43
43
|
//# sourceMappingURL=2_invite_link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_invite_link.d.ts","sourceRoot":"","sources":["../../src/types/2_invite_link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"2_invite_link.d.ts","sourceRoot":"","sources":["../../src/types/2_invite_link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,0BAA0B;AAC1B,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,OAAO,EAAE,IAAI,CAAC;IACd,gGAAgG;IAChG,gBAAgB,EAAE,OAAO,CAAC;IAE1B,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAuB3H"}
|
|
@@ -19,10 +19,9 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject, fromUnixTimestamp } from "../1_utilities.js";
|
|
22
|
-
import { types } from "../2_tl.js";
|
|
23
22
|
import { constructUser } from "./1_user.js";
|
|
24
23
|
export async function constructInviteLink(inviteLink_, getEntity) {
|
|
25
|
-
const entity = await getEntity(
|
|
24
|
+
const entity = await getEntity({ _: "peerUser", user_id: inviteLink_.admin_id });
|
|
26
25
|
if (!entity) {
|
|
27
26
|
unreachable();
|
|
28
27
|
}
|
|
@@ -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 { EntityGetter } from "./_getters.js";
|
|
22
22
|
import { ChatP } from "./1_chat_p.js";
|
|
23
23
|
import { ReactionCount } from "./1_reaction_count.js";
|
|
@@ -32,5 +32,5 @@ export interface MessageReactionCount {
|
|
|
32
32
|
/** The reactions made to the post. */
|
|
33
33
|
reactions: ReactionCount[];
|
|
34
34
|
}
|
|
35
|
-
export declare function constructMessageReactionCount(update:
|
|
35
|
+
export declare function constructMessageReactionCount(update: Api.updateBotMessageReactions, getEntity: EntityGetter): Promise<MessageReactionCount | null>;
|
|
36
36
|
//# sourceMappingURL=2_message_reaction_count.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_message_reaction_count.d.ts","sourceRoot":"","sources":["../../src/types/2_message_reaction_count.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"2_message_reaction_count.d.ts","sourceRoot":"","sources":["../../src/types/2_message_reaction_count.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE9E,2DAA2D;AAC3D,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,IAAI,EAAE,KAAK,CAAC;IACZ,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,IAAI,EAAE,IAAI,CAAC;IACX,sCAAsC;IACtC,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,GAAG,CAAC,yBAAyB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAYxJ"}
|
|
@@ -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 { EntityGetter } from "./_getters.js";
|
|
22
22
|
import { Reaction } from "./0_reaction.js";
|
|
23
23
|
import { ChatP } from "./1_chat_p.js";
|
|
@@ -39,5 +39,5 @@ export interface MessageReactions {
|
|
|
39
39
|
/** The current reactions. */
|
|
40
40
|
newReactions: Reaction[];
|
|
41
41
|
}
|
|
42
|
-
export declare function constructMessageReactions(update:
|
|
42
|
+
export declare function constructMessageReactions(update: Api.updateBotMessageReaction, getEntity: EntityGetter): Promise<MessageReactions | null>;
|
|
43
43
|
//# sourceMappingURL=2_message_reactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_message_reactions.d.ts","sourceRoot":"","sources":["../../src/types/2_message_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"2_message_reactions.d.ts","sourceRoot":"","sources":["../../src/types/2_message_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,IAAI,EAAE,KAAK,CAAC;IACZ,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,6FAA6F;IAC7F,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,sDAAsD;IACtD,IAAI,EAAE,IAAI,CAAC;IACX,8BAA8B;IAC9B,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,6BAA6B;IAC7B,YAAY,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAkC/I"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { cleanObject, fromUnixTimestamp } from "../1_utilities.js";
|
|
21
|
-
import {
|
|
21
|
+
import { is } from "../2_tl.js";
|
|
22
22
|
import { constructReaction } from "./0_reaction.js";
|
|
23
23
|
import { constructChatP } from "./1_chat_p.js";
|
|
24
24
|
import { constructUser } from "./1_user.js";
|
|
@@ -38,7 +38,7 @@ export async function constructMessageReactions(update, getEntity) {
|
|
|
38
38
|
if (!entity) {
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
-
if (entity
|
|
41
|
+
if (is("user", entity)) {
|
|
42
42
|
user = constructUser(entity);
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
@@ -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 { Photo } from "./1_photo.js";
|
|
22
22
|
import { Video } from "./1_video.js";
|
|
23
23
|
/** @unlisted */
|
|
@@ -37,5 +37,5 @@ export interface StoryContentUnsupported {
|
|
|
37
37
|
}
|
|
38
38
|
/** A story content. */
|
|
39
39
|
export type StoryContent = StoryContentPhoto | StoryContentVideo | StoryContentUnsupported;
|
|
40
|
-
export declare function constructStoryContent(media:
|
|
40
|
+
export declare function constructStoryContent(media: Api.MessageMedia): StoryContent;
|
|
41
41
|
//# sourceMappingURL=2_story_content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_content.d.ts","sourceRoot":"","sources":["../../src/types/2_story_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"2_story_content.d.ts","sourceRoot":"","sources":["../../src/types/2_story_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAU,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,qBAAqB;IACrB,WAAW,EAAE,IAAI,CAAC;CACnB;AAED,uBAAuB;AACvB,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,uBAAuB,CAAC;AAE3F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,YAAY,GAAG,YAAY,CA0B3E"}
|
|
@@ -18,24 +18,24 @@
|
|
|
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 { as,
|
|
21
|
+
import { as, is } from "../2_tl.js";
|
|
22
22
|
import { FileType, serializeFileId, toUniqueFileId } from "./_file_id.js";
|
|
23
23
|
import { constructPhoto } from "./1_photo.js";
|
|
24
24
|
import { constructVideo } from "./1_video.js";
|
|
25
25
|
export function constructStoryContent(media) {
|
|
26
|
-
if (media
|
|
26
|
+
if (is("messageMediaPhoto", media)) {
|
|
27
27
|
if (!media.photo) {
|
|
28
28
|
unreachable();
|
|
29
29
|
}
|
|
30
|
-
const photo = constructPhoto(media.photo
|
|
30
|
+
const photo = constructPhoto(as("photo", media.photo));
|
|
31
31
|
return { photo };
|
|
32
32
|
}
|
|
33
|
-
else if (media
|
|
33
|
+
else if (is("messageMediaDocument", media)) {
|
|
34
34
|
const document = media.document;
|
|
35
|
-
if (!(document
|
|
35
|
+
if (!(is("document", document))) {
|
|
36
36
|
unreachable();
|
|
37
37
|
}
|
|
38
|
-
const video = document.attributes.find((v) => v
|
|
38
|
+
const video = document.attributes.find((v) => is("documentAttributeVideo", v));
|
|
39
39
|
if (!video) {
|
|
40
40
|
unreachable();
|
|
41
41
|
}
|
|
@@ -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 { StoryReaction } from "./1_story_reaction.js";
|
|
22
22
|
/** The interactions made with a story. */
|
|
23
23
|
export interface StoryInteractions {
|
|
@@ -26,5 +26,5 @@ export interface StoryInteractions {
|
|
|
26
26
|
views: number;
|
|
27
27
|
forwards: number;
|
|
28
28
|
}
|
|
29
|
-
export declare function constructStoryInteractions(views_:
|
|
29
|
+
export declare function constructStoryInteractions(views_: Api.storyViews): StoryInteractions;
|
|
30
30
|
//# sourceMappingURL=2_story_interactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_interactions.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"2_story_interactions.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE9E,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,iBAAiB,CAMpF"}
|
|
@@ -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 { EntityGetter } from "./_getters.js";
|
|
22
22
|
import { Location } from "./0_location.js";
|
|
23
23
|
import { MessageReference } from "./0_message_reference.js";
|
|
@@ -56,6 +56,6 @@ export interface StoryInteractiveAreaMessage extends _StoryInteractiveAreaPositi
|
|
|
56
56
|
}
|
|
57
57
|
/** A story's interactive area. */
|
|
58
58
|
export type StoryInteractiveArea = StoryInteractiveAreaLocation | StoryInteractiveAreaVenue | StoryInteractiveAreaReaction | StoryInteractiveAreaMessage;
|
|
59
|
-
export declare function constructStoryInteractiveArea(area:
|
|
60
|
-
export declare function storyInteractiveAreaToTlObject(area: StoryInteractiveArea, getEntity: EntityGetter): Promise<
|
|
59
|
+
export declare function constructStoryInteractiveArea(area: Api.MediaArea): StoryInteractiveArea;
|
|
60
|
+
export declare function storyInteractiveAreaToTlObject(area: StoryInteractiveArea, getEntity: EntityGetter): Promise<Api.MediaArea>;
|
|
61
61
|
//# sourceMappingURL=2_story_interactive_area.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAkC,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,gBAAgB;AAChB,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,4BAA4B,CAAC;CACxC;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACvF,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,mCAAmC;IACpF,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACvF,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA4B,SAAQ,mCAAmC;IACtF,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,kCAAkC;AAClC,MAAM,MAAM,oBAAoB,GAC5B,4BAA4B,GAC5B,yBAAyB,GACzB,4BAA4B,GAC5B,2BAA2B,CAAC;AAWhC,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,GAAG,oBAAoB,CA+BvF;AAKD,wBAAsB,8BAA8B,CAAC,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CA8BhI"}
|
|
@@ -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 { chatIdToPeer,
|
|
21
|
+
import { chatIdToPeer, is, peerToChatId } from "../2_tl.js";
|
|
22
22
|
import { constructLocation } from "./0_location.js";
|
|
23
23
|
import { constructReaction, reactionToTlObject } from "./0_reaction.js";
|
|
24
24
|
import { constructVenue } from "./1_venue.js";
|
|
@@ -33,18 +33,18 @@ function constructStoryInteractiveAreaPosition(position) {
|
|
|
33
33
|
}
|
|
34
34
|
export function constructStoryInteractiveArea(area) {
|
|
35
35
|
const position = constructStoryInteractiveAreaPosition(area.coordinates);
|
|
36
|
-
if (area
|
|
37
|
-
if (area.geo
|
|
36
|
+
if (is("mediaAreaGeoPoint", area)) {
|
|
37
|
+
if (is("geoPointEmpty", area.geo)) {
|
|
38
38
|
unreachable(); // will this ever be empty?
|
|
39
39
|
}
|
|
40
40
|
const location = constructLocation(area.geo);
|
|
41
41
|
return { position, location };
|
|
42
42
|
}
|
|
43
|
-
else if (area
|
|
43
|
+
else if (is("mediaAreaVenue", area)) {
|
|
44
44
|
const venue = constructVenue(area);
|
|
45
45
|
return { position, venue };
|
|
46
46
|
}
|
|
47
|
-
else if (area
|
|
47
|
+
else if (is("mediaAreaSuggestedReaction", area)) {
|
|
48
48
|
const reaction = constructReaction(area.reaction);
|
|
49
49
|
return {
|
|
50
50
|
position,
|
|
@@ -54,7 +54,7 @@ export function constructStoryInteractiveArea(area) {
|
|
|
54
54
|
dark: area.dark ? true : false,
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
else if (area
|
|
57
|
+
else if (is("mediaAreaChannelPost", area)) {
|
|
58
58
|
return {
|
|
59
59
|
position,
|
|
60
60
|
messageReference: {
|
|
@@ -68,48 +68,38 @@ export function constructStoryInteractiveArea(area) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
function storyInteractiveAreaPositionToTlObject(position) {
|
|
71
|
-
return
|
|
72
|
-
x: position.xPercentage,
|
|
73
|
-
y: position.yPercentage,
|
|
74
|
-
w: position.widthPercentage,
|
|
75
|
-
h: position.heightPercentage,
|
|
76
|
-
rotation: position.rotationAngle,
|
|
77
|
-
});
|
|
71
|
+
return { _: "mediaAreaCoordinates", x: position.xPercentage, y: position.yPercentage, w: position.widthPercentage, h: position.heightPercentage, rotation: position.rotationAngle };
|
|
78
72
|
}
|
|
79
73
|
export async function storyInteractiveAreaToTlObject(area, getEntity) {
|
|
80
74
|
const coordinates = storyInteractiveAreaPositionToTlObject(area.position);
|
|
81
75
|
if ("location" in area) {
|
|
82
|
-
const geo =
|
|
83
|
-
return
|
|
76
|
+
const geo = { _: "geoPoint", lat: area.location.latitude, long: area.location.longitude, access_hash: 0n, accuracy_radius: area.location.horizontalAccuracy };
|
|
77
|
+
return { _: "mediaAreaGeoPoint", coordinates, geo };
|
|
84
78
|
}
|
|
85
79
|
else if ("venue" in area) {
|
|
86
|
-
const geo =
|
|
87
|
-
return
|
|
80
|
+
const geo = { _: "geoPoint", lat: area.venue.location.latitude, long: area.venue.location.longitude, access_hash: 0n, accuracy_radius: area.venue.location.horizontalAccuracy };
|
|
81
|
+
return {
|
|
82
|
+
_: "mediaAreaVenue",
|
|
88
83
|
coordinates,
|
|
89
84
|
geo,
|
|
90
85
|
address: area.venue.address,
|
|
91
86
|
provider: "foursquare",
|
|
92
87
|
title: area.venue.title,
|
|
93
|
-
venue_id: area.venue.foursquareId || "",
|
|
94
|
-
venue_type: area.venue.foursquareType || "",
|
|
95
|
-
}
|
|
88
|
+
venue_id: area.venue.foursquareId || "",
|
|
89
|
+
venue_type: area.venue.foursquareType || "",
|
|
90
|
+
};
|
|
96
91
|
}
|
|
97
92
|
else if ("reaction" in area) {
|
|
98
93
|
const reaction = reactionToTlObject(area.reaction);
|
|
99
|
-
return
|
|
100
|
-
coordinates,
|
|
101
|
-
reaction,
|
|
102
|
-
dark: area.dark ? true : undefined,
|
|
103
|
-
flipped: area.flipped ? true : undefined,
|
|
104
|
-
});
|
|
94
|
+
return { _: "mediaAreaSuggestedReaction", coordinates, reaction, dark: area.dark ? true : undefined, flipped: area.flipped ? true : undefined };
|
|
105
95
|
}
|
|
106
96
|
else if ("messageReference" in area) {
|
|
107
97
|
const entity = await getEntity(chatIdToPeer(area.messageReference.chatId));
|
|
108
|
-
if (!(entity
|
|
98
|
+
if (!(is("channel", entity))) {
|
|
109
99
|
unreachable();
|
|
110
100
|
}
|
|
111
|
-
const channel =
|
|
112
|
-
return
|
|
101
|
+
const channel = { _: "inputChannel", channel_id: entity.id, access_hash: entity.access_hash ?? 0n };
|
|
102
|
+
return { _: "inputMediaAreaChannelPost", coordinates, channel, msg_id: area.messageReference.messageId };
|
|
113
103
|
}
|
|
114
104
|
else {
|
|
115
105
|
unreachable();
|
|
@@ -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 { EntityGetter } from "./_getters.js";
|
|
22
22
|
import { ChatP } from "./1_chat_p.js";
|
|
23
23
|
import { User } from "./1_user.js";
|
|
@@ -40,5 +40,5 @@ export interface ChatMemberUpdated {
|
|
|
40
40
|
/** Whether the user joined from a shared folder. */
|
|
41
41
|
viaSharedFolder?: boolean;
|
|
42
42
|
}
|
|
43
|
-
export declare function constructChatMemberUpdated(update:
|
|
43
|
+
export declare function constructChatMemberUpdated(update: Api.updateChannelParticipant | Api.updateChatParticipant, getEntity: EntityGetter): Promise<ChatMemberUpdated>;
|
|
44
44
|
//# sourceMappingURL=3_chat_member_updated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_chat_member_updated.d.ts","sourceRoot":"","sources":["../../src/types/3_chat_member_updated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"3_chat_member_updated.d.ts","sourceRoot":"","sources":["../../src/types/3_chat_member_updated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAuB,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAuB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErE,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,IAAI,EAAE,KAAK,CAAC;IACZ,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,uEAAuE;IACvE,IAAI,EAAE,IAAI,CAAC;IACX,yCAAyC;IACzC,aAAa,EAAE,UAAU,CAAC;IAC1B,yCAAyC;IACzC,aAAa,EAAE,UAAU,CAAC;IAC1B,oCAAoC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,GAAG,GAAG,CAAC,qBAAqB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0BtK"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject, fromUnixTimestamp } from "../1_utilities.js";
|
|
22
|
-
import {
|
|
22
|
+
import { is } from "../2_tl.js";
|
|
23
23
|
import { constructChatP } from "./1_chat_p.js";
|
|
24
24
|
import { constructUser } from "./1_user.js";
|
|
25
25
|
import { constructChatMember } from "./2_chat_member.js";
|
|
@@ -28,19 +28,19 @@ export async function constructChatMemberUpdated(update, getEntity) {
|
|
|
28
28
|
if (!update.prev_participant && !update.new_participant) {
|
|
29
29
|
unreachable();
|
|
30
30
|
}
|
|
31
|
-
const chat_ = await getEntity("channel_id" in update ?
|
|
32
|
-
const from_ = await getEntity(
|
|
31
|
+
const chat_ = await getEntity("channel_id" in update ? { ...update, _: "peerChannel" } : { ...update, _: "peerChat" });
|
|
32
|
+
const from_ = await getEntity({ _: "peerUser", user_id: update.actor_id });
|
|
33
33
|
if (!chat_ || !from_) {
|
|
34
34
|
unreachable();
|
|
35
35
|
}
|
|
36
|
-
const userPeer =
|
|
36
|
+
const userPeer = { ...update, _: "peerUser" };
|
|
37
37
|
const chat = constructChatP(chat_);
|
|
38
38
|
const from = constructUser(from_);
|
|
39
39
|
const date = fromUnixTimestamp(update.date);
|
|
40
|
-
const oldChatMember = await constructChatMember(update.prev_participant ??
|
|
41
|
-
const newChatMember = await constructChatMember(update.new_participant ??
|
|
40
|
+
const oldChatMember = await constructChatMember(update.prev_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getEntity);
|
|
41
|
+
const newChatMember = await constructChatMember(update.new_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getEntity);
|
|
42
42
|
const viaSharedFolder = "via_chatlist" in update ? update.via_chatlist ? true : update.invite ? false : undefined : undefined;
|
|
43
|
-
const inviteLink = (update.invite && update.invite
|
|
43
|
+
const inviteLink = (update.invite && is("chatInviteExported", update.invite)) ? await constructInviteLink(update.invite, getEntity) : undefined;
|
|
44
44
|
return cleanObject({
|
|
45
45
|
chat,
|
|
46
46
|
from,
|
|
@@ -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 { UsernameResolver } from "./_getters.js";
|
|
22
22
|
import { KeyboardButton } from "./1_keyboard_button.js";
|
|
23
23
|
import { InlineKeyboardButton } from "./2_inline_keyboard_button.js";
|
|
@@ -66,6 +66,6 @@ export interface ReplyMarkupForceReply {
|
|
|
66
66
|
}
|
|
67
67
|
/** A message's reply markup. */
|
|
68
68
|
export type ReplyMarkup = ReplyMarkupInlineKeyboard | ReplyMarkupKeyboard | ReplyMarkupRemoveKeyboard | ReplyMarkupForceReply;
|
|
69
|
-
export declare function constructReplyMarkup(replyMarkup:
|
|
70
|
-
export declare function replyMarkupToTlObject(replyMarkup: ReplyMarkup, usernameResolver: UsernameResolver): Promise<
|
|
69
|
+
export declare function constructReplyMarkup(replyMarkup: Api.ReplyMarkup): ReplyMarkup;
|
|
70
|
+
export declare function replyMarkupToTlObject(replyMarkup: ReplyMarkup, usernameResolver: UsernameResolver): Promise<Api.ReplyMarkup>;
|
|
71
71
|
//# sourceMappingURL=3_reply_markup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_reply_markup.d.ts","sourceRoot":"","sources":["../../src/types/3_reply_markup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"3_reply_markup.d.ts","sourceRoot":"","sources":["../../src/types/3_reply_markup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAA2B,cAAc,EAA4B,MAAM,wBAAwB,CAAC;AAC3G,OAAO,EAAiC,oBAAoB,EAAkC,MAAM,+BAA+B,CAAC;AAIpI,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACxC,qBAAqB;IACrB,cAAc,EAAE,oBAAoB,EAAE,EAAE,CAAC;CAC1C;AA4BD,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,QAAQ,EAAE,cAAc,EAAE,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAkCD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,cAAc,EAAE,IAAI,CAAC;IACrB,2JAA2J;IAC3J,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAYD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,UAAU,EAAE,IAAI,CAAC;IACjB,6DAA6D;IAC7D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,2JAA2J;IAC3J,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAmBD,gCAAgC;AAChC,MAAM,MAAM,WAAW,GAAG,yBAAyB,GAAG,mBAAmB,GAAG,yBAAyB,GAAG,qBAAqB,CAAC;AAE9H,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,GAAG,WAAW,CAY9E;AAED,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAYlI"}
|