@mtkruto/node 0.1.800 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_deps.d.ts +2 -0
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +2 -1
- package/esm/2_tl.d.ts +7 -8
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +7 -8
- package/esm/3_errors.d.ts +519 -515
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +527 -512
- package/esm/3_transport.d.ts +1 -0
- package/esm/3_transport.d.ts.map +1 -1
- package/esm/3_transport.js +1 -0
- package/esm/4_errors.d.ts +7 -7
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/4_errors.js +5 -5
- package/esm/client/0_client_abstract.d.ts +1 -21
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +17 -15
- package/esm/client/0_message.d.ts +3 -3
- package/esm/client/0_message.d.ts.map +1 -1
- package/esm/client/0_message.js +4 -20
- package/esm/client/0_params.d.ts +1 -1
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +3 -8
- package/esm/client/0_storage_operations.d.ts +23 -23
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +13 -12
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +13 -10
- package/esm/client/1_client_encrypted.d.ts +3 -5
- package/esm/client/1_client_encrypted.d.ts.map +1 -1
- package/esm/client/1_client_encrypted.js +44 -28
- package/esm/client/1_client_plain.d.ts +2 -2
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +27 -19
- package/esm/client/1_types.d.ts +9 -22
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.d.ts +2 -2
- package/esm/client/2_account_manager.js +16 -16
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.js +7 -6
- package/esm/client/2_business_connection_manager.d.ts +3 -3
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +6 -5
- package/esm/client/2_file_manager.d.ts +4 -4
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +26 -23
- package/esm/client/2_reaction_manager.d.ts +3 -3
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +16 -10
- package/esm/client/2_update_manager.d.ts +11 -11
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +185 -164
- package/esm/client/3_message_manager.d.ts +8 -9
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +205 -474
- package/esm/client/3_video_chat_manager.d.ts +3 -3
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +26 -36
- package/esm/client/4_callback_query_manager.d.ts +3 -3
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +5 -16
- package/esm/client/4_chat_list_manager.d.ts +5 -4
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +56 -34
- package/esm/client/4_inline_query_manager.d.ts +3 -3
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +6 -15
- package/esm/client/4_story_manager.d.ts +3 -3
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +15 -32
- package/esm/client/5_client.d.ts +10 -12
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +60 -114
- package/esm/{tl/7_message.d.ts → connection/1_connection_tcp.d.ts} +14 -12
- package/esm/connection/1_connection_tcp.d.ts.map +1 -0
- package/esm/connection/1_connection_tcp.js +169 -0
- package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/_constants.js +4 -0
- package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
- package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.js +86 -0
- package/esm/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
- package/esm/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/types.js +3 -0
- package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
- package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.224.0/io/write_all.js +49 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +253 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
- package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +13 -0
- package/esm/mod.d.ts +0 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +0 -1
- package/esm/tl/0_api.d.ts +14813 -0
- package/esm/tl/0_api.d.ts.map +1 -0
- package/esm/tl/0_api.js +23222 -0
- package/esm/tl/1_utilities.d.ts +32 -0
- package/esm/tl/1_utilities.d.ts.map +1 -0
- package/esm/tl/1_utilities.js +65 -0
- package/esm/tl/1_utilities_test.d.ts.map +1 -0
- package/esm/tl/2_deserialize.d.ts +23 -0
- package/esm/tl/2_deserialize.d.ts.map +1 -0
- package/esm/tl/{3_deserialize.js → 2_deserialize.js} +16 -17
- package/esm/tl/2_serialize.d.ts +22 -0
- package/esm/tl/2_serialize.d.ts.map +1 -0
- package/esm/tl/2_serialize.js +160 -0
- package/esm/tl/2_serialize_test.d.ts.map +1 -0
- package/esm/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
- package/esm/tl/3_tl_reader.d.ts.map +1 -0
- package/esm/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
- package/esm/tl/3_utilities.d.ts +5 -5
- package/esm/tl/3_utilities.d.ts.map +1 -1
- package/esm/tl/3_utilities.js +9 -10
- package/esm/tl/4_rpc_result.d.ts +27 -0
- package/esm/tl/4_rpc_result.d.ts.map +1 -0
- package/esm/tl/4_rpc_result.js +28 -0
- package/{script/tl/5_tl_writer.d.ts → esm/tl/4_tl_writer.d.ts} +2 -2
- package/esm/tl/4_tl_writer.d.ts.map +1 -0
- package/esm/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
- package/esm/tl/5_message.d.ts +39 -0
- package/esm/tl/5_message.d.ts.map +1 -0
- package/esm/tl/5_message.js +98 -0
- package/esm/tl/5_message_test.d.ts.map +1 -0
- package/esm/transport/3_transport_provider_tcp.d.ts +14 -0
- package/esm/transport/3_transport_provider_tcp.d.ts.map +1 -0
- package/esm/transport/3_transport_provider_tcp.js +15 -0
- package/esm/types/0_birthday.d.ts +2 -2
- package/esm/types/0_birthday.d.ts.map +1 -1
- package/esm/types/0_callback_query_answer.d.ts +2 -2
- package/esm/types/0_callback_query_answer.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +3 -3
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.js +1 -11
- package/esm/types/0_chat_member_rights.d.ts +3 -3
- package/esm/types/0_chat_member_rights.d.ts.map +1 -1
- package/esm/types/0_chat_member_rights.js +3 -3
- package/esm/types/0_chat_photo.d.ts +2 -2
- package/esm/types/0_chat_photo.d.ts.map +1 -1
- package/esm/types/0_chat_photo.js +2 -2
- package/esm/types/0_contact.d.ts +2 -2
- package/esm/types/0_contact.d.ts.map +1 -1
- package/esm/types/0_dice.d.ts +2 -2
- package/esm/types/0_dice.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.d.ts +2 -2
- package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.js +3 -3
- package/esm/types/0_link_preview.d.ts +2 -2
- package/esm/types/0_link_preview.d.ts.map +1 -1
- package/esm/types/0_live_stream_channel.d.ts +2 -2
- package/esm/types/0_live_stream_channel.d.ts.map +1 -1
- package/esm/types/0_location.d.ts +2 -2
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_location.js +5 -5
- package/esm/types/0_mask_position.d.ts +2 -2
- package/esm/types/0_mask_position.d.ts.map +1 -1
- package/esm/types/0_message_entity.d.ts +3 -3
- package/esm/types/0_message_entity.d.ts.map +1 -1
- package/esm/types/0_message_entity.js +42 -42
- package/esm/types/0_message_search_filter.d.ts +2 -2
- package/esm/types/0_message_search_filter.d.ts.map +1 -1
- package/esm/types/0_message_search_filter.js +14 -15
- package/esm/types/0_opening_hours.d.ts +2 -2
- package/esm/types/0_opening_hours.d.ts.map +1 -1
- package/esm/types/0_poll_option.d.ts +2 -2
- package/esm/types/0_poll_option.d.ts.map +1 -1
- package/esm/types/0_reaction.d.ts +3 -3
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_reaction.js +4 -4
- package/esm/types/0_restriction_reason.d.ts +2 -2
- package/esm/types/0_restriction_reason.d.ts.map +1 -1
- package/esm/types/0_thumbnail.d.ts +2 -2
- package/esm/types/0_thumbnail.d.ts.map +1 -1
- package/esm/types/0_thumbnail.js +3 -3
- package/esm/types/0_video_chat.d.ts +2 -2
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/0_video_chat.js +2 -2
- package/esm/types/0_voice.d.ts +2 -2
- package/esm/types/0_voice.d.ts.map +1 -1
- package/esm/types/1_animation.d.ts +2 -2
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_animation.js +2 -2
- package/esm/types/1_audio.d.ts +2 -2
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_audio.js +2 -2
- package/esm/types/1_bot_command_scope.d.ts +9 -2
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.js +9 -9
- package/esm/types/1_chat_p.d.ts +5 -5
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +6 -6
- package/esm/types/1_document.d.ts +2 -2
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_document.js +2 -2
- package/esm/types/1_giveaway.d.ts +2 -2
- package/esm/types/1_giveaway.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +3 -3
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +18 -45
- package/esm/types/1_message_reaction.d.ts +2 -2
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +5 -5
- package/esm/types/1_photo.d.ts +5 -5
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_photo.js +4 -4
- package/esm/types/1_poll.d.ts +2 -2
- package/esm/types/1_poll.d.ts.map +1 -1
- package/esm/types/1_reaction_count.d.ts +2 -2
- package/esm/types/1_reaction_count.d.ts.map +1 -1
- package/esm/types/1_reply_quote.d.ts +2 -2
- package/esm/types/1_reply_quote.d.ts.map +1 -1
- package/esm/types/1_sticker.d.ts +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +9 -9
- package/esm/types/1_story_privacy.d.ts +3 -3
- package/esm/types/1_story_privacy.d.ts.map +1 -1
- package/esm/types/1_story_privacy.js +14 -14
- package/esm/types/1_story_reaction.d.ts +2 -2
- package/esm/types/1_story_reaction.d.ts.map +1 -1
- package/esm/types/1_user.d.ts +2 -2
- package/esm/types/1_user.d.ts.map +1 -1
- package/esm/types/1_user.js +2 -2
- package/esm/types/1_venue.d.ts +2 -2
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_venue.js +2 -2
- package/esm/types/1_video.d.ts +2 -2
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video.js +2 -2
- package/esm/types/1_video_note.d.ts +2 -2
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/1_video_note.js +2 -2
- package/esm/types/2_business_connection.d.ts +2 -2
- package/esm/types/2_business_connection.d.ts.map +1 -1
- package/esm/types/2_business_connection.js +1 -2
- package/esm/types/2_chat.d.ts +2 -2
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +11 -11
- package/esm/types/2_chat_member.d.ts +2 -2
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +10 -10
- package/esm/types/2_chosen_inline_result.d.ts +2 -2
- package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
- package/esm/types/2_chosen_inline_result.js +5 -5
- package/esm/types/2_game.d.ts +2 -2
- package/esm/types/2_game.d.ts.map +1 -1
- package/esm/types/2_game.js +4 -4
- package/esm/types/2_inactive_chat.d.ts +2 -2
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_inactive_chat.js +2 -2
- package/esm/types/2_inline_keyboard_button.d.ts +3 -3
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +15 -21
- package/esm/types/2_inline_query.d.ts +2 -2
- package/esm/types/2_inline_query.d.ts.map +1 -1
- package/esm/types/2_inline_query.js +8 -8
- package/esm/types/2_invite_link.d.ts +2 -2
- package/esm/types/2_invite_link.d.ts.map +1 -1
- package/esm/types/2_invite_link.js +1 -2
- package/esm/types/2_message_reaction_count.d.ts +2 -2
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reactions.d.ts +2 -2
- package/esm/types/2_message_reactions.d.ts.map +1 -1
- package/esm/types/2_message_reactions.js +2 -2
- package/esm/types/2_story_content.d.ts +2 -2
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_content.js +6 -6
- package/esm/types/2_story_interactions.d.ts +2 -2
- package/esm/types/2_story_interactions.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.d.ts +3 -3
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +19 -29
- package/esm/types/3_chat_member_updated.d.ts +2 -2
- package/esm/types/3_chat_member_updated.d.ts.map +1 -1
- package/esm/types/3_chat_member_updated.js +7 -7
- package/esm/types/3_reply_markup.d.ts +3 -3
- package/esm/types/3_reply_markup.d.ts.map +1 -1
- package/esm/types/3_reply_markup.js +12 -22
- package/esm/types/3_story.d.ts +2 -2
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/4_inline_query_result.d.ts +3 -3
- package/esm/types/4_inline_query_result.d.ts.map +1 -1
- package/esm/types/4_inline_query_result.js +53 -161
- package/esm/types/4_message.d.ts +3 -3
- package/esm/types/4_message.d.ts.map +1 -1
- package/esm/types/4_message.js +68 -59
- package/esm/types/5_callback_query.d.ts +3 -3
- package/esm/types/5_callback_query.d.ts.map +1 -1
- package/esm/types/5_callback_query.js +5 -5
- package/esm/types/5_chat_list_item.d.ts +3 -3
- package/esm/types/5_chat_list_item.d.ts.map +1 -1
- package/esm/types/5_chat_list_item.js +2 -2
- package/esm/types/5_inline_query_answer.d.ts +2 -2
- package/esm/types/5_inline_query_answer.d.ts.map +1 -1
- package/esm/types/_file_id.d.ts +2 -2
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +4 -4
- package/esm/types/_getters.d.ts +7 -7
- package/esm/types/_getters.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +2 -0
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +5 -2
- package/script/2_tl.d.ts +7 -8
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +20 -11
- package/script/3_errors.d.ts +519 -515
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +543 -514
- package/script/3_transport.d.ts +1 -0
- package/script/3_transport.d.ts.map +1 -1
- package/script/3_transport.js +1 -0
- package/script/4_errors.d.ts +7 -7
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_errors.js +6 -6
- package/script/client/0_client_abstract.d.ts +1 -21
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +41 -16
- package/script/client/0_message.d.ts +3 -3
- package/script/client/0_message.d.ts.map +1 -1
- package/script/client/0_message.js +3 -19
- package/script/client/0_params.d.ts +1 -1
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +2 -7
- package/script/client/0_storage_operations.d.ts +23 -23
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +12 -11
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +12 -9
- package/script/client/1_client_encrypted.d.ts +3 -5
- package/script/client/1_client_encrypted.d.ts.map +1 -1
- package/script/client/1_client_encrypted.js +42 -26
- package/script/client/1_client_plain.d.ts +2 -2
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +25 -17
- package/script/client/1_types.d.ts +9 -22
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.d.ts +2 -2
- package/script/client/2_account_manager.js +15 -15
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.js +7 -6
- package/script/client/2_business_connection_manager.d.ts +3 -3
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +5 -4
- package/script/client/2_file_manager.d.ts +4 -4
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +25 -22
- package/script/client/2_reaction_manager.d.ts +3 -3
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +15 -9
- package/script/client/2_update_manager.d.ts +11 -11
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +183 -162
- package/script/client/3_message_manager.d.ts +8 -9
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +204 -473
- package/script/client/3_video_chat_manager.d.ts +3 -3
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +25 -35
- package/script/client/4_callback_query_manager.d.ts +3 -3
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +4 -15
- package/script/client/4_chat_list_manager.d.ts +5 -4
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +54 -32
- package/script/client/4_inline_query_manager.d.ts +3 -3
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +5 -14
- package/script/client/4_story_manager.d.ts +3 -3
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +14 -31
- package/script/client/5_client.d.ts +10 -12
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +59 -113
- package/{esm/tl/6_rpc_result.d.ts → script/connection/1_connection_tcp.d.ts} +14 -10
- package/script/connection/1_connection_tcp.d.ts.map +1 -0
- package/script/connection/1_connection_tcp.js +196 -0
- package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
- package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/_constants.js +7 -0
- package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
- package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/iterate_reader.js +91 -0
- package/script/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
- package/script/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/types.js +4 -0
- package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
- package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.224.0/io/write_all.js +54 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +280 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +5 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +40 -0
- package/script/mod.d.ts +0 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +0 -1
- package/script/tl/0_api.d.ts +14813 -0
- package/script/tl/0_api.d.ts.map +1 -0
- package/script/tl/0_api.js +23248 -0
- package/script/tl/1_utilities.d.ts +32 -0
- package/script/tl/1_utilities.d.ts.map +1 -0
- package/script/tl/1_utilities.js +76 -0
- package/script/tl/1_utilities_test.d.ts.map +1 -0
- package/script/tl/2_deserialize.d.ts +23 -0
- package/script/tl/2_deserialize.d.ts.map +1 -0
- package/script/tl/{3_deserialize.js → 2_deserialize.js} +19 -20
- package/script/tl/2_serialize.d.ts +22 -0
- package/script/tl/2_serialize.d.ts.map +1 -0
- package/script/tl/2_serialize.js +164 -0
- package/script/tl/2_serialize_test.d.ts.map +1 -0
- package/script/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
- package/script/tl/3_tl_reader.d.ts.map +1 -0
- package/script/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
- package/script/tl/3_utilities.d.ts +5 -5
- package/script/tl/3_utilities.d.ts.map +1 -1
- package/script/tl/3_utilities.js +9 -10
- package/script/tl/4_rpc_result.d.ts +27 -0
- package/script/tl/4_rpc_result.d.ts.map +1 -0
- package/{esm/tl/8_message_container.d.ts → script/tl/4_rpc_result.js} +12 -12
- package/{esm/tl/5_tl_writer.d.ts → script/tl/4_tl_writer.d.ts} +2 -2
- package/script/tl/4_tl_writer.d.ts.map +1 -0
- package/script/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
- package/script/tl/5_message.d.ts +39 -0
- package/script/tl/5_message.d.ts.map +1 -0
- package/script/tl/5_message.js +106 -0
- package/script/tl/5_message_test.d.ts.map +1 -0
- package/script/transport/3_transport_provider_tcp.d.ts +14 -0
- package/script/transport/3_transport_provider_tcp.d.ts.map +1 -0
- package/script/transport/3_transport_provider_tcp.js +19 -0
- package/script/types/0_birthday.d.ts +2 -2
- package/script/types/0_birthday.d.ts.map +1 -1
- package/script/types/0_callback_query_answer.d.ts +2 -2
- package/script/types/0_callback_query_answer.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +3 -3
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.js +1 -11
- package/script/types/0_chat_member_rights.d.ts +3 -3
- package/script/types/0_chat_member_rights.d.ts.map +1 -1
- package/script/types/0_chat_member_rights.js +3 -3
- package/script/types/0_chat_photo.d.ts +2 -2
- package/script/types/0_chat_photo.d.ts.map +1 -1
- package/script/types/0_chat_photo.js +1 -1
- package/script/types/0_contact.d.ts +2 -2
- package/script/types/0_contact.d.ts.map +1 -1
- package/script/types/0_dice.d.ts +2 -2
- package/script/types/0_dice.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.d.ts +2 -2
- package/script/types/0_giveaway_parameters.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.js +2 -2
- package/script/types/0_link_preview.d.ts +2 -2
- package/script/types/0_link_preview.d.ts.map +1 -1
- package/script/types/0_live_stream_channel.d.ts +2 -2
- package/script/types/0_live_stream_channel.d.ts.map +1 -1
- package/script/types/0_location.d.ts +2 -2
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_location.js +4 -4
- package/script/types/0_mask_position.d.ts +2 -2
- package/script/types/0_mask_position.d.ts.map +1 -1
- package/script/types/0_message_entity.d.ts +3 -3
- package/script/types/0_message_entity.d.ts.map +1 -1
- package/script/types/0_message_entity.js +41 -41
- package/script/types/0_message_search_filter.d.ts +2 -2
- package/script/types/0_message_search_filter.d.ts.map +1 -1
- package/script/types/0_message_search_filter.js +14 -15
- package/script/types/0_opening_hours.d.ts +2 -2
- package/script/types/0_opening_hours.d.ts.map +1 -1
- package/script/types/0_poll_option.d.ts +2 -2
- package/script/types/0_poll_option.d.ts.map +1 -1
- package/script/types/0_reaction.d.ts +3 -3
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_reaction.js +3 -3
- package/script/types/0_restriction_reason.d.ts +2 -2
- package/script/types/0_restriction_reason.d.ts.map +1 -1
- package/script/types/0_thumbnail.d.ts +2 -2
- package/script/types/0_thumbnail.d.ts.map +1 -1
- package/script/types/0_thumbnail.js +2 -2
- package/script/types/0_video_chat.d.ts +2 -2
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/0_video_chat.js +1 -1
- package/script/types/0_voice.d.ts +2 -2
- package/script/types/0_voice.d.ts.map +1 -1
- package/script/types/1_animation.d.ts +2 -2
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_animation.js +1 -1
- package/script/types/1_audio.d.ts +2 -2
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_audio.js +1 -1
- package/script/types/1_bot_command_scope.d.ts +9 -2
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.js +8 -8
- package/script/types/1_chat_p.d.ts +5 -5
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +5 -5
- package/script/types/1_document.d.ts +2 -2
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_document.js +1 -1
- package/script/types/1_giveaway.d.ts +2 -2
- package/script/types/1_giveaway.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +3 -3
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +17 -44
- package/script/types/1_message_reaction.d.ts +2 -2
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +4 -4
- package/script/types/1_photo.d.ts +5 -5
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_photo.js +3 -3
- package/script/types/1_poll.d.ts +2 -2
- package/script/types/1_poll.d.ts.map +1 -1
- package/script/types/1_reaction_count.d.ts +2 -2
- package/script/types/1_reaction_count.d.ts.map +1 -1
- package/script/types/1_reply_quote.d.ts +2 -2
- package/script/types/1_reply_quote.d.ts.map +1 -1
- package/script/types/1_sticker.d.ts +3 -3
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +8 -8
- package/script/types/1_story_privacy.d.ts +3 -3
- package/script/types/1_story_privacy.d.ts.map +1 -1
- package/script/types/1_story_privacy.js +13 -13
- package/script/types/1_story_reaction.d.ts +2 -2
- package/script/types/1_story_reaction.d.ts.map +1 -1
- package/script/types/1_user.d.ts +2 -2
- package/script/types/1_user.d.ts.map +1 -1
- package/script/types/1_user.js +1 -1
- package/script/types/1_venue.d.ts +2 -2
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_venue.js +1 -1
- package/script/types/1_video.d.ts +2 -2
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video.js +1 -1
- package/script/types/1_video_note.d.ts +2 -2
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/1_video_note.js +1 -1
- package/script/types/2_business_connection.d.ts +2 -2
- package/script/types/2_business_connection.d.ts.map +1 -1
- package/script/types/2_business_connection.js +1 -2
- package/script/types/2_chat.d.ts +2 -2
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +10 -10
- package/script/types/2_chat_member.d.ts +2 -2
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +9 -9
- package/script/types/2_chosen_inline_result.d.ts +2 -2
- package/script/types/2_chosen_inline_result.d.ts.map +1 -1
- package/script/types/2_chosen_inline_result.js +4 -4
- package/script/types/2_game.d.ts +2 -2
- package/script/types/2_game.d.ts.map +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_inactive_chat.d.ts +2 -2
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_inactive_chat.js +1 -1
- package/script/types/2_inline_keyboard_button.d.ts +3 -3
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +14 -20
- package/script/types/2_inline_query.d.ts +2 -2
- package/script/types/2_inline_query.d.ts.map +1 -1
- package/script/types/2_inline_query.js +7 -7
- package/script/types/2_invite_link.d.ts +2 -2
- package/script/types/2_invite_link.d.ts.map +1 -1
- package/script/types/2_invite_link.js +1 -2
- package/script/types/2_message_reaction_count.d.ts +2 -2
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reactions.d.ts +2 -2
- package/script/types/2_message_reactions.d.ts.map +1 -1
- package/script/types/2_message_reactions.js +1 -1
- package/script/types/2_story_content.d.ts +2 -2
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_content.js +5 -5
- package/script/types/2_story_interactions.d.ts +2 -2
- package/script/types/2_story_interactions.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.d.ts +3 -3
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +18 -28
- package/script/types/3_chat_member_updated.d.ts +2 -2
- package/script/types/3_chat_member_updated.d.ts.map +1 -1
- package/script/types/3_chat_member_updated.js +6 -6
- package/script/types/3_reply_markup.d.ts +3 -3
- package/script/types/3_reply_markup.d.ts.map +1 -1
- package/script/types/3_reply_markup.js +11 -21
- package/script/types/3_story.d.ts +2 -2
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/4_inline_query_result.d.ts +3 -3
- package/script/types/4_inline_query_result.d.ts.map +1 -1
- package/script/types/4_inline_query_result.js +52 -160
- package/script/types/4_message.d.ts +3 -3
- package/script/types/4_message.d.ts.map +1 -1
- package/script/types/4_message.js +67 -58
- package/script/types/5_callback_query.d.ts +3 -3
- package/script/types/5_callback_query.d.ts.map +1 -1
- package/script/types/5_callback_query.js +4 -4
- package/script/types/5_chat_list_item.d.ts +3 -3
- package/script/types/5_chat_list_item.d.ts.map +1 -1
- package/script/types/5_chat_list_item.js +1 -1
- package/script/types/5_inline_query_answer.d.ts +2 -2
- package/script/types/5_inline_query_answer.d.ts.map +1 -1
- package/script/types/_file_id.d.ts +2 -2
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +3 -3
- package/script/types/_getters.d.ts +7 -7
- package/script/types/_getters.d.ts.map +1 -1
- package/esm/tl/1_tl_object.d.ts +0 -64
- package/esm/tl/1_tl_object.d.ts.map +0 -1
- package/esm/tl/1_tl_object.js +0 -221
- package/esm/tl/1_tl_object_test.d.ts.map +0 -1
- package/esm/tl/2_types.d.ts +0 -28060
- package/esm/tl/2_types.d.ts.map +0 -1
- package/esm/tl/2_types.js +0 -68685
- package/esm/tl/2_types_test.d.ts.map +0 -1
- package/esm/tl/3_deserialize.d.ts +0 -23
- package/esm/tl/3_deserialize.d.ts.map +0 -1
- package/esm/tl/3_functions.d.ts +0 -14094
- package/esm/tl/3_functions.d.ts.map +0 -1
- package/esm/tl/3_functions.js +0 -28475
- package/esm/tl/3_functions_test.d.ts.map +0 -1
- package/esm/tl/4_tl_reader.d.ts.map +0 -1
- package/esm/tl/5_tl_writer.d.ts.map +0 -1
- package/esm/tl/6_rpc_result.d.ts.map +0 -1
- package/esm/tl/6_rpc_result.js +0 -49
- package/esm/tl/7_message.d.ts.map +0 -1
- package/esm/tl/7_message.js +0 -90
- package/esm/tl/7_message_test.d.ts.map +0 -1
- package/esm/tl/8_message_container.d.ts.map +0 -1
- package/esm/tl/8_message_container.js +0 -72
- package/script/tl/1_tl_object.d.ts +0 -64
- package/script/tl/1_tl_object.d.ts.map +0 -1
- package/script/tl/1_tl_object.js +0 -228
- package/script/tl/1_tl_object_test.d.ts.map +0 -1
- package/script/tl/2_types.d.ts +0 -28060
- package/script/tl/2_types.d.ts.map +0 -1
- package/script/tl/2_types.js +0 -70558
- package/script/tl/2_types_test.d.ts.map +0 -1
- package/script/tl/3_deserialize.d.ts +0 -23
- package/script/tl/3_deserialize.d.ts.map +0 -1
- package/script/tl/3_functions.d.ts +0 -14094
- package/script/tl/3_functions.d.ts.map +0 -1
- package/script/tl/3_functions.js +0 -29121
- package/script/tl/3_functions_test.d.ts.map +0 -1
- package/script/tl/4_tl_reader.d.ts.map +0 -1
- package/script/tl/5_tl_writer.d.ts.map +0 -1
- package/script/tl/6_rpc_result.d.ts +0 -30
- package/script/tl/6_rpc_result.d.ts.map +0 -1
- package/script/tl/6_rpc_result.js +0 -53
- package/script/tl/7_message.d.ts +0 -32
- package/script/tl/7_message.d.ts.map +0 -1
- package/script/tl/7_message.js +0 -95
- package/script/tl/7_message_test.d.ts.map +0 -1
- package/script/tl/8_message_container.d.ts +0 -32
- package/script/tl/8_message_container.d.ts.map +0 -1
- package/script/tl/8_message_container.js +0 -76
|
@@ -18,27 +18,27 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { is } from "../2_tl.js";
|
|
22
22
|
export async function botCommandScopeToTlObject(scope, getInputPeer) {
|
|
23
23
|
switch (scope.type) {
|
|
24
24
|
case "default":
|
|
25
|
-
return
|
|
25
|
+
return { _: "botCommandScopeDefault" };
|
|
26
26
|
case "allPrivateChats":
|
|
27
|
-
return
|
|
27
|
+
return { _: "botCommandScopeUsers" };
|
|
28
28
|
case "allGroupChats":
|
|
29
|
-
return
|
|
29
|
+
return { _: "botCommandScopeChats" };
|
|
30
30
|
case "allChatAdministrators":
|
|
31
|
-
return
|
|
31
|
+
return { _: "botCommandScopeChatAdmins" };
|
|
32
32
|
case "chat":
|
|
33
|
-
return
|
|
33
|
+
return { _: "botCommandScopePeer", peer: await getInputPeer(scope.chatId) };
|
|
34
34
|
case "chatAdministrators":
|
|
35
|
-
return
|
|
35
|
+
return { _: "botCommandScopePeerAdmins", peer: await getInputPeer(scope.chatId) };
|
|
36
36
|
case "chatMember": {
|
|
37
37
|
const user = await getInputPeer(scope.userId);
|
|
38
|
-
if (!(user
|
|
38
|
+
if (!(is("inputPeerUser", user))) {
|
|
39
39
|
unreachable();
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return { _: "botCommandScopePeerUser", peer: await getInputPeer(scope.chatId), user_id: ({ _: "inputUser", user_id: user.user_id, access_hash: user.access_hash }) };
|
|
42
42
|
}
|
|
43
43
|
default:
|
|
44
44
|
unreachable();
|
package/esm/types/1_chat_p.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { RestrictionReason } from "./0_restriction_reason.js";
|
|
22
22
|
/** @unlisted */
|
|
23
23
|
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
@@ -101,8 +101,8 @@ export interface ChatPSupergroup extends ChatPChannelBase {
|
|
|
101
101
|
* A chat with lesser fields.
|
|
102
102
|
*/
|
|
103
103
|
export type ChatP = ChatPPrivate | ChatPGroup | ChatPSupergroup | ChatPChannel;
|
|
104
|
-
export declare function constructChatP(chat:
|
|
105
|
-
export declare function constructChatP(chat:
|
|
106
|
-
export declare function constructChatP(chat:
|
|
107
|
-
export declare function constructChatP(chat:
|
|
104
|
+
export declare function constructChatP(chat: Api.user): ChatPPrivate;
|
|
105
|
+
export declare function constructChatP(chat: Api.chat | Api.chatForbidden): ChatPGroup;
|
|
106
|
+
export declare function constructChatP(chat: Api.channel | Api.channelForbidden): ChatPSupergroup | ChatPChannel;
|
|
107
|
+
export declare function constructChatP(chat: Api.user | Api.chat | Api.chatForbidden | Api.channel | Api.channelForbidden): ChatP;
|
|
108
108
|
//# sourceMappingURL=1_chat_p.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAA8B,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,gBAAgB;AAChB,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,OAAO,GACP,YAAY,GACZ,SAAS,CAAC;AAEd,gBAAgB;AAChB,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,4CAA4C;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,gBAAgB;AAChB,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,0EAA0E;IAC1E,MAAM,EAAE,OAAO,CAAC;IAChB,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,gBAAgB;AAChB,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,gBAAgB;AAChB,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,qBAAqB;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,YAAY,GAAG,UAAU,GAAG,eAAe,GAAG,YAAY,CAAC;AAE/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,YAAY,CAAC;AAC7D,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,GAAG,UAAU,CAAC;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAC;AACzG,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,GAAG,KAAK,CAAC"}
|
package/esm/types/1_chat_p.js
CHANGED
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { cleanObject, getColorFromPeerId, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
22
|
-
import {
|
|
22
|
+
import { is } from "../2_tl.js";
|
|
23
23
|
import { constructRestrictionReason } from "./0_restriction_reason.js";
|
|
24
24
|
export function constructChatP(chat) {
|
|
25
|
-
if (chat
|
|
25
|
+
if (is("user", chat)) {
|
|
26
26
|
const id = Number(chat.id);
|
|
27
27
|
const chat_ = {
|
|
28
28
|
id,
|
|
@@ -42,7 +42,7 @@ export function constructChatP(chat) {
|
|
|
42
42
|
}
|
|
43
43
|
return cleanObject(chat_);
|
|
44
44
|
}
|
|
45
|
-
else if (chat
|
|
45
|
+
else if (is("chat", chat) || is("chatForbidden", chat)) {
|
|
46
46
|
const id = Number(-chat.id);
|
|
47
47
|
const chat_ = {
|
|
48
48
|
id,
|
|
@@ -51,15 +51,15 @@ export function constructChatP(chat) {
|
|
|
51
51
|
title: chat.title,
|
|
52
52
|
isCreator: false,
|
|
53
53
|
};
|
|
54
|
-
if (chat
|
|
54
|
+
if (is("chat", chat)) {
|
|
55
55
|
chat_.isCreator = chat.creator || false;
|
|
56
56
|
}
|
|
57
57
|
return cleanObject(chat_);
|
|
58
58
|
}
|
|
59
|
-
else if (chat
|
|
59
|
+
else if (is("channel", chat) || is("channelForbidden", chat)) {
|
|
60
60
|
let chat_;
|
|
61
61
|
const id = ZERO_CHANNEL_ID + -Number(chat.id);
|
|
62
|
-
if (chat
|
|
62
|
+
if (is("channelForbidden", chat)) {
|
|
63
63
|
const { title } = chat;
|
|
64
64
|
if (chat.megagroup) {
|
|
65
65
|
return { id, color: getColorFromPeerId(id), title, type: "supergroup", isScam: false, isFake: false, isVerified: false, isRestricted: false, isForum: false };
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { Thumbnail } from "./0_thumbnail.js";
|
|
22
22
|
/** A document. */
|
|
23
23
|
export interface Document {
|
|
@@ -34,5 +34,5 @@ export interface Document {
|
|
|
34
34
|
/** Size of the file in bytes. */
|
|
35
35
|
fileSize: number;
|
|
36
36
|
}
|
|
37
|
-
export declare function constructDocument(document:
|
|
37
|
+
export declare function constructDocument(document: Api.document, fileNameAttribute: Api.documentAttributeFilename, fileId: string, fileUniqueId: string): Document;
|
|
38
38
|
//# sourceMappingURL=1_document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_document.d.ts","sourceRoot":"","sources":["../../src/types/1_document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_document.d.ts","sourceRoot":"","sources":["../../src/types/1_document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,kBAAkB;AAClB,MAAM,WAAW,QAAQ;IACvB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,CAAC,yBAAyB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,CAS1J"}
|
package/esm/types/1_document.js
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { is } from "../2_tl.js";
|
|
21
21
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
22
22
|
export function constructDocument(document, fileNameAttribute, fileId, fileUniqueId) {
|
|
23
23
|
return {
|
|
24
24
|
fileId,
|
|
25
25
|
fileUniqueId,
|
|
26
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => v
|
|
26
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
27
27
|
fileName: fileNameAttribute.file_name,
|
|
28
28
|
mimeType: document.mime_type,
|
|
29
29
|
fileSize: Number(document.size),
|
|
@@ -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 { GiveawayParameters } from "./0_giveaway_parameters.js";
|
|
22
22
|
/** A giveaway. */
|
|
23
23
|
export interface Giveaway {
|
|
@@ -27,5 +27,5 @@ export interface Giveaway {
|
|
|
27
27
|
/** The duration of each Telegram Premium subscription that is to be given away in months. */
|
|
28
28
|
monthCount: number;
|
|
29
29
|
}
|
|
30
|
-
export declare function constructGiveaway(g:
|
|
30
|
+
export declare function constructGiveaway(g: Api.messageMediaGiveaway): Giveaway;
|
|
31
31
|
//# sourceMappingURL=1_giveaway.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_giveaway.d.ts","sourceRoot":"","sources":["../../src/types/1_giveaway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_giveaway.d.ts","sourceRoot":"","sources":["../../src/types/1_giveaway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA+B,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,kBAAkB;AAClB,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,CAAC,oBAAoB,GAAG,QAAQ,CAKvE"}
|
|
@@ -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 { ChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
22
22
|
import { KeyboardButtonPollType } from "./0_keyboard_button_poll_type.js";
|
|
23
23
|
import { MiniAppInfo } from "./0_mini_app_info.js";
|
|
@@ -64,6 +64,6 @@ export interface KeyboardButtonMiniApp extends KeyboardButtonText {
|
|
|
64
64
|
}
|
|
65
65
|
/** A button of a custom keyboard. */
|
|
66
66
|
export type KeyboardButton = KeyboardButtonText | KeyboardButtonRequestUser | KeyboardButtonRequestChat | KeyboardButtonRequestContact | KeyboardButtonRequestLocation | KeyboardButtonRequestPoll | KeyboardButtonMiniApp;
|
|
67
|
-
export declare function constructKeyboardButton(button_:
|
|
68
|
-
export declare function keyboardButtonToTlObject(button: KeyboardButton):
|
|
67
|
+
export declare function constructKeyboardButton(button_: Api.KeyboardButton): KeyboardButton;
|
|
68
|
+
export declare function keyboardButtonToTlObject(button: KeyboardButton): Api.KeyboardButton;
|
|
69
69
|
//# sourceMappingURL=1_keyboard_button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/1_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/1_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAuE,MAAM,kCAAkC,CAAC;AAChJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,gBAAgB;AAChB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,OAAO,CAAC;QACvB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;QAClD,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;QACjD,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,kBAAkB;IACtE,cAAc,EAAE,IAAI,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACvE,eAAe,EAAE,IAAI,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,WAAW,EAAE,sBAAsB,CAAC;CACrC;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,qCAAqC;AACrC,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,yBAAyB,GACzB,yBAAyB,GACzB,4BAA4B,GAC5B,6BAA6B,GAC7B,yBAAyB,GACzB,qBAAqB,CAAC;AAE1B,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,GAAG,cAAc,CAqEnF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,cAAc,GAAG,GAAG,CAAC,cAAc,CAoBnF"}
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { is } from "../2_tl.js";
|
|
22
22
|
import { chatAdministratorRightsToTlObject, constructChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
23
23
|
export function constructKeyboardButton(button_) {
|
|
24
|
-
if (button_
|
|
24
|
+
if (is("keyboardButton", button_)) {
|
|
25
25
|
return { text: button_.text };
|
|
26
26
|
}
|
|
27
|
-
else if (button_
|
|
28
|
-
if (button_.peer_type
|
|
27
|
+
else if (is("keyboardButtonRequestPeer", button_)) {
|
|
28
|
+
if (is("requestPeerTypeUser", button_.peer_type)) {
|
|
29
29
|
return {
|
|
30
30
|
text: button_.text,
|
|
31
31
|
requestUser: {
|
|
@@ -35,7 +35,7 @@ export function constructKeyboardButton(button_) {
|
|
|
35
35
|
},
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
else if (button_.peer_type
|
|
38
|
+
else if (is("requestPeerTypeChat", button_.peer_type)) {
|
|
39
39
|
const button = {
|
|
40
40
|
text: button_.text,
|
|
41
41
|
requestChat: {
|
|
@@ -55,7 +55,7 @@ export function constructKeyboardButton(button_) {
|
|
|
55
55
|
}
|
|
56
56
|
return button;
|
|
57
57
|
}
|
|
58
|
-
else if (button_.peer_type
|
|
58
|
+
else if (is("requestPeerTypeBroadcast", button_.peer_type)) {
|
|
59
59
|
const button = {
|
|
60
60
|
text: button_.text,
|
|
61
61
|
requestChat: {
|
|
@@ -77,20 +77,20 @@ export function constructKeyboardButton(button_) {
|
|
|
77
77
|
unreachable();
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
else if (button_
|
|
80
|
+
else if (is("keyboardButtonRequestPhone", button_)) {
|
|
81
81
|
return { text: button_.text, requestContact: true };
|
|
82
82
|
}
|
|
83
|
-
else if (button_
|
|
83
|
+
else if (is("keyboardButtonRequestGeoLocation", button_)) {
|
|
84
84
|
return { text: button_.text, requestLocation: true };
|
|
85
85
|
}
|
|
86
|
-
else if (button_
|
|
86
|
+
else if (is("keyboardButtonRequestPoll", button_)) {
|
|
87
87
|
const button = { text: button_.text, requestPoll: {} };
|
|
88
88
|
if (button_.quiz) {
|
|
89
89
|
button.requestPoll.type = "quiz";
|
|
90
90
|
}
|
|
91
91
|
return button;
|
|
92
92
|
}
|
|
93
|
-
else if (button_
|
|
93
|
+
else if (is("keyboardButtonWebView", button_) || is("keyboardButtonSimpleWebView", button_)) {
|
|
94
94
|
return { text: button_.text, miniApp: { url: button_.url } };
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
@@ -99,56 +99,29 @@ export function constructKeyboardButton(button_) {
|
|
|
99
99
|
}
|
|
100
100
|
export function keyboardButtonToTlObject(button) {
|
|
101
101
|
if ("requestUser" in button) {
|
|
102
|
-
return
|
|
103
|
-
text: button.text,
|
|
104
|
-
button_id: button.requestUser.requestId,
|
|
105
|
-
peer_type: new types.RequestPeerTypeUser({ bot: button.requestUser.userIsBot, premium: button.requestUser.userIsPremium }),
|
|
106
|
-
max_quantity: 1,
|
|
107
|
-
});
|
|
102
|
+
return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestUser.requestId, peer_type: ({ _: "requestPeerTypeUser", bot: button.requestUser.userIsBot, premium: button.requestUser.userIsPremium }), max_quantity: 1 };
|
|
108
103
|
}
|
|
109
104
|
else if ("requestChat" in button) {
|
|
110
105
|
if (!button.requestChat.chatIsChannel) { // GUESS
|
|
111
|
-
return
|
|
112
|
-
text: button.text,
|
|
113
|
-
button_id: button.requestChat.requestId,
|
|
114
|
-
peer_type: new types.RequestPeerTypeChat({
|
|
115
|
-
forum: button.requestChat.chatIsForum,
|
|
116
|
-
has_username: button.requestChat.chatHasUsername,
|
|
117
|
-
creator: button.requestChat.chatIsCreated || undefined,
|
|
118
|
-
bot_participant: button.requestChat.botIsMember || undefined,
|
|
119
|
-
bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined,
|
|
120
|
-
user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined,
|
|
121
|
-
}),
|
|
122
|
-
max_quantity: 1,
|
|
123
|
-
});
|
|
106
|
+
return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestChat.requestId, peer_type: ({ _: "requestPeerTypeChat", forum: button.requestChat.chatIsForum, has_username: button.requestChat.chatHasUsername, creator: button.requestChat.chatIsCreated || undefined, bot_participant: button.requestChat.botIsMember || undefined, bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined, user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined }), max_quantity: 1 };
|
|
124
107
|
}
|
|
125
108
|
else {
|
|
126
|
-
return
|
|
127
|
-
text: button.text,
|
|
128
|
-
button_id: button.requestChat.requestId,
|
|
129
|
-
peer_type: new types.RequestPeerTypeBroadcast({
|
|
130
|
-
has_username: button.requestChat.chatHasUsername,
|
|
131
|
-
creator: button.requestChat.chatIsCreated || undefined,
|
|
132
|
-
bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined,
|
|
133
|
-
user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined,
|
|
134
|
-
}),
|
|
135
|
-
max_quantity: 1,
|
|
136
|
-
});
|
|
109
|
+
return { _: "keyboardButtonRequestPeer", text: button.text, button_id: button.requestChat.requestId, peer_type: ({ _: "requestPeerTypeBroadcast", has_username: button.requestChat.chatHasUsername, creator: button.requestChat.chatIsCreated || undefined, bot_admin_rights: button.requestChat.botAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.botAdministratorRights) : undefined, user_admin_rights: button.requestChat.userAdministratorRights ? chatAdministratorRightsToTlObject(button.requestChat.userAdministratorRights) : undefined }), max_quantity: 1 };
|
|
137
110
|
}
|
|
138
111
|
}
|
|
139
112
|
else if ("requestContact" in button) {
|
|
140
|
-
return
|
|
113
|
+
return { _: "keyboardButtonRequestPhone", text: button.text };
|
|
141
114
|
}
|
|
142
115
|
else if ("requestLocation" in button) {
|
|
143
|
-
return
|
|
116
|
+
return { _: "keyboardButtonRequestGeoLocation", text: button.text };
|
|
144
117
|
}
|
|
145
118
|
else if ("requestPoll" in button) {
|
|
146
|
-
return
|
|
119
|
+
return { _: "keyboardButtonRequestPoll", text: button.text, quiz: button.requestPoll.type == "quiz" };
|
|
147
120
|
}
|
|
148
121
|
else if ("miniApp" in button) {
|
|
149
|
-
return
|
|
122
|
+
return { _: "keyboardButtonWebView", text: button.text, url: button.miniApp.url };
|
|
150
123
|
}
|
|
151
124
|
else {
|
|
152
|
-
return
|
|
125
|
+
return { _: "keyboardButton", text: button.text };
|
|
153
126
|
}
|
|
154
127
|
}
|
|
@@ -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 { Reaction } from "./0_reaction.js";
|
|
22
22
|
/** Represents a type of reaction made to a message. */
|
|
23
23
|
export interface MessageReaction {
|
|
@@ -30,5 +30,5 @@ export interface MessageReaction {
|
|
|
30
30
|
/** Whether the current user made this reaction. */
|
|
31
31
|
chosen: boolean;
|
|
32
32
|
}
|
|
33
|
-
export declare function constructMessageReaction(reaction_:
|
|
33
|
+
export declare function constructMessageReaction(reaction_: Api.reactionCount, recentReactions: Api.messagePeerReaction[]): MessageReaction;
|
|
34
34
|
//# sourceMappingURL=1_message_reaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_message_reaction.d.ts","sourceRoot":"","sources":["../../src/types/1_message_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"1_message_reaction.d.ts","sourceRoot":"","sources":["../../src/types/1_message_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAoB,MAAM,YAAY,CAAC;AACnD,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,GAAG,CAAC,mBAAmB,EAAE,GAAG,eAAe,CAgBlI"}
|
|
@@ -18,16 +18,16 @@
|
|
|
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, peerToChatId } from "../2_tl.js";
|
|
22
22
|
import { constructReaction } from "./0_reaction.js";
|
|
23
23
|
export function constructMessageReaction(reaction_, recentReactions) {
|
|
24
24
|
const choosers = recentReactions
|
|
25
25
|
.filter((v) => {
|
|
26
|
-
if (reaction_.reaction
|
|
27
|
-
return v.reaction
|
|
26
|
+
if (is("reactionEmoji", reaction_.reaction)) {
|
|
27
|
+
return is("reactionEmoji", v.reaction) && v.reaction.emoticon == reaction_.reaction.emoticon;
|
|
28
28
|
}
|
|
29
|
-
else if (reaction_.reaction
|
|
30
|
-
return v.reaction
|
|
29
|
+
else if (is("reactionCustomEmoji", reaction_.reaction)) {
|
|
30
|
+
return is("reactionCustomEmoji", v.reaction) && v.reaction.document_id == reaction_.reaction.document_id;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
unreachable();
|
package/esm/types/1_photo.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { Thumbnail } from "./0_thumbnail.js";
|
|
22
22
|
/** A photo. */
|
|
23
23
|
export interface Photo {
|
|
@@ -33,9 +33,9 @@ export interface Photo {
|
|
|
33
33
|
fileSize: number;
|
|
34
34
|
thumbnails: Thumbnail[];
|
|
35
35
|
}
|
|
36
|
-
export declare function constructPhoto(photo:
|
|
37
|
-
export declare function getPhotoSizes(photo:
|
|
38
|
-
sizes:
|
|
39
|
-
largest:
|
|
36
|
+
export declare function constructPhoto(photo: Api.photo): Photo;
|
|
37
|
+
export declare function getPhotoSizes(photo: Api.photo): {
|
|
38
|
+
sizes: Api.photoSize[];
|
|
39
|
+
largest: Api.photoSize;
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=1_photo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_photo.d.ts","sourceRoot":"","sources":["../../src/types/1_photo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_photo.d.ts","sourceRoot":"","sources":["../../src/types/1_photo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAErC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,eAAe;AACf,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,KAAK,CAStD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC,SAAS,CAAA;CAAE,CAalG"}
|
package/esm/types/1_photo.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { is } from "../2_tl.js";
|
|
21
21
|
import { getPhotoFileId } from "./_file_id.js";
|
|
22
22
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
23
23
|
export function constructPhoto(photo) {
|
|
@@ -33,14 +33,14 @@ export function constructPhoto(photo) {
|
|
|
33
33
|
export function getPhotoSizes(photo) {
|
|
34
34
|
const sizes = photo.sizes
|
|
35
35
|
.map((v) => {
|
|
36
|
-
if (v
|
|
37
|
-
return
|
|
36
|
+
if (is("photoSizeProgressive", v)) {
|
|
37
|
+
return { _: "photoSize", type: v.type, w: v.w, h: v.h, size: Math.max(...v.sizes) };
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
40
|
return v;
|
|
41
41
|
}
|
|
42
42
|
})
|
|
43
|
-
.filter((v) => v
|
|
43
|
+
.filter((v) => is("photoSize", v))
|
|
44
44
|
.sort((a, b) => a.size - b.size);
|
|
45
45
|
const largest = sizes.slice(-1)[0];
|
|
46
46
|
return { sizes, largest };
|
package/esm/types/1_poll.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
21
|
import { MessageEntity } from "./0_message_entity.js";
|
|
22
22
|
import { PollOption } from "./0_poll_option.js";
|
|
23
23
|
/** A poll. */
|
|
@@ -49,5 +49,5 @@ export interface Poll {
|
|
|
49
49
|
/** The time in which the poll will be closed. */
|
|
50
50
|
closeDate?: Date;
|
|
51
51
|
}
|
|
52
|
-
export declare function constructPoll(media_:
|
|
52
|
+
export declare function constructPoll(media_: Api.messageMediaPoll): Poll;
|
|
53
53
|
//# sourceMappingURL=1_poll.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_poll.d.ts","sourceRoot":"","sources":["../../src/types/1_poll.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_poll.d.ts","sourceRoot":"","sources":["../../src/types/1_poll.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAuB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErE,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,6DAA6D;IAC7D,eAAe,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,gDAAgD;IAChD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,mBAAmB,CAAC,EAAE,aAAa,EAAE,CAAC;IACtC,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAoBhE"}
|
|
@@ -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 { Reaction } from "./0_reaction.js";
|
|
22
22
|
/** The count of a specific reaction. */
|
|
23
23
|
export interface ReactionCount {
|
|
@@ -26,5 +26,5 @@ export interface ReactionCount {
|
|
|
26
26
|
/** Number of times the reaction was added. */
|
|
27
27
|
count: number;
|
|
28
28
|
}
|
|
29
|
-
export declare function constructReactionCount(reaction_:
|
|
29
|
+
export declare function constructReactionCount(reaction_: Api.reactionCount): ReactionCount;
|
|
30
30
|
//# sourceMappingURL=1_reaction_count.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_reaction_count.d.ts","sourceRoot":"","sources":["../../src/types/1_reaction_count.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_reaction_count.d.ts","sourceRoot":"","sources":["../../src/types/1_reaction_count.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,GAAG,CAAC,aAAa,GAAG,aAAa,CAIlF"}
|
|
@@ -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 { MessageEntity } from "./0_message_entity.js";
|
|
22
22
|
/** A reference to a specific part of a message that is being replied to. */
|
|
23
23
|
export interface ReplyQuote {
|
|
@@ -28,5 +28,5 @@ export interface ReplyQuote {
|
|
|
28
28
|
/** The entities of the quoted text. */
|
|
29
29
|
entities: MessageEntity[];
|
|
30
30
|
}
|
|
31
|
-
export declare function constructReplyQuote(quoteText: string | undefined, quoteOffset: number | undefined, quoteEntities:
|
|
31
|
+
export declare function constructReplyQuote(quoteText: string | undefined, quoteOffset: number | undefined, quoteEntities: Api.MessageEntity[] | undefined): ReplyQuote;
|
|
32
32
|
//# sourceMappingURL=1_reply_quote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_reply_quote.d.ts","sourceRoot":"","sources":["../../src/types/1_reply_quote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_reply_quote.d.ts","sourceRoot":"","sources":["../../src/types/1_reply_quote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE9E,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,SAAS,GAAG,UAAU,CAS9J"}
|
package/esm/types/1_sticker.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { MaybePromise } from "../1_utilities.js";
|
|
21
|
-
import {
|
|
21
|
+
import { Api } from "../2_tl.js";
|
|
22
22
|
import { MaskPosition } from "./0_mask_position.js";
|
|
23
23
|
import { Thumbnail } from "./0_thumbnail.js";
|
|
24
24
|
/** A sticker. */
|
|
@@ -55,6 +55,6 @@ export interface Sticker {
|
|
|
55
55
|
fileSize?: number;
|
|
56
56
|
}
|
|
57
57
|
/** @unlisted */
|
|
58
|
-
export type StickerSetNameGetter = (inputStickerSet:
|
|
59
|
-
export declare function constructSticker(document:
|
|
58
|
+
export type StickerSetNameGetter = (inputStickerSet: Api.inputStickerSetID) => MaybePromise<string>;
|
|
59
|
+
export declare function constructSticker(document: Api.document, fileId: string, fileUniqueId: string, getStickerSetName: StickerSetNameGetter, customEmojiId?: string): Promise<Sticker>;
|
|
60
60
|
//# sourceMappingURL=1_sticker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAyB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,iBAAiB;AACjB,MAAM,WAAW,OAAO;IACtB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kMAAkM;IAClM,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IACzC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IACpB,2GAA2G;IAC3G,OAAO,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,sEAAsE;IACtE,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4MAA4M;IAC5M,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,MAAM,oBAAoB,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,KAAK,YAAY,CAAC,MAAM,CAAC,CAAC;AAEpG,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,SAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAwBlL"}
|
package/esm/types/1_sticker.js
CHANGED
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { cleanObject } from "../1_utilities.js";
|
|
21
|
-
import {
|
|
21
|
+
import { is } from "../2_tl.js";
|
|
22
22
|
import { constructMaskPosition } from "./0_mask_position.js";
|
|
23
23
|
import { constructThumbnail } from "./0_thumbnail.js";
|
|
24
24
|
export async function constructSticker(document, fileId, fileUniqueId, getStickerSetName, customEmojiId = "") {
|
|
25
|
-
const stickerAttribute = document.attributes.find((v) => v
|
|
26
|
-
const imageSizeAttribute = document.attributes.find((v) => v
|
|
27
|
-
const customEmojiAttribute = document.attributes.find((v) => v
|
|
28
|
-
const videoAttribute = document.attributes.find((v) => v
|
|
29
|
-
const setName = stickerAttribute.stickerset
|
|
25
|
+
const stickerAttribute = document.attributes.find((v) => is("documentAttributeSticker", v));
|
|
26
|
+
const imageSizeAttribute = document.attributes.find((v) => is("documentAttributeImageSize", v));
|
|
27
|
+
const customEmojiAttribute = document.attributes.find((v) => is("documentAttributeCustomEmoji", v));
|
|
28
|
+
const videoAttribute = document.attributes.find((v) => is("documentAttributeVideo", v));
|
|
29
|
+
const setName = is("inputStickerSetID", stickerAttribute.stickerset) ? await getStickerSetName(stickerAttribute.stickerset) : undefined;
|
|
30
30
|
return cleanObject({
|
|
31
31
|
fileId,
|
|
32
32
|
fileUniqueId,
|
|
@@ -35,13 +35,13 @@ export async function constructSticker(document, fileId, fileUniqueId, getSticke
|
|
|
35
35
|
height: imageSizeAttribute ? imageSizeAttribute.h : videoAttribute ? videoAttribute.h : 512,
|
|
36
36
|
isAnimated: document.mime_type == "application/x-tgsticker",
|
|
37
37
|
isVideo: document.mime_type == "video/webm",
|
|
38
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) => v
|
|
38
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => is("photoSize", v) ? constructThumbnail(v, document) : null).filter((v) => v) : [],
|
|
39
39
|
emoji: (customEmojiAttribute ? customEmojiAttribute.alt : stickerAttribute.alt) || undefined,
|
|
40
40
|
setName,
|
|
41
41
|
premiumAnimation: undefined, // TODO
|
|
42
42
|
maskPosition: stickerAttribute.mask_coords ? constructMaskPosition(stickerAttribute.mask_coords) : undefined,
|
|
43
|
-
customEmojiId: customEmojiAttribute ? customEmojiId : undefined,
|
|
44
|
-
needsRepainting: customEmojiAttribute ? Boolean(customEmojiAttribute.text_color) : undefined,
|
|
43
|
+
customEmojiId: customEmojiAttribute ? customEmojiId : undefined,
|
|
44
|
+
needsRepainting: customEmojiAttribute ? Boolean(customEmojiAttribute.text_color) : undefined,
|
|
45
45
|
fileSize: Number(document.size),
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -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
|
/** @unlisted */
|
|
23
23
|
export interface StoryPrivacyEveryone {
|
|
@@ -41,6 +41,6 @@ export interface StoryPrivacyOnly {
|
|
|
41
41
|
}
|
|
42
42
|
/** A story's privacy choice. */
|
|
43
43
|
export type StoryPrivacy = StoryPrivacyEveryone | StoryPrivacyConctacts | StoryPrivacyCloseFriends | StoryPrivacyOnly;
|
|
44
|
-
export declare function storyPrivacyToTlObject(privacy: StoryPrivacy, getEntity: EntityGetter): Promise<
|
|
45
|
-
export declare function constructStoryPrivacy(privacy:
|
|
44
|
+
export declare function storyPrivacyToTlObject(privacy: StoryPrivacy, getEntity: EntityGetter): Promise<Api.InputPrivacyRule[]>;
|
|
45
|
+
export declare function constructStoryPrivacy(privacy: Api.PrivacyRule[]): StoryPrivacy;
|
|
46
46
|
//# sourceMappingURL=1_story_privacy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/1_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"1_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/1_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,qBAAqB;IACrB,YAAY,EAAE,IAAI,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,gCAAgC;AAChC,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,CAAC;AAqBrB,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAkB5H;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,GAAG,YAAY,CAY9E"}
|