@mtkruto/browser 0.6.1 → 0.119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -1
- package/esm/0_deps.d.ts +23 -13
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +25 -15
- package/esm/0_errors.d.ts +9 -2
- package/esm/0_errors.d.ts.map +1 -1
- package/esm/0_errors.js +19 -7
- package/esm/1_utilities.d.ts +6 -7
- package/esm/1_utilities.d.ts.map +1 -1
- package/esm/1_utilities.js +6 -7
- package/esm/2_connection.d.ts +1 -1
- package/esm/2_connection.js +1 -1
- package/esm/2_storage.d.ts +1 -1
- package/esm/2_storage.js +1 -1
- package/esm/2_tl.d.ts +7 -10
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +7 -10
- package/esm/3_errors.d.ts +8 -3
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +11 -14
- package/esm/3_transport.d.ts +4 -4
- package/esm/3_transport.js +4 -4
- package/esm/3_types.d.ts +74 -34
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +74 -34
- package/esm/4_constants.d.ts +21 -2
- package/esm/4_constants.d.ts.map +1 -1
- package/esm/4_constants.js +4 -4
- package/esm/4_errors.d.ts +4 -4
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/4_errors.js +3 -13
- package/esm/4_session.d.ts +24 -0
- package/esm/4_session.d.ts.map +1 -0
- package/esm/4_session.js +23 -0
- package/esm/5_client.d.ts +9 -3
- package/esm/5_client.d.ts.map +1 -1
- package/esm/5_client.js +9 -3
- package/esm/_dnt.polyfills.d.ts +20 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +120 -0
- package/esm/_dnt.shims.d.ts +0 -1
- package/esm/_dnt.shims.d.ts.map +1 -1
- package/esm/client/0_abortable_loop.d.ts +27 -0
- package/esm/client/0_abortable_loop.d.ts.map +1 -0
- package/esm/client/0_abortable_loop.js +56 -0
- package/esm/client/0_client_abstract.d.ts +31 -28
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +21 -90
- package/esm/client/0_html.d.ts +4 -3
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +412 -74
- package/esm/client/0_markdown.d.ts +2 -2
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +39 -19
- package/esm/client/0_params.d.ts +324 -41
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_params.js +1 -1
- package/esm/client/0_password.d.ts +6 -6
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +13 -13
- package/esm/client/0_storage_operations.d.ts +81 -69
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +396 -314
- package/esm/client/0_update_processor.d.ts +26 -0
- package/esm/client/0_update_processor.d.ts.map +1 -0
- package/esm/client/0_update_processor.js +20 -0
- package/esm/client/0_utilities.d.ts +10 -5
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +45 -31
- package/esm/client/0_worker_error.d.ts +26 -0
- package/esm/client/0_worker_error.d.ts.map +1 -0
- package/esm/client/0_worker_error.js +86 -0
- package/esm/client/0_worker_request.d.ts +27 -0
- package/esm/client/0_worker_request.d.ts.map +1 -0
- package/esm/client/0_worker_request.js +20 -0
- package/esm/client/1_client_generic.d.ts +1846 -0
- package/esm/client/1_client_generic.d.ts.map +1 -0
- package/esm/client/1_client_generic.js +24 -0
- package/esm/client/1_client_plain.d.ts +12 -9
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +36 -65
- package/esm/client/1_invoke_middleware.d.ts +32 -0
- package/esm/client/1_invoke_middleware.d.ts.map +1 -0
- package/esm/client/1_invoke_middleware.js +22 -0
- package/esm/client/1_types.d.ts +17 -32
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/1_types.js +1 -1
- package/esm/client/1_worker_response.d.ts +37 -0
- package/esm/client/1_worker_response.d.ts.map +1 -0
- package/esm/client/1_worker_response.js +20 -0
- package/esm/client/2_account_manager.d.ts +43 -5
- package/esm/client/2_account_manager.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +368 -48
- package/esm/client/2_bot_info_manager.d.ts +12 -5
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.js +41 -39
- package/esm/client/2_business_connection_manager.d.ts +6 -5
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +16 -29
- package/esm/client/2_client_encrypted.d.ts +58 -0
- package/esm/client/2_client_encrypted.d.ts.map +1 -0
- package/esm/client/2_client_encrypted.js +273 -0
- package/esm/client/2_file_manager.d.ts +27 -7
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +365 -327
- package/esm/client/2_network_statistics_manager.d.ts +5 -5
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_network_statistics_manager.js +40 -27
- package/esm/client/2_payment_manager.d.ts +8 -7
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +13 -26
- package/esm/client/2_reaction_manager.d.ts +6 -5
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +19 -32
- package/esm/client/2_sign_in.d.ts +25 -0
- package/esm/client/2_sign_in.d.ts.map +1 -0
- package/esm/client/2_sign_in.js +114 -0
- package/esm/client/2_translations_manager.d.ts +35 -0
- package/esm/client/2_translations_manager.d.ts.map +1 -0
- package/esm/client/2_translations_manager.js +161 -0
- package/esm/client/2_update_manager.d.ts +11 -8
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +841 -778
- package/esm/client/3_client_encrypted_pool.d.ts +29 -0
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/esm/client/3_client_encrypted_pool.js +47 -0
- package/esm/client/3_filters.d.ts +96 -0
- package/esm/client/3_filters.d.ts.map +1 -0
- package/esm/client/3_filters.js +52 -0
- package/esm/client/3_message_manager.d.ts +30 -35
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +1083 -790
- package/esm/client/3_video_chat_manager.d.ts +11 -10
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +88 -96
- package/esm/client/4_callback_query_manager.d.ts +9 -8
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +25 -36
- package/esm/client/4_chat_list_manager.d.ts +20 -11
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +214 -444
- package/esm/client/4_chat_manager.d.ts +86 -0
- package/esm/client/4_chat_manager.d.ts.map +1 -0
- package/esm/client/4_chat_manager.js +478 -0
- package/esm/client/4_checklist_manager.d.ts +38 -0
- package/esm/client/4_checklist_manager.d.ts.map +1 -0
- package/esm/client/4_checklist_manager.js +68 -0
- package/esm/client/4_context.d.ts +691 -0
- package/esm/client/4_context.d.ts.map +1 -0
- package/esm/client/4_context.js +1406 -0
- package/esm/client/4_forum_manager.d.ts +40 -0
- package/esm/client/4_forum_manager.d.ts.map +1 -0
- package/esm/client/4_forum_manager.js +128 -0
- package/esm/client/4_gift_manager.d.ts +39 -0
- package/esm/client/4_gift_manager.d.ts.map +1 -0
- package/esm/client/4_gift_manager.js +84 -0
- package/esm/client/4_inline_query_manager.d.ts +10 -9
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +25 -37
- package/esm/client/4_link_preview_manager.d.ts +39 -0
- package/esm/client/4_link_preview_manager.d.ts.map +1 -0
- package/esm/client/4_link_preview_manager.js +51 -0
- package/esm/client/4_poll_manager.d.ts +39 -0
- package/esm/client/4_poll_manager.d.ts.map +1 -0
- package/esm/client/4_poll_manager.js +105 -0
- package/esm/client/4_story_manager.d.ts +11 -10
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +52 -64
- package/esm/client/5_composer.d.ts +51 -0
- package/esm/client/5_composer.d.ts.map +1 -0
- package/esm/client/5_composer.js +106 -0
- package/esm/client/6_client.d.ts +1952 -0
- package/esm/client/6_client.d.ts.map +1 -0
- package/esm/client/6_client.js +3409 -0
- package/esm/client/6_client_dispatcher.d.ts +1917 -0
- package/esm/client/6_client_dispatcher.d.ts.map +1 -0
- package/esm/client/6_client_dispatcher.js +2476 -0
- package/esm/client/7_client_worker.d.ts +27 -0
- package/esm/client/7_client_worker.d.ts.map +1 -0
- package/esm/client/7_client_worker.js +76 -0
- package/esm/connection/0_connection.d.ts +9 -8
- package/esm/connection/0_connection.d.ts.map +1 -1
- package/esm/connection/0_connection.js +1 -1
- package/esm/connection/1_connection_tcp.d.ts +4 -5
- package/esm/connection/1_connection_tcp.d.ts.map +1 -1
- package/esm/connection/1_connection_tcp.js +63 -91
- package/esm/connection/1_connection_web_socket.d.ts +3 -3
- package/esm/connection/1_connection_web_socket.d.ts.map +1 -1
- package/esm/connection/1_connection_web_socket.js +79 -98
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts +18 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js +63 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts +3 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts.map +1 -0
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +293 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +17 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +25 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.js +194 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +37 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.js +61 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts +19 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.js +20 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts +2 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/_util.js +6 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +107 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/abortable.js +46 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +37 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/deadline.js +41 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +44 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/debounce.js +57 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/delay.d.ts +45 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/delay.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/delay.js +84 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts +22 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mod.js +23 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +111 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +154 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/pool.d.ts +33 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/pool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/pool.js +99 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts +155 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/retry.js +147 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts +43 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.2.0/tee.js +79 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts +9 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.js +2 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +21 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.js +32 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts +22 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.js +82 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts +24 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.js +34 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts +12 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.js +69 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts +155 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.js +188 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts +111 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.js +82 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts +19 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.js +537 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts +265 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.js +266 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/format.d.ts +70 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.7/format.js +66 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +51 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.js +113 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +13 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +2 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.js +82 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +87 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +80 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.js +116 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.js +276 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.js +182 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts +29 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.js +70 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.js +207 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts +25 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.js +3 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/_constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/_constants.js +4 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/iterate_reader.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/iterate_reader.js +96 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.225.3/types.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
- package/esm/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.js +35 -0
- package/esm/mod.d.ts +2 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -2
- package/esm/session/0_session_error.d.ts +24 -0
- package/esm/session/0_session_error.d.ts.map +1 -0
- package/esm/session/0_session_error.js +25 -0
- package/esm/session/0_session_state.d.ts +28 -0
- package/esm/session/0_session_state.d.ts.map +1 -0
- package/esm/session/0_session_state.js +51 -0
- package/esm/session/1_session.d.ts +51 -0
- package/esm/session/1_session.d.ts.map +1 -0
- package/esm/session/1_session.js +124 -0
- package/esm/session/2_session_encrypted.d.ts +41 -0
- package/esm/session/2_session_encrypted.d.ts.map +1 -0
- package/esm/session/2_session_encrypted.js +509 -0
- package/esm/session/2_session_plain.d.ts +25 -0
- package/esm/session/2_session_plain.d.ts.map +1 -0
- package/esm/session/2_session_plain.js +56 -0
- package/esm/storage/0_storage.d.ts +3 -2
- package/esm/storage/0_storage.d.ts.map +1 -1
- package/esm/storage/0_storage.js +1 -1
- package/esm/storage/1_utilities.d.ts +15 -11
- package/esm/storage/1_utilities.d.ts.map +1 -1
- package/esm/storage/1_utilities.js +33 -41
- package/esm/storage/2_storage_indexed_db.d.ts +3 -2
- package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +33 -48
- package/esm/storage/2_storage_local_storage.d.ts +3 -2
- package/esm/storage/2_storage_local_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.js +10 -20
- package/esm/storage/2_storage_memory.d.ts +4 -3
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +30 -44
- package/esm/storage/2_storage_session_storage.d.ts +4 -3
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +10 -20
- package/esm/tl/0_types.d.ts +25 -0
- package/esm/tl/0_types.d.ts.map +1 -0
- package/esm/tl/0_types.js +20 -0
- package/esm/tl/0_utilities.d.ts +34 -0
- package/esm/tl/0_utilities.d.ts.map +1 -0
- package/esm/tl/0_utilities.js +79 -0
- package/esm/tl/1_mtproto_api.d.ts +371 -0
- package/esm/tl/1_mtproto_api.d.ts.map +1 -0
- package/esm/tl/1_mtproto_api.js +416 -0
- package/esm/tl/1_telegram_api.d.ts +19410 -0
- package/esm/tl/1_telegram_api.d.ts.map +1 -0
- package/esm/tl/1_telegram_api.js +22386 -0
- package/esm/tl/1_tl_reader.d.ts +39 -0
- package/esm/tl/1_tl_reader.d.ts.map +1 -0
- package/esm/tl/1_tl_reader.js +220 -0
- package/esm/tl/1_tl_writer.d.ts +37 -0
- package/esm/tl/1_tl_writer.d.ts.map +1 -0
- package/esm/tl/1_tl_writer.js +269 -0
- package/esm/tl/1_utilities.d.ts +9 -14
- package/esm/tl/1_utilities.d.ts.map +1 -1
- package/esm/tl/1_utilities.js +21 -40
- package/esm/tl/2_message.d.ts +36 -0
- package/esm/tl/2_message.d.ts.map +1 -0
- package/esm/tl/2_message.js +73 -0
- package/esm/tl/2_mtproto.d.ts +33 -0
- package/esm/tl/2_mtproto.d.ts.map +1 -0
- package/esm/tl/2_mtproto.js +53 -0
- package/esm/tl/2_telegram.d.ts +49 -0
- package/esm/tl/2_telegram.d.ts.map +1 -0
- package/esm/tl/2_telegram.js +135 -0
- package/esm/transport/0_obfuscation.d.ts +2 -2
- package/esm/transport/0_obfuscation.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.js +10 -9
- package/esm/transport/0_transport.d.ts +4 -6
- package/esm/transport/0_transport.d.ts.map +1 -1
- package/esm/transport/0_transport.js +11 -19
- package/esm/transport/1_transport_abridged.d.ts +2 -4
- package/esm/transport/1_transport_abridged.d.ts.map +1 -1
- package/esm/transport/1_transport_abridged.js +22 -52
- package/esm/transport/1_transport_intermediate.d.ts +2 -4
- package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
- package/esm/transport/1_transport_intermediate.js +16 -48
- package/esm/transport/1_transport_provider.d.ts +35 -0
- package/esm/transport/1_transport_provider.d.ts.map +1 -0
- package/esm/transport/1_transport_provider.js +81 -0
- package/esm/transport/2_transport_provider_tcp.d.ts +25 -0
- package/esm/transport/2_transport_provider_tcp.d.ts.map +1 -0
- package/esm/transport/2_transport_provider_tcp.js +29 -0
- package/esm/transport/2_transport_provider_web_socket.d.ts +24 -0
- package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -0
- package/esm/transport/2_transport_provider_web_socket.js +43 -0
- package/esm/types/0_authorization_state.d.ts +2 -2
- package/esm/types/0_authorization_state.d.ts.map +1 -1
- package/esm/types/0_authorization_state.js +1 -1
- package/esm/types/0_birthday.d.ts +3 -2
- package/esm/types/0_birthday.d.ts.map +1 -1
- package/esm/types/0_birthday.js +9 -1
- package/esm/types/0_bot_command.d.ts +1 -1
- package/esm/types/0_bot_command.js +1 -1
- package/esm/types/0_bot_token_check_result.d.ts +31 -0
- package/esm/types/0_bot_token_check_result.d.ts.map +1 -0
- package/esm/types/0_bot_token_check_result.js +20 -0
- package/esm/types/0_button_style.d.ts +28 -0
- package/esm/types/0_button_style.d.ts.map +1 -0
- package/esm/types/0_button_style.js +36 -0
- package/esm/types/0_callback_query_answer.d.ts +3 -3
- package/esm/types/0_callback_query_answer.d.ts.map +1 -1
- package/esm/types/0_callback_query_answer.js +2 -2
- package/esm/types/0_callback_query_question.d.ts +1 -1
- package/esm/types/0_callback_query_question.js +3 -3
- package/esm/types/0_chat_action.d.ts +1 -1
- package/esm/types/0_chat_action.js +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +17 -7
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.js +31 -16
- package/esm/types/0_chat_folder.d.ts +29 -0
- package/esm/types/0_chat_folder.d.ts.map +1 -0
- package/esm/types/0_chat_folder.js +25 -0
- package/esm/types/0_chat_member_rights.d.ts +3 -3
- package/esm/types/0_chat_member_rights.d.ts.map +1 -1
- package/esm/types/0_chat_member_rights.js +21 -21
- package/esm/types/0_chat_photo.d.ts +2 -2
- package/esm/types/0_chat_photo.d.ts.map +1 -1
- package/esm/types/0_chat_photo.js +5 -5
- package/esm/types/0_checklist_changed.d.ts +29 -0
- package/esm/types/0_checklist_changed.d.ts.map +1 -0
- package/esm/types/0_checklist_changed.js +25 -0
- package/esm/types/0_code_check_result.d.ts +47 -0
- package/esm/types/0_code_check_result.d.ts.map +1 -0
- package/esm/types/0_code_check_result.js +20 -0
- package/esm/types/0_connection_state.d.ts +1 -1
- package/esm/types/0_connection_state.js +1 -1
- package/esm/types/0_contact.d.ts +2 -2
- package/esm/types/0_contact.d.ts.map +1 -1
- package/esm/types/0_contact.js +1 -1
- package/esm/types/0_dice.d.ts +2 -2
- package/esm/types/0_dice.d.ts.map +1 -1
- package/esm/types/0_dice.js +1 -1
- package/esm/types/0_emoji_status.d.ts +48 -0
- package/esm/types/0_emoji_status.d.ts.map +1 -0
- package/esm/types/0_emoji_status.js +33 -0
- package/esm/types/0_failed_invitation.d.ts +8 -4
- package/esm/types/0_failed_invitation.d.ts.map +1 -1
- package/esm/types/0_failed_invitation.js +3 -3
- package/esm/types/0_file_source.d.ts +2 -2
- package/esm/types/0_file_source.d.ts.map +1 -1
- package/esm/types/0_file_source.js +1 -1
- package/esm/types/0_gift_component_rarity.d.ts +50 -0
- package/esm/types/0_gift_component_rarity.d.ts.map +1 -0
- package/esm/types/0_gift_component_rarity.js +43 -0
- package/esm/types/0_gift_value.d.ts +25 -0
- package/esm/types/0_gift_value.d.ts.map +1 -0
- package/esm/types/0_gift_value.js +20 -0
- package/esm/types/0_giveaway_parameters.d.ts +2 -2
- package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.js +5 -6
- package/esm/types/0_id.d.ts +1 -1
- package/esm/types/0_id.js +1 -1
- package/esm/types/0_input_emoji_status.d.ts +36 -0
- package/esm/types/0_input_emoji_status.d.ts.map +1 -0
- package/esm/types/0_input_emoji_status.js +20 -0
- package/esm/types/0_invoice.d.ts +3 -2
- package/esm/types/0_invoice.d.ts.map +1 -1
- package/esm/types/0_invoice.js +1 -1
- package/esm/types/0_keyboard_button_poll_type.d.ts +1 -1
- package/esm/types/0_keyboard_button_poll_type.js +1 -1
- package/esm/types/0_link_preview_media_size.d.ts +22 -0
- package/esm/types/0_link_preview_media_size.d.ts.map +1 -0
- package/esm/types/0_link_preview_media_size.js +20 -0
- package/esm/types/0_live_stream_channel.d.ts +2 -2
- package/esm/types/0_live_stream_channel.d.ts.map +1 -1
- package/esm/types/0_live_stream_channel.js +1 -1
- package/esm/types/0_location.d.ts +1 -1
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_location.js +6 -6
- package/esm/types/0_login_url.d.ts +1 -1
- package/esm/types/0_login_url.js +1 -1
- package/esm/types/0_mask_position.d.ts +2 -2
- package/esm/types/0_mask_position.d.ts.map +1 -1
- package/esm/types/0_mask_position.js +2 -2
- package/esm/types/0_message_reference.d.ts +1 -1
- package/esm/types/0_message_reference.js +1 -1
- package/esm/types/0_message_search_filter.d.ts +3 -2
- package/esm/types/0_message_search_filter.d.ts.map +1 -1
- package/esm/types/0_message_search_filter.js +1 -1
- package/esm/types/0_mini_app_button_info.d.ts +26 -0
- package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
- package/esm/types/0_mini_app_button_info.js +22 -0
- package/esm/types/0_mini_app_mode.d.ts +22 -0
- package/esm/types/0_mini_app_mode.d.ts.map +1 -0
- package/esm/types/0_mini_app_mode.js +20 -0
- package/esm/types/0_network_statistics_entry.d.ts +1 -1
- package/esm/types/0_network_statistics_entry.js +1 -1
- package/esm/types/0_parse_mode.d.ts +1 -1
- package/esm/types/0_parse_mode.js +1 -1
- package/esm/types/0_password_check_result.d.ts +39 -0
- package/esm/types/0_password_check_result.d.ts.map +1 -0
- package/esm/types/0_password_check_result.js +20 -0
- package/esm/types/0_price_tag.d.ts +1 -1
- package/esm/types/0_price_tag.js +1 -1
- package/esm/types/0_reaction.d.ts +4 -1
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_reaction.js +10 -10
- package/esm/types/0_refunded_payment.d.ts +2 -2
- package/esm/types/0_refunded_payment.d.ts.map +1 -1
- package/esm/types/0_refunded_payment.js +3 -3
- package/esm/types/0_restriction_reason.d.ts +2 -2
- package/esm/types/0_restriction_reason.d.ts.map +1 -1
- package/esm/types/0_restriction_reason.js +1 -1
- package/esm/types/0_self_destruct_option.d.ts +11 -3
- package/esm/types/0_self_destruct_option.d.ts.map +1 -1
- package/esm/types/0_self_destruct_option.js +12 -3
- package/esm/types/0_shipping_address.d.ts +2 -2
- package/esm/types/0_shipping_address.d.ts.map +1 -1
- package/esm/types/0_shipping_address.js +1 -1
- package/esm/types/0_slow_mode_duration.d.ts +23 -0
- package/esm/types/0_slow_mode_duration.d.ts.map +1 -0
- package/esm/types/0_slow_mode_duration.js +28 -0
- package/esm/types/0_story_reference.d.ts +1 -1
- package/esm/types/0_story_reference.js +1 -1
- package/esm/types/0_switch_inline_query_chosen_chats.d.ts +20 -0
- package/esm/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
- package/esm/types/0_switch_inline_query_chosen_chats.js +19 -0
- package/esm/types/0_thumbnail.d.ts +1 -1
- package/esm/types/0_thumbnail.d.ts.map +1 -1
- package/esm/types/0_thumbnail.js +4 -4
- package/esm/types/0_translation.d.ts +32 -0
- package/esm/types/0_translation.d.ts.map +1 -0
- package/esm/types/0_translation.js +45 -0
- package/esm/types/0_upload_progress.d.ts +29 -0
- package/esm/types/0_upload_progress.d.ts.map +1 -0
- package/esm/types/0_upload_progress.js +20 -0
- package/esm/types/0_user_status.d.ts +66 -0
- package/esm/types/0_user_status.d.ts.map +1 -0
- package/esm/types/0_user_status.js +35 -0
- package/esm/types/0_video_chat.d.ts +8 -4
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/0_video_chat.js +7 -8
- package/esm/types/0_voice.d.ts +2 -2
- package/esm/types/0_voice.d.ts.map +1 -1
- package/esm/types/0_voice.js +1 -1
- package/esm/types/0_voice_transcription.d.ts +31 -0
- package/esm/types/0_voice_transcription.d.ts.map +1 -0
- package/esm/types/0_voice_transcription.js +26 -0
- package/esm/types/0_working_hours_interval.d.ts +27 -0
- package/esm/types/0_working_hours_interval.d.ts.map +1 -0
- package/esm/types/0_working_hours_interval.js +20 -0
- package/esm/types/1_animation.d.ts +2 -2
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_animation.js +3 -3
- package/esm/types/1_audio.d.ts +2 -2
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_audio.js +3 -3
- package/esm/types/1_bot_command_scope.d.ts +3 -3
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.js +4 -4
- package/esm/types/1_bot_commands.d.ts +30 -0
- package/esm/types/1_bot_commands.d.ts.map +1 -0
- package/esm/types/1_bot_commands.js +20 -0
- package/esm/types/1_chat_p.d.ts +36 -7
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +43 -17
- package/esm/types/1_document.d.ts +2 -2
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_document.js +3 -3
- package/esm/types/1_giveaway.d.ts +3 -3
- package/esm/types/1_giveaway.d.ts.map +1 -1
- package/esm/types/1_giveaway.js +1 -1
- package/esm/types/1_inline_keyboard_button.d.ts +140 -0
- package/esm/types/1_inline_keyboard_button.d.ts.map +1 -0
- package/esm/types/1_inline_keyboard_button.js +128 -0
- package/esm/types/1_inline_query_result_button.d.ts +3 -3
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_inline_query_result_button.js +1 -1
- package/esm/types/1_input_gift.d.ts +54 -0
- package/esm/types/1_input_gift.d.ts.map +1 -0
- package/esm/types/1_input_gift.js +32 -0
- package/esm/types/1_input_story_content.d.ts +3 -3
- package/esm/types/1_input_story_content.d.ts.map +1 -1
- package/esm/types/1_input_story_content.js +1 -1
- package/esm/types/1_keyboard_button.d.ts +14 -12
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +87 -34
- package/esm/types/1_message_reaction.d.ts +3 -3
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +8 -8
- package/esm/types/1_mini_app_info.d.ts +32 -0
- package/esm/types/1_mini_app_info.d.ts.map +1 -0
- package/esm/types/1_mini_app_info.js +27 -0
- package/esm/types/1_network_statistics.d.ts +2 -2
- package/esm/types/1_network_statistics.d.ts.map +1 -1
- package/esm/types/1_network_statistics.js +1 -1
- package/esm/types/1_order_info.d.ts +8 -3
- package/esm/types/1_order_info.d.ts.map +1 -1
- package/esm/types/1_order_info.js +1 -1
- package/esm/types/1_photo.d.ts +2 -2
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_photo.js +4 -4
- package/esm/types/1_reaction_count.d.ts +3 -3
- package/esm/types/1_reaction_count.d.ts.map +1 -1
- package/esm/types/1_reaction_count.js +1 -1
- package/esm/types/1_sticker.d.ts +6 -5
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +15 -11
- package/esm/types/1_story_reaction.d.ts +4 -4
- package/esm/types/1_story_reaction.d.ts.map +1 -1
- package/esm/types/1_story_reaction.js +2 -2
- package/esm/types/1_venue.d.ts +2 -2
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_venue.js +3 -3
- package/esm/types/1_video.d.ts +2 -2
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video.js +3 -3
- package/esm/types/1_video_note.d.ts +2 -2
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/1_video_note.js +3 -3
- package/esm/types/1_working_hours.d.ts +31 -0
- package/esm/types/1_working_hours.d.ts.map +1 -0
- package/esm/types/1_working_hours.js +33 -0
- package/esm/types/2_chat.d.ts +14 -17
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +23 -28
- package/esm/types/2_chat_member.d.ts +72 -15
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +40 -28
- package/esm/types/2_inactive_chat.d.ts +3 -3
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_inactive_chat.js +4 -5
- package/esm/types/2_message_entity.d.ts +148 -0
- package/esm/types/2_message_entity.d.ts.map +1 -0
- package/esm/types/2_message_entity.js +243 -0
- package/esm/types/2_message_interactions.d.ts +2 -2
- package/esm/types/2_message_interactions.d.ts.map +1 -1
- package/esm/types/2_message_interactions.js +1 -1
- package/esm/types/2_message_reaction_count.d.ts +6 -7
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.js +6 -9
- package/esm/types/2_message_reaction_list_item.d.ts +39 -0
- package/esm/types/2_message_reaction_list_item.d.ts.map +1 -0
- package/esm/types/2_message_reaction_list_item.js +50 -0
- package/esm/types/2_poll_answer.d.ts +32 -0
- package/esm/types/2_poll_answer.d.ts.map +1 -0
- package/esm/types/2_poll_answer.js +35 -0
- package/esm/types/2_reply_markup.d.ts +71 -0
- package/esm/types/2_reply_markup.d.ts.map +1 -0
- package/esm/types/2_reply_markup.js +127 -0
- package/esm/types/2_sticker_set.d.ts +51 -0
- package/esm/types/2_sticker_set.d.ts.map +1 -0
- package/esm/types/2_sticker_set.js +91 -0
- package/esm/types/2_story_content.d.ts +3 -3
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_content.js +7 -7
- package/esm/types/2_story_interactions.d.ts +3 -3
- package/esm/types/2_story_interactions.d.ts.map +1 -1
- package/esm/types/2_story_interactions.js +1 -1
- package/esm/types/2_story_interactive_area.d.ts +9 -9
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +16 -15
- package/esm/types/2_story_privacy.d.ts +46 -0
- package/esm/types/2_story_privacy.d.ts.map +1 -0
- package/esm/types/2_story_privacy.js +76 -0
- package/esm/types/2_successful_payment.d.ts +11 -3
- package/esm/types/2_successful_payment.d.ts.map +1 -1
- package/esm/types/2_successful_payment.js +3 -3
- package/esm/types/2_user.d.ts +73 -0
- package/esm/types/2_user.d.ts.map +1 -0
- package/esm/types/2_user.js +82 -0
- package/esm/types/3_business_connection.d.ts +37 -0
- package/esm/types/3_business_connection.d.ts.map +1 -0
- package/esm/types/3_business_connection.js +36 -0
- package/esm/types/3_chat_settings.d.ts +47 -0
- package/esm/types/3_chat_settings.d.ts.map +1 -0
- package/esm/types/3_chat_settings.js +51 -0
- package/esm/types/3_checklist_item.d.ts +65 -0
- package/esm/types/3_checklist_item.d.ts.map +1 -0
- package/esm/types/3_checklist_item.js +51 -0
- package/esm/types/3_chosen_inline_result.d.ts +38 -0
- package/esm/types/3_chosen_inline_result.d.ts.map +1 -0
- package/esm/types/3_chosen_inline_result.js +37 -0
- package/esm/types/3_forward_header.d.ts +77 -0
- package/esm/types/3_forward_header.d.ts.map +1 -0
- package/esm/types/3_forward_header.js +73 -0
- package/esm/types/3_game.d.ts +40 -0
- package/esm/types/3_game.d.ts.map +1 -0
- package/esm/types/3_game.js +44 -0
- package/esm/types/3_gift_upgraded_component.d.ts +96 -0
- package/esm/types/3_gift_upgraded_component.d.ts.map +1 -0
- package/esm/types/3_gift_upgraded_component.js +88 -0
- package/esm/types/3_inline_query.d.ts +40 -0
- package/esm/types/3_inline_query.d.ts.map +1 -0
- package/esm/types/3_inline_query.js +60 -0
- package/esm/types/3_input_checklist_item.d.ts +31 -0
- package/esm/types/3_input_checklist_item.d.ts.map +1 -0
- package/esm/types/3_input_checklist_item.js +20 -0
- package/esm/types/3_input_media.d.ts +123 -0
- package/esm/types/3_input_media.d.ts.map +1 -0
- package/esm/types/3_input_media.js +20 -0
- package/esm/types/3_input_poll_option.d.ts +31 -0
- package/esm/types/3_input_poll_option.d.ts.map +1 -0
- package/esm/types/3_input_poll_option.js +20 -0
- package/esm/types/3_invite_link.d.ts +47 -0
- package/esm/types/3_invite_link.d.ts.map +1 -0
- package/esm/types/3_invite_link.js +48 -0
- package/esm/types/3_message_reaction_list.d.ts +32 -0
- package/esm/types/3_message_reaction_list.d.ts.map +1 -0
- package/esm/types/3_message_reaction_list.js +31 -0
- package/esm/types/3_message_reactions.d.ts +42 -0
- package/esm/types/3_message_reactions.d.ts.map +1 -0
- package/esm/types/3_message_reactions.js +54 -0
- package/esm/types/3_poll_option.d.ts +34 -0
- package/esm/types/3_poll_option.d.ts.map +1 -0
- package/esm/types/3_poll_option.js +29 -0
- package/esm/types/3_pre_checkout_query.d.ts +42 -0
- package/esm/types/3_pre_checkout_query.d.ts.map +1 -0
- package/esm/types/3_pre_checkout_query.js +39 -0
- package/esm/types/3_reply_quote.d.ts +32 -0
- package/esm/types/3_reply_quote.d.ts.map +1 -0
- package/esm/types/3_reply_quote.js +30 -0
- package/esm/types/3_story.d.ts +13 -14
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/3_story.js +13 -14
- package/esm/types/4_chat_member_updated.d.ts +43 -0
- package/esm/types/4_chat_member_updated.d.ts.map +1 -0
- package/esm/types/4_chat_member_updated.js +52 -0
- package/esm/types/4_checklist.d.ts +38 -0
- package/esm/types/4_checklist.d.ts.map +1 -0
- package/esm/types/4_checklist.js +31 -0
- package/esm/types/4_gift.d.ts +100 -0
- package/esm/types/4_gift.d.ts.map +1 -0
- package/esm/types/4_gift.js +112 -0
- package/esm/types/4_join_request.d.ts +39 -0
- package/esm/types/4_join_request.d.ts.map +1 -0
- package/esm/types/4_join_request.js +62 -0
- package/esm/types/4_poll.d.ts +55 -0
- package/esm/types/4_poll.d.ts.map +1 -0
- package/esm/types/4_poll.js +43 -0
- package/esm/types/4_reply_to.d.ts +51 -0
- package/esm/types/4_reply_to.d.ts.map +1 -0
- package/esm/types/4_reply_to.js +20 -0
- package/esm/types/5_claimed_gift.d.ts +44 -0
- package/esm/types/5_claimed_gift.d.ts.map +1 -0
- package/esm/types/5_claimed_gift.js +43 -0
- package/esm/types/5_gift_non_upgraded_information.d.ts +47 -0
- package/esm/types/5_gift_non_upgraded_information.d.ts.map +1 -0
- package/esm/types/5_gift_non_upgraded_information.js +69 -0
- package/esm/types/5_gift_upgraded_information.d.ts +41 -0
- package/esm/types/5_gift_upgraded_information.d.ts.map +1 -0
- package/esm/types/5_gift_upgraded_information.js +58 -0
- package/esm/types/5_link_preview.d.ts +186 -0
- package/esm/types/5_link_preview.d.ts.map +1 -0
- package/esm/types/5_link_preview.js +205 -0
- package/esm/types/6_claimed_gifts.d.ts +33 -0
- package/esm/types/6_claimed_gifts.d.ts.map +1 -0
- package/esm/types/6_claimed_gifts.js +43 -0
- package/esm/types/6_message.d.ts +704 -0
- package/esm/types/6_message.d.ts.map +1 -0
- package/esm/types/6_message.js +553 -0
- package/esm/types/6_message_content.d.ts +124 -0
- package/esm/types/6_message_content.d.ts.map +1 -0
- package/esm/types/6_message_content.js +20 -0
- package/esm/types/7_callback_query.d.ts +43 -0
- package/esm/types/7_callback_query.d.ts.map +1 -0
- package/esm/types/7_callback_query.js +59 -0
- package/esm/types/7_chat_list_item.d.ts +43 -0
- package/esm/types/7_chat_list_item.d.ts.map +1 -0
- package/esm/types/7_chat_list_item.js +57 -0
- package/esm/types/7_inline_query_result.d.ts +251 -0
- package/esm/types/7_inline_query_result.d.ts.map +1 -0
- package/esm/types/7_inline_query_result.js +380 -0
- package/esm/types/7_message_list.d.ts +28 -0
- package/esm/types/7_message_list.d.ts.map +1 -0
- package/esm/types/7_message_list.js +20 -0
- package/esm/types/7_saved_chat.d.ts +35 -0
- package/esm/types/7_saved_chat.d.ts.map +1 -0
- package/esm/types/7_saved_chat.js +42 -0
- package/esm/types/7_topic.d.ts +44 -0
- package/esm/types/7_topic.d.ts.map +1 -0
- package/esm/types/7_topic.js +61 -0
- package/esm/types/8_inline_query_answer.d.ts +32 -0
- package/esm/types/8_inline_query_answer.d.ts.map +1 -0
- package/esm/types/8_inline_query_answer.js +28 -0
- package/esm/types/8_saved_chats.d.ts +33 -0
- package/esm/types/8_saved_chats.d.ts.map +1 -0
- package/esm/types/8_saved_chats.js +36 -0
- package/esm/types/8_update.d.ts +583 -0
- package/esm/types/8_update.d.ts.map +1 -0
- package/esm/types/8_update.js +20 -0
- package/esm/types/_file_id.d.ts +64 -51
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +96 -77
- package/esm/types/_getters.d.ts +4 -11
- package/esm/types/_getters.d.ts.map +1 -1
- package/esm/types/_getters.js +1 -1
- package/esm/utilities/0_color.d.ts +1 -1
- package/esm/utilities/0_color.js +1 -1
- package/esm/utilities/0_env.d.ts.map +1 -1
- package/esm/utilities/0_env.js +20 -1
- package/esm/utilities/0_gzip.d.ts +22 -0
- package/esm/utilities/0_gzip.d.ts.map +1 -0
- package/esm/utilities/0_gzip.js +42 -0
- package/esm/utilities/0_hash.d.ts +3 -3
- package/esm/utilities/0_hash.d.ts.map +1 -1
- package/esm/utilities/0_hash.js +1 -1
- package/esm/utilities/0_int.d.ts +71 -0
- package/esm/utilities/0_int.d.ts.map +1 -0
- package/esm/utilities/0_int.js +140 -0
- package/esm/utilities/0_misc.d.ts +29 -0
- package/esm/utilities/0_misc.d.ts.map +1 -0
- package/esm/utilities/0_misc.js +84 -0
- package/esm/utilities/0_mutex.d.ts +1 -1
- package/esm/utilities/0_mutex.js +5 -20
- package/esm/utilities/0_object.d.ts +1 -1
- package/esm/utilities/0_object.js +1 -1
- package/esm/utilities/0_part_stream.d.ts +4 -4
- package/esm/utilities/0_part_stream.d.ts.map +1 -1
- package/esm/utilities/0_part_stream.js +13 -27
- package/esm/utilities/0_rle.d.ts +3 -3
- package/esm/utilities/0_rle.d.ts.map +1 -1
- package/esm/utilities/0_rle.js +2 -2
- package/esm/utilities/0_text.d.ts +22 -0
- package/esm/utilities/0_text.d.ts.map +1 -0
- package/esm/utilities/0_text.js +27 -0
- package/esm/utilities/0_types.d.ts +1 -1
- package/esm/utilities/0_types.js +1 -1
- package/esm/utilities/0_units.d.ts +1 -4
- package/esm/utilities/0_units.d.ts.map +1 -1
- package/esm/utilities/0_units.js +1 -4
- package/esm/utilities/1_auth.d.ts +2 -2
- package/esm/utilities/1_auth.d.ts.map +1 -1
- package/esm/utilities/1_auth.js +5 -6
- package/esm/utilities/1_base64.d.ts +3 -3
- package/esm/utilities/1_base64.d.ts.map +1 -1
- package/esm/utilities/1_base64.js +3 -3
- package/esm/utilities/1_crypto.d.ts +30 -0
- package/esm/utilities/1_crypto.d.ts.map +1 -0
- package/esm/utilities/1_crypto.js +79 -0
- package/esm/utilities/1_logger.d.ts +3 -3
- package/esm/utilities/1_logger.d.ts.map +1 -1
- package/esm/utilities/1_logger.js +5 -4
- package/esm/utilities/1_math.d.ts +1 -1
- package/esm/utilities/1_math.js +4 -4
- package/esm/utilities/2_queue.d.ts +2 -2
- package/esm/utilities/2_queue.d.ts.map +1 -1
- package/esm/utilities/2_queue.js +33 -47
- package/package.json +2 -5
- package/script/0_deps.d.ts +23 -13
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +47 -41
- package/script/0_errors.d.ts +9 -2
- package/script/0_errors.d.ts.map +1 -1
- package/script/0_errors.js +21 -8
- package/script/1_utilities.d.ts +6 -7
- package/script/1_utilities.d.ts.map +1 -1
- package/script/1_utilities.js +6 -7
- package/script/2_connection.d.ts +1 -1
- package/script/2_connection.js +1 -1
- package/script/2_storage.d.ts +1 -1
- package/script/2_storage.js +1 -1
- package/script/2_tl.d.ts +7 -10
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +25 -19
- package/script/3_errors.d.ts +8 -3
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +16 -17
- package/script/3_transport.d.ts +4 -4
- package/script/3_transport.js +4 -4
- package/script/3_types.d.ts +74 -34
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +74 -34
- package/script/4_constants.d.ts +21 -2
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_constants.js +6 -29
- package/script/4_errors.d.ts +4 -4
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_errors.js +3 -13
- package/script/4_session.d.ts +24 -0
- package/script/4_session.d.ts.map +1 -0
- package/script/4_session.js +39 -0
- package/script/5_client.d.ts +9 -3
- package/script/5_client.d.ts.map +1 -1
- package/script/5_client.js +9 -3
- package/script/_dnt.polyfills.d.ts +20 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +120 -0
- package/script/_dnt.shims.d.ts +0 -1
- package/script/_dnt.shims.d.ts.map +1 -1
- package/script/client/0_abortable_loop.d.ts +27 -0
- package/script/client/0_abortable_loop.d.ts.map +1 -0
- package/script/client/0_abortable_loop.js +60 -0
- package/script/client/0_client_abstract.d.ts +31 -28
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +23 -115
- package/script/client/0_html.d.ts +4 -3
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +413 -74
- package/script/client/0_markdown.d.ts +2 -2
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +39 -19
- package/script/client/0_params.d.ts +324 -41
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_params.js +1 -1
- package/script/client/0_password.d.ts +6 -6
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +11 -11
- package/script/client/0_storage_operations.d.ts +81 -69
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +393 -311
- package/script/client/0_update_processor.d.ts +26 -0
- package/script/client/0_update_processor.d.ts.map +1 -0
- package/script/client/0_update_processor.js +21 -0
- package/script/client/0_utilities.d.ts +10 -5
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +47 -32
- package/script/client/0_worker_error.d.ts +26 -0
- package/script/client/0_worker_error.d.ts.map +1 -0
- package/script/client/0_worker_error.js +90 -0
- package/script/client/0_worker_request.d.ts +27 -0
- package/script/client/0_worker_request.d.ts.map +1 -0
- package/script/client/0_worker_request.js +21 -0
- package/script/client/1_client_generic.d.ts +1846 -0
- package/script/client/1_client_generic.d.ts.map +1 -0
- package/script/client/1_client_generic.js +28 -0
- package/script/client/1_client_plain.d.ts +12 -9
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +34 -63
- package/script/client/1_invoke_middleware.d.ts +32 -0
- package/script/client/1_invoke_middleware.d.ts.map +1 -0
- package/script/client/1_invoke_middleware.js +25 -0
- package/script/client/1_types.d.ts +17 -32
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/1_types.js +1 -1
- package/script/client/1_worker_response.d.ts +37 -0
- package/script/client/1_worker_response.d.ts.map +1 -0
- package/script/client/1_worker_response.js +21 -0
- package/script/client/2_account_manager.d.ts +43 -5
- package/script/client/2_account_manager.d.ts.map +1 -1
- package/script/client/2_account_manager.js +367 -47
- package/script/client/2_bot_info_manager.d.ts +12 -5
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.js +41 -39
- package/script/client/2_business_connection_manager.d.ts +6 -5
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +15 -28
- package/script/client/2_client_encrypted.d.ts +58 -0
- package/script/client/2_client_encrypted.d.ts.map +1 -0
- package/script/client/2_client_encrypted.js +277 -0
- package/script/client/2_file_manager.d.ts +27 -7
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +363 -348
- package/script/client/2_network_statistics_manager.d.ts +5 -5
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_network_statistics_manager.js +40 -27
- package/script/client/2_payment_manager.d.ts +8 -7
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +12 -25
- package/script/client/2_reaction_manager.d.ts +6 -5
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +18 -31
- package/script/client/2_sign_in.d.ts +25 -0
- package/script/client/2_sign_in.d.ts.map +1 -0
- package/script/client/2_sign_in.js +118 -0
- package/script/client/2_translations_manager.d.ts +35 -0
- package/script/client/2_translations_manager.d.ts.map +1 -0
- package/script/client/2_translations_manager.js +165 -0
- package/script/client/2_update_manager.d.ts +11 -8
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +838 -775
- package/script/client/3_client_encrypted_pool.d.ts +29 -0
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/script/client/3_client_encrypted_pool.js +51 -0
- package/script/client/3_filters.d.ts +96 -0
- package/script/client/3_filters.d.ts.map +1 -0
- package/script/client/3_filters.js +55 -0
- package/script/client/3_message_manager.d.ts +30 -35
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +1078 -785
- package/script/client/3_video_chat_manager.d.ts +11 -10
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +85 -93
- package/script/client/4_callback_query_manager.d.ts +9 -8
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +24 -35
- package/script/client/4_chat_list_manager.d.ts +20 -11
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +212 -442
- package/script/client/4_chat_manager.d.ts +86 -0
- package/script/client/4_chat_manager.d.ts.map +1 -0
- package/script/client/4_chat_manager.js +482 -0
- package/script/client/4_checklist_manager.d.ts +38 -0
- package/script/client/4_checklist_manager.d.ts.map +1 -0
- package/script/client/4_checklist_manager.js +72 -0
- package/script/client/4_context.d.ts +691 -0
- package/script/client/4_context.d.ts.map +1 -0
- package/script/client/4_context.js +1410 -0
- package/script/client/4_forum_manager.d.ts +40 -0
- package/script/client/4_forum_manager.d.ts.map +1 -0
- package/script/client/4_forum_manager.js +132 -0
- package/script/client/4_gift_manager.d.ts +39 -0
- package/script/client/4_gift_manager.d.ts.map +1 -0
- package/script/client/4_gift_manager.js +88 -0
- package/script/client/4_inline_query_manager.d.ts +10 -9
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +23 -35
- package/script/client/4_link_preview_manager.d.ts +39 -0
- package/script/client/4_link_preview_manager.d.ts.map +1 -0
- package/script/client/4_link_preview_manager.js +55 -0
- package/script/client/4_poll_manager.d.ts +39 -0
- package/script/client/4_poll_manager.d.ts.map +1 -0
- package/script/client/4_poll_manager.js +109 -0
- package/script/client/4_story_manager.d.ts +11 -10
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +51 -63
- package/script/client/5_composer.d.ts +51 -0
- package/script/client/5_composer.d.ts.map +1 -0
- package/script/client/5_composer.js +113 -0
- package/script/client/6_client.d.ts +1952 -0
- package/script/client/6_client.d.ts.map +1 -0
- package/script/client/6_client.js +3414 -0
- package/script/client/6_client_dispatcher.d.ts +1917 -0
- package/script/client/6_client_dispatcher.d.ts.map +1 -0
- package/script/client/6_client_dispatcher.js +2480 -0
- package/script/client/7_client_worker.d.ts +27 -0
- package/script/client/7_client_worker.d.ts.map +1 -0
- package/script/client/7_client_worker.js +80 -0
- package/script/connection/0_connection.d.ts +9 -8
- package/script/connection/0_connection.d.ts.map +1 -1
- package/script/connection/0_connection.js +1 -1
- package/script/connection/1_connection_tcp.d.ts +4 -5
- package/script/connection/1_connection_tcp.d.ts.map +1 -1
- package/script/connection/1_connection_tcp.js +65 -116
- package/script/connection/1_connection_web_socket.d.ts +3 -3
- package/script/connection/1_connection_web_socket.d.ts.map +1 -1
- package/script/connection/1_connection_web_socket.js +79 -98
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts +18 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js +71 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts +3 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts.map +1 -0
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +295 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +17 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assert.js +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equal.js +230 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +37 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/equals.js +64 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/false.d.ts +19 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/false.js +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.19/unreachable.js +23 -0
- package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts +2 -0
- package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/_util.js +9 -0
- package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +107 -0
- package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/abortable.js +49 -0
- package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +37 -0
- package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/deadline.js +44 -0
- package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +44 -0
- package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/debounce.js +60 -0
- package/script/deps/jsr.io/@std/async/1.2.0/delay.d.ts +45 -0
- package/script/deps/jsr.io/@std/async/1.2.0/delay.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/delay.js +87 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts +22 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mod.js +39 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +111 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +158 -0
- package/script/deps/jsr.io/@std/async/1.2.0/pool.d.ts +33 -0
- package/script/deps/jsr.io/@std/async/1.2.0/pool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/pool.js +102 -0
- package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts +155 -0
- package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/retry.js +152 -0
- package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts +43 -0
- package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.2.0/tee.js +82 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts +9 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/_types.js +3 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +21 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/concat.js +35 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts +22 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/equals.js +85 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts +24 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.js +37 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts +12 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.js +72 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts +155 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.js +192 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts +111 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.2/memoize.js +85 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts +19 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.js +541 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts +265 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/constants.js +269 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/format.d.ts +70 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/datetime/0.225.7/format.js +69 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.js +57 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.js +119 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +16 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/_types.js +3 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/base64.js +86 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.10/hex.js +91 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.js +48 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +80 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.js +121 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.js +283 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.js +188 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts +29 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/format.js +106 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.js +8 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.js +252 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts +25 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/types.js +4 -0
- package/script/deps/jsr.io/@std/io/0.225.3/_constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.225.3/_constants.js +7 -0
- package/script/deps/jsr.io/@std/io/0.225.3/iterate_reader.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.225.3/iterate_reader.js +100 -0
- package/script/deps/jsr.io/@std/io/0.225.3/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.225.3/types.js +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +10 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.js +45 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.js +49 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +12 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +80 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.js +38 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.js +32 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.js +55 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.js +96 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +24 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +26 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.js +48 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +61 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +30 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.js +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.js +50 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.js +85 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +33 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +41 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.js +80 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +138 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +37 -0
- package/script/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.js +38 -0
- package/script/mod.d.ts +2 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +19 -10
- package/script/session/0_session_error.d.ts +24 -0
- package/script/session/0_session_error.d.ts.map +1 -0
- package/script/session/0_session_error.js +29 -0
- package/script/session/0_session_state.d.ts +28 -0
- package/script/session/0_session_state.d.ts.map +1 -0
- package/script/session/0_session_state.js +55 -0
- package/script/session/1_session.d.ts +51 -0
- package/script/session/1_session.d.ts.map +1 -0
- package/script/session/1_session.js +128 -0
- package/script/session/2_session_encrypted.d.ts +41 -0
- package/script/session/2_session_encrypted.d.ts.map +1 -0
- package/script/session/2_session_encrypted.js +513 -0
- package/script/session/2_session_plain.d.ts +25 -0
- package/script/session/2_session_plain.d.ts.map +1 -0
- package/script/session/2_session_plain.js +60 -0
- package/script/storage/0_storage.d.ts +3 -2
- package/script/storage/0_storage.d.ts.map +1 -1
- package/script/storage/0_storage.js +1 -1
- package/script/storage/1_utilities.d.ts +15 -11
- package/script/storage/1_utilities.d.ts.map +1 -1
- package/script/storage/1_utilities.js +47 -55
- package/script/storage/2_storage_indexed_db.d.ts +3 -2
- package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +33 -48
- package/script/storage/2_storage_local_storage.d.ts +3 -2
- package/script/storage/2_storage_local_storage.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.js +10 -20
- package/script/storage/2_storage_memory.d.ts +4 -3
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +30 -44
- package/script/storage/2_storage_session_storage.d.ts +4 -3
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +10 -20
- package/script/tl/0_types.d.ts +25 -0
- package/script/tl/0_types.d.ts.map +1 -0
- package/script/tl/0_types.js +21 -0
- package/script/tl/0_utilities.d.ts +34 -0
- package/script/tl/0_utilities.d.ts.map +1 -0
- package/script/tl/0_utilities.js +89 -0
- package/script/tl/1_mtproto_api.d.ts +371 -0
- package/script/tl/1_mtproto_api.d.ts.map +1 -0
- package/script/tl/1_mtproto_api.js +419 -0
- package/script/tl/1_telegram_api.d.ts +19410 -0
- package/script/tl/1_telegram_api.d.ts.map +1 -0
- package/script/tl/1_telegram_api.js +22389 -0
- package/script/tl/1_tl_reader.d.ts +39 -0
- package/script/tl/1_tl_reader.d.ts.map +1 -0
- package/script/tl/1_tl_reader.js +224 -0
- package/script/tl/1_tl_writer.d.ts +37 -0
- package/script/tl/1_tl_writer.d.ts.map +1 -0
- package/script/tl/1_tl_writer.js +273 -0
- package/script/tl/1_utilities.d.ts +9 -14
- package/script/tl/1_utilities.d.ts.map +1 -1
- package/script/tl/1_utilities.js +23 -44
- package/script/tl/2_message.d.ts +36 -0
- package/script/tl/2_message.d.ts.map +1 -0
- package/script/tl/2_message.js +80 -0
- package/script/tl/2_mtproto.d.ts +33 -0
- package/script/tl/2_mtproto.d.ts.map +1 -0
- package/script/tl/2_mtproto.js +78 -0
- package/script/tl/2_telegram.d.ts +49 -0
- package/script/tl/2_telegram.d.ts.map +1 -0
- package/script/tl/2_telegram.js +189 -0
- package/script/transport/0_obfuscation.d.ts +2 -2
- package/script/transport/0_obfuscation.d.ts.map +1 -1
- package/script/transport/0_obfuscation.js +9 -8
- package/script/transport/0_transport.d.ts +4 -6
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/transport/0_transport.js +11 -19
- package/script/transport/1_transport_abridged.d.ts +2 -4
- package/script/transport/1_transport_abridged.d.ts.map +1 -1
- package/script/transport/1_transport_abridged.js +21 -51
- package/script/transport/1_transport_intermediate.d.ts +2 -4
- package/script/transport/1_transport_intermediate.d.ts.map +1 -1
- package/script/transport/1_transport_intermediate.js +15 -47
- package/script/transport/1_transport_provider.d.ts +35 -0
- package/script/transport/1_transport_provider.d.ts.map +1 -0
- package/script/transport/1_transport_provider.js +86 -0
- package/script/transport/2_transport_provider_tcp.d.ts +25 -0
- package/script/transport/2_transport_provider_tcp.d.ts.map +1 -0
- package/script/transport/2_transport_provider_tcp.js +32 -0
- package/script/transport/2_transport_provider_web_socket.d.ts +24 -0
- package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -0
- package/script/transport/2_transport_provider_web_socket.js +47 -0
- package/script/types/0_authorization_state.d.ts +2 -2
- package/script/types/0_authorization_state.d.ts.map +1 -1
- package/script/types/0_authorization_state.js +1 -1
- package/script/types/0_birthday.d.ts +3 -2
- package/script/types/0_birthday.d.ts.map +1 -1
- package/script/types/0_birthday.js +10 -1
- package/script/types/0_bot_command.d.ts +1 -1
- package/script/types/0_bot_command.js +1 -1
- package/script/types/0_bot_token_check_result.d.ts +31 -0
- package/script/types/0_bot_token_check_result.d.ts.map +1 -0
- package/script/types/0_bot_token_check_result.js +21 -0
- package/script/types/0_button_style.d.ts +28 -0
- package/script/types/0_button_style.d.ts.map +1 -0
- package/script/types/0_button_style.js +40 -0
- package/script/types/0_callback_query_answer.d.ts +3 -3
- package/script/types/0_callback_query_answer.d.ts.map +1 -1
- package/script/types/0_callback_query_answer.js +2 -2
- package/script/types/0_callback_query_question.d.ts +1 -1
- package/script/types/0_callback_query_question.js +3 -3
- package/script/types/0_chat_action.d.ts +1 -1
- package/script/types/0_chat_action.js +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +17 -7
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.js +31 -16
- package/script/types/0_chat_folder.d.ts +29 -0
- package/script/types/0_chat_folder.d.ts.map +1 -0
- package/script/types/0_chat_folder.js +28 -0
- package/script/types/0_chat_member_rights.d.ts +3 -3
- package/script/types/0_chat_member_rights.d.ts.map +1 -1
- package/script/types/0_chat_member_rights.js +20 -20
- package/script/types/0_chat_photo.d.ts +2 -2
- package/script/types/0_chat_photo.d.ts.map +1 -1
- package/script/types/0_chat_photo.js +4 -4
- package/script/types/0_checklist_changed.d.ts +29 -0
- package/script/types/0_checklist_changed.d.ts.map +1 -0
- package/script/types/0_checklist_changed.js +28 -0
- package/script/types/0_code_check_result.d.ts +47 -0
- package/script/types/0_code_check_result.d.ts.map +1 -0
- package/script/types/0_code_check_result.js +21 -0
- package/script/types/0_connection_state.d.ts +1 -1
- package/script/types/0_connection_state.js +1 -1
- package/script/types/0_contact.d.ts +2 -2
- package/script/types/0_contact.d.ts.map +1 -1
- package/script/types/0_contact.js +1 -1
- package/script/types/0_dice.d.ts +2 -2
- package/script/types/0_dice.d.ts.map +1 -1
- package/script/types/0_dice.js +1 -1
- package/script/types/0_emoji_status.d.ts +48 -0
- package/script/types/0_emoji_status.d.ts.map +1 -0
- package/script/types/0_emoji_status.js +36 -0
- package/script/types/0_failed_invitation.d.ts +8 -4
- package/script/types/0_failed_invitation.d.ts.map +1 -1
- package/script/types/0_failed_invitation.js +3 -3
- package/script/types/0_file_source.d.ts +2 -2
- package/script/types/0_file_source.d.ts.map +1 -1
- package/script/types/0_file_source.js +1 -1
- package/script/types/0_gift_component_rarity.d.ts +50 -0
- package/script/types/0_gift_component_rarity.d.ts.map +1 -0
- package/script/types/0_gift_component_rarity.js +46 -0
- package/script/types/0_gift_value.d.ts +25 -0
- package/script/types/0_gift_value.d.ts.map +1 -0
- package/script/types/0_gift_value.js +21 -0
- package/script/types/0_giveaway_parameters.d.ts +2 -2
- package/script/types/0_giveaway_parameters.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.js +4 -5
- package/script/types/0_id.d.ts +1 -1
- package/script/types/0_id.js +1 -1
- package/script/types/0_input_emoji_status.d.ts +36 -0
- package/script/types/0_input_emoji_status.d.ts.map +1 -0
- package/script/types/0_input_emoji_status.js +21 -0
- package/script/types/0_invoice.d.ts +3 -2
- package/script/types/0_invoice.d.ts.map +1 -1
- package/script/types/0_invoice.js +1 -1
- package/script/types/0_keyboard_button_poll_type.d.ts +1 -1
- package/script/types/0_keyboard_button_poll_type.js +1 -1
- package/script/types/0_link_preview_media_size.d.ts +22 -0
- package/script/types/0_link_preview_media_size.d.ts.map +1 -0
- package/script/types/0_link_preview_media_size.js +21 -0
- package/script/types/0_live_stream_channel.d.ts +2 -2
- package/script/types/0_live_stream_channel.d.ts.map +1 -1
- package/script/types/0_live_stream_channel.js +1 -1
- package/script/types/0_location.d.ts +1 -1
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_location.js +5 -5
- package/script/types/0_login_url.d.ts +1 -1
- package/script/types/0_login_url.js +1 -1
- package/script/types/0_mask_position.d.ts +2 -2
- package/script/types/0_mask_position.d.ts.map +1 -1
- package/script/types/0_mask_position.js +2 -2
- package/script/types/0_message_reference.d.ts +1 -1
- package/script/types/0_message_reference.js +1 -1
- package/script/types/0_message_search_filter.d.ts +3 -2
- package/script/types/0_message_search_filter.d.ts.map +1 -1
- package/script/types/0_message_search_filter.js +1 -1
- package/script/types/0_mini_app_button_info.d.ts +26 -0
- package/script/types/0_mini_app_button_info.d.ts.map +1 -0
- package/script/types/0_mini_app_button_info.js +25 -0
- package/script/types/0_mini_app_mode.d.ts +22 -0
- package/script/types/0_mini_app_mode.d.ts.map +1 -0
- package/script/types/0_mini_app_mode.js +21 -0
- package/script/types/0_network_statistics_entry.d.ts +1 -1
- package/script/types/0_network_statistics_entry.js +1 -1
- package/script/types/0_parse_mode.d.ts +1 -1
- package/script/types/0_parse_mode.js +1 -1
- package/script/types/0_password_check_result.d.ts +39 -0
- package/script/types/0_password_check_result.d.ts.map +1 -0
- package/script/types/0_password_check_result.js +21 -0
- package/script/types/0_price_tag.d.ts +1 -1
- package/script/types/0_price_tag.js +1 -1
- package/script/types/0_reaction.d.ts +4 -1
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_reaction.js +9 -9
- package/script/types/0_refunded_payment.d.ts +2 -2
- package/script/types/0_refunded_payment.d.ts.map +1 -1
- package/script/types/0_refunded_payment.js +2 -2
- package/script/types/0_restriction_reason.d.ts +2 -2
- package/script/types/0_restriction_reason.d.ts.map +1 -1
- package/script/types/0_restriction_reason.js +1 -1
- package/script/types/0_self_destruct_option.d.ts +11 -3
- package/script/types/0_self_destruct_option.d.ts.map +1 -1
- package/script/types/0_self_destruct_option.js +13 -3
- package/script/types/0_shipping_address.d.ts +2 -2
- package/script/types/0_shipping_address.d.ts.map +1 -1
- package/script/types/0_shipping_address.js +1 -1
- package/script/types/0_slow_mode_duration.d.ts +23 -0
- package/script/types/0_slow_mode_duration.d.ts.map +1 -0
- package/script/types/0_slow_mode_duration.js +31 -0
- package/script/types/0_story_reference.d.ts +1 -1
- package/script/types/0_story_reference.js +1 -1
- package/script/types/0_switch_inline_query_chosen_chats.d.ts +20 -0
- package/script/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
- package/script/types/0_switch_inline_query_chosen_chats.js +19 -0
- package/script/types/0_thumbnail.d.ts +1 -1
- package/script/types/0_thumbnail.d.ts.map +1 -1
- package/script/types/0_thumbnail.js +3 -3
- package/script/types/0_translation.d.ts +32 -0
- package/script/types/0_translation.d.ts.map +1 -0
- package/script/types/0_translation.js +48 -0
- package/script/types/0_upload_progress.d.ts +29 -0
- package/script/types/0_upload_progress.d.ts.map +1 -0
- package/script/types/0_upload_progress.js +21 -0
- package/script/types/0_user_status.d.ts +66 -0
- package/script/types/0_user_status.d.ts.map +1 -0
- package/script/types/0_user_status.js +38 -0
- package/script/types/0_video_chat.d.ts +8 -4
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/0_video_chat.js +6 -7
- package/script/types/0_voice.d.ts +2 -2
- package/script/types/0_voice.d.ts.map +1 -1
- package/script/types/0_voice.js +1 -1
- package/script/types/0_voice_transcription.d.ts +31 -0
- package/script/types/0_voice_transcription.d.ts.map +1 -0
- package/script/types/0_voice_transcription.js +29 -0
- package/script/types/0_working_hours_interval.d.ts +27 -0
- package/script/types/0_working_hours_interval.d.ts.map +1 -0
- package/script/types/0_working_hours_interval.js +21 -0
- package/script/types/1_animation.d.ts +2 -2
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_animation.js +2 -2
- package/script/types/1_audio.d.ts +2 -2
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_audio.js +2 -2
- package/script/types/1_bot_command_scope.d.ts +3 -3
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.js +3 -3
- package/script/types/1_bot_commands.d.ts +30 -0
- package/script/types/1_bot_commands.d.ts.map +1 -0
- package/script/types/1_bot_commands.js +21 -0
- package/script/types/1_chat_p.d.ts +36 -7
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +43 -16
- package/script/types/1_document.d.ts +2 -2
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_document.js +2 -2
- package/script/types/1_giveaway.d.ts +3 -3
- package/script/types/1_giveaway.d.ts.map +1 -1
- package/script/types/1_giveaway.js +1 -1
- package/script/types/1_inline_keyboard_button.d.ts +140 -0
- package/script/types/1_inline_keyboard_button.d.ts.map +1 -0
- package/script/types/1_inline_keyboard_button.js +132 -0
- package/script/types/1_inline_query_result_button.d.ts +3 -3
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_inline_query_result_button.js +1 -1
- package/script/types/1_input_gift.d.ts +54 -0
- package/script/types/1_input_gift.d.ts.map +1 -0
- package/script/types/1_input_gift.js +35 -0
- package/script/types/1_input_story_content.d.ts +3 -3
- package/script/types/1_input_story_content.d.ts.map +1 -1
- package/script/types/1_input_story_content.js +1 -1
- package/script/types/1_keyboard_button.d.ts +14 -12
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +86 -33
- package/script/types/1_message_reaction.d.ts +3 -3
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +7 -7
- package/script/types/1_mini_app_info.d.ts +32 -0
- package/script/types/1_mini_app_info.d.ts.map +1 -0
- package/script/types/1_mini_app_info.js +30 -0
- package/script/types/1_network_statistics.d.ts +2 -2
- package/script/types/1_network_statistics.d.ts.map +1 -1
- package/script/types/1_network_statistics.js +1 -1
- package/script/types/1_order_info.d.ts +8 -3
- package/script/types/1_order_info.d.ts.map +1 -1
- package/script/types/1_order_info.js +1 -1
- package/script/types/1_photo.d.ts +2 -2
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_photo.js +3 -3
- package/script/types/1_reaction_count.d.ts +3 -3
- package/script/types/1_reaction_count.d.ts.map +1 -1
- package/script/types/1_reaction_count.js +1 -1
- package/script/types/1_sticker.d.ts +6 -5
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +15 -10
- package/script/types/1_story_reaction.d.ts +4 -4
- package/script/types/1_story_reaction.d.ts.map +1 -1
- package/script/types/1_story_reaction.js +2 -2
- package/script/types/1_venue.d.ts +2 -2
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_venue.js +2 -2
- package/script/types/1_video.d.ts +2 -2
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video.js +2 -2
- package/script/types/1_video_note.d.ts +2 -2
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/1_video_note.js +2 -2
- package/script/types/1_working_hours.d.ts +31 -0
- package/script/types/1_working_hours.d.ts.map +1 -0
- package/script/types/1_working_hours.js +37 -0
- package/script/types/2_chat.d.ts +14 -17
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +22 -27
- package/script/types/2_chat_member.d.ts +72 -15
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +38 -26
- package/script/types/2_inactive_chat.d.ts +3 -3
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_inactive_chat.js +3 -4
- package/script/types/2_message_entity.d.ts +148 -0
- package/script/types/2_message_entity.d.ts.map +1 -0
- package/script/types/2_message_entity.js +248 -0
- package/script/types/2_message_interactions.d.ts +2 -2
- package/script/types/2_message_interactions.d.ts.map +1 -1
- package/script/types/2_message_interactions.js +1 -1
- package/script/types/2_message_reaction_count.d.ts +6 -7
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.js +6 -9
- package/script/types/2_message_reaction_list_item.d.ts +39 -0
- package/script/types/2_message_reaction_list_item.d.ts.map +1 -0
- package/script/types/2_message_reaction_list_item.js +53 -0
- package/script/types/2_poll_answer.d.ts +32 -0
- package/script/types/2_poll_answer.d.ts.map +1 -0
- package/script/types/2_poll_answer.js +38 -0
- package/script/types/2_reply_markup.d.ts +71 -0
- package/script/types/2_reply_markup.d.ts.map +1 -0
- package/script/types/2_reply_markup.js +131 -0
- package/script/types/2_sticker_set.d.ts +51 -0
- package/script/types/2_sticker_set.d.ts.map +1 -0
- package/script/types/2_sticker_set.js +94 -0
- package/script/types/2_story_content.d.ts +3 -3
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_content.js +6 -6
- package/script/types/2_story_interactions.d.ts +3 -3
- package/script/types/2_story_interactions.d.ts.map +1 -1
- package/script/types/2_story_interactions.js +1 -1
- package/script/types/2_story_interactive_area.d.ts +9 -9
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +15 -14
- package/script/types/2_story_privacy.d.ts +46 -0
- package/script/types/2_story_privacy.d.ts.map +1 -0
- package/script/types/2_story_privacy.js +80 -0
- package/script/types/2_successful_payment.d.ts +11 -3
- package/script/types/2_successful_payment.d.ts.map +1 -1
- package/script/types/2_successful_payment.js +2 -2
- package/script/types/2_user.d.ts +73 -0
- package/script/types/2_user.d.ts.map +1 -0
- package/script/types/2_user.js +86 -0
- package/script/types/3_business_connection.d.ts +37 -0
- package/script/types/3_business_connection.d.ts.map +1 -0
- package/script/types/3_business_connection.js +39 -0
- package/script/types/3_chat_settings.d.ts +47 -0
- package/script/types/3_chat_settings.d.ts.map +1 -0
- package/script/types/3_chat_settings.js +54 -0
- package/script/types/3_checklist_item.d.ts +65 -0
- package/script/types/3_checklist_item.d.ts.map +1 -0
- package/script/types/3_checklist_item.js +54 -0
- package/script/types/3_chosen_inline_result.d.ts +38 -0
- package/script/types/3_chosen_inline_result.d.ts.map +1 -0
- package/script/types/3_chosen_inline_result.js +40 -0
- package/script/types/3_forward_header.d.ts +77 -0
- package/script/types/3_forward_header.d.ts.map +1 -0
- package/script/types/3_forward_header.js +76 -0
- package/script/types/3_game.d.ts +40 -0
- package/script/types/3_game.d.ts.map +1 -0
- package/script/types/3_game.js +47 -0
- package/script/types/3_gift_upgraded_component.d.ts +96 -0
- package/script/types/3_gift_upgraded_component.d.ts.map +1 -0
- package/script/types/3_gift_upgraded_component.js +91 -0
- package/script/types/3_inline_query.d.ts +40 -0
- package/script/types/3_inline_query.d.ts.map +1 -0
- package/script/types/3_inline_query.js +63 -0
- package/script/types/3_input_checklist_item.d.ts +31 -0
- package/script/types/3_input_checklist_item.d.ts.map +1 -0
- package/script/types/3_input_checklist_item.js +21 -0
- package/script/types/3_input_media.d.ts +123 -0
- package/script/types/3_input_media.d.ts.map +1 -0
- package/script/types/3_input_media.js +21 -0
- package/script/types/3_input_poll_option.d.ts +31 -0
- package/script/types/3_input_poll_option.d.ts.map +1 -0
- package/script/types/3_input_poll_option.js +21 -0
- package/script/types/3_invite_link.d.ts +47 -0
- package/script/types/3_invite_link.d.ts.map +1 -0
- package/script/types/3_invite_link.js +51 -0
- package/script/types/3_message_reaction_list.d.ts +32 -0
- package/script/types/3_message_reaction_list.d.ts.map +1 -0
- package/script/types/3_message_reaction_list.js +34 -0
- package/script/types/3_message_reactions.d.ts +42 -0
- package/script/types/3_message_reactions.d.ts.map +1 -0
- package/script/types/3_message_reactions.js +57 -0
- package/script/types/3_poll_option.d.ts +34 -0
- package/script/types/3_poll_option.d.ts.map +1 -0
- package/script/types/3_poll_option.js +32 -0
- package/script/types/3_pre_checkout_query.d.ts +42 -0
- package/script/types/3_pre_checkout_query.d.ts.map +1 -0
- package/script/types/3_pre_checkout_query.js +42 -0
- package/script/types/3_reply_quote.d.ts +32 -0
- package/script/types/3_reply_quote.d.ts.map +1 -0
- package/script/types/3_reply_quote.js +33 -0
- package/script/types/3_story.d.ts +13 -14
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/3_story.js +14 -15
- package/script/types/4_chat_member_updated.d.ts +43 -0
- package/script/types/4_chat_member_updated.d.ts.map +1 -0
- package/script/types/4_chat_member_updated.js +55 -0
- package/script/types/4_checklist.d.ts +38 -0
- package/script/types/4_checklist.d.ts.map +1 -0
- package/script/types/4_checklist.js +34 -0
- package/script/types/4_gift.d.ts +100 -0
- package/script/types/4_gift.d.ts.map +1 -0
- package/script/types/4_gift.js +117 -0
- package/script/types/4_join_request.d.ts +39 -0
- package/script/types/4_join_request.d.ts.map +1 -0
- package/script/types/4_join_request.js +66 -0
- package/script/types/4_poll.d.ts +55 -0
- package/script/types/4_poll.d.ts.map +1 -0
- package/script/types/4_poll.js +46 -0
- package/script/types/4_reply_to.d.ts +51 -0
- package/script/types/4_reply_to.d.ts.map +1 -0
- package/script/types/4_reply_to.js +21 -0
- package/script/types/5_claimed_gift.d.ts +44 -0
- package/script/types/5_claimed_gift.d.ts.map +1 -0
- package/script/types/5_claimed_gift.js +46 -0
- package/script/types/5_gift_non_upgraded_information.d.ts +47 -0
- package/script/types/5_gift_non_upgraded_information.d.ts.map +1 -0
- package/script/types/5_gift_non_upgraded_information.js +72 -0
- package/script/types/5_gift_upgraded_information.d.ts +41 -0
- package/script/types/5_gift_upgraded_information.d.ts.map +1 -0
- package/script/types/5_gift_upgraded_information.js +61 -0
- package/script/types/5_link_preview.d.ts +186 -0
- package/script/types/5_link_preview.d.ts.map +1 -0
- package/script/types/5_link_preview.js +208 -0
- package/script/types/6_claimed_gifts.d.ts +33 -0
- package/script/types/6_claimed_gifts.d.ts.map +1 -0
- package/script/types/6_claimed_gifts.js +46 -0
- package/script/types/6_message.d.ts +704 -0
- package/script/types/6_message.d.ts.map +1 -0
- package/script/types/6_message.js +558 -0
- package/script/types/6_message_content.d.ts +124 -0
- package/script/types/6_message_content.d.ts.map +1 -0
- package/script/types/6_message_content.js +21 -0
- package/script/types/7_callback_query.d.ts +43 -0
- package/script/types/7_callback_query.d.ts.map +1 -0
- package/script/types/7_callback_query.js +63 -0
- package/script/types/7_chat_list_item.d.ts +43 -0
- package/script/types/7_chat_list_item.d.ts.map +1 -0
- package/script/types/7_chat_list_item.js +60 -0
- package/script/types/7_inline_query_result.d.ts +251 -0
- package/script/types/7_inline_query_result.d.ts.map +1 -0
- package/script/types/7_inline_query_result.js +384 -0
- package/script/types/7_message_list.d.ts +28 -0
- package/script/types/7_message_list.d.ts.map +1 -0
- package/script/types/7_message_list.js +21 -0
- package/script/types/7_saved_chat.d.ts +35 -0
- package/script/types/7_saved_chat.d.ts.map +1 -0
- package/script/types/7_saved_chat.js +45 -0
- package/script/types/7_topic.d.ts +44 -0
- package/script/types/7_topic.d.ts.map +1 -0
- package/script/types/7_topic.js +64 -0
- package/script/types/8_inline_query_answer.d.ts +32 -0
- package/script/types/8_inline_query_answer.d.ts.map +1 -0
- package/script/types/8_inline_query_answer.js +31 -0
- package/script/types/8_saved_chats.d.ts +33 -0
- package/script/types/8_saved_chats.d.ts.map +1 -0
- package/script/types/8_saved_chats.js +39 -0
- package/script/types/8_update.d.ts +583 -0
- package/script/types/8_update.d.ts.map +1 -0
- package/script/types/8_update.js +21 -0
- package/script/types/_file_id.d.ts +64 -51
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +158 -139
- package/script/types/_getters.d.ts +4 -11
- package/script/types/_getters.d.ts.map +1 -1
- package/script/types/_getters.js +1 -1
- package/script/utilities/0_color.d.ts +1 -1
- package/script/utilities/0_color.js +1 -1
- package/script/utilities/0_env.d.ts.map +1 -1
- package/script/utilities/0_env.js +37 -8
- package/script/utilities/0_gzip.d.ts +22 -0
- package/script/utilities/0_gzip.d.ts.map +1 -0
- package/script/utilities/0_gzip.js +46 -0
- package/script/utilities/0_hash.d.ts +3 -3
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_hash.js +1 -1
- package/script/utilities/0_int.d.ts +71 -0
- package/script/utilities/0_int.d.ts.map +1 -0
- package/script/utilities/0_int.js +149 -0
- package/script/utilities/0_misc.d.ts +29 -0
- package/script/utilities/0_misc.d.ts.map +1 -0
- package/script/utilities/0_misc.js +95 -0
- package/script/utilities/0_mutex.d.ts +1 -1
- package/script/utilities/0_mutex.js +5 -20
- package/script/utilities/0_object.d.ts +1 -1
- package/script/utilities/0_object.js +1 -1
- package/script/utilities/0_part_stream.d.ts +4 -4
- package/script/utilities/0_part_stream.d.ts.map +1 -1
- package/script/utilities/0_part_stream.js +13 -27
- package/script/utilities/0_rle.d.ts +3 -3
- package/script/utilities/0_rle.d.ts.map +1 -1
- package/script/utilities/0_rle.js +2 -2
- package/script/utilities/0_text.d.ts +22 -0
- package/script/utilities/0_text.d.ts.map +1 -0
- package/script/utilities/0_text.js +31 -0
- package/script/utilities/0_types.d.ts +1 -1
- package/script/utilities/0_types.js +1 -1
- package/script/utilities/0_units.d.ts +1 -4
- package/script/utilities/0_units.d.ts.map +1 -1
- package/script/utilities/0_units.js +2 -5
- package/script/utilities/1_auth.d.ts +2 -2
- package/script/utilities/1_auth.d.ts.map +1 -1
- package/script/utilities/1_auth.js +6 -7
- package/script/utilities/1_base64.d.ts +3 -3
- package/script/utilities/1_base64.d.ts.map +1 -1
- package/script/utilities/1_base64.js +4 -4
- package/script/utilities/1_crypto.d.ts +30 -0
- package/script/utilities/1_crypto.d.ts.map +1 -0
- package/script/utilities/1_crypto.js +83 -0
- package/script/utilities/1_logger.d.ts +3 -3
- package/script/utilities/1_logger.d.ts.map +1 -1
- package/script/utilities/1_logger.js +5 -4
- package/script/utilities/1_math.d.ts +1 -1
- package/script/utilities/1_math.js +7 -7
- package/script/utilities/2_queue.d.ts +2 -2
- package/script/utilities/2_queue.d.ts.map +1 -1
- package/script/utilities/2_queue.js +33 -47
- package/esm/client/0_filters.d.ts +0 -58
- package/esm/client/0_filters.d.ts.map +0 -1
- package/esm/client/0_filters.js +0 -49
- package/esm/client/0_message.d.ts +0 -29
- package/esm/client/0_message.d.ts.map +0 -1
- package/esm/client/0_message.js +0 -83
- package/esm/client/1_client_encrypted.d.ts +0 -52
- package/esm/client/1_client_encrypted.d.ts.map +0 -1
- package/esm/client/1_client_encrypted.js +0 -339
- package/esm/client/1_composer.d.ts +0 -51
- package/esm/client/1_composer.d.ts.map +0 -1
- package/esm/client/1_composer.js +0 -168
- package/esm/client/5_client.d.ts +0 -1372
- package/esm/client/5_client.d.ts.map +0 -1
- package/esm/client/5_client.js +0 -2858
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -167
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts +0 -3
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts.map +0 -1
- package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -308
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -183
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -52
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -159
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -57
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -20
- package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts +0 -19
- package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -32
- package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +0 -26
- package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts +0 -38
- package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.js +0 -163
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -110
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -276
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -179
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -37
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -207
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -2
- package/esm/deps/jsr.io/@std/io/0.225.0/_constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/io/0.225.0/_constants.js +0 -4
- package/esm/deps/jsr.io/@std/io/0.225.0/iterate_reader.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/io/0.225.0/iterate_reader.js +0 -96
- package/esm/deps/jsr.io/@std/io/0.225.0/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/io/0.225.0/types.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -7
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -46
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -77
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -19
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.js +0 -36
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/join.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -49
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -89
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -42
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -57
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -27
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -44
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -81
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -38
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -74
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -134
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -34
- package/esm/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.js +0 -35
- package/esm/tl/0_api.d.ts +0 -15839
- package/esm/tl/0_api.d.ts.map +0 -1
- package/esm/tl/0_api.js +0 -24746
- package/esm/tl/0_tl_raw_reader.d.ts +0 -36
- package/esm/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_reader.js +0 -87
- package/esm/tl/0_tl_raw_writer.d.ts +0 -34
- package/esm/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_writer.js +0 -86
- package/esm/tl/2_deserialize.d.ts +0 -23
- package/esm/tl/2_deserialize.d.ts.map +0 -1
- package/esm/tl/2_deserialize.js +0 -95
- package/esm/tl/2_serialize.d.ts +0 -22
- package/esm/tl/2_serialize.d.ts.map +0 -1
- package/esm/tl/2_serialize.js +0 -160
- package/esm/tl/3_tl_reader.d.ts +0 -26
- package/esm/tl/3_tl_reader.d.ts.map +0 -1
- package/esm/tl/3_tl_reader.js +0 -49
- package/esm/tl/3_utilities.d.ts +0 -34
- package/esm/tl/3_utilities.d.ts.map +0 -1
- package/esm/tl/3_utilities.js +0 -89
- package/esm/tl/4_rpc_result.d.ts +0 -27
- package/esm/tl/4_rpc_result.d.ts.map +0 -1
- package/esm/tl/4_rpc_result.js +0 -28
- package/esm/tl/4_tl_writer.d.ts +0 -25
- package/esm/tl/4_tl_writer.d.ts.map +0 -1
- package/esm/tl/4_tl_writer.js +0 -45
- package/esm/tl/5_message.d.ts +0 -39
- package/esm/tl/5_message.d.ts.map +0 -1
- package/esm/tl/5_message.js +0 -98
- package/esm/transport/2_transport_provider.d.ts +0 -35
- package/esm/transport/2_transport_provider.d.ts.map +0 -1
- package/esm/transport/2_transport_provider.js +0 -81
- package/esm/transport/3_transport_provider_tcp.d.ts +0 -25
- package/esm/transport/3_transport_provider_tcp.d.ts.map +0 -1
- package/esm/transport/3_transport_provider_tcp.js +0 -29
- package/esm/transport/3_transport_provider_web_socket.d.ts +0 -24
- package/esm/transport/3_transport_provider_web_socket.d.ts.map +0 -1
- package/esm/transport/3_transport_provider_web_socket.js +0 -43
- package/esm/types/0_link_preview.d.ts +0 -35
- package/esm/types/0_link_preview.d.ts.map +0 -1
- package/esm/types/0_link_preview.js +0 -28
- package/esm/types/0_message_entity.d.ts +0 -139
- package/esm/types/0_message_entity.d.ts.map +0 -1
- package/esm/types/0_message_entity.js +0 -183
- package/esm/types/0_mini_app_info.d.ts +0 -26
- package/esm/types/0_mini_app_info.d.ts.map +0 -1
- package/esm/types/0_mini_app_info.js +0 -22
- package/esm/types/0_opening_hours.d.ts +0 -26
- package/esm/types/0_opening_hours.d.ts.map +0 -1
- package/esm/types/0_opening_hours.js +0 -25
- package/esm/types/1_input_media.d.ts +0 -122
- package/esm/types/1_input_media.d.ts.map +0 -1
- package/esm/types/1_input_media.js +0 -20
- package/esm/types/1_message_content.d.ts +0 -119
- package/esm/types/1_message_content.d.ts.map +0 -1
- package/esm/types/1_message_content.js +0 -20
- package/esm/types/1_poll_option.d.ts +0 -32
- package/esm/types/1_poll_option.d.ts.map +0 -1
- package/esm/types/1_poll_option.js +0 -27
- package/esm/types/1_reply_quote.d.ts +0 -32
- package/esm/types/1_reply_quote.d.ts.map +0 -1
- package/esm/types/1_reply_quote.js +0 -30
- package/esm/types/1_story_privacy.d.ts +0 -46
- package/esm/types/1_story_privacy.d.ts.map +0 -1
- package/esm/types/1_story_privacy.js +0 -76
- package/esm/types/1_user.d.ts +0 -56
- package/esm/types/1_user.d.ts.map +0 -1
- package/esm/types/1_user.js +0 -47
- package/esm/types/2_business_connection.d.ts +0 -37
- package/esm/types/2_business_connection.d.ts.map +0 -1
- package/esm/types/2_business_connection.js +0 -30
- package/esm/types/2_chosen_inline_result.d.ts +0 -38
- package/esm/types/2_chosen_inline_result.d.ts.map +0 -1
- package/esm/types/2_chosen_inline_result.js +0 -37
- package/esm/types/2_forward_header.d.ts +0 -40
- package/esm/types/2_forward_header.d.ts.map +0 -1
- package/esm/types/2_forward_header.js +0 -55
- package/esm/types/2_game.d.ts +0 -40
- package/esm/types/2_game.d.ts.map +0 -1
- package/esm/types/2_game.js +0 -44
- package/esm/types/2_inline_keyboard_button.d.ts +0 -138
- package/esm/types/2_inline_keyboard_button.d.ts.map +0 -1
- package/esm/types/2_inline_keyboard_button.js +0 -117
- package/esm/types/2_inline_query.d.ts +0 -40
- package/esm/types/2_inline_query.d.ts.map +0 -1
- package/esm/types/2_inline_query.js +0 -60
- package/esm/types/2_invite_link.d.ts +0 -47
- package/esm/types/2_invite_link.d.ts.map +0 -1
- package/esm/types/2_invite_link.js +0 -48
- package/esm/types/2_message_reactions.d.ts +0 -43
- package/esm/types/2_message_reactions.d.ts.map +0 -1
- package/esm/types/2_message_reactions.js +0 -56
- package/esm/types/2_poll.d.ts +0 -55
- package/esm/types/2_poll.d.ts.map +0 -1
- package/esm/types/2_poll.js +0 -43
- package/esm/types/2_pre_checkout_query.d.ts +0 -34
- package/esm/types/2_pre_checkout_query.d.ts.map +0 -1
- package/esm/types/2_pre_checkout_query.js +0 -39
- package/esm/types/2_reply_to.d.ts +0 -35
- package/esm/types/2_reply_to.d.ts.map +0 -1
- package/esm/types/2_reply_to.js +0 -20
- package/esm/types/3_chat_member_updated.d.ts +0 -44
- package/esm/types/3_chat_member_updated.d.ts.map +0 -1
- package/esm/types/3_chat_member_updated.js +0 -53
- package/esm/types/3_join_request.d.ts +0 -39
- package/esm/types/3_join_request.d.ts.map +0 -1
- package/esm/types/3_join_request.js +0 -45
- package/esm/types/3_reply_markup.d.ts +0 -71
- package/esm/types/3_reply_markup.d.ts.map +0 -1
- package/esm/types/3_reply_markup.js +0 -127
- package/esm/types/4_inline_query_result.d.ts +0 -251
- package/esm/types/4_inline_query_result.d.ts.map +0 -1
- package/esm/types/4_inline_query_result.js +0 -380
- package/esm/types/4_message.d.ts +0 -615
- package/esm/types/4_message.d.ts.map +0 -1
- package/esm/types/4_message.js +0 -533
- package/esm/types/5_callback_query.d.ts +0 -43
- package/esm/types/5_callback_query.d.ts.map +0 -1
- package/esm/types/5_callback_query.js +0 -60
- package/esm/types/5_chat_list_item.d.ts +0 -36
- package/esm/types/5_chat_list_item.d.ts.map +0 -1
- package/esm/types/5_chat_list_item.js +0 -86
- package/esm/types/5_inline_query_answer.d.ts +0 -32
- package/esm/types/5_inline_query_answer.d.ts.map +0 -1
- package/esm/types/5_inline_query_answer.js +0 -28
- package/esm/types/6_update.d.ts +0 -388
- package/esm/types/6_update.d.ts.map +0 -1
- package/esm/types/6_update.js +0 -20
- package/esm/utilities/0_bigint.d.ts +0 -29
- package/esm/utilities/0_bigint.d.ts.map +0 -1
- package/esm/utilities/0_bigint.js +0 -90
- package/esm/utilities/0_buffer.d.ts +0 -21
- package/esm/utilities/0_buffer.d.ts.map +0 -1
- package/esm/utilities/0_buffer.js +0 -51
- package/esm/utilities/0_cache_map.d.ts +0 -26
- package/esm/utilities/0_cache_map.d.ts.map +0 -1
- package/esm/utilities/0_cache_map.js +0 -52
- package/esm/utilities/0_crypto.d.ts +0 -27
- package/esm/utilities/0_crypto.d.ts.map +0 -1
- package/esm/utilities/0_crypto.js +0 -48
- package/esm/utilities/0_gunzip.d.ts +0 -2
- package/esm/utilities/0_gunzip.d.ts.map +0 -1
- package/esm/utilities/0_gunzip.js +0 -17
- package/esm/utilities/1_misc.d.ts +0 -29
- package/esm/utilities/1_misc.d.ts.map +0 -1
- package/esm/utilities/1_misc.js +0 -72
- package/script/client/0_filters.d.ts +0 -58
- package/script/client/0_filters.d.ts.map +0 -1
- package/script/client/0_filters.js +0 -52
- package/script/client/0_message.d.ts +0 -29
- package/script/client/0_message.d.ts.map +0 -1
- package/script/client/0_message.js +0 -90
- package/script/client/1_client_encrypted.d.ts +0 -52
- package/script/client/1_client_encrypted.d.ts.map +0 -1
- package/script/client/1_client_encrypted.js +0 -343
- package/script/client/1_composer.d.ts +0 -51
- package/script/client/1_composer.d.ts.map +0 -1
- package/script/client/1_composer.js +0 -175
- package/script/client/5_client.d.ts +0 -1372
- package/script/client/5_client.d.ts.map +0 -1
- package/script/client/5_client.js +0 -2863
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -182
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts +0 -3
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts.map +0 -1
- package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -310
- package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
- package/script/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -34
- package/script/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
- package/script/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -209
- package/script/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
- package/script/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -48
- package/script/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -30
- package/script/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/false.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -55
- package/script/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
- package/script/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/less.js +0 -31
- package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
- package/script/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -61
- package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
- package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
- package/script/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -162
- package/script/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
- package/script/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -60
- package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
- package/script/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -47
- package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -23
- package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts +0 -19
- package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -35
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts +0 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +0 -29
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts +0 -38
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +0 -167
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/script/deps/jsr.io/@std/io/0.225.0/_constants.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/io/0.225.0/_constants.js +0 -7
- package/script/deps/jsr.io/@std/io/0.225.0/iterate_reader.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/io/0.225.0/iterate_reader.js +0 -100
- package/script/deps/jsr.io/@std/io/0.225.0/types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/io/0.225.0/types.js +0 -18
- package/script/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -10
- package/script/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -45
- package/script/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -49
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -80
- package/script/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -22
- package/script/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -18
- package/script/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
- package/script/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/_os.js +0 -35
- package/script/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
- package/script/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/basename.js +0 -39
- package/script/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
- package/script/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/extname.js +0 -32
- package/script/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -31
- package/script/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
- package/script/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/join.js +0 -32
- package/script/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
- package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -52
- package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
- package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -92
- package/script/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -26
- package/script/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
- package/script/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -45
- package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
- package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -60
- package/script/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -30
- package/script/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -31
- package/script/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -20
- package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
- package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -47
- package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
- package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -84
- package/script/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -41
- package/script/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
- package/script/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -77
- package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
- package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -137
- package/script/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -37
- package/script/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.js +0 -38
- package/script/tl/0_api.d.ts +0 -15839
- package/script/tl/0_api.d.ts.map +0 -1
- package/script/tl/0_api.js +0 -24772
- package/script/tl/0_tl_raw_reader.d.ts +0 -36
- package/script/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/script/tl/0_tl_raw_reader.js +0 -92
- package/script/tl/0_tl_raw_writer.d.ts +0 -34
- package/script/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/script/tl/0_tl_raw_writer.js +0 -90
- package/script/tl/2_deserialize.d.ts +0 -23
- package/script/tl/2_deserialize.d.ts.map +0 -1
- package/script/tl/2_deserialize.js +0 -98
- package/script/tl/2_serialize.d.ts +0 -22
- package/script/tl/2_serialize.d.ts.map +0 -1
- package/script/tl/2_serialize.js +0 -163
- package/script/tl/3_tl_reader.d.ts +0 -26
- package/script/tl/3_tl_reader.d.ts.map +0 -1
- package/script/tl/3_tl_reader.js +0 -53
- package/script/tl/3_utilities.d.ts +0 -34
- package/script/tl/3_utilities.d.ts.map +0 -1
- package/script/tl/3_utilities.js +0 -97
- package/script/tl/4_rpc_result.d.ts +0 -27
- package/script/tl/4_rpc_result.d.ts.map +0 -1
- package/script/tl/4_rpc_result.js +0 -32
- package/script/tl/4_tl_writer.d.ts +0 -25
- package/script/tl/4_tl_writer.d.ts.map +0 -1
- package/script/tl/4_tl_writer.js +0 -49
- package/script/tl/5_message.d.ts +0 -39
- package/script/tl/5_message.d.ts.map +0 -1
- package/script/tl/5_message.js +0 -106
- package/script/transport/2_transport_provider.d.ts +0 -35
- package/script/transport/2_transport_provider.d.ts.map +0 -1
- package/script/transport/2_transport_provider.js +0 -86
- package/script/transport/3_transport_provider_tcp.d.ts +0 -25
- package/script/transport/3_transport_provider_tcp.d.ts.map +0 -1
- package/script/transport/3_transport_provider_tcp.js +0 -32
- package/script/transport/3_transport_provider_web_socket.d.ts +0 -24
- package/script/transport/3_transport_provider_web_socket.d.ts.map +0 -1
- package/script/transport/3_transport_provider_web_socket.js +0 -47
- package/script/types/0_link_preview.d.ts +0 -35
- package/script/types/0_link_preview.d.ts.map +0 -1
- package/script/types/0_link_preview.js +0 -31
- package/script/types/0_message_entity.d.ts +0 -139
- package/script/types/0_message_entity.d.ts.map +0 -1
- package/script/types/0_message_entity.js +0 -188
- package/script/types/0_mini_app_info.d.ts +0 -26
- package/script/types/0_mini_app_info.d.ts.map +0 -1
- package/script/types/0_mini_app_info.js +0 -25
- package/script/types/0_opening_hours.d.ts +0 -26
- package/script/types/0_opening_hours.d.ts.map +0 -1
- package/script/types/0_opening_hours.js +0 -28
- package/script/types/1_input_media.d.ts +0 -122
- package/script/types/1_input_media.d.ts.map +0 -1
- package/script/types/1_input_media.js +0 -21
- package/script/types/1_message_content.d.ts +0 -119
- package/script/types/1_message_content.d.ts.map +0 -1
- package/script/types/1_message_content.js +0 -21
- package/script/types/1_poll_option.d.ts +0 -32
- package/script/types/1_poll_option.d.ts.map +0 -1
- package/script/types/1_poll_option.js +0 -30
- package/script/types/1_reply_quote.d.ts +0 -32
- package/script/types/1_reply_quote.d.ts.map +0 -1
- package/script/types/1_reply_quote.js +0 -33
- package/script/types/1_story_privacy.d.ts +0 -46
- package/script/types/1_story_privacy.d.ts.map +0 -1
- package/script/types/1_story_privacy.js +0 -80
- package/script/types/1_user.d.ts +0 -56
- package/script/types/1_user.d.ts.map +0 -1
- package/script/types/1_user.js +0 -50
- package/script/types/2_business_connection.d.ts +0 -37
- package/script/types/2_business_connection.d.ts.map +0 -1
- package/script/types/2_business_connection.js +0 -33
- package/script/types/2_chosen_inline_result.d.ts +0 -38
- package/script/types/2_chosen_inline_result.d.ts.map +0 -1
- package/script/types/2_chosen_inline_result.js +0 -40
- package/script/types/2_forward_header.d.ts +0 -40
- package/script/types/2_forward_header.d.ts.map +0 -1
- package/script/types/2_forward_header.js +0 -58
- package/script/types/2_game.d.ts +0 -40
- package/script/types/2_game.d.ts.map +0 -1
- package/script/types/2_game.js +0 -47
- package/script/types/2_inline_keyboard_button.d.ts +0 -138
- package/script/types/2_inline_keyboard_button.d.ts.map +0 -1
- package/script/types/2_inline_keyboard_button.js +0 -121
- package/script/types/2_inline_query.d.ts +0 -40
- package/script/types/2_inline_query.d.ts.map +0 -1
- package/script/types/2_inline_query.js +0 -63
- package/script/types/2_invite_link.d.ts +0 -47
- package/script/types/2_invite_link.d.ts.map +0 -1
- package/script/types/2_invite_link.js +0 -51
- package/script/types/2_message_reactions.d.ts +0 -43
- package/script/types/2_message_reactions.d.ts.map +0 -1
- package/script/types/2_message_reactions.js +0 -59
- package/script/types/2_poll.d.ts +0 -55
- package/script/types/2_poll.d.ts.map +0 -1
- package/script/types/2_poll.js +0 -46
- package/script/types/2_pre_checkout_query.d.ts +0 -34
- package/script/types/2_pre_checkout_query.d.ts.map +0 -1
- package/script/types/2_pre_checkout_query.js +0 -42
- package/script/types/2_reply_to.d.ts +0 -35
- package/script/types/2_reply_to.d.ts.map +0 -1
- package/script/types/2_reply_to.js +0 -21
- package/script/types/3_chat_member_updated.d.ts +0 -44
- package/script/types/3_chat_member_updated.d.ts.map +0 -1
- package/script/types/3_chat_member_updated.js +0 -56
- package/script/types/3_join_request.d.ts +0 -39
- package/script/types/3_join_request.d.ts.map +0 -1
- package/script/types/3_join_request.js +0 -48
- package/script/types/3_reply_markup.d.ts +0 -71
- package/script/types/3_reply_markup.d.ts.map +0 -1
- package/script/types/3_reply_markup.js +0 -131
- package/script/types/4_inline_query_result.d.ts +0 -251
- package/script/types/4_inline_query_result.d.ts.map +0 -1
- package/script/types/4_inline_query_result.js +0 -384
- package/script/types/4_message.d.ts +0 -615
- package/script/types/4_message.d.ts.map +0 -1
- package/script/types/4_message.js +0 -537
- package/script/types/5_callback_query.d.ts +0 -43
- package/script/types/5_callback_query.d.ts.map +0 -1
- package/script/types/5_callback_query.js +0 -64
- package/script/types/5_chat_list_item.d.ts +0 -36
- package/script/types/5_chat_list_item.d.ts.map +0 -1
- package/script/types/5_chat_list_item.js +0 -93
- package/script/types/5_inline_query_answer.d.ts +0 -32
- package/script/types/5_inline_query_answer.d.ts.map +0 -1
- package/script/types/5_inline_query_answer.js +0 -31
- package/script/types/6_update.d.ts +0 -388
- package/script/types/6_update.d.ts.map +0 -1
- package/script/types/6_update.js +0 -21
- package/script/utilities/0_bigint.d.ts +0 -29
- package/script/utilities/0_bigint.d.ts.map +0 -1
- package/script/utilities/0_bigint.js +0 -98
- package/script/utilities/0_buffer.d.ts +0 -21
- package/script/utilities/0_buffer.d.ts.map +0 -1
- package/script/utilities/0_buffer.js +0 -54
- package/script/utilities/0_cache_map.d.ts +0 -26
- package/script/utilities/0_cache_map.d.ts.map +0 -1
- package/script/utilities/0_cache_map.js +0 -56
- package/script/utilities/0_crypto.d.ts +0 -27
- package/script/utilities/0_crypto.d.ts.map +0 -1
- package/script/utilities/0_crypto.js +0 -52
- package/script/utilities/0_gunzip.d.ts +0 -2
- package/script/utilities/0_gunzip.d.ts.map +0 -1
- package/script/utilities/0_gunzip.js +0 -20
- package/script/utilities/1_misc.d.ts +0 -29
- package/script/utilities/1_misc.d.ts.map +0 -1
- package/script/utilities/1_misc.js +0 -82
- /package/esm/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/assertion_error.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/unreachable.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff_str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/styles.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/_constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/iterate_reader.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.8 → 1.0.17}/to_array_buffer.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/assertion_error.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/unreachable.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff_str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/styles.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/_constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/iterate_reader.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.8 → 1.0.17}/to_array_buffer.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-
|
|
3
|
+
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
4
|
*
|
|
5
5
|
* This file is part of MTKruto.
|
|
6
6
|
*
|
|
@@ -17,294 +17,610 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
23
|
-
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");
|
|
24
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
25
|
-
};
|
|
26
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
27
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
28
|
-
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");
|
|
29
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
|
-
};
|
|
31
|
-
var _UpdateManager_instances, _a, _UpdateManager_c, _UpdateManager_updateState, _UpdateManager_updateHandler, _UpdateManager_LrecoverUpdateGap, _UpdateManager_LrecoverChannelUpdateGap, _UpdateManager_L$handleUpdate, _UpdateManager_L$processUpdates, _UpdateManager_LfetchState, _UpdateManager_LopenChat, _UpdateManager_Lmin, _UpdateManager_defaultDropPendingUpdates, _UpdateManager_mustDropPendingUpdates, _UpdateManager_state, _UpdateManager_getState, _UpdateManager_setState, _UpdateManager_extractMessages, _UpdateManager_extractMinPeerReferences, _UpdateManager_handleUpdateQueues, _UpdateManager_nonFirst, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck, _UpdateManager_checkGap, _UpdateManager_checkGapQts, _UpdateManager_checkChannelGap, _UpdateManager_channelUpdateQueues, _UpdateManager_processChannelPtsUpdateInner, _UpdateManager_queueUpdate, _UpdateManager_processChannelPtsUpdate, _UpdateManager_processPtsUpdateInner, _UpdateManager_ptsUpdateQueue, _UpdateManager_processPtsUpdate, _UpdateManager_processQtsUpdateInner, _UpdateManager_qtsUpdateQueue, _UpdateManager_processQtsUpdate, _UpdateManager_processUpdatesQueue, _UpdateManager_processUpdates, _UpdateManager_setUpdateStateDate, _UpdateManager_setUpdatePts, _UpdateManager_setUpdateQts, _UpdateManager_getLocalState, _UpdateManager_recoveringUpdateGap, _UpdateManager_recoverUpdateGapMutex, _UpdateManager_recoverChannelUpdateGap, _UpdateManager_handleUpdatesSet, _UpdateManager_handleStoredUpdates, _UpdateManager_handleUpdate, _UpdateManager_openChats;
|
|
32
|
-
import { unreachable } from "../0_deps.js";
|
|
20
|
+
var _a;
|
|
21
|
+
import { delay, SECOND, unreachable } from "../0_deps.js";
|
|
33
22
|
import { InputError } from "../0_errors.js";
|
|
34
|
-
import { getLogger, Mutex, Queue,
|
|
35
|
-
import {
|
|
23
|
+
import { getLogger, Mutex, Queue, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
24
|
+
import { Api } from "../2_tl.js";
|
|
36
25
|
import { PersistentTimestampInvalid } from "../3_errors.js";
|
|
37
26
|
import { CHANNEL_DIFFERENCE_LIMIT_BOT, CHANNEL_DIFFERENCE_LIMIT_USER } from "../4_constants.js";
|
|
27
|
+
import { peerToChatId } from "../tl/2_telegram.js";
|
|
38
28
|
export class UpdateManager {
|
|
29
|
+
static QTS_COUNT = 1;
|
|
30
|
+
static MAIN_BOX_ID = 0n;
|
|
31
|
+
#c;
|
|
32
|
+
#updateState;
|
|
33
|
+
#updateHandler;
|
|
34
|
+
#LrecoverUpdateGap;
|
|
35
|
+
#LrecoverChannelUpdateGap;
|
|
36
|
+
#L$handleUpdate;
|
|
37
|
+
#L$processUpdates;
|
|
38
|
+
#LfetchState;
|
|
39
|
+
#LopenChat;
|
|
39
40
|
constructor(c) {
|
|
40
|
-
|
|
41
|
-
_UpdateManager_c.set(this, void 0);
|
|
42
|
-
_UpdateManager_updateState.set(this, void 0);
|
|
43
|
-
_UpdateManager_updateHandler.set(this, void 0);
|
|
44
|
-
_UpdateManager_LrecoverUpdateGap.set(this, void 0);
|
|
45
|
-
_UpdateManager_LrecoverChannelUpdateGap.set(this, void 0);
|
|
46
|
-
_UpdateManager_L$handleUpdate.set(this, void 0);
|
|
47
|
-
_UpdateManager_L$processUpdates.set(this, void 0);
|
|
48
|
-
_UpdateManager_LfetchState.set(this, void 0);
|
|
49
|
-
_UpdateManager_LopenChat.set(this, void 0);
|
|
50
|
-
_UpdateManager_Lmin.set(this, void 0);
|
|
51
|
-
_UpdateManager_defaultDropPendingUpdates.set(this, null);
|
|
52
|
-
_UpdateManager_state.set(this, undefined);
|
|
53
|
-
_UpdateManager_handleUpdateQueues.set(this, new Map());
|
|
54
|
-
_UpdateManager_nonFirst.set(this, new Set());
|
|
55
|
-
_UpdateManager_channelUpdateQueues.set(this, new Map());
|
|
56
|
-
_UpdateManager_ptsUpdateQueue.set(this, new Queue("ptsUpdate"));
|
|
57
|
-
_UpdateManager_qtsUpdateQueue.set(this, new Queue("qtsUpdate"));
|
|
58
|
-
_UpdateManager_processUpdatesQueue.set(this, new Queue("UpdateManager/processUpdates"));
|
|
59
|
-
_UpdateManager_recoveringUpdateGap.set(this, false);
|
|
60
|
-
_UpdateManager_recoverUpdateGapMutex.set(this, new Mutex());
|
|
61
|
-
_UpdateManager_handleUpdatesSet.set(this, new Set());
|
|
62
|
-
_UpdateManager_openChats.set(this, new Map());
|
|
63
|
-
__classPrivateFieldSet(this, _UpdateManager_c, c, "f");
|
|
41
|
+
this.#c = c;
|
|
64
42
|
const L = getLogger("UpdateManager").client(c.id);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
__classPrivateFieldSet(this, _UpdateManager_Lmin, L.branch("min"), "f");
|
|
43
|
+
this.#LrecoverUpdateGap = L.branch("recoverUpdateGap");
|
|
44
|
+
this.#LrecoverChannelUpdateGap = L.branch("recoverChannelUpdateGap");
|
|
45
|
+
this.#L$handleUpdate = L.branch("#handleUpdate");
|
|
46
|
+
this.#L$processUpdates = L.branch("#processUpdates");
|
|
47
|
+
this.#LfetchState = L.branch("fetchState");
|
|
48
|
+
this.#LopenChat = L.branch("openChat");
|
|
72
49
|
}
|
|
73
50
|
static isPtsUpdate(v) {
|
|
74
|
-
return isOneOf(["updateNewMessage", "updateDeleteMessages", "updateReadHistoryInbox", "updateReadHistoryOutbox", "updatePinnedChannelMessages", "updatePinnedMessages", "updateFolderPeers", "updateChannelWebPage", "updateEditMessage", "updateReadMessagesContents", "updateWebPage"], v);
|
|
51
|
+
return Api.isOneOf(["updateNewMessage", "updateDeleteMessages", "updateReadHistoryInbox", "updateReadHistoryOutbox", "updatePinnedChannelMessages", "updatePinnedMessages", "updateFolderPeers", "updateChannelWebPage", "updateEditMessage", "updateReadMessagesContents", "updateWebPage"], v);
|
|
75
52
|
}
|
|
76
53
|
static isQtsUpdate(v) {
|
|
77
|
-
return isOneOf(["updateNewEncryptedMessage", "updateMessagePollVote", "updateBotStopped", "updateChatParticipant", "updateChannelParticipant", "updateBotChatInviteRequester", "updateBotChatBoost", "updateBotMessageReaction", "updateBotMessageReactions", "updateBotBusinessConnect", "updateBotNewBusinessMessage", "updateBotEditBusinessMessage", "updateBotDeleteBusinessMessage"], v);
|
|
54
|
+
return Api.isOneOf(["updateNewEncryptedMessage", "updateMessagePollVote", "updateBotStopped", "updateChatParticipant", "updateChannelParticipant", "updateBotChatInviteRequester", "updateBotChatBoost", "updateBotMessageReaction", "updateBotMessageReactions", "updateBotBusinessConnect", "updateBotNewBusinessMessage", "updateBotEditBusinessMessage", "updateBotDeleteBusinessMessage"], v);
|
|
78
55
|
}
|
|
79
56
|
static isChannelPtsUpdate(v) {
|
|
80
|
-
return isOneOf([
|
|
57
|
+
return Api.isOneOf([
|
|
81
58
|
"updateNewChannelMessage",
|
|
82
59
|
"updateEditChannelMessage",
|
|
83
60
|
"updateDeleteChannelMessages",
|
|
84
61
|
"updateChannelTooLong",
|
|
85
62
|
], v);
|
|
86
63
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
#defaultDropPendingUpdates = null;
|
|
65
|
+
#mustDropPendingUpdates() {
|
|
66
|
+
if (typeof this.#c.dropPendingUpdates === "boolean") {
|
|
67
|
+
return this.#c.dropPendingUpdates;
|
|
68
|
+
}
|
|
69
|
+
if (this.#defaultDropPendingUpdates === null) {
|
|
70
|
+
this.#defaultDropPendingUpdates = this.#c.storage.isBot;
|
|
71
|
+
}
|
|
72
|
+
return this.#defaultDropPendingUpdates;
|
|
73
|
+
}
|
|
74
|
+
#state = null;
|
|
75
|
+
async #getState() {
|
|
76
|
+
if (this.#mustDropPendingUpdates()) {
|
|
77
|
+
return this.#state ?? null;
|
|
90
78
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
79
|
+
if (this.#state !== null) {
|
|
80
|
+
return this.#state;
|
|
81
|
+
}
|
|
82
|
+
const state = await this.#c.storage.getState();
|
|
83
|
+
return this.#state = state;
|
|
84
|
+
}
|
|
85
|
+
async #setState(state) {
|
|
86
|
+
this.#state = state;
|
|
87
|
+
if (!this.#mustDropPendingUpdates()) {
|
|
88
|
+
await this.#c.storage.setState(state);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async fetchState(source) {
|
|
92
|
+
let state = await this.#c.invoke({ _: "updates.getState" });
|
|
93
|
+
const difference = await this.#c.invoke({ ...state, _: "updates.getDifference" });
|
|
94
|
+
if (Api.is("updates.difference", difference)) {
|
|
94
95
|
state = difference.state;
|
|
95
96
|
}
|
|
96
|
-
else if (is("updates.differenceSlice", difference)) {
|
|
97
|
+
else if (Api.is("updates.differenceSlice", difference)) {
|
|
97
98
|
state = difference.intermediate_state;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
await
|
|
100
|
+
this.#updateState = state;
|
|
101
|
+
this.#LfetchState.debug(`state fetched [${source}]`);
|
|
102
|
+
if (this.#mustDropPendingUpdates()) {
|
|
103
|
+
await this.#setState(state);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if ("username" in chat && chat.username) {
|
|
124
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").messageStorage.updateUsernames(peerToChatId(chat), [chat.username]);
|
|
106
|
+
#extractMessages(context) {
|
|
107
|
+
const messages = new Array();
|
|
108
|
+
if (Array.isArray(context)) {
|
|
109
|
+
for (const item of context) {
|
|
110
|
+
messages.push(...this.#extractMessages(item));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (Api.isOneOf(["updates", "updatesCombined"], context)) {
|
|
114
|
+
messages.push(...this.#extractMessages(context.updates));
|
|
115
|
+
}
|
|
116
|
+
else if (Api.isOneOf(["updates.difference", "updates.differenceSlice", "updates.channelDifference"], context)) {
|
|
117
|
+
for (const message of context.new_messages) {
|
|
118
|
+
if (Api.is("message", message)) {
|
|
119
|
+
messages.push(message);
|
|
125
120
|
}
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
}
|
|
122
|
+
messages.push(...this.#extractMessages(context.other_updates));
|
|
123
|
+
}
|
|
124
|
+
else if (Api.isOneOf(["updateNewMessage", "updateNewChannelMessage", "updateEditMessage", "updateEditChannelMessage", "updateBotNewBusinessMessage", "updateBotNewBusinessMessage"], context)) {
|
|
125
|
+
if (Api.is("message", context.message)) {
|
|
126
|
+
messages.push(context.message);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else if (Api.is("message", context)) {
|
|
130
|
+
messages.push(context);
|
|
131
|
+
}
|
|
132
|
+
else if (context !== null && typeof context === "object" && "messages" in context && Array.isArray(context.messages)) {
|
|
133
|
+
for (const message of context.messages) {
|
|
134
|
+
if (Api.is("message", message)) {
|
|
135
|
+
messages.push(message);
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
}
|
|
139
|
+
return messages;
|
|
140
|
+
}
|
|
141
|
+
#extractMinPeerReferences(context) {
|
|
142
|
+
const minPeerReferences = new Array();
|
|
143
|
+
const messages = this.#extractMessages(context);
|
|
144
|
+
for (const message of messages) {
|
|
145
|
+
if (!message.from_id) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
minPeerReferences.push({ chatId: Api.peerToChatId(message.peer_id), senderId: Api.peerToChatId(message.from_id), messageId: message.id });
|
|
149
|
+
}
|
|
150
|
+
return minPeerReferences;
|
|
151
|
+
}
|
|
152
|
+
processChats(chats, _context) {
|
|
153
|
+
for (const chat of chats) {
|
|
154
|
+
this.processChat(chat);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
processChat(chat) {
|
|
158
|
+
if (Api.is("chatEmpty", chat)) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (Api.is("channel", chat) && chat.min) {
|
|
162
|
+
return; // TODO
|
|
163
|
+
}
|
|
164
|
+
this.#c.messageStorage.setPeer(chat);
|
|
165
|
+
if ("username" in chat && chat.username) {
|
|
166
|
+
this.#c.messageStorage.usernames.set([chat.username], [Api.peerToChatId(chat), new Date()]);
|
|
167
|
+
}
|
|
168
|
+
if ("usernames" in chat && chat.usernames) {
|
|
169
|
+
const value = [Api.peerToChatId(chat), new Date()];
|
|
170
|
+
for (const username of chat.usernames) {
|
|
171
|
+
this.#c.messageStorage.usernames.set([username.username], value);
|
|
132
172
|
}
|
|
133
173
|
}
|
|
134
174
|
}
|
|
135
175
|
async processResult(result) {
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"channels.channelParticipant",
|
|
145
|
-
"channels.channelParticipants",
|
|
146
|
-
"channels.sendAsPeers",
|
|
147
|
-
"chatInvite",
|
|
148
|
-
"chatlists.chatlistInvite",
|
|
149
|
-
"chatlists.chatlistInviteAlready",
|
|
150
|
-
"chatlists.chatlistUpdates",
|
|
151
|
-
"chatlists.exportedInvites",
|
|
152
|
-
"contacts.blocked",
|
|
153
|
-
"contacts.blockedSlice",
|
|
154
|
-
"contacts.contacts",
|
|
155
|
-
"contacts.found",
|
|
156
|
-
"contacts.importedContacts",
|
|
157
|
-
"contacts.resolvedPeer",
|
|
158
|
-
"contacts.topPeers",
|
|
159
|
-
"help.promoData",
|
|
160
|
-
"help.recentMeUrls",
|
|
161
|
-
"messages.botResults",
|
|
162
|
-
"messages.channelMessages",
|
|
163
|
-
"messages.chatAdminsWithInvites",
|
|
164
|
-
"messages.chatFull",
|
|
165
|
-
"messages.chatInviteImporters",
|
|
166
|
-
"messages.chats",
|
|
167
|
-
"messages.chatsSlice",
|
|
168
|
-
"messages.dialogs",
|
|
169
|
-
"messages.dialogsSlice",
|
|
170
|
-
"messages.discussionMessage",
|
|
171
|
-
"messages.exportedChatInvite",
|
|
172
|
-
"messages.exportedChatInviteReplaced",
|
|
173
|
-
"messages.exportedChatInvites",
|
|
174
|
-
"messages.forumTopics",
|
|
175
|
-
"messages.highScores",
|
|
176
|
-
"messages.inactiveChats",
|
|
177
|
-
"messages.messageReactionsList",
|
|
178
|
-
"messages.messages",
|
|
179
|
-
"messages.messagesSlice",
|
|
180
|
-
"messages.messageViews",
|
|
181
|
-
"messages.peerDialogs",
|
|
182
|
-
"messages.peerSettings",
|
|
183
|
-
"messages.searchResultsCalendar",
|
|
184
|
-
"messages.sponsoredMessages",
|
|
185
|
-
"messages.votesList",
|
|
186
|
-
"messages.webPage",
|
|
187
|
-
"payments.checkedGiftCode",
|
|
188
|
-
"payments.paymentForm",
|
|
189
|
-
"payments.paymentReceipt",
|
|
190
|
-
"phone.groupCall",
|
|
191
|
-
"phone.groupParticipants",
|
|
192
|
-
"phone.joinAsPeers",
|
|
193
|
-
"phone.phoneCall",
|
|
194
|
-
"photos.photo",
|
|
195
|
-
"photos.photos",
|
|
196
|
-
"photos.photosSlice",
|
|
197
|
-
"premium.boostsList",
|
|
198
|
-
"premium.myBoosts",
|
|
199
|
-
"stats.megagroupStats",
|
|
200
|
-
"stats.publicForwards",
|
|
201
|
-
"stories.allStories",
|
|
202
|
-
"stories.peerStories",
|
|
203
|
-
"stories.stories",
|
|
204
|
-
"stories.storyViews",
|
|
205
|
-
"stories.storyViewsList",
|
|
206
|
-
"users.userFull",
|
|
207
|
-
], result)) {
|
|
176
|
+
if (Array.isArray(result)) { // users.getUsers, bots.getAdminedBots
|
|
177
|
+
if (Api.isOfEnum("User", result[0])) {
|
|
178
|
+
for (const user of result) {
|
|
179
|
+
this.processUser(user);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else if (result !== null && typeof result === "object") {
|
|
208
184
|
if ("chats" in result) {
|
|
209
|
-
|
|
185
|
+
let valid = true;
|
|
186
|
+
for (const chat of result.chats) {
|
|
187
|
+
if (!Api.isOfEnum("Chat", chat)) {
|
|
188
|
+
valid = false;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (valid) {
|
|
193
|
+
this.processChats(result.chats, result);
|
|
194
|
+
}
|
|
210
195
|
}
|
|
211
|
-
if ("users" in result) {
|
|
212
|
-
|
|
196
|
+
if ("users" in result && Array.isArray(result.users)) {
|
|
197
|
+
let valid = true;
|
|
198
|
+
for (const user of result.users) {
|
|
199
|
+
if (!Api.isOfEnum("User", user)) {
|
|
200
|
+
valid = false;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (valid) {
|
|
205
|
+
this.processUsers(result.users, result);
|
|
206
|
+
}
|
|
213
207
|
}
|
|
214
208
|
if ("messages" in result && Array.isArray(result.messages)) {
|
|
215
209
|
for (const message of result.messages) {
|
|
216
|
-
if (is("message", message) || is("messageService", message)) {
|
|
217
|
-
await
|
|
210
|
+
if (Api.is("message", message) || Api.is("messageService", message)) {
|
|
211
|
+
await this.#c.messageStorage.setMessage(Api.peerToChatId(message.peer_id), message.id, message);
|
|
218
212
|
}
|
|
219
213
|
}
|
|
220
214
|
}
|
|
221
215
|
}
|
|
222
|
-
if (is("messages.messages", result)) {
|
|
216
|
+
if (Api.is("messages.messages", result)) {
|
|
223
217
|
for (const message of result.messages) {
|
|
224
|
-
if (is("message", message) || is("messageService", message)) {
|
|
225
|
-
await
|
|
218
|
+
if (Api.is("message", message) || Api.is("messageService", message)) {
|
|
219
|
+
await this.#c.messageStorage.setMessage(Api.peerToChatId(message.peer_id), message.id, message);
|
|
226
220
|
}
|
|
227
221
|
}
|
|
228
222
|
}
|
|
229
223
|
}
|
|
230
|
-
|
|
224
|
+
processUsers(users, _context) {
|
|
231
225
|
for (const user of users) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("user min peer reference stored", chatId, senderId, messageId);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
if (user.username) {
|
|
256
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").messageStorage.updateUsernames(peerToChatId(user), [user.username]);
|
|
257
|
-
}
|
|
258
|
-
if (user.usernames) {
|
|
259
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").messageStorage.updateUsernames(peerToChatId(user), user.usernames.map((v) => v.username));
|
|
260
|
-
}
|
|
226
|
+
this.processUser(user);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
processUser(user) {
|
|
230
|
+
if (!Api.is("user", user)) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
if (user.min) {
|
|
234
|
+
return; // TODO
|
|
235
|
+
}
|
|
236
|
+
this.#c.messageStorage.setPeer(user);
|
|
237
|
+
if (user.username) {
|
|
238
|
+
this.#c.messageStorage.usernames.set([user.username], [Api.peerToChatId(user), new Date()]);
|
|
239
|
+
}
|
|
240
|
+
if (user.usernames) {
|
|
241
|
+
const value = [Api.peerToChatId(user), new Date()];
|
|
242
|
+
for (const username of user.usernames) {
|
|
243
|
+
this.#c.messageStorage.usernames.set([username.username], value);
|
|
261
244
|
}
|
|
262
245
|
}
|
|
263
246
|
}
|
|
247
|
+
#handleUpdateQueues = new Map();
|
|
264
248
|
getHandleUpdateQueue(boxId) {
|
|
265
|
-
let queue =
|
|
249
|
+
let queue = this.#handleUpdateQueues.get(boxId);
|
|
266
250
|
if (queue !== undefined) {
|
|
267
251
|
return queue;
|
|
268
252
|
}
|
|
269
253
|
else {
|
|
270
|
-
queue = new Queue(`handleUpdate-${boxId}
|
|
254
|
+
queue = new Queue(`handleUpdate-${boxId}`, true);
|
|
271
255
|
return queue;
|
|
272
256
|
}
|
|
273
257
|
}
|
|
274
|
-
|
|
275
|
-
|
|
258
|
+
#nonFirst = new Set();
|
|
259
|
+
async #getChannelPtsWithDropPendingUpdatesCheck(channelId) {
|
|
260
|
+
if (!(this.#mustDropPendingUpdates())) {
|
|
261
|
+
return await this.#c.storage.channelPts.get([channelId]);
|
|
262
|
+
}
|
|
263
|
+
const first = !this.#nonFirst.has(channelId);
|
|
264
|
+
if (first) {
|
|
265
|
+
this.#nonFirst.add(channelId);
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
return await this.#c.storage.channelPts.get([channelId]);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
async #checkGap(pts, ptsCount) {
|
|
273
|
+
const localState = await this.#getLocalState();
|
|
274
|
+
if (localState.pts + ptsCount < pts) {
|
|
275
|
+
await this.recoverUpdateGap("processUpdates[pts]");
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
async #checkGapQts(qts) {
|
|
279
|
+
const localState = await this.#getLocalState();
|
|
280
|
+
if (localState.qts + _a.QTS_COUNT < qts) {
|
|
281
|
+
await this.recoverUpdateGap("processUpdates[qts]");
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async #checkChannelGap(channelId, pts, ptsCount) {
|
|
285
|
+
let localPts = await this.#getChannelPtsWithDropPendingUpdatesCheck(channelId);
|
|
286
|
+
if (!localPts) {
|
|
287
|
+
localPts = pts - ptsCount;
|
|
288
|
+
}
|
|
289
|
+
if (localPts + ptsCount < pts) {
|
|
290
|
+
await this.#recoverChannelUpdateGap(channelId, "processUpdates");
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
#channelUpdateQueues = new Map();
|
|
294
|
+
async #processChannelPtsUpdateInner(update, checkGap) {
|
|
295
|
+
const channelId = Api.is("updateNewChannelMessage", update) || Api.is("updateEditChannelMessage", update) ? Api.as("peerChannel", update.message.peer_id).channel_id : update.channel_id;
|
|
296
|
+
if (Api.is("updateChannelTooLong", update)) {
|
|
297
|
+
if (update.pts !== undefined) {
|
|
298
|
+
this.#c.storage.channelPts.set([channelId], update.pts);
|
|
299
|
+
}
|
|
300
|
+
await this.#recoverChannelUpdateGap(channelId, "updateChannelTooLong");
|
|
276
301
|
return;
|
|
277
302
|
}
|
|
278
|
-
|
|
303
|
+
if (update.pts !== 0) {
|
|
304
|
+
const ptsCount = update.pts_count;
|
|
305
|
+
if (checkGap) {
|
|
306
|
+
await this.#checkChannelGap(channelId, update.pts, ptsCount);
|
|
307
|
+
}
|
|
308
|
+
let currentPts = await this.#getChannelPtsWithDropPendingUpdatesCheck(channelId);
|
|
309
|
+
currentPts ??= update.pts - ptsCount;
|
|
310
|
+
if (currentPts + ptsCount > update.pts) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (this.#c.guaranteeUpdateDelivery) {
|
|
315
|
+
await this.#c.storage.setUpdate(channelId, update);
|
|
316
|
+
}
|
|
317
|
+
if (update.pts !== 0) {
|
|
318
|
+
this.#c.storage.channelPts.set([channelId], update.pts);
|
|
319
|
+
}
|
|
320
|
+
this.#queueUpdate(update, channelId, true);
|
|
279
321
|
}
|
|
280
|
-
|
|
281
|
-
|
|
322
|
+
#queueUpdate(update, boxId, pts) {
|
|
323
|
+
this.getHandleUpdateQueue(boxId).add(async () => {
|
|
324
|
+
if (this.#c.guaranteeUpdateDelivery && pts) {
|
|
325
|
+
await this.#handleStoredUpdates(boxId);
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
await (await this.#handleUpdate(update))();
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
#processChannelPtsUpdate(update, checkGap) {
|
|
333
|
+
const channelId = Api.is("updateNewChannelMessage", update) || Api.is("updateEditChannelMessage", update) ? Api.as("peerChannel", update.message.peer_id).channel_id : update.channel_id;
|
|
334
|
+
let queue = this.#channelUpdateQueues.get(channelId);
|
|
335
|
+
if (queue === undefined) {
|
|
336
|
+
queue = new Queue(`channelUpdates-${channelId}`);
|
|
337
|
+
this.#channelUpdateQueues.set(channelId, queue);
|
|
338
|
+
}
|
|
339
|
+
queue.add(async () => {
|
|
340
|
+
await this.#processChannelPtsUpdateInner(update, checkGap);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
async #processPtsUpdateInner(update, checkGap) {
|
|
344
|
+
if (update.pts !== 0 && checkGap) {
|
|
345
|
+
await this.#checkGap(update.pts, update.pts_count);
|
|
346
|
+
if (await this.#needsGetDifference(update)) {
|
|
347
|
+
await this.recoverUpdateGap("needsGetDifference");
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
const localState = await this.#getLocalState();
|
|
351
|
+
if (update.pts !== 0 && localState.pts + update.pts_count > update.pts) {
|
|
282
352
|
return;
|
|
283
353
|
}
|
|
284
|
-
|
|
285
|
-
|
|
354
|
+
if (this.#c.guaranteeUpdateDelivery) {
|
|
355
|
+
await this.#c.storage.setUpdate(_a.MAIN_BOX_ID, update);
|
|
356
|
+
}
|
|
357
|
+
if (update.pts !== 0) {
|
|
358
|
+
await this.#setUpdatePts(update.pts);
|
|
359
|
+
}
|
|
360
|
+
this.#queueUpdate(update, 1n, false);
|
|
361
|
+
}
|
|
362
|
+
#ptsUpdateQueue = new Queue("ptsUpdate");
|
|
363
|
+
#processPtsUpdate(update, checkGap) {
|
|
364
|
+
this.#ptsUpdateQueue.add(async () => {
|
|
365
|
+
await this.#processPtsUpdateInner(update, checkGap);
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
async #processQtsUpdateInner(update, checkGap) {
|
|
369
|
+
const localState = await this.#getLocalState();
|
|
370
|
+
if (update.qts !== 0) {
|
|
371
|
+
if (checkGap) {
|
|
372
|
+
await this.#checkGapQts(update.qts);
|
|
373
|
+
}
|
|
374
|
+
if (localState.qts + _a.QTS_COUNT > update.qts) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (this.#c.guaranteeUpdateDelivery) {
|
|
379
|
+
await this.#c.storage.setUpdate(_a.MAIN_BOX_ID, update);
|
|
380
|
+
}
|
|
381
|
+
if (update.qts !== 0) {
|
|
382
|
+
await this.#setUpdateQts(update.qts);
|
|
383
|
+
}
|
|
384
|
+
this.#queueUpdate(update, 0n, true);
|
|
385
|
+
}
|
|
386
|
+
#qtsUpdateQueue = new Queue("qtsUpdate");
|
|
387
|
+
#processQtsUpdate(update, checkGap) {
|
|
388
|
+
this.#qtsUpdateQueue.add(async () => {
|
|
389
|
+
await this.#processQtsUpdateInner(update, checkGap);
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
#processUpdatesQueue = new Queue("UpdateManager/processUpdates");
|
|
393
|
+
processUpdates(updates, checkGap, call = null, callback) {
|
|
394
|
+
this.#processUpdatesQueue.add(() => this.#processUpdates(updates, checkGap, call).finally(callback));
|
|
395
|
+
}
|
|
396
|
+
async #processUpdates(updates_, checkGap, call = null) {
|
|
397
|
+
/// First, individual updates (Update[1]) are extracted from Updates.[2]
|
|
398
|
+
///
|
|
399
|
+
/// If an updatesTooLong[3] was received, an update gap recovery is initiated and no further action will be taken.
|
|
400
|
+
///
|
|
401
|
+
/// [1]: https://core.telegram.org/type/Update
|
|
402
|
+
/// [2]: https://core.telegram.org/type/Updates
|
|
403
|
+
/// [3]: https://core.telegram.org/constructor/updatesTooLong
|
|
404
|
+
let updates;
|
|
405
|
+
if (Api.is("updatesCombined", updates_) || Api.is("updates", updates_)) {
|
|
406
|
+
updates = updates_.updates;
|
|
407
|
+
const seq = updates_.seq;
|
|
408
|
+
const seqStart = "seq_start" in updates_ ? updates_.seq_start : updates_.seq;
|
|
409
|
+
if (checkGap) {
|
|
410
|
+
if (seqStart === 0) {
|
|
411
|
+
checkGap = false;
|
|
412
|
+
this.#L$processUpdates.debug("seqStart=0");
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
const localState = await this.#getLocalState();
|
|
416
|
+
const localSeq = localState.seq;
|
|
417
|
+
if (localSeq + 1 === seqStart) {
|
|
418
|
+
// The update sequence can be applied.
|
|
419
|
+
localState.seq = seq;
|
|
420
|
+
localState.date = updates_.date;
|
|
421
|
+
await this.#setUpdateStateDate(updates_.date);
|
|
422
|
+
await this.#setState(localState);
|
|
423
|
+
}
|
|
424
|
+
else if (localSeq + 1 > seqStart) {
|
|
425
|
+
// The update sequence was already applied, and must be ignored.
|
|
426
|
+
this.#L$processUpdates.debug("localSeq + 1 > seqStart");
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
else if (localSeq + 1 < seqStart) {
|
|
430
|
+
// There's an updates gap that must be filled.
|
|
431
|
+
await this.recoverUpdateGap("localSeq + 1 < seqStart");
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
else if (Api.is("updateShort", updates_)) {
|
|
437
|
+
updates = [updates_.update];
|
|
438
|
+
}
|
|
439
|
+
else if (Api.is("updateShortMessage", updates_)) {
|
|
440
|
+
updates = [
|
|
441
|
+
{
|
|
442
|
+
_: "updateNewMessage",
|
|
443
|
+
message: {
|
|
444
|
+
_: "message",
|
|
445
|
+
out: updates_.out,
|
|
446
|
+
mentioned: updates_.mentioned,
|
|
447
|
+
media_unread: updates_.media_unread,
|
|
448
|
+
silent: updates_.silent,
|
|
449
|
+
id: updates_.id,
|
|
450
|
+
from_id: updates_.out ? ({ _: "peerUser", user_id: BigInt(await this.#c.getSelfId()) }) : ({ _: "peerUser", user_id: updates_.user_id }),
|
|
451
|
+
peer_id: { _: "peerUser", user_id: updates_.user_id },
|
|
452
|
+
message: updates_.message,
|
|
453
|
+
date: updates_.date,
|
|
454
|
+
fwd_from: updates_.fwd_from,
|
|
455
|
+
via_bot_id: updates_.via_bot_id,
|
|
456
|
+
reply_to: updates_.reply_to,
|
|
457
|
+
entities: updates_.entities,
|
|
458
|
+
ttl_period: updates_.ttl_period,
|
|
459
|
+
},
|
|
460
|
+
pts: updates_.pts,
|
|
461
|
+
pts_count: updates_.pts_count,
|
|
462
|
+
},
|
|
463
|
+
];
|
|
464
|
+
}
|
|
465
|
+
else if (Api.is("updateShortChatMessage", updates_)) {
|
|
466
|
+
updates = [
|
|
467
|
+
{
|
|
468
|
+
_: "updateNewMessage",
|
|
469
|
+
message: {
|
|
470
|
+
_: "message",
|
|
471
|
+
mentioned: updates_.mentioned,
|
|
472
|
+
media_unread: updates_.media_unread,
|
|
473
|
+
silent: updates_.silent,
|
|
474
|
+
id: updates_.id,
|
|
475
|
+
from_id: { _: "peerUser", user_id: updates_.from_id },
|
|
476
|
+
peer_id: { _: "peerChat", chat_id: updates_.chat_id },
|
|
477
|
+
fwd_from: updates_.fwd_from,
|
|
478
|
+
via_bot_id: updates_.via_bot_id,
|
|
479
|
+
reply_to: updates_.reply_to,
|
|
480
|
+
date: updates_.date,
|
|
481
|
+
message: updates_.message,
|
|
482
|
+
entities: updates_.entities,
|
|
483
|
+
ttl_period: updates_.ttl_period,
|
|
484
|
+
},
|
|
485
|
+
pts: updates_.pts,
|
|
486
|
+
pts_count: updates_.pts_count,
|
|
487
|
+
},
|
|
488
|
+
];
|
|
489
|
+
}
|
|
490
|
+
else if (Api.is("updateShortSentMessage", updates_)) {
|
|
491
|
+
if (!Api.is("messages.sendMessage", call)) {
|
|
492
|
+
unreachable();
|
|
493
|
+
}
|
|
494
|
+
updates = [{
|
|
495
|
+
_: "updateNewMessage",
|
|
496
|
+
message: {
|
|
497
|
+
_: "message",
|
|
498
|
+
out: updates_.out,
|
|
499
|
+
silent: call.silent,
|
|
500
|
+
id: updates_.id,
|
|
501
|
+
from_id: { _: "peerUser", user_id: BigInt(await this.#c.getSelfId()) },
|
|
502
|
+
peer_id: Api.inputPeerToPeer(call.peer),
|
|
503
|
+
message: call.message,
|
|
504
|
+
media: updates_.media,
|
|
505
|
+
date: updates_.date,
|
|
506
|
+
// reply_to: call.reply_to, // TODO?
|
|
507
|
+
entities: updates_.entities,
|
|
508
|
+
ttl_period: updates_.ttl_period,
|
|
509
|
+
},
|
|
510
|
+
pts: updates_.pts,
|
|
511
|
+
pts_count: updates_.pts_count,
|
|
512
|
+
}];
|
|
513
|
+
}
|
|
514
|
+
else if (Api.is("updatesTooLong", updates_)) {
|
|
515
|
+
await this.recoverUpdateGap("updatesTooLong");
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
else if (Api.isOfEnum("Update", updates_)) {
|
|
519
|
+
updates = [updates_];
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
unreachable();
|
|
523
|
+
}
|
|
524
|
+
/// We process the updates when we are sure there is no gap.
|
|
525
|
+
if (Api.is("updates", updates_) || Api.is("updatesCombined", updates_)) {
|
|
526
|
+
this.processChats(updates_.chats, updates_);
|
|
527
|
+
this.processUsers(updates_.users, updates_);
|
|
528
|
+
this.#setUpdateStateDate(updates_.date);
|
|
529
|
+
}
|
|
530
|
+
else if (Api.isOneOf([
|
|
531
|
+
"updateShort",
|
|
532
|
+
"updateShortMessage",
|
|
533
|
+
"updateShortChatMessage",
|
|
534
|
+
"updateShortSentMessage",
|
|
535
|
+
], updates_)) {
|
|
536
|
+
await this.#setUpdateStateDate(updates_.date);
|
|
537
|
+
}
|
|
538
|
+
for (const update of updates) {
|
|
539
|
+
if (Api.is("updatePtsChanged", update)) {
|
|
540
|
+
await this.fetchState("updatePtsChanged");
|
|
541
|
+
if (this.#updateState) {
|
|
542
|
+
await this.#setState(this.#updateState);
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
unreachable();
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
else if (_a.isPtsUpdate(update)) {
|
|
549
|
+
this.#processPtsUpdate(update, checkGap);
|
|
550
|
+
}
|
|
551
|
+
else if (_a.isChannelPtsUpdate(update)) {
|
|
552
|
+
this.#processChannelPtsUpdate(update, checkGap);
|
|
553
|
+
}
|
|
554
|
+
else if (_a.isQtsUpdate(update)) {
|
|
555
|
+
this.#processQtsUpdate(update, checkGap);
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
this.#queueUpdate(update, 0n, false);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
async #setUpdateStateDate(date) {
|
|
563
|
+
const localState = await this.#getLocalState();
|
|
564
|
+
localState.date = date;
|
|
565
|
+
await this.#setState(localState);
|
|
566
|
+
}
|
|
567
|
+
async #setUpdatePts(pts) {
|
|
568
|
+
const localState = await this.#getLocalState();
|
|
569
|
+
localState.pts = pts;
|
|
570
|
+
await this.#setState(localState);
|
|
571
|
+
}
|
|
572
|
+
async #setUpdateQts(qts) {
|
|
573
|
+
const localState = await this.#getLocalState();
|
|
574
|
+
localState.qts = qts;
|
|
575
|
+
await this.#setState(localState);
|
|
576
|
+
}
|
|
577
|
+
async #getLocalState() {
|
|
578
|
+
let localState = await this.#getState();
|
|
579
|
+
if (!localState) {
|
|
580
|
+
if (this.#updateState) {
|
|
581
|
+
localState = this.#updateState;
|
|
582
|
+
await this.#setState(localState);
|
|
583
|
+
}
|
|
584
|
+
else {
|
|
585
|
+
await this.fetchState("getLocalState");
|
|
586
|
+
if (this.#updateState) {
|
|
587
|
+
localState = this.#updateState;
|
|
588
|
+
await this.#setState(localState);
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
unreachable();
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return localState;
|
|
596
|
+
}
|
|
597
|
+
#recoveringUpdateGap = false;
|
|
598
|
+
#recoverUpdateGapMutex = new Mutex();
|
|
599
|
+
async recoverUpdateGap(source) {
|
|
600
|
+
const wasRecoveringUpdateGap = this.#recoveringUpdateGap;
|
|
601
|
+
const unlock = await this.#recoverUpdateGapMutex.lock();
|
|
286
602
|
if (wasRecoveringUpdateGap) {
|
|
287
|
-
|
|
603
|
+
this.#LrecoverUpdateGap.debug(`update gap was just recovered [${source}]`);
|
|
288
604
|
unlock();
|
|
289
605
|
return;
|
|
290
606
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
607
|
+
this.#recoveringUpdateGap = true;
|
|
608
|
+
this.#LrecoverUpdateGap.debug(`recovering from update gap [${source}]`);
|
|
609
|
+
this.#c.setConnectionState("updating");
|
|
294
610
|
try {
|
|
295
|
-
let
|
|
296
|
-
let state = await
|
|
611
|
+
let retryIn = 5;
|
|
612
|
+
let state = await this.#getLocalState();
|
|
297
613
|
while (true) {
|
|
298
614
|
let difference;
|
|
299
615
|
try {
|
|
300
|
-
difference = await
|
|
616
|
+
difference = await this.#c.invoke({ _: "updates.getDifference", pts: state.pts, date: state.date, qts: state.qts ?? 0 });
|
|
301
617
|
}
|
|
302
618
|
catch (err) {
|
|
303
619
|
if (err instanceof PersistentTimestampInvalid) {
|
|
304
|
-
await
|
|
305
|
-
++
|
|
306
|
-
if (
|
|
307
|
-
|
|
620
|
+
await delay(retryIn * SECOND);
|
|
621
|
+
++retryIn;
|
|
622
|
+
if (retryIn > 60) {
|
|
623
|
+
retryIn = 60;
|
|
308
624
|
}
|
|
309
625
|
continue;
|
|
310
626
|
}
|
|
@@ -312,37 +628,36 @@ export class UpdateManager {
|
|
|
312
628
|
throw err;
|
|
313
629
|
}
|
|
314
630
|
}
|
|
315
|
-
if (is("updates.difference", difference) || is("updates.differenceSlice", difference)) {
|
|
316
|
-
|
|
317
|
-
|
|
631
|
+
if (Api.is("updates.difference", difference) || Api.is("updates.differenceSlice", difference)) {
|
|
632
|
+
this.processChats(difference.chats, difference);
|
|
633
|
+
this.processUsers(difference.users, difference);
|
|
318
634
|
for (const message of difference.new_messages) {
|
|
319
|
-
await
|
|
635
|
+
await this.#processUpdates({ _: "updateNewMessage", message, pts: 0, pts_count: 0 }, false);
|
|
320
636
|
}
|
|
321
637
|
for (const update of difference.other_updates) {
|
|
322
|
-
await
|
|
638
|
+
await this.#processUpdates(update, false);
|
|
323
639
|
}
|
|
324
|
-
if (is("updates.difference", difference)) {
|
|
325
|
-
await
|
|
326
|
-
|
|
640
|
+
if (Api.is("updates.difference", difference)) {
|
|
641
|
+
await this.#setState(difference.state);
|
|
642
|
+
this.#LrecoverUpdateGap.debug("recovered from update gap");
|
|
327
643
|
break;
|
|
328
644
|
}
|
|
329
|
-
else if (is("updates.differenceSlice", difference)) {
|
|
645
|
+
else if (Api.is("updates.differenceSlice", difference)) {
|
|
330
646
|
state = difference.intermediate_state;
|
|
647
|
+
await this.#setState(state);
|
|
331
648
|
}
|
|
332
649
|
else {
|
|
333
650
|
unreachable();
|
|
334
651
|
}
|
|
335
652
|
}
|
|
336
|
-
else if (is("updates.differenceTooLong", difference)) {
|
|
337
|
-
await
|
|
338
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.removeChats(0);
|
|
339
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.removeChats(1);
|
|
653
|
+
else if (Api.is("updates.differenceTooLong", difference)) {
|
|
654
|
+
await this.#c.messageStorage.deleteMessages();
|
|
340
655
|
state.pts = difference.pts;
|
|
341
|
-
|
|
656
|
+
this.#LrecoverUpdateGap.debug("received differenceTooLong");
|
|
342
657
|
}
|
|
343
|
-
else if (is("updates.differenceEmpty", difference)) {
|
|
344
|
-
await
|
|
345
|
-
|
|
658
|
+
else if (Api.is("updates.differenceEmpty", difference)) {
|
|
659
|
+
await this.#setUpdateStateDate(difference.date);
|
|
660
|
+
this.#LrecoverUpdateGap.debug("there was no update gap");
|
|
346
661
|
break;
|
|
347
662
|
}
|
|
348
663
|
else {
|
|
@@ -351,77 +666,332 @@ export class UpdateManager {
|
|
|
351
666
|
}
|
|
352
667
|
}
|
|
353
668
|
catch (err) {
|
|
354
|
-
|
|
669
|
+
this.#LrecoverUpdateGap.error(err);
|
|
355
670
|
}
|
|
356
671
|
finally {
|
|
357
672
|
unlock();
|
|
358
|
-
|
|
359
|
-
|
|
673
|
+
this.#c.resetConnectionState();
|
|
674
|
+
this.#recoveringUpdateGap = false;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
async #recoverChannelUpdateGap(channelId, source) {
|
|
678
|
+
let lastTimeout = 10;
|
|
679
|
+
this.#LrecoverChannelUpdateGap.debug(`recovering channel update gap [${channelId}, ${source}]`);
|
|
680
|
+
const pts_ = await this.#c.storage.channelPts.get([channelId]);
|
|
681
|
+
let pts = pts_ === null ? 1 : pts_;
|
|
682
|
+
let retryIn = 5;
|
|
683
|
+
while (true) {
|
|
684
|
+
const { access_hash } = await this.#c.getInputPeer(ZERO_CHANNEL_ID + -Number(channelId)).then((v) => Api.as("inputPeerChannel", v));
|
|
685
|
+
let difference;
|
|
686
|
+
try {
|
|
687
|
+
difference = await this.#c.invoke({
|
|
688
|
+
_: "updates.getChannelDifference",
|
|
689
|
+
pts,
|
|
690
|
+
channel: { _: "inputChannel", channel_id: channelId, access_hash },
|
|
691
|
+
filter: { _: "channelMessagesFilterEmpty" },
|
|
692
|
+
limit: this.#c.storage.isBot ? CHANNEL_DIFFERENCE_LIMIT_BOT : CHANNEL_DIFFERENCE_LIMIT_USER,
|
|
693
|
+
});
|
|
694
|
+
lastTimeout = difference.timeout ?? lastTimeout;
|
|
695
|
+
}
|
|
696
|
+
catch (err) {
|
|
697
|
+
if (err instanceof PersistentTimestampInvalid) {
|
|
698
|
+
await delay(retryIn * SECOND);
|
|
699
|
+
retryIn += 5;
|
|
700
|
+
if (retryIn > 60) {
|
|
701
|
+
retryIn = 60;
|
|
702
|
+
}
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
throw err;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
if (Api.is("updates.channelDifference", difference)) {
|
|
710
|
+
this.processChats(difference.chats, difference);
|
|
711
|
+
this.processUsers(difference.users, difference);
|
|
712
|
+
for (const message of difference.new_messages) {
|
|
713
|
+
await this.#processUpdates({ _: "updateNewChannelMessage", message, pts: 0, pts_count: 0 }, false);
|
|
714
|
+
}
|
|
715
|
+
for (const update of difference.other_updates) {
|
|
716
|
+
await this.#processUpdates(update, false);
|
|
717
|
+
}
|
|
718
|
+
this.#c.storage.channelPts.set([channelId], difference.pts);
|
|
719
|
+
this.#LrecoverChannelUpdateGap.debug(`recovered from update gap [${channelId}, ${source}]`, channelId, source);
|
|
720
|
+
break;
|
|
721
|
+
}
|
|
722
|
+
else if (Api.is("updates.channelDifferenceTooLong", difference)) {
|
|
723
|
+
// TODO: invalidate messages
|
|
724
|
+
this.#LrecoverChannelUpdateGap.debug("received channelDifferenceTooLong");
|
|
725
|
+
this.processChats(difference.chats, difference);
|
|
726
|
+
this.processUsers(difference.users, difference);
|
|
727
|
+
for (const message of difference.messages) {
|
|
728
|
+
await this.#processUpdates({ _: "updateNewChannelMessage", message, pts: 0, pts_count: 0 }, false);
|
|
729
|
+
}
|
|
730
|
+
const pts_ = Api.as("dialog", difference.dialog).pts;
|
|
731
|
+
if (pts_ !== undefined) {
|
|
732
|
+
pts = pts_;
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
unreachable();
|
|
736
|
+
}
|
|
737
|
+
this.#LrecoverChannelUpdateGap.debug("processed channelDifferenceTooLong");
|
|
738
|
+
}
|
|
739
|
+
else if (Api.is("updates.channelDifferenceEmpty", difference)) {
|
|
740
|
+
this.#LrecoverChannelUpdateGap.debug("there was no update gap");
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
360
743
|
}
|
|
744
|
+
return lastTimeout;
|
|
361
745
|
}
|
|
362
|
-
|
|
363
|
-
|
|
746
|
+
#handleUpdatesSet = new Set();
|
|
747
|
+
async #handleStoredUpdates(boxId) {
|
|
748
|
+
if (this.#handleUpdatesSet.has(boxId)) {
|
|
364
749
|
return;
|
|
365
750
|
}
|
|
366
|
-
|
|
751
|
+
this.#handleUpdatesSet.add(boxId);
|
|
752
|
+
do {
|
|
753
|
+
const maybeUpdate = await this.#c.storage.getFirstUpdate(boxId);
|
|
754
|
+
if (maybeUpdate === null) {
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
const [key, update] = maybeUpdate;
|
|
758
|
+
for (let i = 0; i < 100; ++i) {
|
|
759
|
+
try {
|
|
760
|
+
const handle = await this.#handleUpdate(update);
|
|
761
|
+
handle: for (let i = 0; i < 2; ++i) {
|
|
762
|
+
try {
|
|
763
|
+
await handle();
|
|
764
|
+
break handle;
|
|
765
|
+
}
|
|
766
|
+
catch {
|
|
767
|
+
continue handle;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
catch (err) {
|
|
773
|
+
this.#L$handleUpdate.error(err);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
await this.#c.storage.set(key, null);
|
|
777
|
+
} while (true);
|
|
778
|
+
this.#handleUpdatesSet.delete(boxId);
|
|
779
|
+
}
|
|
780
|
+
#handleUpdate(update) {
|
|
781
|
+
const handler = this.#updateHandler;
|
|
782
|
+
if (handler) {
|
|
783
|
+
return handler(update);
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
return Promise.resolve(() => Promise.resolve());
|
|
787
|
+
}
|
|
367
788
|
}
|
|
368
|
-
async
|
|
369
|
-
|
|
370
|
-
|
|
789
|
+
async #needsGetDifference(update) {
|
|
790
|
+
const chatIds = this.#collectChatIds(update);
|
|
791
|
+
if (!chatIds.size) {
|
|
792
|
+
return false;
|
|
793
|
+
}
|
|
794
|
+
return (await Promise.all(chatIds.values().map((v) => this.#c.messageStorage.peers.get([v])))).some((v) => !v);
|
|
795
|
+
}
|
|
796
|
+
#collectChatIds(object) {
|
|
797
|
+
const chatIds = new Set();
|
|
798
|
+
if (Api.is("messageFwdHeader", object)) {
|
|
799
|
+
if (object.from_id) {
|
|
800
|
+
chatIds.add(peerToChatId(object.from_id));
|
|
801
|
+
}
|
|
802
|
+
if (object.saved_from_peer) {
|
|
803
|
+
chatIds.add(peerToChatId(object.saved_from_peer));
|
|
804
|
+
}
|
|
805
|
+
return chatIds;
|
|
806
|
+
}
|
|
807
|
+
if (Api.isOfEnum("MessageMedia", object)) {
|
|
808
|
+
switch (object._) {
|
|
809
|
+
case "messageMediaContact":
|
|
810
|
+
if (object.user_id) {
|
|
811
|
+
chatIds.add(peerToChatId({ _: "peerUser", user_id: object.user_id }));
|
|
812
|
+
}
|
|
813
|
+
break;
|
|
814
|
+
case "messageMediaStory":
|
|
815
|
+
chatIds.add(peerToChatId(object.peer));
|
|
816
|
+
break;
|
|
817
|
+
case "messageMediaGiveaway":
|
|
818
|
+
for (const chatId of object.channels.map((v) => peerToChatId({ _: "peerChannel", channel_id: v }))) {
|
|
819
|
+
chatIds.add(chatId);
|
|
820
|
+
}
|
|
821
|
+
break;
|
|
822
|
+
case "messageMediaGiveawayResults":
|
|
823
|
+
chatIds.add(peerToChatId({ _: "peerChannel", channel_id: object.channel_id }));
|
|
824
|
+
for (const chatId of object.winners.map((user_id) => peerToChatId({ _: "peerUser", user_id }))) {
|
|
825
|
+
chatIds.add(chatId);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return chatIds;
|
|
829
|
+
}
|
|
830
|
+
// messsages
|
|
831
|
+
if (!("message" in object)) {
|
|
832
|
+
return chatIds;
|
|
833
|
+
}
|
|
834
|
+
if (Api.is("messageEmpty", object.message)) {
|
|
835
|
+
return chatIds;
|
|
836
|
+
}
|
|
837
|
+
chatIds.add(peerToChatId(object.message.peer_id));
|
|
838
|
+
if (object.message.from_id) {
|
|
839
|
+
chatIds.add(peerToChatId(object.message.from_id));
|
|
840
|
+
}
|
|
841
|
+
if (Api.is("messageService", object.message)) {
|
|
842
|
+
switch (object.message.action._) {
|
|
843
|
+
case "messageActionChatCreate":
|
|
844
|
+
case "messageActionChatAddUser":
|
|
845
|
+
case "messageActionInviteToGroupCall":
|
|
846
|
+
for (const user_id of object.message.action.users) {
|
|
847
|
+
chatIds.add(peerToChatId({ _: "peerUser", user_id }));
|
|
848
|
+
}
|
|
849
|
+
break;
|
|
850
|
+
case "messageActionChatDeleteUser":
|
|
851
|
+
chatIds.add(peerToChatId({ _: "peerUser", user_id: object.message.action.user_id }));
|
|
852
|
+
break;
|
|
853
|
+
case "messageActionChatMigrateTo":
|
|
854
|
+
chatIds.add(peerToChatId({ _: "peerChannel", channel_id: object.message.action.channel_id }));
|
|
855
|
+
break;
|
|
856
|
+
case "messageActionChannelMigrateFrom":
|
|
857
|
+
chatIds.add(peerToChatId({ _: "peerChat", chat_id: object.message.action.chat_id }));
|
|
858
|
+
break;
|
|
859
|
+
case "messageActionConferenceCall":
|
|
860
|
+
if (object.message.action.other_participants) {
|
|
861
|
+
for (const participant of object.message.action.other_participants) {
|
|
862
|
+
chatIds.add(peerToChatId(participant));
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
break;
|
|
866
|
+
case "messageActionPaymentRefunded":
|
|
867
|
+
chatIds.add(peerToChatId(object.message.action.peer));
|
|
868
|
+
break;
|
|
869
|
+
case "messageActionGiftCode":
|
|
870
|
+
if (object.message.action.boost_peer) {
|
|
871
|
+
chatIds.add(peerToChatId(object.message.action.boost_peer));
|
|
872
|
+
}
|
|
873
|
+
break;
|
|
874
|
+
case "messageActionRequestedPeer":
|
|
875
|
+
if (!this.#c.storage.isBot) {
|
|
876
|
+
for (const peer of object.message.action.peers) {
|
|
877
|
+
chatIds.add(peerToChatId(peer));
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
break;
|
|
881
|
+
case "messageActionSetMessagesTTL":
|
|
882
|
+
if (object.message.action.auto_setting_from) {
|
|
883
|
+
chatIds.add(peerToChatId({ _: "peerUser", user_id: object.message.action.auto_setting_from }));
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
if (object.message.reply_to) {
|
|
889
|
+
switch (object.message.reply_to._) {
|
|
890
|
+
case "messageReplyHeader":
|
|
891
|
+
if (object.message.reply_to.reply_to_peer_id) {
|
|
892
|
+
chatIds.add(peerToChatId(object.message.reply_to.reply_to_peer_id));
|
|
893
|
+
}
|
|
894
|
+
if (object.message.reply_to.reply_from) {
|
|
895
|
+
for (const chatId of this.#collectChatIds(object.message.reply_to.reply_from)) {
|
|
896
|
+
chatIds.add(chatId);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
if (object.message.reply_to.quote_entities) {
|
|
900
|
+
for (const chatId of this.#collectChatIdsFromEntities(object.message.reply_to.quote_entities)) {
|
|
901
|
+
chatIds.add(chatId);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
if (object.message.reply_to.reply_media) {
|
|
905
|
+
for (const chatId of this.#collectChatIds(object.message.reply_to.reply_media)) {
|
|
906
|
+
chatIds.add(chatId);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
break;
|
|
910
|
+
case "messageReplyStoryHeader":
|
|
911
|
+
chatIds.add(peerToChatId(object.message.reply_to.peer));
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
if (object.message.fwd_from) {
|
|
915
|
+
for (const chatId of this.#collectChatIds(object.message.fwd_from)) {
|
|
916
|
+
chatIds.add(chatId);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
if (object.message.via_bot_id) {
|
|
920
|
+
chatIds.add(peerToChatId({ _: "peerUser", user_id: object.message.via_bot_id }));
|
|
921
|
+
}
|
|
922
|
+
if (object.message.entities) {
|
|
923
|
+
for (const chatId of this.#collectChatIdsFromEntities(object.message.entities)) {
|
|
924
|
+
chatIds.add(chatId);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
if (object.message.media) {
|
|
928
|
+
for (const chatId of this.#collectChatIds(object.message.media)) {
|
|
929
|
+
chatIds.add(chatId);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
return chatIds;
|
|
934
|
+
}
|
|
935
|
+
#collectChatIdsFromEntities(entities) {
|
|
936
|
+
const chatIds = new Array();
|
|
937
|
+
for (const user_id of entities.filter((v) => Api.is("messageEntityMentionName", v)).map((v) => v.user_id)) {
|
|
938
|
+
chatIds.push(peerToChatId({ _: "peerUser", user_id }));
|
|
939
|
+
}
|
|
940
|
+
return chatIds;
|
|
941
|
+
}
|
|
942
|
+
setUpdateHandler(handler) {
|
|
943
|
+
this.#updateHandler = handler;
|
|
944
|
+
}
|
|
945
|
+
#openChats = new Map();
|
|
946
|
+
async openChat(chatId, params) {
|
|
947
|
+
if (params?.timeout !== undefined && (params.timeout < 0 || params?.timeout === 0)) {
|
|
948
|
+
throw new InputError("An invalid timeout was specified.");
|
|
949
|
+
}
|
|
950
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
371
951
|
const channelId = channel.channel_id;
|
|
372
|
-
if (
|
|
952
|
+
if (this.#openChats.has(channelId)) {
|
|
373
953
|
return;
|
|
374
954
|
}
|
|
375
955
|
const controller = new AbortController();
|
|
376
956
|
const promise = Promise.resolve().then(async () => {
|
|
377
|
-
const logger =
|
|
957
|
+
const logger = this.#LopenChat.branch(Api.peerToChatId(channel) + "");
|
|
378
958
|
while (true) {
|
|
379
|
-
if (
|
|
959
|
+
if (this.#c.isDisconnected()) {
|
|
380
960
|
logger.debug("disconnected, stopping the loop");
|
|
381
|
-
|
|
961
|
+
this.#openChats.delete(channelId);
|
|
382
962
|
break;
|
|
383
963
|
}
|
|
384
|
-
if (!
|
|
964
|
+
if (!this.#openChats.has(channelId)) {
|
|
385
965
|
const aborted = controller.signal.aborted;
|
|
386
966
|
logger.debug(`closed${(aborted ? " (aborted)" : "")}, stopping the loop`);
|
|
387
967
|
break;
|
|
388
968
|
}
|
|
389
969
|
try {
|
|
390
970
|
const Ti = Date.now();
|
|
391
|
-
const
|
|
971
|
+
const otherTimeout = await this.#recoverChannelUpdateGap(channelId, "openChat");
|
|
972
|
+
const timeout = params?.timeout ?? otherTimeout;
|
|
392
973
|
const dT = Date.now() - Ti;
|
|
393
|
-
const
|
|
394
|
-
logger.debug("timeout=", timeout, "delay=",
|
|
395
|
-
if (
|
|
396
|
-
await
|
|
397
|
-
const resolve = () => {
|
|
398
|
-
r();
|
|
399
|
-
controller.signal.removeEventListener("abort", resolve);
|
|
400
|
-
if (controller.signal.aborted) {
|
|
401
|
-
clearTimeout(timeout);
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
controller.signal.addEventListener("abort", resolve);
|
|
405
|
-
const timeout = setTimeout(resolve, delay);
|
|
406
|
-
});
|
|
974
|
+
const delayMs = Math.max(timeout * SECOND - dT, 0);
|
|
975
|
+
logger.debug("timeout =", timeout, params?.timeout !== undefined ? "(user-provided)" : "(not user-provided)", "delay =", delayMs, "dT =", dT);
|
|
976
|
+
if (delayMs) {
|
|
977
|
+
await delay(delayMs, { signal: controller.signal });
|
|
407
978
|
}
|
|
408
979
|
}
|
|
409
980
|
catch (err) {
|
|
410
|
-
if (
|
|
981
|
+
if (this.#c.isDisconnected()) {
|
|
411
982
|
continue; // breaks the loop
|
|
412
983
|
}
|
|
413
|
-
|
|
984
|
+
this.#LopenChat.error("an unexpected error occurred:", err);
|
|
414
985
|
}
|
|
415
986
|
}
|
|
416
987
|
});
|
|
417
|
-
|
|
988
|
+
this.#openChats.set(channelId, { controller, promise });
|
|
418
989
|
}
|
|
419
990
|
async closeChat(chatId) {
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
const openChat = __classPrivateFieldGet(this, _UpdateManager_openChats, "f").get(channel_id);
|
|
991
|
+
const { channel_id } = await this.#c.getInputChannel(chatId);
|
|
992
|
+
const openChat = this.#openChats.get(channel_id);
|
|
423
993
|
if (openChat) {
|
|
424
|
-
|
|
994
|
+
this.#openChats.delete(channel_id);
|
|
425
995
|
openChat.controller.abort();
|
|
426
996
|
}
|
|
427
997
|
else {
|
|
@@ -429,517 +999,10 @@ export class UpdateManager {
|
|
|
429
999
|
}
|
|
430
1000
|
}
|
|
431
1001
|
closeAllChats() {
|
|
432
|
-
for (const [channelId, openChat] of
|
|
433
|
-
|
|
1002
|
+
for (const [channelId, openChat] of this.#openChats.entries()) {
|
|
1003
|
+
this.#openChats.delete(channelId);
|
|
434
1004
|
openChat.controller.abort();
|
|
435
1005
|
}
|
|
436
1006
|
}
|
|
437
1007
|
}
|
|
438
|
-
_a = UpdateManager
|
|
439
|
-
if (typeof __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates === "boolean") {
|
|
440
|
-
return __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates;
|
|
441
|
-
}
|
|
442
|
-
if (__classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f") == null) {
|
|
443
|
-
__classPrivateFieldSet(this, _UpdateManager_defaultDropPendingUpdates, await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getAccountType() == "bot", "f");
|
|
444
|
-
}
|
|
445
|
-
return __classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f");
|
|
446
|
-
}, _UpdateManager_getState = async function _UpdateManager_getState() {
|
|
447
|
-
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this)) {
|
|
448
|
-
return __classPrivateFieldGet(this, _UpdateManager_state, "f") ?? null;
|
|
449
|
-
}
|
|
450
|
-
if (__classPrivateFieldGet(this, _UpdateManager_state, "f") !== undefined) {
|
|
451
|
-
return __classPrivateFieldGet(this, _UpdateManager_state, "f");
|
|
452
|
-
}
|
|
453
|
-
const state = await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getState();
|
|
454
|
-
return __classPrivateFieldSet(this, _UpdateManager_state, state, "f");
|
|
455
|
-
}, _UpdateManager_setState = async function _UpdateManager_setState(state) {
|
|
456
|
-
__classPrivateFieldSet(this, _UpdateManager_state, state, "f");
|
|
457
|
-
if (!await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this)) {
|
|
458
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setState(state);
|
|
459
|
-
}
|
|
460
|
-
}, _UpdateManager_extractMessages = function _UpdateManager_extractMessages(context) {
|
|
461
|
-
const messages = new Array();
|
|
462
|
-
if (Array.isArray(context)) {
|
|
463
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("em A");
|
|
464
|
-
for (const item of context) {
|
|
465
|
-
messages.push(...__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_extractMessages).call(this, item));
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
else if (isOneOf(["updates", "updatesCombined"], context)) {
|
|
469
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("em B");
|
|
470
|
-
messages.push(...__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_extractMessages).call(this, context.updates));
|
|
471
|
-
}
|
|
472
|
-
else if (isOneOf(["updates.difference", "updates.differenceSlice", "updates.channelDifference"], context)) {
|
|
473
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("em C");
|
|
474
|
-
for (const message of context.new_messages) {
|
|
475
|
-
if (is("message", message)) {
|
|
476
|
-
messages.push(message);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
messages.push(...__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_extractMessages).call(this, context.other_updates));
|
|
480
|
-
}
|
|
481
|
-
else if (isOneOf(["updateNewMessage", "updateNewChannelMessage", "updateEditMessage", "updateEditChannelMessage", "updateBotNewBusinessMessage", "updateBotNewBusinessMessage"], context)) {
|
|
482
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("em D");
|
|
483
|
-
if (is("message", context.message)) {
|
|
484
|
-
messages.push(context.message);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
else if (is("message", context)) {
|
|
488
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("em E");
|
|
489
|
-
messages.push(context);
|
|
490
|
-
}
|
|
491
|
-
else if (context != null && typeof context === "object" && "messages" in context && Array.isArray(context.messages)) {
|
|
492
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("em F");
|
|
493
|
-
for (const message of context.messages) {
|
|
494
|
-
if (is("message", message)) {
|
|
495
|
-
messages.push(message);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
return messages;
|
|
500
|
-
}, _UpdateManager_extractMinPeerReferences = function _UpdateManager_extractMinPeerReferences(context) {
|
|
501
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("empr A");
|
|
502
|
-
const minPeerReferences = new Array();
|
|
503
|
-
const messages = __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_extractMessages).call(this, context);
|
|
504
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("empr B", messages.length, context != null && typeof context == "object" && "_" in context ? context._ : typeof context);
|
|
505
|
-
for (const message of messages) {
|
|
506
|
-
__classPrivateFieldGet(this, _UpdateManager_Lmin, "f").debug("empr C");
|
|
507
|
-
if (!message.from_id) {
|
|
508
|
-
continue;
|
|
509
|
-
}
|
|
510
|
-
minPeerReferences.push({ chatId: peerToChatId(message.peer_id), senderId: peerToChatId(message.from_id), messageId: message.id });
|
|
511
|
-
}
|
|
512
|
-
return minPeerReferences;
|
|
513
|
-
}, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck = async function _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck(channelId) {
|
|
514
|
-
if (!(await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this))) {
|
|
515
|
-
return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
516
|
-
}
|
|
517
|
-
const first = !__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").has(channelId);
|
|
518
|
-
if (first) {
|
|
519
|
-
__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").add(channelId);
|
|
520
|
-
return null;
|
|
521
|
-
}
|
|
522
|
-
else {
|
|
523
|
-
return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
524
|
-
}
|
|
525
|
-
}, _UpdateManager_checkGap = async function _UpdateManager_checkGap(pts, ptsCount) {
|
|
526
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
527
|
-
if (localState.pts + ptsCount < pts) {
|
|
528
|
-
await this.recoverUpdateGap("processUpdates[pts]");
|
|
529
|
-
}
|
|
530
|
-
}, _UpdateManager_checkGapQts = async function _UpdateManager_checkGapQts(qts) {
|
|
531
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
532
|
-
if (localState.qts + _a.QTS_COUNT < qts) {
|
|
533
|
-
await this.recoverUpdateGap("processUpdates[qts]");
|
|
534
|
-
}
|
|
535
|
-
}, _UpdateManager_checkChannelGap = async function _UpdateManager_checkChannelGap(channelId, pts, ptsCount) {
|
|
536
|
-
let localPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
|
|
537
|
-
if (!localPts) {
|
|
538
|
-
localPts = pts - ptsCount;
|
|
539
|
-
}
|
|
540
|
-
if (localPts + ptsCount < pts) {
|
|
541
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_recoverChannelUpdateGap).call(this, channelId, "processUpdates");
|
|
542
|
-
}
|
|
543
|
-
}, _UpdateManager_processChannelPtsUpdateInner = async function _UpdateManager_processChannelPtsUpdateInner(update, checkGap) {
|
|
544
|
-
const channelId = is("updateNewChannelMessage", update) || is("updateEditChannelMessage", update) ? as("peerChannel", update.message.peer_id).channel_id : update.channel_id;
|
|
545
|
-
if (is("updateChannelTooLong", update)) {
|
|
546
|
-
if (update.pts != undefined) {
|
|
547
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setChannelPts(channelId, update.pts);
|
|
548
|
-
}
|
|
549
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_recoverChannelUpdateGap).call(this, channelId, "updateChannelTooLong");
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
if (update.pts != 0) {
|
|
553
|
-
const ptsCount = update.pts_count;
|
|
554
|
-
if (checkGap) {
|
|
555
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
556
|
-
}
|
|
557
|
-
let currentPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
|
|
558
|
-
currentPts ??= update.pts - ptsCount;
|
|
559
|
-
if (currentPts + ptsCount > update.pts) {
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
if (__classPrivateFieldGet(this, _UpdateManager_c, "f").guaranteeUpdateDelivery) {
|
|
564
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setUpdate(channelId, update);
|
|
565
|
-
}
|
|
566
|
-
if (update.pts != 0) {
|
|
567
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setChannelPts(channelId, update.pts);
|
|
568
|
-
}
|
|
569
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_queueUpdate).call(this, update, channelId, true);
|
|
570
|
-
}, _UpdateManager_queueUpdate = function _UpdateManager_queueUpdate(update, boxId, pts) {
|
|
571
|
-
this.getHandleUpdateQueue(boxId).add(async () => {
|
|
572
|
-
if (__classPrivateFieldGet(this, _UpdateManager_c, "f").guaranteeUpdateDelivery && pts) {
|
|
573
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_handleStoredUpdates).call(this, boxId);
|
|
574
|
-
}
|
|
575
|
-
else {
|
|
576
|
-
await (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_handleUpdate).call(this, update))();
|
|
577
|
-
}
|
|
578
|
-
});
|
|
579
|
-
}, _UpdateManager_processChannelPtsUpdate = function _UpdateManager_processChannelPtsUpdate(update, checkGap) {
|
|
580
|
-
const channelId = is("updateNewChannelMessage", update) || is("updateEditChannelMessage", update) ? as("peerChannel", update.message.peer_id).channel_id : update.channel_id;
|
|
581
|
-
let queue = __classPrivateFieldGet(this, _UpdateManager_channelUpdateQueues, "f").get(channelId);
|
|
582
|
-
if (queue == undefined) {
|
|
583
|
-
queue = new Queue(`channelUpdates-${channelId}`);
|
|
584
|
-
__classPrivateFieldGet(this, _UpdateManager_channelUpdateQueues, "f").set(channelId, queue);
|
|
585
|
-
}
|
|
586
|
-
queue.add(async () => {
|
|
587
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processChannelPtsUpdateInner).call(this, update, checkGap);
|
|
588
|
-
});
|
|
589
|
-
}, _UpdateManager_processPtsUpdateInner = async function _UpdateManager_processPtsUpdateInner(update, checkGap) {
|
|
590
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
591
|
-
if (update.pts != 0) {
|
|
592
|
-
if (checkGap) {
|
|
593
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkGap).call(this, update.pts, update.pts_count);
|
|
594
|
-
}
|
|
595
|
-
if (localState.pts + update.pts_count > update.pts) {
|
|
596
|
-
return;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
if (__classPrivateFieldGet(this, _UpdateManager_c, "f").guaranteeUpdateDelivery) {
|
|
600
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setUpdate(_a.MAIN_BOX_ID, update);
|
|
601
|
-
}
|
|
602
|
-
if (update.pts != 0) {
|
|
603
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setUpdatePts).call(this, update.pts);
|
|
604
|
-
}
|
|
605
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_queueUpdate).call(this, update, 1n, false);
|
|
606
|
-
}, _UpdateManager_processPtsUpdate = function _UpdateManager_processPtsUpdate(update, checkGap) {
|
|
607
|
-
__classPrivateFieldGet(this, _UpdateManager_ptsUpdateQueue, "f").add(async () => {
|
|
608
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processPtsUpdateInner).call(this, update, checkGap);
|
|
609
|
-
});
|
|
610
|
-
}, _UpdateManager_processQtsUpdateInner = async function _UpdateManager_processQtsUpdateInner(update, checkGap) {
|
|
611
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
612
|
-
if (update.qts != 0) {
|
|
613
|
-
if (checkGap) {
|
|
614
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkGapQts).call(this, update.qts);
|
|
615
|
-
}
|
|
616
|
-
if (localState.qts + _a.QTS_COUNT > update.qts) {
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
if (__classPrivateFieldGet(this, _UpdateManager_c, "f").guaranteeUpdateDelivery) {
|
|
621
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setUpdate(_a.MAIN_BOX_ID, update);
|
|
622
|
-
}
|
|
623
|
-
if (update.qts != 0) {
|
|
624
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setUpdateQts).call(this, update.qts);
|
|
625
|
-
}
|
|
626
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_queueUpdate).call(this, update, 0n, true);
|
|
627
|
-
}, _UpdateManager_processQtsUpdate = function _UpdateManager_processQtsUpdate(update, checkGap) {
|
|
628
|
-
__classPrivateFieldGet(this, _UpdateManager_qtsUpdateQueue, "f").add(async () => {
|
|
629
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processQtsUpdateInner).call(this, update, checkGap);
|
|
630
|
-
});
|
|
631
|
-
}, _UpdateManager_processUpdates = async function _UpdateManager_processUpdates(updates_, checkGap, call = null) {
|
|
632
|
-
/// First, individual updates (Update[1]) are extracted from Updates.[2]
|
|
633
|
-
///
|
|
634
|
-
/// If an updatesTooLong[3] was received, an update gap recovery is initiated and no further action will be taken.
|
|
635
|
-
///
|
|
636
|
-
/// [1]: https://core.telegram.org/type/Update
|
|
637
|
-
/// [2]: https://core.telegram.org/type/Updates
|
|
638
|
-
/// [3]: https://core.telegram.org/constructor/updatesTooLong
|
|
639
|
-
let updates;
|
|
640
|
-
if (is("updatesCombined", updates_) || is("updates", updates_)) {
|
|
641
|
-
updates = updates_.updates;
|
|
642
|
-
const seq = updates_.seq;
|
|
643
|
-
const seqStart = "seq_start" in updates_ ? updates_.seq_start : updates_.seq;
|
|
644
|
-
if (checkGap) {
|
|
645
|
-
if (seqStart == 0) {
|
|
646
|
-
checkGap = false;
|
|
647
|
-
__classPrivateFieldGet(this, _UpdateManager_L$processUpdates, "f").debug("seqStart=0");
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
651
|
-
const localSeq = localState.seq;
|
|
652
|
-
if (localSeq + 1 == seqStart) {
|
|
653
|
-
// The update sequence can be applied.
|
|
654
|
-
localState.seq = seq;
|
|
655
|
-
localState.date = updates_.date;
|
|
656
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setUpdateStateDate).call(this, updates_.date);
|
|
657
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, localState);
|
|
658
|
-
}
|
|
659
|
-
else if (localSeq + 1 > seqStart) {
|
|
660
|
-
// The update sequence was already applied, and must be ignored.
|
|
661
|
-
__classPrivateFieldGet(this, _UpdateManager_L$processUpdates, "f").debug("localSeq + 1 > seqStart");
|
|
662
|
-
return;
|
|
663
|
-
}
|
|
664
|
-
else if (localSeq + 1 < seqStart) {
|
|
665
|
-
// There's an updates gap that must be filled.
|
|
666
|
-
await this.recoverUpdateGap("localSeq + 1 < seqStart");
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
else if (is("updateShort", updates_)) {
|
|
672
|
-
updates = [updates_.update];
|
|
673
|
-
}
|
|
674
|
-
else if (is("updateShortMessage", updates_)) {
|
|
675
|
-
updates = [
|
|
676
|
-
{
|
|
677
|
-
_: "updateNewMessage",
|
|
678
|
-
message: ({
|
|
679
|
-
_: "message",
|
|
680
|
-
out: updates_.out,
|
|
681
|
-
mentioned: updates_.mentioned,
|
|
682
|
-
media_unread: updates_.media_unread,
|
|
683
|
-
silent: updates_.silent,
|
|
684
|
-
id: updates_.id,
|
|
685
|
-
from_id: updates_.out ? ({ _: "peerUser", user_id: BigInt(await __classPrivateFieldGet(this, _UpdateManager_c, "f").getSelfId()) }) : ({ _: "peerUser", user_id: updates_.user_id }),
|
|
686
|
-
peer_id: ({ _: "peerUser", user_id: updates_.user_id }),
|
|
687
|
-
message: updates_.message,
|
|
688
|
-
date: updates_.date,
|
|
689
|
-
fwd_from: updates_.fwd_from,
|
|
690
|
-
via_bot_id: updates_.via_bot_id,
|
|
691
|
-
reply_to: updates_.reply_to,
|
|
692
|
-
entities: updates_.entities,
|
|
693
|
-
ttl_period: updates_.ttl_period,
|
|
694
|
-
}),
|
|
695
|
-
pts: updates_.pts,
|
|
696
|
-
pts_count: updates_.pts_count,
|
|
697
|
-
},
|
|
698
|
-
];
|
|
699
|
-
}
|
|
700
|
-
else if (is("updateShortChatMessage", updates_)) {
|
|
701
|
-
updates = [
|
|
702
|
-
{
|
|
703
|
-
_: "updateNewMessage",
|
|
704
|
-
message: ({
|
|
705
|
-
_: "message",
|
|
706
|
-
mentioned: updates_.mentioned,
|
|
707
|
-
media_unread: updates_.media_unread,
|
|
708
|
-
silent: updates_.silent,
|
|
709
|
-
id: updates_.id,
|
|
710
|
-
from_id: { _: "peerUser", user_id: updates_.from_id },
|
|
711
|
-
peer_id: { _: "peerChat", chat_id: updates_.chat_id },
|
|
712
|
-
fwd_from: updates_.fwd_from,
|
|
713
|
-
via_bot_id: updates_.via_bot_id,
|
|
714
|
-
reply_to: updates_.reply_to,
|
|
715
|
-
date: updates_.date,
|
|
716
|
-
message: updates_.message,
|
|
717
|
-
entities: updates_.entities,
|
|
718
|
-
ttl_period: updates_.ttl_period,
|
|
719
|
-
}),
|
|
720
|
-
pts: updates_.pts,
|
|
721
|
-
pts_count: updates_.pts_count,
|
|
722
|
-
},
|
|
723
|
-
];
|
|
724
|
-
}
|
|
725
|
-
else if (is("updateShortSentMessage", updates_)) {
|
|
726
|
-
if (!is("messages.sendMessage", call)) {
|
|
727
|
-
unreachable();
|
|
728
|
-
}
|
|
729
|
-
updates = [{
|
|
730
|
-
_: "updateNewMessage",
|
|
731
|
-
message: ({
|
|
732
|
-
_: "message",
|
|
733
|
-
out: updates_.out,
|
|
734
|
-
silent: call.silent,
|
|
735
|
-
id: updates_.id,
|
|
736
|
-
from_id: { _: "peerUser", user_id: BigInt(await __classPrivateFieldGet(this, _UpdateManager_c, "f").getSelfId()) },
|
|
737
|
-
peer_id: inputPeerToPeer(call.peer),
|
|
738
|
-
message: call.message,
|
|
739
|
-
media: updates_.media,
|
|
740
|
-
date: updates_.date,
|
|
741
|
-
// reply_to: call.reply_to, // TODO?
|
|
742
|
-
entities: updates_.entities,
|
|
743
|
-
ttl_period: updates_.ttl_period,
|
|
744
|
-
}),
|
|
745
|
-
pts: updates_.pts,
|
|
746
|
-
pts_count: updates_.pts_count,
|
|
747
|
-
}];
|
|
748
|
-
}
|
|
749
|
-
else if (is("updatesTooLong", updates_)) {
|
|
750
|
-
await this.recoverUpdateGap("updatesTooLong");
|
|
751
|
-
return;
|
|
752
|
-
}
|
|
753
|
-
else if (isOfEnum("Update", updates_)) {
|
|
754
|
-
updates = [updates_];
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
757
|
-
unreachable();
|
|
758
|
-
}
|
|
759
|
-
/// We process the updates when we are sure there is no gap.
|
|
760
|
-
if (is("updates", updates_) || is("updatesCombined", updates_)) {
|
|
761
|
-
await this.processChats(updates_.chats, updates_);
|
|
762
|
-
await this.processUsers(updates_.users, updates_);
|
|
763
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setUpdateStateDate).call(this, updates_.date);
|
|
764
|
-
}
|
|
765
|
-
else if (is("updateShort", updates_) ||
|
|
766
|
-
is("updateShortMessage", updates_) ||
|
|
767
|
-
is("updateShortChatMessage", updates_) ||
|
|
768
|
-
is("updateShortSentMessage", updates_)) {
|
|
769
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setUpdateStateDate).call(this, updates_.date);
|
|
770
|
-
}
|
|
771
|
-
for (const update of updates) {
|
|
772
|
-
if (is("updatePtsChanged", update)) {
|
|
773
|
-
await this.fetchState("updatePtsChanged");
|
|
774
|
-
if (__classPrivateFieldGet(this, _UpdateManager_updateState, "f")) {
|
|
775
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, __classPrivateFieldGet(this, _UpdateManager_updateState, "f"));
|
|
776
|
-
}
|
|
777
|
-
else {
|
|
778
|
-
unreachable();
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
else if (_a.isPtsUpdate(update)) {
|
|
782
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processPtsUpdate).call(this, update, checkGap);
|
|
783
|
-
}
|
|
784
|
-
else if (_a.isChannelPtsUpdate(update)) {
|
|
785
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processChannelPtsUpdate).call(this, update, checkGap);
|
|
786
|
-
}
|
|
787
|
-
else if (_a.isQtsUpdate(update)) {
|
|
788
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processQtsUpdate).call(this, update, checkGap);
|
|
789
|
-
}
|
|
790
|
-
else {
|
|
791
|
-
__classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_queueUpdate).call(this, update, 0n, false);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}, _UpdateManager_setUpdateStateDate = async function _UpdateManager_setUpdateStateDate(date) {
|
|
795
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
796
|
-
localState.date = date;
|
|
797
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, localState);
|
|
798
|
-
}, _UpdateManager_setUpdatePts = async function _UpdateManager_setUpdatePts(pts) {
|
|
799
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
800
|
-
localState.pts = pts;
|
|
801
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, localState);
|
|
802
|
-
}, _UpdateManager_setUpdateQts = async function _UpdateManager_setUpdateQts(qts) {
|
|
803
|
-
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
804
|
-
localState.qts = qts;
|
|
805
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, localState);
|
|
806
|
-
}, _UpdateManager_getLocalState = async function _UpdateManager_getLocalState() {
|
|
807
|
-
let localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getState).call(this);
|
|
808
|
-
if (!localState) {
|
|
809
|
-
if (__classPrivateFieldGet(this, _UpdateManager_updateState, "f")) {
|
|
810
|
-
localState = __classPrivateFieldGet(this, _UpdateManager_updateState, "f");
|
|
811
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, localState);
|
|
812
|
-
}
|
|
813
|
-
else {
|
|
814
|
-
await this.fetchState("getLocalState");
|
|
815
|
-
if (__classPrivateFieldGet(this, _UpdateManager_updateState, "f")) {
|
|
816
|
-
localState = __classPrivateFieldGet(this, _UpdateManager_updateState, "f");
|
|
817
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, localState);
|
|
818
|
-
}
|
|
819
|
-
else {
|
|
820
|
-
unreachable();
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
return localState;
|
|
825
|
-
}, _UpdateManager_recoverChannelUpdateGap = async function _UpdateManager_recoverChannelUpdateGap(channelId, source) {
|
|
826
|
-
let lastTimeout = 1;
|
|
827
|
-
__classPrivateFieldGet(this, _UpdateManager_LrecoverChannelUpdateGap, "f").debug(`recovering channel update gap [${channelId}, ${source}]`);
|
|
828
|
-
const pts_ = await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
829
|
-
let pts = pts_ == null ? 1 : pts_;
|
|
830
|
-
let delay = 5;
|
|
831
|
-
while (true) {
|
|
832
|
-
const { access_hash } = await __classPrivateFieldGet(this, _UpdateManager_c, "f").getInputPeer(ZERO_CHANNEL_ID + -Number(channelId)).then((v) => as("inputPeerChannel", v));
|
|
833
|
-
let difference;
|
|
834
|
-
try {
|
|
835
|
-
difference = await __classPrivateFieldGet(this, _UpdateManager_c, "f").invoke({
|
|
836
|
-
_: "updates.getChannelDifference",
|
|
837
|
-
pts,
|
|
838
|
-
channel: { _: "inputChannel", channel_id: channelId, access_hash },
|
|
839
|
-
filter: { _: "channelMessagesFilterEmpty" },
|
|
840
|
-
limit: await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getAccountType() == "user" ? CHANNEL_DIFFERENCE_LIMIT_USER : CHANNEL_DIFFERENCE_LIMIT_BOT,
|
|
841
|
-
});
|
|
842
|
-
lastTimeout = difference.timeout ?? 1;
|
|
843
|
-
}
|
|
844
|
-
catch (err) {
|
|
845
|
-
if (err instanceof PersistentTimestampInvalid) {
|
|
846
|
-
await new Promise((r) => setTimeout(r, delay * second));
|
|
847
|
-
delay += 5;
|
|
848
|
-
if (delay > 60) {
|
|
849
|
-
delay = 60;
|
|
850
|
-
}
|
|
851
|
-
continue;
|
|
852
|
-
}
|
|
853
|
-
else {
|
|
854
|
-
throw err;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
if (is("updates.channelDifference", difference)) {
|
|
858
|
-
await this.processChats(difference.chats, difference);
|
|
859
|
-
await this.processUsers(difference.users, difference);
|
|
860
|
-
for (const message of difference.new_messages) {
|
|
861
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processUpdates).call(this, { _: "updateNewChannelMessage", message, pts: 0, pts_count: 0 }, false);
|
|
862
|
-
}
|
|
863
|
-
for (const update of difference.other_updates) {
|
|
864
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processUpdates).call(this, update, false);
|
|
865
|
-
}
|
|
866
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setChannelPts(channelId, difference.pts);
|
|
867
|
-
__classPrivateFieldGet(this, _UpdateManager_LrecoverChannelUpdateGap, "f").debug(`recovered from update gap [${channelId}, ${source}]`, channelId, source);
|
|
868
|
-
break;
|
|
869
|
-
}
|
|
870
|
-
else if (is("updates.channelDifferenceTooLong", difference)) {
|
|
871
|
-
// TODO: invalidate messages
|
|
872
|
-
__classPrivateFieldGet(this, _UpdateManager_LrecoverChannelUpdateGap, "f").debug("received channelDifferenceTooLong");
|
|
873
|
-
await this.processChats(difference.chats, difference);
|
|
874
|
-
await this.processUsers(difference.users, difference);
|
|
875
|
-
for (const message of difference.messages) {
|
|
876
|
-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processUpdates).call(this, { _: "updateNewChannelMessage", message, pts: 0, pts_count: 0 }, false);
|
|
877
|
-
}
|
|
878
|
-
const pts_ = as("dialog", difference.dialog).pts;
|
|
879
|
-
if (pts_ != undefined) {
|
|
880
|
-
pts = pts_;
|
|
881
|
-
}
|
|
882
|
-
else {
|
|
883
|
-
unreachable();
|
|
884
|
-
}
|
|
885
|
-
__classPrivateFieldGet(this, _UpdateManager_LrecoverChannelUpdateGap, "f").debug("processed channelDifferenceTooLong");
|
|
886
|
-
}
|
|
887
|
-
else if (is("updates.channelDifferenceEmpty", difference)) {
|
|
888
|
-
__classPrivateFieldGet(this, _UpdateManager_LrecoverChannelUpdateGap, "f").debug("there was no update gap");
|
|
889
|
-
break;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
return lastTimeout;
|
|
893
|
-
}, _UpdateManager_handleStoredUpdates = async function _UpdateManager_handleStoredUpdates(boxId) {
|
|
894
|
-
if (__classPrivateFieldGet(this, _UpdateManager_handleUpdatesSet, "f").has(boxId)) {
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
__classPrivateFieldGet(this, _UpdateManager_handleUpdatesSet, "f").add(boxId);
|
|
898
|
-
do {
|
|
899
|
-
const maybeUpdate = await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getFirstUpdate(boxId);
|
|
900
|
-
if (maybeUpdate == null) {
|
|
901
|
-
break;
|
|
902
|
-
}
|
|
903
|
-
const [key, update] = maybeUpdate;
|
|
904
|
-
for (let i = 0; i < 100; ++i) {
|
|
905
|
-
try {
|
|
906
|
-
const handle = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_handleUpdate).call(this, update);
|
|
907
|
-
handle: for (let i = 0; i < 2; ++i) {
|
|
908
|
-
try {
|
|
909
|
-
await handle();
|
|
910
|
-
break handle;
|
|
911
|
-
}
|
|
912
|
-
catch {
|
|
913
|
-
continue handle;
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
break;
|
|
917
|
-
}
|
|
918
|
-
catch (err) {
|
|
919
|
-
__classPrivateFieldGet(this, _UpdateManager_L$handleUpdate, "f").error(err);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.set(key, null);
|
|
923
|
-
} while (true);
|
|
924
|
-
__classPrivateFieldGet(this, _UpdateManager_handleUpdatesSet, "f").delete(boxId);
|
|
925
|
-
}, _UpdateManager_handleUpdate = function _UpdateManager_handleUpdate(update) {
|
|
926
|
-
const handler = __classPrivateFieldGet(this, _UpdateManager_updateHandler, "f");
|
|
927
|
-
if (handler) {
|
|
928
|
-
return handler(update);
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
return Promise.resolve(() => Promise.resolve());
|
|
932
|
-
}
|
|
933
|
-
};
|
|
934
|
-
Object.defineProperty(UpdateManager, "QTS_COUNT", {
|
|
935
|
-
enumerable: true,
|
|
936
|
-
configurable: true,
|
|
937
|
-
writable: true,
|
|
938
|
-
value: 1
|
|
939
|
-
});
|
|
940
|
-
Object.defineProperty(UpdateManager, "MAIN_BOX_ID", {
|
|
941
|
-
enumerable: true,
|
|
942
|
-
configurable: true,
|
|
943
|
-
writable: true,
|
|
944
|
-
value: 0n
|
|
945
|
-
});
|
|
1008
|
+
_a = UpdateManager;
|