@mtkruto/node 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_deps.d.ts +14 -12
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +16 -14
- package/esm/3_types.d.ts +36 -33
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +36 -33
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.d.ts.map +1 -1
- package/esm/4_errors.d.ts +2 -2
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/_dnt.polyfills.d.ts +7 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +109 -0
- 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 +49 -0
- package/esm/client/0_client_abstract.d.ts +3 -3
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_filters.d.ts +10 -4
- package/esm/client/0_filters.d.ts.map +1 -1
- package/esm/client/0_filters.js +6 -3
- package/esm/client/0_html.d.ts +1 -1
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/0_markdown.d.ts +1 -1
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +8 -8
- package/esm/client/0_params.d.ts +42 -8
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +1 -1
- package/esm/client/0_storage_operations.d.ts +55 -73
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +254 -251
- package/esm/client/0_update_processor.d.ts +4 -4
- package/esm/client/0_update_processor.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +2 -2
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +8 -8
- package/esm/client/1_client_plain.d.ts +3 -3
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +2 -2
- package/esm/client/1_composer.d.ts +3 -3
- package/esm/client/1_composer.d.ts.map +1 -1
- package/esm/client/1_composer.js +7 -7
- package/esm/client/1_types.d.ts +5 -5
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.d.ts +3 -3
- package/esm/client/2_account_manager.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +7 -7
- package/esm/client/2_bot_info_manager.d.ts +3 -3
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.d.ts +4 -4
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +3 -3
- package/esm/client/2_client_encrypted.d.ts +3 -3
- package/esm/client/2_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_file_manager.d.ts +3 -3
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +45 -31
- package/esm/client/2_network_statistics_manager.d.ts +1 -1
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.d.ts +5 -5
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +2 -2
- package/esm/client/2_reaction_manager.d.ts +4 -4
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +2 -2
- package/esm/client/2_translations_manager.d.ts +5 -5
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +20 -16
- package/esm/client/2_update_manager.d.ts +6 -4
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +76 -94
- package/esm/client/3_client_encrypted_pool.d.ts +1 -1
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -1
- package/esm/client/3_message_manager.d.ts +12 -9
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +166 -45
- package/esm/client/3_video_chat_manager.d.ts +6 -6
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +7 -7
- package/esm/client/4_callback_query_manager.d.ts +6 -6
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +3 -3
- package/esm/client/4_chat_list_manager.d.ts +8 -9
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +18 -273
- package/esm/client/4_chat_manager.d.ts +9 -9
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +11 -11
- package/esm/client/4_forum_manager.d.ts +4 -4
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_gift_manager.d.ts +4 -4
- package/esm/client/4_gift_manager.d.ts.map +1 -1
- package/esm/client/4_gift_manager.js +4 -4
- package/esm/client/4_inline_query_manager.d.ts +6 -6
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +4 -4
- package/esm/client/4_link_preview_manager.d.ts +6 -6
- package/esm/client/4_link_preview_manager.d.ts.map +1 -1
- package/esm/client/4_link_preview_manager.js +3 -3
- package/esm/client/4_poll_manager.d.ts +5 -5
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +2 -2
- package/esm/client/4_story_manager.d.ts +8 -8
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +9 -9
- package/esm/client/5_client.d.ts +41 -23
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +476 -411
- package/esm/connection/0_connection.d.ts +1 -1
- package/esm/connection/0_connection.d.ts.map +1 -1
- package/esm/connection/1_connection_tcp.node.d.ts +1 -1
- package/esm/connection/1_connection_tcp.node.d.ts.map +1 -1
- package/esm/connection/1_connection_tcp.node.js +4 -4
- package/esm/connection/1_connection_web_socket.d.ts +1 -1
- package/esm/connection/1_connection_web_socket.d.ts.map +1 -1
- package/esm/connection/1_connection_web_socket.js +3 -3
- package/esm/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.js +20 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/abortable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/deadline.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/debounce.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/delay.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/delay.js +80 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/mux_async_iterator.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/pool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/retry.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.14/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +69 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +140 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.js +82 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.js +109 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/_os.js +12 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.d.ts +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/os.js +5 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/basename.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/extname.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/is_absolute.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/join.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.2/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/streams/1.0.11/to_array_buffer.d.ts.map +1 -0
- package/esm/session/1_session.d.ts +2 -2
- package/esm/session/1_session.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.d.ts +3 -3
- package/esm/session/2_session_encrypted.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.js +76 -77
- package/esm/session/2_session_plain.js +1 -1
- package/esm/storage/0_storage.d.ts +2 -1
- package/esm/storage/0_storage.d.ts.map +1 -1
- package/esm/storage/1_utilities.d.ts +14 -11
- package/esm/storage/1_utilities.d.ts.map +1 -1
- package/esm/storage/1_utilities.js +17 -17
- package/esm/storage/2_storage_indexed_db.d.ts +2 -1
- package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +6 -3
- package/esm/storage/2_storage_local_storage.node.d.ts +2 -1
- package/esm/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.node.js +6 -3
- package/esm/storage/2_storage_memory.d.ts +3 -2
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +5 -2
- package/esm/storage/2_storage_session_storage.d.ts +3 -2
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +6 -3
- package/esm/tl/0_utilities.d.ts +1 -0
- package/esm/tl/0_utilities.d.ts.map +1 -1
- package/esm/tl/0_utilities.js +21 -2
- package/esm/tl/1_telegram_api.d.ts +810 -254
- package/esm/tl/1_telegram_api.d.ts.map +1 -1
- package/esm/tl/1_telegram_api.js +912 -213
- package/esm/tl/1_tl_reader.d.ts +3 -3
- package/esm/tl/1_tl_reader.d.ts.map +1 -1
- package/esm/tl/1_tl_reader.js +8 -8
- package/esm/tl/1_tl_writer.d.ts +3 -3
- package/esm/tl/1_tl_writer.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.js +6 -6
- package/esm/tl/1_utilities.d.ts +1 -1
- package/esm/tl/1_utilities.d.ts.map +1 -1
- package/esm/tl/1_utilities.js +2 -2
- package/esm/tl/2_message.js +1 -1
- package/esm/tl/2_mtproto.d.ts +2 -2
- package/esm/tl/2_mtproto.d.ts.map +1 -1
- package/esm/tl/2_telegram.d.ts +1 -1
- package/esm/tl/2_telegram.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.d.ts +1 -1
- package/esm/transport/0_obfuscation.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.js +2 -2
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.d.ts.map +1 -1
- package/esm/transport/1_transport_abridged.d.ts +1 -1
- package/esm/transport/1_transport_abridged.d.ts.map +1 -1
- package/esm/transport/1_transport_intermediate.d.ts +1 -1
- package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
- package/esm/transport/1_transport_provider.d.ts +2 -2
- package/esm/transport/1_transport_provider.d.ts.map +1 -1
- package/esm/transport/2_transport_provider_tcp.d.ts +1 -1
- package/esm/transport/2_transport_provider_tcp.d.ts.map +1 -1
- package/esm/transport/2_transport_provider_web_socket.d.ts +1 -1
- package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -1
- package/esm/transport/2_transport_provider_web_socket.js +1 -1
- package/esm/types/0_birthday.d.ts +1 -1
- package/esm/types/0_birthday.d.ts.map +1 -1
- package/esm/types/0_callback_query_answer.d.ts +1 -1
- package/esm/types/0_callback_query_answer.d.ts.map +1 -1
- package/esm/types/0_callback_query_question.js +2 -2
- package/esm/types/0_chat_administrator_rights.d.ts +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_member_rights.d.ts +1 -1
- package/esm/types/0_chat_member_rights.d.ts.map +1 -1
- package/esm/types/0_contact.d.ts +1 -1
- package/esm/types/0_contact.d.ts.map +1 -1
- package/esm/types/0_dice.d.ts +1 -1
- package/esm/types/0_dice.d.ts.map +1 -1
- package/esm/types/0_failed_invitation.d.ts +1 -1
- package/esm/types/0_failed_invitation.d.ts.map +1 -1
- package/esm/types/0_file_source.d.ts +1 -1
- package/esm/types/0_file_source.d.ts.map +1 -1
- package/esm/types/0_invoice.d.ts +1 -1
- package/esm/types/0_invoice.d.ts.map +1 -1
- package/esm/types/0_live_stream_channel.d.ts +1 -1
- package/esm/types/0_live_stream_channel.d.ts.map +1 -1
- package/esm/types/0_mask_position.d.ts +1 -1
- package/esm/types/0_mask_position.d.ts.map +1 -1
- package/esm/types/0_mask_position.js +1 -1
- package/esm/types/0_message_search_filter.d.ts +1 -1
- package/esm/types/0_message_search_filter.d.ts.map +1 -1
- package/esm/types/0_opening_hours.d.ts +1 -1
- package/esm/types/0_opening_hours.d.ts.map +1 -1
- package/esm/types/0_reaction.js +5 -5
- package/esm/types/0_refunded_payment.d.ts +1 -1
- package/esm/types/0_refunded_payment.d.ts.map +1 -1
- package/esm/types/0_restriction_reason.d.ts +1 -1
- package/esm/types/0_restriction_reason.d.ts.map +1 -1
- package/esm/types/0_self_destruct_option.js +3 -3
- package/esm/types/0_shipping_address.d.ts +1 -1
- package/esm/types/0_shipping_address.d.ts.map +1 -1
- package/esm/types/0_slow_mode_duration.js +2 -2
- package/esm/types/0_voice.d.ts +1 -1
- package/esm/types/0_voice.d.ts.map +1 -1
- package/esm/types/0_voice_transcription.d.ts +1 -1
- package/esm/types/0_voice_transcription.d.ts.map +1 -1
- package/esm/types/1_animation.d.ts +1 -1
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_audio.d.ts +1 -1
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.d.ts +2 -2
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_chat_p.d.ts +12 -2
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +6 -2
- package/esm/types/1_document.d.ts +1 -1
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_giveaway.d.ts +2 -2
- package/esm/types/1_giveaway.d.ts.map +1 -1
- package/esm/types/1_inline_keyboard_button.d.ts +3 -3
- package/esm/types/1_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_inline_keyboard_button.js +4 -4
- package/esm/types/1_inline_query_result_button.d.ts +1 -1
- package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
- package/esm/types/1_input_story_content.d.ts +1 -1
- package/esm/types/1_input_story_content.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +3 -3
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +1 -1
- package/esm/types/1_message_reaction.d.ts +1 -1
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +2 -2
- package/esm/types/1_mini_app_info.d.ts +2 -2
- package/esm/types/1_mini_app_info.d.ts.map +1 -1
- package/esm/types/1_network_statistics.d.ts +1 -1
- package/esm/types/1_network_statistics.d.ts.map +1 -1
- package/esm/types/1_order_info.d.ts +2 -2
- package/esm/types/1_order_info.d.ts.map +1 -1
- package/esm/types/1_photo.d.ts +1 -1
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_reaction_count.d.ts +2 -2
- package/esm/types/1_reaction_count.d.ts.map +1 -1
- package/esm/types/1_sticker.d.ts +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +2 -2
- package/esm/types/1_story_reaction.d.ts +2 -2
- package/esm/types/1_story_reaction.d.ts.map +1 -1
- package/esm/types/1_venue.d.ts +1 -1
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_video.d.ts +1 -1
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video_note.d.ts +1 -1
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/2_chat.d.ts +6 -9
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +10 -15
- package/esm/types/2_inactive_chat.d.ts +1 -1
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_message_entity.d.ts +139 -0
- package/esm/types/2_message_entity.d.ts.map +1 -0
- package/esm/types/2_message_entity.js +183 -0
- package/esm/types/2_message_interactions.d.ts +1 -1
- package/esm/types/2_message_interactions.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.d.ts +4 -5
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reaction_count.js +4 -6
- package/esm/types/2_poll_answer.d.ts +3 -4
- package/esm/types/2_poll_answer.d.ts.map +1 -1
- package/esm/types/2_poll_answer.js +4 -5
- package/esm/types/2_reply_markup.d.ts +3 -3
- package/esm/types/2_reply_markup.d.ts.map +1 -1
- 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 +2 -2
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_interactions.d.ts +2 -2
- package/esm/types/2_story_interactions.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.d.ts +6 -6
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +2 -2
- 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 +2 -2
- package/esm/types/2_successful_payment.d.ts.map +1 -1
- package/esm/types/2_user.d.ts +65 -0
- package/esm/types/2_user.d.ts.map +1 -0
- package/esm/types/2_user.js +73 -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_member.d.ts +70 -0
- package/esm/types/3_chat_member.d.ts.map +1 -0
- package/esm/types/3_chat_member.js +114 -0
- package/esm/types/3_chat_settings.d.ts +46 -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_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 +58 -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_gift_upgraded_component.d.ts +95 -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_media.d.ts +122 -0
- package/esm/types/3_input_media.d.ts.map +1 -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_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 +34 -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 +8 -9
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/3_story.js +6 -7
- 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_gift.d.ts +94 -0
- package/esm/types/4_gift.d.ts.map +1 -0
- package/esm/types/4_gift.js +105 -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 +35 -0
- package/esm/types/4_reply_to.d.ts.map +1 -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 +48 -0
- package/esm/types/5_link_preview.d.ts +188 -0
- package/esm/types/5_link_preview.d.ts.map +1 -0
- package/esm/types/5_link_preview.js +218 -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 +616 -0
- package/esm/types/6_message.d.ts.map +1 -0
- package/esm/types/6_message.js +520 -0
- package/esm/types/6_message_content.d.ts +119 -0
- package/esm/types/6_message_content.d.ts.map +1 -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 +35 -0
- package/esm/types/7_chat_list_item.d.ts.map +1 -0
- package/esm/types/7_chat_list_item.js +87 -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_saved_chat.d.ts +35 -0
- package/esm/types/7_saved_chat.d.ts.map +1 -0
- package/esm/types/7_saved_chat.js +43 -0
- package/esm/types/7_topic.d.ts +34 -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 +528 -0
- package/esm/types/8_update.d.ts.map +1 -0
- package/esm/types/_file_id.d.ts +61 -50
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +92 -73
- package/esm/types/_getters.d.ts +3 -10
- package/esm/types/_getters.d.ts.map +1 -1
- package/esm/utilities/0_bigint.js +5 -5
- package/esm/utilities/0_buffer.js +3 -3
- package/esm/utilities/0_env.js +1 -1
- package/esm/utilities/0_hash.d.ts +2 -2
- package/esm/utilities/0_hash.d.ts.map +1 -1
- package/esm/utilities/0_misc.d.ts +1 -0
- package/esm/utilities/0_misc.d.ts.map +1 -1
- package/esm/utilities/0_misc.js +18 -4
- package/esm/utilities/0_part_stream.d.ts +1 -1
- package/esm/utilities/0_part_stream.d.ts.map +1 -1
- package/esm/utilities/0_rle.js +1 -1
- package/esm/utilities/1_auth.js +1 -1
- package/esm/utilities/1_base64.js +1 -1
- package/esm/utilities/1_logger.js +2 -2
- package/esm/utilities/1_math.js +2 -2
- package/esm/utilities/2_queue.js +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +14 -12
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +20 -15
- package/script/3_types.d.ts +36 -33
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +36 -33
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_errors.d.ts +2 -2
- package/script/4_errors.d.ts.map +1 -1
- package/script/_dnt.polyfills.d.ts +7 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +109 -0
- 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 +53 -0
- package/script/client/0_client_abstract.d.ts +3 -3
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_filters.d.ts +10 -4
- package/script/client/0_filters.d.ts.map +1 -1
- package/script/client/0_filters.js +6 -3
- package/script/client/0_html.d.ts +1 -1
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +1 -1
- package/script/client/0_markdown.d.ts +1 -1
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +8 -8
- package/script/client/0_params.d.ts +42 -8
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +1 -1
- package/script/client/0_storage_operations.d.ts +55 -73
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +252 -249
- package/script/client/0_update_processor.d.ts +4 -4
- package/script/client/0_update_processor.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +2 -2
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +8 -8
- package/script/client/1_client_plain.d.ts +3 -3
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +2 -2
- package/script/client/1_composer.d.ts +3 -3
- package/script/client/1_composer.d.ts.map +1 -1
- package/script/client/1_composer.js +7 -7
- package/script/client/1_types.d.ts +5 -5
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.d.ts +3 -3
- package/script/client/2_account_manager.d.ts.map +1 -1
- package/script/client/2_account_manager.js +7 -7
- package/script/client/2_bot_info_manager.d.ts +3 -3
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.d.ts +4 -4
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +3 -3
- package/script/client/2_client_encrypted.d.ts +3 -3
- package/script/client/2_client_encrypted.d.ts.map +1 -1
- package/script/client/2_file_manager.d.ts +3 -3
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +45 -31
- package/script/client/2_network_statistics_manager.d.ts +1 -1
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.d.ts +5 -5
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +2 -2
- package/script/client/2_reaction_manager.d.ts +4 -4
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +2 -2
- package/script/client/2_translations_manager.d.ts +5 -5
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +20 -16
- package/script/client/2_update_manager.d.ts +6 -4
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +76 -94
- package/script/client/3_client_encrypted_pool.d.ts +1 -1
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -1
- package/script/client/3_message_manager.d.ts +12 -9
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +165 -44
- package/script/client/3_video_chat_manager.d.ts +6 -6
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +7 -7
- package/script/client/4_callback_query_manager.d.ts +6 -6
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +3 -3
- package/script/client/4_chat_list_manager.d.ts +8 -9
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +17 -272
- package/script/client/4_chat_manager.d.ts +9 -9
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +11 -11
- package/script/client/4_forum_manager.d.ts +4 -4
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_gift_manager.d.ts +4 -4
- package/script/client/4_gift_manager.d.ts.map +1 -1
- package/script/client/4_gift_manager.js +4 -4
- package/script/client/4_inline_query_manager.d.ts +6 -6
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +4 -4
- package/script/client/4_link_preview_manager.d.ts +6 -6
- package/script/client/4_link_preview_manager.d.ts.map +1 -1
- package/script/client/4_link_preview_manager.js +3 -3
- package/script/client/4_poll_manager.d.ts +5 -5
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +2 -2
- package/script/client/4_story_manager.d.ts +8 -8
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +9 -9
- package/script/client/5_client.d.ts +41 -23
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +474 -409
- package/script/connection/0_connection.d.ts +1 -1
- package/script/connection/0_connection.d.ts.map +1 -1
- package/script/connection/1_connection_tcp.node.d.ts +1 -1
- package/script/connection/1_connection_tcp.node.d.ts.map +1 -1
- package/script/connection/1_connection_tcp.node.js +4 -4
- package/script/connection/1_connection_web_socket.d.ts +1 -1
- package/script/connection/1_connection_web_socket.d.ts.map +1 -1
- package/script/connection/1_connection_web_socket.js +3 -3
- package/script/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.js +23 -0
- package/script/deps/jsr.io/@std/async/1.0.14/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/abortable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/deadline.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/debounce.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/delay.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/delay.js +116 -0
- package/script/deps/jsr.io/@std/async/1.0.14/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/mux_async_iterator.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/pool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/retry.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.14/tee.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +72 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +144 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/cache/0.2.0/memoize.js +85 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +113 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/_os.js +48 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/os.d.ts +3 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/os.js +8 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/assert_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/normalize_string.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/strip_trailing_separators.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/_common/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/basename.js +38 -0
- package/script/deps/jsr.io/@std/path/1.1.2/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/extname.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.2/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/is_absolute.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.2/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/join.js +32 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/posix/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/to_file_url.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.2/windows/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/streams/1.0.11/to_array_buffer.d.ts.map +1 -0
- package/script/session/1_session.d.ts +2 -2
- package/script/session/1_session.d.ts.map +1 -1
- package/script/session/2_session_encrypted.d.ts +3 -3
- package/script/session/2_session_encrypted.d.ts.map +1 -1
- package/script/session/2_session_encrypted.js +75 -76
- package/script/session/2_session_plain.js +1 -1
- package/script/storage/0_storage.d.ts +2 -1
- package/script/storage/0_storage.d.ts.map +1 -1
- package/script/storage/1_utilities.d.ts +14 -11
- package/script/storage/1_utilities.d.ts.map +1 -1
- package/script/storage/1_utilities.js +39 -39
- package/script/storage/2_storage_indexed_db.d.ts +2 -1
- package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +6 -3
- package/script/storage/2_storage_local_storage.node.d.ts +2 -1
- package/script/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.node.js +6 -3
- package/script/storage/2_storage_memory.d.ts +3 -2
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +5 -2
- package/script/storage/2_storage_session_storage.d.ts +3 -2
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +6 -3
- package/script/tl/0_utilities.d.ts +1 -0
- package/script/tl/0_utilities.d.ts.map +1 -1
- package/script/tl/0_utilities.js +21 -1
- package/script/tl/1_telegram_api.d.ts +810 -254
- package/script/tl/1_telegram_api.d.ts.map +1 -1
- package/script/tl/1_telegram_api.js +912 -213
- package/script/tl/1_tl_reader.d.ts +3 -3
- package/script/tl/1_tl_reader.d.ts.map +1 -1
- package/script/tl/1_tl_reader.js +8 -8
- package/script/tl/1_tl_writer.d.ts +3 -3
- package/script/tl/1_tl_writer.d.ts.map +1 -1
- package/script/tl/1_tl_writer.js +6 -6
- package/script/tl/1_utilities.d.ts +1 -1
- package/script/tl/1_utilities.d.ts.map +1 -1
- package/script/tl/1_utilities.js +2 -2
- package/script/tl/2_message.js +1 -1
- package/script/tl/2_mtproto.d.ts +2 -2
- package/script/tl/2_mtproto.d.ts.map +1 -1
- package/script/tl/2_telegram.d.ts +1 -1
- package/script/tl/2_telegram.d.ts.map +1 -1
- package/script/transport/0_obfuscation.d.ts +1 -1
- package/script/transport/0_obfuscation.d.ts.map +1 -1
- package/script/transport/0_obfuscation.js +2 -2
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/transport/1_transport_abridged.d.ts +1 -1
- package/script/transport/1_transport_abridged.d.ts.map +1 -1
- package/script/transport/1_transport_intermediate.d.ts +1 -1
- package/script/transport/1_transport_intermediate.d.ts.map +1 -1
- package/script/transport/1_transport_provider.d.ts +2 -2
- package/script/transport/1_transport_provider.d.ts.map +1 -1
- package/script/transport/2_transport_provider_tcp.d.ts +1 -1
- package/script/transport/2_transport_provider_tcp.d.ts.map +1 -1
- package/script/transport/2_transport_provider_web_socket.d.ts +1 -1
- package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -1
- package/script/transport/2_transport_provider_web_socket.js +1 -1
- package/script/types/0_birthday.d.ts +1 -1
- package/script/types/0_birthday.d.ts.map +1 -1
- package/script/types/0_callback_query_answer.d.ts +1 -1
- package/script/types/0_callback_query_answer.d.ts.map +1 -1
- package/script/types/0_callback_query_question.js +2 -2
- package/script/types/0_chat_administrator_rights.d.ts +1 -1
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_member_rights.d.ts +1 -1
- package/script/types/0_chat_member_rights.d.ts.map +1 -1
- package/script/types/0_contact.d.ts +1 -1
- package/script/types/0_contact.d.ts.map +1 -1
- package/script/types/0_dice.d.ts +1 -1
- package/script/types/0_dice.d.ts.map +1 -1
- package/script/types/0_failed_invitation.d.ts +1 -1
- package/script/types/0_failed_invitation.d.ts.map +1 -1
- package/script/types/0_file_source.d.ts +1 -1
- package/script/types/0_file_source.d.ts.map +1 -1
- package/script/types/0_invoice.d.ts +1 -1
- package/script/types/0_invoice.d.ts.map +1 -1
- package/script/types/0_live_stream_channel.d.ts +1 -1
- package/script/types/0_live_stream_channel.d.ts.map +1 -1
- package/script/types/0_mask_position.d.ts +1 -1
- package/script/types/0_mask_position.d.ts.map +1 -1
- package/script/types/0_mask_position.js +1 -1
- package/script/types/0_message_search_filter.d.ts +1 -1
- package/script/types/0_message_search_filter.d.ts.map +1 -1
- package/script/types/0_opening_hours.d.ts +1 -1
- package/script/types/0_opening_hours.d.ts.map +1 -1
- package/script/types/0_reaction.js +5 -5
- package/script/types/0_refunded_payment.d.ts +1 -1
- package/script/types/0_refunded_payment.d.ts.map +1 -1
- package/script/types/0_restriction_reason.d.ts +1 -1
- package/script/types/0_restriction_reason.d.ts.map +1 -1
- package/script/types/0_self_destruct_option.js +3 -3
- package/script/types/0_shipping_address.d.ts +1 -1
- package/script/types/0_shipping_address.d.ts.map +1 -1
- package/script/types/0_slow_mode_duration.js +2 -2
- package/script/types/0_voice.d.ts +1 -1
- package/script/types/0_voice.d.ts.map +1 -1
- package/script/types/0_voice_transcription.d.ts +1 -1
- package/script/types/0_voice_transcription.d.ts.map +1 -1
- package/script/types/1_animation.d.ts +1 -1
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_audio.d.ts +1 -1
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.d.ts +2 -2
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_chat_p.d.ts +12 -2
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +7 -2
- package/script/types/1_document.d.ts +1 -1
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_giveaway.d.ts +2 -2
- package/script/types/1_giveaway.d.ts.map +1 -1
- package/script/types/1_inline_keyboard_button.d.ts +3 -3
- package/script/types/1_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/1_inline_keyboard_button.js +4 -4
- package/script/types/1_inline_query_result_button.d.ts +1 -1
- package/script/types/1_inline_query_result_button.d.ts.map +1 -1
- package/script/types/1_input_story_content.d.ts +1 -1
- package/script/types/1_input_story_content.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +3 -3
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +1 -1
- package/script/types/1_message_reaction.d.ts +1 -1
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +2 -2
- package/script/types/1_mini_app_info.d.ts +2 -2
- package/script/types/1_mini_app_info.d.ts.map +1 -1
- package/script/types/1_network_statistics.d.ts +1 -1
- package/script/types/1_network_statistics.d.ts.map +1 -1
- package/script/types/1_order_info.d.ts +2 -2
- package/script/types/1_order_info.d.ts.map +1 -1
- package/script/types/1_photo.d.ts +1 -1
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_reaction_count.d.ts +2 -2
- package/script/types/1_reaction_count.d.ts.map +1 -1
- package/script/types/1_sticker.d.ts +3 -3
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +2 -2
- package/script/types/1_story_reaction.d.ts +2 -2
- package/script/types/1_story_reaction.d.ts.map +1 -1
- package/script/types/1_venue.d.ts +1 -1
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_video.d.ts +1 -1
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video_note.d.ts +1 -1
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/2_chat.d.ts +6 -9
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +10 -15
- package/script/types/2_inactive_chat.d.ts +1 -1
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_message_entity.d.ts +139 -0
- package/script/types/2_message_entity.d.ts.map +1 -0
- package/script/types/2_message_entity.js +188 -0
- package/script/types/2_message_interactions.d.ts +1 -1
- package/script/types/2_message_interactions.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.d.ts +4 -5
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reaction_count.js +4 -6
- package/script/types/2_poll_answer.d.ts +3 -4
- package/script/types/2_poll_answer.d.ts.map +1 -1
- package/script/types/2_poll_answer.js +4 -5
- package/script/types/2_reply_markup.d.ts +3 -3
- package/script/types/2_reply_markup.d.ts.map +1 -1
- 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 +2 -2
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_interactions.d.ts +2 -2
- package/script/types/2_story_interactions.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.d.ts +6 -6
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +2 -2
- 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 +2 -2
- package/script/types/2_successful_payment.d.ts.map +1 -1
- package/script/types/2_user.d.ts +65 -0
- package/script/types/2_user.d.ts.map +1 -0
- package/script/types/2_user.js +77 -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_member.d.ts +70 -0
- package/script/types/3_chat_member.d.ts.map +1 -0
- package/script/types/3_chat_member.js +117 -0
- package/script/types/3_chat_settings.d.ts +46 -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_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 +58 -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_gift_upgraded_component.d.ts +95 -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_media.d.ts +122 -0
- package/script/types/3_input_media.d.ts.map +1 -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_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 +34 -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 +8 -9
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/3_story.js +8 -9
- 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_gift.d.ts +94 -0
- package/script/types/4_gift.d.ts.map +1 -0
- package/script/types/4_gift.js +110 -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 +35 -0
- package/script/types/4_reply_to.d.ts.map +1 -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 +51 -0
- package/script/types/5_link_preview.d.ts +188 -0
- package/script/types/5_link_preview.d.ts.map +1 -0
- package/script/types/5_link_preview.js +221 -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 +616 -0
- package/script/types/6_message.d.ts.map +1 -0
- package/script/types/6_message.js +525 -0
- package/script/types/6_message_content.d.ts +119 -0
- package/script/types/6_message_content.d.ts.map +1 -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 +35 -0
- package/script/types/7_chat_list_item.d.ts.map +1 -0
- package/script/types/7_chat_list_item.js +94 -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_saved_chat.d.ts +35 -0
- package/script/types/7_saved_chat.d.ts.map +1 -0
- package/script/types/7_saved_chat.js +46 -0
- package/script/types/7_topic.d.ts +34 -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 +528 -0
- package/script/types/8_update.d.ts.map +1 -0
- package/script/types/_file_id.d.ts +61 -50
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +155 -136
- package/script/types/_getters.d.ts +3 -10
- package/script/types/_getters.d.ts.map +1 -1
- package/script/utilities/0_bigint.js +5 -5
- package/script/utilities/0_buffer.js +3 -3
- package/script/utilities/0_env.js +1 -1
- package/script/utilities/0_hash.d.ts +2 -2
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_misc.d.ts +1 -0
- package/script/utilities/0_misc.d.ts.map +1 -1
- package/script/utilities/0_misc.js +18 -3
- package/script/utilities/0_part_stream.d.ts +1 -1
- package/script/utilities/0_part_stream.d.ts.map +1 -1
- package/script/utilities/0_rle.js +1 -1
- package/script/utilities/1_auth.js +1 -1
- package/script/utilities/1_base64.js +1 -1
- package/script/utilities/1_logger.js +2 -2
- package/script/utilities/1_math.js +2 -2
- package/script/utilities/2_queue.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/abortable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/deadline.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/debounce.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/delay.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/delay.js +0 -65
- package/esm/deps/jsr.io/@std/async/1.0.13/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/pool.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/retry.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/async/1.0.13/tee.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/strip_trailing_separators.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_common/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/_os.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/basename.js +0 -35
- package/esm/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/extname.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.0/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/is_absolute.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/join.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/posix/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/to_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.1.0/windows/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +0 -1
- 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/1_input_media.d.ts +0 -122
- package/esm/types/1_input_media.d.ts.map +0 -1
- package/esm/types/1_poll_option.d.ts +0 -34
- package/esm/types/1_poll_option.d.ts.map +0 -1
- package/esm/types/1_poll_option.js +0 -29
- 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 -61
- package/esm/types/1_user.d.ts.map +0 -1
- package/esm/types/1_user.js +0 -49
- 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 -29
- package/esm/types/2_chat_member.d.ts +0 -68
- package/esm/types/2_chat_member.d.ts.map +0 -1
- package/esm/types/2_chat_member.js +0 -114
- package/esm/types/2_chat_settings.d.ts +0 -46
- package/esm/types/2_chat_settings.d.ts.map +0 -1
- package/esm/types/2_chat_settings.js +0 -51
- 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 -59
- package/esm/types/2_forward_header.d.ts.map +0 -1
- package/esm/types/2_forward_header.js +0 -74
- package/esm/types/2_game.d.ts +0 -40
- package/esm/types/2_game.d.ts.map +0 -1
- package/esm/types/2_gift_upgraded_component.d.ts +0 -95
- package/esm/types/2_gift_upgraded_component.d.ts.map +0 -1
- package/esm/types/2_gift_upgraded_component.js +0 -88
- 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/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_gift.d.ts +0 -94
- package/esm/types/3_gift.d.ts.map +0 -1
- package/esm/types/3_gift.js +0 -105
- package/esm/types/3_join_request.d.ts +0 -40
- package/esm/types/3_join_request.d.ts.map +0 -1
- package/esm/types/3_join_request.js +0 -63
- package/esm/types/4_claimed_gift.d.ts +0 -45
- package/esm/types/4_claimed_gift.d.ts.map +0 -1
- package/esm/types/4_claimed_gift.js +0 -48
- package/esm/types/4_link_preview.d.ts +0 -188
- package/esm/types/4_link_preview.d.ts.map +0 -1
- package/esm/types/4_link_preview.js +0 -218
- package/esm/types/5_claimed_gifts.d.ts +0 -33
- package/esm/types/5_claimed_gifts.d.ts.map +0 -1
- package/esm/types/5_claimed_gifts.js +0 -43
- package/esm/types/5_message.d.ts +0 -617
- package/esm/types/5_message.d.ts.map +0 -1
- package/esm/types/5_message.js +0 -545
- package/esm/types/5_message_content.d.ts +0 -119
- package/esm/types/5_message_content.d.ts.map +0 -1
- package/esm/types/6_callback_query.d.ts +0 -43
- package/esm/types/6_callback_query.d.ts.map +0 -1
- package/esm/types/6_callback_query.js +0 -59
- package/esm/types/6_chat_list_item.d.ts +0 -36
- package/esm/types/6_chat_list_item.d.ts.map +0 -1
- package/esm/types/6_chat_list_item.js +0 -87
- package/esm/types/6_inline_query_result.d.ts +0 -251
- package/esm/types/6_inline_query_result.d.ts.map +0 -1
- package/esm/types/6_inline_query_result.js +0 -380
- package/esm/types/6_topic.d.ts +0 -34
- package/esm/types/6_topic.d.ts.map +0 -1
- package/esm/types/6_topic.js +0 -61
- package/esm/types/7_inline_query_answer.d.ts +0 -32
- package/esm/types/7_inline_query_answer.d.ts.map +0 -1
- package/esm/types/7_inline_query_answer.js +0 -28
- package/esm/types/7_update.d.ts +0 -509
- package/esm/types/7_update.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/abortable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/deadline.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/debounce.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/delay.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/delay.js +0 -101
- package/script/deps/jsr.io/@std/async/1.0.13/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/pool.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/retry.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/async/1.0.13/tee.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/strip_trailing_separators.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_common/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts +0 -2
- package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/_os.js +0 -45
- package/script/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/basename.js +0 -38
- package/script/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/extname.js +0 -31
- package/script/deps/jsr.io/@std/path/1.1.0/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/is_absolute.js +0 -31
- package/script/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/join.js +0 -32
- package/script/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/posix/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/to_file_url.js +0 -31
- package/script/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/is_absolute.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/path/1.1.0/windows/to_file_url.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +0 -1
- 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/1_input_media.d.ts +0 -122
- package/script/types/1_input_media.d.ts.map +0 -1
- package/script/types/1_poll_option.d.ts +0 -34
- package/script/types/1_poll_option.d.ts.map +0 -1
- package/script/types/1_poll_option.js +0 -32
- 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 -61
- package/script/types/1_user.d.ts.map +0 -1
- package/script/types/1_user.js +0 -52
- 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 -32
- package/script/types/2_chat_member.d.ts +0 -68
- package/script/types/2_chat_member.d.ts.map +0 -1
- package/script/types/2_chat_member.js +0 -117
- package/script/types/2_chat_settings.d.ts +0 -46
- package/script/types/2_chat_settings.d.ts.map +0 -1
- package/script/types/2_chat_settings.js +0 -54
- 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 -59
- package/script/types/2_forward_header.d.ts.map +0 -1
- package/script/types/2_forward_header.js +0 -77
- package/script/types/2_game.d.ts +0 -40
- package/script/types/2_game.d.ts.map +0 -1
- package/script/types/2_gift_upgraded_component.d.ts +0 -95
- package/script/types/2_gift_upgraded_component.d.ts.map +0 -1
- package/script/types/2_gift_upgraded_component.js +0 -91
- 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/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_gift.d.ts +0 -94
- package/script/types/3_gift.d.ts.map +0 -1
- package/script/types/3_gift.js +0 -110
- package/script/types/3_join_request.d.ts +0 -40
- package/script/types/3_join_request.d.ts.map +0 -1
- package/script/types/3_join_request.js +0 -67
- package/script/types/4_claimed_gift.d.ts +0 -45
- package/script/types/4_claimed_gift.d.ts.map +0 -1
- package/script/types/4_claimed_gift.js +0 -51
- package/script/types/4_link_preview.d.ts +0 -188
- package/script/types/4_link_preview.d.ts.map +0 -1
- package/script/types/4_link_preview.js +0 -221
- package/script/types/5_claimed_gifts.d.ts +0 -33
- package/script/types/5_claimed_gifts.d.ts.map +0 -1
- package/script/types/5_claimed_gifts.js +0 -46
- package/script/types/5_message.d.ts +0 -617
- package/script/types/5_message.d.ts.map +0 -1
- package/script/types/5_message.js +0 -550
- package/script/types/5_message_content.d.ts +0 -119
- package/script/types/5_message_content.d.ts.map +0 -1
- package/script/types/6_callback_query.d.ts +0 -43
- package/script/types/6_callback_query.d.ts.map +0 -1
- package/script/types/6_callback_query.js +0 -63
- package/script/types/6_chat_list_item.d.ts +0 -36
- package/script/types/6_chat_list_item.d.ts.map +0 -1
- package/script/types/6_chat_list_item.js +0 -94
- package/script/types/6_inline_query_result.d.ts +0 -251
- package/script/types/6_inline_query_result.d.ts.map +0 -1
- package/script/types/6_inline_query_result.js +0 -384
- package/script/types/6_topic.d.ts +0 -34
- package/script/types/6_topic.d.ts.map +0 -1
- package/script/types/6_topic.js +0 -64
- package/script/types/7_inline_query_answer.d.ts +0 -32
- package/script/types/7_inline_query_answer.d.ts.map +0 -1
- package/script/types/7_inline_query_answer.js +0 -31
- package/script/types/7_update.d.ts +0 -509
- package/script/types/7_update.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.js +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.js +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.js +0 -0
- /package/esm/types/{2_game.js → 3_game.js} +0 -0
- /package/esm/types/{1_input_media.js → 3_input_media.js} +0 -0
- /package/esm/types/{2_reply_to.js → 4_reply_to.js} +0 -0
- /package/esm/types/{5_message_content.js → 6_message_content.js} +0 -0
- /package/esm/types/{7_update.js → 8_update.js} +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.js +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts +0 -0
- /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.js +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.js +0 -0
- /package/script/types/{2_game.js → 3_game.js} +0 -0
- /package/script/types/{1_input_media.js → 3_input_media.js} +0 -0
- /package/script/types/{2_reply_to.js → 4_reply_to.js} +0 -0
- /package/script/types/{5_message_content.js → 6_message_content.js} +0 -0
- /package/script/types/{7_update.js → 8_update.js} +0 -0
|
@@ -17,26 +17,21 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
20
|
+
import { MINUTE } from "../0_deps.js";
|
|
21
|
+
import { LruCache, unreachable } from "../0_deps.js";
|
|
21
22
|
import { InputError } from "../0_errors.js";
|
|
22
|
-
import { base64DecodeUrlSafe, base64EncodeUrlSafe, bigIntFromBuffer, rleDecode, rleEncode, sha1, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
23
|
+
import { base64DecodeUrlSafe, base64EncodeUrlSafe, bigIntFromBuffer, getLogger, rleDecode, rleEncode, sha1, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
24
|
+
import { awaitablePooledMap } from "../1_utilities.js";
|
|
25
|
+
import { fromString, toString } from "../2_storage.js";
|
|
23
26
|
import { Api, TLReader, TLWriter, X } from "../2_tl.js";
|
|
24
|
-
|
|
27
|
+
import { constructChatP } from "../3_types.js";
|
|
25
28
|
export const K = {
|
|
26
|
-
connection: {
|
|
27
|
-
P: (string) => `connection.${string}`,
|
|
28
|
-
apiId: () => [K.connection.P("apiId")],
|
|
29
|
-
},
|
|
30
29
|
session: {
|
|
31
30
|
P: (string) => `session.${string}`,
|
|
32
31
|
serverSalt: () => [K.session.P("serverSalt")],
|
|
33
32
|
},
|
|
34
33
|
auth: {
|
|
35
34
|
P: (string) => `auth.${string}`,
|
|
36
|
-
dc: () => [K.auth.P("dc")],
|
|
37
|
-
key: () => [K.auth.P("key")],
|
|
38
|
-
accountId: () => [K.auth.P("accountId")],
|
|
39
|
-
accountType: () => [K.auth.P("accountType")],
|
|
40
35
|
isPremium: () => [K.auth.P("isPremium")],
|
|
41
36
|
},
|
|
42
37
|
updates: {
|
|
@@ -45,14 +40,9 @@ export const K = {
|
|
|
45
40
|
all: () => [K.updates.P("updates")],
|
|
46
41
|
updates: (boxId) => [...K.updates.all(), boxId],
|
|
47
42
|
update: (boxId, id) => [...K.updates.updates(boxId), id],
|
|
48
|
-
channelPts: (channelId) => [K.updates.P("channelPts"), channelId],
|
|
49
43
|
},
|
|
50
44
|
cache: {
|
|
51
45
|
P: (string) => `cache.${string}`,
|
|
52
|
-
usernames: () => [K.cache.P("username")],
|
|
53
|
-
username: (v) => [...K.cache.usernames(), v],
|
|
54
|
-
peers: () => [K.cache.P("peer")],
|
|
55
|
-
peer: (id) => [...K.cache.peers(), id],
|
|
56
46
|
stickerSetNames: () => [K.cache.P("stickerSetNames")],
|
|
57
47
|
stickerSetName: (id, accessHash) => [...K.cache.stickerSetNames(), id, accessHash],
|
|
58
48
|
files: () => [K.cache.P("files")],
|
|
@@ -73,12 +63,6 @@ export const K = {
|
|
|
73
63
|
groupCall: (id) => [...K.cache.groupCalls(), id],
|
|
74
64
|
groupCallAccessHashes: () => [K.cache.P("groupCallAccessHashes")],
|
|
75
65
|
groupCallAccessHash: (id) => [...K.cache.groupCallAccessHashes(), id],
|
|
76
|
-
minPeerReferences: () => [K.cache.P("minPeerReferences")],
|
|
77
|
-
minPeerReference: (senderId, chatId) => [...K.cache.minPeerReferences(), senderId, chatId],
|
|
78
|
-
minPeerReferenceSender: (senderId) => [...K.cache.minPeerReferences(), senderId],
|
|
79
|
-
allTranslations: () => [K.cache.P("translations")],
|
|
80
|
-
platformTranslations: (platform) => [...K.cache.allTranslations(), platform],
|
|
81
|
-
translations: (platform, language) => [...K.cache.platformTranslations(platform), language],
|
|
82
66
|
pollResults: () => [K.cache.P("pollResults")],
|
|
83
67
|
pollResult: (pollId) => [...K.cache.pollResults(), pollId],
|
|
84
68
|
polls: () => [K.cache.P("polls")],
|
|
@@ -95,23 +79,37 @@ export const K = {
|
|
|
95
79
|
allMessageRefs: () => [K.messages.P("messageRefs")],
|
|
96
80
|
messageRef: (messageId) => [...K.messages.allMessageRefs(), messageId],
|
|
97
81
|
},
|
|
98
|
-
chatlists: {
|
|
99
|
-
P: (string) => `chatlists.${string}`,
|
|
100
|
-
hasAllChats: (listId) => [K.chatlists.P("hasAllChats"), listId],
|
|
101
|
-
chats: (listId) => [K.chatlists.P("chats"), listId],
|
|
102
|
-
chat: (listId, chatId) => [...K.chatlists.chats(listId), chatId],
|
|
103
|
-
pinnedChats: (listId) => [K.chatlists.P("pinnedChats"), listId],
|
|
104
|
-
},
|
|
105
82
|
};
|
|
106
83
|
export class StorageOperations {
|
|
107
84
|
#storage;
|
|
108
85
|
#supportsFiles;
|
|
109
86
|
#mustSerialize;
|
|
110
|
-
#
|
|
87
|
+
#L;
|
|
88
|
+
#maps = new Array();
|
|
89
|
+
#values = new Array();
|
|
90
|
+
auth;
|
|
91
|
+
channelPts;
|
|
92
|
+
peers;
|
|
93
|
+
usernames;
|
|
94
|
+
translations;
|
|
111
95
|
constructor(storage) {
|
|
112
96
|
this.#storage = storage;
|
|
113
97
|
this.#supportsFiles = storage.supportsFiles;
|
|
114
98
|
this.#mustSerialize = storage.mustSerialize;
|
|
99
|
+
this.#L = getLogger("StorageOperations");
|
|
100
|
+
this.auth = this.#addValue(new StorageAuth(storage));
|
|
101
|
+
this.channelPts = this.#addMap(new StorageMap(storage, "channelPts"));
|
|
102
|
+
this.peers = this.#addMap(new StorageMap(storage, "peers"));
|
|
103
|
+
this.usernames = this.#addMap(new StorageMap(storage, "usernames"));
|
|
104
|
+
this.translations = this.#addMap(new StorageMap(storage, "translations"));
|
|
105
|
+
}
|
|
106
|
+
#addMap(map) {
|
|
107
|
+
this.#maps.push(map);
|
|
108
|
+
return map;
|
|
109
|
+
}
|
|
110
|
+
#addValue(value) {
|
|
111
|
+
this.#values.push(value);
|
|
112
|
+
return value;
|
|
115
113
|
}
|
|
116
114
|
get provider() {
|
|
117
115
|
return this.#storage;
|
|
@@ -121,7 +119,7 @@ export class StorageOperations {
|
|
|
121
119
|
}
|
|
122
120
|
async initialize() {
|
|
123
121
|
await this.#storage.initialize();
|
|
124
|
-
await this.
|
|
122
|
+
await this.auth.get();
|
|
125
123
|
}
|
|
126
124
|
set(...args) {
|
|
127
125
|
return this.#storage.set(...args);
|
|
@@ -132,49 +130,20 @@ export class StorageOperations {
|
|
|
132
130
|
get(...args) {
|
|
133
131
|
return this.#storage.get(...args);
|
|
134
132
|
}
|
|
135
|
-
getMany(...args) {
|
|
136
|
-
return this.#storage.getMany(...args);
|
|
137
|
-
}
|
|
138
|
-
async setDc(dc) {
|
|
139
|
-
await this.#storage.set(K.auth.dc(), dc);
|
|
140
|
-
}
|
|
141
|
-
getDc() {
|
|
142
|
-
return this.#storage.get(K.auth.dc());
|
|
143
|
-
}
|
|
144
|
-
async #resetAuthKeyId(authKey) {
|
|
145
|
-
if (authKey != null) {
|
|
146
|
-
this.#authKeyId = bigIntFromBuffer((await sha1(authKey)).subarray(-8), true, false);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
this.#authKeyId = null;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
async getAuthKey() {
|
|
153
|
-
const authKey = await this.#storage.get(K.auth.key());
|
|
154
|
-
await this.#resetAuthKeyId(authKey);
|
|
155
|
-
return authKey;
|
|
156
|
-
}
|
|
157
|
-
async setAuthKey(authKey) {
|
|
158
|
-
await this.#storage.set(K.auth.key(), authKey);
|
|
159
|
-
await this.#resetAuthKeyId(authKey);
|
|
160
|
-
}
|
|
161
|
-
get authKeyId() {
|
|
162
|
-
return this.#authKeyId;
|
|
163
|
-
}
|
|
164
133
|
async exportAuthString(apiId_) {
|
|
165
134
|
if (typeof apiId_ === "number") {
|
|
166
|
-
await this.
|
|
135
|
+
await this.auth.update((v) => v.apiId = apiId_);
|
|
167
136
|
}
|
|
168
|
-
const
|
|
169
|
-
if (dc
|
|
137
|
+
const auth = this.auth.mustGet();
|
|
138
|
+
if (auth.dc === null || auth.authKey === null || auth.apiId === 0 || auth.userId === 0) {
|
|
170
139
|
throw new Error("Not authorized");
|
|
171
140
|
}
|
|
172
141
|
const writer = new TLWriter();
|
|
173
|
-
writer.writeString(dc);
|
|
174
|
-
writer.writeBytes(authKey);
|
|
175
|
-
writer.writeInt32(apiId);
|
|
176
|
-
writer.write(new Uint8Array([
|
|
177
|
-
writer.writeInt64(BigInt(
|
|
142
|
+
writer.writeString(auth.dc);
|
|
143
|
+
writer.writeBytes(auth.authKey);
|
|
144
|
+
writer.writeInt32(auth.apiId);
|
|
145
|
+
writer.write(new Uint8Array([auth.isBot ? 1 : 0]));
|
|
146
|
+
writer.writeInt64(BigInt(auth.userId));
|
|
178
147
|
const data = rleEncode(writer.buffer);
|
|
179
148
|
return base64EncodeUrlSafe(data);
|
|
180
149
|
}
|
|
@@ -184,56 +153,58 @@ export class StorageOperations {
|
|
|
184
153
|
const dc = reader.readString();
|
|
185
154
|
const authKey = reader.readBytes();
|
|
186
155
|
const apiId = reader.readInt32();
|
|
187
|
-
const isBot = reader.read(1)[0];
|
|
188
|
-
const
|
|
189
|
-
await this.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (Api.is("channel", channel) && channel.min) {
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
return typeof channel.access_hash === "bigint" ? channel.access_hash : null;
|
|
156
|
+
const isBot = !!reader.read(1)[0];
|
|
157
|
+
const userId = Number(reader.readInt64());
|
|
158
|
+
await this.auth.set({
|
|
159
|
+
apiId,
|
|
160
|
+
authKey,
|
|
161
|
+
dc,
|
|
162
|
+
isBot,
|
|
163
|
+
userId,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
#lastCommit = null;
|
|
167
|
+
async commit(force = false) {
|
|
168
|
+
if (this.#storage.isMemory) {
|
|
169
|
+
return;
|
|
205
170
|
}
|
|
206
|
-
|
|
207
|
-
|
|
171
|
+
const pending = this.#values.filter((v) => v.isUpdatePending).length + this.#maps.filter((v) => v.pendingUpdateCount > 0).length;
|
|
172
|
+
if (pending <= 0) {
|
|
173
|
+
this.#L.debug("nothing to commit");
|
|
174
|
+
return;
|
|
208
175
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if (!Api.is("user", user)) {
|
|
214
|
-
unreachable();
|
|
215
|
-
}
|
|
216
|
-
if (user.min) {
|
|
217
|
-
return null;
|
|
218
|
-
}
|
|
219
|
-
return typeof user.access_hash === "bigint" ? user.access_hash : null;
|
|
176
|
+
let commit = false;
|
|
177
|
+
if (force) {
|
|
178
|
+
this.#L.debug("committing because force = true");
|
|
179
|
+
commit = true;
|
|
220
180
|
}
|
|
221
181
|
else {
|
|
222
|
-
|
|
182
|
+
if (!commit && pending >= 1_000) {
|
|
183
|
+
this.#L.debug("committing because pending writes >= threshold");
|
|
184
|
+
commit = true;
|
|
185
|
+
}
|
|
186
|
+
else if (this.#lastCommit === null) {
|
|
187
|
+
this.#L.debug("committing because there is no last commit");
|
|
188
|
+
commit = true;
|
|
189
|
+
}
|
|
190
|
+
else if (Date.now() - this.#lastCommit.getTime() >= 5 * MINUTE) {
|
|
191
|
+
this.#L.debug("committing because last commit is older than threshold");
|
|
192
|
+
commit = true;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.#L.debug("not committing");
|
|
196
|
+
}
|
|
223
197
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
198
|
+
if (commit) {
|
|
199
|
+
const values = this.#values.filter((v) => v.isUpdatePending).map((v) => v.commit());
|
|
200
|
+
const maps = this.#maps.filter((v) => v.pendingUpdateCount > 0).map((v) => v.commit());
|
|
201
|
+
await Promise.all(values.concat(maps));
|
|
202
|
+
this.#L.debug("committed", values.length, "value(s) and", maps.length, "map(s)");
|
|
203
|
+
this.#lastCommit = new Date();
|
|
229
204
|
}
|
|
230
205
|
}
|
|
231
|
-
async getUsername(username) {
|
|
232
|
-
username = username.toLowerCase();
|
|
233
|
-
return await this.#storage.get(K.cache.username(username));
|
|
234
|
-
}
|
|
235
206
|
async setTlObject(key, value) {
|
|
236
|
-
if (value
|
|
207
|
+
if (value === null) {
|
|
237
208
|
await this.#storage.set(key, null);
|
|
238
209
|
}
|
|
239
210
|
else {
|
|
@@ -243,7 +214,7 @@ export class StorageOperations {
|
|
|
243
214
|
async getTlObject(keyOrBuffer) {
|
|
244
215
|
// @ts-ignore: TBD
|
|
245
216
|
const buffer = (keyOrBuffer instanceof Uint8Array || Api.isValidObject(keyOrBuffer)) ? keyOrBuffer : await this.#storage.get(keyOrBuffer);
|
|
246
|
-
if (buffer
|
|
217
|
+
if (buffer !== null) {
|
|
247
218
|
if (buffer instanceof Uint8Array) {
|
|
248
219
|
return await Api.deserializeType(X, rleDecode(buffer));
|
|
249
220
|
}
|
|
@@ -266,14 +237,14 @@ export class StorageOperations {
|
|
|
266
237
|
}
|
|
267
238
|
async setMessage(chatId, messageId, message) {
|
|
268
239
|
if (chatId > ZERO_CHANNEL_ID) {
|
|
269
|
-
await this.#storage.set(K.messages.messageRef(messageId), message
|
|
240
|
+
await this.#storage.set(K.messages.messageRef(messageId), message === null ? null : chatId);
|
|
270
241
|
}
|
|
271
242
|
await this.setTlObject(K.messages.message(chatId, messageId), message);
|
|
272
243
|
}
|
|
273
244
|
async deleteMessages() {
|
|
274
245
|
const maybePromises = new Array();
|
|
275
246
|
for await (const [k, o] of await this.#storage.getMany({ prefix: K.messages.allMessageRefs() })) {
|
|
276
|
-
maybePromises.push(Promise.all([this.#storage.set(k, null), o
|
|
247
|
+
maybePromises.push(Promise.all([this.#storage.set(k, null), o === null ? Promise.resolve() : this.#storage.set(K.messages.message(o, k[1]), null)]));
|
|
277
248
|
}
|
|
278
249
|
await Promise.all(maybePromises.filter((v) => v instanceof Promise));
|
|
279
250
|
}
|
|
@@ -283,61 +254,21 @@ export class StorageOperations {
|
|
|
283
254
|
async getMessage(chatId, messageId) {
|
|
284
255
|
return await this.getTlObject(K.messages.message(chatId, messageId));
|
|
285
256
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
return null;
|
|
291
|
-
}
|
|
292
|
-
async setChannelPts(channelId, pts) {
|
|
293
|
-
await this.#storage.set(K.updates.channelPts(channelId), pts);
|
|
294
|
-
}
|
|
295
|
-
getChannelPts(channelId) {
|
|
296
|
-
return this.#storage.get(K.updates.channelPts(channelId));
|
|
297
|
-
}
|
|
298
|
-
async setEntity(entity) {
|
|
299
|
-
await this.#storage.set(K.cache.peer(Api.peerToChatId(entity)), [this.#mustSerialize ? rleEncode(Api.serializeObject(entity)) : entity, new Date()]);
|
|
300
|
-
}
|
|
301
|
-
async getEntity(key) {
|
|
302
|
-
const peer_ = await this.#storage.get(K.cache.peer(key));
|
|
303
|
-
if (peer_ != null) {
|
|
304
|
-
const [obj_] = peer_;
|
|
305
|
-
return await this.getTlObject(obj_);
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
return null;
|
|
309
|
-
}
|
|
257
|
+
setPeer(peer_) {
|
|
258
|
+
const chatP = constructChatP(peer_);
|
|
259
|
+
this.setPeer2(chatP, "access_hash" in peer_ ? peer_.access_hash ?? 0n : 0n);
|
|
310
260
|
}
|
|
311
|
-
|
|
312
|
-
|
|
261
|
+
setPeer2(chatP, accessHash) {
|
|
262
|
+
this.peers.set([chatP.id], [chatP, accessHash]);
|
|
313
263
|
}
|
|
314
264
|
#accountId = null;
|
|
315
265
|
async getAccountId() {
|
|
316
|
-
if (this.#accountId
|
|
266
|
+
if (this.#accountId !== null) {
|
|
317
267
|
return this.#accountId;
|
|
318
268
|
}
|
|
319
269
|
else {
|
|
320
|
-
return
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
async setAccountType(type) {
|
|
324
|
-
await this.#storage.set(K.auth.accountType(), type);
|
|
325
|
-
await this.getAccountType();
|
|
326
|
-
}
|
|
327
|
-
#accountType = null;
|
|
328
|
-
async getAccountType() {
|
|
329
|
-
if (this.#accountType != null) {
|
|
330
|
-
return this.#accountType;
|
|
331
|
-
}
|
|
332
|
-
else {
|
|
333
|
-
return this.#accountType = await this.#storage.get(K.auth.accountType());
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
get accountType() {
|
|
337
|
-
if (this.#accountType == null) {
|
|
338
|
-
unreachable();
|
|
270
|
+
return this.#accountId = (await this.auth.get())?.userId ?? null;
|
|
339
271
|
}
|
|
340
|
-
return this.#accountType;
|
|
341
272
|
}
|
|
342
273
|
async setIsPremium(isPremium) {
|
|
343
274
|
await this.#storage.set(K.auth.isPremium(), isPremium);
|
|
@@ -357,48 +288,15 @@ export class StorageOperations {
|
|
|
357
288
|
getServerSalt() {
|
|
358
289
|
return this.#storage.get(K.session.serverSalt());
|
|
359
290
|
}
|
|
360
|
-
async setChat(listId, chatId, pinned, topMessageId, topMessageDate) {
|
|
361
|
-
await this.#storage.set(K.chatlists.chat(listId, chatId), [pinned, topMessageId, topMessageDate]);
|
|
362
|
-
}
|
|
363
|
-
async getChats(listId) {
|
|
364
|
-
const chats = new Array();
|
|
365
|
-
for await (const [key, value] of await this.#storage.getMany({ prefix: K.chatlists.chats(listId) })) {
|
|
366
|
-
if (key.length != 3 || typeof key[2] !== "number") {
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
chats.push({ chatId: key[2], pinned: value[0], topMessageId: value[1], topMessageDate: value[2] });
|
|
370
|
-
}
|
|
371
|
-
return chats;
|
|
372
|
-
}
|
|
373
|
-
async removeChats(listId) {
|
|
374
|
-
for await (const [key] of await this.#storage.getMany({ prefix: K.chatlists.chats(listId) })) {
|
|
375
|
-
await this.#storage.set(key, null);
|
|
376
|
-
}
|
|
377
|
-
await this.setHasAllChats(listId, false);
|
|
378
|
-
await this.setPinnedChats(listId, null);
|
|
379
|
-
}
|
|
380
|
-
async setHasAllChats(listId, hasAllChats) {
|
|
381
|
-
await this.#storage.set(K.chatlists.hasAllChats(listId), hasAllChats);
|
|
382
|
-
}
|
|
383
|
-
async hasAllChats(listId) {
|
|
384
|
-
const v = await this.#storage.get(K.chatlists.hasAllChats(listId));
|
|
385
|
-
return v == true;
|
|
386
|
-
}
|
|
387
|
-
async setPinnedChats(listId, chatIds) {
|
|
388
|
-
await this.#storage.set(K.chatlists.pinnedChats(listId), chatIds);
|
|
389
|
-
}
|
|
390
|
-
async getPinnedChats(listId) {
|
|
391
|
-
return await this.#storage.get(K.chatlists.pinnedChats(listId));
|
|
392
|
-
}
|
|
393
291
|
async getHistory(chatId, offsetId, limit) {
|
|
394
|
-
if (offsetId
|
|
292
|
+
if (offsetId === 0) {
|
|
395
293
|
offsetId = Infinity;
|
|
396
294
|
}
|
|
397
295
|
++limit;
|
|
398
296
|
const messages = new Array();
|
|
399
297
|
for await (const [_, buffer] of await this.#storage.getMany({ start: K.messages.message(chatId, 0), end: K.messages.message(chatId, offsetId) }, { limit, reverse: true })) {
|
|
400
298
|
const message = await this.getTlObject(buffer);
|
|
401
|
-
if ("id" in message && message.id
|
|
299
|
+
if ("id" in message && message.id === offsetId) {
|
|
402
300
|
continue;
|
|
403
301
|
}
|
|
404
302
|
messages.push(message);
|
|
@@ -418,7 +316,7 @@ export class StorageOperations {
|
|
|
418
316
|
for (let i = offset; i < partCount; i++) {
|
|
419
317
|
signal?.throwIfAborted();
|
|
420
318
|
const part = await this.#storage.get(K.cache.filePart(id, i));
|
|
421
|
-
if (part
|
|
319
|
+
if (part === null) {
|
|
422
320
|
continue;
|
|
423
321
|
}
|
|
424
322
|
yield part;
|
|
@@ -441,7 +339,7 @@ export class StorageOperations {
|
|
|
441
339
|
}
|
|
442
340
|
async getCustomEmojiDocument(id) {
|
|
443
341
|
const v = await this.#storage.get(K.cache.customEmojiDocument(id));
|
|
444
|
-
if (v
|
|
342
|
+
if (v !== null) {
|
|
445
343
|
return [await this.getTlObject(v[0]), v[1]];
|
|
446
344
|
}
|
|
447
345
|
else {
|
|
@@ -449,11 +347,11 @@ export class StorageOperations {
|
|
|
449
347
|
}
|
|
450
348
|
}
|
|
451
349
|
async setBusinessConnection(id, connection) {
|
|
452
|
-
await this.#storage.set(K.cache.businessConnection(id), connection
|
|
350
|
+
await this.#storage.set(K.cache.businessConnection(id), connection === null ? null : this.#mustSerialize ? rleEncode(Api.serializeObject(connection)) : connection);
|
|
453
351
|
}
|
|
454
352
|
async getBusinessConnection(id) {
|
|
455
353
|
const v = await this.#storage.get(K.cache.businessConnection(id));
|
|
456
|
-
if (v
|
|
354
|
+
if (v !== null) {
|
|
457
355
|
return await this.getTlObject(v);
|
|
458
356
|
}
|
|
459
357
|
else {
|
|
@@ -465,7 +363,7 @@ export class StorageOperations {
|
|
|
465
363
|
}
|
|
466
364
|
async getInlineQueryAnswer(userId, chatId, query, offset) {
|
|
467
365
|
const peer_ = await this.#storage.get(K.cache.inlineQueryAnswer(userId, chatId, query, offset));
|
|
468
|
-
if (peer_
|
|
366
|
+
if (peer_ !== null) {
|
|
469
367
|
const [obj_, date] = peer_;
|
|
470
368
|
return [Api.as("messages.botResults", await this.getTlObject(obj_)), date];
|
|
471
369
|
}
|
|
@@ -478,7 +376,7 @@ export class StorageOperations {
|
|
|
478
376
|
}
|
|
479
377
|
async getCallbackQueryAnswer(chatId, messageId, question) {
|
|
480
378
|
const peer_ = await this.#storage.get(K.cache.callbackQueryAnswer(chatId, messageId, question));
|
|
481
|
-
if (peer_
|
|
379
|
+
if (peer_ !== null) {
|
|
482
380
|
const [obj_, date] = peer_;
|
|
483
381
|
return [Api.as("messages.botCallbackAnswer", await this.getTlObject(obj_)), date];
|
|
484
382
|
}
|
|
@@ -531,15 +429,38 @@ export class StorageOperations {
|
|
|
531
429
|
return null;
|
|
532
430
|
}
|
|
533
431
|
assertUser(source) {
|
|
534
|
-
if (this.
|
|
432
|
+
if (this.auth.mustGet().isBot) {
|
|
535
433
|
throw new InputError(`${source}: not user a client`);
|
|
536
434
|
}
|
|
537
435
|
}
|
|
538
436
|
assertBot(source) {
|
|
539
|
-
if (this.
|
|
437
|
+
if (!this.auth.mustGet().isBot) {
|
|
540
438
|
throw new InputError(`${source}: not a bot client`);
|
|
541
439
|
}
|
|
542
440
|
}
|
|
441
|
+
get isBot() {
|
|
442
|
+
return this.auth.mustGet().isBot;
|
|
443
|
+
}
|
|
444
|
+
async getChannelAccessHash(id) {
|
|
445
|
+
const peer = await this.peers.get([id]);
|
|
446
|
+
if (peer?.[0].type === "channel" || peer?.[0].type === "supergroup") {
|
|
447
|
+
return peer[1];
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
// TODO: get min peer reference
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
async getUserAccessHash(id) {
|
|
455
|
+
const peer = await this.peers.get([id]);
|
|
456
|
+
if (peer?.[0].type === "private") {
|
|
457
|
+
return peer[1];
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
// TODO: get min peer reference
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
543
464
|
async deleteFiles() {
|
|
544
465
|
if (!this.#supportsFiles) {
|
|
545
466
|
return;
|
|
@@ -586,21 +507,9 @@ export class StorageOperations {
|
|
|
586
507
|
await this.#storage.set(key, null);
|
|
587
508
|
}
|
|
588
509
|
}
|
|
589
|
-
async deletePeers() {
|
|
590
|
-
for await (const [key] of await this.#storage.getMany({ prefix: K.cache.peers() })) {
|
|
591
|
-
await this.#storage.set(key, null);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
async deleteUsernames() {
|
|
595
|
-
for await (const [key] of await this.#storage.getMany({ prefix: K.cache.usernames() })) {
|
|
596
|
-
await this.#storage.set(key, null);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
510
|
async clear() {
|
|
600
511
|
await Promise.all([
|
|
601
512
|
this.deleteMessages(),
|
|
602
|
-
this.removeChats(0),
|
|
603
|
-
this.removeChats(1),
|
|
604
513
|
this.deleteUpdates(),
|
|
605
514
|
this.deleteFiles(),
|
|
606
515
|
this.deleteCustomEmojiDocuments(),
|
|
@@ -610,49 +519,20 @@ export class StorageOperations {
|
|
|
610
519
|
this.deleteFullChats(),
|
|
611
520
|
this.deleteGroupCalls(),
|
|
612
521
|
this.deleteStickerSetNames(),
|
|
613
|
-
this.
|
|
614
|
-
this.
|
|
615
|
-
this.
|
|
522
|
+
this.peers.clear(),
|
|
523
|
+
this.usernames.clear(),
|
|
524
|
+
this.translations.clear(),
|
|
616
525
|
this.deletePollResults(),
|
|
617
526
|
this.deletePolls(),
|
|
618
527
|
this.deleteVoiceTranscriptions(),
|
|
619
528
|
this.deleteVoiceTranscriptionReferences(),
|
|
620
529
|
]);
|
|
621
530
|
}
|
|
622
|
-
async setApiId(apiId) {
|
|
623
|
-
await this.#storage.set(K.connection.apiId(), apiId);
|
|
624
|
-
}
|
|
625
|
-
async getApiId() {
|
|
626
|
-
return await this.#storage.get(K.connection.apiId());
|
|
627
|
-
}
|
|
628
531
|
async reset() {
|
|
629
532
|
for await (const [key] of await this.#storage.getMany({ prefix: [] })) {
|
|
630
533
|
await this.#storage.set(key, null);
|
|
631
534
|
}
|
|
632
535
|
}
|
|
633
|
-
async setMinPeerReference(chatId, senderId, messageId) {
|
|
634
|
-
await this.#storage.set(K.cache.minPeerReference(senderId, chatId), [{ chatId, messageId }, new Date()]);
|
|
635
|
-
}
|
|
636
|
-
async getLastMinPeerReference(senderId) {
|
|
637
|
-
const references = new Array();
|
|
638
|
-
for await (const [, reference] of await this.#storage.getMany({ prefix: K.cache.minPeerReferenceSender(senderId) })) {
|
|
639
|
-
references.push(reference);
|
|
640
|
-
}
|
|
641
|
-
return references.sort((a, b) => b[1].getTime() - a[1].getTime())[0]?.[0] ?? null;
|
|
642
|
-
}
|
|
643
|
-
async deleteTranslations() {
|
|
644
|
-
const maybePromises = new Array();
|
|
645
|
-
for await (const [key] of await this.#storage.getMany({ prefix: K.cache.allTranslations() })) {
|
|
646
|
-
maybePromises.push(this.#storage.set(key, null));
|
|
647
|
-
}
|
|
648
|
-
await Promise.all(maybePromises);
|
|
649
|
-
}
|
|
650
|
-
async getTranslations(platform, language) {
|
|
651
|
-
return await this.#storage.get(K.cache.translations(platform, language));
|
|
652
|
-
}
|
|
653
|
-
async setTranslations(platform, language, version, translations) {
|
|
654
|
-
await this.#storage.set(K.cache.translations(platform, language), [version, translations, new Date()]);
|
|
655
|
-
}
|
|
656
536
|
async setPollResults(pollId, pollResults) {
|
|
657
537
|
await this.setTlObject(K.cache.pollResult(pollId), pollResults);
|
|
658
538
|
}
|
|
@@ -680,10 +560,10 @@ export class StorageOperations {
|
|
|
680
560
|
await Promise.all(maybePromises);
|
|
681
561
|
}
|
|
682
562
|
async setVoiceTranscription(voiceTranscription) {
|
|
683
|
-
await this.set(K.cache.voiceTranscription(BigInt(voiceTranscription.id)), voiceTranscription);
|
|
563
|
+
await this.#storage.set(K.cache.voiceTranscription(BigInt(voiceTranscription.id)), voiceTranscription);
|
|
684
564
|
}
|
|
685
565
|
async getVoiceTranscription(transcriptionId) {
|
|
686
|
-
return await this.get(K.cache.voiceTranscription(transcriptionId));
|
|
566
|
+
return await this.#storage.get(K.cache.voiceTranscription(transcriptionId));
|
|
687
567
|
}
|
|
688
568
|
async deleteVoiceTranscriptions() {
|
|
689
569
|
const maybePromises = new Array();
|
|
@@ -693,10 +573,10 @@ export class StorageOperations {
|
|
|
693
573
|
await Promise.all(maybePromises);
|
|
694
574
|
}
|
|
695
575
|
async setVoiceTranscriptionReference(chatId, messageId, messageEditDate, transcriptionId) {
|
|
696
|
-
await this.set(K.cache.voiceTranscriptionReference(chatId, messageId, messageEditDate.getTime()), transcriptionId);
|
|
576
|
+
await this.#storage.set(K.cache.voiceTranscriptionReference(chatId, messageId, messageEditDate.getTime()), transcriptionId);
|
|
697
577
|
}
|
|
698
578
|
async getVoiceTranscriptionReference(chatId, messageId, messageEditDate) {
|
|
699
|
-
return await this.get(K.cache.voiceTranscriptionReference(chatId, messageId, messageEditDate.getTime()));
|
|
579
|
+
return await this.#storage.get(K.cache.voiceTranscriptionReference(chatId, messageId, messageEditDate.getTime()));
|
|
700
580
|
}
|
|
701
581
|
async deleteVoiceTranscriptionReferences() {
|
|
702
582
|
const maybePromises = new Array();
|
|
@@ -706,3 +586,126 @@ export class StorageOperations {
|
|
|
706
586
|
await Promise.all(maybePromises);
|
|
707
587
|
}
|
|
708
588
|
}
|
|
589
|
+
class StorageMap {
|
|
590
|
+
#storage;
|
|
591
|
+
#path;
|
|
592
|
+
constructor(storage, path) {
|
|
593
|
+
this.#storage = storage;
|
|
594
|
+
this.#path = path;
|
|
595
|
+
}
|
|
596
|
+
#pendingUpdates = new Map();
|
|
597
|
+
#cache = new LruCache(20_000);
|
|
598
|
+
set(key, value) {
|
|
599
|
+
const key_ = toString(key);
|
|
600
|
+
this.#cache.set(key_, value);
|
|
601
|
+
if (!this.#storage.isMemory) {
|
|
602
|
+
this.#pendingUpdates.set(key_, value);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
get pendingUpdateCount() {
|
|
606
|
+
return this.#pendingUpdates.size;
|
|
607
|
+
}
|
|
608
|
+
mustGet(key) {
|
|
609
|
+
const value = this.#cache.get(toString(key));
|
|
610
|
+
if (value === undefined) {
|
|
611
|
+
unreachable();
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
return value;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
async clear() {
|
|
618
|
+
await awaitablePooledMap(10, await this.#storage.getMany({ prefix: [this.#path] }), async ([key]) => await this.#storage.set(key, null));
|
|
619
|
+
}
|
|
620
|
+
async get(key) {
|
|
621
|
+
const key_ = toString(key);
|
|
622
|
+
let value = this.#cache.get(key_);
|
|
623
|
+
if (value === undefined) {
|
|
624
|
+
value = await this.#storage.get([this.#path, ...key]);
|
|
625
|
+
this.#cache.set(key_, value);
|
|
626
|
+
}
|
|
627
|
+
return value;
|
|
628
|
+
}
|
|
629
|
+
async commit() {
|
|
630
|
+
if (this.#storage.isMemory) {
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
await awaitablePooledMap(2, this.#pendingUpdates, async ([key, value]) => await this.#storage.set([this.#path, ...fromString(key)], value));
|
|
634
|
+
this.#pendingUpdates.clear();
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
class StorageValue {
|
|
638
|
+
#storage;
|
|
639
|
+
#key;
|
|
640
|
+
constructor(storage, path) {
|
|
641
|
+
this.#storage = storage;
|
|
642
|
+
this.#key = [path];
|
|
643
|
+
}
|
|
644
|
+
#updatePending = false;
|
|
645
|
+
#value;
|
|
646
|
+
set(value) {
|
|
647
|
+
this.#value = value;
|
|
648
|
+
if (!this.#storage.isMemory) {
|
|
649
|
+
this.#updatePending = true;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
get isUpdatePending() {
|
|
653
|
+
return this.#updatePending;
|
|
654
|
+
}
|
|
655
|
+
mustGet() {
|
|
656
|
+
return this.#value === undefined ? unreachable() : this.#value;
|
|
657
|
+
}
|
|
658
|
+
async get() {
|
|
659
|
+
if (this.#value === undefined) {
|
|
660
|
+
this.#value = await this.#storage.get(this.#key);
|
|
661
|
+
}
|
|
662
|
+
return this.#value;
|
|
663
|
+
}
|
|
664
|
+
async commit() {
|
|
665
|
+
if (this.#storage.isMemory || this.#value === undefined) {
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
await this.#storage.set(this.#key, this.#value);
|
|
669
|
+
this.#updatePending = false;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
class StorageAuth extends StorageValue {
|
|
673
|
+
constructor(storage) {
|
|
674
|
+
super(storage, "auth");
|
|
675
|
+
}
|
|
676
|
+
async get() {
|
|
677
|
+
const value = await super.get();
|
|
678
|
+
await this.#resetAuthKeyId(value);
|
|
679
|
+
return value;
|
|
680
|
+
}
|
|
681
|
+
mustGet() {
|
|
682
|
+
return super.mustGet() ?? {
|
|
683
|
+
apiId: 0,
|
|
684
|
+
authKey: new Uint8Array(),
|
|
685
|
+
dc: null,
|
|
686
|
+
isBot: false,
|
|
687
|
+
userId: 0,
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
async set(auth) {
|
|
691
|
+
super.set(auth);
|
|
692
|
+
await this.#resetAuthKeyId(auth);
|
|
693
|
+
}
|
|
694
|
+
async update(fn) {
|
|
695
|
+
const auth = this.mustGet();
|
|
696
|
+
fn(auth);
|
|
697
|
+
await this.set(auth);
|
|
698
|
+
}
|
|
699
|
+
#authKeyId = null;
|
|
700
|
+
async #resetAuthKeyId(auth) {
|
|
701
|
+
if (auth?.authKey) {
|
|
702
|
+
this.#authKeyId = bigIntFromBuffer((await sha1(auth.authKey)).subarray(-8), true, false);
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
this.#authKeyId = null;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
get authKeyId() {
|
|
709
|
+
return this.#authKeyId;
|
|
710
|
+
}
|
|
711
|
+
}
|