@mtkruto/browser 0.136.0 → 0.138.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.js +3 -3
- package/esm/3_errors.d.ts +2 -2
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +2 -2
- package/esm/3_types.d.ts +2 -3
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +2 -3
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +1 -3
- package/esm/client/0_params.d.ts +17 -11
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +1 -1
- package/esm/client/1_client_generic.d.ts +19 -14
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/1_client_generic.js +1 -3
- package/esm/client/1_client_plain.d.ts +2 -6
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +1 -3
- package/esm/client/2_bot_info_manager.js +1 -1
- package/esm/client/2_business_connection_manager.js +1 -1
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +2 -0
- package/esm/client/2_payment_manager.js +1 -1
- package/esm/client/2_reaction_manager.js +4 -4
- package/esm/client/2_translations_manager.js +2 -2
- package/esm/client/2_update_manager.js +2 -2
- package/esm/client/3_account_manager.d.ts +2 -1
- package/esm/client/3_account_manager.d.ts.map +1 -1
- package/esm/client/3_account_manager.js +11 -4
- package/esm/client/3_filters.d.ts +94 -18
- package/esm/client/3_filters.d.ts.map +1 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +18 -21
- package/esm/client/3_video_chat_manager.js +1 -1
- package/esm/client/4_callback_query_manager.js +1 -1
- package/esm/client/4_chat_manager.js +3 -3
- package/esm/client/4_context.d.ts +155 -463
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +221 -506
- package/esm/client/4_inline_query_manager.js +3 -3
- package/esm/client/4_link_preview_manager.js +1 -1
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +4 -2
- package/esm/client/4_story_manager.js +4 -4
- package/esm/client/6_client.d.ts +20 -21
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +22 -19
- package/esm/client/6_client_dispatcher.d.ts +19 -14
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +20 -11
- package/esm/connection/1_connection_socks5.js +3 -3
- package/esm/connection/1_connection_socks5.node.js +3 -3
- package/esm/session/1_session.d.ts +2 -6
- package/esm/session/1_session.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_local_storage.js +10 -6
- package/esm/storage/2_storage_memory.d.ts.map +1 -1
- package/esm/storage/2_storage_memory.js +9 -5
- package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
- package/esm/storage/2_storage_session_storage.js +10 -6
- package/esm/types/0_bot_token_check_result.d.ts +0 -1
- package/esm/types/0_bot_token_check_result.d.ts.map +1 -1
- package/esm/types/0_callback_query_question.d.ts +0 -3
- package/esm/types/0_callback_query_question.d.ts.map +1 -1
- package/esm/types/0_chat_action_type.d.ts +0 -13
- package/esm/types/0_chat_action_type.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +4 -4
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_code_check_result.d.ts +0 -3
- package/esm/types/0_code_check_result.d.ts.map +1 -1
- package/esm/types/0_emoji_status.d.ts +0 -2
- package/esm/types/0_emoji_status.d.ts.map +1 -1
- package/esm/types/0_gift_component_rarity.d.ts +0 -5
- package/esm/types/0_gift_component_rarity.d.ts.map +1 -1
- package/esm/types/0_id.d.ts +1 -3
- package/esm/types/0_id.d.ts.map +1 -1
- package/{script/types/1_inline_query_result_button.d.ts → esm/types/0_inline_query_result_button.d.ts} +3 -4
- package/esm/types/0_inline_query_result_button.d.ts.map +1 -0
- package/esm/types/0_input_emoji_status.d.ts +0 -2
- package/esm/types/0_input_emoji_status.d.ts.map +1 -1
- package/esm/types/0_password_check_result.d.ts +0 -2
- package/esm/types/0_password_check_result.d.ts.map +1 -1
- package/esm/types/0_premium_subscription_duration.d.ts +1 -0
- package/esm/types/0_premium_subscription_duration.d.ts.map +1 -1
- package/esm/types/0_reaction.d.ts +0 -3
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_user_status.d.ts +3 -8
- package/esm/types/0_user_status.d.ts.map +1 -1
- package/esm/types/0_video_chat.d.ts +0 -3
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/1_available_reactions.d.ts +0 -3
- package/esm/types/1_available_reactions.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.d.ts +1 -8
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_chat_p.d.ts +1 -7
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_inline_keyboard_button.d.ts +25 -42
- package/esm/types/1_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_inline_keyboard_button.js +57 -64
- package/esm/types/1_input_gift.d.ts +0 -3
- package/esm/types/1_input_gift.d.ts.map +1 -1
- package/esm/types/1_input_story_content.d.ts +2 -2
- package/esm/types/1_input_story_content.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.d.ts +33 -34
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +81 -88
- package/esm/types/1_order_info.d.ts +1 -1
- package/esm/types/2_chat.d.ts +1 -3
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat_member.d.ts +6 -24
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_message_entity.d.ts +0 -20
- package/esm/types/2_message_entity.d.ts.map +1 -1
- package/esm/types/{0_mini_app_button_info.js → 2_profile_photo_list.d.ts} +10 -2
- package/esm/types/2_profile_photo_list.d.ts.map +1 -0
- package/esm/types/{0_keyboard_button_poll_type.d.ts → 2_profile_photo_list.js} +6 -5
- package/esm/types/2_reply_markup.d.ts +5 -13
- package/esm/types/2_reply_markup.d.ts.map +1 -1
- package/esm/types/2_reply_markup.js +13 -17
- package/esm/types/2_star_transaction_peer.d.ts +0 -8
- package/esm/types/2_star_transaction_peer.d.ts.map +1 -1
- package/esm/types/2_story_album_icon.d.ts +0 -2
- package/esm/types/2_story_album_icon.d.ts.map +1 -1
- package/esm/types/2_story_content.d.ts +3 -4
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_content.js +3 -3
- package/esm/types/2_story_privacy.d.ts +8 -9
- package/esm/types/2_story_privacy.d.ts.map +1 -1
- package/esm/types/2_story_privacy.js +23 -20
- package/esm/types/3_checklist_item.d.ts +2 -8
- package/esm/types/3_checklist_item.d.ts.map +1 -1
- package/esm/types/3_forward_header.d.ts +0 -5
- package/esm/types/3_forward_header.d.ts.map +1 -1
- package/esm/types/3_gift_upgraded_component.d.ts +0 -4
- package/esm/types/3_gift_upgraded_component.d.ts.map +1 -1
- package/esm/types/3_inline_query.d.ts.map +1 -1
- package/esm/types/3_inline_query.js +3 -2
- package/esm/types/3_input_media.d.ts +10 -20
- package/esm/types/3_input_media.d.ts.map +1 -1
- package/esm/types/3_invite_link.d.ts +0 -2
- package/esm/types/3_invite_link.d.ts.map +1 -1
- package/esm/types/3_invite_link.js +3 -4
- package/esm/types/4_gift.d.ts +1 -3
- package/esm/types/4_gift.d.ts.map +1 -1
- package/esm/types/4_reply_to.d.ts +6 -14
- package/esm/types/4_reply_to.d.ts.map +1 -1
- package/esm/types/5_gift_upgraded_information.d.ts +1 -1
- package/esm/types/5_gift_upgraded_information.d.ts.map +1 -1
- package/esm/types/5_gift_upgraded_information.js +2 -2
- package/esm/types/5_link_preview.d.ts +2 -18
- package/esm/types/5_link_preview.d.ts.map +1 -1
- package/esm/types/6_message.d.ts +91 -180
- package/esm/types/6_message.d.ts.map +1 -1
- package/esm/types/6_message.js +105 -121
- package/esm/types/6_message_content.d.ts +2 -7
- package/esm/types/6_message_content.d.ts.map +1 -1
- package/esm/types/7_inline_query_result.d.ts +10 -47
- package/esm/types/7_inline_query_result.d.ts.map +1 -1
- package/esm/types/7_inline_query_result.js +219 -152
- package/esm/types/7_topic.js +3 -3
- package/esm/types/8_update.d.ts +59 -106
- package/esm/types/8_update.d.ts.map +1 -1
- package/esm/utilities/0_int.d.ts +1 -3
- package/esm/utilities/0_int.d.ts.map +1 -1
- package/esm/utilities/1_logger.js +1 -1
- package/package.json +1 -1
- package/script/0_deps.js +3 -3
- package/script/3_errors.d.ts +2 -2
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +4 -4
- package/script/3_types.d.ts +2 -3
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +2 -3
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +1 -3
- package/script/client/0_params.d.ts +17 -11
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +1 -1
- package/script/client/1_client_generic.d.ts +19 -14
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/1_client_generic.js +1 -3
- package/script/client/1_client_plain.d.ts +2 -6
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +1 -3
- package/script/client/2_bot_info_manager.js +1 -1
- package/script/client/2_business_connection_manager.js +1 -1
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +2 -0
- package/script/client/2_payment_manager.js +1 -1
- package/script/client/2_reaction_manager.js +4 -4
- package/script/client/2_translations_manager.js +2 -2
- package/script/client/2_update_manager.js +2 -2
- package/script/client/3_account_manager.d.ts +2 -1
- package/script/client/3_account_manager.d.ts.map +1 -1
- package/script/client/3_account_manager.js +9 -2
- package/script/client/3_filters.d.ts +94 -18
- package/script/client/3_filters.d.ts.map +1 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +17 -20
- package/script/client/3_video_chat_manager.js +1 -1
- package/script/client/4_callback_query_manager.js +1 -1
- package/script/client/4_chat_manager.js +3 -3
- package/script/client/4_context.d.ts +155 -463
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +221 -506
- package/script/client/4_inline_query_manager.js +3 -3
- package/script/client/4_link_preview_manager.js +1 -1
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +4 -2
- package/script/client/4_story_manager.js +4 -4
- package/script/client/6_client.d.ts +20 -21
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +22 -19
- package/script/client/6_client_dispatcher.d.ts +19 -14
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +20 -11
- package/script/connection/1_connection_socks5.js +3 -3
- package/script/connection/1_connection_socks5.node.js +3 -3
- package/script/session/1_session.d.ts +2 -6
- package/script/session/1_session.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.d.ts.map +1 -1
- package/script/storage/2_storage_local_storage.js +10 -6
- package/script/storage/2_storage_memory.d.ts.map +1 -1
- package/script/storage/2_storage_memory.js +9 -5
- package/script/storage/2_storage_session_storage.d.ts.map +1 -1
- package/script/storage/2_storage_session_storage.js +10 -6
- package/script/types/0_bot_token_check_result.d.ts +0 -1
- package/script/types/0_bot_token_check_result.d.ts.map +1 -1
- package/script/types/0_callback_query_question.d.ts +0 -3
- package/script/types/0_callback_query_question.d.ts.map +1 -1
- package/script/types/0_chat_action_type.d.ts +0 -13
- package/script/types/0_chat_action_type.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +4 -4
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_code_check_result.d.ts +0 -3
- package/script/types/0_code_check_result.d.ts.map +1 -1
- package/script/types/0_emoji_status.d.ts +0 -2
- package/script/types/0_emoji_status.d.ts.map +1 -1
- package/script/types/0_gift_component_rarity.d.ts +0 -5
- package/script/types/0_gift_component_rarity.d.ts.map +1 -1
- package/script/types/0_id.d.ts +1 -3
- package/script/types/0_id.d.ts.map +1 -1
- package/{esm/types/1_inline_query_result_button.d.ts → script/types/0_inline_query_result_button.d.ts} +3 -4
- package/script/types/0_inline_query_result_button.d.ts.map +1 -0
- package/script/types/0_input_emoji_status.d.ts +0 -2
- package/script/types/0_input_emoji_status.d.ts.map +1 -1
- package/script/types/0_password_check_result.d.ts +0 -2
- package/script/types/0_password_check_result.d.ts.map +1 -1
- package/script/types/0_premium_subscription_duration.d.ts +1 -0
- package/script/types/0_premium_subscription_duration.d.ts.map +1 -1
- package/script/types/0_reaction.d.ts +0 -3
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_user_status.d.ts +3 -8
- package/script/types/0_user_status.d.ts.map +1 -1
- package/script/types/0_video_chat.d.ts +0 -3
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/1_available_reactions.d.ts +0 -3
- package/script/types/1_available_reactions.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.d.ts +1 -8
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_chat_p.d.ts +1 -7
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_inline_keyboard_button.d.ts +25 -42
- package/script/types/1_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/1_inline_keyboard_button.js +57 -64
- package/script/types/1_input_gift.d.ts +0 -3
- package/script/types/1_input_gift.d.ts.map +1 -1
- package/script/types/1_input_story_content.d.ts +2 -2
- package/script/types/1_input_story_content.d.ts.map +1 -1
- package/script/types/1_keyboard_button.d.ts +33 -34
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +81 -88
- package/script/types/1_order_info.d.ts +1 -1
- package/script/types/2_chat.d.ts +1 -3
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat_member.d.ts +6 -24
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_message_entity.d.ts +0 -20
- package/script/types/2_message_entity.d.ts.map +1 -1
- package/script/types/{0_keyboard_button_poll_type.d.ts → 2_profile_photo_list.d.ts} +10 -5
- package/script/types/2_profile_photo_list.d.ts.map +1 -0
- package/script/types/{0_mini_app_button_info.js → 2_profile_photo_list.js} +7 -3
- package/script/types/2_reply_markup.d.ts +5 -13
- package/script/types/2_reply_markup.d.ts.map +1 -1
- package/script/types/2_reply_markup.js +13 -17
- package/script/types/2_star_transaction_peer.d.ts +0 -8
- package/script/types/2_star_transaction_peer.d.ts.map +1 -1
- package/script/types/2_story_album_icon.d.ts +0 -2
- package/script/types/2_story_album_icon.d.ts.map +1 -1
- package/script/types/2_story_content.d.ts +3 -4
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_content.js +3 -3
- package/script/types/2_story_privacy.d.ts +8 -9
- package/script/types/2_story_privacy.d.ts.map +1 -1
- package/script/types/2_story_privacy.js +23 -20
- package/script/types/3_checklist_item.d.ts +2 -8
- package/script/types/3_checklist_item.d.ts.map +1 -1
- package/script/types/3_forward_header.d.ts +0 -5
- package/script/types/3_forward_header.d.ts.map +1 -1
- package/script/types/3_gift_upgraded_component.d.ts +0 -4
- package/script/types/3_gift_upgraded_component.d.ts.map +1 -1
- package/script/types/3_inline_query.d.ts.map +1 -1
- package/script/types/3_inline_query.js +3 -2
- package/script/types/3_input_media.d.ts +10 -20
- package/script/types/3_input_media.d.ts.map +1 -1
- package/script/types/3_invite_link.d.ts +0 -2
- package/script/types/3_invite_link.d.ts.map +1 -1
- package/script/types/3_invite_link.js +3 -4
- package/script/types/4_gift.d.ts +1 -3
- package/script/types/4_gift.d.ts.map +1 -1
- package/script/types/4_reply_to.d.ts +6 -14
- package/script/types/4_reply_to.d.ts.map +1 -1
- package/script/types/5_gift_upgraded_information.d.ts +1 -1
- package/script/types/5_gift_upgraded_information.d.ts.map +1 -1
- package/script/types/5_gift_upgraded_information.js +2 -2
- package/script/types/5_link_preview.d.ts +2 -18
- package/script/types/5_link_preview.d.ts.map +1 -1
- package/script/types/6_message.d.ts +91 -180
- package/script/types/6_message.d.ts.map +1 -1
- package/script/types/6_message.js +106 -122
- package/script/types/6_message_content.d.ts +2 -7
- package/script/types/6_message_content.d.ts.map +1 -1
- package/script/types/7_inline_query_result.d.ts +10 -47
- package/script/types/7_inline_query_result.d.ts.map +1 -1
- package/script/types/7_inline_query_result.js +219 -152
- package/script/types/7_topic.js +3 -3
- package/script/types/8_update.d.ts +59 -106
- package/script/types/8_update.d.ts.map +1 -1
- package/script/utilities/0_int.d.ts +1 -3
- package/script/utilities/0_int.d.ts.map +1 -1
- package/script/utilities/1_logger.js +1 -1
- package/esm/types/0_keyboard_button_poll_type.d.ts.map +0 -1
- package/esm/types/0_mini_app_button_info.d.ts +0 -26
- package/esm/types/0_mini_app_button_info.d.ts.map +0 -1
- package/esm/types/1_inline_query_result_button.d.ts.map +0 -1
- package/esm/types/1_inline_query_result_button.js +0 -20
- package/script/types/0_keyboard_button_poll_type.d.ts.map +0 -1
- package/script/types/0_mini_app_button_info.d.ts +0 -26
- package/script/types/0_mini_app_button_info.d.ts.map +0 -1
- package/script/types/1_inline_query_result_button.d.ts.map +0 -1
- package/script/types/1_inline_query_result_button.js +0 -21
- /package/esm/types/{0_keyboard_button_poll_type.js → 0_inline_query_result_button.js} +0 -0
- /package/script/types/{0_keyboard_button_poll_type.js → 0_inline_query_result_button.js} +0 -0
|
@@ -21,43 +21,35 @@ import type { Api } from "../2_tl.js";
|
|
|
21
21
|
import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
22
22
|
/** @unlisted */
|
|
23
23
|
export interface StarTransactionPeerUnsupported {
|
|
24
|
-
/** @discriminator */
|
|
25
24
|
type: "unsupported";
|
|
26
25
|
}
|
|
27
26
|
/** @unlisted */
|
|
28
27
|
export interface StarTransactionPeerAppStore {
|
|
29
|
-
/** @discriminator */
|
|
30
28
|
type: "appStore";
|
|
31
29
|
}
|
|
32
30
|
/** @unlisted */
|
|
33
31
|
export interface StarTransactionPeerPlayMarket {
|
|
34
|
-
/** @discriminator */
|
|
35
32
|
type: "playMarket";
|
|
36
33
|
}
|
|
37
34
|
/** @unlisted */
|
|
38
35
|
export interface StarTransactionPeerPremiumBot {
|
|
39
|
-
/** @discriminator */
|
|
40
36
|
type: "premiumBot";
|
|
41
37
|
}
|
|
42
38
|
/** @unlisted */
|
|
43
39
|
export interface StarTransactionPeerFragment {
|
|
44
|
-
/** @discriminator */
|
|
45
40
|
type: "fragment";
|
|
46
41
|
}
|
|
47
42
|
/** @unlisted */
|
|
48
43
|
export interface StarTransactionPeerChat {
|
|
49
|
-
/** @discriminator */
|
|
50
44
|
type: "chat";
|
|
51
45
|
chat: ChatP;
|
|
52
46
|
}
|
|
53
47
|
/** @unlisted */
|
|
54
48
|
export interface StarTransactionPeerAds {
|
|
55
|
-
/** @discriminator */
|
|
56
49
|
type: "ads";
|
|
57
50
|
}
|
|
58
51
|
/** @unlisted */
|
|
59
52
|
export interface StarTransactionPeerApi {
|
|
60
|
-
/** @discriminator */
|
|
61
53
|
type: "api";
|
|
62
54
|
}
|
|
63
55
|
/** Any type of star transaction peer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_star_transaction_peer.d.ts","sourceRoot":"","sources":["../../src/types/2_star_transaction_peer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC7C,
|
|
1
|
+
{"version":3,"file":"2_star_transaction_peer.d.ts","sourceRoot":"","sources":["../../src/types/2_star_transaction_peer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,KAAK,CAAC;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,KAAK,CAAC;CACb;AAED,yCAAyC;AACzC,MAAM,MAAM,mBAAmB,GAAG,8BAA8B,GAAG,2BAA2B,GAAG,6BAA6B,GAAG,6BAA6B,GAAG,2BAA2B,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,sBAAsB,CAAC;AAEzQ,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,CAAC,oBAAoB,EAAE,OAAO,EAAE,UAAU,GAAG,mBAAmB,CAwBrH"}
|
|
@@ -21,13 +21,11 @@ import type { Document } from "./1_document.js";
|
|
|
21
21
|
import type { Photo } from "./1_photo.js";
|
|
22
22
|
/** @unlisted */
|
|
23
23
|
export interface StoryAlbumIconPhoto {
|
|
24
|
-
/** @discriminator */
|
|
25
24
|
type: "photo";
|
|
26
25
|
photo: Photo;
|
|
27
26
|
}
|
|
28
27
|
/** @unlisted */
|
|
29
28
|
export interface StoryAlbumIconVideo {
|
|
30
|
-
/** @discriminator */
|
|
31
29
|
type: "video";
|
|
32
30
|
video: Document;
|
|
33
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_album_icon.d.ts","sourceRoot":"","sources":["../../src/types/2_story_album_icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,
|
|
1
|
+
{"version":3,"file":"2_story_album_icon.d.ts","sourceRoot":"","sources":["../../src/types/2_story_album_icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED,4BAA4B;AAC5B,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,mBAAmB,CAAC"}
|
|
@@ -22,18 +22,17 @@ import { type Photo } from "./1_photo.js";
|
|
|
22
22
|
import { type Video } from "./1_video.js";
|
|
23
23
|
/** @unlisted */
|
|
24
24
|
export interface StoryContentPhoto {
|
|
25
|
-
|
|
25
|
+
type: "photo";
|
|
26
26
|
photo: Photo;
|
|
27
27
|
}
|
|
28
28
|
/** @unlisted */
|
|
29
29
|
export interface StoryContentVideo {
|
|
30
|
-
|
|
30
|
+
type: "video";
|
|
31
31
|
video: Video;
|
|
32
32
|
}
|
|
33
33
|
/** @unlisted */
|
|
34
34
|
export interface StoryContentUnsupported {
|
|
35
|
-
|
|
36
|
-
unsupported: true;
|
|
35
|
+
type: "unsupported";
|
|
37
36
|
}
|
|
38
37
|
/** A story content. */
|
|
39
38
|
export type StoryContent = StoryContentPhoto | StoryContentVideo | StoryContentUnsupported;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_content.d.ts","sourceRoot":"","sources":["../../src/types/2_story_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1D,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,
|
|
1
|
+
{"version":3,"file":"2_story_content.d.ts","sourceRoot":"","sources":["../../src/types/2_story_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1D,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,uBAAuB;AACvB,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,uBAAuB,CAAC;AAE3F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,YAAY,GAAG,YAAY,CA0B3E"}
|
|
@@ -28,7 +28,7 @@ export function constructStoryContent(media) {
|
|
|
28
28
|
unreachable();
|
|
29
29
|
}
|
|
30
30
|
const photo = constructPhoto(Api.as("photo", media.photo));
|
|
31
|
-
return { photo };
|
|
31
|
+
return { type: "photo", photo };
|
|
32
32
|
}
|
|
33
33
|
else if (Api.is("messageMediaDocument", media)) {
|
|
34
34
|
const document = media.document;
|
|
@@ -43,9 +43,9 @@ export function constructStoryContent(media) {
|
|
|
43
43
|
const fileUniqueId = toUniqueFileId(fileId_);
|
|
44
44
|
const fileId = serializeFileId(fileId_);
|
|
45
45
|
const video_ = constructVideo(document, video, undefined, fileId, fileUniqueId);
|
|
46
|
-
return { video: video_ };
|
|
46
|
+
return { type: "video", video: video_ };
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
-
|
|
49
|
+
return { type: "unsupported" };
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -21,26 +21,25 @@ import { Api } from "../2_tl.js";
|
|
|
21
21
|
import type { PeerGetter } from "./1_chat_p.js";
|
|
22
22
|
/** @unlisted */
|
|
23
23
|
export interface StoryPrivacyEveryone {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
type: "everyone";
|
|
25
|
+
except: number[];
|
|
26
26
|
}
|
|
27
27
|
/** @unlisted */
|
|
28
|
-
export interface
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export interface StoryPrivacyContacts {
|
|
29
|
+
type: "contacts";
|
|
30
|
+
except: number[];
|
|
31
31
|
}
|
|
32
32
|
/** @unlisted */
|
|
33
33
|
export interface StoryPrivacyCloseFriends {
|
|
34
|
-
|
|
35
|
-
closeFriends: true;
|
|
34
|
+
type: "closeFriends";
|
|
36
35
|
}
|
|
37
36
|
/** @unlisted */
|
|
38
37
|
export interface StoryPrivacyOnly {
|
|
39
|
-
|
|
38
|
+
type: "only";
|
|
40
39
|
only: number[];
|
|
41
40
|
}
|
|
42
41
|
/** A story's privacy choice. */
|
|
43
|
-
export type StoryPrivacy = StoryPrivacyEveryone |
|
|
42
|
+
export type StoryPrivacy = StoryPrivacyEveryone | StoryPrivacyContacts | StoryPrivacyCloseFriends | StoryPrivacyOnly;
|
|
44
43
|
export declare function storyPrivacyToTlObject(privacy: StoryPrivacy, getPeer: PeerGetter): Api.InputPrivacyRule[];
|
|
45
44
|
export declare function constructStoryPrivacy(privacy: Api.PrivacyRule[]): StoryPrivacy;
|
|
46
45
|
//# sourceMappingURL=2_story_privacy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/2_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,
|
|
1
|
+
{"version":3,"file":"2_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/2_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,gCAAgC;AAChC,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,gBAAgB,CAAC;AAqBrB,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,GAAG,GAAG,CAAC,gBAAgB,EAAE,CAwBzG;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,GAAG,YAAY,CAY9E"}
|
|
@@ -40,37 +40,40 @@ function restrict(users_, rules, getPeer) {
|
|
|
40
40
|
}
|
|
41
41
|
export function storyPrivacyToTlObject(privacy, getPeer) {
|
|
42
42
|
const rules = new Array();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
switch (privacy.type) {
|
|
44
|
+
case "everyone":
|
|
45
|
+
restrict(privacy.except, rules, getPeer);
|
|
46
|
+
rules.push({ _: "inputPrivacyValueAllowAll" });
|
|
47
|
+
break;
|
|
48
|
+
case "contacts":
|
|
49
|
+
restrict(privacy.except, rules, getPeer);
|
|
50
|
+
rules.push({ _: "inputPrivacyValueAllowContacts" });
|
|
51
|
+
break;
|
|
52
|
+
case "closeFriends":
|
|
53
|
+
rules.push({ _: "inputPrivacyValueAllowCloseFriends" });
|
|
54
|
+
break;
|
|
55
|
+
case "only": {
|
|
56
|
+
if (!privacy.only.length) {
|
|
57
|
+
unreachable();
|
|
58
|
+
}
|
|
59
|
+
const users = resolveUsers(privacy.only, getPeer);
|
|
60
|
+
rules.push({ _: "inputPrivacyValueAllowUsers", users });
|
|
61
|
+
break;
|
|
57
62
|
}
|
|
58
|
-
const users = resolveUsers(privacy.only, getPeer);
|
|
59
|
-
rules.push({ _: "inputPrivacyValueAllowUsers", users });
|
|
60
63
|
}
|
|
61
64
|
return rules;
|
|
62
65
|
}
|
|
63
66
|
export function constructStoryPrivacy(privacy) {
|
|
64
67
|
const except = privacy.find((v) => Api.is("privacyValueDisallowUsers", v))?.users?.map(Number) ?? [];
|
|
65
68
|
if (privacy.some((v) => Api.is("privacyValueAllowAll", v))) {
|
|
66
|
-
return {
|
|
69
|
+
return { type: "everyone", except };
|
|
67
70
|
}
|
|
68
71
|
else if (privacy.some((v) => Api.is("privacyValueAllowContacts", v))) {
|
|
69
|
-
return {
|
|
72
|
+
return { type: "contacts", except };
|
|
70
73
|
}
|
|
71
74
|
else if (privacy.some((v) => Api.is("privacyValueAllowCloseFriends", v))) {
|
|
72
|
-
return {
|
|
75
|
+
return { type: "closeFriends" };
|
|
73
76
|
}
|
|
74
77
|
const only = privacy.find((v) => Api.is("privacyValueAllowUsers", v))?.users?.map(Number) ?? [];
|
|
75
|
-
return { only };
|
|
78
|
+
return { type: "only", only };
|
|
76
79
|
}
|
|
@@ -26,10 +26,7 @@ import { type User } from "./2_user.js";
|
|
|
26
26
|
* @unlisted
|
|
27
27
|
*/
|
|
28
28
|
export interface ChecklistItemUnchecked {
|
|
29
|
-
/**
|
|
30
|
-
* The type of the checklist item.
|
|
31
|
-
* @discriminator
|
|
32
|
-
*/
|
|
29
|
+
/** The type of the checklist item. */
|
|
33
30
|
type: "unchecked";
|
|
34
31
|
/** The identifier of the checklist item. */
|
|
35
32
|
id: number;
|
|
@@ -43,10 +40,7 @@ export interface ChecklistItemUnchecked {
|
|
|
43
40
|
* @unlisted
|
|
44
41
|
*/
|
|
45
42
|
export interface ChecklistItemChecked {
|
|
46
|
-
/**
|
|
47
|
-
* The type of the checklist item.
|
|
48
|
-
* @discriminator
|
|
49
|
-
*/
|
|
43
|
+
/** The type of the checklist item. */
|
|
50
44
|
type: "checked";
|
|
51
45
|
/** The identifier of the to-do item. */
|
|
52
46
|
id: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_checklist_item.d.ts","sourceRoot":"","sources":["../../src/types/3_checklist_item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC
|
|
1
|
+
{"version":3,"file":"3_checklist_item.d.ts","sourceRoot":"","sources":["../../src/types/3_checklist_item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,sCAAsC;IACtC,IAAI,EAAE,WAAW,CAAC;IAClB,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,IAAI,EAAE,SAAS,CAAC;IAChB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,kCAAkC;AAClC,MAAM,MAAM,aAAa,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AAE1E,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,aAAa,CA4BpI"}
|
|
@@ -29,7 +29,6 @@ export interface _ForwardHeaderCommon {
|
|
|
29
29
|
* @unlisted
|
|
30
30
|
*/
|
|
31
31
|
export interface ForwardHeaderUser extends _ForwardHeaderCommon {
|
|
32
|
-
/** @discriminator */
|
|
33
32
|
type: "user";
|
|
34
33
|
user: User;
|
|
35
34
|
}
|
|
@@ -38,7 +37,6 @@ export interface ForwardHeaderUser extends _ForwardHeaderCommon {
|
|
|
38
37
|
* @unlisted
|
|
39
38
|
*/
|
|
40
39
|
export interface ForwardHeaderChannel extends _ForwardHeaderCommon {
|
|
41
|
-
/** @discriminator */
|
|
42
40
|
type: "channel";
|
|
43
41
|
chat: ChatPChannel;
|
|
44
42
|
messageId: number;
|
|
@@ -49,7 +47,6 @@ export interface ForwardHeaderChannel extends _ForwardHeaderCommon {
|
|
|
49
47
|
* @unlisted
|
|
50
48
|
*/
|
|
51
49
|
export interface ForwardHeaderSupergroup extends _ForwardHeaderCommon {
|
|
52
|
-
/** @discriminator */
|
|
53
50
|
type: "supergroup";
|
|
54
51
|
chat: ChatPSupergroup;
|
|
55
52
|
title?: string;
|
|
@@ -59,7 +56,6 @@ export interface ForwardHeaderSupergroup extends _ForwardHeaderCommon {
|
|
|
59
56
|
* @unlisted
|
|
60
57
|
*/
|
|
61
58
|
export interface ForwardHeaderHidden extends _ForwardHeaderCommon {
|
|
62
|
-
/** @discriminator */
|
|
63
59
|
type: "hidden";
|
|
64
60
|
name: string;
|
|
65
61
|
}
|
|
@@ -68,7 +64,6 @@ export interface ForwardHeaderHidden extends _ForwardHeaderCommon {
|
|
|
68
64
|
* @unlisted
|
|
69
65
|
*/
|
|
70
66
|
export interface ForwardHeaderUnsupported extends _ForwardHeaderCommon {
|
|
71
|
-
/** @discriminator */
|
|
72
67
|
type: "unsupported";
|
|
73
68
|
}
|
|
74
69
|
/** Any type of forward header. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_forward_header.d.ts","sourceRoot":"","sources":["../../src/types/3_forward_header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,
|
|
1
|
+
{"version":3,"file":"3_forward_header.d.ts","sourceRoot":"","sources":["../../src/types/3_forward_header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,kCAAkC;AAClC,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;AAEhJ,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,GAAG,CAAC,gBAAgB,EAAE,OAAO,EAAE,UAAU,GAAG,aAAa,CA8C1G"}
|
|
@@ -27,7 +27,6 @@ import { type MessageEntity } from "./2_message_entity.js";
|
|
|
27
27
|
* @unlisted
|
|
28
28
|
*/
|
|
29
29
|
export interface GiftUpgradedComponentModel {
|
|
30
|
-
/** @discriminator */
|
|
31
30
|
type: "model";
|
|
32
31
|
/** The name of the model. */
|
|
33
32
|
name: string;
|
|
@@ -42,7 +41,6 @@ export interface GiftUpgradedComponentModel {
|
|
|
42
41
|
* @unlisted
|
|
43
42
|
*/
|
|
44
43
|
export interface GiftUpgradedComponentPattern {
|
|
45
|
-
/** @discriminator */
|
|
46
44
|
type: "pattern";
|
|
47
45
|
/** The name of the pattern. */
|
|
48
46
|
name: string;
|
|
@@ -57,7 +55,6 @@ export interface GiftUpgradedComponentPattern {
|
|
|
57
55
|
* @unlisted
|
|
58
56
|
*/
|
|
59
57
|
export interface GiftUpgradedComponentBackdrop {
|
|
60
|
-
/** @discriminator */
|
|
61
58
|
type: "backdrop";
|
|
62
59
|
/** The name of the backdrop. */
|
|
63
60
|
name: string;
|
|
@@ -78,7 +75,6 @@ export interface GiftUpgradedComponentBackdrop {
|
|
|
78
75
|
* @unlisted
|
|
79
76
|
*/
|
|
80
77
|
export interface GiftUpgradedComponentOriginalDetails {
|
|
81
|
-
/** @discriminator */
|
|
82
78
|
type: "originalDetails";
|
|
83
79
|
senderId?: number;
|
|
84
80
|
recipientId: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/3_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAgC,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,
|
|
1
|
+
{"version":3,"file":"3_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/3_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAgC,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,M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;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"3_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/3_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAmCvG"}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
|
+
import { cleanObject } from "../1_utilities.js";
|
|
21
22
|
import { Api } from "../2_tl.js";
|
|
22
23
|
import { constructLocation } from "./0_location.js";
|
|
23
24
|
import { constructUser2 } from "./2_user.js";
|
|
@@ -49,12 +50,12 @@ export function constructInlineQuery(query_, getPeer) {
|
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
const location = query_.geo !== undefined && Api.is("geoPoint", query_.geo) ? constructLocation(query_.geo) : undefined;
|
|
52
|
-
return {
|
|
53
|
+
return cleanObject({
|
|
53
54
|
id: String(query_.query_id),
|
|
54
55
|
from: user,
|
|
55
56
|
query: query_.query,
|
|
56
57
|
offset: query_.offset,
|
|
57
58
|
chatType,
|
|
58
59
|
location,
|
|
59
|
-
};
|
|
60
|
+
});
|
|
60
61
|
}
|
|
@@ -40,10 +40,8 @@ export interface _InputMediaCommon {
|
|
|
40
40
|
}
|
|
41
41
|
/** @unlisted */
|
|
42
42
|
export interface InputMediaAnimation extends _InputMediaCommon {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* @discriminator
|
|
46
|
-
*/
|
|
43
|
+
type: "animation";
|
|
44
|
+
/** The animation. */
|
|
47
45
|
animation: FileSource;
|
|
48
46
|
/** A thumbnail to assign. Cannot be a URL. */
|
|
49
47
|
thumbnail?: FileSource;
|
|
@@ -58,10 +56,8 @@ export interface InputMediaAnimation extends _InputMediaCommon {
|
|
|
58
56
|
}
|
|
59
57
|
/** @unlisted */
|
|
60
58
|
export interface InputMediaAudio extends _InputMediaCommon {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @discriminator
|
|
64
|
-
*/
|
|
59
|
+
type: "audio";
|
|
60
|
+
/** The audio. */
|
|
65
61
|
audio: FileSource;
|
|
66
62
|
/** A thumbnail to assign. Cannot be a URL. */
|
|
67
63
|
thumbnail?: FileSource;
|
|
@@ -74,20 +70,16 @@ export interface InputMediaAudio extends _InputMediaCommon {
|
|
|
74
70
|
}
|
|
75
71
|
/** @unlisted */
|
|
76
72
|
export interface InputMediaDocument extends _InputMediaCommon {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
* @discriminator
|
|
80
|
-
*/
|
|
73
|
+
type: "document";
|
|
74
|
+
/** The document. */
|
|
81
75
|
document: FileSource;
|
|
82
76
|
/** A thumbnail to assign. Cannot be a URL. */
|
|
83
77
|
thumbnail?: FileSource;
|
|
84
78
|
}
|
|
85
79
|
/** @unlisted */
|
|
86
80
|
export interface InputMediaPhoto extends _InputMediaCommon {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
* @discriminator
|
|
90
|
-
*/
|
|
81
|
+
type: "photo";
|
|
82
|
+
/** The photo. */
|
|
91
83
|
photo: FileSource;
|
|
92
84
|
/** The width of the photo in pixels. */
|
|
93
85
|
width?: number;
|
|
@@ -99,10 +91,8 @@ export interface InputMediaPhoto extends _InputMediaCommon {
|
|
|
99
91
|
}
|
|
100
92
|
/** @unlisted */
|
|
101
93
|
export interface InputMediaVideo extends _InputMediaCommon {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
* @discriminator
|
|
105
|
-
*/
|
|
94
|
+
type: "video";
|
|
95
|
+
/** The video. */
|
|
106
96
|
video: FileSource;
|
|
107
97
|
/** A thumbnail to assign. Cannot be a URL. */
|
|
108
98
|
thumbnail?: FileSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_input_media.d.ts","sourceRoot":"","sources":["../../src/types/3_input_media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAu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AAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC;AAED,sBAAsB;AACtB,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,eAAe,GAAG,kBAAkB,GAAG,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -40,8 +40,6 @@ export interface InviteLink {
|
|
|
40
40
|
pendingJoinRequestCount?: number;
|
|
41
41
|
/** The amount of stars required to renew the subscription. */
|
|
42
42
|
subscriptionPrice?: number;
|
|
43
|
-
/** The remaining duration (in seconds) until the subscription expires. */
|
|
44
|
-
subscriptionExpiresIn?: number;
|
|
45
43
|
}
|
|
46
44
|
export declare function constructInviteLink(inviteLink_: Api.chatInviteExported, getPeer: PeerGetter): InviteLink;
|
|
47
45
|
//# sourceMappingURL=3_invite_link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_invite_link.d.ts","sourceRoot":"","sources":["../../src/types/3_invite_link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,0BAA0B;AAC1B,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,OAAO,EAAE,IAAI,CAAC;IACd,gGAAgG;IAChG,gBAAgB,EAAE,OAAO,CAAC;IAE1B,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"3_invite_link.d.ts","sourceRoot":"","sources":["../../src/types/3_invite_link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,0BAA0B;AAC1B,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,OAAO,EAAE,IAAI,CAAC;IACd,gGAAgG;IAChG,gBAAgB,EAAE,OAAO,CAAC;IAE1B,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CAwBxG"}
|
|
@@ -30,8 +30,8 @@ export function constructInviteLink(inviteLink_, getPeer) {
|
|
|
30
30
|
const requiresApproval = inviteLink_.request_needed ? true : false;
|
|
31
31
|
const isRevoked = inviteLink_.revoked ? true : false;
|
|
32
32
|
const title = inviteLink_.title;
|
|
33
|
-
const expiresAt = inviteLink_.expire_date
|
|
34
|
-
const limit = inviteLink_.usage_limit
|
|
33
|
+
const expiresAt = inviteLink_.expire_date;
|
|
34
|
+
const limit = inviteLink_.usage_limit;
|
|
35
35
|
const pendingJoinRequestCount = inviteLink_.requested;
|
|
36
36
|
return cleanObject({
|
|
37
37
|
inviteLink,
|
|
@@ -42,7 +42,6 @@ export function constructInviteLink(inviteLink_, getPeer) {
|
|
|
42
42
|
expiresAt,
|
|
43
43
|
limit,
|
|
44
44
|
pendingJoinRequestCount,
|
|
45
|
-
|
|
46
|
-
subscriptionExpiresAt: inviteLink_.subscription_expired || undefined,
|
|
45
|
+
subscriptionPrice: inviteLink_.subscription_pricing?.amount ? Number(inviteLink_.subscription_pricing.amount) : undefined,
|
|
47
46
|
});
|
|
48
47
|
}
|
package/esm/types/4_gift.d.ts
CHANGED
|
@@ -23,12 +23,11 @@ import type { ChatP, PeerGetter } from "./1_chat_p.js";
|
|
|
23
23
|
import { type Sticker } from "./1_sticker.js";
|
|
24
24
|
import { type GiftUpgradedComponent } from "./3_gift_upgraded_component.js";
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* A non-upgraded gift.
|
|
27
27
|
*
|
|
28
28
|
* @unlisted
|
|
29
29
|
*/
|
|
30
30
|
export interface GiftNonUpgraded {
|
|
31
|
-
/** @discriminator */
|
|
32
31
|
type: "nonupgraded";
|
|
33
32
|
/** The identifier of the gift. */
|
|
34
33
|
id: string;
|
|
@@ -61,7 +60,6 @@ export interface GiftNonUpgraded {
|
|
|
61
60
|
* @unlisted
|
|
62
61
|
*/
|
|
63
62
|
export interface GiftUpgraded {
|
|
64
|
-
/** @discriminator */
|
|
65
63
|
type: "upgraded";
|
|
66
64
|
/** The identifier of the gift. */
|
|
67
65
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_gift.d.ts","sourceRoot":"","sources":["../../src/types/4_gift.ts"],"names":[],"mappings":"AA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AAwB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,eAAe,CAqC5E"}
|
|
@@ -19,18 +19,12 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { ID } from "./0_id.js";
|
|
21
21
|
import type { ReplyQuote } from "./3_reply_quote.js";
|
|
22
|
-
/**
|
|
23
|
-
* Information on a message that another message is replying to.
|
|
24
|
-
* @unlisted */
|
|
22
|
+
/** Information on a message that another message is replying to. */
|
|
25
23
|
export interface ReplyToMessage {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* @discriminator
|
|
29
|
-
*/
|
|
24
|
+
type: "message";
|
|
25
|
+
/** The identifier of the message that is being replied to. */
|
|
30
26
|
messageId: number;
|
|
31
|
-
/**
|
|
32
|
-
* A quoted part of the message that is being replied to.
|
|
33
|
-
*/
|
|
27
|
+
/** A quoted part of the message that is being replied to. */
|
|
34
28
|
quote?: ReplyQuote;
|
|
35
29
|
}
|
|
36
30
|
/**
|
|
@@ -38,12 +32,10 @@ export interface ReplyToMessage {
|
|
|
38
32
|
* @unlisted
|
|
39
33
|
*/
|
|
40
34
|
export interface ReplyToStory {
|
|
35
|
+
type: "story";
|
|
41
36
|
/** The identifier of the chat that posted the story. */
|
|
42
37
|
chatId: ID;
|
|
43
|
-
/**
|
|
44
|
-
* The identifier of the story that is being replied to.
|
|
45
|
-
* @discriminator
|
|
46
|
-
*/
|
|
38
|
+
/** The identifier of the story that is being replied to. */
|
|
47
39
|
storyId: number;
|
|
48
40
|
}
|
|
49
41
|
/** Information on what a message is replying to. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_reply_to.d.ts","sourceRoot":"","sources":["../../src/types/4_reply_to.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"4_reply_to.d.ts","sourceRoot":"","sources":["../../src/types/4_reply_to.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,EAAE,CAAC;IACX,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC"}
|
|
@@ -34,7 +34,7 @@ export interface GiftUpgradedInformation {
|
|
|
34
34
|
to?: ChatP;
|
|
35
35
|
inputId?: string;
|
|
36
36
|
resalePrice?: number;
|
|
37
|
-
|
|
37
|
+
transferableAt?: number;
|
|
38
38
|
resellableAt?: number;
|
|
39
39
|
}
|
|
40
40
|
export declare function constructGiftUpgradedInformation(action: Api.messageActionStarGiftUnique, getPeer: PeerGetter): GiftUpgradedInformation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5_gift_upgraded_information.d.ts","sourceRoot":"","sources":["../../src/types/5_gift_upgraded_information.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE,uCAAuC;AACvC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"5_gift_upgraded_information.d.ts","sourceRoot":"","sources":["../../src/types/5_gift_upgraded_information.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvE,uCAAuC;AACvC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,GAAG,CAAC,2BAA2B,EAAE,OAAO,EAAE,UAAU,GAAG,uBAAuB,CAoCtI"}
|
|
@@ -34,7 +34,7 @@ export function constructGiftUpgradedInformation(action, getPeer) {
|
|
|
34
34
|
const to = action.peer ? getPeer(action.peer)?.[0] : undefined;
|
|
35
35
|
const inputId = action.saved_id ? String(action.saved_id) : undefined;
|
|
36
36
|
const resalePrice = action.resale_amount ? Number(action.resale_amount) : undefined;
|
|
37
|
-
const
|
|
37
|
+
const transferableAt = action.can_transfer_at;
|
|
38
38
|
const resellableAt = action.can_resell_at;
|
|
39
39
|
if ((action.from_id && !from) || (action.peer && !to)) {
|
|
40
40
|
unreachable();
|
|
@@ -52,7 +52,7 @@ export function constructGiftUpgradedInformation(action, getPeer) {
|
|
|
52
52
|
to,
|
|
53
53
|
inputId,
|
|
54
54
|
resalePrice,
|
|
55
|
-
|
|
55
|
+
transferableAt,
|
|
56
56
|
resellableAt,
|
|
57
57
|
});
|
|
58
58
|
}
|