@mtkruto/node 0.1.170 → 0.1.183
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 +4 -4
- package/esm/0_deps.js +5 -5
- package/esm/4_constants.d.ts +1 -2
- package/esm/4_constants.js +2 -3
- package/esm/5_client.d.ts +2 -2
- package/esm/5_client.js +2 -2
- package/esm/client/0_client_abstract.d.ts +6 -4
- package/esm/client/0_client_abstract.js +11 -5
- package/esm/client/0_message.d.ts +1 -1
- package/esm/client/0_message.js +3 -6
- package/esm/client/1_client_encrypted.d.ts +34 -0
- package/esm/client/1_client_encrypted.js +237 -0
- package/esm/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/esm/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/esm/client/1_composer.d.ts +2 -3
- package/esm/client/2_message_manager.d.ts +1 -1
- package/esm/client/2_message_manager.js +3 -2
- package/esm/client/4_client.d.ts +50 -37
- package/esm/client/4_client.js +165 -379
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.js +6 -3
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.js +2 -1
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
- package/esm/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/basename.js +9 -0
- package/esm/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/dirname.js +9 -0
- package/esm/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/extname.js +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.js +1 -1
- package/esm/storage/0_storage.d.ts +7 -1
- package/esm/storage/0_storage.js +22 -2
- package/esm/tl/6_message.d.ts +3 -2
- package/esm/tl/6_message.js +1 -1
- package/esm/tl/7_message_container.d.ts +6 -4
- package/esm/tl/7_message_container.js +22 -7
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +4 -0
- package/esm/utilities/0_bigint.d.ts +1 -0
- package/esm/utilities/0_bigint.js +1 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +5 -5
- package/script/4_constants.d.ts +1 -2
- package/script/4_constants.js +3 -4
- package/script/5_client.d.ts +2 -2
- package/script/5_client.js +2 -2
- package/script/client/0_client_abstract.d.ts +6 -4
- package/script/client/0_client_abstract.js +11 -5
- package/script/client/0_message.d.ts +1 -1
- package/script/client/0_message.js +3 -6
- package/script/client/1_client_encrypted.d.ts +34 -0
- package/script/client/1_client_encrypted.js +241 -0
- package/script/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/script/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/script/client/1_composer.d.ts +2 -3
- package/script/client/2_message_manager.d.ts +1 -1
- package/script/client/2_message_manager.js +3 -2
- package/script/client/4_client.d.ts +50 -37
- package/script/client/4_client.js +161 -375
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.js +6 -3
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.js +2 -1
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
- package/script/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/basename.js +9 -0
- package/script/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/dirname.js +9 -0
- package/script/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/extname.js +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.js +1 -1
- package/script/storage/0_storage.d.ts +7 -1
- package/script/storage/0_storage.js +22 -2
- package/script/tl/6_message.d.ts +3 -2
- package/script/tl/6_message.js +1 -1
- package/script/tl/7_message_container.d.ts +6 -4
- package/script/tl/7_message_container.js +20 -5
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +4 -0
- package/script/utilities/0_bigint.d.ts +1 -0
- package/script/utilities/0_bigint.js +1 -0
- package/esm/client/5_composer.d.ts +0 -4
- package/esm/client/5_composer.js +0 -3
- package/script/client/5_composer.d.ts +0 -4
- package/script/client/5_composer.js +0 -7
- package/script/deps/deno.land/std@0.219.0/path/posix/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/posix/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/posix/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.219.0/path/windows/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/windows/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/windows/extname.d.ts +0 -6
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.220.1/path/windows}/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.220.1/path/windows}/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.220.1/path/windows}/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.220.1/path}/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.220.1/path}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/dirname.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.220.1/path}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.220.1/path/windows}/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.220.1/path/windows}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.220.1/path/windows}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { enums, functions, ReadObject, TLObject, types } from "../2_tl.js";
|
|
2
|
+
import { ClientAbstract } from "./0_client_abstract.js";
|
|
3
|
+
import { ClientAbstractParams } from "./0_client_abstract.js";
|
|
4
|
+
export type ErrorSource = "deserialization" | "decryption" | "unknown";
|
|
5
|
+
export interface Handlers {
|
|
6
|
+
serverSaltReassigned?: (newServerSalt: bigint) => void;
|
|
7
|
+
updates?: (updates: enums.Updates | enums.Update, call: TLObject | null, callback?: () => void) => void;
|
|
8
|
+
result?: (result: ReadObject, callback: () => void) => void;
|
|
9
|
+
error?: (err: unknown, source: ErrorSource) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
|
|
13
|
+
*
|
|
14
|
+
* There are a few things to note:
|
|
15
|
+
*
|
|
16
|
+
* - This is a bare client and it stores nothing.
|
|
17
|
+
* - It expects an authorization key to be present before invoking any method.
|
|
18
|
+
* - Authorization must be set using `setAuthKey`.
|
|
19
|
+
* - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
|
|
20
|
+
* - It doesn't uncompress compressed packets.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ClientEncrypted extends ClientAbstract {
|
|
23
|
+
#private;
|
|
24
|
+
handlers: Handlers;
|
|
25
|
+
constructor(params?: ClientAbstractParams);
|
|
26
|
+
connect(): Promise<void>;
|
|
27
|
+
setAuthKey(key: Uint8Array): Promise<void>;
|
|
28
|
+
get authKey(): Uint8Array;
|
|
29
|
+
set serverSalt(serverSalt: bigint);
|
|
30
|
+
get serverSalt(): bigint;
|
|
31
|
+
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<T extends functions.Function<unknown> ? T["__R"] : void>;
|
|
32
|
+
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait: true): Promise<void>;
|
|
33
|
+
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait?: boolean): Promise<T | void>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
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
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _ClientEncrypted_instances, _ClientEncrypted_authKey, _ClientEncrypted_authKeyId, _ClientEncrypted_sessionId, _ClientEncrypted_state, _ClientEncrypted_toAcknowledge, _ClientEncrypted_recentAcks, _ClientEncrypted_promises, _ClientEncrypted_L, _ClientEncrypted_LreceiveLoop, _ClientEncrypted_Linvoke, _ClientEncrypted_nextMessageId, _ClientEncrypted_nextSeqNo, _ClientEncrypted_sendMessage, _ClientEncrypted_receiveLoop;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ClientEncrypted = void 0;
|
|
16
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
17
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
18
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
19
|
+
const _4_errors_js_1 = require("../4_errors.js");
|
|
20
|
+
const _0_client_abstract_js_1 = require("./0_client_abstract.js");
|
|
21
|
+
const _0_message_js_1 = require("./0_message.js");
|
|
22
|
+
const _0_types_js_1 = require("./0_types.js");
|
|
23
|
+
// global ClientEncrypted ID counter for logs
|
|
24
|
+
let id = 0;
|
|
25
|
+
/**
|
|
26
|
+
* An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
|
|
27
|
+
*
|
|
28
|
+
* There are a few things to note:
|
|
29
|
+
*
|
|
30
|
+
* - This is a bare client and it stores nothing.
|
|
31
|
+
* - It expects an authorization key to be present before invoking any method.
|
|
32
|
+
* - Authorization must be set using `setAuthKey`.
|
|
33
|
+
* - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
|
|
34
|
+
* - It doesn't uncompress compressed packets.
|
|
35
|
+
*/
|
|
36
|
+
class ClientEncrypted extends _0_client_abstract_js_1.ClientAbstract {
|
|
37
|
+
constructor(params) {
|
|
38
|
+
super(params);
|
|
39
|
+
_ClientEncrypted_instances.add(this);
|
|
40
|
+
_ClientEncrypted_authKey.set(this, new Uint8Array());
|
|
41
|
+
_ClientEncrypted_authKeyId.set(this, 0n);
|
|
42
|
+
_ClientEncrypted_sessionId.set(this, (0, _1_utilities_js_1.getRandomBigInt)(8, true, false));
|
|
43
|
+
_ClientEncrypted_state.set(this, { serverSalt: 0n, seqNo: 0, messageId: 0n });
|
|
44
|
+
_ClientEncrypted_toAcknowledge.set(this, new Set());
|
|
45
|
+
_ClientEncrypted_recentAcks.set(this, new _1_utilities_js_1.CacheMap(20));
|
|
46
|
+
_ClientEncrypted_promises.set(this, new Map());
|
|
47
|
+
// loggers
|
|
48
|
+
_ClientEncrypted_L.set(this, void 0);
|
|
49
|
+
_ClientEncrypted_LreceiveLoop.set(this, void 0);
|
|
50
|
+
_ClientEncrypted_Linvoke.set(this, void 0);
|
|
51
|
+
// receive loop handlers
|
|
52
|
+
Object.defineProperty(this, "handlers", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: {}
|
|
57
|
+
});
|
|
58
|
+
const L = __classPrivateFieldSet(this, _ClientEncrypted_L, (0, _1_utilities_js_1.getLogger)("ClientEncrypted").client(id++), "f");
|
|
59
|
+
__classPrivateFieldSet(this, _ClientEncrypted_LreceiveLoop, L.branch("receiveLoop"), "f");
|
|
60
|
+
__classPrivateFieldSet(this, _ClientEncrypted_Linvoke, L.branch("invoke"), "f");
|
|
61
|
+
}
|
|
62
|
+
async connect() {
|
|
63
|
+
await super.connect();
|
|
64
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_receiveLoop).call(this)); // TODO: ability to join this promise
|
|
65
|
+
}
|
|
66
|
+
async setAuthKey(key) {
|
|
67
|
+
const hash = await (0, _1_utilities_js_1.sha1)(key);
|
|
68
|
+
__classPrivateFieldSet(this, _ClientEncrypted_authKeyId, (0, _1_utilities_js_1.bigIntFromBuffer)(hash.slice(-8), true, false), "f");
|
|
69
|
+
__classPrivateFieldSet(this, _ClientEncrypted_authKey, key, "f");
|
|
70
|
+
}
|
|
71
|
+
get authKey() {
|
|
72
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f");
|
|
73
|
+
}
|
|
74
|
+
set serverSalt(serverSalt) {
|
|
75
|
+
__classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt = serverSalt;
|
|
76
|
+
}
|
|
77
|
+
get serverSalt() {
|
|
78
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt;
|
|
79
|
+
}
|
|
80
|
+
async invoke(function_, noWait) {
|
|
81
|
+
const messageId = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this);
|
|
82
|
+
const message__ = new _2_tl_js_1.Message_(messageId, __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, true), function_);
|
|
83
|
+
let message_;
|
|
84
|
+
let container = undefined;
|
|
85
|
+
if (__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").size) {
|
|
86
|
+
const ack = new _2_tl_js_1.Message_(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), new _2_tl_js_1.types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f")] }));
|
|
87
|
+
__classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").set(ack.id, { container, message: ack });
|
|
88
|
+
message_ = new _2_tl_js_1.MessageContainer(container = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), [message__, ack]);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
message_ = message__;
|
|
92
|
+
}
|
|
93
|
+
await __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, message_);
|
|
94
|
+
__classPrivateFieldGet(this, _ClientEncrypted_Linvoke, "f").debug("invoked", function_[_2_tl_js_1.name]);
|
|
95
|
+
if (noWait) {
|
|
96
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, {
|
|
97
|
+
container,
|
|
98
|
+
message: message__,
|
|
99
|
+
call: function_,
|
|
100
|
+
});
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
return await new Promise((resolve, reject) => {
|
|
104
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, { container, message: message__, resolve, reject, call: function_ });
|
|
105
|
+
}).then((v) => v);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.ClientEncrypted = ClientEncrypted;
|
|
109
|
+
_ClientEncrypted_authKey = new WeakMap(), _ClientEncrypted_authKeyId = new WeakMap(), _ClientEncrypted_sessionId = new WeakMap(), _ClientEncrypted_state = new WeakMap(), _ClientEncrypted_toAcknowledge = new WeakMap(), _ClientEncrypted_recentAcks = new WeakMap(), _ClientEncrypted_promises = new WeakMap(), _ClientEncrypted_L = new WeakMap(), _ClientEncrypted_LreceiveLoop = new WeakMap(), _ClientEncrypted_Linvoke = new WeakMap(), _ClientEncrypted_instances = new WeakSet(), _ClientEncrypted_nextMessageId = function _ClientEncrypted_nextMessageId() {
|
|
110
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId = (0, _0_message_js_1.getMessageId)(__classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId);
|
|
111
|
+
}, _ClientEncrypted_nextSeqNo = function _ClientEncrypted_nextSeqNo(contentRelated) {
|
|
112
|
+
let seqNo = __classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo * 2;
|
|
113
|
+
if (contentRelated) {
|
|
114
|
+
seqNo++;
|
|
115
|
+
__classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo++;
|
|
116
|
+
}
|
|
117
|
+
return seqNo;
|
|
118
|
+
}, _ClientEncrypted_sendMessage = async function _ClientEncrypted_sendMessage(message) {
|
|
119
|
+
const payload = await (0, _0_message_js_1.encryptMessage)(message, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt, __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f"));
|
|
120
|
+
await this.transport.transport.send(payload);
|
|
121
|
+
}, _ClientEncrypted_receiveLoop = async function _ClientEncrypted_receiveLoop() {
|
|
122
|
+
if (!this.transport) {
|
|
123
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
124
|
+
}
|
|
125
|
+
while (this.connected) {
|
|
126
|
+
try {
|
|
127
|
+
const buffer = await this.transport.transport.receive();
|
|
128
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").inBin(buffer);
|
|
129
|
+
let decrypted;
|
|
130
|
+
try {
|
|
131
|
+
decrypted = await ((0, _0_message_js_1.decryptMessage)(buffer, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f")));
|
|
132
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").in(decrypted);
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to decrypt message:", err);
|
|
136
|
+
this.handlers.error?.(err, "decryption");
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
|
|
140
|
+
for (const message of messages) {
|
|
141
|
+
let body = message.body;
|
|
142
|
+
if (body instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
143
|
+
body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.packed_data)).readObject();
|
|
144
|
+
}
|
|
145
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("received", (typeof body === "object" && _2_tl_js_1.name in body) ? body[_2_tl_js_1.name] : body.constructor.name);
|
|
146
|
+
if (body instanceof _2_tl_js_1.types._Updates || body instanceof _2_tl_js_1.types._Update) {
|
|
147
|
+
this.handlers.updates?.(body, null);
|
|
148
|
+
}
|
|
149
|
+
else if (body instanceof _2_tl_js_1.types.New_session_created) {
|
|
150
|
+
this.serverSalt = body.server_salt;
|
|
151
|
+
this.handlers.serverSaltReassigned?.(this.serverSalt);
|
|
152
|
+
}
|
|
153
|
+
else if (message.body instanceof _2_tl_js_1.RPCResult) {
|
|
154
|
+
let result = message.body.result;
|
|
155
|
+
if (result instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
156
|
+
result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.packed_data)).readObject();
|
|
157
|
+
}
|
|
158
|
+
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
159
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && _2_tl_js_1.name in result) ? result[_2_tl_js_1.name] : result.constructor.name);
|
|
163
|
+
}
|
|
164
|
+
const messageId = message.body.messageId;
|
|
165
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(messageId);
|
|
166
|
+
const resolvePromise = () => {
|
|
167
|
+
if (promise) {
|
|
168
|
+
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
169
|
+
promise.reject?.((0, _4_errors_js_1.upgradeInstance)(result, promise.call));
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
promise.resolve?.(result);
|
|
173
|
+
}
|
|
174
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(messageId);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
if (result instanceof _2_tl_js_1.types._Updates || result instanceof _2_tl_js_1.types._Update) {
|
|
178
|
+
this.handlers.updates?.(result, promise?.call ?? null, resolvePromise);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.handlers.result?.(result, resolvePromise);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else if (message.body instanceof _2_tl_js_1.types.Pong) {
|
|
185
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.msg_id);
|
|
186
|
+
if (promise) {
|
|
187
|
+
promise.resolve?.(message.body);
|
|
188
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(message.body.msg_id);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else if (message.body instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
192
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("server salt reassigned");
|
|
193
|
+
this.serverSalt = message.body.new_server_salt;
|
|
194
|
+
this.handlers.serverSaltReassigned?.(this.serverSalt);
|
|
195
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.bad_msg_id);
|
|
196
|
+
const ack = __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").get(message.body.bad_msg_id);
|
|
197
|
+
if (promise) {
|
|
198
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
|
|
199
|
+
}
|
|
200
|
+
else if (ack) {
|
|
201
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
for (const promise of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").values()) {
|
|
205
|
+
if (promise.container && promise.container == message.body.bad_msg_id) {
|
|
206
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
for (const ack of __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").values()) {
|
|
210
|
+
if (ack.container && ack.container == message.body.bad_msg_id) {
|
|
211
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").add(message.id);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
catch (err) {
|
|
220
|
+
if (!this.connected) {
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
else if (err instanceof _2_tl_js_1.TLError) {
|
|
224
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to deserialize:", err);
|
|
225
|
+
this.handlers.error?.(err, "deserialization");
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("unexpected error:", err);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (!this.connected) {
|
|
233
|
+
for (const [key, { reject }] of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").entries()) {
|
|
234
|
+
reject?.(new _0_types_js_1.ConnectionError("Connection was closed"));
|
|
235
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(key);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
240
|
+
}
|
|
241
|
+
};
|
|
@@ -7,6 +7,9 @@ export interface ClientPlainParams extends ClientAbstractParams {
|
|
|
7
7
|
*/
|
|
8
8
|
publicKeys?: PublicKeys;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
|
|
12
|
+
*/
|
|
10
13
|
export declare class ClientPlain extends ClientAbstract {
|
|
11
14
|
#private;
|
|
12
15
|
constructor(params?: ClientPlainParams);
|
|
@@ -21,11 +21,14 @@ const _0_client_abstract_js_1 = require("./0_client_abstract.js");
|
|
|
21
21
|
const _0_message_js_1 = require("./0_message.js");
|
|
22
22
|
const L = (0, _1_utilities_js_1.getLogger)("ClientPlain");
|
|
23
23
|
const LcreateAuthKey = L.branch("createAuthKey");
|
|
24
|
+
/**
|
|
25
|
+
* An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
|
|
26
|
+
*/
|
|
24
27
|
class ClientPlain extends _0_client_abstract_js_1.ClientAbstract {
|
|
25
28
|
constructor(params) {
|
|
26
29
|
super(params);
|
|
27
30
|
_ClientPlain_publicKeys.set(this, void 0);
|
|
28
|
-
_ClientPlain_lastMsgId.set(this, 0n);
|
|
31
|
+
_ClientPlain_lastMsgId.set(this, 0n); // TODO: refactor
|
|
29
32
|
__classPrivateFieldSet(this, _ClientPlain_publicKeys, params?.publicKeys ?? _4_constants_js_1.PUBLIC_KEYS, "f");
|
|
30
33
|
}
|
|
31
34
|
async invoke(function_) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { MaybePromise } from "../1_utilities.js";
|
|
1
2
|
import { Update, UpdateIntersection, User } from "../3_types.js";
|
|
2
3
|
import { FilterQuery, WithFilter } from "./0_filters.js";
|
|
3
|
-
type
|
|
4
|
-
export type NextFunction = () => Promise<void>;
|
|
4
|
+
export type NextFunction<T = void> = () => Promise<T>;
|
|
5
5
|
export type MiddlewareFn<C> = (ctx: C, next: NextFunction) => MaybePromise<unknown>;
|
|
6
6
|
export interface MiddlewareObj<C> {
|
|
7
7
|
middleware: () => MiddlewareFn<C>;
|
|
@@ -27,4 +27,3 @@ export declare class Composer<C extends {
|
|
|
27
27
|
prefixes: string | string[];
|
|
28
28
|
}, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
|
|
29
29
|
}
|
|
30
|
-
export {};
|
|
@@ -33,7 +33,7 @@ export declare class MessageManager {
|
|
|
33
33
|
sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<import("../3_types.js").MessageVideo>;
|
|
34
34
|
sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<import("../3_types.js").MessageDocument>;
|
|
35
35
|
sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<import("../3_types.js").MessagePhoto>;
|
|
36
|
-
resolveFileId(maybeFileId: string, expectedFileType: FileType): {
|
|
36
|
+
resolveFileId(maybeFileId: string, expectedFileType: FileType | FileType[]): {
|
|
37
37
|
id: bigint;
|
|
38
38
|
access_hash: bigint;
|
|
39
39
|
file_reference: Uint8Array;
|
|
@@ -392,7 +392,7 @@ class MessageManager {
|
|
|
392
392
|
let media = null;
|
|
393
393
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
394
394
|
if (typeof photo === "string") {
|
|
395
|
-
const fileId = this.resolveFileId(photo, _3_types_js_2.FileType.Photo);
|
|
395
|
+
const fileId = this.resolveFileId(photo, [_3_types_js_2.FileType.Photo, _3_types_js_2.FileType.ProfilePhoto]);
|
|
396
396
|
if (fileId != null) {
|
|
397
397
|
media = new _2_tl_js_1.types.InputMediaPhoto({
|
|
398
398
|
id: new _2_tl_js_1.types.InputPhoto(fileId),
|
|
@@ -414,6 +414,7 @@ class MessageManager {
|
|
|
414
414
|
return (0, _3_types_js_2.assertMessageType)(message, "photo");
|
|
415
415
|
}
|
|
416
416
|
resolveFileId(maybeFileId, expectedFileType) {
|
|
417
|
+
expectedFileType = Array.isArray(expectedFileType) ? expectedFileType : [expectedFileType];
|
|
417
418
|
let fileId = null;
|
|
418
419
|
try {
|
|
419
420
|
fileId = (0, _3_types_js_1.deserializeFileId)(maybeFileId);
|
|
@@ -422,7 +423,7 @@ class MessageManager {
|
|
|
422
423
|
__classPrivateFieldGet(this, _MessageManager_LresolveFileId, "f").warning(err);
|
|
423
424
|
}
|
|
424
425
|
if (fileId != null) {
|
|
425
|
-
if (fileId.type
|
|
426
|
+
if (!expectedFileType.includes(fileId.type)) {
|
|
426
427
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
427
428
|
}
|
|
428
429
|
return {
|
|
@@ -2,25 +2,12 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
2
2
|
import { enums, functions, types } from "../2_tl.js";
|
|
3
3
|
import { Storage } from "../3_storage.js";
|
|
4
4
|
import { DC } from "../3_transport.js";
|
|
5
|
-
import { BotCommand, Chat, ChatAction, ChatMember, ChatP, FileSource, ID, InactiveChat, InlineQueryResult, InputStoryContent, InviteLink, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Reaction, Sticker, Story, Update,
|
|
5
|
+
import { BotCommand, Chat, ChatAction, ChatMember, ChatP, FileSource, ID, InactiveChat, InlineQueryResult, InputStoryContent, InviteLink, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Reaction, Sticker, Story, Update, User } from "../3_types.js";
|
|
6
6
|
import { Migrate } from "../4_errors.js";
|
|
7
|
-
import { ClientAbstract } from "./0_client_abstract.js";
|
|
8
|
-
import { FilterQuery, WithFilter } from "./0_filters.js";
|
|
9
7
|
import { AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetMyCommandsParams, PinMessageParams, ReplyParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetMyCommandsParams, SetReactionsParams, UploadParams } from "./0_params.js";
|
|
10
8
|
import { Api } from "./0_types.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
export type NextFn<T = void> = () => Promise<T>;
|
|
14
|
-
export interface InvokeErrorHandler<C> {
|
|
15
|
-
(ctx: {
|
|
16
|
-
client: C;
|
|
17
|
-
error: unknown;
|
|
18
|
-
function: types.Type | functions.Function<unknown>;
|
|
19
|
-
n: number;
|
|
20
|
-
}, next: NextFn<boolean>): MaybePromise<boolean>;
|
|
21
|
-
}
|
|
22
|
-
declare const getEntity: unique symbol;
|
|
23
|
-
export declare const handleMigrationError: unique symbol;
|
|
9
|
+
import { ClientPlainParams } from "./1_client_plain.js";
|
|
10
|
+
import { Composer as Composer_, NextFunction } from "./1_composer.js";
|
|
24
11
|
export interface Context {
|
|
25
12
|
/** The client that received the update. */
|
|
26
13
|
client: Client;
|
|
@@ -148,10 +135,27 @@ export interface Context {
|
|
|
148
135
|
block: () => Promise<void>;
|
|
149
136
|
/** Context-aware alias for `client.unblockUser()`. */
|
|
150
137
|
unblock: () => Promise<void>;
|
|
138
|
+
/** Context-aware alias for `client.getChatMember()`. */
|
|
139
|
+
getChatMember: (userId: ID) => Promise<ChatMember>;
|
|
140
|
+
/** Context-aware alias for `client.setChatStickerSet()`. */
|
|
141
|
+
setChatStickerSet: (setName: string) => Promise<void>;
|
|
142
|
+
/** Context-aware alias for `client.deleteChatStickerSet()`. */
|
|
143
|
+
deleteChatStickerSet: () => Promise<void>;
|
|
151
144
|
toJSON: () => Update;
|
|
152
145
|
}
|
|
153
|
-
export declare
|
|
146
|
+
export declare class Composer<C extends Context = Context> extends Composer_<C> {
|
|
147
|
+
}
|
|
148
|
+
export interface InvokeErrorHandler<C> {
|
|
149
|
+
(ctx: {
|
|
150
|
+
client: C;
|
|
151
|
+
error: unknown;
|
|
152
|
+
function: types.Type | functions.Function<unknown>;
|
|
153
|
+
n: number;
|
|
154
|
+
}, next: NextFunction<boolean>): MaybePromise<boolean>;
|
|
155
|
+
}
|
|
154
156
|
export declare const restartAuth: unique symbol;
|
|
157
|
+
export declare const handleMigrationError: unique symbol;
|
|
158
|
+
declare const getEntity: unique symbol;
|
|
155
159
|
export interface ClientParams extends ClientPlainParams {
|
|
156
160
|
/** A parse mode to use when the `parseMode` parameter is not specified when sending or editing messages. Defauls to `ParseMode.None`. */
|
|
157
161
|
parseMode?: ParseMode;
|
|
@@ -167,8 +171,6 @@ export interface ClientParams extends ClientPlainParams {
|
|
|
167
171
|
systemLangCode?: string;
|
|
168
172
|
/** The system_version parameter to be passed to initConnection when calling `authorize`. The default varies by the current runtime. */
|
|
169
173
|
systemVersion?: string;
|
|
170
|
-
/** Whether to automatically call `start` with no parameters in the first `invoke` call. Defaults to `true`. */
|
|
171
|
-
autoStart?: boolean;
|
|
172
174
|
/** Whether to use default handlers. Defaults to `true`. */
|
|
173
175
|
defaultHandlers?: boolean;
|
|
174
176
|
/** Whether to ignore outgoing messages. Defaults to `true` for bots, and `false` for users. */
|
|
@@ -182,7 +184,10 @@ export interface ClientParams extends ClientPlainParams {
|
|
|
182
184
|
/** Whether to store messages. Defaults to `false`. */
|
|
183
185
|
storeMessages?: boolean;
|
|
184
186
|
}
|
|
185
|
-
|
|
187
|
+
/**
|
|
188
|
+
* An MTKruto client.
|
|
189
|
+
*/
|
|
190
|
+
export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
186
191
|
#private;
|
|
187
192
|
readonly apiId: number | null;
|
|
188
193
|
readonly apiHash: string | null;
|
|
@@ -197,13 +202,14 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
197
202
|
/**
|
|
198
203
|
* Constructs the client.
|
|
199
204
|
*
|
|
200
|
-
* @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the string
|
|
205
|
+
* @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the auth string.
|
|
201
206
|
* @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
|
|
202
207
|
* @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
|
|
203
208
|
*/
|
|
204
209
|
constructor(storage?: Storage | string | null, apiId?: number | null, apiHash?: string | null, params?: ClientParams);
|
|
210
|
+
get connected(): boolean;
|
|
211
|
+
get disconnected(): boolean;
|
|
205
212
|
api: Api;
|
|
206
|
-
protected stateChangeHandler: (connected: boolean) => void;
|
|
207
213
|
/**
|
|
208
214
|
* Sets the DC and resets the auth key stored in the session provider
|
|
209
215
|
* if the stored DC was not the same as the `dc` parameter.
|
|
@@ -217,6 +223,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
217
223
|
* Before establishing the connection, the session is saved.
|
|
218
224
|
*/
|
|
219
225
|
connect(): Promise<void>;
|
|
226
|
+
reconnect(dc: DC): Promise<void>;
|
|
220
227
|
[handleMigrationError](err: Migrate): Promise<void>;
|
|
221
228
|
disconnect(): Promise<void>;
|
|
222
229
|
/**
|
|
@@ -259,22 +266,28 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
259
266
|
send<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<void>;
|
|
260
267
|
exportAuthString(): Promise<string>;
|
|
261
268
|
importAuthString(authString: string): Promise<void>;
|
|
269
|
+
/**
|
|
270
|
+
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
271
|
+
*
|
|
272
|
+
* @param id The identifier of the chat.
|
|
273
|
+
*/
|
|
262
274
|
getInputPeer(id: ID): Promise<enums.InputPeer>;
|
|
275
|
+
/**
|
|
276
|
+
* Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
|
|
277
|
+
*
|
|
278
|
+
* @param id The identifier of the channel or the supergroup.
|
|
279
|
+
*/
|
|
263
280
|
getInputChannel(id: ID): Promise<types.InputChannel>;
|
|
281
|
+
/**
|
|
282
|
+
* Get a user's inputUser. Useful when calling API functions directly.
|
|
283
|
+
*
|
|
284
|
+
* @param id The identifier of the user.
|
|
285
|
+
*/
|
|
264
286
|
getInputUser(id: ID): Promise<types.InputUser>;
|
|
265
287
|
private [getEntity];
|
|
266
288
|
private [getEntity];
|
|
267
289
|
private [getEntity];
|
|
268
290
|
private [getEntity];
|
|
269
|
-
use(...middleware: Middleware<UpdateIntersection<C>>[]): Composer<C>;
|
|
270
|
-
branch(predicate: (ctx: UpdateIntersection<C>) => MaybePromise<boolean>, trueHandler_: Middleware<UpdateIntersection<C>>, falseHandler_: Middleware<UpdateIntersection<C>>): Composer<C>;
|
|
271
|
-
filter<D extends C>(predicate: (ctx: UpdateIntersection<C>) => ctx is D, ...middleware: Middleware<D>[]): Composer<D>;
|
|
272
|
-
filter(predicate: (ctx: UpdateIntersection<C>) => MaybePromise<boolean>, ...middleware: Middleware<UpdateIntersection<C>>[]): Composer<C>;
|
|
273
|
-
on<Q extends FilterQuery>(filter: Q, ...middleware: Middleware<WithFilter<C, Q>>[]): Composer<UpdateIntersection<WithFilter<C, Q>>>;
|
|
274
|
-
command(commands: string | RegExp | (string | RegExp)[] | {
|
|
275
|
-
names: string | RegExp | (string | RegExp)[];
|
|
276
|
-
prefixes: string | string[];
|
|
277
|
-
}, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
|
|
278
291
|
/**
|
|
279
292
|
* Send a text message.
|
|
280
293
|
*
|
|
@@ -295,7 +308,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
295
308
|
*/
|
|
296
309
|
editMessageText(chatId: ID, messageId: number, text: string, params?: EditMessageParams): Promise<MessageText>;
|
|
297
310
|
/**
|
|
298
|
-
* Edit an inline message's text.
|
|
311
|
+
* Edit an inline message's text. Bot-only.
|
|
299
312
|
*
|
|
300
313
|
* @method ms
|
|
301
314
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -312,7 +325,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
312
325
|
*/
|
|
313
326
|
editMessageReplyMarkup(chatId: ID, messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
|
|
314
327
|
/**
|
|
315
|
-
* Edit an inline message's reply markup.
|
|
328
|
+
* Edit an inline message's reply markup. Bot-only.
|
|
316
329
|
*
|
|
317
330
|
* @method ms
|
|
318
331
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -646,7 +659,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
646
659
|
*/
|
|
647
660
|
getCustomEmojiStickers(id: string | string[]): Promise<Sticker[]>;
|
|
648
661
|
/**
|
|
649
|
-
* Set a chat's available reactions.
|
|
662
|
+
* Set a chat's available reactions. User-only.
|
|
650
663
|
*
|
|
651
664
|
* @method ch
|
|
652
665
|
* @param chatId The identifier of the chat.
|
|
@@ -696,7 +709,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
696
709
|
*/
|
|
697
710
|
deleteChatPhoto(chatId: number): Promise<void>;
|
|
698
711
|
/**
|
|
699
|
-
* Delete all messages sent by a specific member of a chat.
|
|
712
|
+
* Delete all messages sent by a specific member of a chat. User-only.
|
|
700
713
|
*
|
|
701
714
|
* @method ms
|
|
702
715
|
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
@@ -893,7 +906,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
893
906
|
*/
|
|
894
907
|
getInactiveChats(): Promise<InactiveChat[]>;
|
|
895
908
|
/**
|
|
896
|
-
* Search the messages of a chat.
|
|
909
|
+
* Search the messages of a chat. User-only.
|
|
897
910
|
*
|
|
898
911
|
* @method ms
|
|
899
912
|
* @param chatId The identifier of the chat to search the messages in.
|
|
@@ -901,7 +914,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
901
914
|
*/
|
|
902
915
|
searchMessages(chatId: ID, query: string, params?: SearchMessagesParams): Promise<Message[]>;
|
|
903
916
|
/**
|
|
904
|
-
* Set the number of boosts required to circument a chat's default restrictions.
|
|
917
|
+
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
905
918
|
*
|
|
906
919
|
* @method ch
|
|
907
920
|
* @param chatId The identifier of the chat.
|