@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
|
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.TLWriter = void 0;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _0_tl_raw_writer_js_1 = require("./0_tl_raw_writer.js");
|
|
25
|
-
const
|
|
25
|
+
const _2_serialize_js_1 = require("./2_serialize.js");
|
|
26
26
|
class TLWriter extends _0_tl_raw_writer_js_1.TLRawWriter {
|
|
27
27
|
writeObject(object) {
|
|
28
28
|
if (Array.isArray(object)) {
|
|
@@ -34,14 +34,14 @@ class TLWriter extends _0_tl_raw_writer_js_1.TLRawWriter {
|
|
|
34
34
|
}
|
|
35
35
|
else if (typeof object === "boolean") {
|
|
36
36
|
if (object) {
|
|
37
|
-
this.writeInt32(
|
|
37
|
+
this.writeInt32(0x997275B5, false);
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
this.writeInt32(
|
|
40
|
+
this.writeInt32(0xBC799737, false);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
this.write(
|
|
44
|
+
this.write((0, _2_serialize_js_1.serialize)(object));
|
|
45
45
|
}
|
|
46
46
|
return this;
|
|
47
47
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { TLReader } from "./3_tl_reader.js";
|
|
21
|
+
import { rpc_result } from "./4_rpc_result.js";
|
|
22
|
+
import { AnyObject } from "./0_api.js";
|
|
23
|
+
export interface message {
|
|
24
|
+
_: "message";
|
|
25
|
+
msg_id: bigint;
|
|
26
|
+
seqno: number;
|
|
27
|
+
body: AnyObject | msg_container | rpc_result;
|
|
28
|
+
}
|
|
29
|
+
export declare function calculateLength(object: Exclude<message["body"], rpc_result>): number;
|
|
30
|
+
export declare function serializeMessage(message: message): Uint8Array;
|
|
31
|
+
export declare function deserializeMessage(reader: TLReader): message;
|
|
32
|
+
export interface msg_container {
|
|
33
|
+
_: "msg_container";
|
|
34
|
+
messages: message[];
|
|
35
|
+
}
|
|
36
|
+
export declare const MSG_CONTAINER_ID = 1945237724;
|
|
37
|
+
export declare function serializeMsgContainer(msgContainer: msg_container): Uint8Array;
|
|
38
|
+
export declare function deserializeMsgContainer(buffer: Uint8Array): msg_container;
|
|
39
|
+
//# sourceMappingURL=5_message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5_message.d.ts","sourceRoot":"","sources":["../../src/tl/5_message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAwB,UAAU,EAAiB,MAAM,mBAAmB,CAAC;AAEpF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,SAAS,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;CAC9C;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAgBpF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAc7D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAiB5D;AAID,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,eAAe,CAAC;IACnB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,aAAa,GAAG,UAAU,CAQ7E;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,CAQzE"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.deserializeMsgContainer = exports.serializeMsgContainer = exports.MSG_CONTAINER_ID = exports.deserializeMessage = exports.serializeMessage = exports.calculateLength = void 0;
|
|
23
|
+
const _3_tl_reader_js_1 = require("./3_tl_reader.js");
|
|
24
|
+
const _4_tl_writer_js_1 = require("./4_tl_writer.js");
|
|
25
|
+
const _4_rpc_result_js_1 = require("./4_rpc_result.js");
|
|
26
|
+
const _2_serialize_js_1 = require("./2_serialize.js");
|
|
27
|
+
function calculateLength(object) {
|
|
28
|
+
let length = 0;
|
|
29
|
+
if (Array.isArray(object)) {
|
|
30
|
+
length += 32 / 8; // vector constructor
|
|
31
|
+
length += 32 / 8; // number of items
|
|
32
|
+
for (const item of object) {
|
|
33
|
+
length += calculateLength(item);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (typeof object === "boolean") {
|
|
37
|
+
length += 32 / 8; // constructor
|
|
38
|
+
}
|
|
39
|
+
else if (object._ == "msg_container") {
|
|
40
|
+
length += serializeMsgContainer(object).length;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
length += (0, _2_serialize_js_1.serialize)(object).length;
|
|
44
|
+
}
|
|
45
|
+
return length;
|
|
46
|
+
}
|
|
47
|
+
exports.calculateLength = calculateLength;
|
|
48
|
+
function serializeMessage(message) {
|
|
49
|
+
if (message.body._ == "rpc_result") {
|
|
50
|
+
throw new Error("Not applicable");
|
|
51
|
+
}
|
|
52
|
+
const writer = new _4_tl_writer_js_1.TLWriter()
|
|
53
|
+
.writeInt64(message.msg_id)
|
|
54
|
+
.writeInt32(message.seqno)
|
|
55
|
+
.writeInt32(calculateLength(message.body));
|
|
56
|
+
if (message.body._ == "msg_container") {
|
|
57
|
+
writer.write(serializeMsgContainer(message.body));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
writer.writeObject(message.body);
|
|
61
|
+
}
|
|
62
|
+
return writer.buffer;
|
|
63
|
+
}
|
|
64
|
+
exports.serializeMessage = serializeMessage;
|
|
65
|
+
function deserializeMessage(reader) {
|
|
66
|
+
const id_ = reader.readInt64();
|
|
67
|
+
const seqno = reader.readInt32();
|
|
68
|
+
const length = reader.readInt32();
|
|
69
|
+
reader = new _3_tl_reader_js_1.TLReader(reader.read(length));
|
|
70
|
+
const cid = reader.readInt32(false);
|
|
71
|
+
let body;
|
|
72
|
+
{
|
|
73
|
+
if (cid == _4_rpc_result_js_1.RPC_RESULT_ID) {
|
|
74
|
+
body = (0, _4_rpc_result_js_1.deserializeRpcResult)(reader.buffer);
|
|
75
|
+
}
|
|
76
|
+
else if (cid == exports.MSG_CONTAINER_ID) {
|
|
77
|
+
body = deserializeMsgContainer(reader.buffer);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
body = reader.readObject(cid);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return { _: "message", msg_id: id_, seqno, body };
|
|
84
|
+
}
|
|
85
|
+
exports.deserializeMessage = deserializeMessage;
|
|
86
|
+
exports.MSG_CONTAINER_ID = 0x73F1F8DC;
|
|
87
|
+
function serializeMsgContainer(msgContainer) {
|
|
88
|
+
const writer = new _4_tl_writer_js_1.TLWriter();
|
|
89
|
+
writer.writeInt32(exports.MSG_CONTAINER_ID, false);
|
|
90
|
+
writer.writeInt32(msgContainer.messages.length);
|
|
91
|
+
for (const message of msgContainer.messages) {
|
|
92
|
+
writer.write(serializeMessage(message));
|
|
93
|
+
}
|
|
94
|
+
return writer.buffer;
|
|
95
|
+
}
|
|
96
|
+
exports.serializeMsgContainer = serializeMsgContainer;
|
|
97
|
+
function deserializeMsgContainer(buffer) {
|
|
98
|
+
const reader = new _3_tl_reader_js_1.TLReader(buffer);
|
|
99
|
+
const length = reader.readInt32();
|
|
100
|
+
const messages = new Array();
|
|
101
|
+
for (let i = 0; i < length; i++) {
|
|
102
|
+
messages.push(deserializeMessage(reader));
|
|
103
|
+
}
|
|
104
|
+
return { _: "msg_container", messages };
|
|
105
|
+
}
|
|
106
|
+
exports.deserializeMsgContainer = deserializeMsgContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5_message_test.d.ts","sourceRoot":"","sources":["../../src/tl/5_message_test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransportProvider } from "./2_transport_provider.js";
|
|
2
|
+
export interface Socks5 {
|
|
3
|
+
type: "socks5";
|
|
4
|
+
hostname: string;
|
|
5
|
+
port?: number;
|
|
6
|
+
username?: string;
|
|
7
|
+
password?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function transportProviderTcp(params?: {
|
|
10
|
+
ipv6?: boolean;
|
|
11
|
+
obfuscated?: boolean;
|
|
12
|
+
proxy?: Socks5;
|
|
13
|
+
}): TransportProvider;
|
|
14
|
+
//# sourceMappingURL=3_transport_provider_tcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_transport_provider_tcp.d.ts","sourceRoot":"","sources":["../../src/transport/3_transport_provider_tcp.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAqB,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEjF,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,iBAAiB,CAUpB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transportProviderTcp = void 0;
|
|
4
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
5
|
+
const _1_connection_tcp_js_1 = require("../connection/1_connection_tcp.js");
|
|
6
|
+
const _1_transport_abridged_js_1 = require("./1_transport_abridged.js");
|
|
7
|
+
const _2_transport_provider_js_1 = require("./2_transport_provider.js");
|
|
8
|
+
function transportProviderTcp(params) {
|
|
9
|
+
return ({ dc, cdn }) => {
|
|
10
|
+
const connection = new _1_connection_tcp_js_1.ConnectionTCP((0, _2_transport_provider_js_1.getDcIps)(dc, params?.ipv6 ? "ipv6" : "ipv4")[0], 80);
|
|
11
|
+
if (params?.proxy) {
|
|
12
|
+
const socksClient = new _0_deps_js_1.SocksClient(params.proxy);
|
|
13
|
+
connection.connect = socksClient.connect.bind(socksClient);
|
|
14
|
+
}
|
|
15
|
+
const transport = new _1_transport_abridged_js_1.TransportAbridged(connection, params?.obfuscated);
|
|
16
|
+
return { connection, transport, dcId: (0, _2_transport_provider_js_1.getDcId)(dc, cdn) };
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.transportProviderTcp = transportProviderTcp;
|
|
@@ -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
|
/** A user's birthday. */
|
|
22
22
|
export interface Birthday {
|
|
23
23
|
day: number;
|
|
24
24
|
month: number;
|
|
25
25
|
year?: number;
|
|
26
26
|
}
|
|
27
|
-
export declare function constructBirthday(birthday:
|
|
27
|
+
export declare function constructBirthday(birthday: Api.birthday): Birthday;
|
|
28
28
|
//# sourceMappingURL=0_birthday.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_birthday.d.ts","sourceRoot":"","sources":["../../src/types/0_birthday.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_birthday.d.ts","sourceRoot":"","sources":["../../src/types/0_birthday.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAMlE"}
|
|
@@ -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
|
/** An answer to a callback query. */
|
|
22
22
|
export interface CallbackQueryAnswer {
|
|
23
23
|
/** Whether the answer should be shown as an alert. */
|
|
@@ -27,5 +27,5 @@ export interface CallbackQueryAnswer {
|
|
|
27
27
|
/** A potential URL that is to be opened. */
|
|
28
28
|
url: string;
|
|
29
29
|
}
|
|
30
|
-
export declare function constructCallbackQueryAnswer(answer:
|
|
30
|
+
export declare function constructCallbackQueryAnswer(answer: Api.messages_botCallbackAnswer): CallbackQueryAnswer;
|
|
31
31
|
//# sourceMappingURL=0_callback_query_answer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_callback_query_answer.d.ts","sourceRoot":"","sources":["../../src/types/0_callback_query_answer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_callback_query_answer.d.ts","sourceRoot":"","sources":["../../src/types/0_callback_query_answer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,qCAAqC;AACrC,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,GAAG,CAAC,0BAA0B,GAAG,mBAAmB,CAMxG"}
|
|
@@ -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
|
/** The rights of a chat administrator. */
|
|
22
22
|
export interface ChatAdministratorRights {
|
|
23
23
|
/** Whether the admininistrator's presence in the chat is hidden. */
|
|
@@ -45,6 +45,6 @@ export interface ChatAdministratorRights {
|
|
|
45
45
|
/** Whether the administrator can manage topics. Only available for supergroups. */
|
|
46
46
|
canManageTopics?: boolean;
|
|
47
47
|
}
|
|
48
|
-
export declare function constructChatAdministratorRights(rights_:
|
|
49
|
-
export declare function chatAdministratorRightsToTlObject(rights: ChatAdministratorRights):
|
|
48
|
+
export declare function constructChatAdministratorRights(rights_: Api.ChatAdminRights): ChatAdministratorRights;
|
|
49
|
+
export declare function chatAdministratorRightsToTlObject(rights: ChatAdministratorRights): Api.chatAdminRights;
|
|
50
50
|
//# sourceMappingURL=0_chat_administrator_rights.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_chat_administrator_rights.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_administrator_rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_chat_administrator_rights.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_administrator_rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,oEAAoE;IACpE,WAAW,EAAE,OAAO,CAAC;IACrB,wMAAwM;IACxM,aAAa,EAAE,OAAO,CAAC;IACvB,oEAAoE;IACpE,iBAAiB,EAAE,OAAO,CAAC;IAC3B,wDAAwD;IACxD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iHAAiH;IACjH,aAAa,EAAE,OAAO,CAAC;IACvB,8DAA8D;IAC9D,cAAc,EAAE,OAAO,CAAC;IACxB,4FAA4F;IAC5F,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4GAA4G;IAC5G,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6FAA6F;IAC7F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,GAAG,CAAC,eAAe,GAAG,uBAAuB,CA0BtG;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,uBAAuB,GAAG,GAAG,CAAC,eAAe,CAEtG"}
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.chatAdministratorRightsToTlObject = exports.constructChatAdministratorRights = void 0;
|
|
23
|
-
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
23
|
function constructChatAdministratorRights(rights_) {
|
|
25
24
|
const rights = {
|
|
26
25
|
isAnonymous: rights_.anonymous || false,
|
|
@@ -48,15 +47,6 @@ function constructChatAdministratorRights(rights_) {
|
|
|
48
47
|
}
|
|
49
48
|
exports.constructChatAdministratorRights = constructChatAdministratorRights;
|
|
50
49
|
function chatAdministratorRightsToTlObject(rights) {
|
|
51
|
-
return
|
|
52
|
-
anonymous: rights.isAnonymous || undefined,
|
|
53
|
-
other: rights.canManageChat || undefined,
|
|
54
|
-
delete_messages: rights.canDeleteMessages || undefined,
|
|
55
|
-
manage_call: rights.canManageChat || undefined,
|
|
56
|
-
ban_users: rights.canRestrictMembers || undefined,
|
|
57
|
-
add_admins: rights.canPromoteMembers || undefined,
|
|
58
|
-
change_info: rights.canChangeInfo || undefined,
|
|
59
|
-
invite_users: rights.canInviteUsers || undefined,
|
|
60
|
-
});
|
|
50
|
+
return { _: "chatAdminRights", anonymous: rights.isAnonymous || undefined, other: rights.canManageChat || undefined, delete_messages: rights.canDeleteMessages || undefined, manage_call: rights.canManageChat || undefined, ban_users: rights.canRestrictMembers || undefined, add_admins: rights.canPromoteMembers || undefined, change_info: rights.canChangeInfo || undefined, invite_users: rights.canInviteUsers || undefined };
|
|
61
51
|
}
|
|
62
52
|
exports.chatAdministratorRightsToTlObject = chatAdministratorRightsToTlObject;
|
|
@@ -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
|
/** The rights of a chat member. */
|
|
22
22
|
export interface ChatMemberRights {
|
|
23
23
|
/** Whether messages are allowed to be sent. */
|
|
@@ -55,6 +55,6 @@ export interface ChatMemberRights {
|
|
|
55
55
|
/** Whether it is allowed to manage topics. */
|
|
56
56
|
canManageTopics?: boolean;
|
|
57
57
|
}
|
|
58
|
-
export declare function constructChatMemberRights(rights:
|
|
59
|
-
export declare function chatMemberRightsToTlObject(rights?: ChatMemberRights, untilDate?: Date):
|
|
58
|
+
export declare function constructChatMemberRights(rights: Api.chatBannedRights): ChatMemberRights;
|
|
59
|
+
export declare function chatMemberRightsToTlObject(rights?: ChatMemberRights, untilDate?: Date): Api.chatBannedRights;
|
|
60
60
|
//# sourceMappingURL=0_chat_member_rights.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_chat_member_rights.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_member_rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_chat_member_rights.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_member_rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,mCAAmC;AACnC,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yDAAyD;IACzD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sDAAsD;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,gBAAgB,CAoBxF;AAED,wBAAgB,0BAA0B,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,GAAG,CAAC,gBAAgB,CAsB5G"}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.chatMemberRightsToTlObject = exports.constructChatMemberRights = void 0;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
-
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
24
|
function constructChatMemberRights(rights) {
|
|
26
25
|
return {
|
|
27
26
|
canSendMessages: rights.send_messages ? true : false,
|
|
@@ -45,7 +44,8 @@ function constructChatMemberRights(rights) {
|
|
|
45
44
|
}
|
|
46
45
|
exports.constructChatMemberRights = constructChatMemberRights;
|
|
47
46
|
function chatMemberRightsToTlObject(rights, untilDate) {
|
|
48
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
_: "chatBannedRights",
|
|
49
49
|
until_date: untilDate ? (0, _1_utilities_js_1.toUnixTimestamp)(untilDate) : 0,
|
|
50
50
|
send_messages: rights?.canSendMessages ? true : undefined,
|
|
51
51
|
send_audios: rights?.canSendAudio ? true : undefined,
|
|
@@ -64,6 +64,6 @@ function chatMemberRightsToTlObject(rights, untilDate) {
|
|
|
64
64
|
invite_users: rights?.canInviteUsers ? true : undefined,
|
|
65
65
|
pin_messages: rights?.canPinMessages ? true : undefined,
|
|
66
66
|
manage_topics: rights?.canManageTopics ? true : undefined,
|
|
67
|
-
}
|
|
67
|
+
};
|
|
68
68
|
}
|
|
69
69
|
exports.chatMemberRightsToTlObject = chatMemberRightsToTlObject;
|
|
@@ -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 chat photo. */
|
|
22
22
|
export interface ChatPhoto {
|
|
23
23
|
/** A file identifier that can be used to download or reuse the small version of the chat photo (160x160). */
|
|
@@ -33,5 +33,5 @@ export interface ChatPhoto {
|
|
|
33
33
|
/** Differentiates between user profile photos. */
|
|
34
34
|
personal: boolean;
|
|
35
35
|
}
|
|
36
|
-
export declare function constructChatPhoto(photo:
|
|
36
|
+
export declare function constructChatPhoto(photo: Api.userProfilePhoto | Api.chatPhoto, chatId: number, chatAccessHash: bigint): ChatPhoto;
|
|
37
37
|
//# sourceMappingURL=0_chat_photo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_chat_photo.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_photo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_chat_photo.d.ts","sourceRoot":"","sources":["../../src/types/0_chat_photo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAGrC,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,6GAA6G;IAC7G,WAAW,EAAE,MAAM,CAAC;IACpB,oGAAoG;IACpG,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2GAA2G;IAC3G,SAAS,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,eAAe,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,CAoCjI"}
|
|
@@ -38,7 +38,7 @@ function constructChatPhoto(photo, chatId, chatAccessHash) {
|
|
|
38
38
|
};
|
|
39
39
|
const bigFileId = (0, _file_id_js_1.serializeFileId)(bigFileId_);
|
|
40
40
|
const bigFileUniqueId = (0, _file_id_js_1.toUniqueFileId)(bigFileId_);
|
|
41
|
-
if (
|
|
41
|
+
if ((0, _2_tl_js_1.is)("chatPhoto", photo)) {
|
|
42
42
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
43
43
|
smallFileId,
|
|
44
44
|
smallFileUniqueId,
|
|
@@ -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 shared contact. */
|
|
22
22
|
export interface Contact {
|
|
23
23
|
/** The contact's phone number. */
|
|
@@ -31,5 +31,5 @@ export interface Contact {
|
|
|
31
31
|
/** Additional information in the vCard format. */
|
|
32
32
|
vcard?: string;
|
|
33
33
|
}
|
|
34
|
-
export declare function constructContact(contact:
|
|
34
|
+
export declare function constructContact(contact: Api.messageMediaContact): Contact;
|
|
35
35
|
//# sourceMappingURL=0_contact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_contact.d.ts","sourceRoot":"","sources":["../../src/types/0_contact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_contact.d.ts","sourceRoot":"","sources":["../../src/types/0_contact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAwB;AACxB,MAAM,WAAW,OAAO;IACtB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,mBAAmB,GAAG,OAAO,CAQ1E"}
|
package/script/types/0_dice.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 rolled dice. */
|
|
22
22
|
export interface Dice {
|
|
23
23
|
/** The emoji on which the dice is based on. */
|
|
@@ -25,5 +25,5 @@ export interface Dice {
|
|
|
25
25
|
/** The result of the roll, which is in the range of 1-6 for the emojis "🎲", "🎯" and "🎳", 1-5 for the emojis "🏀" and "⚽", and 1-64 for emoji "🎰". */
|
|
26
26
|
value: number;
|
|
27
27
|
}
|
|
28
|
-
export declare function constructDice(dice_:
|
|
28
|
+
export declare function constructDice(dice_: Api.messageMediaDice): Dice;
|
|
29
29
|
//# sourceMappingURL=0_dice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_dice.d.ts","sourceRoot":"","sources":["../../src/types/0_dice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_dice.d.ts","sourceRoot":"","sources":["../../src/types/0_dice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,qBAAqB;AACrB,MAAM,WAAW,IAAI;IACnB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,0JAA0J;IAC1J,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAE/D"}
|
|
@@ -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
|
/** Giveaway parameters. */
|
|
22
22
|
export interface GiveawayParameters {
|
|
23
23
|
/** The identifier of the chat that will be boosted for the duration of the given away Premium subscriptions. */
|
|
@@ -31,5 +31,5 @@ export interface GiveawayParameters {
|
|
|
31
31
|
/** A list of countries that are eligible for the prizes. */
|
|
32
32
|
countries: string[];
|
|
33
33
|
}
|
|
34
|
-
export declare function constructGiveawayParameters(g:
|
|
34
|
+
export declare function constructGiveawayParameters(g: Api.messageMediaGiveaway): GiveawayParameters;
|
|
35
35
|
//# sourceMappingURL=0_giveaway_parameters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_giveaway_parameters.d.ts","sourceRoot":"","sources":["../../src/types/0_giveaway_parameters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"0_giveaway_parameters.d.ts","sourceRoot":"","sources":["../../src/types/0_giveaway_parameters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAgB,MAAM,YAAY,CAAC;AAE/C,2BAA2B;AAC3B,MAAM,WAAW,kBAAkB;IACjC,gHAAgH;IAChH,aAAa,EAAE,MAAM,CAAC;IACtB,kHAAkH;IAClH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,+EAA+E;IAC/E,mBAAmB,EAAE,IAAI,CAAC;IAC1B,6EAA6E;IAC7E,cAAc,EAAE,OAAO,CAAC;IACxB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,GAAG,CAAC,oBAAoB,GAAG,kBAAkB,CAQ3F"}
|
|
@@ -24,8 +24,8 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
function constructGiveawayParameters(g) {
|
|
26
26
|
const countries = g.countries_iso2 ?? [];
|
|
27
|
-
const boostedChatId = (0, _2_tl_js_1.peerToChatId)(
|
|
28
|
-
const additionalChatIds = g.channels.slice(1).map((v) => (0, _2_tl_js_1.peerToChatId)(
|
|
27
|
+
const boostedChatId = (0, _2_tl_js_1.peerToChatId)({ _: "peerChannel", channel_id: g.channels[0] });
|
|
28
|
+
const additionalChatIds = g.channels.slice(1).map((v) => (0, _2_tl_js_1.peerToChatId)({ _: "peerChannel", channel_id: v }));
|
|
29
29
|
const onlyNewMembers = g.only_new_subscribers ? true : false;
|
|
30
30
|
const winnerSelectionDate = (0, _1_utilities_js_1.fromUnixTimestamp)(g.until_date);
|
|
31
31
|
return { boostedChatId, additionalChatIds, winnerSelectionDate, onlyNewMembers, countries };
|
|
@@ -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 link preview. */
|
|
22
22
|
export interface LinkPreview {
|
|
23
23
|
/** Whether link preview is disabled. */
|
|
@@ -31,5 +31,5 @@ export interface LinkPreview {
|
|
|
31
31
|
/** Whether the preview is to be shown above the message's text. */
|
|
32
32
|
aboveText?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export declare function constructLinkPreview(media:
|
|
34
|
+
export declare function constructLinkPreview(media: Api.messageMediaWebPage, invert?: boolean): LinkPreview;
|
|
35
35
|
//# sourceMappingURL=0_link_preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_link_preview.d.ts","sourceRoot":"","sources":["../../src/types/0_link_preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_link_preview.d.ts","sourceRoot":"","sources":["../../src/types/0_link_preview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,sBAAsB;AACtB,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAOlG"}
|
|
@@ -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 live stream channel. */
|
|
22
22
|
export interface LiveStreamChannel {
|
|
23
23
|
/** The live stream channel's unique identifier. */
|
|
@@ -27,5 +27,5 @@ export interface LiveStreamChannel {
|
|
|
27
27
|
/** The live stream channel's last timestamp. */
|
|
28
28
|
timestamp: number;
|
|
29
29
|
}
|
|
30
|
-
export declare function constructLiveStreamChannel(channel:
|
|
30
|
+
export declare function constructLiveStreamChannel(channel: Api.groupCallStreamChannel): LiveStreamChannel;
|
|
31
31
|
//# sourceMappingURL=0_live_stream_channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_live_stream_channel.d.ts","sourceRoot":"","sources":["../../src/types/0_live_stream_channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_live_stream_channel.d.ts","sourceRoot":"","sources":["../../src/types/0_live_stream_channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,6BAA6B;AAC7B,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,4GAA4G;IAC5G,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,GAAG,CAAC,sBAAsB,GAAG,iBAAiB,CAMjG"}
|
|
@@ -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 shared location. */
|
|
22
22
|
export interface Location {
|
|
23
23
|
/** The latitude of the location. */
|
|
@@ -33,5 +33,5 @@ export interface Location {
|
|
|
33
33
|
/** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
|
|
34
34
|
proximityAlertRadius?: number;
|
|
35
35
|
}
|
|
36
|
-
export declare function constructLocation(geo_:
|
|
36
|
+
export declare function constructLocation(geo_: Api.messageMediaGeo | Api.messageMediaGeoLive | Api.geoPoint): Location;
|
|
37
37
|
//# sourceMappingURL=0_location.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_location.d.ts","sourceRoot":"","sources":["../../src/types/0_location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"0_location.d.ts","sourceRoot":"","sources":["../../src/types/0_location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAU,MAAM,YAAY,CAAC;AAEzC,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wGAAwG;IACxG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8HAA8H;IAC9H,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG,GAAG,CAAC,QAAQ,GAAG,QAAQ,CA0B9G"}
|
|
@@ -22,17 +22,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.constructLocation = void 0;
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
function constructLocation(geo_) {
|
|
25
|
-
if (
|
|
26
|
-
const geo =
|
|
25
|
+
if ((0, _2_tl_js_1.is)("messageMediaGeo", geo_)) {
|
|
26
|
+
const geo = (0, _2_tl_js_1.as)("geoPoint", geo_.geo);
|
|
27
27
|
return {
|
|
28
28
|
latitude: geo.lat,
|
|
29
29
|
longitude: geo.long,
|
|
30
30
|
horizontalAccuracy: geo.accuracy_radius,
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
else if (
|
|
33
|
+
else if ((0, _2_tl_js_1.is)("messageMediaGeoLive", geo_)) {
|
|
34
34
|
const media = geo_;
|
|
35
|
-
const geo =
|
|
35
|
+
const geo = (0, _2_tl_js_1.as)("geoPoint", media.geo);
|
|
36
36
|
return {
|
|
37
37
|
latitude: geo.lat,
|
|
38
38
|
longitude: geo.long,
|
|
@@ -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 mask position. */
|
|
22
22
|
export interface MaskPosition {
|
|
23
23
|
point: "forehead" | "eyes" | "mouth" | "chin";
|
|
@@ -25,5 +25,5 @@ export interface MaskPosition {
|
|
|
25
25
|
yShift: number;
|
|
26
26
|
scale: number;
|
|
27
27
|
}
|
|
28
|
-
export declare function constructMaskPosition({ n, x, y, zoom }:
|
|
28
|
+
export declare function constructMaskPosition({ n, x, y, zoom }: Api.MaskCoords): MaskPosition;
|
|
29
29
|
//# sourceMappingURL=0_mask_position.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_mask_position.d.ts","sourceRoot":"","sources":["../../src/types/0_mask_position.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"0_mask_position.d.ts","sourceRoot":"","sources":["../../src/types/0_mask_position.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,uBAAuB;AACvB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,qBAAqB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,CAAC,UAAU,GAAG,YAAY,CAOrF"}
|