@mtkruto/node 0.67.2 → 0.69.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 +12 -12
- package/esm/0_deps.js +14 -14
- package/esm/0_errors.js +2 -6
- package/esm/3_errors.js +2 -12
- package/esm/3_types.d.ts +4 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +4 -0
- 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/4_errors.js +2 -12
- package/esm/_dnt.polyfills.d.ts +99 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +127 -1
- package/esm/_dnt.test_polyfills.d.ts.map +1 -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 +1 -1
- package/esm/client/0_filters.d.ts.map +1 -1
- package/esm/client/0_filters.js +3 -3
- package/esm/client/0_filters_test.d.ts.map +1 -1
- 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_markdown_test.d.ts.map +1 -1
- package/esm/client/0_params.d.ts +44 -8
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts +5 -5
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +1 -1
- package/esm/client/0_password_test.d.ts.map +1 -1
- package/esm/client/0_storage_operations.d.ts +4 -4
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +159 -171
- package/esm/client/0_storage_operations_test.d.ts.map +1 -1
- package/esm/client/0_update_processor.d.ts +2 -2
- package/esm/client/0_update_processor.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +1 -1
- package/esm/client/0_utilities.js +8 -8
- package/esm/client/0_utilities_test.d.ts.map +1 -1
- 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 +5 -23
- 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 +14 -27
- package/esm/client/1_types.d.ts +4 -4
- 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 +86 -98
- 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_bot_info_manager.js +26 -38
- package/esm/client/2_business_connection_manager.d.ts +3 -3
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +10 -23
- package/esm/client/2_client_encrypted.d.ts +2 -2
- package/esm/client/2_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_client_encrypted.js +194 -211
- package/esm/client/2_file_manager.d.ts +7 -6
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +303 -245
- package/esm/client/2_file_manager_test.d.ts.map +1 -1
- 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_network_statistics_manager.js +8 -21
- package/esm/client/2_payment_manager.d.ts +4 -4
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +7 -20
- package/esm/client/2_reaction_manager.d.ts +3 -3
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +7 -20
- package/esm/client/2_translations_manager.d.ts +4 -4
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +97 -107
- package/esm/client/2_update_manager.d.ts +2 -2
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +766 -761
- 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_client_encrypted_pool.js +10 -26
- package/esm/client/3_client_encrypted_pool_test.d.ts.map +1 -1
- package/esm/client/3_message_manager.d.ts +11 -8
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +580 -466
- package/esm/client/3_message_manager_test.d.ts.map +1 -1
- 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 +61 -72
- package/esm/client/4_callback_query_manager.d.ts +5 -5
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +18 -30
- package/esm/client/4_chat_list_manager.d.ts +6 -6
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +328 -324
- package/esm/client/4_chat_manager.d.ts +7 -7
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +120 -133
- 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_forum_manager.js +67 -73
- 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 +17 -30
- package/esm/client/4_inline_query_manager.d.ts +5 -5
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +16 -28
- package/esm/client/4_link_preview_manager.d.ts +5 -5
- package/esm/client/4_link_preview_manager.d.ts.map +1 -1
- package/esm/client/4_link_preview_manager.js +6 -19
- package/esm/client/4_poll_manager.d.ts +4 -4
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +44 -57
- package/esm/client/4_story_manager.d.ts +7 -7
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +43 -55
- package/esm/client/5_client.d.ts +34 -15
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +1299 -1291
- 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 +49 -66
- 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 +75 -91
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +3 -11
- package/{script/deps/jsr.io/@std/assert/1.0.13 → esm/deps/jsr.io/@std/assert/1.0.14}/assert.d.ts.map +1 -1
- 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.13 → 1.0.14}/equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts.map +1 -1
- 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.13 → 1.0.14}/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.js +17 -2
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +31 -47
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/1.0.14/tee.js +79 -0
- package/esm/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +4 -17
- 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.0 → 1.1.2}/_common/assert_path.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/basename.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/posix/basename.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/posix/extname.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/posix/join.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/posix/normalize.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/posix/to_file_url.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/to_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/_util.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/basename.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/extname.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/from_file_url.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/is_absolute.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/join.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/normalize.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.0 → esm/deps/jsr.io/@std/path/1.1.2}/windows/to_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts.map +1 -1
- package/esm/mod.js +2 -12
- package/esm/session/0_session_state.js +12 -38
- package/esm/session/1_session.d.ts +2 -2
- package/esm/session/1_session.d.ts.map +1 -1
- package/esm/session/1_session.js +49 -72
- package/esm/session/2_session_encrypted.d.ts +2 -2
- package/esm/session/2_session_encrypted.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.js +324 -320
- package/esm/session/2_session_plain.js +1 -1
- package/esm/storage/0_storage.d.ts +1 -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/1_utilities_test.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.d.ts +1 -1
- package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +29 -47
- package/esm/storage/2_storage_local_storage.node.d.ts +1 -1
- package/esm/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.node.js +15 -28
- package/esm/storage/2_storage_memory.d.ts +2 -2
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +26 -43
- package/esm/storage/2_storage_session_storage.d.ts +2 -2
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +6 -19
- package/esm/tl/0_utilities.js +1 -1
- package/esm/tl/0_utilities_test.d.ts.map +1 -1
- package/esm/tl/1_tl_reader.d.ts +1 -1
- package/esm/tl/1_tl_reader.d.ts.map +1 -1
- package/esm/tl/1_tl_reader.js +82 -90
- package/esm/tl/1_tl_reader_test.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.d.ts +1 -1
- package/esm/tl/1_tl_writer.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.js +155 -164
- package/esm/tl/1_tl_writer_test.d.ts.map +1 -1
- 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 +1 -1
- 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/0_transport.js +1 -8
- 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_abridged.js +11 -24
- 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_intermediate.js +10 -23
- 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_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_entity.d.ts +1 -1
- package/esm/types/0_message_entity.d.ts.map +1 -1
- package/esm/types/0_message_entity.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_upload_progress.d.ts +29 -0
- package/esm/types/0_upload_progress.d.ts.map +1 -0
- package/esm/types/0_upload_progress.js +20 -0
- package/esm/types/0_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 +2 -2
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +2 -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_media.d.ts +4 -4
- package/esm/types/1_input_media.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_poll_option.d.ts +2 -2
- package/esm/types/1_poll_option.d.ts.map +1 -1
- package/esm/types/1_poll_option.js +2 -2
- 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_reply_quote.d.ts +2 -2
- package/esm/types/1_reply_quote.d.ts.map +1 -1
- package/esm/types/1_sticker.d.ts +4 -4
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +2 -2
- package/esm/types/1_story_privacy.d.ts +1 -1
- package/esm/types/1_story_privacy.d.ts.map +1 -1
- 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_user.d.ts +2 -2
- package/esm/types/1_user.d.ts.map +1 -1
- package/esm/types/1_user.js +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_business_connection.d.ts +3 -3
- package/esm/types/2_business_connection.d.ts.map +1 -1
- package/esm/types/2_chat.d.ts +6 -6
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +3 -3
- package/esm/types/2_chat_member.d.ts +4 -4
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +1 -1
- package/esm/types/2_chat_settings.d.ts +1 -1
- package/esm/types/2_chat_settings.d.ts.map +1 -1
- package/esm/types/2_chat_settings.js +1 -1
- package/esm/types/2_chosen_inline_result.d.ts +3 -3
- package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
- package/esm/types/2_forward_header.d.ts +4 -4
- package/esm/types/2_forward_header.d.ts.map +1 -1
- package/esm/types/2_forward_header.js +6 -6
- package/esm/types/2_game.d.ts +3 -3
- package/esm/types/2_game.d.ts.map +1 -1
- package/esm/types/2_gift_upgraded_component.d.ts +2 -2
- package/esm/types/2_gift_upgraded_component.d.ts.map +1 -1
- 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_inline_query.d.ts +3 -3
- package/esm/types/2_inline_query.d.ts.map +1 -1
- package/esm/types/2_inline_query.js +1 -1
- package/esm/types/2_invite_link.d.ts +3 -3
- package/esm/types/2_invite_link.d.ts.map +1 -1
- 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 -4
- package/esm/types/2_message_reaction_count.d.ts.map +1 -1
- package/esm/types/2_message_reactions.d.ts +4 -4
- package/esm/types/2_message_reactions.d.ts.map +1 -1
- package/esm/types/2_poll.d.ts +3 -3
- package/esm/types/2_poll.d.ts.map +1 -1
- package/esm/types/2_poll.js +3 -3
- package/esm/types/2_poll_answer.d.ts +22 -3
- package/esm/types/2_poll_answer.d.ts.map +1 -1
- package/esm/types/2_poll_answer.js +19 -0
- package/esm/types/2_pre_checkout_query.d.ts +4 -4
- package/esm/types/2_pre_checkout_query.d.ts.map +1 -1
- 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_reply_to.d.ts +2 -2
- package/esm/types/2_reply_to.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 +5 -5
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_successful_payment.d.ts +2 -2
- package/esm/types/2_successful_payment.d.ts.map +1 -1
- package/esm/types/3_chat_member_updated.d.ts +5 -5
- package/esm/types/3_chat_member_updated.d.ts.map +1 -1
- package/esm/types/3_gift.d.ts +4 -4
- package/esm/types/3_gift.d.ts.map +1 -1
- package/esm/types/3_join_request.d.ts +4 -4
- package/esm/types/3_join_request.d.ts.map +1 -1
- package/esm/types/3_story.d.ts +8 -8
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/4_claimed_gift.d.ts +4 -4
- package/esm/types/4_claimed_gift.d.ts.map +1 -1
- package/esm/types/4_link_preview.d.ts +5 -5
- package/esm/types/4_link_preview.d.ts.map +1 -1
- package/esm/types/5_claimed_gifts.d.ts +2 -2
- package/esm/types/5_claimed_gifts.d.ts.map +1 -1
- package/esm/types/5_claimed_gifts.js +3 -3
- package/esm/types/5_message.d.ts +29 -29
- package/esm/types/5_message.d.ts.map +1 -1
- package/esm/types/5_message.js +8 -8
- package/esm/types/5_message_content.d.ts +4 -4
- package/esm/types/5_message_content.d.ts.map +1 -1
- package/esm/types/6_callback_query.d.ts +3 -3
- package/esm/types/6_callback_query.d.ts.map +1 -1
- package/esm/types/6_callback_query.js +2 -2
- package/esm/types/6_chat_list_item.d.ts +4 -4
- package/esm/types/6_chat_list_item.d.ts.map +1 -1
- package/esm/types/6_chat_list_item.js +6 -6
- package/esm/types/6_inline_query_result.d.ts +6 -6
- package/esm/types/6_inline_query_result.d.ts.map +1 -1
- package/esm/types/6_inline_query_result.js +16 -16
- package/esm/types/6_saved_chat.d.ts +36 -0
- package/esm/types/6_saved_chat.d.ts.map +1 -0
- package/esm/types/6_saved_chat.js +43 -0
- package/esm/types/6_topic.d.ts +2 -2
- package/esm/types/6_topic.d.ts.map +1 -1
- package/esm/types/6_topic.js +1 -1
- package/esm/types/7_inline_query_answer.d.ts +2 -2
- package/esm/types/7_inline_query_answer.d.ts.map +1 -1
- package/esm/types/7_saved_chats.d.ts +33 -0
- package/esm/types/7_saved_chats.d.ts.map +1 -0
- package/esm/types/7_saved_chats.js +36 -0
- package/esm/types/7_update.d.ts +44 -25
- package/esm/types/7_update.d.ts.map +1 -1
- package/esm/types/_file_id.d.ts +60 -49
- 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 -3
- package/esm/types/_getters.d.ts.map +1 -1
- package/esm/utilities/0_bigint.js +5 -5
- package/esm/utilities/0_bigint_test.d.ts.map +1 -1
- package/esm/utilities/0_buffer.d.ts +1 -1
- package/esm/utilities/0_buffer.d.ts.map +1 -1
- package/esm/utilities/0_buffer.js +3 -3
- package/esm/utilities/0_buffer_test.d.ts.map +1 -1
- 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.map +1 -1
- package/esm/utilities/0_misc.js +4 -3
- package/esm/utilities/0_mutex.js +4 -19
- package/esm/utilities/0_part_stream.js +11 -25
- package/esm/utilities/0_part_stream_test.d.ts.map +1 -1
- package/esm/utilities/0_rle.d.ts +2 -2
- package/esm/utilities/0_rle.d.ts.map +1 -1
- package/esm/utilities/0_rle.js +1 -1
- package/esm/utilities/0_rle_test.d.ts.map +1 -1
- package/esm/utilities/0_text.d.ts +20 -1
- package/esm/utilities/0_text.d.ts.map +1 -1
- package/esm/utilities/0_text.js +19 -0
- package/esm/utilities/1_auth.d.ts +1 -1
- package/esm/utilities/1_auth.d.ts.map +1 -1
- package/esm/utilities/1_auth.js +1 -1
- package/esm/utilities/1_base64.d.ts +1 -1
- package/esm/utilities/1_base64.d.ts.map +1 -1
- package/esm/utilities/1_base64.js +1 -1
- package/esm/utilities/1_base64_test.d.ts.map +1 -1
- package/esm/utilities/1_crypto.js +42 -53
- package/esm/utilities/1_crypto_test.d.ts.map +1 -1
- package/esm/utilities/1_logger.d.ts +2 -2
- package/esm/utilities/1_logger.js +2 -2
- package/esm/utilities/1_math.js +2 -2
- package/esm/utilities/1_math_test.d.ts.map +1 -1
- package/esm/utilities/2_queue.js +29 -47
- package/package.json +1 -1
- package/script/0_deps.d.ts +12 -12
- package/script/0_deps.js +14 -14
- package/script/0_errors.js +2 -6
- package/script/2_tl.js +17 -7
- package/script/3_errors.js +2 -12
- package/script/3_types.d.ts +4 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +4 -0
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_constants.js +17 -7
- package/script/4_errors.d.ts +2 -2
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_errors.js +2 -12
- package/script/_dnt.polyfills.d.ts +99 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +128 -0
- package/script/_dnt.test_polyfills.d.ts.map +1 -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 +1 -1
- package/script/client/0_filters.d.ts.map +1 -1
- package/script/client/0_filters.js +3 -3
- package/script/client/0_filters_test.d.ts.map +1 -1
- 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_markdown_test.d.ts.map +1 -1
- package/script/client/0_params.d.ts +44 -8
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts +5 -5
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +18 -8
- package/script/client/0_password_test.d.ts.map +1 -1
- package/script/client/0_storage_operations.d.ts +4 -4
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +159 -171
- package/script/client/0_storage_operations_test.d.ts.map +1 -1
- package/script/client/0_update_processor.d.ts +2 -2
- package/script/client/0_update_processor.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +1 -1
- package/script/client/0_utilities.js +8 -8
- package/script/client/0_utilities_test.d.ts.map +1 -1
- 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 +5 -23
- 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 +14 -27
- package/script/client/1_types.d.ts +4 -4
- 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 +86 -98
- 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_bot_info_manager.js +26 -38
- package/script/client/2_business_connection_manager.d.ts +3 -3
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +10 -23
- package/script/client/2_client_encrypted.d.ts +2 -2
- package/script/client/2_client_encrypted.d.ts.map +1 -1
- package/script/client/2_client_encrypted.js +195 -212
- package/script/client/2_file_manager.d.ts +7 -6
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +320 -252
- package/script/client/2_file_manager_test.d.ts.map +1 -1
- 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_network_statistics_manager.js +8 -21
- package/script/client/2_payment_manager.d.ts +4 -4
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +7 -20
- package/script/client/2_reaction_manager.d.ts +3 -3
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +7 -20
- package/script/client/2_translations_manager.d.ts +4 -4
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +98 -108
- package/script/client/2_update_manager.d.ts +2 -2
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +766 -761
- 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_client_encrypted_pool.js +10 -26
- package/script/client/3_client_encrypted_pool_test.d.ts.map +1 -1
- package/script/client/3_message_manager.d.ts +11 -8
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +580 -466
- package/script/client/3_message_manager_test.d.ts.map +1 -1
- 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 +61 -72
- package/script/client/4_callback_query_manager.d.ts +5 -5
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +18 -30
- package/script/client/4_chat_list_manager.d.ts +6 -6
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +328 -324
- package/script/client/4_chat_manager.d.ts +7 -7
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +120 -133
- 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_forum_manager.js +67 -73
- 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 +17 -30
- package/script/client/4_inline_query_manager.d.ts +5 -5
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +16 -28
- package/script/client/4_link_preview_manager.d.ts +5 -5
- package/script/client/4_link_preview_manager.d.ts.map +1 -1
- package/script/client/4_link_preview_manager.js +6 -19
- package/script/client/4_poll_manager.d.ts +4 -4
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +44 -57
- package/script/client/4_story_manager.d.ts +7 -7
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +43 -55
- package/script/client/5_client.d.ts +34 -15
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +1299 -1291
- 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 +49 -66
- 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 +92 -98
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +3 -11
- package/{esm/deps/jsr.io/@std/assert/1.0.13 → script/deps/jsr.io/@std/assert/1.0.14}/assert.d.ts.map +1 -1
- 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.13 → 1.0.14}/equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +17 -7
- package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts.map +1 -1
- 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.13 → 1.0.14}/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.js +34 -9
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +31 -47
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/1.0.14/tee.js +82 -0
- package/script/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +4 -17
- 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/format.js +17 -7
- 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/internal/1.0.10/styles.js +17 -7
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/basename.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/posix/basename.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/posix/extname.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/posix/join.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/posix/normalize.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/posix/to_file_url.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/to_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.js +2 -2
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/_util.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/basename.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/extname.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/from_file_url.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/is_absolute.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/join.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/normalize.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.0 → script/deps/jsr.io/@std/path/1.1.2}/windows/to_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts.map +1 -1
- package/script/mod.js +19 -19
- package/script/session/0_session_state.js +12 -38
- package/script/session/1_session.d.ts +2 -2
- package/script/session/1_session.d.ts.map +1 -1
- package/script/session/1_session.js +66 -79
- package/script/session/2_session_encrypted.d.ts +2 -2
- package/script/session/2_session_encrypted.d.ts.map +1 -1
- package/script/session/2_session_encrypted.js +325 -321
- package/script/session/2_session_plain.js +1 -1
- package/script/storage/0_storage.d.ts +1 -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/1_utilities_test.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.d.ts +1 -1
- package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +29 -47
- package/script/storage/2_storage_local_storage.node.d.ts +1 -1
- package/script/storage/2_storage_local_storage.node.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.node.js +15 -28
- package/script/storage/2_storage_memory.d.ts +2 -2
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +26 -43
- package/script/storage/2_storage_session_storage.d.ts +2 -2
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +6 -19
- package/script/tl/0_utilities.js +1 -1
- package/script/tl/0_utilities_test.d.ts.map +1 -1
- package/script/tl/1_tl_reader.d.ts +1 -1
- package/script/tl/1_tl_reader.d.ts.map +1 -1
- package/script/tl/1_tl_reader.js +83 -91
- package/script/tl/1_tl_reader_test.d.ts.map +1 -1
- package/script/tl/1_tl_writer.d.ts +1 -1
- package/script/tl/1_tl_writer.d.ts.map +1 -1
- package/script/tl/1_tl_writer.js +156 -165
- package/script/tl/1_tl_writer_test.d.ts.map +1 -1
- 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 +1 -1
- 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/tl/2_telegram.js +17 -7
- 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 +19 -9
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/transport/0_transport.js +1 -8
- 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_abridged.js +11 -24
- 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_intermediate.js +10 -23
- 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_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_entity.d.ts +1 -1
- package/script/types/0_message_entity.d.ts.map +1 -1
- package/script/types/0_message_entity.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_upload_progress.d.ts +29 -0
- package/script/types/0_upload_progress.d.ts.map +1 -0
- package/script/types/0_upload_progress.js +21 -0
- package/script/types/0_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 +2 -2
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +2 -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_media.d.ts +4 -4
- package/script/types/1_input_media.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_poll_option.d.ts +2 -2
- package/script/types/1_poll_option.d.ts.map +1 -1
- package/script/types/1_poll_option.js +2 -2
- 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_reply_quote.d.ts +2 -2
- package/script/types/1_reply_quote.d.ts.map +1 -1
- package/script/types/1_sticker.d.ts +4 -4
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +2 -2
- package/script/types/1_story_privacy.d.ts +1 -1
- package/script/types/1_story_privacy.d.ts.map +1 -1
- 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_user.d.ts +2 -2
- package/script/types/1_user.d.ts.map +1 -1
- package/script/types/1_user.js +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_business_connection.d.ts +3 -3
- package/script/types/2_business_connection.d.ts.map +1 -1
- package/script/types/2_chat.d.ts +6 -6
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +3 -3
- package/script/types/2_chat_member.d.ts +4 -4
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +1 -1
- package/script/types/2_chat_settings.d.ts +1 -1
- package/script/types/2_chat_settings.d.ts.map +1 -1
- package/script/types/2_chat_settings.js +1 -1
- package/script/types/2_chosen_inline_result.d.ts +3 -3
- package/script/types/2_chosen_inline_result.d.ts.map +1 -1
- package/script/types/2_forward_header.d.ts +4 -4
- package/script/types/2_forward_header.d.ts.map +1 -1
- package/script/types/2_forward_header.js +6 -6
- package/script/types/2_game.d.ts +3 -3
- package/script/types/2_game.d.ts.map +1 -1
- package/script/types/2_gift_upgraded_component.d.ts +2 -2
- package/script/types/2_gift_upgraded_component.d.ts.map +1 -1
- 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_inline_query.d.ts +3 -3
- package/script/types/2_inline_query.d.ts.map +1 -1
- package/script/types/2_inline_query.js +1 -1
- package/script/types/2_invite_link.d.ts +3 -3
- package/script/types/2_invite_link.d.ts.map +1 -1
- 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 -4
- package/script/types/2_message_reaction_count.d.ts.map +1 -1
- package/script/types/2_message_reactions.d.ts +4 -4
- package/script/types/2_message_reactions.d.ts.map +1 -1
- package/script/types/2_poll.d.ts +3 -3
- package/script/types/2_poll.d.ts.map +1 -1
- package/script/types/2_poll.js +3 -3
- package/script/types/2_poll_answer.d.ts +22 -3
- package/script/types/2_poll_answer.d.ts.map +1 -1
- package/script/types/2_poll_answer.js +19 -0
- package/script/types/2_pre_checkout_query.d.ts +4 -4
- package/script/types/2_pre_checkout_query.d.ts.map +1 -1
- 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_reply_to.d.ts +2 -2
- package/script/types/2_reply_to.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 +5 -5
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_successful_payment.d.ts +2 -2
- package/script/types/2_successful_payment.d.ts.map +1 -1
- package/script/types/3_chat_member_updated.d.ts +5 -5
- package/script/types/3_chat_member_updated.d.ts.map +1 -1
- package/script/types/3_gift.d.ts +4 -4
- package/script/types/3_gift.d.ts.map +1 -1
- package/script/types/3_join_request.d.ts +4 -4
- package/script/types/3_join_request.d.ts.map +1 -1
- package/script/types/3_story.d.ts +8 -8
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/4_claimed_gift.d.ts +4 -4
- package/script/types/4_claimed_gift.d.ts.map +1 -1
- package/script/types/4_link_preview.d.ts +5 -5
- package/script/types/4_link_preview.d.ts.map +1 -1
- package/script/types/5_claimed_gifts.d.ts +2 -2
- package/script/types/5_claimed_gifts.d.ts.map +1 -1
- package/script/types/5_claimed_gifts.js +3 -3
- package/script/types/5_message.d.ts +29 -29
- package/script/types/5_message.d.ts.map +1 -1
- package/script/types/5_message.js +8 -8
- package/script/types/5_message_content.d.ts +4 -4
- package/script/types/5_message_content.d.ts.map +1 -1
- package/script/types/6_callback_query.d.ts +3 -3
- package/script/types/6_callback_query.d.ts.map +1 -1
- package/script/types/6_callback_query.js +2 -2
- package/script/types/6_chat_list_item.d.ts +4 -4
- package/script/types/6_chat_list_item.d.ts.map +1 -1
- package/script/types/6_chat_list_item.js +6 -6
- package/script/types/6_inline_query_result.d.ts +6 -6
- package/script/types/6_inline_query_result.d.ts.map +1 -1
- package/script/types/6_inline_query_result.js +16 -16
- package/script/types/6_saved_chat.d.ts +36 -0
- package/script/types/6_saved_chat.d.ts.map +1 -0
- package/script/types/6_saved_chat.js +46 -0
- package/script/types/6_topic.d.ts +2 -2
- package/script/types/6_topic.d.ts.map +1 -1
- package/script/types/6_topic.js +1 -1
- package/script/types/7_inline_query_answer.d.ts +2 -2
- package/script/types/7_inline_query_answer.d.ts.map +1 -1
- package/script/types/7_saved_chats.d.ts +33 -0
- package/script/types/7_saved_chats.d.ts.map +1 -0
- package/script/types/7_saved_chats.js +39 -0
- package/script/types/7_update.d.ts +44 -25
- package/script/types/7_update.d.ts.map +1 -1
- package/script/types/_file_id.d.ts +60 -49
- 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 -3
- package/script/types/_getters.d.ts.map +1 -1
- package/script/utilities/0_bigint.js +22 -12
- package/script/utilities/0_bigint_test.d.ts.map +1 -1
- package/script/utilities/0_buffer.d.ts +1 -1
- package/script/utilities/0_buffer.d.ts.map +1 -1
- package/script/utilities/0_buffer.js +3 -3
- package/script/utilities/0_buffer_test.d.ts.map +1 -1
- package/script/utilities/0_env.js +18 -8
- package/script/utilities/0_hash.d.ts +2 -2
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_hash.js +17 -7
- package/script/utilities/0_misc.d.ts.map +1 -1
- package/script/utilities/0_misc.js +21 -10
- package/script/utilities/0_mutex.js +4 -19
- package/script/utilities/0_part_stream.js +11 -25
- package/script/utilities/0_part_stream_test.d.ts.map +1 -1
- package/script/utilities/0_rle.d.ts +2 -2
- package/script/utilities/0_rle.d.ts.map +1 -1
- package/script/utilities/0_rle.js +1 -1
- package/script/utilities/0_rle_test.d.ts.map +1 -1
- package/script/utilities/0_text.d.ts +20 -1
- package/script/utilities/0_text.d.ts.map +1 -1
- package/script/utilities/0_text.js +19 -0
- package/script/utilities/1_auth.d.ts +1 -1
- package/script/utilities/1_auth.d.ts.map +1 -1
- package/script/utilities/1_auth.js +18 -8
- package/script/utilities/1_base64.d.ts +1 -1
- package/script/utilities/1_base64.d.ts.map +1 -1
- package/script/utilities/1_base64.js +1 -1
- package/script/utilities/1_base64_test.d.ts.map +1 -1
- package/script/utilities/1_crypto.js +60 -61
- package/script/utilities/1_crypto_test.d.ts.map +1 -1
- package/script/utilities/1_logger.d.ts +2 -2
- package/script/utilities/1_logger.js +2 -2
- package/script/utilities/1_math.js +2 -2
- package/script/utilities/1_math_test.d.ts.map +1 -1
- package/script/utilities/2_queue.js +30 -48
- package/esm/deps/jsr.io/@std/async/1.0.13/tee.js +0 -102
- 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/script/deps/jsr.io/@std/async/1.0.13/tee.js +0 -105
- 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 -35
- /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}/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/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/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}/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}/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/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
|
@@ -18,38 +18,33 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
22
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
|
-
};
|
|
27
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _ForumManager_instances, _a, _ForumManager_c, _ForumManager_validateTopicTitle, _ForumManager_assertNongenralTopicIdValid, _ForumManager_assertAnyTopicIdValid, _ForumManager_toggleGeneralTopicHidden, _ForumManager_toggleNongeneralTopicClosed, _ForumManager_setTopicPinned;
|
|
21
|
+
var _a;
|
|
33
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
23
|
exports.ForumManager = void 0;
|
|
35
24
|
const _0_errors_js_1 = require("../0_errors.js");
|
|
36
25
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
37
26
|
const _3_types_js_1 = require("../3_types.js");
|
|
38
27
|
class ForumManager {
|
|
28
|
+
#c;
|
|
39
29
|
constructor(c) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
this.#c = c;
|
|
31
|
+
}
|
|
32
|
+
static #validateTopicTitle(title) {
|
|
33
|
+
title = title.trim();
|
|
34
|
+
if (!title) {
|
|
35
|
+
throw new InputEvent("Invalid topic title.");
|
|
36
|
+
}
|
|
37
|
+
return title;
|
|
43
38
|
}
|
|
44
39
|
async createTopic(chatId, title, params) {
|
|
45
|
-
title =
|
|
40
|
+
title = _a.#validateTopicTitle(title);
|
|
46
41
|
let send_as;
|
|
47
42
|
if (params?.sendAs) {
|
|
48
|
-
|
|
49
|
-
send_as = await
|
|
43
|
+
this.#c.storage.assertUser("sendAs");
|
|
44
|
+
send_as = await this.#c.getInputPeer(params.sendAs);
|
|
50
45
|
}
|
|
51
|
-
const channel = await
|
|
52
|
-
const updates = await
|
|
46
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
47
|
+
const updates = await this.#c.invoke({
|
|
53
48
|
_: "channels.createForumTopic",
|
|
54
49
|
channel,
|
|
55
50
|
title,
|
|
@@ -58,81 +53,80 @@ class ForumManager {
|
|
|
58
53
|
send_as,
|
|
59
54
|
random_id: (0, _1_utilities_js_1.getRandomId)(),
|
|
60
55
|
});
|
|
61
|
-
const message = (await
|
|
56
|
+
const message = (await this.#c.messageManager.updatesToMessages(chatId, updates))[0];
|
|
62
57
|
return (0, _3_types_js_1.constructTopic)((0, _3_types_js_1.assertMessageType)(message, "forumTopicCreated"));
|
|
63
58
|
}
|
|
59
|
+
static #assertNongenralTopicIdValid(topicId) {
|
|
60
|
+
if (!topicId || topicId < 2) {
|
|
61
|
+
throw new _0_errors_js_1.InputError("Invalid topic ID.");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static #assertAnyTopicIdValid(topicId) {
|
|
65
|
+
if (!topicId || topicId < 1) {
|
|
66
|
+
throw new _0_errors_js_1.InputError("Invalid topic ID.");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
64
69
|
async editTopic(chatId, topicId, title, params) {
|
|
65
|
-
|
|
66
|
-
title =
|
|
67
|
-
const channel = await
|
|
68
|
-
const updates = await
|
|
70
|
+
_a.#assertNongenralTopicIdValid(topicId);
|
|
71
|
+
title = _a.#validateTopicTitle(title);
|
|
72
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
73
|
+
const updates = await this.#c.invoke({
|
|
69
74
|
_: "channels.editForumTopic",
|
|
70
75
|
channel,
|
|
71
76
|
topic_id: topicId,
|
|
72
77
|
title,
|
|
73
78
|
icon_emoji_id: params?.customEmojiId ? BigInt(params.customEmojiId) : undefined,
|
|
74
79
|
});
|
|
75
|
-
const message = (await
|
|
80
|
+
const message = (await this.#c.messageManager.updatesToMessages(chatId, updates))[0];
|
|
76
81
|
return (0, _3_types_js_1.constructTopic)((0, _3_types_js_1.assertMessageType)(message, "forumTopicEdited"));
|
|
77
82
|
}
|
|
83
|
+
async #toggleGeneralTopicHidden(chatId, hidden) {
|
|
84
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
85
|
+
await this.#c.invoke({
|
|
86
|
+
_: "channels.editForumTopic",
|
|
87
|
+
channel,
|
|
88
|
+
topic_id: 1,
|
|
89
|
+
hidden,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
78
92
|
async hideGeneralTopic(chatId) {
|
|
79
|
-
await
|
|
93
|
+
await this.#toggleGeneralTopicHidden(chatId, true);
|
|
80
94
|
}
|
|
81
95
|
async showGeneralTopic(chatId) {
|
|
82
|
-
await
|
|
96
|
+
await this.#toggleGeneralTopicHidden(chatId, false);
|
|
97
|
+
}
|
|
98
|
+
async #toggleNongeneralTopicClosed(chatId, topicId, closed) {
|
|
99
|
+
_a.#assertNongenralTopicIdValid(topicId);
|
|
100
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
101
|
+
await this.#c.invoke({
|
|
102
|
+
_: "channels.editForumTopic",
|
|
103
|
+
channel,
|
|
104
|
+
topic_id: 1,
|
|
105
|
+
closed,
|
|
106
|
+
});
|
|
83
107
|
}
|
|
84
108
|
async closeTopic(chatId, topicId) {
|
|
85
|
-
await
|
|
109
|
+
await this.#toggleNongeneralTopicClosed(chatId, topicId, true);
|
|
86
110
|
}
|
|
87
111
|
async reopenTopic(chatId, topicId) {
|
|
88
|
-
await
|
|
112
|
+
await this.#toggleNongeneralTopicClosed(chatId, topicId, false);
|
|
113
|
+
}
|
|
114
|
+
async #setTopicPinned(chatId, topicId, pinned) {
|
|
115
|
+
_a.#assertAnyTopicIdValid(topicId);
|
|
116
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
117
|
+
await this.#c.invoke({
|
|
118
|
+
_: "channels.updatePinnedForumTopic",
|
|
119
|
+
channel,
|
|
120
|
+
topic_id: 1,
|
|
121
|
+
pinned,
|
|
122
|
+
});
|
|
89
123
|
}
|
|
90
124
|
async pinTopic(chatId, topicId) {
|
|
91
|
-
await
|
|
125
|
+
await this.#setTopicPinned(chatId, topicId, true);
|
|
92
126
|
}
|
|
93
127
|
async unpinTopic(chatId, topicId) {
|
|
94
|
-
await
|
|
128
|
+
await this.#setTopicPinned(chatId, topicId, false);
|
|
95
129
|
}
|
|
96
130
|
}
|
|
97
131
|
exports.ForumManager = ForumManager;
|
|
98
|
-
_a = ForumManager
|
|
99
|
-
title = title.trim();
|
|
100
|
-
if (!title) {
|
|
101
|
-
throw new InputEvent("Invalid topic title.");
|
|
102
|
-
}
|
|
103
|
-
return title;
|
|
104
|
-
}, _ForumManager_assertNongenralTopicIdValid = function _ForumManager_assertNongenralTopicIdValid(topicId) {
|
|
105
|
-
if (!topicId || topicId < 2) {
|
|
106
|
-
throw new _0_errors_js_1.InputError("Invalid topic ID.");
|
|
107
|
-
}
|
|
108
|
-
}, _ForumManager_assertAnyTopicIdValid = function _ForumManager_assertAnyTopicIdValid(topicId) {
|
|
109
|
-
if (!topicId || topicId < 1) {
|
|
110
|
-
throw new _0_errors_js_1.InputError("Invalid topic ID.");
|
|
111
|
-
}
|
|
112
|
-
}, _ForumManager_toggleGeneralTopicHidden = async function _ForumManager_toggleGeneralTopicHidden(chatId, hidden) {
|
|
113
|
-
const channel = await __classPrivateFieldGet(this, _ForumManager_c, "f").getInputChannel(chatId);
|
|
114
|
-
await __classPrivateFieldGet(this, _ForumManager_c, "f").invoke({
|
|
115
|
-
_: "channels.editForumTopic",
|
|
116
|
-
channel,
|
|
117
|
-
topic_id: 1,
|
|
118
|
-
hidden,
|
|
119
|
-
});
|
|
120
|
-
}, _ForumManager_toggleNongeneralTopicClosed = async function _ForumManager_toggleNongeneralTopicClosed(chatId, topicId, closed) {
|
|
121
|
-
__classPrivateFieldGet(_a, _a, "m", _ForumManager_assertNongenralTopicIdValid).call(_a, topicId);
|
|
122
|
-
const channel = await __classPrivateFieldGet(this, _ForumManager_c, "f").getInputChannel(chatId);
|
|
123
|
-
await __classPrivateFieldGet(this, _ForumManager_c, "f").invoke({
|
|
124
|
-
_: "channels.editForumTopic",
|
|
125
|
-
channel,
|
|
126
|
-
topic_id: 1,
|
|
127
|
-
closed,
|
|
128
|
-
});
|
|
129
|
-
}, _ForumManager_setTopicPinned = async function _ForumManager_setTopicPinned(chatId, topicId, pinned) {
|
|
130
|
-
__classPrivateFieldGet(_a, _a, "m", _ForumManager_assertAnyTopicIdValid).call(_a, topicId);
|
|
131
|
-
const channel = await __classPrivateFieldGet(this, _ForumManager_c, "f").getInputChannel(chatId);
|
|
132
|
-
await __classPrivateFieldGet(this, _ForumManager_c, "f").invoke({
|
|
133
|
-
_: "channels.updatePinnedForumTopic",
|
|
134
|
-
channel,
|
|
135
|
-
topic_id: 1,
|
|
136
|
-
pinned,
|
|
137
|
-
});
|
|
138
|
-
};
|
|
132
|
+
_a = ForumManager;
|
|
@@ -17,10 +17,10 @@
|
|
|
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 { ID } from "../3_types.js";
|
|
21
|
-
import { GetClaimedGiftsParams, SendGiftParams } from "./0_params.js";
|
|
22
|
-
import { C as C_ } from "./1_types.js";
|
|
23
|
-
import { MessageManager } from "./3_message_manager.js";
|
|
20
|
+
import { type ID } from "../3_types.js";
|
|
21
|
+
import type { GetClaimedGiftsParams, SendGiftParams } from "./0_params.js";
|
|
22
|
+
import type { C as C_ } from "./1_types.js";
|
|
23
|
+
import type { MessageManager } from "./3_message_manager.js";
|
|
24
24
|
interface C extends C_ {
|
|
25
25
|
messageManager: MessageManager;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_gift_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_gift_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAwC,EAAE,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"4_gift_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_gift_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAwC,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,UAAU,CAAE,SAAQ,EAAE;IACpB,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,qBAAa,WAAW;;gBAGV,CAAC,EAAE,CAAC;IAIV,QAAQ;IAQR,eAAe,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,qBAAqB;IAS1D,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc;IAe5D,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM;IAQtC,OAAO,CAAC,IAAI,EAAE,MAAM;CAW3B"}
|
|
@@ -18,18 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
|
-
};
|
|
27
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _GiftManager_c;
|
|
33
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
22
|
exports.GiftManager = void 0;
|
|
35
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -38,45 +26,45 @@ const _2_tl_js_1 = require("../2_tl.js");
|
|
|
38
26
|
const _3_types_js_1 = require("../3_types.js");
|
|
39
27
|
const _0_utilities_js_1 = require("./0_utilities.js");
|
|
40
28
|
class GiftManager {
|
|
29
|
+
#c;
|
|
41
30
|
constructor(c) {
|
|
42
|
-
|
|
43
|
-
__classPrivateFieldSet(this, _GiftManager_c, c, "f");
|
|
31
|
+
this.#c = c;
|
|
44
32
|
}
|
|
45
33
|
async getGifts() {
|
|
46
|
-
const gifts = await
|
|
34
|
+
const gifts = await this.#c.invoke({ _: "payments.getStarGifts", hash: 0 });
|
|
47
35
|
if (!(_2_tl_js_1.Api.is("payments.starGifts", gifts))) {
|
|
48
36
|
(0, _0_deps_js_1.unreachable)();
|
|
49
37
|
}
|
|
50
|
-
return await Promise.all(gifts.gifts.map((v) => (0, _3_types_js_1.constructGift)(v,
|
|
38
|
+
return await Promise.all(gifts.gifts.map((v) => (0, _3_types_js_1.constructGift)(v, this.#c.getEntity)));
|
|
51
39
|
}
|
|
52
40
|
async getClaimedGifts(chatId, params) {
|
|
53
|
-
|
|
41
|
+
this.#c.storage.assertUser("getClaimedGifts");
|
|
54
42
|
const offset = params?.offset ?? "";
|
|
55
43
|
const limit = (0, _0_utilities_js_1.getLimit)(params?.limit);
|
|
56
|
-
const peer = await
|
|
57
|
-
const result = await
|
|
58
|
-
return await (0, _3_types_js_1.constructClaimedGifts)(result,
|
|
44
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
45
|
+
const result = await this.#c.invoke({ _: "payments.getSavedStarGifts", peer, offset, limit });
|
|
46
|
+
return await (0, _3_types_js_1.constructClaimedGifts)(result, this.#c.getEntity);
|
|
59
47
|
}
|
|
60
48
|
async sendGift(chatId, giftId, params) {
|
|
61
49
|
const hide_name = params?.private ? true : undefined;
|
|
62
50
|
const include_upgrade = params?.upgrade ? true : undefined;
|
|
63
|
-
const peer = await
|
|
51
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
64
52
|
const gift_id = BigInt(giftId);
|
|
65
53
|
let message;
|
|
66
54
|
if (params?.message) {
|
|
67
|
-
const parsedText = await
|
|
55
|
+
const parsedText = await this.#c.messageManager.parseText(params.message, params);
|
|
68
56
|
message = { _: "textWithEntities", text: parsedText[0], entities: parsedText[1] ?? [] };
|
|
69
57
|
}
|
|
70
58
|
const invoice = { _: "inputInvoiceStarGift", hide_name, include_upgrade, peer, gift_id, message };
|
|
71
|
-
const paymentForm = await
|
|
72
|
-
await
|
|
59
|
+
const paymentForm = await this.#c.invoke({ _: "payments.getPaymentForm", invoice });
|
|
60
|
+
await this.#c.invoke({ _: "payments.sendStarsForm", form_id: paymentForm.form_id, invoice });
|
|
73
61
|
}
|
|
74
62
|
async sellGift(userId, messageId) {
|
|
75
|
-
const message = await
|
|
76
|
-
if (message
|
|
63
|
+
const message = await this.#c.messageManager.getMessage(userId, messageId);
|
|
64
|
+
if (message === null) {
|
|
77
65
|
throw new _0_errors_js_1.InputError("Message not found.");
|
|
78
66
|
}
|
|
79
|
-
await
|
|
67
|
+
await this.#c.invoke({ _: "payments.convertStarGift", stargift: { _: "inputSavedStarGiftUser", msg_id: message.id } });
|
|
80
68
|
}
|
|
81
69
|
async getGift(slug) {
|
|
82
70
|
if (slug.length > 100) {
|
|
@@ -86,9 +74,8 @@ class GiftManager {
|
|
|
86
74
|
if (!/^[a-z]+-[1-9][0-9]*$/.test(slug)) {
|
|
87
75
|
throw new _0_errors_js_1.InputError("Invalid slug.");
|
|
88
76
|
}
|
|
89
|
-
const result = await
|
|
90
|
-
return await (0, _3_types_js_1.constructGift)(result.gift,
|
|
77
|
+
const result = await this.#c.invoke({ _: "payments.getUniqueStarGift", slug });
|
|
78
|
+
return await (0, _3_types_js_1.constructGift)(result.gift, this.#c.getEntity.bind(this));
|
|
91
79
|
}
|
|
92
80
|
}
|
|
93
81
|
exports.GiftManager = GiftManager;
|
|
94
|
-
_GiftManager_c = new WeakMap();
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import { ID, InlineQueryResult, Update } from "../3_types.js";
|
|
22
|
-
import { AnswerInlineQueryParams, SendInlineQueryParams } from "./0_params.js";
|
|
23
|
-
import { UpdateProcessor } from "./0_update_processor.js";
|
|
24
|
-
import { C as C_ } from "./1_types.js";
|
|
25
|
-
import { MessageManager } from "./3_message_manager.js";
|
|
21
|
+
import { type ID, type InlineQueryResult, type Update } from "../3_types.js";
|
|
22
|
+
import type { AnswerInlineQueryParams, SendInlineQueryParams } from "./0_params.js";
|
|
23
|
+
import type { UpdateProcessor } from "./0_update_processor.js";
|
|
24
|
+
import type { C as C_ } from "./1_types.js";
|
|
25
|
+
import type { MessageManager } from "./3_message_manager.js";
|
|
26
26
|
type C = C_ & {
|
|
27
27
|
messageManager: MessageManager;
|
|
28
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_inline_query_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_inline_query_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiF,EAAE,EAAE,iBAAiB,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"4_inline_query_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_inline_query_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiF,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA+B,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACzL,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,KAAK,CAAC,GAAG,EAAE,GAAG;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,CAAC;AAEjD,QAAA,MAAM,yBAAyB,0DAGrB,CAAC;AAEX,KAAK,wBAAwB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEtF,qBAAa,kBAAmB,YAAW,eAAe,CAAC,wBAAwB,CAAC;;gBAGtE,CAAC,EAAE,CAAC;IAIV,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,CAAC,EAAE,uBAAuB;IAMlG,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,IAAI,wBAAwB;IAIjE,YAAY,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC;IAU/D,eAAe,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,qBAAqB;CAsB7E"}
|
|
@@ -18,18 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
|
-
};
|
|
27
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _a, _InlineQueryManager_c, _InlineQueryManager_isExpired;
|
|
33
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
22
|
exports.InlineQueryManager = void 0;
|
|
35
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -41,46 +29,46 @@ const inlineQueryManagerUpdates = [
|
|
|
41
29
|
"updateBotInlineSend",
|
|
42
30
|
];
|
|
43
31
|
class InlineQueryManager {
|
|
32
|
+
#c;
|
|
44
33
|
constructor(c) {
|
|
45
|
-
|
|
46
|
-
__classPrivateFieldSet(this, _InlineQueryManager_c, c, "f");
|
|
34
|
+
this.#c = c;
|
|
47
35
|
}
|
|
48
36
|
async answerInlineQuery(id, results, params) {
|
|
49
|
-
|
|
37
|
+
this.#c.storage.assertBot("answerInlineQuery");
|
|
50
38
|
(0, _0_utilities_js_1.checkInlineQueryId)(id);
|
|
51
|
-
await
|
|
39
|
+
await this.#c.invoke({ _: "messages.setInlineBotResults", query_id: BigInt(id), results: await Promise.all(results.map((v) => (0, _3_types_js_1.inlineQueryResultToTlObject)(v, this.#c.messageManager.parseText.bind(this.#c.messageManager), this.#c.messageManager.usernameResolver.bind(this.#c.messageManager)))), cache_time: params?.cacheTime ?? 300, private: params?.isPersonal ? true : undefined, switch_webview: params?.button && params.button.miniApp ? ({ _: "inlineBotWebView", text: params.button.text, url: params.button.miniApp.url }) : undefined, switch_pm: params?.button && params.button.startParameter ? ({ _: "inlineBotSwitchPM", text: params.button.text, start_param: params.button.startParameter }) : undefined, gallery: params?.isGallery ? true : undefined, next_offset: params?.nextOffset });
|
|
52
40
|
}
|
|
53
41
|
canHandleUpdate(update) {
|
|
54
42
|
return _2_tl_js_1.Api.isOneOf(inlineQueryManagerUpdates, update);
|
|
55
43
|
}
|
|
56
44
|
async handleUpdate(update) {
|
|
57
45
|
if (_2_tl_js_1.Api.is("updateBotInlineQuery", update)) {
|
|
58
|
-
return { inlineQuery: await (0, _3_types_js_1.constructInlineQuery)(update,
|
|
46
|
+
return { inlineQuery: await (0, _3_types_js_1.constructInlineQuery)(update, this.#c.getEntity) };
|
|
59
47
|
}
|
|
60
48
|
else if (_2_tl_js_1.Api.is("updateBotInlineSend", update)) {
|
|
61
|
-
return { chosenInlineResult: await (0, _3_types_js_1.constructChosenInlineResult)(update,
|
|
49
|
+
return { chosenInlineResult: await (0, _3_types_js_1.constructChosenInlineResult)(update, this.#c.getEntity) };
|
|
62
50
|
}
|
|
63
51
|
else {
|
|
64
52
|
(0, _0_deps_js_1.unreachable)();
|
|
65
53
|
}
|
|
66
54
|
}
|
|
67
55
|
async sendInlineQuery(botId_, chatId, params) {
|
|
68
|
-
|
|
69
|
-
const bot = await
|
|
70
|
-
const botId = await
|
|
71
|
-
const maybeResults = await
|
|
72
|
-
if (maybeResults
|
|
56
|
+
this.#c.storage.assertUser("sendInlineQuery");
|
|
57
|
+
const bot = await this.#c.getInputUser(botId_), peer = await this.#c.getInputPeer(chatId), query = params?.query ?? "", offset = params?.offset ?? "";
|
|
58
|
+
const botId = await this.#c.getInputPeerChatId(bot), peerId = await this.#c.getInputPeerChatId(peer);
|
|
59
|
+
const maybeResults = await this.#c.messageStorage.getInlineQueryAnswer(botId, peerId, query, offset);
|
|
60
|
+
if (maybeResults !== null && !InlineQueryManager.#isExpired(maybeResults[1], maybeResults[0].cache_time)) {
|
|
73
61
|
return (0, _3_types_js_1.constructInlineQueryAnswer)(maybeResults[0]);
|
|
74
62
|
}
|
|
75
63
|
const then = new Date();
|
|
76
|
-
const results = await
|
|
64
|
+
const results = await this.#c.invoke({ _: "messages.getInlineBotResults", bot, peer, query, offset });
|
|
77
65
|
if (results.cache_time > 0) {
|
|
78
|
-
await
|
|
66
|
+
await this.#c.messageStorage.setInlineQueryAnswer(botId, peerId, query, offset, results, then);
|
|
79
67
|
}
|
|
80
68
|
return (0, _3_types_js_1.constructInlineQueryAnswer)(results);
|
|
81
69
|
}
|
|
70
|
+
static #isExpired(date, cacheTime) {
|
|
71
|
+
return (Date.now() - date.getTime()) / 1000 > cacheTime;
|
|
72
|
+
}
|
|
82
73
|
}
|
|
83
74
|
exports.InlineQueryManager = InlineQueryManager;
|
|
84
|
-
_a = InlineQueryManager, _InlineQueryManager_c = new WeakMap(), _InlineQueryManager_isExpired = function _InlineQueryManager_isExpired(date, cacheTime) {
|
|
85
|
-
return (Date.now() - date.getTime()) / 1000 > cacheTime;
|
|
86
|
-
};
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import { Update } from "../3_types.js";
|
|
22
|
-
import { GetLinkPreviewParams } from "./0_params.js";
|
|
23
|
-
import { UpdateProcessor } from "./0_update_processor.js";
|
|
24
|
-
import { C as C_ } from "./1_types.js";
|
|
25
|
-
import { MessageManager } from "./3_message_manager.js";
|
|
21
|
+
import { type Update } from "../3_types.js";
|
|
22
|
+
import type { GetLinkPreviewParams } from "./0_params.js";
|
|
23
|
+
import type { UpdateProcessor } from "./0_update_processor.js";
|
|
24
|
+
import type { C as C_ } from "./1_types.js";
|
|
25
|
+
import type { MessageManager } from "./3_message_manager.js";
|
|
26
26
|
type C = C_ & {
|
|
27
27
|
messageManager: MessageManager;
|
|
28
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_link_preview_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_link_preview_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAwB,MAAM,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"4_link_preview_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_link_preview_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,KAAK,CAAC,GAAG,EAAE,GAAG;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,CAAC;AAEjD,QAAA,MAAM,yBAAyB,4BAErB,CAAC;AAEX,KAAK,wBAAwB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEtF,qBAAa,kBAAmB,YAAW,eAAe,CAAC,wBAAwB,CAAC;;gBAGtE,CAAC,EAAE,CAAC;IAIV,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB;IAehE,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,IAAI,wBAAwB;IAIjE,YAAY,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAI7E"}
|
|
@@ -18,18 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
|
-
};
|
|
27
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _LinkPreviewManager_c;
|
|
33
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
22
|
exports.LinkPreviewManager = void 0;
|
|
35
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -38,19 +26,19 @@ const linkPreviewManagerUpdates = [
|
|
|
38
26
|
"updateWebPage",
|
|
39
27
|
];
|
|
40
28
|
class LinkPreviewManager {
|
|
29
|
+
#c;
|
|
41
30
|
constructor(c) {
|
|
42
|
-
|
|
43
|
-
__classPrivateFieldSet(this, _LinkPreviewManager_c, c, "f");
|
|
31
|
+
this.#c = c;
|
|
44
32
|
}
|
|
45
33
|
async getLinkPreview(text, params) {
|
|
46
|
-
const [text_, entities_] = await
|
|
47
|
-
const result = await
|
|
34
|
+
const [text_, entities_] = await this.#c.messageManager.parseText(text, params);
|
|
35
|
+
const result = await this.#c.invoke({
|
|
48
36
|
_: "messages.getWebPagePreview",
|
|
49
37
|
message: text_,
|
|
50
38
|
entities: entities_,
|
|
51
39
|
});
|
|
52
40
|
if (_2_tl_js_1.Api.is("messageMediaWebPage", result.media)) {
|
|
53
|
-
return await (0, _3_types_js_1.constructLinkPreview)(result.media, undefined,
|
|
41
|
+
return await (0, _3_types_js_1.constructLinkPreview)(result.media, undefined, this.#c.getEntity);
|
|
54
42
|
}
|
|
55
43
|
else {
|
|
56
44
|
return null;
|
|
@@ -60,9 +48,8 @@ class LinkPreviewManager {
|
|
|
60
48
|
return _2_tl_js_1.Api.isOneOf(linkPreviewManagerUpdates, update);
|
|
61
49
|
}
|
|
62
50
|
async handleUpdate(update) {
|
|
63
|
-
const linkPreview = await (0, _3_types_js_1.constructLinkPreview)({ _: "messageMediaWebPage", webpage: update.webpage }, undefined,
|
|
51
|
+
const linkPreview = await (0, _3_types_js_1.constructLinkPreview)({ _: "messageMediaWebPage", webpage: update.webpage }, undefined, this.#c.getEntity);
|
|
64
52
|
return { linkPreview };
|
|
65
53
|
}
|
|
66
54
|
}
|
|
67
55
|
exports.LinkPreviewManager = LinkPreviewManager;
|
|
68
|
-
_LinkPreviewManager_c = new WeakMap();
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import { ID, Update } from "../3_types.js";
|
|
22
|
-
import { UpdateProcessor } from "./0_update_processor.js";
|
|
23
|
-
import { C as C_ } from "./1_types.js";
|
|
24
|
-
import { MessageManager } from "./3_message_manager.js";
|
|
21
|
+
import { type ID, type Update } from "../3_types.js";
|
|
22
|
+
import type { UpdateProcessor } from "./0_update_processor.js";
|
|
23
|
+
import type { C as C_ } from "./1_types.js";
|
|
24
|
+
import type { MessageManager } from "./3_message_manager.js";
|
|
25
25
|
type C = C_ & {
|
|
26
26
|
messageManager: MessageManager;
|
|
27
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_poll_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_poll_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsC,EAAE,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"4_poll_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_poll_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsC,KAAK,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,KAAK,CAAC,GAAG,EAAE,GAAG;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,CAAC;AAEjD,QAAA,MAAM,kBAAkB,yDAGd,CAAC;AAEX,KAAK,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAExE,qBAAa,WAAY,YAAW,eAAe,CAAC,iBAAiB,CAAC;;gBAGxD,CAAC,EAAE,CAAC;IAIV,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE;IAQ3D,WAAW,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM;IAwC/C,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,IAAI,iBAAiB;IAI1D,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAqBtE"}
|