@mtkruto/node 0.69.0 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (541) hide show
  1. package/esm/0_deps.d.ts +3 -1
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +3 -1
  4. package/esm/3_types.d.ts +35 -35
  5. package/esm/3_types.d.ts.map +1 -1
  6. package/esm/3_types.js +35 -35
  7. package/esm/_dnt.polyfills.d.ts +7 -0
  8. package/esm/_dnt.polyfills.d.ts.map +1 -1
  9. package/esm/_dnt.polyfills.js +109 -0
  10. package/esm/client/0_abortable_loop.d.ts +27 -0
  11. package/esm/client/0_abortable_loop.d.ts.map +1 -0
  12. package/esm/client/0_abortable_loop.js +49 -0
  13. package/esm/client/0_filters.d.ts +9 -3
  14. package/esm/client/0_filters.d.ts.map +1 -1
  15. package/esm/client/0_filters.js +4 -1
  16. package/esm/client/0_params.d.ts +1 -1
  17. package/esm/client/0_password.d.ts +2 -2
  18. package/esm/client/0_password.d.ts.map +1 -1
  19. package/esm/client/0_storage_operations.d.ts +53 -71
  20. package/esm/client/0_storage_operations.d.ts.map +1 -1
  21. package/esm/client/0_storage_operations.js +241 -238
  22. package/esm/client/0_update_processor.d.ts +2 -2
  23. package/esm/client/0_update_processor.d.ts.map +1 -1
  24. package/esm/client/0_utilities.d.ts +2 -2
  25. package/esm/client/0_utilities.d.ts.map +1 -1
  26. package/esm/client/1_types.d.ts +2 -2
  27. package/esm/client/1_types.d.ts.map +1 -1
  28. package/esm/client/2_account_manager.js +5 -5
  29. package/esm/client/2_business_connection_manager.d.ts +1 -1
  30. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  31. package/esm/client/2_business_connection_manager.js +3 -3
  32. package/esm/client/2_client_encrypted.d.ts +1 -1
  33. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  34. package/esm/client/2_file_manager.js +2 -2
  35. package/esm/client/2_payment_manager.d.ts +1 -1
  36. package/esm/client/2_payment_manager.d.ts.map +1 -1
  37. package/esm/client/2_payment_manager.js +2 -2
  38. package/esm/client/2_reaction_manager.d.ts +1 -1
  39. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  40. package/esm/client/2_reaction_manager.js +2 -2
  41. package/esm/client/2_translations_manager.d.ts +1 -1
  42. package/esm/client/2_translations_manager.d.ts.map +1 -1
  43. package/esm/client/2_translations_manager.js +15 -11
  44. package/esm/client/2_update_manager.d.ts +4 -2
  45. package/esm/client/2_update_manager.d.ts.map +1 -1
  46. package/esm/client/2_update_manager.js +61 -79
  47. package/esm/client/3_message_manager.d.ts +2 -2
  48. package/esm/client/3_message_manager.d.ts.map +1 -1
  49. package/esm/client/3_message_manager.js +5 -5
  50. package/esm/client/3_video_chat_manager.d.ts +1 -1
  51. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  52. package/esm/client/4_callback_query_manager.d.ts +1 -1
  53. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  54. package/esm/client/4_callback_query_manager.js +1 -1
  55. package/esm/client/4_chat_list_manager.d.ts +2 -3
  56. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  57. package/esm/client/4_chat_list_manager.js +10 -265
  58. package/esm/client/4_chat_manager.d.ts +2 -2
  59. package/esm/client/4_chat_manager.d.ts.map +1 -1
  60. package/esm/client/4_chat_manager.js +7 -7
  61. package/esm/client/4_gift_manager.js +3 -3
  62. package/esm/client/4_inline_query_manager.d.ts +1 -1
  63. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  64. package/esm/client/4_inline_query_manager.js +3 -3
  65. package/esm/client/4_link_preview_manager.d.ts +1 -1
  66. package/esm/client/4_link_preview_manager.d.ts.map +1 -1
  67. package/esm/client/4_link_preview_manager.js +3 -3
  68. package/esm/client/4_poll_manager.d.ts +1 -1
  69. package/esm/client/4_poll_manager.d.ts.map +1 -1
  70. package/esm/client/4_poll_manager.js +1 -1
  71. package/esm/client/4_story_manager.d.ts +1 -1
  72. package/esm/client/4_story_manager.d.ts.map +1 -1
  73. package/esm/client/4_story_manager.js +7 -7
  74. package/esm/client/5_client.d.ts +15 -9
  75. package/esm/client/5_client.d.ts.map +1 -1
  76. package/esm/client/5_client.js +420 -382
  77. package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
  78. package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
  79. package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +69 -0
  80. package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
  81. package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
  82. package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +140 -0
  83. package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
  84. package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
  85. package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.js +82 -0
  86. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
  87. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  88. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.js +109 -0
  89. package/esm/session/2_session_encrypted.d.ts +1 -1
  90. package/esm/session/2_session_encrypted.d.ts.map +1 -1
  91. package/esm/session/2_session_encrypted.js +71 -72
  92. package/esm/storage/0_storage.d.ts +1 -0
  93. package/esm/storage/0_storage.d.ts.map +1 -1
  94. package/esm/storage/2_storage_indexed_db.d.ts +1 -0
  95. package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
  96. package/esm/storage/2_storage_indexed_db.js +3 -0
  97. package/esm/storage/2_storage_local_storage.node.d.ts +1 -0
  98. package/esm/storage/2_storage_local_storage.node.d.ts.map +1 -1
  99. package/esm/storage/2_storage_local_storage.node.js +3 -0
  100. package/esm/storage/2_storage_memory.d.ts +1 -0
  101. package/esm/storage/2_storage_memory.d.ts.map +1 -1
  102. package/esm/storage/2_storage_memory.js +3 -0
  103. package/esm/storage/2_storage_session_storage.d.ts +1 -0
  104. package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
  105. package/esm/storage/2_storage_session_storage.js +3 -0
  106. package/esm/tl/0_utilities.d.ts +1 -0
  107. package/esm/tl/0_utilities.d.ts.map +1 -1
  108. package/esm/tl/0_utilities.js +20 -1
  109. package/esm/tl/1_telegram_api.d.ts +810 -254
  110. package/esm/tl/1_telegram_api.d.ts.map +1 -1
  111. package/esm/tl/1_telegram_api.js +912 -213
  112. package/esm/tl/1_tl_reader.d.ts +2 -2
  113. package/esm/tl/1_tl_reader.d.ts.map +1 -1
  114. package/esm/tl/1_tl_writer.d.ts +2 -2
  115. package/esm/tl/1_tl_writer.d.ts.map +1 -1
  116. package/esm/tl/2_mtproto.d.ts +1 -1
  117. package/esm/tl/2_mtproto.d.ts.map +1 -1
  118. package/esm/types/0_file_source.d.ts +1 -1
  119. package/esm/types/0_file_source.d.ts.map +1 -1
  120. package/esm/types/1_chat_p.d.ts +10 -0
  121. package/esm/types/1_chat_p.d.ts.map +1 -1
  122. package/esm/types/1_chat_p.js +4 -0
  123. package/esm/types/2_chat.d.ts +2 -5
  124. package/esm/types/2_chat.d.ts.map +1 -1
  125. package/esm/types/2_chat.js +10 -15
  126. package/esm/types/{0_message_entity.d.ts → 2_message_entity.d.ts} +3 -3
  127. package/esm/types/{0_message_entity.d.ts.map → 2_message_entity.d.ts.map} +1 -1
  128. package/esm/types/{0_message_entity.js → 2_message_entity.js} +7 -7
  129. package/esm/types/2_message_reaction_count.d.ts +2 -3
  130. package/esm/types/2_message_reaction_count.d.ts.map +1 -1
  131. package/esm/types/2_message_reaction_count.js +4 -6
  132. package/esm/types/2_poll_answer.d.ts +2 -3
  133. package/esm/types/2_poll_answer.d.ts.map +1 -1
  134. package/esm/types/2_poll_answer.js +4 -5
  135. package/esm/types/2_story_interactive_area.d.ts +2 -2
  136. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  137. package/esm/types/2_story_interactive_area.js +2 -2
  138. package/esm/types/{1_story_privacy.d.ts → 2_story_privacy.d.ts} +3 -3
  139. package/esm/types/{1_story_privacy.d.ts.map → 2_story_privacy.d.ts.map} +1 -1
  140. package/esm/types/{1_story_privacy.js → 2_story_privacy.js} +10 -10
  141. package/{script/types/1_user.d.ts → esm/types/2_user.d.ts} +5 -1
  142. package/esm/types/2_user.d.ts.map +1 -0
  143. package/esm/types/{1_user.js → 2_user.js} +24 -0
  144. package/esm/types/{2_business_connection.d.ts → 3_business_connection.d.ts} +4 -4
  145. package/esm/types/3_business_connection.d.ts.map +1 -0
  146. package/esm/types/{2_business_connection.js → 3_business_connection.js} +10 -3
  147. package/{script/types/2_chat_member.d.ts → esm/types/3_chat_member.d.ts} +6 -4
  148. package/esm/types/{2_chat_member.d.ts.map → 3_chat_member.d.ts.map} +1 -1
  149. package/esm/types/{2_chat_member.js → 3_chat_member.js} +5 -5
  150. package/esm/types/{2_chat_settings.d.ts → 3_chat_settings.d.ts} +2 -2
  151. package/{script/types/2_chat_settings.d.ts.map → esm/types/3_chat_settings.d.ts.map} +1 -1
  152. package/esm/types/{2_chat_settings.js → 3_chat_settings.js} +1 -1
  153. package/esm/types/{2_chosen_inline_result.d.ts → 3_chosen_inline_result.d.ts} +4 -4
  154. package/esm/types/3_chosen_inline_result.d.ts.map +1 -0
  155. package/esm/types/{2_chosen_inline_result.js → 3_chosen_inline_result.js} +3 -3
  156. package/esm/types/{2_forward_header.d.ts → 3_forward_header.d.ts} +4 -5
  157. package/esm/types/3_forward_header.d.ts.map +1 -0
  158. package/esm/types/{2_forward_header.js → 3_forward_header.js} +11 -12
  159. package/{script/types/2_game.d.ts → esm/types/3_game.d.ts} +2 -2
  160. package/esm/types/3_game.d.ts.map +1 -0
  161. package/esm/types/{2_gift_upgraded_component.d.ts → 3_gift_upgraded_component.d.ts} +2 -2
  162. package/esm/types/{2_gift_upgraded_component.d.ts.map → 3_gift_upgraded_component.d.ts.map} +1 -1
  163. package/esm/types/{2_gift_upgraded_component.js → 3_gift_upgraded_component.js} +1 -1
  164. package/esm/types/{2_inline_query.d.ts → 3_inline_query.d.ts} +4 -4
  165. package/esm/types/3_inline_query.d.ts.map +1 -0
  166. package/esm/types/{2_inline_query.js → 3_inline_query.js} +5 -5
  167. package/{script/types/1_input_media.d.ts → esm/types/3_input_media.d.ts} +2 -2
  168. package/esm/types/{1_input_media.d.ts.map → 3_input_media.d.ts.map} +1 -1
  169. package/{script/types/2_invite_link.d.ts → esm/types/3_invite_link.d.ts} +4 -4
  170. package/{script/types/2_invite_link.d.ts.map → esm/types/3_invite_link.d.ts.map} +1 -1
  171. package/esm/types/{2_invite_link.js → 3_invite_link.js} +5 -5
  172. package/{script/types/2_message_reactions.d.ts → esm/types/3_message_reactions.d.ts} +5 -6
  173. package/esm/types/3_message_reactions.d.ts.map +1 -0
  174. package/esm/types/{2_message_reactions.js → 3_message_reactions.js} +10 -12
  175. package/esm/types/{1_poll_option.d.ts → 3_poll_option.d.ts} +2 -2
  176. package/esm/types/{1_poll_option.d.ts.map → 3_poll_option.d.ts.map} +1 -1
  177. package/esm/types/{1_poll_option.js → 3_poll_option.js} +1 -1
  178. package/esm/types/{2_pre_checkout_query.d.ts → 3_pre_checkout_query.d.ts} +4 -4
  179. package/esm/types/3_pre_checkout_query.d.ts.map +1 -0
  180. package/esm/types/{2_pre_checkout_query.js → 3_pre_checkout_query.js} +5 -5
  181. package/{script/types/1_reply_quote.d.ts → esm/types/3_reply_quote.d.ts} +2 -2
  182. package/esm/types/{1_reply_quote.d.ts.map → 3_reply_quote.d.ts.map} +1 -1
  183. package/esm/types/{1_reply_quote.js → 3_reply_quote.js} +1 -1
  184. package/esm/types/3_story.d.ts +4 -5
  185. package/esm/types/3_story.d.ts.map +1 -1
  186. package/esm/types/3_story.js +6 -7
  187. package/esm/types/{3_chat_member_updated.d.ts → 4_chat_member_updated.d.ts} +6 -7
  188. package/esm/types/4_chat_member_updated.d.ts.map +1 -0
  189. package/esm/types/{3_chat_member_updated.js → 4_chat_member_updated.js} +13 -14
  190. package/esm/types/{3_gift.d.ts → 4_gift.d.ts} +6 -6
  191. package/esm/types/{3_gift.d.ts.map → 4_gift.d.ts.map} +1 -1
  192. package/esm/types/{3_gift.js → 4_gift.js} +7 -7
  193. package/esm/types/{3_join_request.d.ts → 4_join_request.d.ts} +6 -7
  194. package/esm/types/4_join_request.d.ts.map +1 -0
  195. package/esm/types/{3_join_request.js → 4_join_request.js} +17 -18
  196. package/esm/types/{2_poll.d.ts → 4_poll.d.ts} +3 -3
  197. package/esm/types/{2_poll.d.ts.map → 4_poll.d.ts.map} +1 -1
  198. package/esm/types/{2_poll.js → 4_poll.js} +2 -2
  199. package/{script/types/2_reply_to.d.ts → esm/types/4_reply_to.d.ts} +2 -2
  200. package/esm/types/{2_reply_to.d.ts.map → 4_reply_to.d.ts.map} +1 -1
  201. package/esm/types/{4_claimed_gift.d.ts → 5_claimed_gift.d.ts} +5 -6
  202. package/esm/types/5_claimed_gift.d.ts.map +1 -0
  203. package/esm/types/{4_claimed_gift.js → 5_claimed_gift.js} +4 -4
  204. package/esm/types/{4_link_preview.d.ts → 5_link_preview.d.ts} +4 -4
  205. package/{script/types/4_link_preview.d.ts.map → esm/types/5_link_preview.d.ts.map} +1 -1
  206. package/esm/types/{4_link_preview.js → 5_link_preview.js} +3 -3
  207. package/esm/types/{5_claimed_gifts.d.ts → 6_claimed_gifts.d.ts} +4 -4
  208. package/esm/types/6_claimed_gifts.d.ts.map +1 -0
  209. package/esm/types/{5_claimed_gifts.js → 6_claimed_gifts.js} +4 -4
  210. package/esm/types/{5_message.d.ts → 6_message.d.ts} +10 -11
  211. package/esm/types/6_message.d.ts.map +1 -0
  212. package/esm/types/{5_message.js → 6_message.js} +41 -66
  213. package/{script/types/5_message_content.d.ts → esm/types/6_message_content.d.ts} +3 -3
  214. package/esm/types/{5_message_content.d.ts.map → 6_message_content.d.ts.map} +1 -1
  215. package/{script/types/6_callback_query.d.ts → esm/types/7_callback_query.d.ts} +5 -5
  216. package/esm/types/{6_callback_query.d.ts.map → 7_callback_query.d.ts.map} +1 -1
  217. package/esm/types/{6_callback_query.js → 7_callback_query.js} +5 -5
  218. package/{script/types/6_chat_list_item.d.ts → esm/types/7_chat_list_item.d.ts} +6 -7
  219. package/esm/types/7_chat_list_item.d.ts.map +1 -0
  220. package/esm/types/{6_chat_list_item.js → 7_chat_list_item.js} +11 -11
  221. package/{script/types/6_inline_query_result.d.ts → esm/types/7_inline_query_result.d.ts} +3 -3
  222. package/esm/types/{6_inline_query_result.d.ts.map → 7_inline_query_result.d.ts.map} +1 -1
  223. package/esm/types/{6_inline_query_result.js → 7_inline_query_result.js} +1 -1
  224. package/esm/types/{6_saved_chat.d.ts → 7_saved_chat.d.ts} +4 -5
  225. package/esm/types/7_saved_chat.d.ts.map +1 -0
  226. package/esm/types/{6_saved_chat.js → 7_saved_chat.js} +4 -4
  227. package/esm/types/{6_topic.d.ts → 7_topic.d.ts} +2 -2
  228. package/esm/types/{6_topic.d.ts.map → 7_topic.d.ts.map} +1 -1
  229. package/esm/types/{7_inline_query_answer.d.ts → 8_inline_query_answer.d.ts} +2 -2
  230. package/esm/types/{7_inline_query_answer.d.ts.map → 8_inline_query_answer.d.ts.map} +1 -1
  231. package/esm/types/{7_inline_query_answer.js → 8_inline_query_answer.js} +1 -1
  232. package/{script/types/7_saved_chats.d.ts → esm/types/8_saved_chats.d.ts} +5 -5
  233. package/esm/types/8_saved_chats.d.ts.map +1 -0
  234. package/esm/types/{7_saved_chats.js → 8_saved_chats.js} +3 -3
  235. package/esm/types/{7_update.d.ts → 8_update.d.ts} +35 -16
  236. package/esm/types/8_update.d.ts.map +1 -0
  237. package/esm/types/_file_id.d.ts +1 -1
  238. package/esm/types/_file_id.d.ts.map +1 -1
  239. package/esm/types/_getters.d.ts +0 -7
  240. package/esm/types/_getters.d.ts.map +1 -1
  241. package/esm/utilities/0_hash.d.ts +2 -2
  242. package/esm/utilities/0_hash.d.ts.map +1 -1
  243. package/esm/utilities/0_misc.d.ts +1 -0
  244. package/esm/utilities/0_misc.d.ts.map +1 -1
  245. package/esm/utilities/0_misc.js +14 -1
  246. package/esm/utilities/0_part_stream.d.ts +1 -1
  247. package/esm/utilities/0_part_stream.d.ts.map +1 -1
  248. package/package.json +1 -1
  249. package/script/0_deps.d.ts +3 -1
  250. package/script/0_deps.d.ts.map +1 -1
  251. package/script/0_deps.js +6 -1
  252. package/script/3_types.d.ts +35 -35
  253. package/script/3_types.d.ts.map +1 -1
  254. package/script/3_types.js +35 -35
  255. package/script/_dnt.polyfills.d.ts +7 -0
  256. package/script/_dnt.polyfills.d.ts.map +1 -1
  257. package/script/_dnt.polyfills.js +109 -0
  258. package/script/client/0_abortable_loop.d.ts +27 -0
  259. package/script/client/0_abortable_loop.d.ts.map +1 -0
  260. package/script/client/0_abortable_loop.js +53 -0
  261. package/script/client/0_filters.d.ts +9 -3
  262. package/script/client/0_filters.d.ts.map +1 -1
  263. package/script/client/0_filters.js +4 -1
  264. package/script/client/0_params.d.ts +1 -1
  265. package/script/client/0_password.d.ts +2 -2
  266. package/script/client/0_password.d.ts.map +1 -1
  267. package/script/client/0_storage_operations.d.ts +53 -71
  268. package/script/client/0_storage_operations.d.ts.map +1 -1
  269. package/script/client/0_storage_operations.js +239 -236
  270. package/script/client/0_update_processor.d.ts +2 -2
  271. package/script/client/0_update_processor.d.ts.map +1 -1
  272. package/script/client/0_utilities.d.ts +2 -2
  273. package/script/client/0_utilities.d.ts.map +1 -1
  274. package/script/client/1_types.d.ts +2 -2
  275. package/script/client/1_types.d.ts.map +1 -1
  276. package/script/client/2_account_manager.js +5 -5
  277. package/script/client/2_business_connection_manager.d.ts +1 -1
  278. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  279. package/script/client/2_business_connection_manager.js +3 -3
  280. package/script/client/2_client_encrypted.d.ts +1 -1
  281. package/script/client/2_client_encrypted.d.ts.map +1 -1
  282. package/script/client/2_file_manager.js +2 -2
  283. package/script/client/2_payment_manager.d.ts +1 -1
  284. package/script/client/2_payment_manager.d.ts.map +1 -1
  285. package/script/client/2_payment_manager.js +2 -2
  286. package/script/client/2_reaction_manager.d.ts +1 -1
  287. package/script/client/2_reaction_manager.d.ts.map +1 -1
  288. package/script/client/2_reaction_manager.js +2 -2
  289. package/script/client/2_translations_manager.d.ts +1 -1
  290. package/script/client/2_translations_manager.d.ts.map +1 -1
  291. package/script/client/2_translations_manager.js +15 -11
  292. package/script/client/2_update_manager.d.ts +4 -2
  293. package/script/client/2_update_manager.d.ts.map +1 -1
  294. package/script/client/2_update_manager.js +61 -79
  295. package/script/client/3_message_manager.d.ts +2 -2
  296. package/script/client/3_message_manager.d.ts.map +1 -1
  297. package/script/client/3_message_manager.js +5 -5
  298. package/script/client/3_video_chat_manager.d.ts +1 -1
  299. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  300. package/script/client/4_callback_query_manager.d.ts +1 -1
  301. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  302. package/script/client/4_callback_query_manager.js +1 -1
  303. package/script/client/4_chat_list_manager.d.ts +2 -3
  304. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  305. package/script/client/4_chat_list_manager.js +9 -264
  306. package/script/client/4_chat_manager.d.ts +2 -2
  307. package/script/client/4_chat_manager.d.ts.map +1 -1
  308. package/script/client/4_chat_manager.js +7 -7
  309. package/script/client/4_gift_manager.js +3 -3
  310. package/script/client/4_inline_query_manager.d.ts +1 -1
  311. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  312. package/script/client/4_inline_query_manager.js +3 -3
  313. package/script/client/4_link_preview_manager.d.ts +1 -1
  314. package/script/client/4_link_preview_manager.d.ts.map +1 -1
  315. package/script/client/4_link_preview_manager.js +3 -3
  316. package/script/client/4_poll_manager.d.ts +1 -1
  317. package/script/client/4_poll_manager.d.ts.map +1 -1
  318. package/script/client/4_poll_manager.js +1 -1
  319. package/script/client/4_story_manager.d.ts +1 -1
  320. package/script/client/4_story_manager.d.ts.map +1 -1
  321. package/script/client/4_story_manager.js +7 -7
  322. package/script/client/5_client.d.ts +15 -9
  323. package/script/client/5_client.d.ts.map +1 -1
  324. package/script/client/5_client.js +418 -380
  325. package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
  326. package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
  327. package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +72 -0
  328. package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
  329. package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
  330. package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +144 -0
  331. package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
  332. package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
  333. package/script/deps/jsr.io/@std/cache/0.2.0/memoize.js +85 -0
  334. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
  335. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  336. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +113 -0
  337. package/script/session/2_session_encrypted.d.ts +1 -1
  338. package/script/session/2_session_encrypted.d.ts.map +1 -1
  339. package/script/session/2_session_encrypted.js +70 -71
  340. package/script/storage/0_storage.d.ts +1 -0
  341. package/script/storage/0_storage.d.ts.map +1 -1
  342. package/script/storage/2_storage_indexed_db.d.ts +1 -0
  343. package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
  344. package/script/storage/2_storage_indexed_db.js +3 -0
  345. package/script/storage/2_storage_local_storage.node.d.ts +1 -0
  346. package/script/storage/2_storage_local_storage.node.d.ts.map +1 -1
  347. package/script/storage/2_storage_local_storage.node.js +3 -0
  348. package/script/storage/2_storage_memory.d.ts +1 -0
  349. package/script/storage/2_storage_memory.d.ts.map +1 -1
  350. package/script/storage/2_storage_memory.js +3 -0
  351. package/script/storage/2_storage_session_storage.d.ts +1 -0
  352. package/script/storage/2_storage_session_storage.d.ts.map +1 -1
  353. package/script/storage/2_storage_session_storage.js +3 -0
  354. package/script/tl/0_utilities.d.ts +1 -0
  355. package/script/tl/0_utilities.d.ts.map +1 -1
  356. package/script/tl/0_utilities.js +20 -0
  357. package/script/tl/1_telegram_api.d.ts +810 -254
  358. package/script/tl/1_telegram_api.d.ts.map +1 -1
  359. package/script/tl/1_telegram_api.js +912 -213
  360. package/script/tl/1_tl_reader.d.ts +2 -2
  361. package/script/tl/1_tl_reader.d.ts.map +1 -1
  362. package/script/tl/1_tl_writer.d.ts +2 -2
  363. package/script/tl/1_tl_writer.d.ts.map +1 -1
  364. package/script/tl/2_mtproto.d.ts +1 -1
  365. package/script/tl/2_mtproto.d.ts.map +1 -1
  366. package/script/types/0_file_source.d.ts +1 -1
  367. package/script/types/0_file_source.d.ts.map +1 -1
  368. package/script/types/1_chat_p.d.ts +10 -0
  369. package/script/types/1_chat_p.d.ts.map +1 -1
  370. package/script/types/1_chat_p.js +5 -0
  371. package/script/types/2_chat.d.ts +2 -5
  372. package/script/types/2_chat.d.ts.map +1 -1
  373. package/script/types/2_chat.js +10 -15
  374. package/script/types/{0_message_entity.d.ts → 2_message_entity.d.ts} +3 -3
  375. package/script/types/{0_message_entity.d.ts.map → 2_message_entity.d.ts.map} +1 -1
  376. package/script/types/{0_message_entity.js → 2_message_entity.js} +7 -7
  377. package/script/types/2_message_reaction_count.d.ts +2 -3
  378. package/script/types/2_message_reaction_count.d.ts.map +1 -1
  379. package/script/types/2_message_reaction_count.js +4 -6
  380. package/script/types/2_poll_answer.d.ts +2 -3
  381. package/script/types/2_poll_answer.d.ts.map +1 -1
  382. package/script/types/2_poll_answer.js +4 -5
  383. package/script/types/2_story_interactive_area.d.ts +2 -2
  384. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  385. package/script/types/2_story_interactive_area.js +2 -2
  386. package/script/types/{1_story_privacy.d.ts → 2_story_privacy.d.ts} +3 -3
  387. package/script/types/{1_story_privacy.d.ts.map → 2_story_privacy.d.ts.map} +1 -1
  388. package/script/types/{1_story_privacy.js → 2_story_privacy.js} +10 -10
  389. package/{esm/types/1_user.d.ts → script/types/2_user.d.ts} +5 -1
  390. package/script/types/2_user.d.ts.map +1 -0
  391. package/script/types/{1_user.js → 2_user.js} +25 -0
  392. package/script/types/{2_business_connection.d.ts → 3_business_connection.d.ts} +4 -4
  393. package/script/types/3_business_connection.d.ts.map +1 -0
  394. package/script/types/{2_business_connection.js → 3_business_connection.js} +10 -3
  395. package/{esm/types/2_chat_member.d.ts → script/types/3_chat_member.d.ts} +6 -4
  396. package/script/types/{2_chat_member.d.ts.map → 3_chat_member.d.ts.map} +1 -1
  397. package/script/types/{2_chat_member.js → 3_chat_member.js} +5 -5
  398. package/script/types/{2_chat_settings.d.ts → 3_chat_settings.d.ts} +2 -2
  399. package/{esm/types/2_chat_settings.d.ts.map → script/types/3_chat_settings.d.ts.map} +1 -1
  400. package/script/types/{2_chat_settings.js → 3_chat_settings.js} +2 -2
  401. package/script/types/{2_chosen_inline_result.d.ts → 3_chosen_inline_result.d.ts} +4 -4
  402. package/script/types/3_chosen_inline_result.d.ts.map +1 -0
  403. package/script/types/{2_chosen_inline_result.js → 3_chosen_inline_result.js} +4 -4
  404. package/script/types/{2_forward_header.d.ts → 3_forward_header.d.ts} +4 -5
  405. package/script/types/3_forward_header.d.ts.map +1 -0
  406. package/script/types/{2_forward_header.js → 3_forward_header.js} +11 -12
  407. package/{esm/types/2_game.d.ts → script/types/3_game.d.ts} +2 -2
  408. package/script/types/3_game.d.ts.map +1 -0
  409. package/script/types/{2_gift_upgraded_component.d.ts → 3_gift_upgraded_component.d.ts} +2 -2
  410. package/script/types/{2_gift_upgraded_component.d.ts.map → 3_gift_upgraded_component.d.ts.map} +1 -1
  411. package/script/types/{2_gift_upgraded_component.js → 3_gift_upgraded_component.js} +2 -2
  412. package/script/types/{2_inline_query.d.ts → 3_inline_query.d.ts} +4 -4
  413. package/script/types/3_inline_query.d.ts.map +1 -0
  414. package/script/types/{2_inline_query.js → 3_inline_query.js} +5 -5
  415. package/{esm/types/1_input_media.d.ts → script/types/3_input_media.d.ts} +2 -2
  416. package/script/types/{1_input_media.d.ts.map → 3_input_media.d.ts.map} +1 -1
  417. package/{esm/types/2_invite_link.d.ts → script/types/3_invite_link.d.ts} +4 -4
  418. package/{esm/types/2_invite_link.d.ts.map → script/types/3_invite_link.d.ts.map} +1 -1
  419. package/script/types/{2_invite_link.js → 3_invite_link.js} +5 -5
  420. package/{esm/types/2_message_reactions.d.ts → script/types/3_message_reactions.d.ts} +5 -6
  421. package/script/types/3_message_reactions.d.ts.map +1 -0
  422. package/script/types/{2_message_reactions.js → 3_message_reactions.js} +10 -12
  423. package/script/types/{1_poll_option.d.ts → 3_poll_option.d.ts} +2 -2
  424. package/script/types/{1_poll_option.d.ts.map → 3_poll_option.d.ts.map} +1 -1
  425. package/script/types/{1_poll_option.js → 3_poll_option.js} +2 -2
  426. package/script/types/{2_pre_checkout_query.d.ts → 3_pre_checkout_query.d.ts} +4 -4
  427. package/script/types/3_pre_checkout_query.d.ts.map +1 -0
  428. package/script/types/{2_pre_checkout_query.js → 3_pre_checkout_query.js} +5 -5
  429. package/{esm/types/1_reply_quote.d.ts → script/types/3_reply_quote.d.ts} +2 -2
  430. package/script/types/{1_reply_quote.d.ts.map → 3_reply_quote.d.ts.map} +1 -1
  431. package/script/types/{1_reply_quote.js → 3_reply_quote.js} +2 -2
  432. package/script/types/3_story.d.ts +4 -5
  433. package/script/types/3_story.d.ts.map +1 -1
  434. package/script/types/3_story.js +8 -9
  435. package/script/types/{3_chat_member_updated.d.ts → 4_chat_member_updated.d.ts} +6 -7
  436. package/script/types/4_chat_member_updated.d.ts.map +1 -0
  437. package/script/types/{3_chat_member_updated.js → 4_chat_member_updated.js} +13 -14
  438. package/script/types/{3_gift.d.ts → 4_gift.d.ts} +6 -6
  439. package/script/types/{3_gift.d.ts.map → 4_gift.d.ts.map} +1 -1
  440. package/script/types/{3_gift.js → 4_gift.js} +9 -9
  441. package/script/types/{3_join_request.d.ts → 4_join_request.d.ts} +6 -7
  442. package/script/types/4_join_request.d.ts.map +1 -0
  443. package/script/types/{3_join_request.js → 4_join_request.js} +17 -18
  444. package/script/types/{2_poll.d.ts → 4_poll.d.ts} +3 -3
  445. package/script/types/{2_poll.d.ts.map → 4_poll.d.ts.map} +1 -1
  446. package/script/types/{2_poll.js → 4_poll.js} +5 -5
  447. package/{esm/types/2_reply_to.d.ts → script/types/4_reply_to.d.ts} +2 -2
  448. package/script/types/{2_reply_to.d.ts.map → 4_reply_to.d.ts.map} +1 -1
  449. package/script/types/{4_claimed_gift.d.ts → 5_claimed_gift.d.ts} +5 -6
  450. package/script/types/5_claimed_gift.d.ts.map +1 -0
  451. package/script/types/{4_claimed_gift.js → 5_claimed_gift.js} +5 -5
  452. package/script/types/{4_link_preview.d.ts → 5_link_preview.d.ts} +4 -4
  453. package/{esm/types/4_link_preview.d.ts.map → script/types/5_link_preview.d.ts.map} +1 -1
  454. package/script/types/{4_link_preview.js → 5_link_preview.js} +3 -3
  455. package/script/types/{5_claimed_gifts.d.ts → 6_claimed_gifts.d.ts} +4 -4
  456. package/script/types/6_claimed_gifts.d.ts.map +1 -0
  457. package/script/types/{5_claimed_gifts.js → 6_claimed_gifts.js} +4 -4
  458. package/script/types/{5_message.d.ts → 6_message.d.ts} +10 -11
  459. package/script/types/6_message.d.ts.map +1 -0
  460. package/script/types/{5_message.js → 6_message.js} +45 -70
  461. package/{esm/types/5_message_content.d.ts → script/types/6_message_content.d.ts} +3 -3
  462. package/script/types/{5_message_content.d.ts.map → 6_message_content.d.ts.map} +1 -1
  463. package/{esm/types/6_callback_query.d.ts → script/types/7_callback_query.d.ts} +5 -5
  464. package/script/types/{6_callback_query.d.ts.map → 7_callback_query.d.ts.map} +1 -1
  465. package/script/types/{6_callback_query.js → 7_callback_query.js} +5 -5
  466. package/{esm/types/6_chat_list_item.d.ts → script/types/7_chat_list_item.d.ts} +6 -7
  467. package/script/types/7_chat_list_item.d.ts.map +1 -0
  468. package/script/types/{6_chat_list_item.js → 7_chat_list_item.js} +11 -11
  469. package/{esm/types/6_inline_query_result.d.ts → script/types/7_inline_query_result.d.ts} +3 -3
  470. package/script/types/{6_inline_query_result.d.ts.map → 7_inline_query_result.d.ts.map} +1 -1
  471. package/script/types/{6_inline_query_result.js → 7_inline_query_result.js} +3 -3
  472. package/script/types/{6_saved_chat.d.ts → 7_saved_chat.d.ts} +4 -5
  473. package/script/types/7_saved_chat.d.ts.map +1 -0
  474. package/script/types/{6_saved_chat.js → 7_saved_chat.js} +4 -4
  475. package/script/types/{6_topic.d.ts → 7_topic.d.ts} +2 -2
  476. package/script/types/{6_topic.d.ts.map → 7_topic.d.ts.map} +1 -1
  477. package/script/types/{7_inline_query_answer.d.ts → 8_inline_query_answer.d.ts} +2 -2
  478. package/script/types/{7_inline_query_answer.d.ts.map → 8_inline_query_answer.d.ts.map} +1 -1
  479. package/script/types/{7_inline_query_answer.js → 8_inline_query_answer.js} +2 -2
  480. package/{esm/types/7_saved_chats.d.ts → script/types/8_saved_chats.d.ts} +5 -5
  481. package/script/types/8_saved_chats.d.ts.map +1 -0
  482. package/script/types/{7_saved_chats.js → 8_saved_chats.js} +3 -3
  483. package/script/types/{7_update.d.ts → 8_update.d.ts} +35 -16
  484. package/script/types/8_update.d.ts.map +1 -0
  485. package/script/types/_file_id.d.ts +1 -1
  486. package/script/types/_file_id.d.ts.map +1 -1
  487. package/script/types/_getters.d.ts +0 -7
  488. package/script/types/_getters.d.ts.map +1 -1
  489. package/script/utilities/0_hash.d.ts +2 -2
  490. package/script/utilities/0_hash.d.ts.map +1 -1
  491. package/script/utilities/0_misc.d.ts +1 -0
  492. package/script/utilities/0_misc.d.ts.map +1 -1
  493. package/script/utilities/0_misc.js +14 -0
  494. package/script/utilities/0_part_stream.d.ts +1 -1
  495. package/script/utilities/0_part_stream.d.ts.map +1 -1
  496. package/esm/types/1_user.d.ts.map +0 -1
  497. package/esm/types/2_business_connection.d.ts.map +0 -1
  498. package/esm/types/2_chosen_inline_result.d.ts.map +0 -1
  499. package/esm/types/2_forward_header.d.ts.map +0 -1
  500. package/esm/types/2_game.d.ts.map +0 -1
  501. package/esm/types/2_inline_query.d.ts.map +0 -1
  502. package/esm/types/2_message_reactions.d.ts.map +0 -1
  503. package/esm/types/2_pre_checkout_query.d.ts.map +0 -1
  504. package/esm/types/3_chat_member_updated.d.ts.map +0 -1
  505. package/esm/types/3_join_request.d.ts.map +0 -1
  506. package/esm/types/4_claimed_gift.d.ts.map +0 -1
  507. package/esm/types/5_claimed_gifts.d.ts.map +0 -1
  508. package/esm/types/5_message.d.ts.map +0 -1
  509. package/esm/types/6_chat_list_item.d.ts.map +0 -1
  510. package/esm/types/6_saved_chat.d.ts.map +0 -1
  511. package/esm/types/7_saved_chats.d.ts.map +0 -1
  512. package/esm/types/7_update.d.ts.map +0 -1
  513. package/script/types/1_user.d.ts.map +0 -1
  514. package/script/types/2_business_connection.d.ts.map +0 -1
  515. package/script/types/2_chosen_inline_result.d.ts.map +0 -1
  516. package/script/types/2_forward_header.d.ts.map +0 -1
  517. package/script/types/2_game.d.ts.map +0 -1
  518. package/script/types/2_inline_query.d.ts.map +0 -1
  519. package/script/types/2_message_reactions.d.ts.map +0 -1
  520. package/script/types/2_pre_checkout_query.d.ts.map +0 -1
  521. package/script/types/3_chat_member_updated.d.ts.map +0 -1
  522. package/script/types/3_join_request.d.ts.map +0 -1
  523. package/script/types/4_claimed_gift.d.ts.map +0 -1
  524. package/script/types/5_claimed_gifts.d.ts.map +0 -1
  525. package/script/types/5_message.d.ts.map +0 -1
  526. package/script/types/6_chat_list_item.d.ts.map +0 -1
  527. package/script/types/6_saved_chat.d.ts.map +0 -1
  528. package/script/types/7_saved_chats.d.ts.map +0 -1
  529. package/script/types/7_update.d.ts.map +0 -1
  530. /package/esm/types/{2_game.js → 3_game.js} +0 -0
  531. /package/esm/types/{1_input_media.js → 3_input_media.js} +0 -0
  532. /package/esm/types/{2_reply_to.js → 4_reply_to.js} +0 -0
  533. /package/esm/types/{5_message_content.js → 6_message_content.js} +0 -0
  534. /package/esm/types/{6_topic.js → 7_topic.js} +0 -0
  535. /package/esm/types/{7_update.js → 8_update.js} +0 -0
  536. /package/script/types/{2_game.js → 3_game.js} +0 -0
  537. /package/script/types/{1_input_media.js → 3_input_media.js} +0 -0
  538. /package/script/types/{2_reply_to.js → 4_reply_to.js} +0 -0
  539. /package/script/types/{5_message_content.js → 6_message_content.js} +0 -0
  540. /package/script/types/{6_topic.js → 7_topic.js} +0 -0
  541. /package/script/types/{7_update.js → 8_update.js} +0 -0
