@mtkruto/node 0.1.147 → 0.1.149
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/1_utilities.d.ts +1 -0
- package/esm/1_utilities.js +1 -0
- package/esm/3_types.d.ts +2 -2
- package/esm/3_types.js +2 -2
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_types.d.ts +1 -0
- package/esm/client/1_file_manager.js +2 -1
- package/esm/client/1_reaction_manager.js +3 -3
- package/esm/client/1_update_manager.js +10 -10
- package/esm/client/2_message_manager.d.ts +2 -0
- package/esm/client/2_message_manager.js +42 -31
- package/esm/client/3_chat_list_manager.js +1 -1
- package/esm/client/4_client.d.ts +21 -0
- package/esm/client/4_client.js +89 -40
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_equals.js +3 -2
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/base64.js +2 -2
- package/{script/deps/deno.land/std@0.212.0 → esm/deps/deno.land/std@0.214.0}/fmt/colors.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/fmt/colors.js +3 -1
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/content_type.d.ts +10 -8
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/content_type.js +4 -4
- package/{script/deps/deno.land/std@0.212.0 → esm/deps/deno.land/std@0.214.0}/media_types/extension.d.ts +3 -3
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/extension.js +3 -3
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/format_media_type.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/format_media_type.js +1 -1
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/get_charset.d.ts +3 -3
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/get_charset.js +3 -3
- package/esm/deps/deno.land/std@0.214.0/media_types/parse_media_type.d.ts +23 -0
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/parse_media_type.js +7 -21
- package/{script/deps/deno.land/std@0.212.0 → esm/deps/deno.land/std@0.214.0}/media_types/type_by_extension.d.ts +2 -2
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/type_by_extension.js +2 -2
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/common.d.ts +1 -2
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/common.js +2 -2
- package/esm/deps/deno.land/std@0.214.0/path/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.214.0/path/constants.js +6 -0
- package/esm/deps/deno.land/std@0.214.0/path/mod.d.ts +65 -0
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/mod.js +10 -5
- package/{script/deps/deno.land/std@0.212.0/path → esm/deps/deno.land/std@0.214.0/path/posix}/common.d.ts +1 -2
- package/esm/deps/deno.land/{std@0.212.0/path/windows → std@0.214.0/path/posix}/common.js +2 -2
- package/esm/deps/deno.land/std@0.214.0/path/posix/constants.d.ts +3 -0
- package/esm/deps/deno.land/{std@0.212.0/path/posix/separator.js → std@0.214.0/path/posix/constants.js} +3 -2
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join_globs.js +2 -2
- package/{script/deps/deno.land/std@0.212.0 → esm/deps/deno.land/std@0.214.0}/path/posix/mod.d.ts +8 -1
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/mod.js +8 -1
- package/esm/deps/deno.land/{std@0.212.0/path/windows → std@0.214.0/path/posix}/normalize_glob.js +2 -2
- package/esm/deps/deno.land/std@0.214.0/path/posix/separator.d.ts +8 -0
- package/esm/deps/deno.land/std@0.214.0/path/posix/separator.js +10 -0
- package/esm/deps/deno.land/std@0.214.0/path/separator.d.ts +8 -0
- package/esm/deps/deno.land/std@0.214.0/path/separator.js +11 -0
- package/esm/deps/deno.land/{std@0.212.0/path/posix → std@0.214.0/path/windows}/common.d.ts +1 -2
- package/esm/deps/deno.land/{std@0.212.0/path/posix → std@0.214.0/path/windows}/common.js +2 -2
- package/esm/deps/deno.land/std@0.214.0/path/windows/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.214.0/path/windows/constants.js +5 -0
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join_globs.js +2 -2
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/mod.d.ts +7 -0
- package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/mod.js +7 -0
- package/esm/deps/deno.land/{std@0.212.0/path/posix → std@0.214.0/path/windows}/normalize_glob.js +2 -2
- package/esm/deps/deno.land/std@0.214.0/path/windows/separator.d.ts +8 -0
- package/esm/deps/deno.land/std@0.214.0/path/windows/separator.js +10 -0
- package/esm/storage/0_storage.d.ts +63 -11
- package/esm/storage/0_storage.js +159 -88
- package/esm/storage/1_storage_memory.d.ts +4 -1
- package/esm/storage/1_storage_memory.js +29 -9
- package/esm/tl/3_utilities.d.ts +5 -2
- package/esm/tl/3_utilities.js +32 -6
- package/esm/types/0_giveaway_parameters.d.ts +1 -0
- package/esm/types/0_login_url.d.ts +1 -0
- package/esm/types/0_mask_position.d.ts +1 -0
- package/esm/types/0_message_reference.d.ts +5 -0
- package/esm/types/0_poll_option.d.ts +1 -0
- package/esm/types/0_price_tag.d.ts +5 -0
- package/esm/types/0_restriction_reason.d.ts +1 -0
- package/esm/types/1_giveaway.d.ts +1 -0
- package/esm/types/1_inline_query_result_button.d.ts +1 -0
- package/esm/types/1_input_message_content.d.ts +2 -2
- package/esm/types/1_poll.d.ts +1 -0
- package/esm/types/1_reaction_count.d.ts +1 -0
- package/esm/types/1_reply_quote.d.ts +1 -0
- package/esm/types/1_sticker.d.ts +1 -0
- package/esm/types/2_chat_member.d.ts +1 -0
- package/esm/types/2_chosen_inline_result.d.ts +1 -0
- package/esm/types/2_game.d.ts +1 -0
- package/esm/types/2_message_interactions.d.ts +1 -0
- package/esm/types/2_message_reactions.d.ts +1 -0
- package/esm/types/3_chat_member_updated.d.ts +1 -0
- package/esm/types/3_reply_markup.d.ts +1 -0
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_message.d.ts +1 -0
- package/esm/types/5_callback_query.d.ts +1 -0
- package/esm/types/5_callback_query.js +17 -2
- package/esm/types/6_update.d.ts +2 -2
- package/esm/utilities/0_cache_map.d.ts +6 -0
- package/esm/utilities/0_cache_map.js +30 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +5 -5
- package/script/1_utilities.d.ts +1 -0
- package/script/1_utilities.js +1 -0
- package/script/3_types.d.ts +2 -2
- package/script/3_types.js +2 -2
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_types.d.ts +1 -0
- package/script/client/1_file_manager.js +2 -1
- package/script/client/1_reaction_manager.js +3 -3
- package/script/client/1_update_manager.js +10 -10
- package/script/client/2_message_manager.d.ts +2 -0
- package/script/client/2_message_manager.js +41 -30
- package/script/client/3_chat_list_manager.js +1 -1
- package/script/client/4_client.d.ts +21 -0
- package/script/client/4_client.js +88 -39
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_equals.js +4 -3
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/base64.js +2 -2
- package/{esm/deps/deno.land/std@0.212.0 → script/deps/deno.land/std@0.214.0}/fmt/colors.d.ts +1 -1
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/fmt/colors.js +4 -1
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/content_type.d.ts +10 -8
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/content_type.js +4 -4
- package/{esm/deps/deno.land/std@0.212.0 → script/deps/deno.land/std@0.214.0}/media_types/extension.d.ts +3 -3
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/extension.js +3 -3
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/format_media_type.d.ts +1 -1
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/format_media_type.js +1 -1
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/get_charset.d.ts +3 -3
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/get_charset.js +3 -3
- package/script/deps/deno.land/std@0.214.0/media_types/parse_media_type.d.ts +23 -0
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/parse_media_type.js +7 -21
- package/{esm/deps/deno.land/std@0.212.0 → script/deps/deno.land/std@0.214.0}/media_types/type_by_extension.d.ts +2 -2
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/type_by_extension.js +2 -2
- package/{esm/deps/deno.land/std@0.212.0/path/windows → script/deps/deno.land/std@0.214.0/path}/common.d.ts +1 -2
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/common.js +2 -2
- package/script/deps/deno.land/std@0.214.0/path/constants.d.ts +3 -0
- package/script/deps/deno.land/std@0.214.0/path/constants.js +9 -0
- package/script/deps/deno.land/std@0.214.0/path/mod.d.ts +65 -0
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/mod.js +10 -5
- package/script/deps/deno.land/std@0.214.0/path/posix/common.d.ts +13 -0
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/common.js +2 -2
- package/script/deps/deno.land/std@0.214.0/path/posix/constants.d.ts +3 -0
- package/script/deps/deno.land/{std@0.212.0/path/posix/separator.js → std@0.214.0/path/posix/constants.js} +4 -3
- package/script/deps/deno.land/{std@0.212.0/path/windows → std@0.214.0/path/posix}/join_globs.js +2 -2
- package/{esm/deps/deno.land/std@0.212.0 → script/deps/deno.land/std@0.214.0}/path/posix/mod.d.ts +8 -1
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/mod.js +8 -1
- package/script/deps/deno.land/{std@0.212.0/path/windows → std@0.214.0/path/posix}/normalize_glob.js +2 -2
- package/script/deps/deno.land/std@0.214.0/path/posix/separator.d.ts +8 -0
- package/script/deps/deno.land/std@0.214.0/path/posix/separator.js +13 -0
- package/script/deps/deno.land/std@0.214.0/path/separator.d.ts +8 -0
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/separator.js +6 -0
- package/script/deps/deno.land/std@0.214.0/path/windows/common.d.ts +13 -0
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/common.js +2 -2
- package/script/deps/deno.land/std@0.214.0/path/windows/constants.d.ts +3 -0
- package/script/deps/deno.land/{std@0.212.0/path/windows/separator.js → std@0.214.0/path/windows/constants.js} +4 -3
- package/script/deps/deno.land/{std@0.212.0/path/posix → std@0.214.0/path/windows}/join_globs.js +2 -2
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/mod.d.ts +7 -0
- package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/mod.js +7 -0
- package/script/deps/deno.land/{std@0.212.0/path/posix → std@0.214.0/path/windows}/normalize_glob.js +2 -2
- package/script/deps/deno.land/std@0.214.0/path/windows/separator.d.ts +8 -0
- package/script/deps/deno.land/std@0.214.0/path/windows/separator.js +13 -0
- package/script/storage/0_storage.d.ts +63 -11
- package/script/storage/0_storage.js +159 -88
- package/script/storage/1_storage_memory.d.ts +4 -1
- package/script/storage/1_storage_memory.js +29 -9
- package/script/tl/3_utilities.d.ts +5 -2
- package/script/tl/3_utilities.js +35 -7
- package/script/types/0_giveaway_parameters.d.ts +1 -0
- package/script/types/0_login_url.d.ts +1 -0
- package/script/types/0_mask_position.d.ts +1 -0
- package/script/types/0_message_reference.d.ts +5 -0
- package/script/types/0_poll_option.d.ts +1 -0
- package/script/types/0_price_tag.d.ts +5 -0
- package/script/types/0_restriction_reason.d.ts +1 -0
- package/script/types/1_giveaway.d.ts +1 -0
- package/script/types/1_inline_query_result_button.d.ts +1 -0
- package/script/types/1_input_message_content.d.ts +2 -2
- package/script/types/1_poll.d.ts +1 -0
- package/script/types/1_reaction_count.d.ts +1 -0
- package/script/types/1_reply_quote.d.ts +1 -0
- package/script/types/1_sticker.d.ts +1 -0
- package/script/types/2_chat_member.d.ts +1 -0
- package/script/types/2_chosen_inline_result.d.ts +1 -0
- package/script/types/2_game.d.ts +1 -0
- package/script/types/2_message_interactions.d.ts +1 -0
- package/script/types/2_message_reactions.d.ts +1 -0
- package/script/types/3_chat_member_updated.d.ts +1 -0
- package/script/types/3_reply_markup.d.ts +1 -0
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_message.d.ts +1 -0
- package/script/types/5_callback_query.d.ts +1 -0
- package/script/types/5_callback_query.js +17 -1
- package/script/types/6_update.d.ts +2 -2
- package/script/utilities/0_cache_map.d.ts +6 -0
- package/script/utilities/0_cache_map.js +34 -0
- package/esm/deps/deno.land/std@0.212.0/media_types/parse_media_type.d.ts +0 -37
- package/esm/deps/deno.land/std@0.212.0/path/mod.d.ts +0 -28
- package/esm/deps/deno.land/std@0.212.0/path/posix/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.212.0/path/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.212.0/path/separator.js +0 -5
- package/esm/deps/deno.land/std@0.212.0/path/windows/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.212.0/path/windows/separator.js +0 -4
- package/esm/types/0_labeled_price.d.ts +0 -4
- package/esm/types/0_message_identifier.d.ts +0 -4
- package/script/deps/deno.land/std@0.212.0/media_types/parse_media_type.d.ts +0 -37
- package/script/deps/deno.land/std@0.212.0/path/mod.d.ts +0 -28
- package/script/deps/deno.land/std@0.212.0/path/posix/common.d.ts +0 -14
- package/script/deps/deno.land/std@0.212.0/path/posix/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.212.0/path/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.212.0/path/windows/common.d.ts +0 -14
- package/script/deps/deno.land/std@0.212.0/path/windows/separator.d.ts +0 -2
- package/script/types/0_labeled_price.d.ts +0 -4
- package/script/types/0_message_identifier.d.ts +0 -4
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_namespaced_path.js +0 -0
- /package/esm/types/{0_labeled_price.js → 0_message_reference.js} +0 -0
- /package/esm/types/{0_message_identifier.js → 0_price_tag.js} +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.212.0 → std@0.214.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/types/{0_labeled_price.js → 0_message_reference.js} +0 -0
- /package/script/types/{0_message_identifier.js → 0_price_tag.js} +0 -0
package/esm/storage/0_storage.js
CHANGED
|
@@ -9,58 +9,89 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
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");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _Storage_instances, _Storage_authKeyId, _Storage_resetAuthKeyId,
|
|
12
|
+
var _Storage_instances, _Storage_authKeyId, _Storage_resetAuthKeyId, _Storage_accountType, _Storage_getUpdateId;
|
|
13
13
|
import { bigIntFromBuffer, rleDecode, rleEncode, sha1, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
14
|
-
import { serialize, TLReader, types } from "../2_tl.js";
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
import { peerToChatId, serialize, TLReader, types } from "../2_tl.js";
|
|
15
|
+
// key parts
|
|
16
|
+
export const K = {
|
|
17
|
+
session: {
|
|
18
|
+
P: (string) => `session.${string}`,
|
|
19
|
+
serverSalt: () => [K.session.P("serverSalt")],
|
|
20
|
+
},
|
|
21
|
+
auth: {
|
|
22
|
+
P: (string) => `auth.${string}`,
|
|
23
|
+
dc: () => [K.auth.P("dc")],
|
|
24
|
+
key: () => [K.auth.P("key")],
|
|
25
|
+
accountType: () => [K.auth.P("accountType")],
|
|
26
|
+
},
|
|
27
|
+
updates: {
|
|
28
|
+
P: (string) => `updates.${string}`,
|
|
29
|
+
state: () => [K.updates.P("state")],
|
|
30
|
+
all: () => [K.updates.P("updates")],
|
|
31
|
+
updates: (boxId) => [...K.updates.all(), boxId],
|
|
32
|
+
update: (boxId, id) => [...K.updates.updates(boxId), id],
|
|
33
|
+
channelPts: (channelId) => [K.updates.P("channelPts"), channelId],
|
|
34
|
+
},
|
|
35
|
+
cache: {
|
|
36
|
+
P: (string) => `cache.${string}`,
|
|
37
|
+
usernames: () => [K.cache.P("username")],
|
|
38
|
+
username: (v) => [...K.cache.usernames(), v],
|
|
39
|
+
peers: () => [K.cache.P("peer")],
|
|
40
|
+
peer: (id) => [...K.cache.peers(), id],
|
|
41
|
+
stickerSetNames: () => [K.cache.P("stickerSetNames")],
|
|
42
|
+
stickerSetName: (id, accessHash) => [...K.cache.stickerSetNames(), id, accessHash],
|
|
43
|
+
files: () => [K.cache.P("files")],
|
|
44
|
+
file: (fileId) => [...K.cache.files(), fileId],
|
|
45
|
+
fileParts: () => [K.cache.P("fileParts")],
|
|
46
|
+
filePart: (fileId, n) => [...K.cache.fileParts(), fileId, n],
|
|
47
|
+
customEmojiDocuments: () => [K.cache.P("customEmojiDocuments")],
|
|
48
|
+
customEmojiDocument: (id) => [...K.cache.customEmojiDocuments(), id],
|
|
49
|
+
},
|
|
50
|
+
messages: {
|
|
51
|
+
P: (string) => `messages.${string}`,
|
|
52
|
+
messages: (chatId) => [K.messages.P("messages"), chatId],
|
|
53
|
+
message: (chatId, messageId) => [...K.messages.messages(chatId), messageId],
|
|
54
|
+
allMessageRefs: () => [K.messages.P("messageRefs")],
|
|
55
|
+
messageRef: (messageId) => [...K.messages.allMessageRefs(), messageId],
|
|
56
|
+
},
|
|
57
|
+
chatlists: {
|
|
58
|
+
P: (string) => `chatlists.${string}`,
|
|
59
|
+
hasAllChats: (listId) => [K.chatlists.P("hasAllChats"), listId],
|
|
60
|
+
chats: (listId) => [K.chatlists.P("chats"), listId],
|
|
61
|
+
chat: (listId, chatId) => [...K.chatlists.chats(listId), chatId],
|
|
62
|
+
pinnedChats: (listId) => [K.chatlists.P("pinnedChats"), listId],
|
|
63
|
+
},
|
|
64
|
+
};
|
|
38
65
|
export class Storage {
|
|
39
66
|
constructor() {
|
|
40
67
|
_Storage_instances.add(this);
|
|
41
68
|
_Storage_authKeyId.set(this, null);
|
|
69
|
+
_Storage_accountType.set(this, null);
|
|
42
70
|
}
|
|
43
71
|
setDc(dc) {
|
|
44
|
-
return this.set(
|
|
72
|
+
return this.set(K.auth.dc(), dc);
|
|
45
73
|
}
|
|
46
74
|
getDc() {
|
|
47
|
-
return this.get(
|
|
75
|
+
return this.get(K.auth.dc());
|
|
48
76
|
}
|
|
49
77
|
async getAuthKey() {
|
|
50
|
-
const authKey = await this.get(
|
|
78
|
+
const authKey = await this.get(K.auth.key());
|
|
51
79
|
await __classPrivateFieldGet(this, _Storage_instances, "m", _Storage_resetAuthKeyId).call(this, authKey);
|
|
52
80
|
return authKey;
|
|
53
81
|
}
|
|
54
82
|
async setAuthKey(authKey) {
|
|
55
|
-
await this.set(
|
|
83
|
+
await this.set(K.auth.key(), authKey);
|
|
56
84
|
await __classPrivateFieldGet(this, _Storage_instances, "m", _Storage_resetAuthKeyId).call(this, authKey);
|
|
57
85
|
}
|
|
58
86
|
get authKeyId() {
|
|
59
87
|
return __classPrivateFieldGet(this, _Storage_authKeyId, "f");
|
|
60
88
|
}
|
|
61
89
|
async getChannelAccessHash(id) {
|
|
62
|
-
const channel = await this.getEntity(
|
|
90
|
+
const channel = await this.getEntity(id);
|
|
63
91
|
if (channel) {
|
|
92
|
+
if (!(channel instanceof types.Channel) && !(channel instanceof types.ChannelForbidden)) {
|
|
93
|
+
UNREACHABLE();
|
|
94
|
+
}
|
|
64
95
|
return typeof channel.access_hash === "bigint" ? channel.access_hash : null;
|
|
65
96
|
}
|
|
66
97
|
else {
|
|
@@ -68,23 +99,26 @@ export class Storage {
|
|
|
68
99
|
}
|
|
69
100
|
}
|
|
70
101
|
async getUserAccessHash(id) {
|
|
71
|
-
const user = await this.getEntity(
|
|
102
|
+
const user = await this.getEntity(id);
|
|
72
103
|
if (user) {
|
|
104
|
+
if (!(user instanceof types.User)) {
|
|
105
|
+
UNREACHABLE();
|
|
106
|
+
}
|
|
73
107
|
return typeof user.access_hash === "bigint" ? user.access_hash : null;
|
|
74
108
|
}
|
|
75
109
|
else {
|
|
76
110
|
return null;
|
|
77
111
|
}
|
|
78
112
|
}
|
|
79
|
-
async updateUsernames(
|
|
113
|
+
async updateUsernames(id, usernames) {
|
|
80
114
|
for (let username of usernames) {
|
|
81
115
|
username = username.toLowerCase();
|
|
82
|
-
await this.set(
|
|
116
|
+
await this.set(K.cache.username(username), [id, new Date()]);
|
|
83
117
|
}
|
|
84
118
|
}
|
|
85
119
|
async getUsername(username) {
|
|
86
120
|
username = username.toLowerCase();
|
|
87
|
-
return await this.get(
|
|
121
|
+
return await this.get(K.cache.username(username));
|
|
88
122
|
}
|
|
89
123
|
async setTlObject(key, value) {
|
|
90
124
|
if (value == null) {
|
|
@@ -104,50 +138,51 @@ export class Storage {
|
|
|
104
138
|
}
|
|
105
139
|
}
|
|
106
140
|
async setState(state) {
|
|
107
|
-
await this.setTlObject(
|
|
141
|
+
await this.setTlObject(K.updates.state(), state);
|
|
108
142
|
}
|
|
109
143
|
async getState() {
|
|
110
|
-
return await this.getTlObject(
|
|
144
|
+
return await this.getTlObject(K.updates.state());
|
|
111
145
|
}
|
|
112
146
|
async setMessage(chatId, messageId, message) {
|
|
113
147
|
if (chatId > ZERO_CHANNEL_ID) {
|
|
114
|
-
await this.set(
|
|
148
|
+
await this.set(K.messages.messageRef(messageId), message == null ? null : chatId);
|
|
115
149
|
}
|
|
116
|
-
await this.setTlObject(
|
|
150
|
+
await this.setTlObject(K.messages.message(chatId, messageId), message);
|
|
117
151
|
}
|
|
118
152
|
async deleteMessages() {
|
|
119
153
|
const maybePromises = new Array();
|
|
120
|
-
for await (const [k, o] of await this.getMany({ prefix:
|
|
121
|
-
maybePromises.push(Promise.all([this.set(k, null), o == null ? Promise.resolve() : this.set(
|
|
154
|
+
for await (const [k, o] of await this.getMany({ prefix: K.messages.allMessageRefs() })) {
|
|
155
|
+
maybePromises.push(Promise.all([this.set(k, null), o == null ? Promise.resolve() : this.set(K.messages.message(o, k[1]), null)]).then(() => { }));
|
|
122
156
|
}
|
|
123
157
|
await Promise.all(maybePromises.filter((v) => v instanceof Promise));
|
|
124
158
|
}
|
|
125
159
|
getMessageChat(messageId) {
|
|
126
|
-
return this.get(
|
|
160
|
+
return this.get(K.messages.messageRef(messageId));
|
|
127
161
|
}
|
|
128
162
|
async getMessage(chatId, messageId) {
|
|
129
|
-
return await this.getTlObject(
|
|
163
|
+
return await this.getTlObject(K.messages.message(chatId, messageId));
|
|
130
164
|
}
|
|
131
165
|
async getLastMessage(chatId) {
|
|
132
|
-
for await (const [_, buffer] of await this.getMany({ prefix:
|
|
166
|
+
for await (const [_, buffer] of await this.getMany({ prefix: K.messages.messages(chatId) }, { limit: 1, reverse: true })) {
|
|
133
167
|
return await this.getTlObject(buffer);
|
|
134
168
|
}
|
|
135
169
|
return null;
|
|
136
170
|
}
|
|
137
171
|
async setChannelPts(channelId, pts) {
|
|
138
|
-
await this.set(
|
|
172
|
+
await this.set(K.updates.channelPts(channelId), pts);
|
|
139
173
|
}
|
|
140
174
|
getChannelPts(channelId) {
|
|
141
|
-
return this.get(
|
|
175
|
+
return this.get(K.updates.channelPts(channelId));
|
|
142
176
|
}
|
|
143
177
|
async setEntity(entity) {
|
|
144
|
-
|
|
145
|
-
await this.set(KPARTS__PEER(type, entity.id), rleEncode(entity[serialize]()));
|
|
178
|
+
await this.set(K.cache.peer(peerToChatId(entity)), [rleEncode(entity[serialize]()), new Date()]);
|
|
146
179
|
}
|
|
147
|
-
async getEntity(
|
|
148
|
-
const peer_ = await this.get(
|
|
180
|
+
async getEntity(key) {
|
|
181
|
+
const peer_ = await this.get(K.cache.peer(key));
|
|
149
182
|
if (peer_ != null) {
|
|
150
|
-
|
|
183
|
+
const [obj_] = peer_;
|
|
184
|
+
const entity = new TLReader(rleDecode(obj_)).readObject();
|
|
185
|
+
return entity;
|
|
151
186
|
}
|
|
152
187
|
else {
|
|
153
188
|
return null;
|
|
@@ -163,31 +198,36 @@ export class Storage {
|
|
|
163
198
|
throw err;
|
|
164
199
|
}
|
|
165
200
|
else {
|
|
166
|
-
await this.set(
|
|
201
|
+
await this.set(K.auth.accountType(), type);
|
|
167
202
|
}
|
|
168
203
|
}
|
|
169
204
|
}
|
|
170
|
-
getAccountType() {
|
|
171
|
-
|
|
205
|
+
async getAccountType() {
|
|
206
|
+
if (__classPrivateFieldGet(this, _Storage_accountType, "f") != null) {
|
|
207
|
+
return __classPrivateFieldGet(this, _Storage_accountType, "f");
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
return __classPrivateFieldSet(this, _Storage_accountType, await this.get(K.auth.accountType()), "f");
|
|
211
|
+
}
|
|
172
212
|
}
|
|
173
213
|
async updateStickerSetName(id, accessHash, name) {
|
|
174
|
-
await this.set(
|
|
214
|
+
await this.set(K.cache.stickerSetName(id, accessHash), [name, new Date()]);
|
|
175
215
|
}
|
|
176
216
|
getStickerSetName(id, accessHash) {
|
|
177
|
-
return this.get(
|
|
217
|
+
return this.get(K.cache.stickerSetName(id, accessHash));
|
|
178
218
|
}
|
|
179
219
|
async setServerSalt(serverSalt) {
|
|
180
|
-
await this.set(
|
|
220
|
+
await this.set(K.session.serverSalt(), serverSalt);
|
|
181
221
|
}
|
|
182
222
|
getServerSalt() {
|
|
183
|
-
return this.get(
|
|
223
|
+
return this.get(K.session.serverSalt());
|
|
184
224
|
}
|
|
185
225
|
async setChat(listId, chatId, pinned, topMessageId, topMessageDate) {
|
|
186
|
-
await this.set(
|
|
226
|
+
await this.set(K.chatlists.chat(listId, chatId), [pinned, topMessageId, topMessageDate]);
|
|
187
227
|
}
|
|
188
228
|
async getChats(listId) {
|
|
189
229
|
const chats = new Array();
|
|
190
|
-
for await (const [key, value] of await this.getMany({ prefix:
|
|
230
|
+
for await (const [key, value] of await this.getMany({ prefix: K.chatlists.chats(listId) })) {
|
|
191
231
|
if (key.length != 3 || typeof key[2] !== "number") {
|
|
192
232
|
continue;
|
|
193
233
|
}
|
|
@@ -196,24 +236,24 @@ export class Storage {
|
|
|
196
236
|
return chats;
|
|
197
237
|
}
|
|
198
238
|
async removeChats(listId) {
|
|
199
|
-
for await (const [key] of await this.getMany({ prefix:
|
|
239
|
+
for await (const [key] of await this.getMany({ prefix: K.chatlists.chats(listId) })) {
|
|
200
240
|
await this.set(key, null);
|
|
201
241
|
}
|
|
202
242
|
await this.setHasAllChats(listId, false);
|
|
203
243
|
await this.setPinnedChats(listId, null);
|
|
204
244
|
}
|
|
205
245
|
async setHasAllChats(listId, hasAllChats) {
|
|
206
|
-
await this.set(
|
|
246
|
+
await this.set(K.chatlists.hasAllChats(listId), hasAllChats);
|
|
207
247
|
}
|
|
208
248
|
async hasAllChats(listId) {
|
|
209
|
-
const v = await this.get(
|
|
249
|
+
const v = await this.get(K.chatlists.hasAllChats(listId));
|
|
210
250
|
return v == true;
|
|
211
251
|
}
|
|
212
252
|
async setPinnedChats(listId, chatIds) {
|
|
213
|
-
await this.set(
|
|
253
|
+
await this.set(K.chatlists.pinnedChats(listId), chatIds);
|
|
214
254
|
}
|
|
215
255
|
async getPinnedChats(listId) {
|
|
216
|
-
return await this.get(
|
|
256
|
+
return await this.get(K.chatlists.pinnedChats(listId));
|
|
217
257
|
}
|
|
218
258
|
async getHistory(chatId, offsetId, limit) {
|
|
219
259
|
if (offsetId == 0) {
|
|
@@ -221,7 +261,7 @@ export class Storage {
|
|
|
221
261
|
}
|
|
222
262
|
++limit;
|
|
223
263
|
const messages = new Array();
|
|
224
|
-
for await (const [_, buffer] of await this.getMany({ start:
|
|
264
|
+
for await (const [_, buffer] of await this.getMany({ start: K.messages.message(chatId, 0), end: K.messages.message(chatId, offsetId) }, { limit, reverse: true })) {
|
|
225
265
|
const message = await this.getTlObject(buffer);
|
|
226
266
|
if ("id" in message && message.id == offsetId) {
|
|
227
267
|
continue;
|
|
@@ -234,14 +274,14 @@ export class Storage {
|
|
|
234
274
|
if (!this.supportsFiles) {
|
|
235
275
|
return null;
|
|
236
276
|
}
|
|
237
|
-
return await this.get(
|
|
277
|
+
return await this.get(K.cache.file(id));
|
|
238
278
|
}
|
|
239
279
|
async *iterFileParts(id, partCount, offset) {
|
|
240
280
|
if (!this.supportsFiles) {
|
|
241
281
|
return;
|
|
242
282
|
}
|
|
243
283
|
for (let i = offset; i < partCount; i++) {
|
|
244
|
-
const part = await this.get(
|
|
284
|
+
const part = await this.get(K.cache.filePart(id, i));
|
|
245
285
|
if (part == null) {
|
|
246
286
|
continue;
|
|
247
287
|
}
|
|
@@ -252,19 +292,19 @@ export class Storage {
|
|
|
252
292
|
if (!this.supportsFiles) {
|
|
253
293
|
return;
|
|
254
294
|
}
|
|
255
|
-
await this.set(
|
|
295
|
+
await this.set(K.cache.filePart(id, index), bytes);
|
|
256
296
|
}
|
|
257
297
|
async setFilePartCount(id, partCount, chunkSize) {
|
|
258
298
|
if (!this.supportsFiles) {
|
|
259
299
|
return;
|
|
260
300
|
}
|
|
261
|
-
await this.set(
|
|
301
|
+
await this.set(K.cache.file(id), [partCount, chunkSize]);
|
|
262
302
|
}
|
|
263
303
|
async setCustomEmojiDocument(id, document) {
|
|
264
|
-
await this.set(
|
|
304
|
+
await this.set(K.cache.customEmojiDocument(id), [rleEncode(document[serialize]()), new Date()]);
|
|
265
305
|
}
|
|
266
306
|
async getCustomEmojiDocument(id) {
|
|
267
|
-
const v = await this.get(
|
|
307
|
+
const v = await this.get(K.cache.customEmojiDocument(id));
|
|
268
308
|
if (v != null) {
|
|
269
309
|
return [await this.getTlObject([0]), v[1]];
|
|
270
310
|
}
|
|
@@ -273,17 +313,17 @@ export class Storage {
|
|
|
273
313
|
}
|
|
274
314
|
}
|
|
275
315
|
async setUpdate(boxId, update) {
|
|
276
|
-
await this.setTlObject(
|
|
316
|
+
await this.setTlObject(K.updates.update(boxId, __classPrivateFieldGet(this, _Storage_instances, "m", _Storage_getUpdateId).call(this, update)), update);
|
|
277
317
|
}
|
|
278
318
|
async deleteUpdates() {
|
|
279
319
|
const maybePromises = new Array();
|
|
280
|
-
for await (const [k] of await this.getMany({ prefix:
|
|
320
|
+
for await (const [k] of await this.getMany({ prefix: K.updates.all() })) {
|
|
281
321
|
maybePromises.push(this.set(k, null));
|
|
282
322
|
}
|
|
283
323
|
await Promise.all(maybePromises.filter((v) => v instanceof Promise));
|
|
284
324
|
}
|
|
285
325
|
async getFirstUpdate(boxId) {
|
|
286
|
-
for await (const [key, update] of await this.getMany({ prefix:
|
|
326
|
+
for await (const [key, update] of await this.getMany({ prefix: K.updates.updates(boxId) }, { limit: 1 })) {
|
|
287
327
|
return [key, await this.getTlObject(update).then((v) => v)];
|
|
288
328
|
}
|
|
289
329
|
return null;
|
|
@@ -298,26 +338,57 @@ export class Storage {
|
|
|
298
338
|
throw new Error(`${source}: not a bot client`);
|
|
299
339
|
}
|
|
300
340
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
341
|
+
async deleteFiles() {
|
|
342
|
+
if (!this.supportsFiles) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.fileParts() })) {
|
|
346
|
+
await this.set(key, null);
|
|
347
|
+
}
|
|
348
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.files() })) {
|
|
349
|
+
await this.set(key, null);
|
|
350
|
+
}
|
|
305
351
|
}
|
|
306
|
-
|
|
307
|
-
|
|
352
|
+
async deleteCustomEmojiDocuments() {
|
|
353
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.customEmojiDocuments() })) {
|
|
354
|
+
await this.set(key, null);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
async deleteStickerSetNames() {
|
|
358
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.stickerSetNames() })) {
|
|
359
|
+
await this.set(key, null);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
async deletePeers() {
|
|
363
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.peers() })) {
|
|
364
|
+
await this.set(key, null);
|
|
365
|
+
}
|
|
308
366
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
367
|
+
async deleteUsernames() {
|
|
368
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.usernames() })) {
|
|
369
|
+
await this.set(key, null);
|
|
370
|
+
}
|
|
312
371
|
}
|
|
313
|
-
|
|
314
|
-
|
|
372
|
+
async clear() {
|
|
373
|
+
await Promise.all([
|
|
374
|
+
this.deleteMessages(),
|
|
375
|
+
this.removeChats(0),
|
|
376
|
+
this.removeChats(1),
|
|
377
|
+
this.deleteUpdates(),
|
|
378
|
+
this.deleteFiles(),
|
|
379
|
+
this.deleteCustomEmojiDocuments(),
|
|
380
|
+
this.deleteStickerSetNames(),
|
|
381
|
+
this.deletePeers(),
|
|
382
|
+
this.deleteUsernames(),
|
|
383
|
+
]);
|
|
315
384
|
}
|
|
316
|
-
|
|
317
|
-
|
|
385
|
+
}
|
|
386
|
+
_Storage_authKeyId = new WeakMap(), _Storage_accountType = new WeakMap(), _Storage_instances = new WeakSet(), _Storage_resetAuthKeyId = async function _Storage_resetAuthKeyId(authKey) {
|
|
387
|
+
if (authKey != null) {
|
|
388
|
+
__classPrivateFieldSet(this, _Storage_authKeyId, await sha1(authKey).then((hash) => bigIntFromBuffer(hash.subarray(-8), true, false)), "f");
|
|
318
389
|
}
|
|
319
390
|
else {
|
|
320
|
-
|
|
391
|
+
__classPrivateFieldSet(this, _Storage_authKeyId, null, "f");
|
|
321
392
|
}
|
|
322
393
|
}, _Storage_getUpdateId = function _Storage_getUpdateId(update) {
|
|
323
394
|
let id = BigInt(Date.now()) << 32n;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { MaybePromise } from "../1_utilities.js";
|
|
1
|
+
import { CacheMap, MaybePromise } from "../1_utilities.js";
|
|
2
2
|
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
3
3
|
export declare class StorageMemory extends Storage implements Storage {
|
|
4
4
|
#private;
|
|
5
5
|
protected map: Map<string, unknown>;
|
|
6
|
+
protected messageMap: CacheMap<string, unknown>;
|
|
6
7
|
initialize(): void;
|
|
8
|
+
getMap(key: readonly StorageKeyPart[]): Map<string, unknown>;
|
|
9
|
+
getMaps(): Map<string, unknown>[];
|
|
7
10
|
branch(id: string): Storage;
|
|
8
11
|
get supportsFiles(): boolean;
|
|
9
12
|
get<T>(key: readonly StorageKeyPart[]): NonNullable<T> | null;
|
|
@@ -10,6 +10,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
12
|
var _StorageMemory_instances, _StorageMemory_id, _StorageMemory_fixKey, _StorageMemory_getEntries;
|
|
13
|
+
import { CacheMap } from "../1_utilities.js";
|
|
13
14
|
import { Storage } from "./0_storage.js";
|
|
14
15
|
import { fromString, isInRange, toString } from "./0_utilities.js";
|
|
15
16
|
export class StorageMemory extends Storage {
|
|
@@ -22,10 +23,27 @@ export class StorageMemory extends Storage {
|
|
|
22
23
|
writable: true,
|
|
23
24
|
value: new Map()
|
|
24
25
|
});
|
|
26
|
+
Object.defineProperty(this, "messageMap", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: new CacheMap(30000)
|
|
31
|
+
});
|
|
25
32
|
_StorageMemory_id.set(this, null);
|
|
26
33
|
}
|
|
27
34
|
initialize() {
|
|
28
35
|
}
|
|
36
|
+
getMap(key) {
|
|
37
|
+
if (key[0] == "messages.messages") {
|
|
38
|
+
return this.messageMap;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return this.map;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
getMaps() {
|
|
45
|
+
return [this.map, this.messageMap];
|
|
46
|
+
}
|
|
29
47
|
branch(id) {
|
|
30
48
|
const storage = new StorageMemory();
|
|
31
49
|
__classPrivateFieldSet(storage, _StorageMemory_id, id, "f");
|
|
@@ -36,7 +54,7 @@ export class StorageMemory extends Storage {
|
|
|
36
54
|
}
|
|
37
55
|
get(key) {
|
|
38
56
|
key = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_fixKey).call(this, key);
|
|
39
|
-
return this.
|
|
57
|
+
return this.getMap(key).get(toString(key)) ?? null;
|
|
40
58
|
}
|
|
41
59
|
*getMany(filter, params) {
|
|
42
60
|
let entries = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_getEntries).call(this);
|
|
@@ -46,13 +64,13 @@ export class StorageMemory extends Storage {
|
|
|
46
64
|
if (params?.limit !== undefined) {
|
|
47
65
|
entries = entries.slice(0, params.limit <= 0 ? 1 : params.limit);
|
|
48
66
|
}
|
|
49
|
-
for (const [key, value] of entries) {
|
|
67
|
+
entries: for (const [key, value] of entries) {
|
|
50
68
|
const parts = fromString(key);
|
|
51
69
|
if (Array.isArray(parts)) {
|
|
52
70
|
if ("prefix" in filter) {
|
|
53
71
|
for (const [i, p] of filter.prefix.entries()) {
|
|
54
72
|
if (toString(p) != toString(parts[i])) {
|
|
55
|
-
continue;
|
|
73
|
+
continue entries;
|
|
56
74
|
}
|
|
57
75
|
}
|
|
58
76
|
}
|
|
@@ -69,10 +87,10 @@ export class StorageMemory extends Storage {
|
|
|
69
87
|
key_ = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_fixKey).call(this, key_);
|
|
70
88
|
const key = toString(key_);
|
|
71
89
|
if (value != null) {
|
|
72
|
-
this.
|
|
90
|
+
this.getMap(key_).set(key, value);
|
|
73
91
|
}
|
|
74
92
|
else {
|
|
75
|
-
this.
|
|
93
|
+
this.getMap(key_).delete(key);
|
|
76
94
|
}
|
|
77
95
|
}
|
|
78
96
|
incr(key, by) {
|
|
@@ -88,11 +106,13 @@ _StorageMemory_id = new WeakMap(), _StorageMemory_instances = new WeakSet(), _St
|
|
|
88
106
|
}
|
|
89
107
|
}, _StorageMemory_getEntries = function _StorageMemory_getEntries() {
|
|
90
108
|
const entries = new Array();
|
|
91
|
-
for (const
|
|
92
|
-
|
|
93
|
-
|
|
109
|
+
for (const map of this.getMaps()) {
|
|
110
|
+
for (const entry of map.entries()) {
|
|
111
|
+
if (__classPrivateFieldGet(this, _StorageMemory_id, "f") !== null && !entry[0].startsWith("__S" + __classPrivateFieldGet(this, _StorageMemory_id, "f"))) {
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
entries.push(entry);
|
|
94
115
|
}
|
|
95
|
-
entries.push(entry);
|
|
96
116
|
}
|
|
97
117
|
return entries;
|
|
98
118
|
};
|
package/esm/tl/3_utilities.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { enums } from "./2_types.js";
|
|
1
|
+
import { enums, types } from "./2_types.js";
|
|
2
2
|
export declare function getChannelChatId(channelId: bigint): number;
|
|
3
|
-
export
|
|
3
|
+
export type AnyEntity = types.User | types.Channel | types.ChannelForbidden | types.Chat | types.ChatForbidden;
|
|
4
|
+
export declare function peerToChatId(peer: enums.Peer | enums.InputPeer | AnyEntity): number;
|
|
4
5
|
export declare function chatIdToPeer(chatId: number): import("./2_types.js").PeerUser_ | import("./2_types.js").PeerChat_ | import("./2_types.js").PeerChannel_;
|
|
6
|
+
export declare function chatIdToPeerId(chatId: number): bigint;
|
|
7
|
+
export declare function getChatIdPeerType(chatId: number): "chat" | "channel" | "user";
|
|
5
8
|
export declare function inputPeerToPeer(inputPeer: enums.InputPeer): import("./2_types.js").PeerUser_ | import("./2_types.js").PeerChat_ | import("./2_types.js").PeerChannel_;
|
package/esm/tl/3_utilities.js
CHANGED
|
@@ -4,14 +4,14 @@ export function getChannelChatId(channelId) {
|
|
|
4
4
|
return ZERO_CHANNEL_ID + -Number(channelId);
|
|
5
5
|
}
|
|
6
6
|
export function peerToChatId(peer) {
|
|
7
|
-
if (peer instanceof types.PeerUser || peer instanceof types.InputPeerUser) {
|
|
8
|
-
return Number(peer.user_id);
|
|
7
|
+
if (peer instanceof types.PeerUser || peer instanceof types.InputPeerUser || peer instanceof types.User) {
|
|
8
|
+
return Number("id" in peer ? peer.id : peer.user_id);
|
|
9
9
|
}
|
|
10
|
-
else if (peer instanceof types.PeerChat || peer instanceof types.InputPeerChat) {
|
|
11
|
-
return -Number(peer.chat_id);
|
|
10
|
+
else if (peer instanceof types.PeerChat || peer instanceof types.InputPeerChat || peer instanceof types.Chat || peer instanceof types.ChatForbidden) {
|
|
11
|
+
return -Number("id" in peer ? peer.id : peer.chat_id);
|
|
12
12
|
}
|
|
13
|
-
else if (peer instanceof types.PeerChannel || peer instanceof types.InputPeerChannel) {
|
|
14
|
-
return getChannelChatId(peer.channel_id);
|
|
13
|
+
else if (peer instanceof types.PeerChannel || peer instanceof types.InputPeerChannel || peer instanceof types.Channel || peer instanceof types.ChannelForbidden) {
|
|
14
|
+
return getChannelChatId("id" in peer ? peer.id : peer.channel_id);
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
UNREACHABLE();
|
|
@@ -28,6 +28,32 @@ export function chatIdToPeer(chatId) {
|
|
|
28
28
|
return new types.PeerChannel({ channel_id: BigInt(ZERO_CHANNEL_ID - chatId) });
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
export function chatIdToPeerId(chatId) {
|
|
32
|
+
const peer = chatIdToPeer(chatId);
|
|
33
|
+
if ("user_id" in peer) {
|
|
34
|
+
return peer.user_id;
|
|
35
|
+
}
|
|
36
|
+
else if ("chat_id" in peer) {
|
|
37
|
+
return peer.chat_id;
|
|
38
|
+
}
|
|
39
|
+
else if ("channel_id" in peer) {
|
|
40
|
+
return peer.channel_id;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
UNREACHABLE();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export function getChatIdPeerType(chatId) {
|
|
47
|
+
if (chatId > 0) {
|
|
48
|
+
return "user";
|
|
49
|
+
}
|
|
50
|
+
else if (chatId > ZERO_CHANNEL_ID) {
|
|
51
|
+
return "chat";
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return "channel";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
31
57
|
export function inputPeerToPeer(inputPeer) {
|
|
32
58
|
if ("user_id" in inputPeer) {
|
|
33
59
|
return new types.PeerUser(inputPeer);
|