@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
package/esm/client/5_client.js
DELETED
|
@@ -1,2858 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
-
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
4
|
-
*
|
|
5
|
-
* This file is part of MTKruto.
|
|
6
|
-
*
|
|
7
|
-
* This program is free software: you can redistribute it and/or modify
|
|
8
|
-
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
* (at your option) any later version.
|
|
11
|
-
*
|
|
12
|
-
* This program is distributed in the hope that it will be useful,
|
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
* GNU Lesser General Public License for more details.
|
|
16
|
-
*
|
|
17
|
-
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
-
*/
|
|
20
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
21
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
22
|
-
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");
|
|
23
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
24
|
-
};
|
|
25
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
26
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
27
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
-
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");
|
|
29
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
-
};
|
|
31
|
-
var _Client_instances, _a, _Client_client, _Client_guaranteeUpdateDelivery, _Client_updateManager, _Client_networkStatisticsManager, _Client_botInfoManager, _Client_fileManager, _Client_reactionManager, _Client_videoChatManager, _Client_businessConnectionManager, _Client_messageManager, _Client_storyManager, _Client_callbackQueryManager, _Client_inlineQueryManager, _Client_chatListManager, _Client_accountManager, _Client_paymentManager, _Client_managers, _Client_storage_, _Client_messageStorage_, _Client_parseMode, _Client_apiId, _Client_apiHash, _Client_publicKeys, _Client_outgoingMessages, _Client_persistCache, _Client_disableUpdates, _Client_authString, _Client_cdn, _Client_L, _Client_LsignIn, _Client_LpingLoop, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_Lmin, _Client_reconnecting, _Client_reconnect, _Client_getApiId, _Client_getCdnConnectionPool, _Client_getCdnConnection, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_stateChangeHandler, _Client_storageInited, _Client_initStorage, _Client_connectMutex, _Client_lastConnect, _Client_connectionInited, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_getSelfId, _Client_connectionInsuranceLoopStarted, _Client_connectionInsuranceLoopAbortController, _Client_startConnectionInsuranceLoop, _Client_connectionInsuranceLoop, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_startPingLoop, _Client_pingLoop, _Client_invoke, _Client_handleInvokeError, _Client_authStringImported, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_getMinInputPeer, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe;
|
|
32
|
-
import { unreachable } from "../0_deps.js";
|
|
33
|
-
import { AccessError, ConnectionError, InputError } from "../0_errors.js";
|
|
34
|
-
import { cleanObject, drop, getLogger, getRandomId, minute, mustPrompt, mustPromptOneOf, Mutex, second, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
35
|
-
import { StorageMemory } from "../2_storage.js";
|
|
36
|
-
import { as, chatIdToPeerId, getChatIdPeerType, is, isOneOf, peerToChatId } from "../2_tl.js";
|
|
37
|
-
import { getDc } from "../3_transport.js";
|
|
38
|
-
import { constructUser } from "../3_types.js";
|
|
39
|
-
import { APP_VERSION, DEVICE_MODEL, LANG_CODE, LANG_PACK, LAYER, MAX_CHANNEL_ID, MAX_CHAT_ID, SYSTEM_LANG_CODE, SYSTEM_VERSION, USERNAME_TTL } from "../4_constants.js";
|
|
40
|
-
import { AuthKeyUnregistered, ConnectionNotInited, FloodWait, Migrate, PasswordHashInvalid, PhoneNumberInvalid, SessionPasswordNeeded, SessionRevoked } from "../4_errors.js";
|
|
41
|
-
import { PhoneCodeInvalid } from "../4_errors.js";
|
|
42
|
-
import { checkPassword } from "./0_password.js";
|
|
43
|
-
import { StorageOperations } from "./0_storage_operations.js";
|
|
44
|
-
import { canBeInputChannel, canBeInputUser, getUsername, isCdnFunction, isMtprotoFunction, resolve, toInputChannel, toInputUser } from "./0_utilities.js";
|
|
45
|
-
import { ClientEncrypted } from "./1_client_encrypted.js";
|
|
46
|
-
import { ClientPlain } from "./1_client_plain.js";
|
|
47
|
-
import { Composer as Composer_ } from "./1_composer.js";
|
|
48
|
-
import { AccountManager } from "./2_account_manager.js";
|
|
49
|
-
import { BotInfoManager } from "./2_bot_info_manager.js";
|
|
50
|
-
import { BusinessConnectionManager } from "./2_business_connection_manager.js";
|
|
51
|
-
import { FileManager } from "./2_file_manager.js";
|
|
52
|
-
import { NetworkStatisticsManager } from "./2_network_statistics_manager.js";
|
|
53
|
-
import { PaymentManager } from "./2_payment_manager.js";
|
|
54
|
-
import { ReactionManager } from "./2_reaction_manager.js";
|
|
55
|
-
import { UpdateManager } from "./2_update_manager.js";
|
|
56
|
-
import { MessageManager } from "./3_message_manager.js";
|
|
57
|
-
import { VideoChatManager } from "./3_video_chat_manager.js";
|
|
58
|
-
import { CallbackQueryManager } from "./4_callback_query_manager.js";
|
|
59
|
-
import { ChatListManager } from "./4_chat_list_manager.js";
|
|
60
|
-
import { InlineQueryManager } from "./4_inline_query_manager.js";
|
|
61
|
-
import { StoryManager } from "./4_story_manager.js";
|
|
62
|
-
export class Composer extends Composer_ {
|
|
63
|
-
}
|
|
64
|
-
function skipInvoke() {
|
|
65
|
-
return (_ctx, next) => next();
|
|
66
|
-
}
|
|
67
|
-
export const restartAuth = Symbol("restartAuth");
|
|
68
|
-
export const handleMigrationError = Symbol("handleMigrationError");
|
|
69
|
-
// global Client ID counter for logs
|
|
70
|
-
let id = 0;
|
|
71
|
-
const getEntity = Symbol();
|
|
72
|
-
/**
|
|
73
|
-
* An MTKruto client.
|
|
74
|
-
*/
|
|
75
|
-
export class Client extends Composer {
|
|
76
|
-
// deno-lint-ignore no-explicit-any
|
|
77
|
-
get managers() {
|
|
78
|
-
return __classPrivateFieldGet(this, _Client_managers, "f") ?? (__classPrivateFieldSet(this, _Client_managers, __classPrivateFieldGet(this, _Client_managers, "f") ?? {
|
|
79
|
-
updateManager: __classPrivateFieldGet(this, _Client_updateManager, "f"),
|
|
80
|
-
networkStatisticsManager: __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f"),
|
|
81
|
-
botInfoManager: __classPrivateFieldGet(this, _Client_botInfoManager, "f"),
|
|
82
|
-
fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"),
|
|
83
|
-
reactionManager: __classPrivateFieldGet(this, _Client_reactionManager, "f"),
|
|
84
|
-
videoChatManager: __classPrivateFieldGet(this, _Client_videoChatManager, "f"),
|
|
85
|
-
businessConnectionManager: __classPrivateFieldGet(this, _Client_businessConnectionManager, "f"),
|
|
86
|
-
messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f"),
|
|
87
|
-
storyManager: __classPrivateFieldGet(this, _Client_storyManager, "f"),
|
|
88
|
-
callbackQueryManager: __classPrivateFieldGet(this, _Client_callbackQueryManager, "f"),
|
|
89
|
-
inlineQueryManager: __classPrivateFieldGet(this, _Client_inlineQueryManager, "f"),
|
|
90
|
-
chatListManager: __classPrivateFieldGet(this, _Client_chatListManager, "f"),
|
|
91
|
-
accountManager: __classPrivateFieldGet(this, _Client_accountManager, "f"),
|
|
92
|
-
paymentManager: __classPrivateFieldGet(this, _Client_paymentManager, "f"),
|
|
93
|
-
}, "f"));
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Constructs the client.
|
|
97
|
-
*/
|
|
98
|
-
constructor(params) {
|
|
99
|
-
super();
|
|
100
|
-
_Client_instances.add(this);
|
|
101
|
-
_Client_client.set(this, void 0);
|
|
102
|
-
_Client_guaranteeUpdateDelivery.set(this, void 0);
|
|
103
|
-
_Client_updateManager.set(this, void 0);
|
|
104
|
-
_Client_networkStatisticsManager.set(this, void 0);
|
|
105
|
-
_Client_botInfoManager.set(this, void 0);
|
|
106
|
-
_Client_fileManager.set(this, void 0);
|
|
107
|
-
_Client_reactionManager.set(this, void 0);
|
|
108
|
-
_Client_videoChatManager.set(this, void 0);
|
|
109
|
-
_Client_businessConnectionManager.set(this, void 0);
|
|
110
|
-
_Client_messageManager.set(this, void 0);
|
|
111
|
-
_Client_storyManager.set(this, void 0);
|
|
112
|
-
_Client_callbackQueryManager.set(this, void 0);
|
|
113
|
-
_Client_inlineQueryManager.set(this, void 0);
|
|
114
|
-
_Client_chatListManager.set(this, void 0);
|
|
115
|
-
_Client_accountManager.set(this, void 0);
|
|
116
|
-
_Client_paymentManager.set(this, void 0);
|
|
117
|
-
// deno-lint-ignore no-explicit-any
|
|
118
|
-
_Client_managers.set(this, void 0);
|
|
119
|
-
_Client_storage_.set(this, void 0);
|
|
120
|
-
_Client_messageStorage_.set(this, void 0);
|
|
121
|
-
Object.defineProperty(this, "storage", {
|
|
122
|
-
enumerable: true,
|
|
123
|
-
configurable: true,
|
|
124
|
-
writable: true,
|
|
125
|
-
value: void 0
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(this, "messageStorage", {
|
|
128
|
-
enumerable: true,
|
|
129
|
-
configurable: true,
|
|
130
|
-
writable: true,
|
|
131
|
-
value: void 0
|
|
132
|
-
});
|
|
133
|
-
_Client_parseMode.set(this, void 0);
|
|
134
|
-
_Client_apiId.set(this, void 0);
|
|
135
|
-
_Client_apiHash.set(this, void 0);
|
|
136
|
-
Object.defineProperty(this, "appVersion", {
|
|
137
|
-
enumerable: true,
|
|
138
|
-
configurable: true,
|
|
139
|
-
writable: true,
|
|
140
|
-
value: void 0
|
|
141
|
-
});
|
|
142
|
-
Object.defineProperty(this, "deviceModel", {
|
|
143
|
-
enumerable: true,
|
|
144
|
-
configurable: true,
|
|
145
|
-
writable: true,
|
|
146
|
-
value: void 0
|
|
147
|
-
});
|
|
148
|
-
Object.defineProperty(this, "langCode", {
|
|
149
|
-
enumerable: true,
|
|
150
|
-
configurable: true,
|
|
151
|
-
writable: true,
|
|
152
|
-
value: void 0
|
|
153
|
-
});
|
|
154
|
-
Object.defineProperty(this, "langPack", {
|
|
155
|
-
enumerable: true,
|
|
156
|
-
configurable: true,
|
|
157
|
-
writable: true,
|
|
158
|
-
value: void 0
|
|
159
|
-
});
|
|
160
|
-
Object.defineProperty(this, "systemLangCode", {
|
|
161
|
-
enumerable: true,
|
|
162
|
-
configurable: true,
|
|
163
|
-
writable: true,
|
|
164
|
-
value: void 0
|
|
165
|
-
});
|
|
166
|
-
Object.defineProperty(this, "systemVersion", {
|
|
167
|
-
enumerable: true,
|
|
168
|
-
configurable: true,
|
|
169
|
-
writable: true,
|
|
170
|
-
value: void 0
|
|
171
|
-
});
|
|
172
|
-
_Client_publicKeys.set(this, void 0);
|
|
173
|
-
_Client_outgoingMessages.set(this, void 0);
|
|
174
|
-
_Client_persistCache.set(this, void 0);
|
|
175
|
-
_Client_disableUpdates.set(this, void 0);
|
|
176
|
-
_Client_authString.set(this, void 0);
|
|
177
|
-
_Client_cdn.set(this, void 0);
|
|
178
|
-
_Client_L.set(this, void 0);
|
|
179
|
-
_Client_LsignIn.set(this, void 0);
|
|
180
|
-
_Client_LpingLoop.set(this, void 0);
|
|
181
|
-
_Client_LhandleMigrationError.set(this, void 0);
|
|
182
|
-
_Client_L$initConncetion.set(this, void 0);
|
|
183
|
-
_Client_Lmin.set(this, void 0);
|
|
184
|
-
_Client_reconnecting.set(this, false);
|
|
185
|
-
_Client_constructContext.set(this, async (update) => {
|
|
186
|
-
const msg = "message" in update ? update.message : "editedMessage" in update ? update.editedMessage : "scheduledMessage" in update ? update.scheduledMessage : "callbackQuery" in update ? update.callbackQuery.message : undefined;
|
|
187
|
-
const reactions = "messageInteractions" in update ? update.messageInteractions : undefined;
|
|
188
|
-
const mustGetMsg = () => {
|
|
189
|
-
if (msg !== undefined) {
|
|
190
|
-
return { chatId: msg.chat.id, messageId: msg.id, businessConnectionId: msg.businessConnectionId, senderId: (msg.from ?? msg.senderChat)?.id, userId: msg.from?.id };
|
|
191
|
-
}
|
|
192
|
-
else if (reactions !== undefined) {
|
|
193
|
-
return { chatId: reactions.chatId, messageId: reactions.messageId };
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
unreachable();
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
const mustGetUserId = () => {
|
|
200
|
-
if (msg?.from) {
|
|
201
|
-
return msg.from.id;
|
|
202
|
-
}
|
|
203
|
-
else if ("callbackQuery" in update) {
|
|
204
|
-
return update.callbackQuery.from.id;
|
|
205
|
-
}
|
|
206
|
-
else if ("chosenInlineResult" in update) {
|
|
207
|
-
return update.chosenInlineResult.from.id;
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
unreachable();
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
const mustGetInlineMsgId = () => {
|
|
214
|
-
if ("chosenInlineResult" in update) {
|
|
215
|
-
if (update.chosenInlineResult.inlineMessageId) {
|
|
216
|
-
return update.chosenInlineResult.inlineMessageId;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
else if ("callbackQuery" in update) {
|
|
220
|
-
if (update.callbackQuery.inlineMessageId) {
|
|
221
|
-
return update.callbackQuery.inlineMessageId;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
unreachable();
|
|
225
|
-
};
|
|
226
|
-
const chat_ = "messageReactions" in update ? update.messageReactions.chat : "messageReactionCount" in update ? update.messageReactionCount.chat : "chatMember" in update ? update.chatMember.chat : "joinRequest" in update ? update.joinRequest.chat : "story" in update ? update.story.chat : undefined;
|
|
227
|
-
const chat = chat_ ?? msg?.chat;
|
|
228
|
-
const from = msg?.from ? msg.from : "callbackQuery" in update ? update.callbackQuery.from : "inlineQuery" in update ? update.inlineQuery.from : "chatMember" in update ? update.chatMember.from : "messageReactions" in update ? update.messageReactions.user : "preCheckoutQuery" in update ? update.preCheckoutQuery.from : "joinRequest" in update ? update.joinRequest.user : "businessConnection" in update ? update.businessConnection.user : undefined;
|
|
229
|
-
const senderChat = msg?.senderChat;
|
|
230
|
-
const getReplyTo = (quote, chatId, messageId) => {
|
|
231
|
-
if ("story" in update) {
|
|
232
|
-
return { chatId: update.story.chat.id, storyId: update.story.id };
|
|
233
|
-
}
|
|
234
|
-
const isPrivate = chatId > 0;
|
|
235
|
-
const shouldQuote = quote === undefined ? !isPrivate : quote;
|
|
236
|
-
return shouldQuote ? { messageId } : undefined;
|
|
237
|
-
};
|
|
238
|
-
const me = "connectionState" in update ? __classPrivateFieldGet(this, _Client_lastGetMe, "f") : ("authorizationState" in update && !update.authorizationState.authorized) ? __classPrivateFieldGet(this, _Client_lastGetMe, "f") : await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getMe).call(this);
|
|
239
|
-
const context = {
|
|
240
|
-
...update,
|
|
241
|
-
client: this,
|
|
242
|
-
me: (me == null ? undefined : me),
|
|
243
|
-
msg: msg,
|
|
244
|
-
chat: chat,
|
|
245
|
-
from: from,
|
|
246
|
-
senderChat: senderChat,
|
|
247
|
-
get toJSON() {
|
|
248
|
-
return () => update;
|
|
249
|
-
},
|
|
250
|
-
reply: (text, params) => {
|
|
251
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
252
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
253
|
-
return this.sendMessage(chatId, text, { ...params, replyTo, businessConnectionId });
|
|
254
|
-
},
|
|
255
|
-
replyPoll: (question, options, params) => {
|
|
256
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
257
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
258
|
-
return this.sendPoll(chatId, question, options, { ...params, replyTo, businessConnectionId });
|
|
259
|
-
},
|
|
260
|
-
replyPhoto: (photo, params) => {
|
|
261
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
262
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
263
|
-
return this.sendPhoto(chatId, photo, { ...params, replyTo, businessConnectionId });
|
|
264
|
-
},
|
|
265
|
-
replyMediaGroup: (media, params) => {
|
|
266
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
267
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
268
|
-
return this.sendMediaGroup(chatId, media, { ...params, replyTo, businessConnectionId });
|
|
269
|
-
},
|
|
270
|
-
replyInvoice: (title, description, payload, currency, prices, params) => {
|
|
271
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
272
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
273
|
-
return this.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, replyTo, businessConnectionId });
|
|
274
|
-
},
|
|
275
|
-
replyDocument: (document, params) => {
|
|
276
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
277
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
278
|
-
return this.sendDocument(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
279
|
-
},
|
|
280
|
-
replySticker: (sticker, params) => {
|
|
281
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
282
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
283
|
-
return this.sendSticker(chatId, sticker, { ...params, replyTo, businessConnectionId });
|
|
284
|
-
},
|
|
285
|
-
replyContact: (firstName, number, params) => {
|
|
286
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
287
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
288
|
-
return this.sendContact(chatId, firstName, number, { ...params, replyTo, businessConnectionId });
|
|
289
|
-
},
|
|
290
|
-
replyLocation: (latitude, longitude, params) => {
|
|
291
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
292
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
293
|
-
return this.sendLocation(chatId, latitude, longitude, { ...params, replyTo, businessConnectionId });
|
|
294
|
-
},
|
|
295
|
-
replyDice: (params) => {
|
|
296
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
297
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
298
|
-
return this.sendDice(chatId, { ...params, replyTo, businessConnectionId });
|
|
299
|
-
},
|
|
300
|
-
replyVenue: (latitude, longitude, title, address, params) => {
|
|
301
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
302
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
303
|
-
return this.sendVenue(chatId, latitude, longitude, title, address, { ...params, replyTo, businessConnectionId });
|
|
304
|
-
},
|
|
305
|
-
replyVideo: (video, params) => {
|
|
306
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
307
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
308
|
-
return this.sendVideo(chatId, video, { ...params, replyTo, businessConnectionId });
|
|
309
|
-
},
|
|
310
|
-
replyAnimation: (document, params) => {
|
|
311
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
312
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
313
|
-
return this.sendAnimation(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
314
|
-
},
|
|
315
|
-
replyVoice: (document, params) => {
|
|
316
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
317
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
318
|
-
return this.sendVoice(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
319
|
-
},
|
|
320
|
-
replyAudio: (document, params) => {
|
|
321
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
322
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
323
|
-
return this.sendAudio(chatId, document, { ...params, replyTo, businessConnectionId });
|
|
324
|
-
},
|
|
325
|
-
replyVideoNote: (videoNote, params) => {
|
|
326
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
327
|
-
const replyTo = getReplyTo(params?.quote, chatId, messageId);
|
|
328
|
-
return this.sendVideoNote(chatId, videoNote, { ...params, replyTo, businessConnectionId });
|
|
329
|
-
},
|
|
330
|
-
delete: () => {
|
|
331
|
-
const { chatId, messageId } = mustGetMsg();
|
|
332
|
-
return this.deleteMessage(chatId, messageId);
|
|
333
|
-
},
|
|
334
|
-
forward: (to, params) => {
|
|
335
|
-
const { chatId, messageId } = mustGetMsg();
|
|
336
|
-
return this.forwardMessage(chatId, to, messageId, params);
|
|
337
|
-
},
|
|
338
|
-
pin: (params) => {
|
|
339
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
340
|
-
return this.pinMessage(chatId, messageId, { ...params, businessConnectionId });
|
|
341
|
-
},
|
|
342
|
-
unpin: () => {
|
|
343
|
-
const { chatId, messageId, businessConnectionId } = mustGetMsg();
|
|
344
|
-
return this.unpinMessage(chatId, messageId, { businessConnectionId });
|
|
345
|
-
},
|
|
346
|
-
banSender: (params) => {
|
|
347
|
-
const { chatId, senderId } = mustGetMsg();
|
|
348
|
-
if (!senderId) {
|
|
349
|
-
unreachable();
|
|
350
|
-
}
|
|
351
|
-
return this.banChatMember(chatId, senderId, params);
|
|
352
|
-
},
|
|
353
|
-
kickSender: () => {
|
|
354
|
-
const { chatId, senderId } = mustGetMsg();
|
|
355
|
-
if (!senderId) {
|
|
356
|
-
unreachable();
|
|
357
|
-
}
|
|
358
|
-
return this.kickChatMember(chatId, senderId);
|
|
359
|
-
},
|
|
360
|
-
setSenderRights: (params) => {
|
|
361
|
-
const { chatId, senderId } = mustGetMsg();
|
|
362
|
-
if (!senderId) {
|
|
363
|
-
unreachable();
|
|
364
|
-
}
|
|
365
|
-
return this.setChatMemberRights(chatId, senderId, params);
|
|
366
|
-
},
|
|
367
|
-
getChatAdministrators: () => {
|
|
368
|
-
const { chatId } = mustGetMsg();
|
|
369
|
-
return this.getChatAdministrators(chatId);
|
|
370
|
-
},
|
|
371
|
-
react: (reactions, params) => {
|
|
372
|
-
const { chatId, messageId } = mustGetMsg();
|
|
373
|
-
return this.setReactions(chatId, messageId, reactions, params);
|
|
374
|
-
},
|
|
375
|
-
answerCallbackQuery: (params) => {
|
|
376
|
-
if (!("callbackQuery" in update)) {
|
|
377
|
-
unreachable();
|
|
378
|
-
}
|
|
379
|
-
return this.answerCallbackQuery(update.callbackQuery.id, params);
|
|
380
|
-
},
|
|
381
|
-
answerInlineQuery: (results, params) => {
|
|
382
|
-
if (!("inlineQuery" in update)) {
|
|
383
|
-
unreachable();
|
|
384
|
-
}
|
|
385
|
-
return this.answerInlineQuery(update.inlineQuery.id, results, params);
|
|
386
|
-
},
|
|
387
|
-
sendChatAction: (chatAction, params) => {
|
|
388
|
-
const { chatId } = mustGetMsg();
|
|
389
|
-
return this.sendChatAction(chatId, chatAction, params);
|
|
390
|
-
},
|
|
391
|
-
editInlineMessageText: (text, params) => {
|
|
392
|
-
const inlineMessageId = mustGetInlineMsgId();
|
|
393
|
-
return this.editInlineMessageText(inlineMessageId, text, params);
|
|
394
|
-
},
|
|
395
|
-
editInlineMessageLiveLocation: (latitude, longitude, params) => {
|
|
396
|
-
const inlineMessageId = mustGetInlineMsgId();
|
|
397
|
-
return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
398
|
-
},
|
|
399
|
-
editInlineMessageReplyMarkup: (params) => {
|
|
400
|
-
const inlineMessageId = mustGetInlineMsgId();
|
|
401
|
-
return this.editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
402
|
-
},
|
|
403
|
-
editMessageText: (messageId, text, params) => {
|
|
404
|
-
const { chatId } = mustGetMsg();
|
|
405
|
-
return this.editMessageText(chatId, messageId, text, params);
|
|
406
|
-
},
|
|
407
|
-
editMessageLiveLocation: (messageId, latitude, longitude, params) => {
|
|
408
|
-
const { chatId } = mustGetMsg();
|
|
409
|
-
return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
410
|
-
},
|
|
411
|
-
editMessageReplyMarkup: (messageId, params) => {
|
|
412
|
-
const { chatId } = mustGetMsg();
|
|
413
|
-
return this.editMessageReplyMarkup(chatId, messageId, params);
|
|
414
|
-
},
|
|
415
|
-
getMessage: (messageId) => {
|
|
416
|
-
const { chatId } = mustGetMsg();
|
|
417
|
-
return this.getMessage(chatId, messageId);
|
|
418
|
-
},
|
|
419
|
-
getMessages: (messageIds) => {
|
|
420
|
-
const { chatId } = mustGetMsg();
|
|
421
|
-
return this.getMessages(chatId, messageIds);
|
|
422
|
-
},
|
|
423
|
-
forwardMessage: (to, messageId, params) => {
|
|
424
|
-
const { chatId } = mustGetMsg();
|
|
425
|
-
return this.forwardMessage(chatId, to, messageId, params);
|
|
426
|
-
},
|
|
427
|
-
forwardMessages: (to, messageIds, params) => {
|
|
428
|
-
const { chatId } = mustGetMsg();
|
|
429
|
-
return this.forwardMessages(chatId, to, messageIds, params);
|
|
430
|
-
},
|
|
431
|
-
deleteMessage: (messageId, params) => {
|
|
432
|
-
const { chatId } = mustGetMsg();
|
|
433
|
-
return this.deleteMessage(chatId, messageId, params);
|
|
434
|
-
},
|
|
435
|
-
deleteMessages: (messageIds, params) => {
|
|
436
|
-
const { chatId } = mustGetMsg();
|
|
437
|
-
return this.deleteMessages(chatId, messageIds, params);
|
|
438
|
-
},
|
|
439
|
-
pinMessage: (messageId, params) => {
|
|
440
|
-
const { chatId } = mustGetMsg();
|
|
441
|
-
return this.pinMessage(chatId, messageId, params);
|
|
442
|
-
},
|
|
443
|
-
unpinMessage: (messageId) => {
|
|
444
|
-
const { chatId } = mustGetMsg();
|
|
445
|
-
return this.unpinMessage(chatId, messageId);
|
|
446
|
-
},
|
|
447
|
-
unpinMessages: () => {
|
|
448
|
-
const { chatId } = mustGetMsg();
|
|
449
|
-
return this.unpinMessages(chatId);
|
|
450
|
-
},
|
|
451
|
-
setAvailableReactions: (availableReactions) => {
|
|
452
|
-
const { chatId } = mustGetMsg();
|
|
453
|
-
return this.setAvailableReactions(chatId, availableReactions);
|
|
454
|
-
},
|
|
455
|
-
addReaction: (messageId, reaction, params) => {
|
|
456
|
-
const { chatId } = mustGetMsg();
|
|
457
|
-
return this.addReaction(chatId, messageId, reaction, params);
|
|
458
|
-
},
|
|
459
|
-
removeReaction: (messageId, reaction) => {
|
|
460
|
-
const { chatId } = mustGetMsg();
|
|
461
|
-
return this.removeReaction(chatId, messageId, reaction);
|
|
462
|
-
},
|
|
463
|
-
setReactions: (messageId, reactions, params) => {
|
|
464
|
-
const { chatId } = mustGetMsg();
|
|
465
|
-
return this.setReactions(chatId, messageId, reactions, params);
|
|
466
|
-
},
|
|
467
|
-
read: () => {
|
|
468
|
-
const { chatId, messageId } = mustGetMsg();
|
|
469
|
-
return this.readMessages(chatId, messageId);
|
|
470
|
-
},
|
|
471
|
-
setChatPhoto: (photo, params) => {
|
|
472
|
-
const { chatId } = mustGetMsg();
|
|
473
|
-
return this.setChatPhoto(chatId, photo, params);
|
|
474
|
-
},
|
|
475
|
-
deleteChatPhoto: () => {
|
|
476
|
-
const { chatId } = mustGetMsg();
|
|
477
|
-
return this.deleteChatPhoto(chatId);
|
|
478
|
-
},
|
|
479
|
-
banChatMember: (memberId, params) => {
|
|
480
|
-
const { chatId } = mustGetMsg();
|
|
481
|
-
return this.banChatMember(chatId, memberId, params);
|
|
482
|
-
},
|
|
483
|
-
unbanChatMember: (memberId) => {
|
|
484
|
-
const { chatId } = mustGetMsg();
|
|
485
|
-
return this.unbanChatMember(chatId, memberId);
|
|
486
|
-
},
|
|
487
|
-
kickChatMember: (memberId) => {
|
|
488
|
-
const { chatId } = mustGetMsg();
|
|
489
|
-
return this.kickChatMember(chatId, memberId);
|
|
490
|
-
},
|
|
491
|
-
setChatMemberRights: (memberId, params) => {
|
|
492
|
-
const { chatId } = mustGetMsg();
|
|
493
|
-
return this.setChatMemberRights(chatId, memberId, params);
|
|
494
|
-
},
|
|
495
|
-
deleteChatMemberMessages: (userId) => {
|
|
496
|
-
const { chatId } = mustGetMsg();
|
|
497
|
-
return this.deleteChatMemberMessages(chatId, userId);
|
|
498
|
-
},
|
|
499
|
-
searchMessages: (query, params) => {
|
|
500
|
-
const { chatId } = mustGetMsg();
|
|
501
|
-
return this.searchMessages(chatId, query, params);
|
|
502
|
-
},
|
|
503
|
-
setBoostsRequiredToCircumventRestrictions: (boosts) => {
|
|
504
|
-
const { chatId } = mustGetMsg();
|
|
505
|
-
return this.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
506
|
-
},
|
|
507
|
-
createInviteLink: (params) => {
|
|
508
|
-
const { chatId } = mustGetMsg();
|
|
509
|
-
return this.createInviteLink(chatId, params);
|
|
510
|
-
},
|
|
511
|
-
getCreatedInviteLinks: (params) => {
|
|
512
|
-
const { chatId } = mustGetMsg();
|
|
513
|
-
return this.getCreatedInviteLinks(chatId, params);
|
|
514
|
-
},
|
|
515
|
-
leave: () => {
|
|
516
|
-
const { chatId } = mustGetMsg();
|
|
517
|
-
return this.leaveChat(chatId);
|
|
518
|
-
},
|
|
519
|
-
block: () => {
|
|
520
|
-
return this.blockUser(mustGetUserId());
|
|
521
|
-
},
|
|
522
|
-
unblock: () => {
|
|
523
|
-
return this.unblockUser(mustGetUserId());
|
|
524
|
-
},
|
|
525
|
-
getChatMember: (userId) => {
|
|
526
|
-
const { chatId } = mustGetMsg();
|
|
527
|
-
return this.getChatMember(chatId, userId);
|
|
528
|
-
},
|
|
529
|
-
getChatMembers: (params) => {
|
|
530
|
-
const { chatId } = mustGetMsg();
|
|
531
|
-
return this.getChatMembers(chatId, params);
|
|
532
|
-
},
|
|
533
|
-
setChatStickerSet: (setName) => {
|
|
534
|
-
const { chatId } = mustGetMsg();
|
|
535
|
-
return this.setChatStickerSet(chatId, setName);
|
|
536
|
-
},
|
|
537
|
-
deleteChatStickerSet: () => {
|
|
538
|
-
const { chatId } = mustGetMsg();
|
|
539
|
-
return this.deleteChatStickerSet(chatId);
|
|
540
|
-
},
|
|
541
|
-
getBusinessConnection: () => {
|
|
542
|
-
const { businessConnectionId } = mustGetMsg();
|
|
543
|
-
if (!businessConnectionId) {
|
|
544
|
-
unreachable();
|
|
545
|
-
}
|
|
546
|
-
return this.getBusinessConnection(businessConnectionId);
|
|
547
|
-
},
|
|
548
|
-
answerPreCheckoutQuery: (ok, params) => {
|
|
549
|
-
if (!("preCheckoutQuery" in update)) {
|
|
550
|
-
unreachable();
|
|
551
|
-
}
|
|
552
|
-
return this.answerPreCheckoutQuery(update.preCheckoutQuery.id, ok, params);
|
|
553
|
-
},
|
|
554
|
-
approveJoinRequest: () => {
|
|
555
|
-
const { chatId, userId } = mustGetMsg();
|
|
556
|
-
if (!userId) {
|
|
557
|
-
unreachable();
|
|
558
|
-
}
|
|
559
|
-
return this.approveJoinRequest(chatId, userId);
|
|
560
|
-
},
|
|
561
|
-
declineJoinRequest: () => {
|
|
562
|
-
const { chatId, userId } = mustGetMsg();
|
|
563
|
-
if (!userId) {
|
|
564
|
-
unreachable();
|
|
565
|
-
}
|
|
566
|
-
return this.declineJoinRequest(chatId, userId);
|
|
567
|
-
},
|
|
568
|
-
};
|
|
569
|
-
return cleanObject(context);
|
|
570
|
-
});
|
|
571
|
-
_Client_lastPropagatedConnectionState.set(this, null);
|
|
572
|
-
_Client_stateChangeHandler.set(this, ((connected) => {
|
|
573
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_reconnect).call(this));
|
|
574
|
-
const connectionState = connected ? "ready" : "notConnected";
|
|
575
|
-
if (__classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
576
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
577
|
-
}
|
|
578
|
-
}).bind(this));
|
|
579
|
-
_Client_storageInited.set(this, false);
|
|
580
|
-
_Client_connectMutex.set(this, new Mutex());
|
|
581
|
-
_Client_lastConnect.set(this, null);
|
|
582
|
-
_Client_connectionInited.set(this, false);
|
|
583
|
-
_Client_lastPropagatedAuthorizationState.set(this, null);
|
|
584
|
-
_Client_connectionInsuranceLoopStarted.set(this, false);
|
|
585
|
-
_Client_connectionInsuranceLoopAbortController.set(this, null);
|
|
586
|
-
_Client_pingLoopAbortController.set(this, null);
|
|
587
|
-
_Client_pingInterval.set(this, 56 * second);
|
|
588
|
-
_Client_lastUpdates.set(this, new Date());
|
|
589
|
-
_Client_handleInvokeError.set(this, skipInvoke());
|
|
590
|
-
/**
|
|
591
|
-
* Invokes a function waiting and returning its reply if the second parameter is not `true`. Requires the client
|
|
592
|
-
* to be connected.
|
|
593
|
-
*
|
|
594
|
-
* @param function_ The function to invoke.
|
|
595
|
-
*/
|
|
596
|
-
Object.defineProperty(this, "invoke", {
|
|
597
|
-
enumerable: true,
|
|
598
|
-
configurable: true,
|
|
599
|
-
writable: true,
|
|
600
|
-
value: Object.assign(__classPrivateFieldGet(this, _Client_instances, "m", _Client_invoke), {
|
|
601
|
-
use: (handler) => {
|
|
602
|
-
const handle = __classPrivateFieldGet(this, _Client_handleInvokeError, "f");
|
|
603
|
-
__classPrivateFieldSet(this, _Client_handleInvokeError, async (ctx, next) => {
|
|
604
|
-
let result = null;
|
|
605
|
-
return await handle(ctx, async () => {
|
|
606
|
-
if (result != null)
|
|
607
|
-
return result;
|
|
608
|
-
result = await handler(ctx, next);
|
|
609
|
-
return result;
|
|
610
|
-
});
|
|
611
|
-
}, "f");
|
|
612
|
-
},
|
|
613
|
-
})
|
|
614
|
-
});
|
|
615
|
-
_Client_authStringImported.set(this, false);
|
|
616
|
-
_Client_lastGetMe.set(this, null);
|
|
617
|
-
__classPrivateFieldSet(this, _Client_client, new ClientEncrypted(params), "f");
|
|
618
|
-
__classPrivateFieldGet(this, _Client_client, "f").stateChangeHandler = __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").bind(this);
|
|
619
|
-
__classPrivateFieldGet(this, _Client_client, "f").handlers = {
|
|
620
|
-
serverSaltReassigned: async (newServerSalt) => {
|
|
621
|
-
await this.storage.setServerSalt(newServerSalt);
|
|
622
|
-
},
|
|
623
|
-
updates: (updates, call, callback) => {
|
|
624
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(updates, true, call, callback);
|
|
625
|
-
__classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
|
|
626
|
-
},
|
|
627
|
-
result: async (result, callback) => {
|
|
628
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
|
|
629
|
-
callback();
|
|
630
|
-
},
|
|
631
|
-
error: async (_err, source) => {
|
|
632
|
-
switch (source) {
|
|
633
|
-
case "deserialization":
|
|
634
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
635
|
-
break;
|
|
636
|
-
case "decryption":
|
|
637
|
-
await this.reconnect();
|
|
638
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
639
|
-
break;
|
|
640
|
-
}
|
|
641
|
-
},
|
|
642
|
-
};
|
|
643
|
-
__classPrivateFieldSet(this, _Client_apiId, params?.apiId ?? 0, "f");
|
|
644
|
-
__classPrivateFieldSet(this, _Client_apiHash, params?.apiHash ?? "", "f");
|
|
645
|
-
__classPrivateFieldSet(this, _Client_storage_, params?.storage || new StorageMemory(), "f");
|
|
646
|
-
__classPrivateFieldSet(this, _Client_persistCache, params?.persistCache ?? false, "f");
|
|
647
|
-
if (!__classPrivateFieldGet(this, _Client_persistCache, "f")) {
|
|
648
|
-
__classPrivateFieldSet(this, _Client_messageStorage_, new StorageMemory(), "f");
|
|
649
|
-
}
|
|
650
|
-
else {
|
|
651
|
-
__classPrivateFieldSet(this, _Client_messageStorage_, __classPrivateFieldGet(this, _Client_storage_, "f"), "f");
|
|
652
|
-
}
|
|
653
|
-
this.storage = new StorageOperations(__classPrivateFieldGet(this, _Client_storage_, "f"));
|
|
654
|
-
this.messageStorage = new StorageOperations(__classPrivateFieldGet(this, _Client_messageStorage_, "f"));
|
|
655
|
-
__classPrivateFieldSet(this, _Client_parseMode, params?.parseMode ?? null, "f");
|
|
656
|
-
__classPrivateFieldSet(this, _Client_disableUpdates, params?.disableUpdates ?? false, "f");
|
|
657
|
-
__classPrivateFieldSet(this, _Client_authString, params?.authString, "f");
|
|
658
|
-
this.appVersion = params?.appVersion ?? APP_VERSION;
|
|
659
|
-
this.deviceModel = params?.deviceModel ?? DEVICE_MODEL;
|
|
660
|
-
this.langCode = params?.langCode ?? LANG_CODE;
|
|
661
|
-
this.langPack = params?.langPack ?? LANG_PACK;
|
|
662
|
-
this.systemLangCode = params?.systemLangCode ?? SYSTEM_LANG_CODE;
|
|
663
|
-
this.systemVersion = params?.systemVersion ?? SYSTEM_VERSION;
|
|
664
|
-
__classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
|
|
665
|
-
__classPrivateFieldSet(this, _Client_outgoingMessages, params?.outgoingMessages ?? null, "f");
|
|
666
|
-
if (params?.prefixes) {
|
|
667
|
-
this.prefixes = params?.prefixes;
|
|
668
|
-
}
|
|
669
|
-
__classPrivateFieldSet(this, _Client_guaranteeUpdateDelivery, params?.guaranteeUpdateDelivery ?? false, "f");
|
|
670
|
-
const L = __classPrivateFieldSet(this, _Client_L, getLogger("Client").client(id++), "f");
|
|
671
|
-
__classPrivateFieldSet(this, _Client_LsignIn, L.branch("signIn"), "f");
|
|
672
|
-
__classPrivateFieldSet(this, _Client_LpingLoop, L.branch("pingLoop"), "f");
|
|
673
|
-
__classPrivateFieldSet(this, _Client_LhandleMigrationError, L.branch("[handleMigrationError]"), "f");
|
|
674
|
-
__classPrivateFieldSet(this, _Client_L$initConncetion, L.branch("#initConnection"), "f");
|
|
675
|
-
__classPrivateFieldSet(this, _Client_Lmin, L.branch("min"), "f");
|
|
676
|
-
__classPrivateFieldSet(this, _Client_cdn, params?.cdn ?? false, "f");
|
|
677
|
-
const c = {
|
|
678
|
-
id,
|
|
679
|
-
invoke: async (function_, businessConnectionId) => {
|
|
680
|
-
if (businessConnectionId) {
|
|
681
|
-
return await this.invoke({ _: "invokeWithBusinessConnection", connection_id: businessConnectionId, query: function_ });
|
|
682
|
-
}
|
|
683
|
-
else {
|
|
684
|
-
return await this.invoke(function_);
|
|
685
|
-
}
|
|
686
|
-
},
|
|
687
|
-
storage: this.storage,
|
|
688
|
-
messageStorage: this.messageStorage,
|
|
689
|
-
guaranteeUpdateDelivery: __classPrivateFieldGet(this, _Client_guaranteeUpdateDelivery, "f"),
|
|
690
|
-
setConnectionState: __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).bind(this),
|
|
691
|
-
resetConnectionState: () => __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").call(this, this.connected),
|
|
692
|
-
getSelfId: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).bind(this),
|
|
693
|
-
getInputPeer: this.getInputPeer.bind(this),
|
|
694
|
-
getInputChannel: this.getInputChannel.bind(this),
|
|
695
|
-
getInputUser: this.getInputUser.bind(this),
|
|
696
|
-
getEntity: this[getEntity].bind(this),
|
|
697
|
-
handleUpdate: __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).bind(this),
|
|
698
|
-
parseMode: __classPrivateFieldGet(this, _Client_parseMode, "f"),
|
|
699
|
-
getCdnConnection: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getCdnConnection).bind(this),
|
|
700
|
-
getCdnConnectionPool: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getCdnConnectionPool).bind(this),
|
|
701
|
-
cdn: __classPrivateFieldGet(this, _Client_cdn, "f"),
|
|
702
|
-
outgoingMessages: __classPrivateFieldGet(this, _Client_outgoingMessages, "f"),
|
|
703
|
-
dropPendingUpdates: params?.dropPendingUpdates,
|
|
704
|
-
disconnected: () => this.disconnected,
|
|
705
|
-
};
|
|
706
|
-
__classPrivateFieldSet(this, _Client_updateManager, new UpdateManager(c), "f");
|
|
707
|
-
__classPrivateFieldSet(this, _Client_networkStatisticsManager, new NetworkStatisticsManager(c), "f");
|
|
708
|
-
__classPrivateFieldSet(this, _Client_botInfoManager, new BotInfoManager(c), "f");
|
|
709
|
-
__classPrivateFieldSet(this, _Client_fileManager, new FileManager(c), "f");
|
|
710
|
-
__classPrivateFieldSet(this, _Client_reactionManager, new ReactionManager(c), "f");
|
|
711
|
-
__classPrivateFieldSet(this, _Client_businessConnectionManager, new BusinessConnectionManager(c), "f");
|
|
712
|
-
__classPrivateFieldSet(this, _Client_videoChatManager, new VideoChatManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f") }), "f");
|
|
713
|
-
__classPrivateFieldSet(this, _Client_messageManager, new MessageManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f") }), "f");
|
|
714
|
-
__classPrivateFieldSet(this, _Client_callbackQueryManager, new CallbackQueryManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
715
|
-
__classPrivateFieldSet(this, _Client_storyManager, new StoryManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
716
|
-
__classPrivateFieldSet(this, _Client_inlineQueryManager, new InlineQueryManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
717
|
-
__classPrivateFieldSet(this, _Client_chatListManager, new ChatListManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
718
|
-
__classPrivateFieldSet(this, _Client_accountManager, new AccountManager(c), "f");
|
|
719
|
-
__classPrivateFieldSet(this, _Client_paymentManager, new PaymentManager(c), "f");
|
|
720
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
|
|
721
|
-
const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
|
|
722
|
-
__classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
|
|
723
|
-
const transport = transportProvider(params);
|
|
724
|
-
transport.connection.callback = __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f").getTransportReadWriteCallback();
|
|
725
|
-
return transport;
|
|
726
|
-
};
|
|
727
|
-
this.invoke.use(async ({ error }, next) => {
|
|
728
|
-
if (error instanceof ConnectionError) {
|
|
729
|
-
while (!this.connected) {
|
|
730
|
-
if (this.disconnected) {
|
|
731
|
-
return next();
|
|
732
|
-
}
|
|
733
|
-
try {
|
|
734
|
-
await this.connect();
|
|
735
|
-
}
|
|
736
|
-
catch {
|
|
737
|
-
//
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
return true;
|
|
741
|
-
}
|
|
742
|
-
else if (is("bad_msg_notification", error)) {
|
|
743
|
-
return true;
|
|
744
|
-
}
|
|
745
|
-
else {
|
|
746
|
-
return next();
|
|
747
|
-
}
|
|
748
|
-
});
|
|
749
|
-
if (params?.defaultHandlers ?? true) {
|
|
750
|
-
this.invoke.use(async ({ error }, next) => {
|
|
751
|
-
if (error instanceof FloodWait && error.seconds <= 10) {
|
|
752
|
-
L.warning("sleeping for", error.seconds, "because of:", error);
|
|
753
|
-
await new Promise((r) => setTimeout(r, 1000 * error.seconds));
|
|
754
|
-
return true;
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
757
|
-
return next();
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
// direct ClientEncrypted property proxies
|
|
763
|
-
get connected() {
|
|
764
|
-
return __classPrivateFieldGet(this, _Client_client, "f").connected;
|
|
765
|
-
}
|
|
766
|
-
get disconnected() {
|
|
767
|
-
return __classPrivateFieldGet(this, _Client_client, "f").disconnected;
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
* Sets the DC and resets the auth key stored in the session provider
|
|
771
|
-
* if the stored DC was not the same as the `dc` parameter.
|
|
772
|
-
*
|
|
773
|
-
* @param dc The DC to change to.
|
|
774
|
-
*/
|
|
775
|
-
async setDc(dc) {
|
|
776
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
777
|
-
if (await this.storage.getDc() != dc) {
|
|
778
|
-
await this.storage.setDc(dc);
|
|
779
|
-
await this.storage.setAuthKey(null);
|
|
780
|
-
await this.storage.getAuthKey();
|
|
781
|
-
}
|
|
782
|
-
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
783
|
-
}
|
|
784
|
-
/**
|
|
785
|
-
* Loads the session if `setDc` was not called, initializes and connnects
|
|
786
|
-
* a `ClientPlain` to generate auth key if there was none, and connects the client.
|
|
787
|
-
* Before establishing the connection, the session is saved.
|
|
788
|
-
*/
|
|
789
|
-
async connect() {
|
|
790
|
-
const unlock = await __classPrivateFieldGet(this, _Client_connectMutex, "f").lock();
|
|
791
|
-
try {
|
|
792
|
-
if (this.connected) {
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
if (__classPrivateFieldGet(this, _Client_lastConnect, "f") != null && Date.now() - __classPrivateFieldGet(this, _Client_lastConnect, "f").getTime() <= 10 * second) {
|
|
796
|
-
await new Promise((r) => setTimeout(r, 3 * second));
|
|
797
|
-
}
|
|
798
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
799
|
-
if (__classPrivateFieldGet(this, _Client_authString, "f") && !__classPrivateFieldGet(this, _Client_authStringImported, "f")) {
|
|
800
|
-
await this.importAuthString(__classPrivateFieldGet(this, _Client_authString, "f"));
|
|
801
|
-
}
|
|
802
|
-
const [authKey, dc] = await Promise.all([this.storage.getAuthKey(), this.storage.getDc()]);
|
|
803
|
-
if (authKey != null && dc != null) {
|
|
804
|
-
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
805
|
-
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
806
|
-
if (__classPrivateFieldGet(this, _Client_client, "f").serverSalt == 0n) {
|
|
807
|
-
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = await this.storage.getServerSalt() ?? 0n;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
else {
|
|
811
|
-
const plain = new ClientPlain({ initialDc: __classPrivateFieldGet(this, _Client_client, "f").initialDc, transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider, cdn: __classPrivateFieldGet(this, _Client_client, "f").cdn, publicKeys: __classPrivateFieldGet(this, _Client_publicKeys, "f") });
|
|
812
|
-
const dc = await this.storage.getDc();
|
|
813
|
-
if (dc != null) {
|
|
814
|
-
plain.setDc(dc);
|
|
815
|
-
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
816
|
-
}
|
|
817
|
-
await plain.connect();
|
|
818
|
-
const [authKey, serverSalt] = await plain.createAuthKey();
|
|
819
|
-
drop(plain.disconnect());
|
|
820
|
-
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
821
|
-
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = serverSalt;
|
|
822
|
-
}
|
|
823
|
-
await __classPrivateFieldGet(this, _Client_client, "f").connect();
|
|
824
|
-
__classPrivateFieldSet(this, _Client_lastConnect, new Date(), "f");
|
|
825
|
-
await Promise.all([this.storage.setAuthKey(__classPrivateFieldGet(this, _Client_client, "f").authKey), this.storage.setDc(__classPrivateFieldGet(this, _Client_client, "f").dc), this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_client, "f").serverSalt)]);
|
|
826
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_startConnectionInsuranceLoop).call(this);
|
|
827
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_startPingLoop).call(this);
|
|
828
|
-
}
|
|
829
|
-
finally {
|
|
830
|
-
unlock();
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
async reconnect(dc) {
|
|
834
|
-
if (dc) {
|
|
835
|
-
await this.setDc(dc);
|
|
836
|
-
}
|
|
837
|
-
await __classPrivateFieldGet(this, _Client_client, "f").reconnect();
|
|
838
|
-
}
|
|
839
|
-
async [(_Client_client = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(), _Client_updateManager = new WeakMap(), _Client_networkStatisticsManager = new WeakMap(), _Client_botInfoManager = new WeakMap(), _Client_fileManager = new WeakMap(), _Client_reactionManager = new WeakMap(), _Client_videoChatManager = new WeakMap(), _Client_businessConnectionManager = new WeakMap(), _Client_messageManager = new WeakMap(), _Client_storyManager = new WeakMap(), _Client_callbackQueryManager = new WeakMap(), _Client_inlineQueryManager = new WeakMap(), _Client_chatListManager = new WeakMap(), _Client_accountManager = new WeakMap(), _Client_paymentManager = new WeakMap(), _Client_managers = new WeakMap(), _Client_storage_ = new WeakMap(), _Client_messageStorage_ = new WeakMap(), _Client_parseMode = new WeakMap(), _Client_apiId = new WeakMap(), _Client_apiHash = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_outgoingMessages = new WeakMap(), _Client_persistCache = new WeakMap(), _Client_disableUpdates = new WeakMap(), _Client_authString = new WeakMap(), _Client_cdn = new WeakMap(), _Client_L = new WeakMap(), _Client_LsignIn = new WeakMap(), _Client_LpingLoop = new WeakMap(), _Client_LhandleMigrationError = new WeakMap(), _Client_L$initConncetion = new WeakMap(), _Client_Lmin = new WeakMap(), _Client_reconnecting = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_stateChangeHandler = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_lastConnect = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_connectionInsuranceLoopStarted = new WeakMap(), _Client_connectionInsuranceLoopAbortController = new WeakMap(), _Client_pingLoopAbortController = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_authStringImported = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_instances = new WeakSet(), _Client_reconnect = async function _Client_reconnect() {
|
|
840
|
-
if (this.connected) {
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
if (this.disconnected) {
|
|
844
|
-
__classPrivateFieldGet(this, _Client_L, "f").debug("not reconnecting");
|
|
845
|
-
return;
|
|
846
|
-
}
|
|
847
|
-
if (__classPrivateFieldGet(this, _Client_reconnecting, "f")) {
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
__classPrivateFieldSet(this, _Client_reconnecting, true, "f");
|
|
851
|
-
try {
|
|
852
|
-
let delay = 5;
|
|
853
|
-
while (!this.connected) {
|
|
854
|
-
__classPrivateFieldGet(this, _Client_L, "f").debug("reconnecting");
|
|
855
|
-
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.abort();
|
|
856
|
-
try {
|
|
857
|
-
await this.connect();
|
|
858
|
-
__classPrivateFieldGet(this, _Client_L, "f").debug("reconnected");
|
|
859
|
-
drop(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("reconnect"));
|
|
860
|
-
break;
|
|
861
|
-
}
|
|
862
|
-
catch (err) {
|
|
863
|
-
if (delay < 15) {
|
|
864
|
-
delay += 5;
|
|
865
|
-
}
|
|
866
|
-
__classPrivateFieldGet(this, _Client_L, "f").debug(`failed to reconnect, retrying in ${delay}:`, err);
|
|
867
|
-
}
|
|
868
|
-
await new Promise((r) => setTimeout(r, delay * second));
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
finally {
|
|
872
|
-
__classPrivateFieldSet(this, _Client_reconnecting, false, "f");
|
|
873
|
-
}
|
|
874
|
-
}, _Client_getApiId = async function _Client_getApiId() {
|
|
875
|
-
const apiId = __classPrivateFieldGet(this, _Client_apiId, "f") || await this.storage.getApiId();
|
|
876
|
-
if (!apiId) {
|
|
877
|
-
throw new InputError("apiId not set");
|
|
878
|
-
}
|
|
879
|
-
return apiId;
|
|
880
|
-
}, _Client_getCdnConnectionPool = function _Client_getCdnConnectionPool(connectionCount, dcId) {
|
|
881
|
-
const connections = new Array();
|
|
882
|
-
for (let i = 0; i < connectionCount; ++i) {
|
|
883
|
-
connections.push(__classPrivateFieldGet(this, _Client_instances, "m", _Client_getCdnConnection).call(this, dcId));
|
|
884
|
-
}
|
|
885
|
-
let prev = 0;
|
|
886
|
-
return {
|
|
887
|
-
size: connectionCount,
|
|
888
|
-
invoke: () => {
|
|
889
|
-
if (prev + 1 > connections.length)
|
|
890
|
-
prev = 0;
|
|
891
|
-
const connection = connections[prev++];
|
|
892
|
-
return connection.invoke;
|
|
893
|
-
},
|
|
894
|
-
connect: async () => {
|
|
895
|
-
for await (const connection of connections) {
|
|
896
|
-
await connection.connect();
|
|
897
|
-
}
|
|
898
|
-
},
|
|
899
|
-
disconnect: async () => {
|
|
900
|
-
for await (const connection of connections) {
|
|
901
|
-
await connection.disconnect();
|
|
902
|
-
}
|
|
903
|
-
},
|
|
904
|
-
};
|
|
905
|
-
}, _Client_getCdnConnection = function _Client_getCdnConnection(dcId) {
|
|
906
|
-
const provider = this.storage.provider;
|
|
907
|
-
const client = new _a({
|
|
908
|
-
storage: (!dcId || dcId == __classPrivateFieldGet(this, _Client_client, "f").dcId) ? provider : provider.branch(`download_client_${dcId}`),
|
|
909
|
-
apiId: __classPrivateFieldGet(this, _Client_apiId, "f"),
|
|
910
|
-
apiHash: __classPrivateFieldGet(this, _Client_apiHash, "f"),
|
|
911
|
-
transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
|
|
912
|
-
appVersion: this.appVersion,
|
|
913
|
-
deviceModel: this.deviceModel,
|
|
914
|
-
langCode: this.langCode,
|
|
915
|
-
langPack: this.langPack,
|
|
916
|
-
systemLangCode: this.systemLangCode,
|
|
917
|
-
systemVersion: this.systemVersion,
|
|
918
|
-
cdn: true,
|
|
919
|
-
initialDc: getDc(dcId || __classPrivateFieldGet(this, _Client_client, "f").dcId),
|
|
920
|
-
});
|
|
921
|
-
__classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
|
|
922
|
-
client.invoke.use(async (ctx, next) => {
|
|
923
|
-
if (ctx.error instanceof AuthKeyUnregistered && dcId) {
|
|
924
|
-
try {
|
|
925
|
-
const exportedAuth = await this.invoke({ _: "auth.exportAuthorization", dc_id: dcId });
|
|
926
|
-
await client.invoke({ ...exportedAuth, _: "auth.importAuthorization" });
|
|
927
|
-
return true;
|
|
928
|
-
}
|
|
929
|
-
catch (err) {
|
|
930
|
-
throw err;
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
else {
|
|
934
|
-
return await next();
|
|
935
|
-
}
|
|
936
|
-
});
|
|
937
|
-
return {
|
|
938
|
-
invoke: client.invoke.bind(client),
|
|
939
|
-
connect: async () => {
|
|
940
|
-
await client.connect();
|
|
941
|
-
if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
|
|
942
|
-
let dc = String(dcId);
|
|
943
|
-
if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
|
|
944
|
-
dc += "-test";
|
|
945
|
-
}
|
|
946
|
-
await client.setDc(dc);
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
disconnect: client.disconnect.bind(client),
|
|
950
|
-
};
|
|
951
|
-
}, _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
952
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).call(this, { connectionState });
|
|
953
|
-
__classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
|
|
954
|
-
}, _Client_initStorage = async function _Client_initStorage() {
|
|
955
|
-
if (!__classPrivateFieldGet(this, _Client_storageInited, "f")) {
|
|
956
|
-
await this.storage.initialize();
|
|
957
|
-
if (!__classPrivateFieldGet(this, _Client_guaranteeUpdateDelivery, "f")) {
|
|
958
|
-
await this.storage.deleteUpdates();
|
|
959
|
-
}
|
|
960
|
-
__classPrivateFieldSet(this, _Client_storageInited, true, "f");
|
|
961
|
-
}
|
|
962
|
-
}, handleMigrationError)](err) {
|
|
963
|
-
let newDc = String(err.dc);
|
|
964
|
-
if (Math.abs(__classPrivateFieldGet(this, _Client_client, "f").dcId) >= 10_000) {
|
|
965
|
-
newDc += "-test";
|
|
966
|
-
}
|
|
967
|
-
await this.reconnect(newDc);
|
|
968
|
-
__classPrivateFieldGet(this, _Client_LhandleMigrationError, "f").debug(`migrated to DC${newDc}`);
|
|
969
|
-
}
|
|
970
|
-
async disconnect() {
|
|
971
|
-
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
972
|
-
await __classPrivateFieldGet(this, _Client_client, "f").disconnect();
|
|
973
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").closeAllChats();
|
|
974
|
-
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.abort();
|
|
975
|
-
__classPrivateFieldGet(this, _Client_connectionInsuranceLoopAbortController, "f")?.abort();
|
|
976
|
-
}
|
|
977
|
-
/**
|
|
978
|
-
* Signs in using the provided parameters if not already signed in.
|
|
979
|
-
* If no parameters are provided, the credentials will be prompted in runtime.
|
|
980
|
-
*
|
|
981
|
-
* Notes:
|
|
982
|
-
* 1. Requires the `apiId` and `apiHash` paramters to be passed when constructing the client.
|
|
983
|
-
* 3. Reconnects the client to the appropriate DC in case of MIGRATE_X errors.
|
|
984
|
-
*/
|
|
985
|
-
async signIn(params) {
|
|
986
|
-
try {
|
|
987
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("signIn");
|
|
988
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
989
|
-
drop(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("signIn"));
|
|
990
|
-
__classPrivateFieldGet(this, _Client_LsignIn, "f").debug("already signed in");
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
catch (err) {
|
|
994
|
-
if (!(err instanceof AuthKeyUnregistered) && !(err instanceof SessionRevoked)) {
|
|
995
|
-
throw err;
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
const apiId = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this);
|
|
999
|
-
if (!__classPrivateFieldGet(this, _Client_apiHash, "f")) {
|
|
1000
|
-
throw new InputError("apiHash not set");
|
|
1001
|
-
}
|
|
1002
|
-
if (typeof params === "undefined") {
|
|
1003
|
-
const loginType = mustPromptOneOf("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
1004
|
-
if (loginType == "b") {
|
|
1005
|
-
params = { botToken: mustPrompt("Bot token:") };
|
|
1006
|
-
}
|
|
1007
|
-
else {
|
|
1008
|
-
params = { phone: () => mustPrompt("Phone number:"), code: () => mustPrompt("Verification code:"), password: () => mustPrompt("Password:") };
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
__classPrivateFieldGet(this, _Client_LsignIn, "f").debug("authorizing with", typeof params === "string" ? "bot token" : is("auth.exportedAuthorization", params) ? "exported authorization" : "AuthorizeUserParams");
|
|
1012
|
-
if (params && "botToken" in params) {
|
|
1013
|
-
while (true) {
|
|
1014
|
-
try {
|
|
1015
|
-
const auth = await this.invoke({ _: "auth.importBotAuthorization", api_id: apiId, api_hash: __classPrivateFieldGet(this, _Client_apiHash, "f"), bot_auth_token: params.botToken, flags: 0 });
|
|
1016
|
-
await this.storage.setAccountId(Number(as("auth.authorization", auth).user.id));
|
|
1017
|
-
await this.storage.setAccountType("bot");
|
|
1018
|
-
break;
|
|
1019
|
-
}
|
|
1020
|
-
catch (err) {
|
|
1021
|
-
if (err instanceof Migrate) {
|
|
1022
|
-
await this[handleMigrationError](err);
|
|
1023
|
-
continue;
|
|
1024
|
-
}
|
|
1025
|
-
else {
|
|
1026
|
-
throw err;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
__classPrivateFieldGet(this, _Client_LsignIn, "f").debug("authorized as bot");
|
|
1031
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
1032
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("authorize");
|
|
1033
|
-
return;
|
|
1034
|
-
}
|
|
1035
|
-
auth: while (true) {
|
|
1036
|
-
try {
|
|
1037
|
-
let phone;
|
|
1038
|
-
let sentCode;
|
|
1039
|
-
while (true) {
|
|
1040
|
-
try {
|
|
1041
|
-
phone = typeof params.phone === "string" ? params.phone : await params.phone();
|
|
1042
|
-
const sendCode = () => this.invoke({
|
|
1043
|
-
_: "auth.sendCode",
|
|
1044
|
-
phone_number: phone,
|
|
1045
|
-
api_id: __classPrivateFieldGet(this, _Client_apiId, "f"),
|
|
1046
|
-
api_hash: __classPrivateFieldGet(this, _Client_apiHash, "f"),
|
|
1047
|
-
settings: { _: "codeSettings" },
|
|
1048
|
-
}).then((v) => as("auth.sentCode", v));
|
|
1049
|
-
try {
|
|
1050
|
-
sentCode = await sendCode();
|
|
1051
|
-
}
|
|
1052
|
-
catch (err) {
|
|
1053
|
-
if (err instanceof Migrate) {
|
|
1054
|
-
await this[handleMigrationError](err);
|
|
1055
|
-
sentCode = await sendCode();
|
|
1056
|
-
}
|
|
1057
|
-
else {
|
|
1058
|
-
throw err;
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
break;
|
|
1062
|
-
}
|
|
1063
|
-
catch (err) {
|
|
1064
|
-
if (err instanceof PhoneNumberInvalid) {
|
|
1065
|
-
continue;
|
|
1066
|
-
}
|
|
1067
|
-
else {
|
|
1068
|
-
throw err;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
__classPrivateFieldGet(this, _Client_LsignIn, "f").debug("verification code sent");
|
|
1073
|
-
let err;
|
|
1074
|
-
code: while (true) {
|
|
1075
|
-
const code = typeof params.code === "string" ? params.code : await params.code();
|
|
1076
|
-
try {
|
|
1077
|
-
const auth = await this.invoke({
|
|
1078
|
-
_: "auth.signIn",
|
|
1079
|
-
phone_number: phone,
|
|
1080
|
-
phone_code: code,
|
|
1081
|
-
phone_code_hash: sentCode.phone_code_hash,
|
|
1082
|
-
});
|
|
1083
|
-
await this.storage.setAccountId(Number(as("auth.authorization", auth).user.id));
|
|
1084
|
-
await this.storage.setAccountType("user");
|
|
1085
|
-
__classPrivateFieldGet(this, _Client_LsignIn, "f").debug("signed in as user");
|
|
1086
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
1087
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("signIn");
|
|
1088
|
-
return;
|
|
1089
|
-
}
|
|
1090
|
-
catch (err_) {
|
|
1091
|
-
if (err_ instanceof PhoneCodeInvalid) {
|
|
1092
|
-
continue code;
|
|
1093
|
-
}
|
|
1094
|
-
else {
|
|
1095
|
-
err = err_;
|
|
1096
|
-
break code;
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
if (!(err instanceof SessionPasswordNeeded)) {
|
|
1101
|
-
throw err;
|
|
1102
|
-
}
|
|
1103
|
-
password: while (true) {
|
|
1104
|
-
const ap = await this.invoke({ _: "account.getPassword" });
|
|
1105
|
-
if (!(is("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", ap.current_algo))) {
|
|
1106
|
-
throw new Error(`Handling ${ap.current_algo?._} not implemented`);
|
|
1107
|
-
}
|
|
1108
|
-
try {
|
|
1109
|
-
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
1110
|
-
const input = await checkPassword(password, ap);
|
|
1111
|
-
const auth = await this.invoke({ _: "auth.checkPassword", password: input });
|
|
1112
|
-
await this.storage.setAccountId(Number(as("auth.authorization", auth).user.id));
|
|
1113
|
-
await this.storage.setAccountType("user");
|
|
1114
|
-
__classPrivateFieldGet(this, _Client_LsignIn, "f").debug("signed in as user");
|
|
1115
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
1116
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("signIn");
|
|
1117
|
-
return;
|
|
1118
|
-
}
|
|
1119
|
-
catch (err) {
|
|
1120
|
-
if (err instanceof PasswordHashInvalid) {
|
|
1121
|
-
continue password;
|
|
1122
|
-
}
|
|
1123
|
-
else {
|
|
1124
|
-
throw err;
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
catch (err) {
|
|
1130
|
-
if (err == restartAuth) {
|
|
1131
|
-
continue auth;
|
|
1132
|
-
}
|
|
1133
|
-
else {
|
|
1134
|
-
throw err;
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
async signOut() {
|
|
1140
|
-
try {
|
|
1141
|
-
await Promise.all([
|
|
1142
|
-
this.storage.reset(),
|
|
1143
|
-
this.invoke({ _: "auth.logOut" }).then(() => {
|
|
1144
|
-
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, false);
|
|
1145
|
-
}),
|
|
1146
|
-
]);
|
|
1147
|
-
}
|
|
1148
|
-
finally {
|
|
1149
|
-
__classPrivateFieldSet(this, _Client_lastGetMe, null, "f");
|
|
1150
|
-
await this.reconnect();
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
/**
|
|
1154
|
-
* Same as calling `.connect()` followed by `.signIn(params)`.
|
|
1155
|
-
*/
|
|
1156
|
-
async start(params) {
|
|
1157
|
-
await this.connect();
|
|
1158
|
-
await this.signIn(params);
|
|
1159
|
-
}
|
|
1160
|
-
/**
|
|
1161
|
-
* Alias for `invoke` with its second parameter being `true`.
|
|
1162
|
-
*/
|
|
1163
|
-
send(function_) {
|
|
1164
|
-
return this.invoke(function_, true);
|
|
1165
|
-
}
|
|
1166
|
-
exportAuthString() {
|
|
1167
|
-
return this.storage.exportAuthString(__classPrivateFieldGet(this, _Client_apiId, "f"));
|
|
1168
|
-
}
|
|
1169
|
-
async importAuthString(authString) {
|
|
1170
|
-
if (this.connected) {
|
|
1171
|
-
throw new Error("Cannot import auth string while the client is connected");
|
|
1172
|
-
}
|
|
1173
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
1174
|
-
await this.storage.importAuthString(authString);
|
|
1175
|
-
__classPrivateFieldSet(this, _Client_authStringImported, true, "f");
|
|
1176
|
-
}
|
|
1177
|
-
/**
|
|
1178
|
-
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
1179
|
-
*
|
|
1180
|
-
* @param id The identifier of the chat.
|
|
1181
|
-
*/
|
|
1182
|
-
async getInputPeer(id) {
|
|
1183
|
-
if (id === "me" || id == await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) {
|
|
1184
|
-
return { _: "inputPeerSelf" };
|
|
1185
|
-
}
|
|
1186
|
-
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
1187
|
-
if (((is("inputPeerUser", inputPeer) || is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") {
|
|
1188
|
-
if ("channel_id" in inputPeer) {
|
|
1189
|
-
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChannelAccessHash).call(this, inputPeer.channel_id);
|
|
1190
|
-
}
|
|
1191
|
-
else {
|
|
1192
|
-
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getUserAccessHash).call(this, inputPeer.user_id);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
if ((is("inputPeerUser", inputPeer) || is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n && await this.storage.getAccountType() == "user") {
|
|
1196
|
-
throw new AccessError(`Cannot access the chat ${id} because there is no access hash for it.`);
|
|
1197
|
-
}
|
|
1198
|
-
return inputPeer;
|
|
1199
|
-
}
|
|
1200
|
-
/**
|
|
1201
|
-
* Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
|
|
1202
|
-
*
|
|
1203
|
-
* @param id The identifier of the channel or the supergroup.
|
|
1204
|
-
*/
|
|
1205
|
-
async getInputChannel(id) {
|
|
1206
|
-
const inputPeer = await this.getInputPeer(id);
|
|
1207
|
-
if (!canBeInputChannel(inputPeer)) {
|
|
1208
|
-
throw new TypeError(`The chat ${id} is not a channel neither a supergroup.`);
|
|
1209
|
-
}
|
|
1210
|
-
return toInputChannel(inputPeer);
|
|
1211
|
-
}
|
|
1212
|
-
/**
|
|
1213
|
-
* Get a user's inputUser. Useful when calling API functions directly.
|
|
1214
|
-
*
|
|
1215
|
-
* @param id The identifier of the user.
|
|
1216
|
-
*/
|
|
1217
|
-
async getInputUser(id) {
|
|
1218
|
-
const inputPeer = await this.getInputPeer(id);
|
|
1219
|
-
if (!canBeInputUser(inputPeer)) {
|
|
1220
|
-
throw new TypeError(`The chat ${id} is not a private chat.`);
|
|
1221
|
-
}
|
|
1222
|
-
return toInputUser(inputPeer);
|
|
1223
|
-
}
|
|
1224
|
-
async [(_Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
|
|
1225
|
-
if (__classPrivateFieldGet(this, _Client_lastPropagatedAuthorizationState, "f") != authorized) {
|
|
1226
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, { authorizationState: { authorized } });
|
|
1227
|
-
__classPrivateFieldSet(this, _Client_lastPropagatedAuthorizationState, authorized, "f");
|
|
1228
|
-
}
|
|
1229
|
-
}, _Client_getSelfId = async function _Client_getSelfId() {
|
|
1230
|
-
const id = await this.storage.getAccountId();
|
|
1231
|
-
if (id == null) {
|
|
1232
|
-
throw new Error("Unauthorized");
|
|
1233
|
-
}
|
|
1234
|
-
return id;
|
|
1235
|
-
}, _Client_startConnectionInsuranceLoop = function _Client_startConnectionInsuranceLoop() {
|
|
1236
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_connectionInsuranceLoop).call(this));
|
|
1237
|
-
}, _Client_connectionInsuranceLoop = async function _Client_connectionInsuranceLoop() {
|
|
1238
|
-
if (__classPrivateFieldGet(this, _Client_connectionInsuranceLoopStarted, "f")) {
|
|
1239
|
-
return;
|
|
1240
|
-
}
|
|
1241
|
-
__classPrivateFieldSet(this, _Client_connectionInsuranceLoopAbortController, new AbortController(), "f");
|
|
1242
|
-
__classPrivateFieldSet(this, _Client_connectionInsuranceLoopStarted, true, "f");
|
|
1243
|
-
while (!this.disconnected) {
|
|
1244
|
-
try {
|
|
1245
|
-
await new Promise((resolve, reject) => {
|
|
1246
|
-
const timeout = setTimeout(resolve, 10 * second);
|
|
1247
|
-
__classPrivateFieldGet(this, _Client_connectionInsuranceLoopAbortController, "f").signal.onabort = () => {
|
|
1248
|
-
reject(__classPrivateFieldGet(this, _Client_connectionInsuranceLoopAbortController, "f")?.signal.reason);
|
|
1249
|
-
clearTimeout(timeout);
|
|
1250
|
-
};
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
1253
|
-
catch {
|
|
1254
|
-
break;
|
|
1255
|
-
}
|
|
1256
|
-
if (!this.connected) {
|
|
1257
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_reconnect).call(this));
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
__classPrivateFieldSet(this, _Client_connectionInsuranceLoopStarted, false, "f");
|
|
1261
|
-
}, _Client_startPingLoop = function _Client_startPingLoop() {
|
|
1262
|
-
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
1263
|
-
}, _Client_pingLoop = async function _Client_pingLoop() {
|
|
1264
|
-
if (__classPrivateFieldGet(this, _Client_cdn, "f")) {
|
|
1265
|
-
return;
|
|
1266
|
-
}
|
|
1267
|
-
__classPrivateFieldSet(this, _Client_pingLoopAbortController, new AbortController(), "f");
|
|
1268
|
-
let timeElapsed = 0;
|
|
1269
|
-
while (this.connected) {
|
|
1270
|
-
const then = Date.now();
|
|
1271
|
-
try {
|
|
1272
|
-
await new Promise((resolve, reject) => {
|
|
1273
|
-
const timeout = setTimeout(resolve, __classPrivateFieldGet(this, _Client_pingInterval, "f") - timeElapsed);
|
|
1274
|
-
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f").signal.onabort = () => {
|
|
1275
|
-
reject(__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.signal.reason);
|
|
1276
|
-
clearTimeout(timeout);
|
|
1277
|
-
};
|
|
1278
|
-
});
|
|
1279
|
-
if (!this.connected) {
|
|
1280
|
-
continue;
|
|
1281
|
-
}
|
|
1282
|
-
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f").signal.throwIfAborted();
|
|
1283
|
-
await this.invoke({ _: "ping_delay_disconnect", ping_id: getRandomId(), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") / second + 15 });
|
|
1284
|
-
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f").signal.throwIfAborted();
|
|
1285
|
-
if (Date.now() - __classPrivateFieldGet(this, _Client_lastUpdates, "f").getTime() >= 15 * minute) {
|
|
1286
|
-
drop(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("lastUpdates").then(() => {
|
|
1287
|
-
__classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
|
|
1288
|
-
}));
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
catch (err) {
|
|
1292
|
-
if (err instanceof DOMException && err.name == "AbortError") {
|
|
1293
|
-
__classPrivateFieldSet(this, _Client_pingLoopAbortController, new AbortController(), "f");
|
|
1294
|
-
}
|
|
1295
|
-
if (!this.connected) {
|
|
1296
|
-
continue;
|
|
1297
|
-
}
|
|
1298
|
-
__classPrivateFieldGet(this, _Client_LpingLoop, "f").error(err);
|
|
1299
|
-
}
|
|
1300
|
-
finally {
|
|
1301
|
-
timeElapsed = Date.now() - then;
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
}, _Client_invoke = async function _Client_invoke(function_, noWait) {
|
|
1305
|
-
let n = 1;
|
|
1306
|
-
while (true) {
|
|
1307
|
-
try {
|
|
1308
|
-
if (__classPrivateFieldGet(this, _Client_disableUpdates, "f") && !isMtprotoFunction(function_) && !isCdnFunction(function_)) {
|
|
1309
|
-
function_ = { _: "invokeWithoutUpdates", query: function_ };
|
|
1310
|
-
}
|
|
1311
|
-
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f") && !isMtprotoFunction(function_)) {
|
|
1312
|
-
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
1313
|
-
__classPrivateFieldGet(this, _Client_L, "f").debug("init");
|
|
1314
|
-
const result = await __classPrivateFieldGet(this, _Client_client, "f").invoke({
|
|
1315
|
-
_: "initConnection",
|
|
1316
|
-
api_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this),
|
|
1317
|
-
app_version: this.appVersion,
|
|
1318
|
-
device_model: this.deviceModel,
|
|
1319
|
-
lang_code: this.langCode,
|
|
1320
|
-
lang_pack: this.langPack,
|
|
1321
|
-
query: {
|
|
1322
|
-
_: "invokeWithLayer",
|
|
1323
|
-
layer: LAYER,
|
|
1324
|
-
query: function_,
|
|
1325
|
-
},
|
|
1326
|
-
system_lang_code: this.systemLangCode,
|
|
1327
|
-
system_version: this.systemVersion,
|
|
1328
|
-
}, noWait);
|
|
1329
|
-
__classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
|
|
1330
|
-
return result;
|
|
1331
|
-
}
|
|
1332
|
-
else {
|
|
1333
|
-
return await __classPrivateFieldGet(this, _Client_client, "f").invoke(function_, noWait);
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
catch (err) {
|
|
1337
|
-
if (err instanceof ConnectionNotInited) {
|
|
1338
|
-
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
1339
|
-
continue;
|
|
1340
|
-
}
|
|
1341
|
-
else if (await __classPrivateFieldGet(this, _Client_handleInvokeError, "f").call(this, Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
|
|
1342
|
-
continue;
|
|
1343
|
-
}
|
|
1344
|
-
else {
|
|
1345
|
-
throw err;
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
}, _Client_getUserAccessHash = async function _Client_getUserAccessHash(userId) {
|
|
1350
|
-
const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUser", user_id: userId, access_hash: 0n }] });
|
|
1351
|
-
const user = as("user", users[0]);
|
|
1352
|
-
if (user) {
|
|
1353
|
-
await this.messageStorage.setEntity(user);
|
|
1354
|
-
}
|
|
1355
|
-
return user?.access_hash ?? 0n;
|
|
1356
|
-
}, _Client_getChannelAccessHash = async function _Client_getChannelAccessHash(channelId) {
|
|
1357
|
-
const channels = await this.invoke({ _: "channels.getChannels", id: [{ _: "inputChannel", channel_id: channelId, access_hash: 0n }] });
|
|
1358
|
-
const channel = as("channel", channels.chats[0]);
|
|
1359
|
-
if (channel) {
|
|
1360
|
-
await this.messageStorage.setEntity(channel);
|
|
1361
|
-
}
|
|
1362
|
-
return channel?.access_hash ?? 0n;
|
|
1363
|
-
}, _Client_getInputPeerInner = async function _Client_getInputPeerInner(id) {
|
|
1364
|
-
const idn = Number(id);
|
|
1365
|
-
if (!isNaN(idn)) {
|
|
1366
|
-
id = idn;
|
|
1367
|
-
}
|
|
1368
|
-
__classPrivateFieldGet(this, _Client_Lmin, "f").debug("gipi A", id);
|
|
1369
|
-
let peer;
|
|
1370
|
-
if (typeof id === "string") {
|
|
1371
|
-
id = getUsername(id);
|
|
1372
|
-
let resolvedId = 0;
|
|
1373
|
-
const maybeUsername = await this.messageStorage.getUsername(id);
|
|
1374
|
-
if (maybeUsername != null && Date.now() - maybeUsername[1].getTime() < USERNAME_TTL) {
|
|
1375
|
-
const [id] = maybeUsername;
|
|
1376
|
-
resolvedId = id;
|
|
1377
|
-
}
|
|
1378
|
-
else {
|
|
1379
|
-
const resolved = await this.invoke({ _: "contacts.resolveUsername", username: id });
|
|
1380
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").processChats(resolved.chats, resolved);
|
|
1381
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").processUsers(resolved.users, resolved);
|
|
1382
|
-
if (is("peerUser", resolved.peer)) {
|
|
1383
|
-
resolvedId = peerToChatId(resolved.peer);
|
|
1384
|
-
}
|
|
1385
|
-
else if (is("peerChannel", resolved.peer)) {
|
|
1386
|
-
resolvedId = peerToChatId(resolved.peer);
|
|
1387
|
-
}
|
|
1388
|
-
else {
|
|
1389
|
-
unreachable();
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
const resolvedIdType = getChatIdPeerType(resolvedId);
|
|
1393
|
-
__classPrivateFieldGet(this, _Client_Lmin, "f").debug({ resolvedId });
|
|
1394
|
-
if (resolvedIdType == "user") {
|
|
1395
|
-
const accessHash = await this.messageStorage.getUserAccessHash(resolvedId);
|
|
1396
|
-
peer = { _: "inputPeerUser", user_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
|
|
1397
|
-
}
|
|
1398
|
-
else if (resolvedIdType == "channel") {
|
|
1399
|
-
const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId);
|
|
1400
|
-
peer = { _: "inputPeerChannel", channel_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
|
|
1401
|
-
}
|
|
1402
|
-
else {
|
|
1403
|
-
unreachable();
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
else if (id > 0) {
|
|
1407
|
-
const accessHash = await this.messageStorage.getUserAccessHash(id);
|
|
1408
|
-
peer = { _: "inputPeerUser", user_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n };
|
|
1409
|
-
}
|
|
1410
|
-
else if (-MAX_CHAT_ID <= id) {
|
|
1411
|
-
peer = { _: "inputPeerChat", chat_id: BigInt(Math.abs(id)) };
|
|
1412
|
-
}
|
|
1413
|
-
else if (ZERO_CHANNEL_ID - MAX_CHANNEL_ID <= id && id != ZERO_CHANNEL_ID) {
|
|
1414
|
-
const accessHash = await this.messageStorage.getChannelAccessHash(id);
|
|
1415
|
-
peer = { _: "inputPeerChannel", channel_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n };
|
|
1416
|
-
}
|
|
1417
|
-
else {
|
|
1418
|
-
throw new InputError("The ID is of an format unknown.");
|
|
1419
|
-
}
|
|
1420
|
-
if (!is("inputPeerChat", peer) && !peer.access_hash) {
|
|
1421
|
-
const chatId = peerToChatId(peer);
|
|
1422
|
-
const minPeerReference = await this.messageStorage.getLastMinPeerReference(chatId);
|
|
1423
|
-
if (minPeerReference) {
|
|
1424
|
-
const minInputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getMinInputPeer).call(this, canBeInputChannel(peer) ? "channel" : "user", { ...minPeerReference, senderId: chatId });
|
|
1425
|
-
if (minInputPeer) {
|
|
1426
|
-
__classPrivateFieldGet(this, _Client_Lmin, "f").debug("resolved input min peer", minInputPeer);
|
|
1427
|
-
peer = minInputPeer;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
}
|
|
1431
|
-
return peer;
|
|
1432
|
-
}, _Client_getMinInputPeer = async function _Client_getMinInputPeer(type, reference) {
|
|
1433
|
-
const entity = await this.messageStorage.getEntity(reference.chatId);
|
|
1434
|
-
if (isOneOf(["channel", "channelForbidden"], entity) && entity.access_hash) {
|
|
1435
|
-
const peer = { _: "inputPeerChannel", channel_id: entity.id, access_hash: entity.access_hash };
|
|
1436
|
-
if (type == "user") {
|
|
1437
|
-
return { _: "inputPeerUserFromMessage", peer, msg_id: reference.messageId, user_id: chatIdToPeerId(reference.senderId) };
|
|
1438
|
-
}
|
|
1439
|
-
else {
|
|
1440
|
-
return { _: "inputPeerChannelFromMessage", peer, msg_id: reference.messageId, channel_id: chatIdToPeerId(reference.senderId) };
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
else {
|
|
1444
|
-
return null;
|
|
1445
|
-
}
|
|
1446
|
-
}, getEntity)](peer) {
|
|
1447
|
-
const id = peerToChatId(peer);
|
|
1448
|
-
const entity = await this.messageStorage.getEntity(id);
|
|
1449
|
-
if (entity == null && await this.storage.getAccountType() == "bot" && is("peerUser", peer) || is("peerChannel", peer)) {
|
|
1450
|
-
await this.getInputPeer(id);
|
|
1451
|
-
}
|
|
1452
|
-
else {
|
|
1453
|
-
return entity;
|
|
1454
|
-
}
|
|
1455
|
-
return await this.messageStorage.getEntity(id);
|
|
1456
|
-
}
|
|
1457
|
-
//
|
|
1458
|
-
// ========================= ACCOUNT ========================= //
|
|
1459
|
-
//
|
|
1460
|
-
/**
|
|
1461
|
-
* Get information on the currently authorized user.
|
|
1462
|
-
*
|
|
1463
|
-
* @method ac
|
|
1464
|
-
*/
|
|
1465
|
-
async getMe() {
|
|
1466
|
-
let user_ = await this[getEntity]({ _: "peerUser", user_id: BigInt(await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) });
|
|
1467
|
-
if (user_ == null) {
|
|
1468
|
-
const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUserSelf" }] });
|
|
1469
|
-
user_ = as("user", users[0]);
|
|
1470
|
-
await this.messageStorage.setEntity(user_);
|
|
1471
|
-
}
|
|
1472
|
-
const user = constructUser(user_);
|
|
1473
|
-
__classPrivateFieldSet(this, _Client_lastGetMe, user, "f");
|
|
1474
|
-
return user;
|
|
1475
|
-
}
|
|
1476
|
-
/**
|
|
1477
|
-
* Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
|
|
1478
|
-
*
|
|
1479
|
-
* @method ac
|
|
1480
|
-
* @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
|
|
1481
|
-
* @param username The username to show.
|
|
1482
|
-
*/
|
|
1483
|
-
async showUsername(id, username) {
|
|
1484
|
-
await __classPrivateFieldGet(this, _Client_accountManager, "f").showUsername(id, username);
|
|
1485
|
-
}
|
|
1486
|
-
/**
|
|
1487
|
-
* Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
|
|
1488
|
-
*
|
|
1489
|
-
* @method ac
|
|
1490
|
-
* @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
|
|
1491
|
-
* @param username The username to hide.
|
|
1492
|
-
*/
|
|
1493
|
-
async hideUsername(id, username) {
|
|
1494
|
-
await __classPrivateFieldGet(this, _Client_accountManager, "f").hideUsername(id, username);
|
|
1495
|
-
}
|
|
1496
|
-
/**
|
|
1497
|
-
* Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
|
|
1498
|
-
*
|
|
1499
|
-
* @method ac
|
|
1500
|
-
* @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
|
|
1501
|
-
* @param order The new order to use.
|
|
1502
|
-
* @returns Whether the order was changed.
|
|
1503
|
-
*/
|
|
1504
|
-
async reorderUsernames(id, order) {
|
|
1505
|
-
return await __classPrivateFieldGet(this, _Client_accountManager, "f").reorderUsernames(id, order);
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* Hide all usernames from the a supergroup or a channel's profile. User-only.
|
|
1509
|
-
*
|
|
1510
|
-
* @method ac
|
|
1511
|
-
* @param id A supergroup ID or a channel ID.
|
|
1512
|
-
*/
|
|
1513
|
-
async hideUsernames(id) {
|
|
1514
|
-
return await __classPrivateFieldGet(this, _Client_accountManager, "f").hideUsernames(id);
|
|
1515
|
-
}
|
|
1516
|
-
/**
|
|
1517
|
-
* Get a business connection. Bot-only.
|
|
1518
|
-
*
|
|
1519
|
-
* @method ac
|
|
1520
|
-
* @param id The identifier of the business connection.
|
|
1521
|
-
*/
|
|
1522
|
-
async getBusinessConnection(id) {
|
|
1523
|
-
return await __classPrivateFieldGet(this, _Client_businessConnectionManager, "f").getBusinessConnection(id);
|
|
1524
|
-
}
|
|
1525
|
-
/**
|
|
1526
|
-
* Set the current account's online status. User-only.
|
|
1527
|
-
*
|
|
1528
|
-
* @method ac
|
|
1529
|
-
* @param online The new online status.
|
|
1530
|
-
*/
|
|
1531
|
-
async setOnline(online) {
|
|
1532
|
-
await __classPrivateFieldGet(this, _Client_accountManager, "f").setOnline(online);
|
|
1533
|
-
}
|
|
1534
|
-
//
|
|
1535
|
-
// ========================= MESSAGES ========================= //
|
|
1536
|
-
//
|
|
1537
|
-
/**
|
|
1538
|
-
* Send a text message.
|
|
1539
|
-
*
|
|
1540
|
-
* @method ms
|
|
1541
|
-
* @param chatId The chat to send the message to.
|
|
1542
|
-
* @param text The message's text.
|
|
1543
|
-
* @returns The sent text message.
|
|
1544
|
-
*/
|
|
1545
|
-
async sendMessage(chatId, text, params) {
|
|
1546
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendMessage(chatId, text, params);
|
|
1547
|
-
}
|
|
1548
|
-
/**
|
|
1549
|
-
* Send a photo.
|
|
1550
|
-
*
|
|
1551
|
-
* @method ms
|
|
1552
|
-
* @param chatId The chat to send the photo to.
|
|
1553
|
-
* @param photo The photo to send.
|
|
1554
|
-
* @returns The sent photo.
|
|
1555
|
-
*/
|
|
1556
|
-
async sendPhoto(chatId, photo, params) {
|
|
1557
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendPhoto(chatId, photo, params);
|
|
1558
|
-
}
|
|
1559
|
-
/**
|
|
1560
|
-
* Send a document.
|
|
1561
|
-
*
|
|
1562
|
-
* @method ms
|
|
1563
|
-
* @param chatId The chat to send the document to.
|
|
1564
|
-
* @param document The document to send.
|
|
1565
|
-
* @returns The sent document.
|
|
1566
|
-
*/
|
|
1567
|
-
async sendDocument(chatId, document, params) {
|
|
1568
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendDocument(chatId, document, params);
|
|
1569
|
-
}
|
|
1570
|
-
/**
|
|
1571
|
-
* Send a sticker.
|
|
1572
|
-
*
|
|
1573
|
-
* @method ms
|
|
1574
|
-
* @param chatId The chat to send the sticker to.
|
|
1575
|
-
* @param document The sticker to send.
|
|
1576
|
-
* @returns The sent sticker.
|
|
1577
|
-
*/
|
|
1578
|
-
async sendSticker(chatId, sticker, params) {
|
|
1579
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendSticker(chatId, sticker, params);
|
|
1580
|
-
}
|
|
1581
|
-
/**
|
|
1582
|
-
* Send a video.
|
|
1583
|
-
*
|
|
1584
|
-
* @method ms
|
|
1585
|
-
* @param chatId The chat to send the video to.
|
|
1586
|
-
* @param video The video to send.
|
|
1587
|
-
* @returns The sent video.
|
|
1588
|
-
*/
|
|
1589
|
-
async sendVideo(chatId, video, params) {
|
|
1590
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendVideo(chatId, video, params);
|
|
1591
|
-
}
|
|
1592
|
-
/**
|
|
1593
|
-
* Send an animation.
|
|
1594
|
-
*
|
|
1595
|
-
* @method ms
|
|
1596
|
-
* @param chatId The chat to send the animation to.
|
|
1597
|
-
* @param animation The animation to send.
|
|
1598
|
-
* @returns The sent animation.
|
|
1599
|
-
*/
|
|
1600
|
-
async sendAnimation(chatId, animation, params) {
|
|
1601
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendAnimation(chatId, animation, params);
|
|
1602
|
-
}
|
|
1603
|
-
/**
|
|
1604
|
-
* Send a voice message.
|
|
1605
|
-
*
|
|
1606
|
-
* @method ms
|
|
1607
|
-
* @param chatId The chat to send the voice message to.
|
|
1608
|
-
* @param voice The voice to send.
|
|
1609
|
-
* @returns The sent voice message.
|
|
1610
|
-
*/
|
|
1611
|
-
async sendVoice(chatId, voice, params) {
|
|
1612
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendVoice(chatId, voice, params);
|
|
1613
|
-
}
|
|
1614
|
-
/**
|
|
1615
|
-
* Send an audio file.
|
|
1616
|
-
*
|
|
1617
|
-
* @method ms
|
|
1618
|
-
* @param chatId The chat to send the audio file to.
|
|
1619
|
-
* @param audio The audio to send.
|
|
1620
|
-
* @returns The sent audio filr.
|
|
1621
|
-
*/
|
|
1622
|
-
async sendAudio(chatId, audio, params) {
|
|
1623
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendAudio(chatId, audio, params);
|
|
1624
|
-
}
|
|
1625
|
-
/**
|
|
1626
|
-
* Send a media group.
|
|
1627
|
-
*
|
|
1628
|
-
* @method ms
|
|
1629
|
-
* @param chatId The chat to send the media group to.
|
|
1630
|
-
* @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
|
|
1631
|
-
* @returns The sent messages.
|
|
1632
|
-
*/
|
|
1633
|
-
async sendMediaGroup(chatId, media, params) {
|
|
1634
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendMediaGroup(chatId, media, params);
|
|
1635
|
-
}
|
|
1636
|
-
/**
|
|
1637
|
-
* Send a video note.
|
|
1638
|
-
*
|
|
1639
|
-
* @method ms
|
|
1640
|
-
* @param chatId The chat to send the video note to.
|
|
1641
|
-
* @param videoNote The video note to send.
|
|
1642
|
-
* @returns The sent video note.
|
|
1643
|
-
*/
|
|
1644
|
-
async sendVideoNote(chatId, videoNote, params) {
|
|
1645
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendVideoNote(chatId, videoNote, params);
|
|
1646
|
-
}
|
|
1647
|
-
/**
|
|
1648
|
-
* Send a location.
|
|
1649
|
-
*
|
|
1650
|
-
* @method ms
|
|
1651
|
-
* @param chatId The chat to send the location to.
|
|
1652
|
-
* @param latitude The location's latitude.
|
|
1653
|
-
* @param longitude The location's longitude.
|
|
1654
|
-
* @returns The sent location.
|
|
1655
|
-
*/
|
|
1656
|
-
async sendLocation(chatId, latitude, longitude, params) {
|
|
1657
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendLocation(chatId, latitude, longitude, params);
|
|
1658
|
-
}
|
|
1659
|
-
/**
|
|
1660
|
-
* Send a contact.
|
|
1661
|
-
*
|
|
1662
|
-
* @method ms
|
|
1663
|
-
* @param chatId The chat to send the contact to.
|
|
1664
|
-
* @param firstName The contact's first name.
|
|
1665
|
-
* @param number The contact's phone number.
|
|
1666
|
-
* @returns The sent contact.
|
|
1667
|
-
*/
|
|
1668
|
-
async sendContact(chatId, firstName, number, params) {
|
|
1669
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendContact(chatId, firstName, number, params);
|
|
1670
|
-
}
|
|
1671
|
-
/**
|
|
1672
|
-
* Send a dice.
|
|
1673
|
-
*
|
|
1674
|
-
* @method ms
|
|
1675
|
-
* @param chatId The chat to send the dice to.
|
|
1676
|
-
* @returns The sent dice.
|
|
1677
|
-
*/
|
|
1678
|
-
async sendDice(chatId, params) {
|
|
1679
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendDice(chatId, params);
|
|
1680
|
-
}
|
|
1681
|
-
/**
|
|
1682
|
-
* Send a venue.
|
|
1683
|
-
*
|
|
1684
|
-
* @method ms
|
|
1685
|
-
* @param chatId The chat to send the venue to.
|
|
1686
|
-
* @param latitude The latitude of the venue.
|
|
1687
|
-
* @param longitude The longitude of the venue.
|
|
1688
|
-
* @param title The title of the venue.
|
|
1689
|
-
* @param address The written address of the venue.
|
|
1690
|
-
* @returns The sent venue.
|
|
1691
|
-
*/
|
|
1692
|
-
async sendVenue(chatId, latitude, longitude, title, address, params) {
|
|
1693
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendVenue(chatId, latitude, longitude, title, address, params);
|
|
1694
|
-
}
|
|
1695
|
-
/**
|
|
1696
|
-
* Send a poll.
|
|
1697
|
-
*
|
|
1698
|
-
* @method ms
|
|
1699
|
-
* @param chatId The chat to send the poll to.
|
|
1700
|
-
* @param question The poll's question.
|
|
1701
|
-
* @param options The poll's options.
|
|
1702
|
-
* @returns The sent poll.
|
|
1703
|
-
*/
|
|
1704
|
-
async sendPoll(chatId, question, options, params) {
|
|
1705
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendPoll(chatId, question, options, params);
|
|
1706
|
-
}
|
|
1707
|
-
/**
|
|
1708
|
-
* Send an invoice. Bot-only.
|
|
1709
|
-
*
|
|
1710
|
-
* @method ms
|
|
1711
|
-
* @param chatId The chat to send the invoice to.
|
|
1712
|
-
* @param title The invoice's title.
|
|
1713
|
-
* @param description The invoice's description.
|
|
1714
|
-
* @param payload The invoice's payload.
|
|
1715
|
-
* @param currency The invoice's currency.
|
|
1716
|
-
* @param prices The invoice's price tags.
|
|
1717
|
-
* @returns The sent invoice.
|
|
1718
|
-
*/
|
|
1719
|
-
async sendInvoice(chatId, title, description, payload, currency, prices, params) {
|
|
1720
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendInvoice(chatId, title, description, payload, currency, prices, params);
|
|
1721
|
-
}
|
|
1722
|
-
/**
|
|
1723
|
-
* Edit a message's text.
|
|
1724
|
-
*
|
|
1725
|
-
* @method ms
|
|
1726
|
-
* @param chatId The identifier of the chat that contains the message.
|
|
1727
|
-
* @param messageId The message's identifier.
|
|
1728
|
-
* @param text The new text of the message.
|
|
1729
|
-
* @returns The edited text message.
|
|
1730
|
-
*/
|
|
1731
|
-
async editMessageText(chatId, messageId, text, params) {
|
|
1732
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1733
|
-
}
|
|
1734
|
-
/**
|
|
1735
|
-
* Edit a message's media.
|
|
1736
|
-
*
|
|
1737
|
-
* @method ms
|
|
1738
|
-
* @param chatId The identifier of the chat that contains the message.
|
|
1739
|
-
* @param messageId The message's identifier.
|
|
1740
|
-
* @param media The new media of the message.
|
|
1741
|
-
* @returns The edited message.
|
|
1742
|
-
*/
|
|
1743
|
-
async editMessageMedia(chatId, messageId, media, params) {
|
|
1744
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageMedia(chatId, messageId, media, params);
|
|
1745
|
-
}
|
|
1746
|
-
/**
|
|
1747
|
-
* Edit an inline message's media.
|
|
1748
|
-
*
|
|
1749
|
-
* @method ms
|
|
1750
|
-
* @param inlineMessageId The inline message's identifier.
|
|
1751
|
-
* @param media The new media of the message.
|
|
1752
|
-
*/
|
|
1753
|
-
async editInlineMessageMedia(inlineMessageId, media, params) {
|
|
1754
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageMedia(inlineMessageId, media, params);
|
|
1755
|
-
}
|
|
1756
|
-
/**
|
|
1757
|
-
* Edit an inline message's text. Bot-only.
|
|
1758
|
-
*
|
|
1759
|
-
* @method ms
|
|
1760
|
-
* @param inlineMessageId The inline message's identifier.
|
|
1761
|
-
* @param text The new text of the message.
|
|
1762
|
-
*/
|
|
1763
|
-
async editInlineMessageText(inlineMessageId, text, params) {
|
|
1764
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageText(inlineMessageId, text, params);
|
|
1765
|
-
}
|
|
1766
|
-
/**
|
|
1767
|
-
* Edit a message's reply markup.
|
|
1768
|
-
*
|
|
1769
|
-
* @method ms
|
|
1770
|
-
* @param chatId The identifier of the chat that contains the message.
|
|
1771
|
-
* @param messageId The message's identifier.
|
|
1772
|
-
* @returns The edited message.
|
|
1773
|
-
*/
|
|
1774
|
-
async editMessageReplyMarkup(chatId, messageId, params) {
|
|
1775
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageReplyMarkup(chatId, messageId, params);
|
|
1776
|
-
}
|
|
1777
|
-
/**
|
|
1778
|
-
* Edit an inline message's reply markup. Bot-only.
|
|
1779
|
-
*
|
|
1780
|
-
* @method ms
|
|
1781
|
-
* @param inlineMessageId The inline message's identifier.
|
|
1782
|
-
*/
|
|
1783
|
-
async editInlineMessageReplyMarkup(inlineMessageId, params) {
|
|
1784
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
1785
|
-
}
|
|
1786
|
-
/**
|
|
1787
|
-
* Edit a message's live location.
|
|
1788
|
-
*
|
|
1789
|
-
* @method ms
|
|
1790
|
-
* @param chatId The identifier of the chat that contains the messages.
|
|
1791
|
-
* @param messageId The message's identifier.
|
|
1792
|
-
* @param latitude The new latitude.
|
|
1793
|
-
* @param longitude The new longitude.
|
|
1794
|
-
* @returns The edited location message.
|
|
1795
|
-
*/
|
|
1796
|
-
async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
|
|
1797
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
1798
|
-
}
|
|
1799
|
-
/**
|
|
1800
|
-
* Edit an inline message's live location. Bot-only.
|
|
1801
|
-
*
|
|
1802
|
-
* @method ms
|
|
1803
|
-
* @param inlineMessageId The inline message's identifier.
|
|
1804
|
-
* @param latitude The new latitude.
|
|
1805
|
-
* @param longitude The new longitude.
|
|
1806
|
-
* @returns The edited location message.
|
|
1807
|
-
*/
|
|
1808
|
-
async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
|
|
1809
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
1810
|
-
}
|
|
1811
|
-
/**
|
|
1812
|
-
* Retrieve multiple messages.
|
|
1813
|
-
*
|
|
1814
|
-
* @method ms
|
|
1815
|
-
* @param chatId The identifier of the chat to retrieve the messages from.
|
|
1816
|
-
* @param messageIds The identifiers of the messages to retrieve.
|
|
1817
|
-
* @example ```ts
|
|
1818
|
-
* const message = await client.getMessages("@MTKruto", [210, 212]);
|
|
1819
|
-
* ```
|
|
1820
|
-
* @returns The retrieved messages.
|
|
1821
|
-
*/
|
|
1822
|
-
async getMessages(chatId, messageIds) {
|
|
1823
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getMessages(chatId, messageIds);
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* Retrieve a single message.
|
|
1827
|
-
*
|
|
1828
|
-
* @method ms
|
|
1829
|
-
* @param chatId The identifier of the chat to retrieve the message from.
|
|
1830
|
-
* @param messageId The identifier of the message to retrieve.
|
|
1831
|
-
* @example ```ts
|
|
1832
|
-
* const message = await client.getMessage("@MTKruto", 212);
|
|
1833
|
-
* ```
|
|
1834
|
-
* @returns The retrieved message.
|
|
1835
|
-
*/
|
|
1836
|
-
async getMessage(chatId, messageId) {
|
|
1837
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getMessage(chatId, messageId);
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
* Delete multiple messages.
|
|
1841
|
-
*
|
|
1842
|
-
* @method ms
|
|
1843
|
-
* @param chatId The identifier of the chat that contains the messages.
|
|
1844
|
-
* @param messageIds The identifiers of the messages to delete.
|
|
1845
|
-
*/
|
|
1846
|
-
async deleteMessages(chatId, messageIds, params) {
|
|
1847
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteMessages(chatId, messageIds, params);
|
|
1848
|
-
}
|
|
1849
|
-
/**
|
|
1850
|
-
* Delete a single message.
|
|
1851
|
-
*
|
|
1852
|
-
* @method ms
|
|
1853
|
-
* @param chatId The identifier of the chat that contains the message.
|
|
1854
|
-
* @param messageId The identifier of the message to delete.
|
|
1855
|
-
*/
|
|
1856
|
-
async deleteMessage(chatId, messageId, params) {
|
|
1857
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteMessages(chatId, [messageId], params);
|
|
1858
|
-
}
|
|
1859
|
-
/**
|
|
1860
|
-
* Delete all messages sent by a specific member of a chat. User-only.
|
|
1861
|
-
*
|
|
1862
|
-
* @method ms
|
|
1863
|
-
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
1864
|
-
* @param memberId The identifier of the member.
|
|
1865
|
-
*/
|
|
1866
|
-
async deleteChatMemberMessages(chatId, memberId) {
|
|
1867
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatMemberMessages(chatId, memberId);
|
|
1868
|
-
}
|
|
1869
|
-
/**
|
|
1870
|
-
* Delete multiple scheduled messages.
|
|
1871
|
-
*
|
|
1872
|
-
* @method ms
|
|
1873
|
-
* @param chatId The identifier of the chat that contains the scheduled messages.
|
|
1874
|
-
* @param messageIds The identifiers of the scheduled messages to delete.
|
|
1875
|
-
*/
|
|
1876
|
-
async deleteScheduledMessages(chatId, messageIds) {
|
|
1877
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteScheduledMessages(chatId, messageIds);
|
|
1878
|
-
}
|
|
1879
|
-
/**
|
|
1880
|
-
* Delete a scheduled message.
|
|
1881
|
-
*
|
|
1882
|
-
* @method ms
|
|
1883
|
-
* @param chatId The identifier of the chat that contains the scheduled message.
|
|
1884
|
-
* @param messageId The identifier of the scheduled message to delete.
|
|
1885
|
-
*/
|
|
1886
|
-
async deleteScheduledMessage(chatId, messageId) {
|
|
1887
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteScheduledMessage(chatId, messageId);
|
|
1888
|
-
}
|
|
1889
|
-
/**
|
|
1890
|
-
* Send multiple scheduled messages before their schedule.
|
|
1891
|
-
*
|
|
1892
|
-
* @method ms
|
|
1893
|
-
* @param chatId The identifier of the chat that contains the scheduled messages.
|
|
1894
|
-
* @param messageIds The identifiers of the scheduled messages to send.
|
|
1895
|
-
*/
|
|
1896
|
-
async sendScheduledMessages(chatId, messageIds) {
|
|
1897
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendScheduledMessages(chatId, messageIds);
|
|
1898
|
-
}
|
|
1899
|
-
/**
|
|
1900
|
-
* Send a scheduled message before its schedule.
|
|
1901
|
-
*
|
|
1902
|
-
* @method ms
|
|
1903
|
-
* @param chatId The identifier of the chat that contains the scheduled message.
|
|
1904
|
-
* @param messageId The identifier of the scheduled message to send.
|
|
1905
|
-
*/
|
|
1906
|
-
async sendScheduledMessage(chatId, messageId) {
|
|
1907
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendScheduledMessage(chatId, messageId);
|
|
1908
|
-
}
|
|
1909
|
-
/**
|
|
1910
|
-
* Pin a message in a chat.
|
|
1911
|
-
*
|
|
1912
|
-
* @method ms
|
|
1913
|
-
* @param chatId The identifier of the chat that contains the message.
|
|
1914
|
-
* @param messageId The message's identifier.
|
|
1915
|
-
*/
|
|
1916
|
-
async pinMessage(chatId, messageId, params) {
|
|
1917
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").pinMessage(chatId, messageId, params);
|
|
1918
|
-
}
|
|
1919
|
-
/**
|
|
1920
|
-
* Unpin a pinned message.
|
|
1921
|
-
*
|
|
1922
|
-
* @method ms
|
|
1923
|
-
* @param chatId The identifier of the chat that contains the message.
|
|
1924
|
-
* @param messageId The message's identifier.
|
|
1925
|
-
*/
|
|
1926
|
-
async unpinMessage(chatId, messageId, params) {
|
|
1927
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").unpinMessage(chatId, messageId, params);
|
|
1928
|
-
}
|
|
1929
|
-
/**
|
|
1930
|
-
* Unpin all pinned messages.
|
|
1931
|
-
*
|
|
1932
|
-
* @method ms
|
|
1933
|
-
* @param chatId The identifier of the chat.
|
|
1934
|
-
*/
|
|
1935
|
-
async unpinMessages(chatId) {
|
|
1936
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").unpinMessages(chatId);
|
|
1937
|
-
}
|
|
1938
|
-
/**
|
|
1939
|
-
* Forward multiple messages.
|
|
1940
|
-
*
|
|
1941
|
-
* @method ms
|
|
1942
|
-
* @param from The identifier of the chat to forward the messages from.
|
|
1943
|
-
* @param to The identifier of the chat to forward the messages to.
|
|
1944
|
-
* @param messageIds The identifiers of the messages to forward.
|
|
1945
|
-
* @returns The forwarded messages.
|
|
1946
|
-
*/
|
|
1947
|
-
async forwardMessages(from, to, messageIds, params) {
|
|
1948
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").forwardMessages(from, to, messageIds, params);
|
|
1949
|
-
}
|
|
1950
|
-
/**
|
|
1951
|
-
* Forward a single message.
|
|
1952
|
-
*
|
|
1953
|
-
* @method ms
|
|
1954
|
-
* @param from The identifier of the chat to forward the message from.
|
|
1955
|
-
* @param to The identifier of the chat to forward the message to.
|
|
1956
|
-
* @param messageId The identifier of the message to forward.
|
|
1957
|
-
* @returns The forwarded message.
|
|
1958
|
-
*/
|
|
1959
|
-
async forwardMessage(from, to, messageId, params) {
|
|
1960
|
-
return (await this.forwardMessages(from, to, [messageId], params))[0];
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Stop a poll.
|
|
1964
|
-
*
|
|
1965
|
-
* @method ms
|
|
1966
|
-
* @param chatId The chat that includes the poll.
|
|
1967
|
-
* @param messageId The idenfifier of the poll's message.
|
|
1968
|
-
* @returns The new state of the poll.
|
|
1969
|
-
*/
|
|
1970
|
-
async stopPoll(chatId, messageId, params) {
|
|
1971
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").stopPoll(chatId, messageId, params);
|
|
1972
|
-
}
|
|
1973
|
-
/**
|
|
1974
|
-
* Send a chat action.
|
|
1975
|
-
*
|
|
1976
|
-
* @method ms
|
|
1977
|
-
* @param chatId The chat to send the chat action to.
|
|
1978
|
-
* @param action The chat action.
|
|
1979
|
-
* @param messageThreadId The thread to send the chat action to.
|
|
1980
|
-
*/
|
|
1981
|
-
async sendChatAction(chatId, action, params) {
|
|
1982
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").sendChatAction(chatId, action, params);
|
|
1983
|
-
}
|
|
1984
|
-
/**
|
|
1985
|
-
* Search the messages of a chat. User-only.
|
|
1986
|
-
*
|
|
1987
|
-
* @method ms
|
|
1988
|
-
* @param chatId The identifier of the chat to search the messages in.
|
|
1989
|
-
* @param query The message search query.
|
|
1990
|
-
*/
|
|
1991
|
-
async searchMessages(chatId, query, params) {
|
|
1992
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").searchMessages(chatId, query, params);
|
|
1993
|
-
}
|
|
1994
|
-
/**
|
|
1995
|
-
* Mark messages as read. User-only.
|
|
1996
|
-
*
|
|
1997
|
-
* @method ms
|
|
1998
|
-
* @param chatId The identifier of the chat that includes the messages.
|
|
1999
|
-
* @param untilMessageId The identifier of a message that will be marked as read, along with any other unread messages before it.
|
|
2000
|
-
*/
|
|
2001
|
-
async readMessages(chatId, untilMessageId) {
|
|
2002
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").readMessages(chatId, untilMessageId);
|
|
2003
|
-
}
|
|
2004
|
-
/**
|
|
2005
|
-
* Start a bot. User-only.
|
|
2006
|
-
*
|
|
2007
|
-
* @method ms
|
|
2008
|
-
* @param botId The identifier of the bot to start.
|
|
2009
|
-
* @returns The start message.
|
|
2010
|
-
*/
|
|
2011
|
-
async startBot(botId, params) {
|
|
2012
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").startBot(botId, params);
|
|
2013
|
-
}
|
|
2014
|
-
//
|
|
2015
|
-
// ========================= FILES ========================= //
|
|
2016
|
-
//
|
|
2017
|
-
/**
|
|
2018
|
-
* Download a file.
|
|
2019
|
-
*
|
|
2020
|
-
* @method fs
|
|
2021
|
-
* @param fileId The identifier of the file to download.
|
|
2022
|
-
* @example ```ts
|
|
2023
|
-
* for await (const chunk of client.download(fileId, { chunkSize: 256 * 1024 })) {
|
|
2024
|
-
* await outFile.write(chunk);
|
|
2025
|
-
* }
|
|
2026
|
-
* ```
|
|
2027
|
-
* @returns A generator yielding the contents of the file.
|
|
2028
|
-
*/
|
|
2029
|
-
async *download(fileId, params) {
|
|
2030
|
-
for await (const chunk of __classPrivateFieldGet(this, _Client_fileManager, "f").download(fileId, params)) {
|
|
2031
|
-
yield chunk;
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
/**
|
|
2035
|
-
* Get custom emoji documents for download.
|
|
2036
|
-
*
|
|
2037
|
-
* @method fs
|
|
2038
|
-
* @param id Identifier of one or more of custom emojis.
|
|
2039
|
-
* @returns The custom emoji documents.
|
|
2040
|
-
*/
|
|
2041
|
-
async getCustomEmojiStickers(id) {
|
|
2042
|
-
return await __classPrivateFieldGet(this, _Client_fileManager, "f").getCustomEmojiStickers(id);
|
|
2043
|
-
}
|
|
2044
|
-
//
|
|
2045
|
-
// ========================= CHATS ========================= //
|
|
2046
|
-
//
|
|
2047
|
-
/**
|
|
2048
|
-
* Get chats from a chat list. User-only.
|
|
2049
|
-
*
|
|
2050
|
-
* @method ch
|
|
2051
|
-
*/
|
|
2052
|
-
async getChats(params) {
|
|
2053
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChats(params?.from, params?.after, params?.limit);
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* Get a chat.
|
|
2057
|
-
*
|
|
2058
|
-
* @method ch
|
|
2059
|
-
*/
|
|
2060
|
-
async getChat(chatId) {
|
|
2061
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChat(chatId);
|
|
2062
|
-
}
|
|
2063
|
-
/**
|
|
2064
|
-
* Get chat history. User-only.
|
|
2065
|
-
*
|
|
2066
|
-
* @method ch
|
|
2067
|
-
* @param chatId The identifier of the chat to get its history.
|
|
2068
|
-
*/
|
|
2069
|
-
async getHistory(chatId, params) {
|
|
2070
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getHistory(chatId, params);
|
|
2071
|
-
}
|
|
2072
|
-
/**
|
|
2073
|
-
* Set a chat's available reactions. User-only.
|
|
2074
|
-
*
|
|
2075
|
-
* @method ch
|
|
2076
|
-
* @param chatId The identifier of the chat.
|
|
2077
|
-
* @param availableReactions The new available reactions.
|
|
2078
|
-
*/
|
|
2079
|
-
async setAvailableReactions(chatId, availableReactions) {
|
|
2080
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").setAvailableReactions(chatId, availableReactions);
|
|
2081
|
-
}
|
|
2082
|
-
/**
|
|
2083
|
-
* Set a chat's photo.
|
|
2084
|
-
*
|
|
2085
|
-
* @method ch
|
|
2086
|
-
* @param chatId The identifier of the chat.
|
|
2087
|
-
* @param photo A photo to set as the chat's photo.
|
|
2088
|
-
*/
|
|
2089
|
-
async setChatPhoto(chatId, photo, params) {
|
|
2090
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").setChatPhoto(chatId, photo, params);
|
|
2091
|
-
}
|
|
2092
|
-
/**
|
|
2093
|
-
* Delete a chat's photo.
|
|
2094
|
-
*
|
|
2095
|
-
* @method ch
|
|
2096
|
-
* @param chatId The identifier of the chat.
|
|
2097
|
-
*/
|
|
2098
|
-
async deleteChatPhoto(chatId) {
|
|
2099
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatPhoto(chatId);
|
|
2100
|
-
}
|
|
2101
|
-
/**
|
|
2102
|
-
* Ban a member from a chat.
|
|
2103
|
-
*
|
|
2104
|
-
* @method ch
|
|
2105
|
-
* @param chatId The identifier of the chat.
|
|
2106
|
-
* @param memberId The identifier of the member.
|
|
2107
|
-
*/
|
|
2108
|
-
async banChatMember(chatId, memberId, params) {
|
|
2109
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").banChatMember(chatId, memberId, params);
|
|
2110
|
-
}
|
|
2111
|
-
/**
|
|
2112
|
-
* Unban a member from a chat.
|
|
2113
|
-
*
|
|
2114
|
-
* @method ch
|
|
2115
|
-
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2116
|
-
* @param memberId The identifier of the member.
|
|
2117
|
-
*/
|
|
2118
|
-
async unbanChatMember(chatId, memberId) {
|
|
2119
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").unbanChatMember(chatId, memberId);
|
|
2120
|
-
}
|
|
2121
|
-
/**
|
|
2122
|
-
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
2123
|
-
*
|
|
2124
|
-
* @method ch
|
|
2125
|
-
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2126
|
-
* @param memberId The identifier of the member.
|
|
2127
|
-
*/
|
|
2128
|
-
async kickChatMember(chatId, memberId) {
|
|
2129
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").banChatMember(chatId, memberId);
|
|
2130
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").unbanChatMember(chatId, memberId);
|
|
2131
|
-
}
|
|
2132
|
-
/**
|
|
2133
|
-
* Set the rights of a chat member.
|
|
2134
|
-
*
|
|
2135
|
-
* @method ch
|
|
2136
|
-
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2137
|
-
* @param memberId The identifier of a member.
|
|
2138
|
-
*/
|
|
2139
|
-
async setChatMemberRights(chatId, memberId, params) {
|
|
2140
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").setChatMemberRights(chatId, memberId, params);
|
|
2141
|
-
}
|
|
2142
|
-
/**
|
|
2143
|
-
* Get the administrators of a chat.
|
|
2144
|
-
*
|
|
2145
|
-
* @method ch
|
|
2146
|
-
* @param chatId The identifier of the chat.
|
|
2147
|
-
* @returns The chat's administrators.
|
|
2148
|
-
*/
|
|
2149
|
-
async getChatAdministrators(chatId) {
|
|
2150
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatAdministrators(chatId);
|
|
2151
|
-
}
|
|
2152
|
-
/**
|
|
2153
|
-
* Enable join requests in a chat. User-only.
|
|
2154
|
-
*
|
|
2155
|
-
* @method ch
|
|
2156
|
-
* @param chatId The identifier of the chat. Must be a channel or a supergroup.
|
|
2157
|
-
*/
|
|
2158
|
-
async enableJoinRequests(chatId) {
|
|
2159
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").enableJoinRequests(chatId);
|
|
2160
|
-
}
|
|
2161
|
-
/**
|
|
2162
|
-
* Disable join requests in a chat. User-only.
|
|
2163
|
-
*
|
|
2164
|
-
* @method ch
|
|
2165
|
-
* @param chatId The identifier of the chat. Must be a channel or a supergroup.
|
|
2166
|
-
*/
|
|
2167
|
-
async disableJoinRequests(chatId) {
|
|
2168
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").disableJoinRequests(chatId);
|
|
2169
|
-
}
|
|
2170
|
-
/**
|
|
2171
|
-
* Get inactive chats. User-only.
|
|
2172
|
-
*
|
|
2173
|
-
* @method ch
|
|
2174
|
-
* @retuns A list of inactive chats the current user is member of.
|
|
2175
|
-
*/
|
|
2176
|
-
async getInactiveChats() {
|
|
2177
|
-
return await __classPrivateFieldGet(this, _Client_accountManager, "f").getInactiveChats();
|
|
2178
|
-
}
|
|
2179
|
-
/**
|
|
2180
|
-
* Get the invite links created for a chat. User-only.
|
|
2181
|
-
*
|
|
2182
|
-
* @method ch
|
|
2183
|
-
* @param chatId The identifier of the chat.
|
|
2184
|
-
* @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
|
|
2185
|
-
*/
|
|
2186
|
-
async getCreatedInviteLinks(chatId, params) {
|
|
2187
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getCreatedInviteLinks(chatId, params);
|
|
2188
|
-
}
|
|
2189
|
-
/**
|
|
2190
|
-
* Join a chat. User-only.
|
|
2191
|
-
*
|
|
2192
|
-
* @method ch
|
|
2193
|
-
* @param chatId The identifier of the chat to join.
|
|
2194
|
-
*/
|
|
2195
|
-
async joinChat(chatId) {
|
|
2196
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").joinChat(chatId);
|
|
2197
|
-
}
|
|
2198
|
-
/**
|
|
2199
|
-
* Leave a chat.
|
|
2200
|
-
*
|
|
2201
|
-
* @method ch
|
|
2202
|
-
* @param chatId The identifier of the chat to leave.
|
|
2203
|
-
*/
|
|
2204
|
-
async leaveChat(chatId) {
|
|
2205
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").leaveChat(chatId);
|
|
2206
|
-
}
|
|
2207
|
-
/**
|
|
2208
|
-
* Get information on a user's chat membership.
|
|
2209
|
-
*
|
|
2210
|
-
* @method ch
|
|
2211
|
-
* @param chatId The identifier of a chat that includes the user.
|
|
2212
|
-
* @param userId The identifier of the user.
|
|
2213
|
-
*/
|
|
2214
|
-
async getChatMember(chatId, userId) {
|
|
2215
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatMember(chatId, userId);
|
|
2216
|
-
}
|
|
2217
|
-
/**
|
|
2218
|
-
* Get the members of a chat.
|
|
2219
|
-
*
|
|
2220
|
-
* @method ch
|
|
2221
|
-
* @param chatId The chat to get its members.
|
|
2222
|
-
*/
|
|
2223
|
-
async getChatMembers(chatId, params) {
|
|
2224
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatMembers(chatId, params);
|
|
2225
|
-
}
|
|
2226
|
-
/**
|
|
2227
|
-
* Set a chat's sticker set.
|
|
2228
|
-
*
|
|
2229
|
-
* @method ch
|
|
2230
|
-
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2231
|
-
* @param setName The name of the set.
|
|
2232
|
-
*/
|
|
2233
|
-
async setChatStickerSet(chatId, setName) {
|
|
2234
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").setChatStickerSet(chatId, setName);
|
|
2235
|
-
}
|
|
2236
|
-
/**
|
|
2237
|
-
* Delete a chat's sticker set.
|
|
2238
|
-
*
|
|
2239
|
-
* @method ch
|
|
2240
|
-
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2241
|
-
*/
|
|
2242
|
-
async deleteChatStickerSet(chatId) {
|
|
2243
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatStickerSet(chatId);
|
|
2244
|
-
}
|
|
2245
|
-
/**
|
|
2246
|
-
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
2247
|
-
*
|
|
2248
|
-
* @method ch
|
|
2249
|
-
* @param chatId The identifier of the chat.
|
|
2250
|
-
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
2251
|
-
*/
|
|
2252
|
-
async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
|
|
2253
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
2254
|
-
}
|
|
2255
|
-
/**
|
|
2256
|
-
* Create an invite link.
|
|
2257
|
-
*
|
|
2258
|
-
* @method ch
|
|
2259
|
-
* @param chatId The identifier of the chat to create the invite link for.
|
|
2260
|
-
* @returns The newly created invite link.
|
|
2261
|
-
*/
|
|
2262
|
-
async createInviteLink(chatId, params) {
|
|
2263
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").createInviteLink(chatId, params);
|
|
2264
|
-
}
|
|
2265
|
-
/**
|
|
2266
|
-
* Approve a join request.
|
|
2267
|
-
*
|
|
2268
|
-
* @method ch
|
|
2269
|
-
* @param chatId The identifier of the chat that contains the join request.
|
|
2270
|
-
* @param userId The user who made the join request.
|
|
2271
|
-
*/
|
|
2272
|
-
async approveJoinRequest(chatId, userId) {
|
|
2273
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").approveJoinRequest(chatId, userId);
|
|
2274
|
-
}
|
|
2275
|
-
/**
|
|
2276
|
-
* Decline a join request.
|
|
2277
|
-
*
|
|
2278
|
-
* @method ch
|
|
2279
|
-
* @param chatId The identifier of the chat that contains the join request.
|
|
2280
|
-
* @param userId The user who made the join request.
|
|
2281
|
-
*/
|
|
2282
|
-
async declineJoinRequest(chatId, userId) {
|
|
2283
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").declineJoinRequest(chatId, userId);
|
|
2284
|
-
}
|
|
2285
|
-
/**
|
|
2286
|
-
* Approve all join requests. User-only.
|
|
2287
|
-
*
|
|
2288
|
-
* @method ch
|
|
2289
|
-
* @param chatId The identifier of the chat that contains the join requests.
|
|
2290
|
-
*/
|
|
2291
|
-
async approveJoinRequests(chatId, params) {
|
|
2292
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").approveJoinRequests(chatId, params);
|
|
2293
|
-
}
|
|
2294
|
-
/**
|
|
2295
|
-
* Decline all join requests. User-only.
|
|
2296
|
-
*
|
|
2297
|
-
* @method ch
|
|
2298
|
-
* @param chatId The identifier of the chat that contains the join requests.
|
|
2299
|
-
*/
|
|
2300
|
-
async declineJoinRequests(chatId, params) {
|
|
2301
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").declineJoinRequests(chatId, params);
|
|
2302
|
-
}
|
|
2303
|
-
/**
|
|
2304
|
-
* Add a single user to a chat.
|
|
2305
|
-
*
|
|
2306
|
-
* @method ch
|
|
2307
|
-
* @param chatId The identifier of the chat to add the user to.
|
|
2308
|
-
* @param userId The identifier of the user to add to the chat.
|
|
2309
|
-
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
2310
|
-
*/
|
|
2311
|
-
async addChatMember(chatId, userId, params) {
|
|
2312
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").addChatMember(chatId, userId, params);
|
|
2313
|
-
}
|
|
2314
|
-
/**
|
|
2315
|
-
* Add multiple users at once to a channel or a supergroup.
|
|
2316
|
-
*
|
|
2317
|
-
* @method ch
|
|
2318
|
-
* @param chatId The identifier of the channel or supergroup to add the users to.
|
|
2319
|
-
* @param userId The identifiers of the users to add to the channel or supergroup.
|
|
2320
|
-
*/
|
|
2321
|
-
async addChatMembers(chatId, userIds) {
|
|
2322
|
-
return await __classPrivateFieldGet(this, _Client_messageManager, "f").addChatMembers(chatId, userIds);
|
|
2323
|
-
}
|
|
2324
|
-
/**
|
|
2325
|
-
* Open a chat. User-only.
|
|
2326
|
-
*
|
|
2327
|
-
* @method ch
|
|
2328
|
-
* @param chatId The chat to open.
|
|
2329
|
-
*/
|
|
2330
|
-
async openChat(chatId) {
|
|
2331
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").openChat(chatId);
|
|
2332
|
-
}
|
|
2333
|
-
/**
|
|
2334
|
-
* Close a chat previously opened by openChat. User-only.
|
|
2335
|
-
*
|
|
2336
|
-
* @method ch
|
|
2337
|
-
* @param chatId The chat to close.
|
|
2338
|
-
*/
|
|
2339
|
-
async closeChat(chatId) {
|
|
2340
|
-
await __classPrivateFieldGet(this, _Client_updateManager, "f").closeChat(chatId);
|
|
2341
|
-
}
|
|
2342
|
-
/**
|
|
2343
|
-
* Create a group. User-only.
|
|
2344
|
-
*
|
|
2345
|
-
* @method ch
|
|
2346
|
-
* @param title The title of the group.
|
|
2347
|
-
* @returns The created group.
|
|
2348
|
-
*/
|
|
2349
|
-
async createGroup(title, params) {
|
|
2350
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").createGroup(title, params);
|
|
2351
|
-
}
|
|
2352
|
-
/**
|
|
2353
|
-
* Create a supergroup. User-only.
|
|
2354
|
-
*
|
|
2355
|
-
* @method ch
|
|
2356
|
-
* @param title The title of the supergroup.
|
|
2357
|
-
* @returns The created supergroup.
|
|
2358
|
-
*/
|
|
2359
|
-
async createSupergroup(title, params) {
|
|
2360
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").createSupergroup(title, params);
|
|
2361
|
-
}
|
|
2362
|
-
/**
|
|
2363
|
-
* Create a channel. User-only.
|
|
2364
|
-
*
|
|
2365
|
-
* @method ch
|
|
2366
|
-
* @param title The title of the channel.
|
|
2367
|
-
* @returns The created channel.
|
|
2368
|
-
*/
|
|
2369
|
-
async createChannel(title, params) {
|
|
2370
|
-
return await __classPrivateFieldGet(this, _Client_chatListManager, "f").createChannel(title, params);
|
|
2371
|
-
}
|
|
2372
|
-
/**
|
|
2373
|
-
* Set the time to live of the messages of a chat. User-only.
|
|
2374
|
-
*
|
|
2375
|
-
* @method ch
|
|
2376
|
-
* @param chatId The identifier of the chat.
|
|
2377
|
-
* @param messageTtl The time to live of the messages in seconds.
|
|
2378
|
-
*/
|
|
2379
|
-
async setMessageTtl(chatId, messageTtl) {
|
|
2380
|
-
await __classPrivateFieldGet(this, _Client_chatListManager, "f").setMessageTtl(chatId, messageTtl);
|
|
2381
|
-
}
|
|
2382
|
-
//
|
|
2383
|
-
// ========================= CALLBACK QUERIES ========================= //
|
|
2384
|
-
//
|
|
2385
|
-
/**
|
|
2386
|
-
* Send a callback query. User-only.
|
|
2387
|
-
*
|
|
2388
|
-
* @method cq
|
|
2389
|
-
* @param chatId The chat that includes the messsage.
|
|
2390
|
-
* @param messageId The message that includes at a button responsible for the callback query question.
|
|
2391
|
-
* @param question The callback query's question.
|
|
2392
|
-
* @returns The bot's answer to the callback query.
|
|
2393
|
-
*/
|
|
2394
|
-
async sendCallbackQuery(chatId, messageId, question) {
|
|
2395
|
-
return await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").sendCallbackQuery(chatId, messageId, question);
|
|
2396
|
-
}
|
|
2397
|
-
/**
|
|
2398
|
-
* Answer a callback query. Bot-only.
|
|
2399
|
-
*
|
|
2400
|
-
* @method cq
|
|
2401
|
-
* @param id ID of the callback query to answer.
|
|
2402
|
-
*/
|
|
2403
|
-
async answerCallbackQuery(id, params) {
|
|
2404
|
-
await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").answerCallbackQuery(id, params);
|
|
2405
|
-
}
|
|
2406
|
-
//
|
|
2407
|
-
// ========================= INLINE QUERIES ========================= //
|
|
2408
|
-
//
|
|
2409
|
-
/**
|
|
2410
|
-
* Send an inline query. User-only.
|
|
2411
|
-
*
|
|
2412
|
-
* @method iq
|
|
2413
|
-
* @param userId The ID of the bot to send the inline query to.
|
|
2414
|
-
* @param chatId The ID of the chat from which the inline query is sent.
|
|
2415
|
-
* @returns The bot's answer to the inline query.
|
|
2416
|
-
*/
|
|
2417
|
-
async sendInlineQuery(userId, chatId, params) {
|
|
2418
|
-
return await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").sendInlineQuery(userId, chatId, params);
|
|
2419
|
-
}
|
|
2420
|
-
/**
|
|
2421
|
-
* Answer an inline query. Bot-only.
|
|
2422
|
-
*
|
|
2423
|
-
* @method iq
|
|
2424
|
-
* @param id The ID of the inline query to answer.
|
|
2425
|
-
* @param results The results to answer with.
|
|
2426
|
-
*/
|
|
2427
|
-
async answerInlineQuery(id, results, params) {
|
|
2428
|
-
await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").answerInlineQuery(id, results, params);
|
|
2429
|
-
}
|
|
2430
|
-
//
|
|
2431
|
-
// ========================= BOTS ========================= //
|
|
2432
|
-
//
|
|
2433
|
-
/**
|
|
2434
|
-
* Set the bot's description in the given language. Bot-only.
|
|
2435
|
-
*
|
|
2436
|
-
* @method bs
|
|
2437
|
-
*/
|
|
2438
|
-
async setMyDescription(params) {
|
|
2439
|
-
await __classPrivateFieldGet(this, _Client_botInfoManager, "f").setMyDescription(params);
|
|
2440
|
-
}
|
|
2441
|
-
/**
|
|
2442
|
-
* Set the bot's name in the given language. Bot-only.
|
|
2443
|
-
*
|
|
2444
|
-
* @method bs
|
|
2445
|
-
*/
|
|
2446
|
-
async setMyName(params) {
|
|
2447
|
-
await __classPrivateFieldGet(this, _Client_botInfoManager, "f").setMyName(params);
|
|
2448
|
-
}
|
|
2449
|
-
/**
|
|
2450
|
-
* Set the bot's short description in the given language. Bot-only.
|
|
2451
|
-
*
|
|
2452
|
-
* @method bs
|
|
2453
|
-
*/
|
|
2454
|
-
async setMyShortDescription(params) {
|
|
2455
|
-
await __classPrivateFieldGet(this, _Client_botInfoManager, "f").setMyShortDescription(params);
|
|
2456
|
-
}
|
|
2457
|
-
/**
|
|
2458
|
-
* Get the bot's description in the given language. Bot-only.
|
|
2459
|
-
*
|
|
2460
|
-
* @method bs
|
|
2461
|
-
* @returns The current bot's description in the specified language.
|
|
2462
|
-
*/
|
|
2463
|
-
async getMyDescription(params) {
|
|
2464
|
-
return await __classPrivateFieldGet(this, _Client_botInfoManager, "f").getMyDescription(params);
|
|
2465
|
-
}
|
|
2466
|
-
/**
|
|
2467
|
-
* Get the bot's name in the given language. Bot-only.
|
|
2468
|
-
*
|
|
2469
|
-
* @method bs
|
|
2470
|
-
* @returns The current bot's name in the specified language.
|
|
2471
|
-
*/
|
|
2472
|
-
async getMyName(params) {
|
|
2473
|
-
return await __classPrivateFieldGet(this, _Client_botInfoManager, "f").getMyName(params);
|
|
2474
|
-
}
|
|
2475
|
-
/**
|
|
2476
|
-
* Get the bot's short description in the given language. Bot-only.
|
|
2477
|
-
*
|
|
2478
|
-
* @method bs
|
|
2479
|
-
* @returns The current bot's short description in the specified language.
|
|
2480
|
-
*/
|
|
2481
|
-
async getMyShortDescription(params) {
|
|
2482
|
-
return await __classPrivateFieldGet(this, _Client_botInfoManager, "f").getMyShortDescription(params);
|
|
2483
|
-
}
|
|
2484
|
-
/**
|
|
2485
|
-
* Set the bot's commands in the given scope and/or language. Bot-only.
|
|
2486
|
-
*
|
|
2487
|
-
* @method bs
|
|
2488
|
-
* @param commands The commands to set.
|
|
2489
|
-
*/
|
|
2490
|
-
async setMyCommands(commands, params) {
|
|
2491
|
-
await __classPrivateFieldGet(this, _Client_botInfoManager, "f").setMyCommands(commands, params);
|
|
2492
|
-
}
|
|
2493
|
-
/**
|
|
2494
|
-
* Get the bot's commands in the given scope and/or language. Bot-only.
|
|
2495
|
-
*
|
|
2496
|
-
* @method bs
|
|
2497
|
-
* @returns The current bot's commands in the specified language.
|
|
2498
|
-
*/
|
|
2499
|
-
async getMyCommands(params) {
|
|
2500
|
-
return await __classPrivateFieldGet(this, _Client_botInfoManager, "f").getMyCommands(params);
|
|
2501
|
-
}
|
|
2502
|
-
//
|
|
2503
|
-
// ========================= REACTIONS ========================= //
|
|
2504
|
-
//
|
|
2505
|
-
/**
|
|
2506
|
-
* Change reactions made to a message.
|
|
2507
|
-
*
|
|
2508
|
-
* @method re
|
|
2509
|
-
* @param chatId The identifier of the chat which the message belongs to.
|
|
2510
|
-
* @param messageId The identifier of the message to add the reaction to.
|
|
2511
|
-
* @param reactions The new reactions.
|
|
2512
|
-
*/
|
|
2513
|
-
async setReactions(chatId, messageId, reactions, params) {
|
|
2514
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").setReactions(chatId, messageId, reactions, params);
|
|
2515
|
-
}
|
|
2516
|
-
/**
|
|
2517
|
-
* Make a reaction to a message.
|
|
2518
|
-
*
|
|
2519
|
-
* @method re
|
|
2520
|
-
* @param chatId The identifier of the chat which the message belongs to.
|
|
2521
|
-
* @param messageId The identifier of the message to add the reaction to.
|
|
2522
|
-
* @param reaction The reaction to add.
|
|
2523
|
-
*/
|
|
2524
|
-
async addReaction(chatId, messageId, reaction, params) {
|
|
2525
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").addReaction(chatId, messageId, reaction, params);
|
|
2526
|
-
}
|
|
2527
|
-
/**
|
|
2528
|
-
* Undo a reaction made to a message.
|
|
2529
|
-
*
|
|
2530
|
-
* @method re
|
|
2531
|
-
* @param chatId The identifier of the chat which the message belongs to.
|
|
2532
|
-
* @param messageId The identifier of the message which the reaction was made to.
|
|
2533
|
-
* @param reaction The reaction to remove.
|
|
2534
|
-
*/
|
|
2535
|
-
async removeReaction(chatId, messageId, reaction) {
|
|
2536
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").removeReaction(chatId, messageId, reaction);
|
|
2537
|
-
}
|
|
2538
|
-
//
|
|
2539
|
-
// ========================= STORIES ========================= //
|
|
2540
|
-
//
|
|
2541
|
-
/**
|
|
2542
|
-
* Create a story. User-only.
|
|
2543
|
-
*
|
|
2544
|
-
* @method st
|
|
2545
|
-
* @param content The content of the story.
|
|
2546
|
-
* @returns The created story.
|
|
2547
|
-
*/
|
|
2548
|
-
async createStory(chatId, content, params) {
|
|
2549
|
-
return await __classPrivateFieldGet(this, _Client_storyManager, "f").createStory(chatId, content, params);
|
|
2550
|
-
}
|
|
2551
|
-
/**
|
|
2552
|
-
* Retrieve multiple stories. User-only.
|
|
2553
|
-
*
|
|
2554
|
-
* @method st
|
|
2555
|
-
* @param chatId The identifier of the chat to retrieve the stories from.
|
|
2556
|
-
* @param storyIds The identifiers of the stories to retrieve.
|
|
2557
|
-
*/
|
|
2558
|
-
async getStories(chatId, storyIds) {
|
|
2559
|
-
if (!storyIds.length) {
|
|
2560
|
-
return [];
|
|
2561
|
-
}
|
|
2562
|
-
return await __classPrivateFieldGet(this, _Client_storyManager, "f").getStories(chatId, storyIds);
|
|
2563
|
-
}
|
|
2564
|
-
/**
|
|
2565
|
-
* Retrieve a single story. User-only.
|
|
2566
|
-
*
|
|
2567
|
-
* @method st
|
|
2568
|
-
* @param chatId The identifier of the chat to retrieve the story from.
|
|
2569
|
-
* @param storyId The identifier of the story to retrieve.
|
|
2570
|
-
* @returns The retrieved story.
|
|
2571
|
-
*/
|
|
2572
|
-
async getStory(chatId, storyId) {
|
|
2573
|
-
return await __classPrivateFieldGet(this, _Client_storyManager, "f").getStory(chatId, storyId);
|
|
2574
|
-
}
|
|
2575
|
-
/**
|
|
2576
|
-
* Delete multiple stories. User-only.
|
|
2577
|
-
*
|
|
2578
|
-
* @method st
|
|
2579
|
-
* @param chatId The identifier of the chat to delete the stories from.
|
|
2580
|
-
* @param storyIds The identifiers of the stories to delete.
|
|
2581
|
-
*/
|
|
2582
|
-
async deleteStories(chatId, storyIds) {
|
|
2583
|
-
await __classPrivateFieldGet(this, _Client_storyManager, "f").deleteStories(chatId, storyIds);
|
|
2584
|
-
}
|
|
2585
|
-
/**
|
|
2586
|
-
* Delete a single story. User-only.
|
|
2587
|
-
*
|
|
2588
|
-
* @method st
|
|
2589
|
-
* @param chatId The identifier of the chat to delete the story from.
|
|
2590
|
-
* @param storyId The identifier of the story to delete.
|
|
2591
|
-
*/
|
|
2592
|
-
async deleteStory(chatId, storyId) {
|
|
2593
|
-
await __classPrivateFieldGet(this, _Client_storyManager, "f").deleteStory(chatId, storyId);
|
|
2594
|
-
}
|
|
2595
|
-
/**
|
|
2596
|
-
* Add multiple stories to highlights. User-only.
|
|
2597
|
-
*
|
|
2598
|
-
* @method st
|
|
2599
|
-
* @param chatId The identifier of the chat that has the stories.
|
|
2600
|
-
* @param storyIds The identifiers of the stories to add to highlights.
|
|
2601
|
-
*/
|
|
2602
|
-
async addStoriesToHighlights(chatId, storyIds) {
|
|
2603
|
-
await __classPrivateFieldGet(this, _Client_storyManager, "f").addStoriesToHighlights(chatId, storyIds);
|
|
2604
|
-
}
|
|
2605
|
-
/**
|
|
2606
|
-
* Add a single story to highlights. User-only.
|
|
2607
|
-
*
|
|
2608
|
-
* @method st
|
|
2609
|
-
* @param chatId The identifier of the chat that has the story.
|
|
2610
|
-
* @param storyId The identifier of the story to add to highlights.
|
|
2611
|
-
*/
|
|
2612
|
-
async addStoryToHighlights(chatId, storyId) {
|
|
2613
|
-
await __classPrivateFieldGet(this, _Client_storyManager, "f").addStoryToHighlights(chatId, storyId);
|
|
2614
|
-
}
|
|
2615
|
-
/**
|
|
2616
|
-
* Remove multiple stories from highlights. User-only.
|
|
2617
|
-
*
|
|
2618
|
-
* @method st
|
|
2619
|
-
* @param chatId The identifier of the chat that has the stories.
|
|
2620
|
-
* @param storyIds The identifiers of the stories to remove from highlights.
|
|
2621
|
-
*/
|
|
2622
|
-
async removeStoriesFromHighlights(chatId, storyIds) {
|
|
2623
|
-
await __classPrivateFieldGet(this, _Client_storyManager, "f").removeStoriesFromHighlights(chatId, storyIds);
|
|
2624
|
-
}
|
|
2625
|
-
/**
|
|
2626
|
-
* Remove a single story from highlights. User-only.
|
|
2627
|
-
*
|
|
2628
|
-
* @method st
|
|
2629
|
-
* @param chatId The identifier of the chat that has the story.
|
|
2630
|
-
* @param storyId The identifier of the story to remove from highlights.
|
|
2631
|
-
*/
|
|
2632
|
-
async removeStoryFromHighlights(chatId, storyId) {
|
|
2633
|
-
await __classPrivateFieldGet(this, _Client_storyManager, "f").removeStoryFromHighlights(chatId, storyId);
|
|
2634
|
-
}
|
|
2635
|
-
//
|
|
2636
|
-
// ========================= MISC ========================= //
|
|
2637
|
-
//
|
|
2638
|
-
/**
|
|
2639
|
-
* Get network statistics. This might not always be available.
|
|
2640
|
-
*
|
|
2641
|
-
* @method mc
|
|
2642
|
-
*/
|
|
2643
|
-
async getNetworkStatistics() {
|
|
2644
|
-
return await __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f").getNetworkStatistics();
|
|
2645
|
-
}
|
|
2646
|
-
/**
|
|
2647
|
-
* Block a user. User-only.
|
|
2648
|
-
*
|
|
2649
|
-
* @method mc
|
|
2650
|
-
* @param userId The identifier of the user to block.
|
|
2651
|
-
*/
|
|
2652
|
-
async blockUser(userId) {
|
|
2653
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").blockUser(userId);
|
|
2654
|
-
}
|
|
2655
|
-
/**
|
|
2656
|
-
* Unblock a user. User-only.
|
|
2657
|
-
*
|
|
2658
|
-
* @method mc
|
|
2659
|
-
* @param userId The identifier of the user to unblock.
|
|
2660
|
-
*/
|
|
2661
|
-
async unblockUser(userId) {
|
|
2662
|
-
await __classPrivateFieldGet(this, _Client_messageManager, "f").unblockUser(userId);
|
|
2663
|
-
}
|
|
2664
|
-
//
|
|
2665
|
-
// ========================= VIDEO CHATS ========================= //
|
|
2666
|
-
//
|
|
2667
|
-
/**
|
|
2668
|
-
* Start a video chat. User-only.
|
|
2669
|
-
*
|
|
2670
|
-
* @method vc
|
|
2671
|
-
* @param chatId The chat to start the video chat in.
|
|
2672
|
-
* @returns The started video chat.
|
|
2673
|
-
*/
|
|
2674
|
-
async startVideoChat(chatId, params) {
|
|
2675
|
-
return await __classPrivateFieldGet(this, _Client_videoChatManager, "f").startVideoChat(chatId, params);
|
|
2676
|
-
}
|
|
2677
|
-
/**
|
|
2678
|
-
* Schedule a video chat. User-only.
|
|
2679
|
-
*
|
|
2680
|
-
* @method vc
|
|
2681
|
-
* @param chatId The chat to schedule the video chat in.
|
|
2682
|
-
* @param startAt A point in time within the future in which the video chat will be started.
|
|
2683
|
-
* @returns The scheduled video chat.
|
|
2684
|
-
*/
|
|
2685
|
-
async scheduleVideoChat(chatId, startAt, params) {
|
|
2686
|
-
return await __classPrivateFieldGet(this, _Client_videoChatManager, "f").scheduleVideoChat(chatId, startAt, params);
|
|
2687
|
-
}
|
|
2688
|
-
/**
|
|
2689
|
-
* Join a video chat. User-only.
|
|
2690
|
-
*
|
|
2691
|
-
* @method vc
|
|
2692
|
-
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2693
|
-
* @param params_ WebRTC connection parameters.
|
|
2694
|
-
* @returns Parameters to be passed to the used WebRTC library.
|
|
2695
|
-
*/
|
|
2696
|
-
async joinVideoChat(id, params_, params) {
|
|
2697
|
-
return await __classPrivateFieldGet(this, _Client_videoChatManager, "f").joinVideoChat(id, params_, params);
|
|
2698
|
-
}
|
|
2699
|
-
/**
|
|
2700
|
-
* Leave a video chat. User-only.
|
|
2701
|
-
*
|
|
2702
|
-
* @method vc
|
|
2703
|
-
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2704
|
-
*/
|
|
2705
|
-
async leaveVideoChat(id) {
|
|
2706
|
-
await __classPrivateFieldGet(this, _Client_videoChatManager, "f").leaveVideoChat(id);
|
|
2707
|
-
}
|
|
2708
|
-
/**
|
|
2709
|
-
* Join a live stream. User-only.
|
|
2710
|
-
*
|
|
2711
|
-
* @method vc
|
|
2712
|
-
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2713
|
-
*/
|
|
2714
|
-
async joinLiveStream(id) {
|
|
2715
|
-
await __classPrivateFieldGet(this, _Client_videoChatManager, "f").joinLiveStream(id);
|
|
2716
|
-
}
|
|
2717
|
-
/**
|
|
2718
|
-
* Get a video chat. User-only.
|
|
2719
|
-
*
|
|
2720
|
-
* @method vc
|
|
2721
|
-
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2722
|
-
*/
|
|
2723
|
-
async getVideoChat(id) {
|
|
2724
|
-
return await __classPrivateFieldGet(this, _Client_videoChatManager, "f").getVideoChat(id);
|
|
2725
|
-
}
|
|
2726
|
-
/**
|
|
2727
|
-
* Get live stream channels. User-only.
|
|
2728
|
-
*
|
|
2729
|
-
* @method vc
|
|
2730
|
-
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2731
|
-
*/
|
|
2732
|
-
async getLiveStreamChannels(id) {
|
|
2733
|
-
return await __classPrivateFieldGet(this, _Client_videoChatManager, "f").getLiveStreamChannels(id);
|
|
2734
|
-
}
|
|
2735
|
-
/**
|
|
2736
|
-
* Download a live stream chunk. User-only.
|
|
2737
|
-
*
|
|
2738
|
-
* @method vc
|
|
2739
|
-
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2740
|
-
* @param channelId Stream channel ID.
|
|
2741
|
-
* @param scale Stream channel scale.
|
|
2742
|
-
* @param timestamp Millisecond timestamp of the chunk to download.
|
|
2743
|
-
*/
|
|
2744
|
-
async *downloadLiveStreamChunk(id, channelId, scale, timestamp, params) {
|
|
2745
|
-
yield* __classPrivateFieldGet(this, _Client_videoChatManager, "f").downloadLiveStreamChunk(id, channelId, scale, timestamp, params);
|
|
2746
|
-
}
|
|
2747
|
-
//
|
|
2748
|
-
// ========================= PAYMENTS ========================= //
|
|
2749
|
-
//
|
|
2750
|
-
/**
|
|
2751
|
-
* Answer a pre-checkout query. Bot-only.
|
|
2752
|
-
*
|
|
2753
|
-
* @method pa
|
|
2754
|
-
* @param preCheckoutQueryId The identifier of the pre-checkout query.
|
|
2755
|
-
* @param ok Whether the checkout is going to be processed.
|
|
2756
|
-
*/
|
|
2757
|
-
async answerPreCheckoutQuery(preCheckoutQueryId, ok, params) {
|
|
2758
|
-
await __classPrivateFieldGet(this, _Client_paymentManager, "f").answerPreCheckoutQuery(preCheckoutQueryId, ok, params);
|
|
2759
|
-
}
|
|
2760
|
-
/**
|
|
2761
|
-
* Refund a star payment. Bot-only.
|
|
2762
|
-
*
|
|
2763
|
-
* @method pa
|
|
2764
|
-
* @param userId The identifier of the user that was charged.
|
|
2765
|
-
* @param telegramPaymentChargeId The identifier of the charge.
|
|
2766
|
-
*/
|
|
2767
|
-
async refundStarPayment(userId, telegramPaymentChargeId) {
|
|
2768
|
-
await __classPrivateFieldGet(this, _Client_paymentManager, "f").refundStarPayment(userId, telegramPaymentChargeId);
|
|
2769
|
-
}
|
|
2770
|
-
}
|
|
2771
|
-
_a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2772
|
-
if (__classPrivateFieldGet(this, _Client_disableUpdates, "f") && !("authorizationState" in update) && !("connectionState" in update)) {
|
|
2773
|
-
return;
|
|
2774
|
-
}
|
|
2775
|
-
try {
|
|
2776
|
-
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), resolve);
|
|
2777
|
-
}
|
|
2778
|
-
catch (err) {
|
|
2779
|
-
__classPrivateFieldGet(this, _Client_L, "f").error("Failed to handle update:", err);
|
|
2780
|
-
}
|
|
2781
|
-
}, _Client_queueHandleCtxUpdate = function _Client_queueHandleCtxUpdate(update) {
|
|
2782
|
-
__classPrivateFieldGet(this, _Client_updateManager, "f").getHandleUpdateQueue(UpdateManager.MAIN_BOX_ID).add(async () => {
|
|
2783
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, update);
|
|
2784
|
-
});
|
|
2785
|
-
}, _Client_handleUpdate = async function _Client_handleUpdate(update) {
|
|
2786
|
-
const promises = new Array();
|
|
2787
|
-
if (is("updateUserName", update)) {
|
|
2788
|
-
await this.messageStorage.updateUsernames(Number(update.user_id), update.usernames.map((v) => v.username));
|
|
2789
|
-
const peer = { ...update, _: "peerUser" };
|
|
2790
|
-
const entity = await this[getEntity](peer);
|
|
2791
|
-
if (entity != null) {
|
|
2792
|
-
entity.usernames = update.usernames;
|
|
2793
|
-
entity.first_name = update.first_name;
|
|
2794
|
-
entity.last_name = update.last_name;
|
|
2795
|
-
await this.messageStorage.setEntity(entity);
|
|
2796
|
-
}
|
|
2797
|
-
}
|
|
2798
|
-
if (MessageManager.canHandleUpdate(update)) {
|
|
2799
|
-
promises.push(async () => {
|
|
2800
|
-
const update_ = await __classPrivateFieldGet(this, _Client_messageManager, "f").handleUpdate(update);
|
|
2801
|
-
if (!update_) {
|
|
2802
|
-
return;
|
|
2803
|
-
}
|
|
2804
|
-
try {
|
|
2805
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, update_);
|
|
2806
|
-
}
|
|
2807
|
-
finally {
|
|
2808
|
-
if ("deletedMessages" in update_) {
|
|
2809
|
-
for (const { chatId, messageId } of update_.deletedMessages) {
|
|
2810
|
-
await this.messageStorage.setMessage(chatId, messageId, null);
|
|
2811
|
-
await __classPrivateFieldGet(this, _Client_chatListManager, "f").reassignChatLastMessage(chatId);
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
}
|
|
2815
|
-
});
|
|
2816
|
-
}
|
|
2817
|
-
if (VideoChatManager.canHandleUpdate(update)) {
|
|
2818
|
-
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_videoChatManager, "f").handleUpdate(update)));
|
|
2819
|
-
}
|
|
2820
|
-
if (CallbackQueryManager.canHandleUpdate(update)) {
|
|
2821
|
-
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").handleUpdate(update)));
|
|
2822
|
-
}
|
|
2823
|
-
if (InlineQueryManager.canHandleUpdate(update)) {
|
|
2824
|
-
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").handleUpdate(update)));
|
|
2825
|
-
}
|
|
2826
|
-
if (ReactionManager.canHandleUpdate(update)) {
|
|
2827
|
-
promises.push(async () => {
|
|
2828
|
-
const upd = await __classPrivateFieldGet(this, _Client_reactionManager, "f").handleUpdate(update);
|
|
2829
|
-
if (upd) {
|
|
2830
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, upd);
|
|
2831
|
-
}
|
|
2832
|
-
});
|
|
2833
|
-
}
|
|
2834
|
-
if (ChatListManager.canHandleUpdate(update)) {
|
|
2835
|
-
promises.push(() => __classPrivateFieldGet(this, _Client_chatListManager, "f").handleUpdate(update));
|
|
2836
|
-
}
|
|
2837
|
-
if (StoryManager.canHandleUpdate(update)) {
|
|
2838
|
-
promises.push(async () => {
|
|
2839
|
-
const upd = await __classPrivateFieldGet(this, _Client_storyManager, "f").handleUpdate(update);
|
|
2840
|
-
if (upd) {
|
|
2841
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, upd);
|
|
2842
|
-
}
|
|
2843
|
-
});
|
|
2844
|
-
}
|
|
2845
|
-
if (BusinessConnectionManager.canHandleUpdate(update)) {
|
|
2846
|
-
promises.push(async () => __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, await __classPrivateFieldGet(this, _Client_businessConnectionManager, "f").handleUpdate(update)));
|
|
2847
|
-
}
|
|
2848
|
-
return () => Promise.all(promises.map((v) => v()));
|
|
2849
|
-
}, _Client_getMe = async function _Client_getMe() {
|
|
2850
|
-
if (__classPrivateFieldGet(this, _Client_lastGetMe, "f") != null) {
|
|
2851
|
-
return __classPrivateFieldGet(this, _Client_lastGetMe, "f");
|
|
2852
|
-
}
|
|
2853
|
-
else {
|
|
2854
|
-
const user = await this.getMe();
|
|
2855
|
-
__classPrivateFieldSet(this, _Client_lastGetMe, user, "f");
|
|
2856
|
-
return user;
|
|
2857
|
-
}
|
|
2858
|
-
};
|