@mtkruto/node 0.1.119 → 0.1.121
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 +3 -3
- package/esm/0_deps.js +3 -3
- package/esm/2_tl.d.ts +3 -3
- package/esm/2_tl.js +3 -3
- package/esm/3_errors.d.ts +509 -509
- package/esm/3_errors.js +509 -509
- package/esm/4_constants.d.ts +2 -2
- package/esm/4_constants.js +2 -2
- package/esm/4_errors.d.ts +7 -7
- package/esm/4_errors.js +6 -6
- package/esm/_dnt.shims.js +0 -1
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.js +4 -4
- package/esm/client/0_utilities.d.ts +3 -3
- package/esm/client/0_utilities.js +1 -2
- package/esm/client/2_client_plain.js +20 -20
- package/esm/client/5_client.d.ts +20 -6
- package/esm/client/5_client.js +313 -256
- package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.js +1 -1
- package/esm/storage/0_storage.d.ts +5 -5
- package/esm/tl/1_tl_object.d.ts +4 -0
- package/esm/tl/1_tl_object.js +13 -4
- package/esm/tl/2_types.d.ts +11384 -6448
- package/esm/tl/2_types.js +16321 -10139
- package/esm/tl/3_functions.d.ts +6773 -2401
- package/esm/tl/3_functions.js +9440 -3368
- package/esm/tl/3_utilities.d.ts +2 -2
- package/esm/tl/3_utilities.js +4 -4
- package/esm/tl/6_message.d.ts +1 -1
- package/esm/tl/6_message.js +1 -1
- package/esm/types/0__file_id.js +1 -2
- package/esm/types/0_audio.js +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +3 -3
- package/esm/types/0_chat_administrator_rights.js +20 -20
- package/esm/types/0_chat_photo.js +8 -8
- package/esm/types/0_contact.js +4 -4
- package/esm/types/0_force_reply.d.ts +1 -1
- package/esm/types/0_location.js +4 -4
- package/esm/types/0_mask_position.d.ts +2 -2
- package/esm/types/0_message_entity.d.ts +3 -3
- package/esm/types/0_message_entity.js +8 -8
- package/esm/types/0_poll_option.d.ts +2 -2
- package/esm/types/0_reply_keyboard_remove.d.ts +1 -1
- package/esm/types/0_restriction_reason.d.ts +2 -2
- package/esm/types/0_thumbnail.js +3 -3
- package/esm/types/0_venue.js +3 -3
- package/esm/types/0_voice.js +1 -1
- package/esm/types/1_animation.js +2 -2
- package/esm/types/1_bot_command_scope.d.ts +1 -2
- package/esm/types/1_bot_command_scope.js +1 -1
- package/esm/types/1_chat.js +9 -9
- package/esm/types/1_document.js +2 -2
- package/esm/types/1_input_invoice_message_content.d.ts +1 -1
- package/esm/types/1_keyboard_button.d.ts +3 -3
- package/esm/types/1_keyboard_button.js +35 -35
- package/esm/types/1_photo.js +1 -1
- package/esm/types/1_poll.js +6 -6
- package/esm/types/1_sticker.js +3 -3
- package/esm/types/1_user.js +6 -6
- package/esm/types/1_video.js +1 -1
- package/esm/types/2_game.js +3 -3
- package/esm/types/2_inline_keyboard_button.d.ts +3 -3
- package/esm/types/2_inline_keyboard_button.js +9 -9
- package/esm/types/2_inline_query.js +8 -8
- package/esm/types/2_reply_keyboard_markup.d.ts +1 -1
- package/esm/types/2_reply_keyboard_markup.js +2 -2
- package/esm/types/3_inline_keyboard_markup.d.ts +1 -1
- package/esm/types/3_message.d.ts +4 -4
- package/esm/types/3_message.js +64 -64
- package/esm/types/4_callback_query.js +6 -6
- package/esm/types/4_reply_markup.d.ts +1 -1
- package/esm/types/5_inline_query_result.d.ts +1 -2
- package/esm/types/5_inline_query_result.js +30 -30
- package/package.json +13 -12
- package/script/0_deps.d.ts +3 -3
- package/script/0_deps.js +3 -3
- package/script/2_tl.d.ts +3 -3
- package/script/2_tl.js +5 -15
- package/script/3_errors.d.ts +509 -509
- package/script/3_errors.js +509 -509
- package/script/4_constants.d.ts +2 -2
- package/script/4_constants.js +2 -2
- package/script/4_errors.d.ts +7 -7
- package/script/4_errors.js +6 -6
- package/script/_dnt.shims.js +0 -1
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.js +4 -4
- package/script/client/0_utilities.d.ts +3 -3
- package/script/client/0_utilities.js +1 -2
- package/script/client/2_client_plain.js +20 -20
- package/script/client/5_client.d.ts +20 -6
- package/script/client/5_client.js +312 -255
- package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.js +1 -1
- package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +3 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +1 -1
- package/script/storage/0_storage.d.ts +5 -5
- package/script/storage/0_utilities.js +1 -1
- package/script/tl/1_tl_object.d.ts +4 -0
- package/script/tl/1_tl_object.js +14 -5
- package/script/tl/2_types.d.ts +11384 -6448
- package/script/tl/2_types.js +18030 -11825
- package/script/tl/3_functions.d.ts +6773 -2401
- package/script/tl/3_functions.js +10051 -3994
- package/script/tl/3_utilities.d.ts +2 -2
- package/script/tl/3_utilities.js +7 -30
- package/script/tl/6_message.d.ts +1 -1
- package/script/tl/6_message.js +4 -4
- package/script/types/0__file_id.js +4 -4
- package/script/types/0_audio.js +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +3 -3
- package/script/types/0_chat_administrator_rights.js +20 -20
- package/script/types/0_chat_photo.js +8 -8
- package/script/types/0_contact.js +4 -4
- package/script/types/0_force_reply.d.ts +1 -1
- package/script/types/0_location.js +4 -4
- package/script/types/0_mask_position.d.ts +2 -2
- package/script/types/0_message_entity.d.ts +3 -3
- package/script/types/0_message_entity.js +8 -8
- package/script/types/0_poll_option.d.ts +2 -2
- package/script/types/0_reply_keyboard_remove.d.ts +1 -1
- package/script/types/0_restriction_reason.d.ts +2 -2
- package/script/types/0_thumbnail.js +3 -3
- package/script/types/0_venue.js +3 -3
- package/script/types/0_voice.js +1 -1
- package/script/types/1_animation.js +2 -2
- package/script/types/1_bot_command_scope.d.ts +1 -2
- package/script/types/1_bot_command_scope.js +1 -1
- package/script/types/1_chat.js +9 -9
- package/script/types/1_document.js +2 -2
- package/script/types/1_input_invoice_message_content.d.ts +1 -1
- package/script/types/1_keyboard_button.d.ts +3 -3
- package/script/types/1_keyboard_button.js +35 -35
- package/script/types/1_photo.js +1 -1
- package/script/types/1_poll.js +6 -6
- package/script/types/1_sticker.js +3 -3
- package/script/types/1_user.js +6 -6
- package/script/types/1_video.js +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_inline_keyboard_button.d.ts +3 -3
- package/script/types/2_inline_keyboard_button.js +9 -9
- package/script/types/2_inline_query.js +8 -8
- package/script/types/2_reply_keyboard_markup.d.ts +1 -1
- package/script/types/2_reply_keyboard_markup.js +2 -2
- package/script/types/3_inline_keyboard_markup.d.ts +1 -1
- package/script/types/3_message.d.ts +4 -4
- package/script/types/3_message.js +64 -64
- package/script/types/4_callback_query.js +6 -6
- package/script/types/4_reply_markup.d.ts +1 -1
- package/script/types/5_inline_query_result.d.ts +1 -2
- package/script/types/5_inline_query_result.js +30 -30
- package/esm/_dnt.test_shims.d.ts +0 -10
- package/esm/client/0_password_test.d.ts +0 -1
- package/esm/client/0_utilities_test.d.ts +0 -1
- package/esm/storage/0_utilities_test.d.ts +0 -1
- package/esm/tl/0_tl_raw_reader_test.d.ts +0 -1
- package/esm/tl/0_tl_raw_writer_test.d.ts +0 -1
- package/esm/tl/1_tl_object_test.d.ts +0 -1
- package/esm/tl/2_types_test.d.ts +0 -1
- package/esm/tl/3_deserialize_test.d.ts +0 -1
- package/esm/tl/3_functions_test.d.ts +0 -1
- package/esm/tl/6_message_test.d.ts +0 -1
- package/esm/utilities/0_base64_test.d.ts +0 -1
- package/esm/utilities/0_bigint_test.d.ts +0 -1
- package/esm/utilities/0_buffer_test.d.ts +0 -1
- package/esm/utilities/0_rle_test.d.ts +0 -1
- package/script/_dnt.test_shims.d.ts +0 -10
- package/script/client/0_password_test.d.ts +0 -1
- package/script/client/0_utilities_test.d.ts +0 -1
- package/script/storage/0_utilities_test.d.ts +0 -1
- package/script/tl/0_tl_raw_reader_test.d.ts +0 -1
- package/script/tl/0_tl_raw_writer_test.d.ts +0 -1
- package/script/tl/1_tl_object_test.d.ts +0 -1
- package/script/tl/2_types_test.d.ts +0 -1
- package/script/tl/3_deserialize_test.d.ts +0 -1
- package/script/tl/3_functions_test.d.ts +0 -1
- package/script/tl/6_message_test.d.ts +0 -1
- package/script/utilities/0_base64_test.d.ts +0 -1
- package/script/utilities/0_bigint_test.d.ts +0 -1
- package/script/utilities/0_buffer_test.d.ts +0 -1
- package/script/utilities/0_rle_test.d.ts +0 -1
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.js +0 -0
- /package/esm/tl/{5_rpc_result.d.ts → 4_rpc_result.d.ts} +0 -0
- /package/esm/tl/{5_rpc_result.js → 4_rpc_result.js} +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/tl/{5_rpc_result.d.ts → 4_rpc_result.d.ts} +0 -0
- /package/script/tl/{5_rpc_result.js → 4_rpc_result.js} +0 -0
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkChannelGap, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
13
|
+
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkChannelGap, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.Client = exports.ConnectionError = exports.restartAuth = exports.skipInvoke = exports.handleMigrationError = void 0;
|
|
16
16
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -37,6 +37,7 @@ const getEntity = Symbol();
|
|
|
37
37
|
const getStickerSetName = Symbol();
|
|
38
38
|
exports.handleMigrationError = Symbol();
|
|
39
39
|
const getMessageWithReply = Symbol();
|
|
40
|
+
const functionNamespaces = Object.entries(_2_tl_js_1.functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
40
41
|
function skipInvoke() {
|
|
41
42
|
return (_ctx, next) => next();
|
|
42
43
|
}
|
|
@@ -126,6 +127,62 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
126
127
|
_Client_autoStart.set(this, void 0);
|
|
127
128
|
_Client_ignoreOutgoing.set(this, void 0);
|
|
128
129
|
_Client_prefixes.set(this, void 0);
|
|
130
|
+
_Client_namespaceProxies.set(this, (() => {
|
|
131
|
+
// deno-lint-ignore no-explicit-any
|
|
132
|
+
const proxies = {};
|
|
133
|
+
for (const name of functionNamespaces) {
|
|
134
|
+
const ns = _2_tl_js_1.functions[name];
|
|
135
|
+
proxies[name] = new Proxy({}, {
|
|
136
|
+
get: (_, key) => {
|
|
137
|
+
if (key in ns) {
|
|
138
|
+
// deno-lint-ignore no-explicit-any
|
|
139
|
+
const func = ns[key];
|
|
140
|
+
if (func instanceof Function) {
|
|
141
|
+
// deno-lint-ignore no-explicit-any
|
|
142
|
+
return (params) => {
|
|
143
|
+
// deno-lint-ignore ban-ts-comment
|
|
144
|
+
// @ts-ignore
|
|
145
|
+
return this.invoke(new func(params));
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
set() {
|
|
154
|
+
return true;
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return proxies;
|
|
159
|
+
})());
|
|
160
|
+
Object.defineProperty(this, "api", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
configurable: true,
|
|
163
|
+
writable: true,
|
|
164
|
+
value: new Proxy({}, {
|
|
165
|
+
get: (_, key) => {
|
|
166
|
+
if (key in _2_tl_js_1.functions) {
|
|
167
|
+
const func = _2_tl_js_1.functions[key];
|
|
168
|
+
if (func instanceof Function) {
|
|
169
|
+
// deno-lint-ignore no-explicit-any
|
|
170
|
+
return (params) => {
|
|
171
|
+
// deno-lint-ignore ban-ts-comment
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
return this.invoke(new func(params));
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
return __classPrivateFieldGet(this, _Client_namespaceProxies, "f")[key];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
set() {
|
|
182
|
+
return true;
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
});
|
|
129
186
|
_Client_constructContext.set(this, async (update) => {
|
|
130
187
|
const msg = update.message ?? update.editedMessage ?? update.callbackQuery?.message;
|
|
131
188
|
const mustGetMsg = () => {
|
|
@@ -288,7 +345,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
288
345
|
_Client_lastGetMe.set(this, null);
|
|
289
346
|
_Client_usernameResolver.set(this, async (v) => {
|
|
290
347
|
const inputPeer = await this.getInputPeer(v).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.InputPeerUser));
|
|
291
|
-
return new _2_tl_js_1.types.InputUser(
|
|
348
|
+
return new _2_tl_js_1.types.InputUser(inputPeer);
|
|
292
349
|
});
|
|
293
350
|
//#region Composer
|
|
294
351
|
_Client_handle.set(this, _4_composer_js_1.skip);
|
|
@@ -413,7 +470,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
413
470
|
release();
|
|
414
471
|
}
|
|
415
472
|
}
|
|
416
|
-
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
473
|
+
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
417
474
|
__classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
|
|
418
475
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { connectionState }), _0_utilities_js_1.resolve);
|
|
419
476
|
});
|
|
@@ -430,7 +487,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
430
487
|
throw new Error(`${source}: not a bot client`);
|
|
431
488
|
}
|
|
432
489
|
}, _Client_fetchState = async function _Client_fetchState(source) {
|
|
433
|
-
const state = await this.invoke(new _2_tl_js_1.functions.
|
|
490
|
+
const state = await this.invoke(new _2_tl_js_1.functions.updates.getState());
|
|
434
491
|
__classPrivateFieldSet(this, _Client_updateState, state, "f");
|
|
435
492
|
d("state fetched [%s]", source);
|
|
436
493
|
}, exports.handleMigrationError)](err) {
|
|
@@ -478,7 +535,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
478
535
|
params = { phone: () => (0, _1_utilities_js_1.mustPrompt)("Phone number:"), code: () => (0, _1_utilities_js_1.mustPrompt)("Verification code:"), password: () => (0, _1_utilities_js_1.mustPrompt)("Password:") };
|
|
479
536
|
}
|
|
480
537
|
}
|
|
481
|
-
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof _2_tl_js_1.types.
|
|
538
|
+
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof _2_tl_js_1.types.auth.ExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
482
539
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
483
540
|
try {
|
|
484
541
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
@@ -494,8 +551,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
494
551
|
if (typeof params === "string") {
|
|
495
552
|
while (true) {
|
|
496
553
|
try {
|
|
497
|
-
const auth = await this.invoke(new _2_tl_js_1.functions.
|
|
498
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
554
|
+
const auth = await this.invoke(new _2_tl_js_1.functions.auth.importBotAuthorization({ api_id: this.apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 }));
|
|
555
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
499
556
|
await this.storage.setAccountType("bot");
|
|
500
557
|
break;
|
|
501
558
|
}
|
|
@@ -515,8 +572,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
515
572
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
516
573
|
return;
|
|
517
574
|
}
|
|
518
|
-
if (params instanceof _2_tl_js_1.types.
|
|
519
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
575
|
+
if (params instanceof _2_tl_js_1.types.auth.ExportedAuthorization) {
|
|
576
|
+
await this.invoke(new _2_tl_js_1.functions.auth.importAuthorization({ id: params.id, bytes: params.bytes }));
|
|
520
577
|
dAuth("authorization imported");
|
|
521
578
|
return;
|
|
522
579
|
}
|
|
@@ -527,12 +584,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
527
584
|
while (true) {
|
|
528
585
|
try {
|
|
529
586
|
phone = typeof params.phone === "string" ? params.phone : await params.phone();
|
|
530
|
-
const sendCode = () => this.invoke(new _2_tl_js_1.functions.
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
587
|
+
const sendCode = () => this.invoke(new _2_tl_js_1.functions.auth.sendCode({
|
|
588
|
+
phone_number: phone,
|
|
589
|
+
api_id: this.apiId,
|
|
590
|
+
api_hash: this.apiHash,
|
|
534
591
|
settings: new _2_tl_js_1.types.CodeSettings(),
|
|
535
|
-
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
592
|
+
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.auth.SentCode));
|
|
536
593
|
try {
|
|
537
594
|
sentCode = await sendCode();
|
|
538
595
|
}
|
|
@@ -562,12 +619,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
562
619
|
code: while (true) {
|
|
563
620
|
const code = typeof params.code === "string" ? params.code : await params.code();
|
|
564
621
|
try {
|
|
565
|
-
const auth = await this.invoke(new _2_tl_js_1.functions.
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
622
|
+
const auth = await this.invoke(new _2_tl_js_1.functions.auth.signIn({
|
|
623
|
+
phone_number: phone,
|
|
624
|
+
phone_code: code,
|
|
625
|
+
phone_code_hash: sentCode.phone_code_hash,
|
|
569
626
|
}));
|
|
570
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
627
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
571
628
|
await this.storage.setAccountType("user");
|
|
572
629
|
dAuth("authorized as user");
|
|
573
630
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -575,7 +632,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
575
632
|
return;
|
|
576
633
|
}
|
|
577
634
|
catch (err_) {
|
|
578
|
-
if (err_ instanceof _2_tl_js_1.types.
|
|
635
|
+
if (err_ instanceof _2_tl_js_1.types.Rpc_error && err_.error_message == "PHONE_CODE_INVALID") {
|
|
579
636
|
continue code;
|
|
580
637
|
}
|
|
581
638
|
else {
|
|
@@ -588,15 +645,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
588
645
|
throw err;
|
|
589
646
|
}
|
|
590
647
|
password: while (true) {
|
|
591
|
-
const ap = await this.invoke(new _2_tl_js_1.functions.
|
|
592
|
-
if (!(ap.
|
|
593
|
-
throw new Error(`Handling ${ap.
|
|
648
|
+
const ap = await this.invoke(new _2_tl_js_1.functions.account.getPassword());
|
|
649
|
+
if (!(ap.current_algo instanceof _2_tl_js_1.types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow)) {
|
|
650
|
+
throw new Error(`Handling ${ap.current_algo?.[_2_tl_js_1.name]} not implemented`);
|
|
594
651
|
}
|
|
595
652
|
try {
|
|
596
653
|
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
597
654
|
const input = await (0, _0_password_js_1.checkPassword)(password, ap);
|
|
598
|
-
const auth = await this.invoke(new _2_tl_js_1.functions.
|
|
599
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
655
|
+
const auth = await this.invoke(new _2_tl_js_1.functions.auth.checkPassword({ password: input }));
|
|
656
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
600
657
|
await this.storage.setAccountType("user");
|
|
601
658
|
dAuth("authorized as user");
|
|
602
659
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -658,36 +715,36 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
658
715
|
}
|
|
659
716
|
}
|
|
660
717
|
async getUserAccessHash(userId) {
|
|
661
|
-
const users = await this.invoke(new _2_tl_js_1.functions.
|
|
662
|
-
return users[0]?.[_2_tl_js_1.as](_2_tl_js_1.types.User).
|
|
718
|
+
const users = await this.invoke(new _2_tl_js_1.functions.users.getUsers({ id: [new _2_tl_js_1.types.InputUser({ user_id: userId, access_hash: 0n })] }));
|
|
719
|
+
return users[0]?.[_2_tl_js_1.as](_2_tl_js_1.types.User).access_hash ?? 0n;
|
|
663
720
|
}
|
|
664
721
|
async getInputPeer(id) {
|
|
665
722
|
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
666
|
-
if ((inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.
|
|
667
|
-
if ("
|
|
668
|
-
inputPeer.
|
|
723
|
+
if ((inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") {
|
|
724
|
+
if ("channel_id" in inputPeer) {
|
|
725
|
+
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChannelAccessHash).call(this, inputPeer.channel_id);
|
|
669
726
|
}
|
|
670
727
|
else {
|
|
671
|
-
inputPeer.
|
|
672
|
-
await this.storage.setUserAccessHash(inputPeer.
|
|
728
|
+
inputPeer.access_hash = await this.getUserAccessHash(inputPeer.user_id);
|
|
729
|
+
await this.storage.setUserAccessHash(inputPeer.user_id, inputPeer.access_hash);
|
|
673
730
|
}
|
|
674
731
|
}
|
|
675
732
|
return inputPeer;
|
|
676
733
|
}
|
|
677
734
|
[(_Client_initConnection = async function _Client_initConnection() {
|
|
678
735
|
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
679
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
query: new _2_tl_js_1.functions.
|
|
736
|
+
await this.invoke(new _2_tl_js_1.functions.initConnection({
|
|
737
|
+
api_id: this.apiId,
|
|
738
|
+
app_version: this.appVersion,
|
|
739
|
+
device_model: this.deviceModel,
|
|
740
|
+
lang_code: this.langCode,
|
|
741
|
+
lang_pack: this.langPack,
|
|
742
|
+
query: new _2_tl_js_1.functions.invokeWithLayer({
|
|
686
743
|
layer: _4_constants_js_1.LAYER,
|
|
687
|
-
query: new _2_tl_js_1.functions.
|
|
744
|
+
query: new _2_tl_js_1.functions.help.getConfig(),
|
|
688
745
|
}),
|
|
689
|
-
|
|
690
|
-
|
|
746
|
+
system_lang_code: this.systemLangCode,
|
|
747
|
+
system_version: this.systemVersion,
|
|
691
748
|
}));
|
|
692
749
|
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
693
750
|
d("connection inited");
|
|
@@ -709,7 +766,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
709
766
|
while (this.connected) {
|
|
710
767
|
try {
|
|
711
768
|
if (__classPrivateFieldGet(this, _Client_toAcknowledge, "f").size >= _4_constants_js_1.ACK_THRESHOLD) {
|
|
712
|
-
await this.send(new _2_tl_js_1.types.
|
|
769
|
+
await this.send(new _2_tl_js_1.types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _Client_toAcknowledge, "f")] }));
|
|
713
770
|
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").clear();
|
|
714
771
|
}
|
|
715
772
|
const buffer = await this.transport.transport.receive();
|
|
@@ -725,33 +782,33 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
725
782
|
const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
|
|
726
783
|
for (const message of messages) {
|
|
727
784
|
let body = message.body;
|
|
728
|
-
if (body instanceof _2_tl_js_1.types.
|
|
729
|
-
body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.
|
|
785
|
+
if (body instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
786
|
+
body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.packed_data)).readObject();
|
|
730
787
|
}
|
|
731
|
-
dRecv("received %s", body.constructor.name);
|
|
732
|
-
if (body instanceof _2_tl_js_1.types.
|
|
788
|
+
dRecv("received %s", (typeof body === "object" && _2_tl_js_1.name in body) ? body[_2_tl_js_1.name] : body.constructor.name);
|
|
789
|
+
if (body instanceof _2_tl_js_1.types._Updates || body instanceof _2_tl_js_1.types._Update) {
|
|
733
790
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(() => __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, body, true));
|
|
734
791
|
}
|
|
735
|
-
else if (body instanceof _2_tl_js_1.types.
|
|
736
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = body.
|
|
792
|
+
else if (body instanceof _2_tl_js_1.types.New_session_created) {
|
|
793
|
+
__classPrivateFieldGet(this, _Client_state, "f").salt = body.server_salt;
|
|
737
794
|
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
738
795
|
}
|
|
739
796
|
else if (message.body instanceof _2_tl_js_1.RPCResult) {
|
|
740
797
|
let result = message.body.result;
|
|
741
|
-
if (result instanceof _2_tl_js_1.types.
|
|
742
|
-
result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.
|
|
798
|
+
if (result instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
799
|
+
result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.packed_data)).readObject();
|
|
743
800
|
}
|
|
744
|
-
if (result instanceof _2_tl_js_1.types.
|
|
745
|
-
dRecv("RPCResult: %d %s", result.
|
|
801
|
+
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
802
|
+
dRecv("RPCResult: %d %s", result.error_code, result.error_message);
|
|
746
803
|
}
|
|
747
804
|
else {
|
|
748
|
-
dRecv("RPCResult: %s", result.constructor.name);
|
|
805
|
+
dRecv("RPCResult: %s", (typeof result === "object" && _2_tl_js_1.name in result) ? result[_2_tl_js_1.name] : result.constructor.name);
|
|
749
806
|
}
|
|
750
807
|
const messageId = message.body.messageId;
|
|
751
808
|
const resolvePromise = () => {
|
|
752
809
|
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(messageId);
|
|
753
810
|
if (promise) {
|
|
754
|
-
if (result instanceof _2_tl_js_1.types.
|
|
811
|
+
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
755
812
|
promise.reject((0, _4_errors_js_1.upgradeInstance)(result));
|
|
756
813
|
}
|
|
757
814
|
else {
|
|
@@ -760,7 +817,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
760
817
|
__classPrivateFieldGet(this, _Client_promises, "f").delete(messageId);
|
|
761
818
|
}
|
|
762
819
|
};
|
|
763
|
-
if (result instanceof _2_tl_js_1.types.
|
|
820
|
+
if (result instanceof _2_tl_js_1.types._Updates || result instanceof _2_tl_js_1.types._Update) {
|
|
764
821
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(async () => {
|
|
765
822
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, result, true);
|
|
766
823
|
resolvePromise();
|
|
@@ -772,20 +829,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
772
829
|
}
|
|
773
830
|
}
|
|
774
831
|
else if (message.body instanceof _2_tl_js_1.types.Pong) {
|
|
775
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.
|
|
832
|
+
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.msg_id);
|
|
776
833
|
if (promise) {
|
|
777
834
|
promise.resolve(message.body);
|
|
778
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.
|
|
835
|
+
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.msg_id);
|
|
779
836
|
}
|
|
780
837
|
}
|
|
781
|
-
else if (message.body instanceof _2_tl_js_1.types.
|
|
838
|
+
else if (message.body instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
782
839
|
d("server salt reassigned");
|
|
783
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.
|
|
840
|
+
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.new_server_salt;
|
|
784
841
|
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
785
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.
|
|
842
|
+
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.bad_msg_id);
|
|
786
843
|
if (promise) {
|
|
787
844
|
promise.resolve(message.body);
|
|
788
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.
|
|
845
|
+
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.bad_msg_id);
|
|
789
846
|
}
|
|
790
847
|
}
|
|
791
848
|
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").add(message.id);
|
|
@@ -816,7 +873,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
816
873
|
while (this.connected) {
|
|
817
874
|
await new Promise((r) => setTimeout(r, __classPrivateFieldGet(this, _Client_pingInterval, "f")));
|
|
818
875
|
try {
|
|
819
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
876
|
+
await this.invoke(new _2_tl_js_1.functions.ping_delay_disconnect({ ping_id: (0, _1_utilities_js_1.getRandomBigInt)(8, true, false), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") + 15 }));
|
|
820
877
|
}
|
|
821
878
|
catch (err) {
|
|
822
879
|
d("ping loop error: %o", err);
|
|
@@ -838,18 +895,18 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
838
895
|
while (true) {
|
|
839
896
|
try {
|
|
840
897
|
let seqNo = __classPrivateFieldGet(this, _Client_state, "f").seqNo * 2;
|
|
841
|
-
if (!(function_ instanceof _2_tl_js_1.functions.
|
|
898
|
+
if (!(function_ instanceof _2_tl_js_1.functions.ping) && !(function_ instanceof _2_tl_js_1.types.Msgs_ack)) {
|
|
842
899
|
seqNo++;
|
|
843
900
|
__classPrivateFieldGet(this, _Client_state, "f").seqNo++;
|
|
844
901
|
}
|
|
845
902
|
const messageId = __classPrivateFieldSet(this, _Client_lastMsgId, (0, _0_message_js_1.getMessageId)(__classPrivateFieldGet(this, _Client_lastMsgId, "f")), "f");
|
|
846
903
|
const message = new _2_tl_js_1.Message_(messageId, seqNo, function_);
|
|
847
904
|
await this.transport.transport.send(await (0, _0_message_js_1.encryptMessage)(message, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_state, "f").salt, __classPrivateFieldGet(this, _Client_sessionId, "f")));
|
|
848
|
-
d("invoked %s", function_.
|
|
905
|
+
d("invoked %s", function_[_2_tl_js_1.name]);
|
|
849
906
|
if (noWait) {
|
|
850
907
|
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, {
|
|
851
908
|
resolve: (result) => {
|
|
852
|
-
if (result instanceof _2_tl_js_1.types.
|
|
909
|
+
if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
853
910
|
(0, _1_utilities_js_1.drop)(this.invoke(function_, true));
|
|
854
911
|
}
|
|
855
912
|
},
|
|
@@ -869,7 +926,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
869
926
|
}
|
|
870
927
|
throw err;
|
|
871
928
|
}
|
|
872
|
-
if (result instanceof _2_tl_js_1.types.
|
|
929
|
+
if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
873
930
|
return await this.invoke(function_);
|
|
874
931
|
}
|
|
875
932
|
else {
|
|
@@ -891,9 +948,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
891
948
|
}
|
|
892
949
|
}, _Client_processChats = async function _Client_processChats(chats) {
|
|
893
950
|
for (const chat of chats) {
|
|
894
|
-
if (chat instanceof _2_tl_js_1.types.Channel && chat.
|
|
951
|
+
if (chat instanceof _2_tl_js_1.types.Channel && chat.access_hash) {
|
|
895
952
|
await this.storage.setEntity(chat);
|
|
896
|
-
await this.storage.setChannelAccessHash(chat.id, chat.
|
|
953
|
+
await this.storage.setChannelAccessHash(chat.id, chat.access_hash);
|
|
897
954
|
if (chat.username) {
|
|
898
955
|
await this.storage.updateUsernames("channel", chat.id, [chat.username]);
|
|
899
956
|
}
|
|
@@ -907,9 +964,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
907
964
|
}
|
|
908
965
|
}, _Client_processUsers = async function _Client_processUsers(users) {
|
|
909
966
|
for (const user of users) {
|
|
910
|
-
if (user instanceof _2_tl_js_1.types.User && user.
|
|
967
|
+
if (user instanceof _2_tl_js_1.types.User && user.access_hash) {
|
|
911
968
|
await this.storage.setEntity(user);
|
|
912
|
-
await this.storage.setUserAccessHash(user.id, user.
|
|
969
|
+
await this.storage.setUserAccessHash(user.id, user.access_hash);
|
|
913
970
|
if (user.username) {
|
|
914
971
|
await this.storage.updateUsernames("user", user.id, [user.username]);
|
|
915
972
|
}
|
|
@@ -938,7 +995,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
938
995
|
if (updates_ instanceof _2_tl_js_1.types.UpdatesCombined || updates_ instanceof _2_tl_js_1.types.Updates) {
|
|
939
996
|
updates = updates_.updates;
|
|
940
997
|
const seq = updates_.seq;
|
|
941
|
-
const seqStart = "
|
|
998
|
+
const seqStart = "seq_start" in updates_ ? updates_.seq_start : updates_.seq;
|
|
942
999
|
if (checkGap) {
|
|
943
1000
|
if (seqStart == 0) {
|
|
944
1001
|
checkGap = false;
|
|
@@ -978,7 +1035,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
978
1035
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "updatesTooLong");
|
|
979
1036
|
return;
|
|
980
1037
|
}
|
|
981
|
-
else if (updates_ instanceof _2_tl_js_1.types.
|
|
1038
|
+
else if (updates_ instanceof _2_tl_js_1.types._Update) {
|
|
982
1039
|
updates = [updates_];
|
|
983
1040
|
}
|
|
984
1041
|
else {
|
|
@@ -997,11 +1054,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
997
1054
|
continue;
|
|
998
1055
|
}
|
|
999
1056
|
if (checkGap) {
|
|
1000
|
-
await this.checkGap(update.pts, update.
|
|
1057
|
+
await this.checkGap(update.pts, update.pts_count);
|
|
1001
1058
|
}
|
|
1002
1059
|
localState ??= await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1003
1060
|
originalPts ??= localState.pts;
|
|
1004
|
-
if (localState.pts + update.
|
|
1061
|
+
if (localState.pts + update.pts_count > update.pts) {
|
|
1005
1062
|
updates = updates.filter((v) => v != update);
|
|
1006
1063
|
}
|
|
1007
1064
|
else {
|
|
@@ -1012,8 +1069,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1012
1069
|
if (update.pts == 0) {
|
|
1013
1070
|
continue;
|
|
1014
1071
|
}
|
|
1015
|
-
const ptsCount = update.
|
|
1016
|
-
const channelId = update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage ? update.message.
|
|
1072
|
+
const ptsCount = update.pts_count;
|
|
1073
|
+
const channelId = update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage ? update.message.peer_id[_2_tl_js_1.as](_2_tl_js_1.types.PeerChannel).channel_id : update.channel_id;
|
|
1017
1074
|
if (checkGap) {
|
|
1018
1075
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
1019
1076
|
}
|
|
@@ -1048,12 +1105,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1048
1105
|
}
|
|
1049
1106
|
else if (update instanceof _2_tl_js_1.types.UpdateChannelTooLong) {
|
|
1050
1107
|
if (update.pts != undefined) {
|
|
1051
|
-
await this.storage.setChannelPts(update.
|
|
1108
|
+
await this.storage.setChannelPts(update.channel_id, update.pts);
|
|
1052
1109
|
}
|
|
1053
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, update.
|
|
1110
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, update.channel_id, "updateChannelTooLong");
|
|
1054
1111
|
}
|
|
1055
1112
|
else if (update instanceof _2_tl_js_1.types.UpdateUserName) {
|
|
1056
|
-
await this.storage.updateUsernames("user", update.
|
|
1113
|
+
await this.storage.updateUsernames("user", update.user_id, update.usernames.map((v) => v.username));
|
|
1057
1114
|
}
|
|
1058
1115
|
else if (update instanceof _2_tl_js_1.types.UpdatePtsChanged) {
|
|
1059
1116
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "updatePtsChanged");
|
|
@@ -1069,18 +1126,18 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1069
1126
|
}
|
|
1070
1127
|
else if ((0, _0_utilities_js_1.isChannelPtsUpdate)(update)) {
|
|
1071
1128
|
let channelId = null;
|
|
1072
|
-
if ("
|
|
1073
|
-
channelId = update.
|
|
1129
|
+
if ("channel_id" in update) {
|
|
1130
|
+
channelId = update.channel_id;
|
|
1074
1131
|
}
|
|
1075
|
-
else if ("
|
|
1076
|
-
channelId = update.message.
|
|
1132
|
+
else if ("peer_id" in update.message && update.message.peer_id !== undefined && "channel_id" in update.message.peer_id) {
|
|
1133
|
+
channelId = update.message.peer_id.channel_id;
|
|
1077
1134
|
}
|
|
1078
1135
|
if (channelId != null) {
|
|
1079
1136
|
await this.storage.setChannelPts(channelId, update.pts);
|
|
1080
1137
|
}
|
|
1081
1138
|
}
|
|
1082
1139
|
/// If there were any Update, they will be passed to the update handling queue.
|
|
1083
|
-
if (update instanceof _2_tl_js_1.types.
|
|
1140
|
+
if (update instanceof _2_tl_js_1.types._Update) {
|
|
1084
1141
|
updatesToHandle.push(update);
|
|
1085
1142
|
}
|
|
1086
1143
|
}
|
|
@@ -1122,34 +1179,34 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1122
1179
|
try {
|
|
1123
1180
|
let state = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1124
1181
|
while (true) {
|
|
1125
|
-
const difference = await this.invoke(new _2_tl_js_1.functions.
|
|
1126
|
-
if (difference instanceof _2_tl_js_1.types.
|
|
1182
|
+
const difference = await this.invoke(new _2_tl_js_1.functions.updates.getDifference({ pts: state.pts, date: state.date, qts: state.qts ?? 0 }));
|
|
1183
|
+
if (difference instanceof _2_tl_js_1.types.updates.Difference || difference instanceof _2_tl_js_1.types.updates.DifferenceSlice) {
|
|
1127
1184
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1128
1185
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1129
|
-
for (const message of difference.
|
|
1130
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewMessage({ message, pts: 0,
|
|
1186
|
+
for (const message of difference.new_messages) {
|
|
1187
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1131
1188
|
}
|
|
1132
|
-
for (const update of difference.
|
|
1189
|
+
for (const update of difference.other_updates) {
|
|
1133
1190
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1134
1191
|
}
|
|
1135
|
-
if (difference instanceof _2_tl_js_1.types.
|
|
1192
|
+
if (difference instanceof _2_tl_js_1.types.updates.Difference) {
|
|
1136
1193
|
await this.storage.setState(difference.state);
|
|
1137
1194
|
dGap("recovered from update gap");
|
|
1138
1195
|
break;
|
|
1139
1196
|
}
|
|
1140
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1141
|
-
state = difference.
|
|
1197
|
+
else if (difference instanceof _2_tl_js_1.types.updates.DifferenceSlice) {
|
|
1198
|
+
state = difference.intermediate_state;
|
|
1142
1199
|
}
|
|
1143
1200
|
else {
|
|
1144
1201
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1145
1202
|
}
|
|
1146
1203
|
}
|
|
1147
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1204
|
+
else if (difference instanceof _2_tl_js_1.types.updates.DifferenceTooLong) {
|
|
1148
1205
|
await this.storage.deleteMessages();
|
|
1149
1206
|
state.pts = difference.pts;
|
|
1150
1207
|
dGap("received differenceTooLong");
|
|
1151
1208
|
}
|
|
1152
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1209
|
+
else if (difference instanceof _2_tl_js_1.types.updates.DifferenceEmpty) {
|
|
1153
1210
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setUpdateStateDate).call(this, difference.date);
|
|
1154
1211
|
dGap("there was no update gap");
|
|
1155
1212
|
break;
|
|
@@ -1167,33 +1224,33 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1167
1224
|
const pts_ = await this.storage.getChannelPts(channelId);
|
|
1168
1225
|
let pts = pts_ == null ? 1 : pts_;
|
|
1169
1226
|
while (true) {
|
|
1170
|
-
const {
|
|
1171
|
-
const difference = await this.invoke(new _2_tl_js_1.functions.
|
|
1227
|
+
const { access_hash } = await this.getInputPeer(_4_constants_js_1.ZERO_CHANNEL_ID + -Number(channelId)).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.InputPeerChannel));
|
|
1228
|
+
const difference = await this.invoke(new _2_tl_js_1.functions.updates.getChannelDifference({
|
|
1172
1229
|
pts,
|
|
1173
|
-
channel: new _2_tl_js_1.types.InputChannel({ channelId,
|
|
1230
|
+
channel: new _2_tl_js_1.types.InputChannel({ channel_id: channelId, access_hash }),
|
|
1174
1231
|
filter: new _2_tl_js_1.types.ChannelMessagesFilterEmpty(),
|
|
1175
1232
|
limit: await this.storage.getAccountType() == "user" ? _4_constants_js_1.CHANNEL_DIFFERENCE_LIMIT_USER : _4_constants_js_1.CHANNEL_DIFFERENCE_LIMIT_BOT,
|
|
1176
1233
|
}));
|
|
1177
|
-
if (difference instanceof _2_tl_js_1.types.
|
|
1234
|
+
if (difference instanceof _2_tl_js_1.types.updates.ChannelDifference) {
|
|
1178
1235
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1179
1236
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1180
|
-
for (const message of difference.
|
|
1181
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0,
|
|
1237
|
+
for (const message of difference.new_messages) {
|
|
1238
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1182
1239
|
}
|
|
1183
|
-
for (const update of difference.
|
|
1240
|
+
for (const update of difference.other_updates) {
|
|
1184
1241
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1185
1242
|
}
|
|
1186
1243
|
await this.storage.setChannelPts(channelId, difference.pts);
|
|
1187
1244
|
dGapC("recovered from update gap [%o, %s]", channelId, source);
|
|
1188
1245
|
break;
|
|
1189
1246
|
}
|
|
1190
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1247
|
+
else if (difference instanceof _2_tl_js_1.types.updates.ChannelDifferenceTooLong) {
|
|
1191
1248
|
// invalidate messages
|
|
1192
1249
|
dGapC("received channelDifferenceTooLong");
|
|
1193
1250
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1194
1251
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1195
1252
|
for (const message of difference.messages) {
|
|
1196
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0,
|
|
1253
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1197
1254
|
}
|
|
1198
1255
|
const pts_ = difference.dialog[_2_tl_js_1.as](_2_tl_js_1.types.Dialog).pts;
|
|
1199
1256
|
if (pts_ != undefined) {
|
|
@@ -1204,14 +1261,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1204
1261
|
}
|
|
1205
1262
|
dGapC("processed channelDifferenceTooLong");
|
|
1206
1263
|
}
|
|
1207
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1264
|
+
else if (difference instanceof _2_tl_js_1.types.updates.ChannelDifferenceEmpty) {
|
|
1208
1265
|
dGapC("there was no update gap");
|
|
1209
1266
|
break;
|
|
1210
1267
|
}
|
|
1211
1268
|
}
|
|
1212
1269
|
}, _Client_getChannelAccessHash = async function _Client_getChannelAccessHash(channelId) {
|
|
1213
|
-
const channels = await this.invoke(new _2_tl_js_1.functions.
|
|
1214
|
-
return channels.chats[0][_2_tl_js_1.as](_2_tl_js_1.types.Channel).
|
|
1270
|
+
const channels = await this.invoke(new _2_tl_js_1.functions.channels.getChannels({ id: [new _2_tl_js_1.types.InputChannel({ channel_id: channelId, access_hash: 0n })] }));
|
|
1271
|
+
return channels.chats[0][_2_tl_js_1.as](_2_tl_js_1.types.Channel).access_hash ?? 0n;
|
|
1215
1272
|
}, _Client_getInputPeerInner = async function _Client_getInputPeerInner(id) {
|
|
1216
1273
|
if (typeof id === "string") {
|
|
1217
1274
|
id = (0, _0_utilities_js_1.getUsername)(id);
|
|
@@ -1228,14 +1285,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1228
1285
|
}
|
|
1229
1286
|
}
|
|
1230
1287
|
else {
|
|
1231
|
-
const resolved = await this.invoke(new _2_tl_js_1.functions.
|
|
1288
|
+
const resolved = await this.invoke(new _2_tl_js_1.functions.contacts.resolveUsername({ username: id }));
|
|
1232
1289
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, resolved.chats);
|
|
1233
1290
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, resolved.users);
|
|
1234
1291
|
if (resolved.peer instanceof _2_tl_js_1.types.PeerUser) {
|
|
1235
|
-
userId = resolved.peer.
|
|
1292
|
+
userId = resolved.peer.user_id;
|
|
1236
1293
|
}
|
|
1237
1294
|
else if (resolved.peer instanceof _2_tl_js_1.types.PeerChannel) {
|
|
1238
|
-
channelId = resolved.peer.
|
|
1295
|
+
channelId = resolved.peer.channel_id;
|
|
1239
1296
|
}
|
|
1240
1297
|
else {
|
|
1241
1298
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
@@ -1243,11 +1300,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1243
1300
|
}
|
|
1244
1301
|
if (userId) {
|
|
1245
1302
|
const accessHash = await this.storage.getUserAccessHash(userId);
|
|
1246
|
-
return new _2_tl_js_1.types.InputPeerUser({ userId,
|
|
1303
|
+
return new _2_tl_js_1.types.InputPeerUser({ user_id: userId, access_hash: accessHash ?? 0n });
|
|
1247
1304
|
}
|
|
1248
1305
|
else if (channelId) {
|
|
1249
1306
|
const accessHash = await this.storage.getChannelAccessHash(channelId);
|
|
1250
|
-
return new _2_tl_js_1.types.InputPeerChannel({ channelId,
|
|
1307
|
+
return new _2_tl_js_1.types.InputPeerChannel({ channel_id: channelId, access_hash: accessHash ?? 0n });
|
|
1251
1308
|
}
|
|
1252
1309
|
else {
|
|
1253
1310
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
@@ -1256,70 +1313,70 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1256
1313
|
else if (id > 0) {
|
|
1257
1314
|
const id_ = BigInt(id);
|
|
1258
1315
|
const accessHash = await this.storage.getUserAccessHash(id_);
|
|
1259
|
-
return new _2_tl_js_1.types.InputPeerUser({
|
|
1316
|
+
return new _2_tl_js_1.types.InputPeerUser({ user_id: id_, access_hash: accessHash ?? 0n });
|
|
1260
1317
|
}
|
|
1261
1318
|
else if (-_4_constants_js_1.MAX_CHAT_ID <= id) {
|
|
1262
|
-
return new _2_tl_js_1.types.InputPeerChat({
|
|
1319
|
+
return new _2_tl_js_1.types.InputPeerChat({ chat_id: BigInt(Math.abs(id)) });
|
|
1263
1320
|
}
|
|
1264
1321
|
else if (_4_constants_js_1.ZERO_CHANNEL_ID - _4_constants_js_1.MAX_CHANNEL_ID <= id && id != _4_constants_js_1.ZERO_CHANNEL_ID) {
|
|
1265
1322
|
const id_ = BigInt(Math.abs(id - _4_constants_js_1.ZERO_CHANNEL_ID));
|
|
1266
1323
|
const accessHash = await this.storage.getChannelAccessHash(id_);
|
|
1267
|
-
return new _2_tl_js_1.types.InputPeerChannel({
|
|
1324
|
+
return new _2_tl_js_1.types.InputPeerChannel({ channel_id: id_, access_hash: accessHash ?? 0n });
|
|
1268
1325
|
}
|
|
1269
1326
|
else {
|
|
1270
1327
|
throw new Error("ID format unknown or not implemented");
|
|
1271
1328
|
}
|
|
1272
1329
|
}, getEntity)](peer) {
|
|
1273
1330
|
const type = peer instanceof _2_tl_js_1.types.PeerUser ? "user" : peer instanceof _2_tl_js_1.types.PeerChat ? "chat" : peer instanceof _2_tl_js_1.types.PeerChannel ? "channel" : (0, _1_utilities_js_1.UNREACHABLE)();
|
|
1274
|
-
const id = peer instanceof _2_tl_js_1.types.PeerUser ? peer.
|
|
1331
|
+
const id = peer instanceof _2_tl_js_1.types.PeerUser ? peer.user_id : peer instanceof _2_tl_js_1.types.PeerChat ? peer.chat_id : peer instanceof _2_tl_js_1.types.PeerChannel ? peer.channel_id : (0, _1_utilities_js_1.UNREACHABLE)();
|
|
1275
1332
|
return this.storage.getEntity(type, id);
|
|
1276
1333
|
}
|
|
1277
1334
|
async processResult(result) {
|
|
1278
|
-
if (result instanceof _2_tl_js_1.types.
|
|
1279
|
-
result instanceof _2_tl_js_1.types.
|
|
1280
|
-
result instanceof _2_tl_js_1.types.
|
|
1281
|
-
result instanceof _2_tl_js_1.types.
|
|
1282
|
-
result instanceof _2_tl_js_1.types.
|
|
1283
|
-
result instanceof _2_tl_js_1.types.
|
|
1284
|
-
result instanceof _2_tl_js_1.types.
|
|
1285
|
-
result instanceof _2_tl_js_1.types.
|
|
1286
|
-
result instanceof _2_tl_js_1.types.
|
|
1287
|
-
result instanceof _2_tl_js_1.types.
|
|
1288
|
-
result instanceof _2_tl_js_1.types.
|
|
1289
|
-
result instanceof _2_tl_js_1.types.
|
|
1290
|
-
result instanceof _2_tl_js_1.types.
|
|
1291
|
-
result instanceof _2_tl_js_1.types.
|
|
1292
|
-
result instanceof _2_tl_js_1.types.
|
|
1293
|
-
result instanceof _2_tl_js_1.types.
|
|
1294
|
-
result instanceof _2_tl_js_1.types.
|
|
1295
|
-
result instanceof _2_tl_js_1.types.
|
|
1296
|
-
result instanceof _2_tl_js_1.types.
|
|
1297
|
-
result instanceof _2_tl_js_1.types.
|
|
1298
|
-
result instanceof _2_tl_js_1.types.
|
|
1299
|
-
result instanceof _2_tl_js_1.types.
|
|
1300
|
-
result instanceof _2_tl_js_1.types.
|
|
1301
|
-
result instanceof _2_tl_js_1.types.
|
|
1302
|
-
result instanceof _2_tl_js_1.types.
|
|
1303
|
-
result instanceof _2_tl_js_1.types.
|
|
1304
|
-
result instanceof _2_tl_js_1.types.
|
|
1305
|
-
result instanceof _2_tl_js_1.types.
|
|
1306
|
-
result instanceof _2_tl_js_1.types.
|
|
1307
|
-
result instanceof _2_tl_js_1.types.
|
|
1308
|
-
result instanceof _2_tl_js_1.types.
|
|
1309
|
-
result instanceof _2_tl_js_1.types.
|
|
1310
|
-
result instanceof _2_tl_js_1.types.
|
|
1311
|
-
result instanceof _2_tl_js_1.types.
|
|
1312
|
-
result instanceof _2_tl_js_1.types.
|
|
1313
|
-
result instanceof _2_tl_js_1.types.
|
|
1335
|
+
if (result instanceof _2_tl_js_1.types.messages.Dialogs ||
|
|
1336
|
+
result instanceof _2_tl_js_1.types.messages.DialogsSlice ||
|
|
1337
|
+
result instanceof _2_tl_js_1.types.messages.Messages ||
|
|
1338
|
+
result instanceof _2_tl_js_1.types.messages.MessagesSlice ||
|
|
1339
|
+
result instanceof _2_tl_js_1.types.messages.ChannelMessages ||
|
|
1340
|
+
result instanceof _2_tl_js_1.types.messages.ChatFull ||
|
|
1341
|
+
result instanceof _2_tl_js_1.types.contacts.Found ||
|
|
1342
|
+
result instanceof _2_tl_js_1.types.account.PrivacyRules ||
|
|
1343
|
+
result instanceof _2_tl_js_1.types.contacts.ResolvedPeer ||
|
|
1344
|
+
result instanceof _2_tl_js_1.types.channels.ChannelParticipants ||
|
|
1345
|
+
result instanceof _2_tl_js_1.types.channels.ChannelParticipant ||
|
|
1346
|
+
result instanceof _2_tl_js_1.types.messages.PeerDialogs ||
|
|
1347
|
+
result instanceof _2_tl_js_1.types.contacts.TopPeers ||
|
|
1348
|
+
result instanceof _2_tl_js_1.types.channels.AdminLogResults ||
|
|
1349
|
+
result instanceof _2_tl_js_1.types.help.RecentMeUrls ||
|
|
1350
|
+
result instanceof _2_tl_js_1.types.messages.InactiveChats ||
|
|
1351
|
+
result instanceof _2_tl_js_1.types.help.PromoData ||
|
|
1352
|
+
result instanceof _2_tl_js_1.types.messages.MessageViews ||
|
|
1353
|
+
result instanceof _2_tl_js_1.types.messages.DiscussionMessage ||
|
|
1354
|
+
result instanceof _2_tl_js_1.types.phone.GroupCall ||
|
|
1355
|
+
result instanceof _2_tl_js_1.types.phone.GroupParticipants ||
|
|
1356
|
+
result instanceof _2_tl_js_1.types.phone.JoinAsPeers ||
|
|
1357
|
+
result instanceof _2_tl_js_1.types.messages.SponsoredMessages ||
|
|
1358
|
+
result instanceof _2_tl_js_1.types.messages.SearchResultsCalendar ||
|
|
1359
|
+
result instanceof _2_tl_js_1.types.channels.SendAsPeers ||
|
|
1360
|
+
result instanceof _2_tl_js_1.types.users.UserFull ||
|
|
1361
|
+
result instanceof _2_tl_js_1.types.messages.PeerSettings ||
|
|
1362
|
+
result instanceof _2_tl_js_1.types.messages.MessageReactionsList ||
|
|
1363
|
+
result instanceof _2_tl_js_1.types.messages.ForumTopics ||
|
|
1364
|
+
result instanceof _2_tl_js_1.types.account.AutoSaveSettings ||
|
|
1365
|
+
result instanceof _2_tl_js_1.types.chatlists.ExportedInvites ||
|
|
1366
|
+
result instanceof _2_tl_js_1.types.chatlists.ChatlistInviteAlready ||
|
|
1367
|
+
result instanceof _2_tl_js_1.types.chatlists.ChatlistInvite ||
|
|
1368
|
+
result instanceof _2_tl_js_1.types.chatlists.ChatlistUpdates ||
|
|
1369
|
+
result instanceof _2_tl_js_1.types.messages.Chats ||
|
|
1370
|
+
result instanceof _2_tl_js_1.types.messages.ChatsSlice) {
|
|
1314
1371
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, result.chats);
|
|
1315
1372
|
if ("users" in result) {
|
|
1316
1373
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, result.users);
|
|
1317
1374
|
}
|
|
1318
1375
|
}
|
|
1319
|
-
if (result instanceof _2_tl_js_1.types.
|
|
1376
|
+
if (result instanceof _2_tl_js_1.types.messages.Messages) {
|
|
1320
1377
|
for (const message of result.messages) {
|
|
1321
1378
|
if (message instanceof _2_tl_js_1.types.Message || message instanceof _2_tl_js_1.types.MessageService) {
|
|
1322
|
-
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(message.
|
|
1379
|
+
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(message.peer_id), message.id, message);
|
|
1323
1380
|
}
|
|
1324
1381
|
}
|
|
1325
1382
|
}
|
|
@@ -1343,20 +1400,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1343
1400
|
const replyToMsgId = params?.replyToMessageId;
|
|
1344
1401
|
const topMsgId = params?.messageThreadId;
|
|
1345
1402
|
const sendAs = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveSendAs).call(this, params);
|
|
1346
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1403
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMessage({
|
|
1347
1404
|
peer,
|
|
1348
|
-
randomId,
|
|
1405
|
+
random_id: randomId,
|
|
1349
1406
|
message,
|
|
1350
|
-
noWebpage,
|
|
1407
|
+
no_webpage: noWebpage,
|
|
1351
1408
|
silent,
|
|
1352
1409
|
noforwards,
|
|
1353
|
-
|
|
1354
|
-
sendAs,
|
|
1410
|
+
reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
1411
|
+
send_as: sendAs,
|
|
1355
1412
|
entities,
|
|
1356
|
-
replyMarkup,
|
|
1413
|
+
reply_markup: replyMarkup,
|
|
1357
1414
|
}));
|
|
1358
1415
|
const message_ = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1359
|
-
return __classPrivateFieldGet(
|
|
1416
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message_, "text");
|
|
1360
1417
|
}
|
|
1361
1418
|
/**
|
|
1362
1419
|
* Edit a message's text.
|
|
@@ -1369,16 +1426,16 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1369
1426
|
*/
|
|
1370
1427
|
async editMessageText(chatId, messageId, text, params) {
|
|
1371
1428
|
const [message, entities] = __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, text, params);
|
|
1372
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1429
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.editMessage({
|
|
1373
1430
|
id: messageId,
|
|
1374
1431
|
peer: await this.getInputPeer(chatId),
|
|
1375
1432
|
entities,
|
|
1376
1433
|
message,
|
|
1377
|
-
|
|
1378
|
-
|
|
1434
|
+
no_webpage: params?.disableWebPagePreview ? true : undefined,
|
|
1435
|
+
reply_markup: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params),
|
|
1379
1436
|
}));
|
|
1380
1437
|
const message_ = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1381
|
-
return __classPrivateFieldGet(
|
|
1438
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message_, "text");
|
|
1382
1439
|
}
|
|
1383
1440
|
/**
|
|
1384
1441
|
* Retrieve multiple messages.
|
|
@@ -1459,15 +1516,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1459
1516
|
}
|
|
1460
1517
|
if (shouldFetch) {
|
|
1461
1518
|
if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
|
|
1462
|
-
messages_ = await this.invoke(new _2_tl_js_1.functions.
|
|
1463
|
-
channel: new _2_tl_js_1.types.InputChannel({
|
|
1519
|
+
messages_ = await this.invoke(new _2_tl_js_1.functions.channels.getMessages({
|
|
1520
|
+
channel: new _2_tl_js_1.types.InputChannel({ channel_id: peer.channel_id, access_hash: peer.access_hash }),
|
|
1464
1521
|
id: messageIds.map((v) => new _2_tl_js_1.types.InputMessageID({ id: v })),
|
|
1465
|
-
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
1522
|
+
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.messages.ChannelMessages).messages);
|
|
1466
1523
|
}
|
|
1467
1524
|
else {
|
|
1468
|
-
messages_ = await this.invoke(new _2_tl_js_1.functions.
|
|
1525
|
+
messages_ = await this.invoke(new _2_tl_js_1.functions.messages.getMessages({
|
|
1469
1526
|
id: messageIds.map((v) => new _2_tl_js_1.types.InputMessageID({ id: v })),
|
|
1470
|
-
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
1527
|
+
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.messages.Messages).messages);
|
|
1471
1528
|
}
|
|
1472
1529
|
}
|
|
1473
1530
|
const messages = new Array();
|
|
@@ -1476,7 +1533,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1476
1533
|
continue;
|
|
1477
1534
|
}
|
|
1478
1535
|
const message = await (0, _3_types_js_1.constructMessage)(message_, this[getEntity].bind(this), null, this[getStickerSetName].bind(this));
|
|
1479
|
-
const isReplyToMessage = message_ instanceof _2_tl_js_1.types.Message && message_.
|
|
1536
|
+
const isReplyToMessage = message_ instanceof _2_tl_js_1.types.Message && message_.reply_to instanceof _2_tl_js_1.types.MessageReplyHeader;
|
|
1480
1537
|
messages.push({ message, isReplyToMessage });
|
|
1481
1538
|
}
|
|
1482
1539
|
return messages;
|
|
@@ -1517,7 +1574,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1517
1574
|
case _3_types_js_1.FileType.ChatPhoto: {
|
|
1518
1575
|
const big = fileId_.params.thumbnailSource == _3_types_js_1.ThumbnailSource.ChatPhotoBig;
|
|
1519
1576
|
const peer = await this.getInputPeer(fileId_.params.chatId);
|
|
1520
|
-
const location = new _2_tl_js_1.types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer,
|
|
1577
|
+
const location = new _2_tl_js_1.types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer, photo_id: fileId_.params.mediaId });
|
|
1521
1578
|
return __classPrivateFieldGet(this, _Client_instances, "m", _Client_downloadInner).call(this, location, fileId_.dcId, params);
|
|
1522
1579
|
}
|
|
1523
1580
|
case _3_types_js_1.FileType.Photo: {
|
|
@@ -1526,9 +1583,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1526
1583
|
}
|
|
1527
1584
|
const location = new _2_tl_js_1.types.InputPhotoFileLocation({
|
|
1528
1585
|
id: fileId_.params.mediaId,
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1586
|
+
access_hash: fileId_.params.accessHash,
|
|
1587
|
+
file_reference: fileId_.params.fileReference,
|
|
1588
|
+
thumb_size: fileId_.params.thumbnailSize,
|
|
1532
1589
|
});
|
|
1533
1590
|
return __classPrivateFieldGet(this, _Client_instances, "m", _Client_downloadInner).call(this, location, fileId_.dcId, params);
|
|
1534
1591
|
}
|
|
@@ -1541,8 +1598,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1541
1598
|
if ((0, _1_utilities_js_1.mod)(chunkSize, 1024) != 0) {
|
|
1542
1599
|
throw new Error("chunkSize must be divisible by 1024");
|
|
1543
1600
|
}
|
|
1544
|
-
const exportedAuth = await this.invoke(new _2_tl_js_1.functions.
|
|
1545
|
-
const client = new
|
|
1601
|
+
const exportedAuth = await this.invoke(new _2_tl_js_1.functions.auth.exportAuthorization({ dc_id: dcId }));
|
|
1602
|
+
const client = new _a(new _3_storage_js_1.StorageMemory(), this.apiId, this.apiHash, {
|
|
1546
1603
|
transportProvider: this.transportProvider,
|
|
1547
1604
|
appVersion: this.appVersion,
|
|
1548
1605
|
deviceModel: this.deviceModel,
|
|
@@ -1562,8 +1619,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1562
1619
|
const limit = chunkSize;
|
|
1563
1620
|
let offset = 0n;
|
|
1564
1621
|
while (true) {
|
|
1565
|
-
const file = await (client ?? this).invoke(new _2_tl_js_1.functions.
|
|
1566
|
-
if (file instanceof _2_tl_js_1.types.
|
|
1622
|
+
const file = await (client ?? this).invoke(new _2_tl_js_1.functions.upload.getFile({ location, offset, limit }));
|
|
1623
|
+
if (file instanceof _2_tl_js_1.types.upload.File) {
|
|
1567
1624
|
yield file.bytes;
|
|
1568
1625
|
if (file.bytes.length < limit) {
|
|
1569
1626
|
break;
|
|
@@ -1577,14 +1634,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1577
1634
|
}
|
|
1578
1635
|
}
|
|
1579
1636
|
}, getStickerSetName)](inputStickerSet, hash = 0) {
|
|
1580
|
-
const maybeStickerSetName = await this.storage.getStickerSetName(inputStickerSet.id, inputStickerSet.
|
|
1637
|
+
const maybeStickerSetName = await this.storage.getStickerSetName(inputStickerSet.id, inputStickerSet.access_hash);
|
|
1581
1638
|
if (maybeStickerSetName != null && Date.now() - maybeStickerSetName[1].getTime() < _4_constants_js_1.STICKER_SET_NAME_TTL) {
|
|
1582
1639
|
return maybeStickerSetName[0];
|
|
1583
1640
|
}
|
|
1584
1641
|
else {
|
|
1585
|
-
const stickerSet = await this.invoke(new _2_tl_js_1.functions.
|
|
1586
|
-
const name = stickerSet[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
1587
|
-
await this.storage.updateStickerSetName(inputStickerSet.id, inputStickerSet.
|
|
1642
|
+
const stickerSet = await this.invoke(new _2_tl_js_1.functions.messages.getStickerSet({ stickerset: inputStickerSet, hash }));
|
|
1643
|
+
const name = stickerSet[_2_tl_js_1.as](_2_tl_js_1.types.messages.StickerSet).set.short_name;
|
|
1644
|
+
await this.storage.updateStickerSetName(inputStickerSet.id, inputStickerSet.access_hash, name);
|
|
1588
1645
|
return name;
|
|
1589
1646
|
}
|
|
1590
1647
|
}
|
|
@@ -1598,17 +1655,17 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1598
1655
|
* @returns The forwarded messages.
|
|
1599
1656
|
*/
|
|
1600
1657
|
async forwardMessages(from, to, messageIds, params) {
|
|
1601
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1602
|
-
|
|
1603
|
-
|
|
1658
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.forwardMessages({
|
|
1659
|
+
from_peer: await this.getInputPeer(from),
|
|
1660
|
+
to_peer: await this.getInputPeer(to),
|
|
1604
1661
|
id: messageIds,
|
|
1605
|
-
|
|
1662
|
+
random_id: messageIds.map(() => (0, _1_utilities_js_1.getRandomId)()),
|
|
1606
1663
|
silent: params?.disableNotification || undefined,
|
|
1607
|
-
|
|
1664
|
+
top_msg_id: params?.messageThreadId,
|
|
1608
1665
|
noforwards: params?.disableNotification || undefined,
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1666
|
+
send_as: params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined,
|
|
1667
|
+
drop_author: params?.dropSenderName || undefined,
|
|
1668
|
+
drop_media_captions: params?.dropCaption || undefined,
|
|
1612
1669
|
}));
|
|
1613
1670
|
return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, to, result);
|
|
1614
1671
|
}
|
|
@@ -1630,7 +1687,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1630
1687
|
* @method
|
|
1631
1688
|
*/
|
|
1632
1689
|
async getMe() {
|
|
1633
|
-
const users = await this.invoke(new _2_tl_js_1.functions.
|
|
1690
|
+
const users = await this.invoke(new _2_tl_js_1.functions.users.getUsers({ id: [new _2_tl_js_1.types.InputUserSelf()] }));
|
|
1634
1691
|
if (users.length < 1) {
|
|
1635
1692
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1636
1693
|
}
|
|
@@ -1646,9 +1703,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1646
1703
|
*/
|
|
1647
1704
|
async answerCallbackQuery(id, params) {
|
|
1648
1705
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "answerCallbackQuery");
|
|
1649
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1650
|
-
|
|
1651
|
-
|
|
1706
|
+
await this.invoke(new _2_tl_js_1.functions.messages.setBotCallbackAnswer({
|
|
1707
|
+
query_id: BigInt(id),
|
|
1708
|
+
cache_time: params?.cacheTime ?? 0,
|
|
1652
1709
|
message: params?.text,
|
|
1653
1710
|
alert: params?.alert ? true : undefined,
|
|
1654
1711
|
}));
|
|
@@ -1681,31 +1738,31 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1681
1738
|
answers,
|
|
1682
1739
|
question,
|
|
1683
1740
|
closed: params?.isClosed ? true : undefined,
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1741
|
+
close_date: params?.closeDate ? Math.floor(params.closeDate.getTime() / 1000) : undefined,
|
|
1742
|
+
close_period: params?.openPeriod ? params.openPeriod : undefined,
|
|
1743
|
+
multiple_choice: params?.allowMultipleAnswers ? true : undefined,
|
|
1744
|
+
public_voters: params?.isAnonymous === false ? true : undefined,
|
|
1688
1745
|
quiz: params?.type == "quiz" ? true : undefined,
|
|
1689
1746
|
});
|
|
1690
1747
|
const media = new _2_tl_js_1.types.InputMediaPoll({
|
|
1691
1748
|
poll,
|
|
1692
|
-
|
|
1749
|
+
correct_answers: params?.correctOptionIndex ? [new Uint8Array([params.correctOptionIndex])] : undefined,
|
|
1693
1750
|
solution,
|
|
1694
|
-
solutionEntities,
|
|
1751
|
+
solution_entities: solutionEntities,
|
|
1695
1752
|
});
|
|
1696
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1753
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMedia({
|
|
1697
1754
|
peer,
|
|
1698
|
-
randomId,
|
|
1755
|
+
random_id: randomId,
|
|
1699
1756
|
silent,
|
|
1700
1757
|
noforwards,
|
|
1701
|
-
replyMarkup,
|
|
1702
|
-
|
|
1703
|
-
sendAs,
|
|
1758
|
+
reply_markup: replyMarkup,
|
|
1759
|
+
reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
1760
|
+
send_as: sendAs,
|
|
1704
1761
|
media,
|
|
1705
1762
|
message: "",
|
|
1706
1763
|
}));
|
|
1707
1764
|
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1708
|
-
return __classPrivateFieldGet(
|
|
1765
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "poll");
|
|
1709
1766
|
}
|
|
1710
1767
|
/**
|
|
1711
1768
|
* Send a chat action.
|
|
@@ -1754,7 +1811,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1754
1811
|
default:
|
|
1755
1812
|
throw new Error("Invalid chat action: " + action);
|
|
1756
1813
|
}
|
|
1757
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1814
|
+
await this.invoke(new _2_tl_js_1.functions.messages.setTyping({ peer: await this.getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }));
|
|
1758
1815
|
}
|
|
1759
1816
|
/**
|
|
1760
1817
|
* Upload a file.
|
|
@@ -1772,7 +1829,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1772
1829
|
dUpload("uploading " + (isBig ? "big " : "") + "file of size " + contents.length + " with chunk size of " + chunkSize);
|
|
1773
1830
|
const fileId = (0, _1_utilities_js_1.getRandomId)();
|
|
1774
1831
|
const name = params?.fileName ?? fileId.toString();
|
|
1775
|
-
const client = new
|
|
1832
|
+
const client = new _a(this.storage, this.apiId, this.apiHash, {
|
|
1776
1833
|
transportProvider: this.transportProvider,
|
|
1777
1834
|
appVersion: this.appVersion,
|
|
1778
1835
|
deviceModel: this.deviceModel,
|
|
@@ -1800,10 +1857,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1800
1857
|
continue main;
|
|
1801
1858
|
}
|
|
1802
1859
|
if (isBig) {
|
|
1803
|
-
await client.invoke(new _2_tl_js_1.functions.
|
|
1860
|
+
await client.invoke(new _2_tl_js_1.functions.upload.saveBigFilePart({ file_id: fileId, file_part: part, bytes, file_total_parts: partCount }));
|
|
1804
1861
|
}
|
|
1805
1862
|
else {
|
|
1806
|
-
await client.invoke(new _2_tl_js_1.functions.
|
|
1863
|
+
await client.invoke(new _2_tl_js_1.functions.upload.saveFilePart({ file_id: fileId, bytes, file_part: part }));
|
|
1807
1864
|
}
|
|
1808
1865
|
dUpload((part + 1) + " out of " + partCount + " chunks have been uploaded so far");
|
|
1809
1866
|
break chunk;
|
|
@@ -1844,7 +1901,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1844
1901
|
return new _2_tl_js_1.types.InputFileBig({ id: fileId, parts: contents.length / chunkSize, name });
|
|
1845
1902
|
}
|
|
1846
1903
|
else {
|
|
1847
|
-
return new _2_tl_js_1.types.InputFile({ id: fileId, name, parts: part,
|
|
1904
|
+
return new _2_tl_js_1.types.InputFile({ id: fileId, name, parts: part, md5_checksum: "" });
|
|
1848
1905
|
}
|
|
1849
1906
|
}
|
|
1850
1907
|
/**
|
|
@@ -1854,9 +1911,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1854
1911
|
* @param commands The commands to set.
|
|
1855
1912
|
*/
|
|
1856
1913
|
async setMyCommands(commands, params) {
|
|
1857
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1914
|
+
await this.invoke(new _2_tl_js_1.functions.bots.setBotCommands({
|
|
1858
1915
|
commands: commands.map((v) => new _2_tl_js_1.types.BotCommand(v)),
|
|
1859
|
-
|
|
1916
|
+
lang_code: params?.languageCode ?? "",
|
|
1860
1917
|
scope: await (0, _3_types_js_1.botCommandScopeToTlObject)(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)),
|
|
1861
1918
|
}));
|
|
1862
1919
|
}
|
|
@@ -1864,8 +1921,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1864
1921
|
* Get the bot's commands in the given scope and/or language. Bot-only.
|
|
1865
1922
|
*/
|
|
1866
1923
|
async getMyCommands(params) {
|
|
1867
|
-
const commands_ = await this.invoke(new _2_tl_js_1.functions.
|
|
1868
|
-
|
|
1924
|
+
const commands_ = await this.invoke(new _2_tl_js_1.functions.bots.getBotCommands({
|
|
1925
|
+
lang_code: params?.languageCode ?? "",
|
|
1869
1926
|
scope: await (0, _3_types_js_1.botCommandScopeToTlObject)(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)),
|
|
1870
1927
|
}));
|
|
1871
1928
|
return commands_.map((v) => ({ command: v.command, description: v.description }));
|
|
@@ -1878,15 +1935,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1878
1935
|
* @param results The results to answer with.
|
|
1879
1936
|
*/
|
|
1880
1937
|
async answerInlineQuery(id, results, params) {
|
|
1881
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1882
|
-
|
|
1938
|
+
await this.invoke(new _2_tl_js_1.functions.messages.setInlineBotResults({
|
|
1939
|
+
query_id: BigInt(id),
|
|
1883
1940
|
results: await Promise.all(results.map((v) => (0, _3_types_js_1.inlineQueryResultToTlObject)(v, __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).bind(this), __classPrivateFieldGet(this, _Client_usernameResolver, "f").bind(this)))),
|
|
1884
|
-
|
|
1941
|
+
cache_time: params?.cacheTime ?? 300,
|
|
1885
1942
|
private: params?.isPersonal ? true : undefined,
|
|
1886
|
-
|
|
1887
|
-
|
|
1943
|
+
switch_webview: params?.button && params.button.webApp ? new _2_tl_js_1.types.InlineBotWebView({ text: params.button.text, url: params.button.webApp.url }) : undefined,
|
|
1944
|
+
switch_pm: params?.button && params.button.startParameter ? new _2_tl_js_1.types.InlineBotSwitchPM({ text: params.button.text, start_param: params.button.startParameter }) : undefined,
|
|
1888
1945
|
gallery: params?.isGallery ? true : undefined,
|
|
1889
|
-
|
|
1946
|
+
next_offset: params?.nextOffset,
|
|
1890
1947
|
}));
|
|
1891
1948
|
}
|
|
1892
1949
|
use(...middleware) {
|
|
@@ -1982,7 +2039,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1982
2039
|
*/
|
|
1983
2040
|
async setMyDescription({ description, languageCode }) {
|
|
1984
2041
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyDescription");
|
|
1985
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { description,
|
|
2042
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { description, lang_code: languageCode ?? "" });
|
|
1986
2043
|
}
|
|
1987
2044
|
/**
|
|
1988
2045
|
* Set the bot's name in the given language. Bot-only.
|
|
@@ -1991,7 +2048,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1991
2048
|
*/
|
|
1992
2049
|
async setMyName({ name, languageCode }) {
|
|
1993
2050
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyName");
|
|
1994
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { name,
|
|
2051
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { name, lang_code: languageCode ?? "" });
|
|
1995
2052
|
}
|
|
1996
2053
|
/**
|
|
1997
2054
|
* Set the bot's short description in the given language. Bot-only.
|
|
@@ -2000,7 +2057,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
2000
2057
|
*/
|
|
2001
2058
|
async setMyShortDescription({ shortDescription: about, languageCode }) {
|
|
2002
2059
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyShortDescription");
|
|
2003
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { about,
|
|
2060
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { about, lang_code: languageCode ?? "" });
|
|
2004
2061
|
}
|
|
2005
2062
|
/**
|
|
2006
2063
|
* Get the bot's description in the given language. Bot-only.
|
|
@@ -2039,10 +2096,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
2039
2096
|
async deleteMessages(chatId, messageIds, params) {
|
|
2040
2097
|
const peer = await this.getInputPeer(chatId);
|
|
2041
2098
|
if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
|
|
2042
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
2099
|
+
await this.invoke(new _2_tl_js_1.functions.channels.deleteMessages({ channel: new _2_tl_js_1.types.InputChannel(peer), id: messageIds }));
|
|
2043
2100
|
}
|
|
2044
2101
|
else {
|
|
2045
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
2102
|
+
await this.invoke(new _2_tl_js_1.functions.messages.deleteMessages({ id: messageIds, revoke: params?.onlyForMe ? undefined : true }));
|
|
2046
2103
|
}
|
|
2047
2104
|
}
|
|
2048
2105
|
/**
|
|
@@ -2083,8 +2140,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
2083
2140
|
media = new _2_tl_js_1.types.InputMediaPhoto({
|
|
2084
2141
|
id: new _2_tl_js_1.types.InputPhoto({
|
|
2085
2142
|
id: fileId.params.mediaId,
|
|
2086
|
-
|
|
2087
|
-
|
|
2143
|
+
access_hash: fileId.params.accessHash,
|
|
2144
|
+
file_reference: fileId.params.fileReference,
|
|
2088
2145
|
}),
|
|
2089
2146
|
spoiler,
|
|
2090
2147
|
});
|
|
@@ -2112,20 +2169,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
2112
2169
|
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2113
2170
|
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2114
2171
|
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2115
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
2172
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMedia({
|
|
2116
2173
|
peer,
|
|
2117
|
-
randomId,
|
|
2174
|
+
random_id: randomId,
|
|
2118
2175
|
silent,
|
|
2119
2176
|
noforwards,
|
|
2120
|
-
replyMarkup,
|
|
2121
|
-
|
|
2122
|
-
sendAs,
|
|
2177
|
+
reply_markup: replyMarkup,
|
|
2178
|
+
reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
2179
|
+
send_as: sendAs,
|
|
2123
2180
|
media,
|
|
2124
2181
|
message: caption ?? "",
|
|
2125
2182
|
entities: captionEntities,
|
|
2126
2183
|
}));
|
|
2127
2184
|
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2128
|
-
return __classPrivateFieldGet(
|
|
2185
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "photo");
|
|
2129
2186
|
}
|
|
2130
2187
|
}
|
|
2131
2188
|
exports.Client = Client;
|
|
@@ -2146,21 +2203,21 @@ async function _Client_handleUpdate(update) {
|
|
|
2146
2203
|
message: new _2_tl_js_1.types.Message({
|
|
2147
2204
|
out: update.out,
|
|
2148
2205
|
mentioned: update.mentioned,
|
|
2149
|
-
|
|
2206
|
+
media_unread: update.media_unread,
|
|
2150
2207
|
silent: update.silent,
|
|
2151
2208
|
id: update.id,
|
|
2152
|
-
|
|
2153
|
-
|
|
2209
|
+
from_id: update.out ? new _2_tl_js_1.types.PeerUser({ user_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this).then(BigInt) }) : new _2_tl_js_1.types.PeerUser({ user_id: update.user_id }),
|
|
2210
|
+
peer_id: new _2_tl_js_1.types.PeerChat({ chat_id: update.user_id }),
|
|
2154
2211
|
message: update.message,
|
|
2155
2212
|
date: update.date,
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2213
|
+
fwd_from: update.fwd_from,
|
|
2214
|
+
via_bot_id: update.via_bot_id,
|
|
2215
|
+
reply_to: update.reply_to,
|
|
2159
2216
|
entities: update.entities,
|
|
2160
|
-
|
|
2217
|
+
ttl_period: update.ttl_period,
|
|
2161
2218
|
}),
|
|
2162
2219
|
pts: update.pts,
|
|
2163
|
-
|
|
2220
|
+
pts_count: update.pts_count,
|
|
2164
2221
|
});
|
|
2165
2222
|
}
|
|
2166
2223
|
else if (update instanceof _2_tl_js_1.types.UpdateShortChatMessage) {
|
|
@@ -2168,26 +2225,26 @@ async function _Client_handleUpdate(update) {
|
|
|
2168
2225
|
message: new _2_tl_js_1.types.Message({
|
|
2169
2226
|
out: update.out,
|
|
2170
2227
|
mentioned: update.mentioned,
|
|
2171
|
-
|
|
2228
|
+
media_unread: update.media_unread,
|
|
2172
2229
|
silent: update.silent,
|
|
2173
2230
|
id: update.id,
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2231
|
+
from_id: new _2_tl_js_1.types.PeerUser({ user_id: update.from_id }),
|
|
2232
|
+
peer_id: new _2_tl_js_1.types.PeerChat({ chat_id: update.chat_id }),
|
|
2233
|
+
fwd_from: update.fwd_from,
|
|
2234
|
+
via_bot_id: update.via_bot_id,
|
|
2235
|
+
reply_to: update.reply_to,
|
|
2179
2236
|
date: update.date,
|
|
2180
2237
|
message: update.message,
|
|
2181
2238
|
entities: update.entities,
|
|
2182
|
-
|
|
2239
|
+
ttl_period: update.ttl_period,
|
|
2183
2240
|
}),
|
|
2184
2241
|
pts: update.pts,
|
|
2185
|
-
|
|
2242
|
+
pts_count: update.pts_count,
|
|
2186
2243
|
});
|
|
2187
2244
|
}
|
|
2188
2245
|
if (update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage) {
|
|
2189
2246
|
if (update.message instanceof _2_tl_js_1.types.Message || update.message instanceof _2_tl_js_1.types.MessageService) {
|
|
2190
|
-
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(update.message.
|
|
2247
|
+
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(update.message.peer_id), update.message.id, update.message);
|
|
2191
2248
|
}
|
|
2192
2249
|
}
|
|
2193
2250
|
if (update instanceof _2_tl_js_1.types.UpdateNewMessage ||
|
|
@@ -2224,7 +2281,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2224
2281
|
}
|
|
2225
2282
|
}
|
|
2226
2283
|
else if (update instanceof _2_tl_js_1.types.UpdateDeleteChannelMessages) {
|
|
2227
|
-
const chatId = (0, _2_tl_js_1.getChannelChatId)(update.
|
|
2284
|
+
const chatId = (0, _2_tl_js_1.getChannelChatId)(update.channel_id);
|
|
2228
2285
|
const deletedMessages = new Array();
|
|
2229
2286
|
for (const messageId of update.messages) {
|
|
2230
2287
|
const message = await this.storage.getMessage(chatId, messageId);
|
|
@@ -2256,7 +2313,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2256
2313
|
}, _Client_setMyInfo =
|
|
2257
2314
|
//#endregion
|
|
2258
2315
|
async function _Client_setMyInfo(info) {
|
|
2259
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
2316
|
+
await this.invoke(new _2_tl_js_1.functions.bots.setBotInfo({ bot: new _2_tl_js_1.types.InputUserSelf(), ...info }));
|
|
2260
2317
|
}, _Client_getMyInfo = function _Client_getMyInfo(languageCode) {
|
|
2261
|
-
return this.invoke(new _2_tl_js_1.functions.
|
|
2318
|
+
return this.invoke(new _2_tl_js_1.functions.bots.getBotInfo({ bot: new _2_tl_js_1.types.InputUserSelf(), lang_code: languageCode ?? "" }));
|
|
2262
2319
|
};
|