@@ -17,11 +17,18 @@
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 { constructUser } from "./1_user.js";
21
- export async function constructBusinessConnection(connection, getEntity) {
20
+ import { unreachable } from "../0_deps.js";
21
+ import { isChatPUser } from "./1_chat_p.js";
22
+ import { constructUser2 } from "./2_user.js";
23
+ export function constructBusinessConnection(connection, getPeer) {
24
+ const peer = getPeer({ ...connection, _: "peerUser" });
25
+ if (!peer || !isChatPUser(peer[0])) {
26
+ unreachable();
27
+ }
28
+ const user = constructUser2(peer[0]);
22
29
  return {
23
30
  id: connection.connection_id,
24
- user: constructUser((await getEntity({ ...connection, _: "peerUser" }))),
31
+ user,
25
32
  date: connection.date,
26
33
  canReply: !!connection.rights?.reply,
27
34
  isEnabled: !connection.disabled,
@@ -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 type { EntityGetter } from "./_getters.js";
22
21
  import { type ChatAdministratorRights } from "./0_chat_administrator_rights.js";
23
22
  import { type ChatMemberRights } from "./0_chat_member_rights.js";
24
- import { type User } from "./1_user.js";
23
+ import type { PeerGetter } from "./1_chat_p.js";
24
+ import { type User } from "./2_user.js";
25
25
  /** @unlisted */
26
26
  export type ChatMemberStatus = "creator" | "administrator" | "member" | "restricted" | "left" | "banned";
27
27
  /** @unlisted */
@@ -64,5 +64,7 @@ export interface ChatMemberBanned extends _ChatMemberBase {
64
64
  }
65
65
  /** A chat member. */
66
66
  export type ChatMember = ChatMemberCreator | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
67
- export declare function constructChatMember(participant: Api.ChannelParticipant | Api.ChatParticipant, getEntity: EntityGetter): Promise<ChatMember>;
68
- //# sourceMappingURL=2_chat_member.d.ts.map
67
+ export declare function constructChatMember(participant: Api.ChannelParticipant | Api.ChatParticipant | (Omit<Api.ChannelParticipant, "peer"> & {
68
+ peer: ReturnType<typeof getPeer>;
69
+ }), getPeer: PeerGetter): ChatMember;
70
+ //# sourceMappingURL=3_chat_member.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,KAAK,uBAAuB,EAAoC,MAAM,kCAAkC,CAAC;AAClH,OAAO,EAAE,KAAK,gBAAgB,EAA6B,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzG,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,gBAAg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AgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAqB;AACrB,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,uBAAuB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEnJ,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,GAAG,GAAG,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;CAAE,CAAC,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CA+E9M"}
@@ -22,12 +22,12 @@ import { cleanObject } from "../1_utilities.js";
22
22
  import { Api } from "../2_tl.js";
23
23
  import { constructChatAdministratorRights } from "./0_chat_administrator_rights.js";
24
24
  import { constructChatMemberRights } from "./0_chat_member_rights.js";
25
- import { constructUser } from "./1_user.js";
26
- export async function constructChatMember(participant, getEntity) {
27
- const user_ = "user_id" in participant ? await getEntity({ ...participant, _: "peerUser" }) : "peer" in participant ? Api.is("peerUser", participant.peer) ? await getEntity(participant.peer) : unreachable() : unreachable(); // TODO: support other peer types
28
- if (user_ === null)
25
+ import { constructUser2 } from "./2_user.js";
26
+ export function constructChatMember(participant, getPeer) {
27
+ const peer = "user_id" in participant ? getPeer({ ...participant, _: "peerUser" }) : "peer" in participant ? Array.isArray(participant.peer) ? participant.peer : Api.is("peerUser", participant.peer) ? getPeer(participant.peer) : unreachable() : unreachable(); // TODO: support other peer types
28
+ if (peer === null || peer[0].type !== "private")
29
29
  unreachable();
30
- const user = constructUser(user_);
30
+ const user = constructUser2(peer[0]);
31
31
  if (Api.is("channelParticipant", participant) || Api.is("chatParticipant", participant)) {
32
32
  return {
33
33
  status: "member",
@@ -18,7 +18,7 @@
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 { type User } from "./1_user.js";
21
+ import { type User } from "./2_user.js";
22
22
  export interface ChatSettings {
23
23
  report: boolean;
24
24
  addToContacts: boolean;
@@ -43,4 +43,4 @@ export interface ChatSettings {
43
43
  photoChangeDate?: number;
44
44
  }
45
45
  export declare function constructChatSettings(settings_: Api.messages_peerSettings): ChatSettings;
46
- //# sourceMappingURL=2_chat_settings.d.ts.map
46
+ //# sourceMappingURL=3_chat_settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_chat_settings.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAA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BxF"}
@@ -19,7 +19,7 @@
19
19
  */
20
20
  import { cleanObject } from "../1_utilities.js";
21
21
  import { Api } from "../2_tl.js";
22
- import { constructUser } from "./1_user.js";
22
+ import { constructUser } from "./2_user.js";
23
23
  export function constructChatSettings(settings_) {
24
24
  const settings = {
25
25
  report: settings_.settings.report_spam || false,
@@ -18,9 +18,9 @@
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 type { EntityGetter } from "./_getters.js";
22
21
  import { type Location } from "./0_location.js";
23
- import { type User } from "./1_user.js";
22
+ import type { PeerGetter } from "./1_chat_p.js";
23
+ import { type User } from "./2_user.js";
24
24
  /** A chosen inline result. */
25
25
  export interface ChosenInlineResult {
26
26
  /** The identifier of the inline result that was chosen. */
@@ -34,5 +34,5 @@ export interface ChosenInlineResult {
34
34
  /** The query that was used to obtain the result. */
35
35
  query: string;
36
36
  }
37
- export declare function constructChosenInlineResult(ubis: Api.updateBotInlineSend, getEntity: EntityGetter): Promise<ChosenInlineResult>;
38
- //# sourceMappingURL=2_chosen_inline_result.d.ts.map
37
+ export declare function constructChosenInlineResult(ubis: Api.updateBotInlineSend, getPeer: PeerGetter): ChosenInlineResult;
38
+ //# sourceMappingURL=3_chosen_inline_result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_chosen_inline_result.d.ts","sourceRoot":"","sources":["../../src/types/3_chosen_inline_result.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,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,GAAG,CAAC,mBAAmB,EAAE,OAAO,EAAE,UAAU,GAAG,kBAAkB,CAYlH"}
@@ -21,9 +21,9 @@ import { unreachable } from "../0_deps.js";
21
21
  import { base64EncodeUrlSafe, cleanObject } from "../1_utilities.js";
22
22
  import { Api } from "../2_tl.js";
23
23
  import { constructLocation } from "./0_location.js";
24
- import { constructUser } from "./1_user.js";
25
- export async function constructChosenInlineResult(ubis, getEntity) {
26
- const entity = await getEntity({ ...ubis, _: "peerUser" });
24
+ import { constructUser } from "./2_user.js";
25
+ export function constructChosenInlineResult(ubis, getPeer) {
26
+ const entity = getPeer({ ...ubis, _: "peerUser" });
27
27
  if (!entity || !(Api.is("user", entity))) {
28
28
  unreachable();
29
29
  }
@@ -18,9 +18,8 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import type { Api } from "../2_tl.js";
21
- import type { EntityGetter } from "./_getters.js";
22
- import { type ChatPChannel, type ChatPSupergroup } from "./1_chat_p.js";
23
- import { type User } from "./1_user.js";
21
+ import type { ChatPChannel, ChatPSupergroup, PeerGetter } from "./1_chat_p.js";
22
+ import { type User } from "./2_user.js";
24
23
  /** @unlisted */
25
24
  export interface _ForwardHeaderCommon {
26
25
  date: number;
@@ -55,5 +54,5 @@ export interface ForwardHeaderUnsupported extends _ForwardHeaderCommon {
55
54
  type: "unsupported";
56
55
  }
57
56
  export type ForwardHeader = ForwardHeaderUser | ForwardHeaderChannel | ForwardHeaderSupergroup | ForwardHeaderHidden | ForwardHeaderUnsupported;
58
- export declare function constructForwardHeader(fwdHeader: Api.MessageFwdHeader, getEntity: EntityGetter): Promise<ForwardHeader>;
59
- //# sourceMappingURL=2_forward_header.d.ts.map
57
+ export declare function constructForwardHeader(fwdHeader: Api.MessageFwdHeader, getPeer: PeerGetter): ForwardHeader;
58
+ //# sourceMappingURL=3_forward_header.d.ts.map
@@ -0,0 +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,gBAAgB;AAChB,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,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"}
@@ -19,43 +19,42 @@
19
19
  */
20
20
  import { unreachable } from "../0_deps.js";
21
21
  import { cleanObject } from "../1_utilities.js";
22
- import { constructChatP } from "./1_chat_p.js";
23
- import { constructUser } from "./1_user.js";
24
- export async function constructForwardHeader(fwdHeader, getEntity) {
22
+ import { constructUser2 } from "./2_user.js";
23
+ export function constructForwardHeader(fwdHeader, getPeer) {
25
24
  if (fwdHeader.channel_post && fwdHeader.from_id?._ === "peerChannel") {
26
- const chat = await getEntity(fwdHeader.from_id);
27
- if (chat === null) {
25
+ const peer = getPeer(fwdHeader.from_id);
26
+ if (peer === null) {
28
27
  unreachable();
29
28
  }
30
29
  return cleanObject({
31
30
  type: "channel",
32
31
  date: fwdHeader.date,
33
- chat: constructChatP(chat),
32
+ chat: peer[0],
34
33
  messageId: fwdHeader.channel_post,
35
34
  authorSignature: fwdHeader.post_author,
36
35
  });
37
36
  }
38
37
  else if (fwdHeader.from_id?._ === "peerChannel") {
39
- const chat = await getEntity(fwdHeader.from_id);
40
- if (chat === null) {
38
+ const peer = getPeer(fwdHeader.from_id);
39
+ if (peer === null) {
41
40
  unreachable();
42
41
  }
43
42
  return cleanObject({
44
43
  type: "supergroup",
45
44
  date: fwdHeader.date,
46
- chat: constructChatP(chat),
45
+ chat: peer[0],
47
46
  title: fwdHeader.post_author,
48
47
  });
49
48
  }
50
49
  else if (fwdHeader.from_id?._ === "peerUser") {
51
- const user = await getEntity(fwdHeader.from_id);
52
- if (user === null) {
50
+ const peer = getPeer(fwdHeader.from_id);
51
+ if (peer === null || peer[0].type !== "private") {
53
52
  unreachable();
54
53
  }
55
54
  return {
56
55
  type: "user",
57
56
  date: fwdHeader.date,
58
- user: constructUser(user),
57
+ user: constructUser2(peer[0]),
59
58
  };
60
59
  }
61
60
  else if (fwdHeader.from_name) {
@@ -18,9 +18,9 @@
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 type { MessageEntity } from "./0_message_entity.js";
22
21
  import { type Animation } from "./1_animation.js";
23
22
  import { type Photo } from "./1_photo.js";
23
+ import type { MessageEntity } from "./2_message_entity.js";
24
24
  /** A game. */
25
25
  export interface Game {
26
26
  /** The title of the game. */
@@ -37,4 +37,4 @@ export interface Game {
37
37
  animation?: Animation;
38
38
  }
39
39
  export declare function constructGame(media_: Api.messageMediaGame): Game;
40
- //# sourceMappingURL=2_game.d.ts.map
40
+ //# sourceMappingURL=3_game.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_game.d.ts","sourceRoot":"","sources":["../../src/types/3_game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CA0BhE"}
@@ -18,8 +18,8 @@
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 { type MessageEntity } from "./0_message_entity.js";
22
21
  import { type Sticker } from "./1_sticker.js";
22
+ import { type MessageEntity } from "./2_message_entity.js";
23
23
  /**
24
24
  * The model of an upgraded gift.
25
25
  *
@@ -92,4 +92,4 @@ export interface GiftUpgradedComponentOriginalDetails {
92
92
  */
93
93
  export type GiftUpgradedComponent = GiftUpgradedComponentModel | GiftUpgradedComponentPattern | GiftUpgradedComponentBackdrop | GiftUpgradedComponentOriginalDetails;
94
94
  export declare function constructGiftUpgradedComponent(attribute: Api.StarGiftAttribute): GiftUpgradedComponent;
95
- //# sourceMappingURL=2_gift_upgraded_component.d.ts.map
95
+ //# sourceMappingURL=3_gift_upgraded_component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/2_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACnD,qBAAqB;IACrB,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,4BAA4B,GAAG,6BAA6B,GAAG,oCAAoC,CAAC;AAErK,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAAG,qBAAqB,CA+DtG"}
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,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAA0B,KAAK,aAAa,E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CAAC,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAAG,qBAAqB,CA+DtG"}
@@ -21,8 +21,8 @@ import { unreachable } from "../0_deps.js";
21
21
  import { cleanObject } from "../1_utilities.js";
22
22
  import { Api } from "../2_tl.js";
23
23
  import { FileType, serializeFileId, toUniqueFileId } from "./_file_id.js";
24
- import { constructMessageEntity } from "./0_message_entity.js";
25
24
  import { constructSticker2 } from "./1_sticker.js";
25
+ import { constructMessageEntity } from "./2_message_entity.js";
26
26
  export function constructGiftUpgradedComponent(attribute) {
27
27
  const name = "name" in attribute ? attribute.name : "";
28
28
  const rarityLevel = "rarity_permille" in attribute ? attribute.rarity_permille : 0;
@@ -18,9 +18,9 @@
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 type { EntityGetter } from "./_getters.js";
22
21
  import { type Location } from "./0_location.js";
23
- import { type User } from "./1_user.js";
22
+ import type { PeerGetter } from "./1_chat_p.js";
23
+ import { type User } from "./2_user.js";
24
24
  /** An incoming inline query. */
25
25
  export interface InlineQuery {
26
26
  /** The identifier of the inline query. */
@@ -36,5 +36,5 @@ export interface InlineQuery {
36
36
  /** The location of the user who made the inline query. */
37
37
  location?: Location;
38
38
  }
39
- export declare function constructInlineQuery(query_: Api.updateBotInlineQuery, getEntity: EntityGetter): Promise<InlineQuery>;
40
- //# sourceMappingURL=2_inline_query.d.ts.map
39
+ export declare function constructInlineQuery(query_: Api.updateBotInlineQuery, getPeer: PeerGetter): InlineQuery;
40
+ //# sourceMappingURL=3_inline_query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/3_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,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"}
@@ -20,13 +20,13 @@
20
20
  import { unreachable } from "../0_deps.js";
21
21
  import { Api } from "../2_tl.js";
22
22
  import { constructLocation } from "./0_location.js";
23
- import { constructUser } from "./1_user.js";
24
- export async function constructInlineQuery(query_, getEntity) {
25
- const user_ = await getEntity({ _: "peerUser", user_id: query_.user_id });
26
- if (user_ === null) {
23
+ import { constructUser2 } from "./2_user.js";
24
+ export function constructInlineQuery(query_, getPeer) {
25
+ const peer = getPeer({ _: "peerUser", user_id: query_.user_id });
26
+ if (peer === null) {
27
27
  unreachable();
28
28
  }
29
- const user = constructUser(user_);
29
+ const user = constructUser2(peer[0]);
30
30
  let chatType;
31
31
  if (query_.peer_type !== undefined) {
32
32
  if (Api.is("inlineQueryPeerTypeSameBotPM", query_.peer_type)) {
@@ -18,9 +18,9 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import type { FileSource } from "./0_file_source.js";
21
- import type { MessageEntity } from "./0_message_entity.js";
22
21
  import type { ParseMode } from "./0_parse_mode.js";
23
22
  import type { SelfDestructOption } from "./0_self_destruct_option.js";
23
+ import type { MessageEntity } from "./2_message_entity.js";
24
24
  /** @unlisted */
25
25
  export interface _InputMediaCommon {
26
26
  /** The file name to assign if applicable. */
@@ -119,4 +119,4 @@ export interface InputMediaVideo extends _InputMediaCommon {
119
119
  selfDestruct?: SelfDestructOption;
120
120
  }
121
121
  export type InputMedia = InputMediaAnimation | InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo;
122
- //# sourceMappingURL=1_input_media.d.ts.map
122
+ //# sourceMappingURL=3_input_media.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_input_media.d.ts","sourceRoot":"","sources":["../../src/types/1_input_media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,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,uCAAuC;IACvC,eAAe,CAAC,EAAE,aAAa,EAAE,CAAC;IAClC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D;;;OAGG;IACH,SAAS,EAAE,UAAU,CAAC;I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CAAC;IACf,yCAAyC;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,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,eAAe,GAAG,kBAAkB,GAAG,eAAe,GAAG,eAAe,CAAC"}
@@ -18,8 +18,8 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import type { Api } from "../2_tl.js";
21
- import type { EntityGetter } from "./_getters.js";
22
- import { type User } from "./1_user.js";
21
+ import type { PeerGetter } from "./1_chat_p.js";
22
+ import { type User } from "./2_user.js";
23
23
  /** A chat invite link. */
24
24
  export interface InviteLink {
25
25
  /** The link itself. */
@@ -43,5 +43,5 @@ export interface InviteLink {
43
43
  /** The remaining duration (in seconds) until the subscription expires. */
44
44
  subscriptionExpiresIn?: number;
45
45
  }
46
- export declare function constructInviteLink(inviteLink_: Api.chatInviteExported, getEntity: EntityGetter): Promise<InviteLink>;
47
- //# sourceMappingURL=2_invite_link.d.ts.map
46
+ export declare function constructInviteLink(inviteLink_: Api.chatInviteExported, getPeer: PeerGetter): InviteLink;
47
+ //# sourceMappingURL=3_invite_link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_invite_link.d.ts","sourceRoot":"","sources":["../../src/types/2_invite_link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,0BAA0B;AAC1B,MAAM,WAAW,UAAU;IACzB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;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AC;IACf,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,EAAE,OAAO,EAAE,UAAU,GAAG,UAAU,CAyBxG"}
@@ -19,14 +19,14 @@
19
19
  */
20
20
  import { unreachable } from "../0_deps.js";
21
21
  import { cleanObject } from "../1_utilities.js";
22
- import { constructUser } from "./1_user.js";
23
- export async function constructInviteLink(inviteLink_, getEntity) {
24
- const entity = await getEntity({ _: "peerUser", user_id: inviteLink_.admin_id });
25
- if (!entity) {
22
+ import { constructUser2 } from "./2_user.js";
23
+ export function constructInviteLink(inviteLink_, getPeer) {
24
+ const peer = getPeer({ _: "peerUser", user_id: inviteLink_.admin_id });
25
+ if (!peer) {
26
26
  unreachable();
27
27
  }
28
28
  const inviteLink = inviteLink_.link;
29
- const creator = constructUser(entity);
29
+ const creator = constructUser2(peer[0]);
30
30
  const requiresApproval = inviteLink_.request_needed ? true : false;
31
31
  const revoked = inviteLink_.revoked ? true : false;
32
32
  const title = inviteLink_.title;
@@ -17,11 +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 { Api } from "../2_tl.js";
21
- import type { EntityGetter } from "./_getters.js";
20
+ import type { Api } from "../2_tl.js";
22
21
  import { type Reaction } from "./0_reaction.js";
23
- import { type ChatP } from "./1_chat_p.js";
24
- import { type User } from "./1_user.js";
22
+ import type { ChatP, PeerGetter } from "./1_chat_p.js";
23
+ import { type User } from "./2_user.js";
25
24
  /** The reactions of a user to a messages in a group. */
26
25
  export interface MessageReactions {
27
26
  /** The chat containing the message the user reacted to. */
@@ -39,5 +38,5 @@ export interface MessageReactions {
39
38
  /** The current reactions. */
40
39
  newReactions: Reaction[];
41
40
  }
42
- export declare function constructMessageReactions(update: Api.updateBotMessageReaction, getEntity: EntityGetter): Promise<MessageReactions | null>;
43
- //# sourceMappingURL=2_message_reactions.d.ts.map
41
+ export declare function constructMessageReactions(update: Api.updateBotMessageReaction, getPeer: PeerGetter): MessageReactions | null;
42
+ //# sourceMappingURL=3_message_reactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_message_reactions.d.ts","sourceRoot":"","sources":["../../src/types/3_message_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,IAAI,EAAE,KAAK,CAAC;IACZ,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,6FAA6F;IAC7F,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,6BAA6B;IAC7B,YAAY,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,EAAE,OAAO,EAAE,UAAU,GAAG,gBAAgB,GAAG,IAAI,CAkC5H"}
@@ -18,31 +18,29 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import { cleanObject } from "../1_utilities.js";
21
- import { Api } from "../2_tl.js";
22
21
  import { constructReaction } from "./0_reaction.js";
23
- import { constructChatP } from "./1_chat_p.js";
24
- import { constructUser } from "./1_user.js";
25
- export async function constructMessageReactions(update, getEntity) {
22
+ import { constructUser2 } from "./2_user.js";
23
+ export function constructMessageReactions(update, getPeer) {
26
24
  const date = update.date;
27
25
  const oldReactions = update.old_reactions.map((v) => constructReaction(v));
28
26
  const newReactions = update.new_reactions.map((v) => constructReaction(v));
29
27
  const messageId = update.msg_id;
30
- let entity = await getEntity(update.peer);
31
- if (!entity) {
28
+ let peer = getPeer(update.peer);
29
+ if (!peer) {
32
30
  return null;
33
31
  }
34
- const chat = constructChatP(entity);
32
+ const chat = peer[0];
35
33
  let user = undefined;
36
34
  let actorChat = undefined;
37
- entity = await getEntity(update.actor);
38
- if (!entity) {
35
+ peer = getPeer(update.actor);
36
+ if (!peer) {
39
37
  return null;
40
38
  }
41
- if (Api.is("user", entity)) {
42
- user = constructUser(entity);
39
+ if (peer[0].type === "private") {
40
+ user = constructUser2(peer[0]);
43
41
  }
44
42
  else {
45
- actorChat = constructChatP(entity);
43
+ actorChat = peer[0];
46
44
  }
47
45
  return cleanObject({
48
46
  chat,
@@ -18,7 +18,7 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import type { Api } from "../2_tl.js";
21
- import { type MessageEntity } from "./0_message_entity.js";
21
+ import { type MessageEntity } from "./2_message_entity.js";
22
22
  /** A poll option. */
23
23
  export interface PollOption {
24
24
  /** The option's text (1-100 characters). */
@@ -31,4 +31,4 @@ export interface PollOption {
31
31
  chosen: boolean;
32
32
  }
33
33
  export declare function constructPollOption(option: Api.PollAnswer, results: Array<Api.PollAnswerVoters>): PollOption;
34
- //# sourceMappingURL=1_poll_option.d.ts.map
34
+ //# sourceMappingURL=3_poll_option.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_poll_option.d.ts","sourceRoot":"","sources":["../../src/types/1_poll_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,qBAAqB;AACrB,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAQ5G"}
1
+ {"version":3,"file":"3_poll_option.d.ts","sourceRoot":"","sources":["../../src/types/3_poll_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,qBAAqB;AACrB,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAQ5G"}
@@ -17,7 +17,7 @@
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 { constructMessageEntity } from "./0_message_entity.js";
20
+ import { constructMessageEntity } from "./2_message_entity.js";
21
21
  export function constructPollOption(option, results) {
22
22
  const result = results.find((v) => v.option.every((v, i) => option.option[i] === v));
23
23
  return {
@@ -18,9 +18,9 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import type { Api } from "../2_tl.js";
21
- import type { EntityGetter } from "./_getters.js";
21
+ import type { PeerGetter } from "./1_chat_p.js";
22
22
  import { type OrderInfo } from "./1_order_info.js";
23
- import { type User } from "./1_user.js";
23
+ import { type User } from "./2_user.js";
24
24
  export interface PreCheckoutQuery {
25
25
  id: string;
26
26
  from: User;
@@ -30,5 +30,5 @@ export interface PreCheckoutQuery {
30
30
  shippingOptionId?: string;
31
31
  orderInfo?: OrderInfo;
32
32
  }
33
- export declare function constructPreCheckoutQuery(query: Api.updateBotPrecheckoutQuery, getEntity: EntityGetter): Promise<PreCheckoutQuery>;
34
- //# sourceMappingURL=2_pre_checkout_query.d.ts.map
33
+ export declare function constructPreCheckoutQuery(query: Api.updateBotPrecheckoutQuery, getPeer: PeerGetter): PreCheckoutQuery;
34
+ //# sourceMappingURL=3_pre_checkout_query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_pre_checkout_query.d.ts","sourceRoot":"","sources":["../../src/types/3_pre_checkout_query.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,EAAsB,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,GAAG,CAAC,yBAAyB,EAAE,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAerH"}
@@ -20,13 +20,13 @@
20
20
  import { unreachable } from "../0_deps.js";
21
21
  import { cleanObject, decodeText } from "../1_utilities.js";
22
22
  import { constructOrderInfo } from "./1_order_info.js";
23
- import { constructUser } from "./1_user.js";
24
- export async function constructPreCheckoutQuery(query, getEntity) {
25
- const user = await getEntity({ _: "peerUser", user_id: query.user_id });
26
- if (!user) {
23
+ import { constructUser2 } from "./2_user.js";
24
+ export function constructPreCheckoutQuery(query, getPeer) {
25
+ const peer = getPeer({ _: "peerUser", user_id: query.user_id });
26
+ if (!peer) {
27
27
  unreachable();
28
28
  }
29
- const from = constructUser(user);
29
+ const from = constructUser2(peer[0]);
30
30
  return cleanObject({
31
31
  id: String(query.query_id),
32
32
  from,
@@ -18,7 +18,7 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import type { Api } from "../2_tl.js";
21
- import { type MessageEntity } from "./0_message_entity.js";
21
+ import { type MessageEntity } from "./2_message_entity.js";
22
22
  /** A reference to a specific part of a message that is being replied to. */
23
23
  export interface ReplyQuote {
24
24
  /** The byte offset of the quoted text. */
@@ -29,4 +29,4 @@ export interface ReplyQuote {
29
29
  entities: MessageEntity[];
30
30
  }
31
31
  export declare function constructReplyQuote(quoteText: string | undefined, quoteOffset: number | undefined, quoteEntities: Api.MessageEntity[] | undefined): ReplyQuote;
32
- //# sourceMappingURL=1_reply_quote.d.ts.map
32
+ //# sourceMappingURL=3_reply_quote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_reply_quote.d.ts","sourceRoot":"","sources":["../../src/types/1_reply_quote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,SAAS,GAAG,UAAU,CAS9J"}
1
+ {"version":3,"file":"3_reply_quote.d.ts","sourceRoot":"","sources":["../../src/types/3_reply_quote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,GAAG,SAAS,GAAG,UAAU,CAS9J"}
@@ -17,7 +17,7 @@
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 { constructMessageEntity } from "./0_message_entity.js";
20
+ import { constructMessageEntity } from "./2_message_entity.js";
21
21
  export function constructReplyQuote(quoteText, quoteOffset, quoteEntities) {
22
22
  quoteText ??= "";
23
23
  quoteOffset ??= 0;