@mtkruto/browser 0.6.1 → 0.119.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2604) hide show
  1. package/README.md +75 -1
  2. package/esm/0_deps.d.ts +23 -13
  3. package/esm/0_deps.d.ts.map +1 -1
  4. package/esm/0_deps.js +25 -15
  5. package/esm/0_errors.d.ts +9 -2
  6. package/esm/0_errors.d.ts.map +1 -1
  7. package/esm/0_errors.js +19 -7
  8. package/esm/1_utilities.d.ts +6 -7
  9. package/esm/1_utilities.d.ts.map +1 -1
  10. package/esm/1_utilities.js +6 -7
  11. package/esm/2_connection.d.ts +1 -1
  12. package/esm/2_connection.js +1 -1
  13. package/esm/2_storage.d.ts +1 -1
  14. package/esm/2_storage.js +1 -1
  15. package/esm/2_tl.d.ts +7 -10
  16. package/esm/2_tl.d.ts.map +1 -1
  17. package/esm/2_tl.js +7 -10
  18. package/esm/3_errors.d.ts +8 -3
  19. package/esm/3_errors.d.ts.map +1 -1
  20. package/esm/3_errors.js +11 -14
  21. package/esm/3_transport.d.ts +4 -4
  22. package/esm/3_transport.js +4 -4
  23. package/esm/3_types.d.ts +74 -34
  24. package/esm/3_types.d.ts.map +1 -1
  25. package/esm/3_types.js +74 -34
  26. package/esm/4_constants.d.ts +21 -2
  27. package/esm/4_constants.d.ts.map +1 -1
  28. package/esm/4_constants.js +4 -4
  29. package/esm/4_errors.d.ts +4 -4
  30. package/esm/4_errors.d.ts.map +1 -1
  31. package/esm/4_errors.js +3 -13
  32. package/esm/4_session.d.ts +24 -0
  33. package/esm/4_session.d.ts.map +1 -0
  34. package/esm/4_session.js +23 -0
  35. package/esm/5_client.d.ts +9 -3
  36. package/esm/5_client.d.ts.map +1 -1
  37. package/esm/5_client.js +9 -3
  38. package/esm/_dnt.polyfills.d.ts +20 -0
  39. package/esm/_dnt.polyfills.d.ts.map +1 -1
  40. package/esm/_dnt.polyfills.js +120 -0
  41. package/esm/_dnt.shims.d.ts +0 -1
  42. package/esm/_dnt.shims.d.ts.map +1 -1
  43. package/esm/client/0_abortable_loop.d.ts +27 -0
  44. package/esm/client/0_abortable_loop.d.ts.map +1 -0
  45. package/esm/client/0_abortable_loop.js +56 -0
  46. package/esm/client/0_client_abstract.d.ts +31 -28
  47. package/esm/client/0_client_abstract.d.ts.map +1 -1
  48. package/esm/client/0_client_abstract.js +21 -90
  49. package/esm/client/0_html.d.ts +4 -3
  50. package/esm/client/0_html.d.ts.map +1 -1
  51. package/esm/client/0_html.js +412 -74
  52. package/esm/client/0_markdown.d.ts +2 -2
  53. package/esm/client/0_markdown.d.ts.map +1 -1
  54. package/esm/client/0_markdown.js +39 -19
  55. package/esm/client/0_params.d.ts +324 -41
  56. package/esm/client/0_params.d.ts.map +1 -1
  57. package/esm/client/0_params.js +1 -1
  58. package/esm/client/0_password.d.ts +6 -6
  59. package/esm/client/0_password.d.ts.map +1 -1
  60. package/esm/client/0_password.js +13 -13
  61. package/esm/client/0_storage_operations.d.ts +81 -69
  62. package/esm/client/0_storage_operations.d.ts.map +1 -1
  63. package/esm/client/0_storage_operations.js +396 -314
  64. package/esm/client/0_update_processor.d.ts +26 -0
  65. package/esm/client/0_update_processor.d.ts.map +1 -0
  66. package/esm/client/0_update_processor.js +20 -0
  67. package/esm/client/0_utilities.d.ts +10 -5
  68. package/esm/client/0_utilities.d.ts.map +1 -1
  69. package/esm/client/0_utilities.js +45 -31
  70. package/esm/client/0_worker_error.d.ts +26 -0
  71. package/esm/client/0_worker_error.d.ts.map +1 -0
  72. package/esm/client/0_worker_error.js +86 -0
  73. package/esm/client/0_worker_request.d.ts +27 -0
  74. package/esm/client/0_worker_request.d.ts.map +1 -0
  75. package/esm/client/0_worker_request.js +20 -0
  76. package/esm/client/1_client_generic.d.ts +1846 -0
  77. package/esm/client/1_client_generic.d.ts.map +1 -0
  78. package/esm/client/1_client_generic.js +24 -0
  79. package/esm/client/1_client_plain.d.ts +12 -9
  80. package/esm/client/1_client_plain.d.ts.map +1 -1
  81. package/esm/client/1_client_plain.js +36 -65
  82. package/esm/client/1_invoke_middleware.d.ts +32 -0
  83. package/esm/client/1_invoke_middleware.d.ts.map +1 -0
  84. package/esm/client/1_invoke_middleware.js +22 -0
  85. package/esm/client/1_types.d.ts +17 -32
  86. package/esm/client/1_types.d.ts.map +1 -1
  87. package/esm/client/1_types.js +1 -1
  88. package/esm/client/1_worker_response.d.ts +37 -0
  89. package/esm/client/1_worker_response.d.ts.map +1 -0
  90. package/esm/client/1_worker_response.js +20 -0
  91. package/esm/client/2_account_manager.d.ts +43 -5
  92. package/esm/client/2_account_manager.d.ts.map +1 -1
  93. package/esm/client/2_account_manager.js +368 -48
  94. package/esm/client/2_bot_info_manager.d.ts +12 -5
  95. package/esm/client/2_bot_info_manager.d.ts.map +1 -1
  96. package/esm/client/2_bot_info_manager.js +41 -39
  97. package/esm/client/2_business_connection_manager.d.ts +6 -5
  98. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  99. package/esm/client/2_business_connection_manager.js +16 -29
  100. package/esm/client/2_client_encrypted.d.ts +58 -0
  101. package/esm/client/2_client_encrypted.d.ts.map +1 -0
  102. package/esm/client/2_client_encrypted.js +273 -0
  103. package/esm/client/2_file_manager.d.ts +27 -7
  104. package/esm/client/2_file_manager.d.ts.map +1 -1
  105. package/esm/client/2_file_manager.js +365 -327
  106. package/esm/client/2_network_statistics_manager.d.ts +5 -5
  107. package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
  108. package/esm/client/2_network_statistics_manager.js +40 -27
  109. package/esm/client/2_payment_manager.d.ts +8 -7
  110. package/esm/client/2_payment_manager.d.ts.map +1 -1
  111. package/esm/client/2_payment_manager.js +13 -26
  112. package/esm/client/2_reaction_manager.d.ts +6 -5
  113. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  114. package/esm/client/2_reaction_manager.js +19 -32
  115. package/esm/client/2_sign_in.d.ts +25 -0
  116. package/esm/client/2_sign_in.d.ts.map +1 -0
  117. package/esm/client/2_sign_in.js +114 -0
  118. package/esm/client/2_translations_manager.d.ts +35 -0
  119. package/esm/client/2_translations_manager.d.ts.map +1 -0
  120. package/esm/client/2_translations_manager.js +161 -0
  121. package/esm/client/2_update_manager.d.ts +11 -8
  122. package/esm/client/2_update_manager.d.ts.map +1 -1
  123. package/esm/client/2_update_manager.js +841 -778
  124. package/esm/client/3_client_encrypted_pool.d.ts +29 -0
  125. package/esm/client/3_client_encrypted_pool.d.ts.map +1 -0
  126. package/esm/client/3_client_encrypted_pool.js +47 -0
  127. package/esm/client/3_filters.d.ts +96 -0
  128. package/esm/client/3_filters.d.ts.map +1 -0
  129. package/esm/client/3_filters.js +52 -0
  130. package/esm/client/3_message_manager.d.ts +30 -35
  131. package/esm/client/3_message_manager.d.ts.map +1 -1
  132. package/esm/client/3_message_manager.js +1083 -790
  133. package/esm/client/3_video_chat_manager.d.ts +11 -10
  134. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  135. package/esm/client/3_video_chat_manager.js +88 -96
  136. package/esm/client/4_callback_query_manager.d.ts +9 -8
  137. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  138. package/esm/client/4_callback_query_manager.js +25 -36
  139. package/esm/client/4_chat_list_manager.d.ts +20 -11
  140. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  141. package/esm/client/4_chat_list_manager.js +214 -444
  142. package/esm/client/4_chat_manager.d.ts +86 -0
  143. package/esm/client/4_chat_manager.d.ts.map +1 -0
  144. package/esm/client/4_chat_manager.js +478 -0
  145. package/esm/client/4_checklist_manager.d.ts +38 -0
  146. package/esm/client/4_checklist_manager.d.ts.map +1 -0
  147. package/esm/client/4_checklist_manager.js +68 -0
  148. package/esm/client/4_context.d.ts +691 -0
  149. package/esm/client/4_context.d.ts.map +1 -0
  150. package/esm/client/4_context.js +1406 -0
  151. package/esm/client/4_forum_manager.d.ts +40 -0
  152. package/esm/client/4_forum_manager.d.ts.map +1 -0
  153. package/esm/client/4_forum_manager.js +128 -0
  154. package/esm/client/4_gift_manager.d.ts +39 -0
  155. package/esm/client/4_gift_manager.d.ts.map +1 -0
  156. package/esm/client/4_gift_manager.js +84 -0
  157. package/esm/client/4_inline_query_manager.d.ts +10 -9
  158. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  159. package/esm/client/4_inline_query_manager.js +25 -37
  160. package/esm/client/4_link_preview_manager.d.ts +39 -0
  161. package/esm/client/4_link_preview_manager.d.ts.map +1 -0
  162. package/esm/client/4_link_preview_manager.js +51 -0
  163. package/esm/client/4_poll_manager.d.ts +39 -0
  164. package/esm/client/4_poll_manager.d.ts.map +1 -0
  165. package/esm/client/4_poll_manager.js +105 -0
  166. package/esm/client/4_story_manager.d.ts +11 -10
  167. package/esm/client/4_story_manager.d.ts.map +1 -1
  168. package/esm/client/4_story_manager.js +52 -64
  169. package/esm/client/5_composer.d.ts +51 -0
  170. package/esm/client/5_composer.d.ts.map +1 -0
  171. package/esm/client/5_composer.js +106 -0
  172. package/esm/client/6_client.d.ts +1952 -0
  173. package/esm/client/6_client.d.ts.map +1 -0
  174. package/esm/client/6_client.js +3409 -0
  175. package/esm/client/6_client_dispatcher.d.ts +1917 -0
  176. package/esm/client/6_client_dispatcher.d.ts.map +1 -0
  177. package/esm/client/6_client_dispatcher.js +2476 -0
  178. package/esm/client/7_client_worker.d.ts +27 -0
  179. package/esm/client/7_client_worker.d.ts.map +1 -0
  180. package/esm/client/7_client_worker.js +76 -0
  181. package/esm/connection/0_connection.d.ts +9 -8
  182. package/esm/connection/0_connection.d.ts.map +1 -1
  183. package/esm/connection/0_connection.js +1 -1
  184. package/esm/connection/1_connection_tcp.d.ts +4 -5
  185. package/esm/connection/1_connection_tcp.d.ts.map +1 -1
  186. package/esm/connection/1_connection_tcp.js +63 -91
  187. package/esm/connection/1_connection_web_socket.d.ts +3 -3
  188. package/esm/connection/1_connection_web_socket.d.ts.map +1 -1
  189. package/esm/connection/1_connection_web_socket.js +79 -98
  190. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts +18 -0
  191. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts.map +1 -0
  192. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js +63 -0
  193. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts +3 -0
  194. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts.map +1 -0
  195. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +293 -0
  196. package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +17 -0
  197. package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
  198. package/esm/deps/jsr.io/@std/assert/1.0.19/assert.js +23 -0
  199. package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts.map +1 -0
  200. package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +30 -0
  201. package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +25 -0
  202. package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
  203. package/esm/deps/jsr.io/@std/assert/1.0.19/equal.js +194 -0
  204. package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +37 -0
  205. package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
  206. package/esm/deps/jsr.io/@std/assert/1.0.19/equals.js +61 -0
  207. package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts +19 -0
  208. package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts.map +1 -0
  209. package/esm/deps/jsr.io/@std/assert/1.0.19/false.js +23 -0
  210. package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts.map +1 -0
  211. package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.js +20 -0
  212. package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts +2 -0
  213. package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +1 -0
  214. package/esm/deps/jsr.io/@std/async/1.2.0/_util.js +6 -0
  215. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +107 -0
  216. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +1 -0
  217. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.js +46 -0
  218. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +37 -0
  219. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +1 -0
  220. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.js +41 -0
  221. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +44 -0
  222. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +1 -0
  223. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.js +57 -0
  224. package/esm/deps/jsr.io/@std/async/1.2.0/delay.d.ts +45 -0
  225. package/esm/deps/jsr.io/@std/async/1.2.0/delay.d.ts.map +1 -0
  226. package/esm/deps/jsr.io/@std/async/1.2.0/delay.js +84 -0
  227. package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts +22 -0
  228. package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +1 -0
  229. package/esm/deps/jsr.io/@std/async/1.2.0/mod.js +23 -0
  230. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +111 -0
  231. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +1 -0
  232. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +154 -0
  233. package/esm/deps/jsr.io/@std/async/1.2.0/pool.d.ts +33 -0
  234. package/esm/deps/jsr.io/@std/async/1.2.0/pool.d.ts.map +1 -0
  235. package/esm/deps/jsr.io/@std/async/1.2.0/pool.js +99 -0
  236. package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts +155 -0
  237. package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +1 -0
  238. package/esm/deps/jsr.io/@std/async/1.2.0/retry.js +147 -0
  239. package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts +43 -0
  240. package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +1 -0
  241. package/esm/deps/jsr.io/@std/async/1.2.0/tee.js +79 -0
  242. package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts +9 -0
  243. package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +1 -0
  244. package/esm/deps/jsr.io/@std/bytes/1.0.6/_types.js +2 -0
  245. package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +21 -0
  246. package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +1 -0
  247. package/esm/deps/jsr.io/@std/bytes/1.0.6/concat.js +32 -0
  248. package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts +22 -0
  249. package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts.map +1 -0
  250. package/esm/deps/jsr.io/@std/bytes/1.0.6/equals.js +82 -0
  251. package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts +24 -0
  252. package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts.map +1 -0
  253. package/esm/deps/jsr.io/@std/bytes/1.0.6/starts_with.js +34 -0
  254. package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts +12 -0
  255. package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts.map +1 -0
  256. package/esm/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.js +69 -0
  257. package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts +155 -0
  258. package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts.map +1 -0
  259. package/esm/deps/jsr.io/@std/cache/0.2.2/lru_cache.js +188 -0
  260. package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts +111 -0
  261. package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts.map +1 -0
  262. package/esm/deps/jsr.io/@std/cache/0.2.2/memoize.js +82 -0
  263. package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts +19 -0
  264. package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts.map +1 -0
  265. package/esm/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.js +537 -0
  266. package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts +265 -0
  267. package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts.map +1 -0
  268. package/esm/deps/jsr.io/@std/datetime/0.225.7/constants.js +266 -0
  269. package/esm/deps/jsr.io/@std/datetime/0.225.7/format.d.ts +70 -0
  270. package/esm/deps/jsr.io/@std/datetime/0.225.7/format.d.ts.map +1 -0
  271. package/esm/deps/jsr.io/@std/datetime/0.225.7/format.js +66 -0
  272. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
  273. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
  274. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +51 -0
  275. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
  276. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
  277. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.js +113 -0
  278. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
  279. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
  280. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +13 -0
  281. package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
  282. package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
  283. package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +2 -0
  284. package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
  285. package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
  286. package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.js +82 -0
  287. package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
  288. package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
  289. package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +87 -0
  290. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  291. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  292. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
  293. package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +80 -0
  294. package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
  295. package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.js +116 -0
  296. package/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
  297. package/esm/deps/jsr.io/@std/internal/1.0.12/diff.js +276 -0
  298. package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
  299. package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.js +182 -0
  300. package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts +29 -0
  301. package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
  302. package/esm/deps/jsr.io/@std/internal/1.0.12/format.js +70 -0
  303. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  304. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  305. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
  306. package/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
  307. package/esm/deps/jsr.io/@std/internal/1.0.12/styles.js +207 -0
  308. package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts +25 -0
  309. package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
  310. package/esm/deps/jsr.io/@std/internal/1.0.12/types.js +3 -0
  311. package/esm/deps/jsr.io/@std/io/0.225.3/_constants.d.ts.map +1 -0
  312. package/esm/deps/jsr.io/@std/io/0.225.3/_constants.js +4 -0
  313. package/esm/deps/jsr.io/@std/io/0.225.3/iterate_reader.d.ts.map +1 -0
  314. package/esm/deps/jsr.io/@std/io/0.225.3/iterate_reader.js +96 -0
  315. package/esm/deps/jsr.io/@std/io/0.225.3/types.d.ts.map +1 -0
  316. package/esm/deps/jsr.io/@std/io/0.225.3/types.js +15 -0
  317. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  318. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
  319. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  320. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
  321. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  322. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
  323. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  324. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  325. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
  326. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  327. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
  328. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  329. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
  330. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  331. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
  332. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  333. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
  334. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  335. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  336. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
  337. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  338. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  339. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
  340. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  341. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
  342. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  343. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  344. package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
  345. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  346. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
  347. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  348. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  349. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
  350. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  351. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  352. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
  353. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  354. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  355. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
  356. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  357. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
  358. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  359. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  360. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
  361. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  362. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  363. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
  364. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  365. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
  366. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  367. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
  368. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  369. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
  370. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  371. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  372. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
  373. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  374. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  375. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
  376. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  377. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  378. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
  379. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  380. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
  381. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  382. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  383. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
  384. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  385. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  386. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
  387. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  388. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
  389. package/esm/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.d.ts.map +1 -0
  390. package/esm/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.js +35 -0
  391. package/esm/mod.d.ts +2 -2
  392. package/esm/mod.d.ts.map +1 -1
  393. package/esm/mod.js +2 -2
  394. package/esm/session/0_session_error.d.ts +24 -0
  395. package/esm/session/0_session_error.d.ts.map +1 -0
  396. package/esm/session/0_session_error.js +25 -0
  397. package/esm/session/0_session_state.d.ts +28 -0
  398. package/esm/session/0_session_state.d.ts.map +1 -0
  399. package/esm/session/0_session_state.js +51 -0
  400. package/esm/session/1_session.d.ts +51 -0
  401. package/esm/session/1_session.d.ts.map +1 -0
  402. package/esm/session/1_session.js +124 -0
  403. package/esm/session/2_session_encrypted.d.ts +41 -0
  404. package/esm/session/2_session_encrypted.d.ts.map +1 -0
  405. package/esm/session/2_session_encrypted.js +509 -0
  406. package/esm/session/2_session_plain.d.ts +25 -0
  407. package/esm/session/2_session_plain.d.ts.map +1 -0
  408. package/esm/session/2_session_plain.js +56 -0
  409. package/esm/storage/0_storage.d.ts +3 -2
  410. package/esm/storage/0_storage.d.ts.map +1 -1
  411. package/esm/storage/0_storage.js +1 -1
  412. package/esm/storage/1_utilities.d.ts +15 -11
  413. package/esm/storage/1_utilities.d.ts.map +1 -1
  414. package/esm/storage/1_utilities.js +33 -41
  415. package/esm/storage/2_storage_indexed_db.d.ts +3 -2
  416. package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
  417. package/esm/storage/2_storage_indexed_db.js +33 -48
  418. package/esm/storage/2_storage_local_storage.d.ts +3 -2
  419. package/esm/storage/2_storage_local_storage.d.ts.map +1 -1
  420. package/esm/storage/2_storage_local_storage.js +10 -20
  421. package/esm/storage/2_storage_memory.d.ts +4 -3
  422. package/esm/storage/2_storage_memory.d.ts.map +1 -1
  423. package/esm/storage/2_storage_memory.js +30 -44
  424. package/esm/storage/2_storage_session_storage.d.ts +4 -3
  425. package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
  426. package/esm/storage/2_storage_session_storage.js +10 -20
  427. package/esm/tl/0_types.d.ts +25 -0
  428. package/esm/tl/0_types.d.ts.map +1 -0
  429. package/esm/tl/0_types.js +20 -0
  430. package/esm/tl/0_utilities.d.ts +34 -0
  431. package/esm/tl/0_utilities.d.ts.map +1 -0
  432. package/esm/tl/0_utilities.js +79 -0
  433. package/esm/tl/1_mtproto_api.d.ts +371 -0
  434. package/esm/tl/1_mtproto_api.d.ts.map +1 -0
  435. package/esm/tl/1_mtproto_api.js +416 -0
  436. package/esm/tl/1_telegram_api.d.ts +19410 -0
  437. package/esm/tl/1_telegram_api.d.ts.map +1 -0
  438. package/esm/tl/1_telegram_api.js +22386 -0
  439. package/esm/tl/1_tl_reader.d.ts +39 -0
  440. package/esm/tl/1_tl_reader.d.ts.map +1 -0
  441. package/esm/tl/1_tl_reader.js +220 -0
  442. package/esm/tl/1_tl_writer.d.ts +37 -0
  443. package/esm/tl/1_tl_writer.d.ts.map +1 -0
  444. package/esm/tl/1_tl_writer.js +269 -0
  445. package/esm/tl/1_utilities.d.ts +9 -14
  446. package/esm/tl/1_utilities.d.ts.map +1 -1
  447. package/esm/tl/1_utilities.js +21 -40
  448. package/esm/tl/2_message.d.ts +36 -0
  449. package/esm/tl/2_message.d.ts.map +1 -0
  450. package/esm/tl/2_message.js +73 -0
  451. package/esm/tl/2_mtproto.d.ts +33 -0
  452. package/esm/tl/2_mtproto.d.ts.map +1 -0
  453. package/esm/tl/2_mtproto.js +53 -0
  454. package/esm/tl/2_telegram.d.ts +49 -0
  455. package/esm/tl/2_telegram.d.ts.map +1 -0
  456. package/esm/tl/2_telegram.js +135 -0
  457. package/esm/transport/0_obfuscation.d.ts +2 -2
  458. package/esm/transport/0_obfuscation.d.ts.map +1 -1
  459. package/esm/transport/0_obfuscation.js +10 -9
  460. package/esm/transport/0_transport.d.ts +4 -6
  461. package/esm/transport/0_transport.d.ts.map +1 -1
  462. package/esm/transport/0_transport.js +11 -19
  463. package/esm/transport/1_transport_abridged.d.ts +2 -4
  464. package/esm/transport/1_transport_abridged.d.ts.map +1 -1
  465. package/esm/transport/1_transport_abridged.js +22 -52
  466. package/esm/transport/1_transport_intermediate.d.ts +2 -4
  467. package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
  468. package/esm/transport/1_transport_intermediate.js +16 -48
  469. package/esm/transport/1_transport_provider.d.ts +35 -0
  470. package/esm/transport/1_transport_provider.d.ts.map +1 -0
  471. package/esm/transport/1_transport_provider.js +81 -0
  472. package/esm/transport/2_transport_provider_tcp.d.ts +25 -0
  473. package/esm/transport/2_transport_provider_tcp.d.ts.map +1 -0
  474. package/esm/transport/2_transport_provider_tcp.js +29 -0
  475. package/esm/transport/2_transport_provider_web_socket.d.ts +24 -0
  476. package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -0
  477. package/esm/transport/2_transport_provider_web_socket.js +43 -0
  478. package/esm/types/0_authorization_state.d.ts +2 -2
  479. package/esm/types/0_authorization_state.d.ts.map +1 -1
  480. package/esm/types/0_authorization_state.js +1 -1
  481. package/esm/types/0_birthday.d.ts +3 -2
  482. package/esm/types/0_birthday.d.ts.map +1 -1
  483. package/esm/types/0_birthday.js +9 -1
  484. package/esm/types/0_bot_command.d.ts +1 -1
  485. package/esm/types/0_bot_command.js +1 -1
  486. package/esm/types/0_bot_token_check_result.d.ts +31 -0
  487. package/esm/types/0_bot_token_check_result.d.ts.map +1 -0
  488. package/esm/types/0_bot_token_check_result.js +20 -0
  489. package/esm/types/0_button_style.d.ts +28 -0
  490. package/esm/types/0_button_style.d.ts.map +1 -0
  491. package/esm/types/0_button_style.js +36 -0
  492. package/esm/types/0_callback_query_answer.d.ts +3 -3
  493. package/esm/types/0_callback_query_answer.d.ts.map +1 -1
  494. package/esm/types/0_callback_query_answer.js +2 -2
  495. package/esm/types/0_callback_query_question.d.ts +1 -1
  496. package/esm/types/0_callback_query_question.js +3 -3
  497. package/esm/types/0_chat_action.d.ts +1 -1
  498. package/esm/types/0_chat_action.js +1 -1
  499. package/esm/types/0_chat_administrator_rights.d.ts +17 -7
  500. package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
  501. package/esm/types/0_chat_administrator_rights.js +31 -16
  502. package/esm/types/0_chat_folder.d.ts +29 -0
  503. package/esm/types/0_chat_folder.d.ts.map +1 -0
  504. package/esm/types/0_chat_folder.js +25 -0
  505. package/esm/types/0_chat_member_rights.d.ts +3 -3
  506. package/esm/types/0_chat_member_rights.d.ts.map +1 -1
  507. package/esm/types/0_chat_member_rights.js +21 -21
  508. package/esm/types/0_chat_photo.d.ts +2 -2
  509. package/esm/types/0_chat_photo.d.ts.map +1 -1
  510. package/esm/types/0_chat_photo.js +5 -5
  511. package/esm/types/0_checklist_changed.d.ts +29 -0
  512. package/esm/types/0_checklist_changed.d.ts.map +1 -0
  513. package/esm/types/0_checklist_changed.js +25 -0
  514. package/esm/types/0_code_check_result.d.ts +47 -0
  515. package/esm/types/0_code_check_result.d.ts.map +1 -0
  516. package/esm/types/0_code_check_result.js +20 -0
  517. package/esm/types/0_connection_state.d.ts +1 -1
  518. package/esm/types/0_connection_state.js +1 -1
  519. package/esm/types/0_contact.d.ts +2 -2
  520. package/esm/types/0_contact.d.ts.map +1 -1
  521. package/esm/types/0_contact.js +1 -1
  522. package/esm/types/0_dice.d.ts +2 -2
  523. package/esm/types/0_dice.d.ts.map +1 -1
  524. package/esm/types/0_dice.js +1 -1
  525. package/esm/types/0_emoji_status.d.ts +48 -0
  526. package/esm/types/0_emoji_status.d.ts.map +1 -0
  527. package/esm/types/0_emoji_status.js +33 -0
  528. package/esm/types/0_failed_invitation.d.ts +8 -4
  529. package/esm/types/0_failed_invitation.d.ts.map +1 -1
  530. package/esm/types/0_failed_invitation.js +3 -3
  531. package/esm/types/0_file_source.d.ts +2 -2
  532. package/esm/types/0_file_source.d.ts.map +1 -1
  533. package/esm/types/0_file_source.js +1 -1
  534. package/esm/types/0_gift_component_rarity.d.ts +50 -0
  535. package/esm/types/0_gift_component_rarity.d.ts.map +1 -0
  536. package/esm/types/0_gift_component_rarity.js +43 -0
  537. package/esm/types/0_gift_value.d.ts +25 -0
  538. package/esm/types/0_gift_value.d.ts.map +1 -0
  539. package/esm/types/0_gift_value.js +20 -0
  540. package/esm/types/0_giveaway_parameters.d.ts +2 -2
  541. package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
  542. package/esm/types/0_giveaway_parameters.js +5 -6
  543. package/esm/types/0_id.d.ts +1 -1
  544. package/esm/types/0_id.js +1 -1
  545. package/esm/types/0_input_emoji_status.d.ts +36 -0
  546. package/esm/types/0_input_emoji_status.d.ts.map +1 -0
  547. package/esm/types/0_input_emoji_status.js +20 -0
  548. package/esm/types/0_invoice.d.ts +3 -2
  549. package/esm/types/0_invoice.d.ts.map +1 -1
  550. package/esm/types/0_invoice.js +1 -1
  551. package/esm/types/0_keyboard_button_poll_type.d.ts +1 -1
  552. package/esm/types/0_keyboard_button_poll_type.js +1 -1
  553. package/esm/types/0_link_preview_media_size.d.ts +22 -0
  554. package/esm/types/0_link_preview_media_size.d.ts.map +1 -0
  555. package/esm/types/0_link_preview_media_size.js +20 -0
  556. package/esm/types/0_live_stream_channel.d.ts +2 -2
  557. package/esm/types/0_live_stream_channel.d.ts.map +1 -1
  558. package/esm/types/0_live_stream_channel.js +1 -1
  559. package/esm/types/0_location.d.ts +1 -1
  560. package/esm/types/0_location.d.ts.map +1 -1
  561. package/esm/types/0_location.js +6 -6
  562. package/esm/types/0_login_url.d.ts +1 -1
  563. package/esm/types/0_login_url.js +1 -1
  564. package/esm/types/0_mask_position.d.ts +2 -2
  565. package/esm/types/0_mask_position.d.ts.map +1 -1
  566. package/esm/types/0_mask_position.js +2 -2
  567. package/esm/types/0_message_reference.d.ts +1 -1
  568. package/esm/types/0_message_reference.js +1 -1
  569. package/esm/types/0_message_search_filter.d.ts +3 -2
  570. package/esm/types/0_message_search_filter.d.ts.map +1 -1
  571. package/esm/types/0_message_search_filter.js +1 -1
  572. package/esm/types/0_mini_app_button_info.d.ts +26 -0
  573. package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
  574. package/esm/types/0_mini_app_button_info.js +22 -0
  575. package/esm/types/0_mini_app_mode.d.ts +22 -0
  576. package/esm/types/0_mini_app_mode.d.ts.map +1 -0
  577. package/esm/types/0_mini_app_mode.js +20 -0
  578. package/esm/types/0_network_statistics_entry.d.ts +1 -1
  579. package/esm/types/0_network_statistics_entry.js +1 -1
  580. package/esm/types/0_parse_mode.d.ts +1 -1
  581. package/esm/types/0_parse_mode.js +1 -1
  582. package/esm/types/0_password_check_result.d.ts +39 -0
  583. package/esm/types/0_password_check_result.d.ts.map +1 -0
  584. package/esm/types/0_password_check_result.js +20 -0
  585. package/esm/types/0_price_tag.d.ts +1 -1
  586. package/esm/types/0_price_tag.js +1 -1
  587. package/esm/types/0_reaction.d.ts +4 -1
  588. package/esm/types/0_reaction.d.ts.map +1 -1
  589. package/esm/types/0_reaction.js +10 -10
  590. package/esm/types/0_refunded_payment.d.ts +2 -2
  591. package/esm/types/0_refunded_payment.d.ts.map +1 -1
  592. package/esm/types/0_refunded_payment.js +3 -3
  593. package/esm/types/0_restriction_reason.d.ts +2 -2
  594. package/esm/types/0_restriction_reason.d.ts.map +1 -1
  595. package/esm/types/0_restriction_reason.js +1 -1
  596. package/esm/types/0_self_destruct_option.d.ts +11 -3
  597. package/esm/types/0_self_destruct_option.d.ts.map +1 -1
  598. package/esm/types/0_self_destruct_option.js +12 -3
  599. package/esm/types/0_shipping_address.d.ts +2 -2
  600. package/esm/types/0_shipping_address.d.ts.map +1 -1
  601. package/esm/types/0_shipping_address.js +1 -1
  602. package/esm/types/0_slow_mode_duration.d.ts +23 -0
  603. package/esm/types/0_slow_mode_duration.d.ts.map +1 -0
  604. package/esm/types/0_slow_mode_duration.js +28 -0
  605. package/esm/types/0_story_reference.d.ts +1 -1
  606. package/esm/types/0_story_reference.js +1 -1
  607. package/esm/types/0_switch_inline_query_chosen_chats.d.ts +20 -0
  608. package/esm/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
  609. package/esm/types/0_switch_inline_query_chosen_chats.js +19 -0
  610. package/esm/types/0_thumbnail.d.ts +1 -1
  611. package/esm/types/0_thumbnail.d.ts.map +1 -1
  612. package/esm/types/0_thumbnail.js +4 -4
  613. package/esm/types/0_translation.d.ts +32 -0
  614. package/esm/types/0_translation.d.ts.map +1 -0
  615. package/esm/types/0_translation.js +45 -0
  616. package/esm/types/0_upload_progress.d.ts +29 -0
  617. package/esm/types/0_upload_progress.d.ts.map +1 -0
  618. package/esm/types/0_upload_progress.js +20 -0
  619. package/esm/types/0_user_status.d.ts +66 -0
  620. package/esm/types/0_user_status.d.ts.map +1 -0
  621. package/esm/types/0_user_status.js +35 -0
  622. package/esm/types/0_video_chat.d.ts +8 -4
  623. package/esm/types/0_video_chat.d.ts.map +1 -1
  624. package/esm/types/0_video_chat.js +7 -8
  625. package/esm/types/0_voice.d.ts +2 -2
  626. package/esm/types/0_voice.d.ts.map +1 -1
  627. package/esm/types/0_voice.js +1 -1
  628. package/esm/types/0_voice_transcription.d.ts +31 -0
  629. package/esm/types/0_voice_transcription.d.ts.map +1 -0
  630. package/esm/types/0_voice_transcription.js +26 -0
  631. package/esm/types/0_working_hours_interval.d.ts +27 -0
  632. package/esm/types/0_working_hours_interval.d.ts.map +1 -0
  633. package/esm/types/0_working_hours_interval.js +20 -0
  634. package/esm/types/1_animation.d.ts +2 -2
  635. package/esm/types/1_animation.d.ts.map +1 -1
  636. package/esm/types/1_animation.js +3 -3
  637. package/esm/types/1_audio.d.ts +2 -2
  638. package/esm/types/1_audio.d.ts.map +1 -1
  639. package/esm/types/1_audio.js +3 -3
  640. package/esm/types/1_bot_command_scope.d.ts +3 -3
  641. package/esm/types/1_bot_command_scope.d.ts.map +1 -1
  642. package/esm/types/1_bot_command_scope.js +4 -4
  643. package/esm/types/1_bot_commands.d.ts +30 -0
  644. package/esm/types/1_bot_commands.d.ts.map +1 -0
  645. package/esm/types/1_bot_commands.js +20 -0
  646. package/esm/types/1_chat_p.d.ts +36 -7
  647. package/esm/types/1_chat_p.d.ts.map +1 -1
  648. package/esm/types/1_chat_p.js +43 -17
  649. package/esm/types/1_document.d.ts +2 -2
  650. package/esm/types/1_document.d.ts.map +1 -1
  651. package/esm/types/1_document.js +3 -3
  652. package/esm/types/1_giveaway.d.ts +3 -3
  653. package/esm/types/1_giveaway.d.ts.map +1 -1
  654. package/esm/types/1_giveaway.js +1 -1
  655. package/esm/types/1_inline_keyboard_button.d.ts +140 -0
  656. package/esm/types/1_inline_keyboard_button.d.ts.map +1 -0
  657. package/esm/types/1_inline_keyboard_button.js +128 -0
  658. package/esm/types/1_inline_query_result_button.d.ts +3 -3
  659. package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
  660. package/esm/types/1_inline_query_result_button.js +1 -1
  661. package/esm/types/1_input_gift.d.ts +54 -0
  662. package/esm/types/1_input_gift.d.ts.map +1 -0
  663. package/esm/types/1_input_gift.js +32 -0
  664. package/esm/types/1_input_story_content.d.ts +3 -3
  665. package/esm/types/1_input_story_content.d.ts.map +1 -1
  666. package/esm/types/1_input_story_content.js +1 -1
  667. package/esm/types/1_keyboard_button.d.ts +14 -12
  668. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  669. package/esm/types/1_keyboard_button.js +87 -34
  670. package/esm/types/1_message_reaction.d.ts +3 -3
  671. package/esm/types/1_message_reaction.d.ts.map +1 -1
  672. package/esm/types/1_message_reaction.js +8 -8
  673. package/esm/types/1_mini_app_info.d.ts +32 -0
  674. package/esm/types/1_mini_app_info.d.ts.map +1 -0
  675. package/esm/types/1_mini_app_info.js +27 -0
  676. package/esm/types/1_network_statistics.d.ts +2 -2
  677. package/esm/types/1_network_statistics.d.ts.map +1 -1
  678. package/esm/types/1_network_statistics.js +1 -1
  679. package/esm/types/1_order_info.d.ts +8 -3
  680. package/esm/types/1_order_info.d.ts.map +1 -1
  681. package/esm/types/1_order_info.js +1 -1
  682. package/esm/types/1_photo.d.ts +2 -2
  683. package/esm/types/1_photo.d.ts.map +1 -1
  684. package/esm/types/1_photo.js +4 -4
  685. package/esm/types/1_reaction_count.d.ts +3 -3
  686. package/esm/types/1_reaction_count.d.ts.map +1 -1
  687. package/esm/types/1_reaction_count.js +1 -1
  688. package/esm/types/1_sticker.d.ts +6 -5
  689. package/esm/types/1_sticker.d.ts.map +1 -1
  690. package/esm/types/1_sticker.js +15 -11
  691. package/esm/types/1_story_reaction.d.ts +4 -4
  692. package/esm/types/1_story_reaction.d.ts.map +1 -1
  693. package/esm/types/1_story_reaction.js +2 -2
  694. package/esm/types/1_venue.d.ts +2 -2
  695. package/esm/types/1_venue.d.ts.map +1 -1
  696. package/esm/types/1_venue.js +3 -3
  697. package/esm/types/1_video.d.ts +2 -2
  698. package/esm/types/1_video.d.ts.map +1 -1
  699. package/esm/types/1_video.js +3 -3
  700. package/esm/types/1_video_note.d.ts +2 -2
  701. package/esm/types/1_video_note.d.ts.map +1 -1
  702. package/esm/types/1_video_note.js +3 -3
  703. package/esm/types/1_working_hours.d.ts +31 -0
  704. package/esm/types/1_working_hours.d.ts.map +1 -0
  705. package/esm/types/1_working_hours.js +33 -0
  706. package/esm/types/2_chat.d.ts +14 -17
  707. package/esm/types/2_chat.d.ts.map +1 -1
  708. package/esm/types/2_chat.js +23 -28
  709. package/esm/types/2_chat_member.d.ts +72 -15
  710. package/esm/types/2_chat_member.d.ts.map +1 -1
  711. package/esm/types/2_chat_member.js +40 -28
  712. package/esm/types/2_inactive_chat.d.ts +3 -3
  713. package/esm/types/2_inactive_chat.d.ts.map +1 -1
  714. package/esm/types/2_inactive_chat.js +4 -5
  715. package/esm/types/2_message_entity.d.ts +148 -0
  716. package/esm/types/2_message_entity.d.ts.map +1 -0
  717. package/esm/types/2_message_entity.js +243 -0
  718. package/esm/types/2_message_interactions.d.ts +2 -2
  719. package/esm/types/2_message_interactions.d.ts.map +1 -1
  720. package/esm/types/2_message_interactions.js +1 -1
  721. package/esm/types/2_message_reaction_count.d.ts +6 -7
  722. package/esm/types/2_message_reaction_count.d.ts.map +1 -1
  723. package/esm/types/2_message_reaction_count.js +6 -9
  724. package/esm/types/2_message_reaction_list_item.d.ts +39 -0
  725. package/esm/types/2_message_reaction_list_item.d.ts.map +1 -0
  726. package/esm/types/2_message_reaction_list_item.js +50 -0
  727. package/esm/types/2_poll_answer.d.ts +32 -0
  728. package/esm/types/2_poll_answer.d.ts.map +1 -0
  729. package/esm/types/2_poll_answer.js +35 -0
  730. package/esm/types/2_reply_markup.d.ts +71 -0
  731. package/esm/types/2_reply_markup.d.ts.map +1 -0
  732. package/esm/types/2_reply_markup.js +127 -0
  733. package/esm/types/2_sticker_set.d.ts +51 -0
  734. package/esm/types/2_sticker_set.d.ts.map +1 -0
  735. package/esm/types/2_sticker_set.js +91 -0
  736. package/esm/types/2_story_content.d.ts +3 -3
  737. package/esm/types/2_story_content.d.ts.map +1 -1
  738. package/esm/types/2_story_content.js +7 -7
  739. package/esm/types/2_story_interactions.d.ts +3 -3
  740. package/esm/types/2_story_interactions.d.ts.map +1 -1
  741. package/esm/types/2_story_interactions.js +1 -1
  742. package/esm/types/2_story_interactive_area.d.ts +9 -9
  743. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  744. package/esm/types/2_story_interactive_area.js +16 -15
  745. package/esm/types/2_story_privacy.d.ts +46 -0
  746. package/esm/types/2_story_privacy.d.ts.map +1 -0
  747. package/esm/types/2_story_privacy.js +76 -0
  748. package/esm/types/2_successful_payment.d.ts +11 -3
  749. package/esm/types/2_successful_payment.d.ts.map +1 -1
  750. package/esm/types/2_successful_payment.js +3 -3
  751. package/esm/types/2_user.d.ts +73 -0
  752. package/esm/types/2_user.d.ts.map +1 -0
  753. package/esm/types/2_user.js +82 -0
  754. package/esm/types/3_business_connection.d.ts +37 -0
  755. package/esm/types/3_business_connection.d.ts.map +1 -0
  756. package/esm/types/3_business_connection.js +36 -0
  757. package/esm/types/3_chat_settings.d.ts +47 -0
  758. package/esm/types/3_chat_settings.d.ts.map +1 -0
  759. package/esm/types/3_chat_settings.js +51 -0
  760. package/esm/types/3_checklist_item.d.ts +65 -0
  761. package/esm/types/3_checklist_item.d.ts.map +1 -0
  762. package/esm/types/3_checklist_item.js +51 -0
  763. package/esm/types/3_chosen_inline_result.d.ts +38 -0
  764. package/esm/types/3_chosen_inline_result.d.ts.map +1 -0
  765. package/esm/types/3_chosen_inline_result.js +37 -0
  766. package/esm/types/3_forward_header.d.ts +77 -0
  767. package/esm/types/3_forward_header.d.ts.map +1 -0
  768. package/esm/types/3_forward_header.js +73 -0
  769. package/esm/types/3_game.d.ts +40 -0
  770. package/esm/types/3_game.d.ts.map +1 -0
  771. package/esm/types/3_game.js +44 -0
  772. package/esm/types/3_gift_upgraded_component.d.ts +96 -0
  773. package/esm/types/3_gift_upgraded_component.d.ts.map +1 -0
  774. package/esm/types/3_gift_upgraded_component.js +88 -0
  775. package/esm/types/3_inline_query.d.ts +40 -0
  776. package/esm/types/3_inline_query.d.ts.map +1 -0
  777. package/esm/types/3_inline_query.js +60 -0
  778. package/esm/types/3_input_checklist_item.d.ts +31 -0
  779. package/esm/types/3_input_checklist_item.d.ts.map +1 -0
  780. package/esm/types/3_input_checklist_item.js +20 -0
  781. package/esm/types/3_input_media.d.ts +123 -0
  782. package/esm/types/3_input_media.d.ts.map +1 -0
  783. package/esm/types/3_input_media.js +20 -0
  784. package/esm/types/3_input_poll_option.d.ts +31 -0
  785. package/esm/types/3_input_poll_option.d.ts.map +1 -0
  786. package/esm/types/3_input_poll_option.js +20 -0
  787. package/esm/types/3_invite_link.d.ts +47 -0
  788. package/esm/types/3_invite_link.d.ts.map +1 -0
  789. package/esm/types/3_invite_link.js +48 -0
  790. package/esm/types/3_message_reaction_list.d.ts +32 -0
  791. package/esm/types/3_message_reaction_list.d.ts.map +1 -0
  792. package/esm/types/3_message_reaction_list.js +31 -0
  793. package/esm/types/3_message_reactions.d.ts +42 -0
  794. package/esm/types/3_message_reactions.d.ts.map +1 -0
  795. package/esm/types/3_message_reactions.js +54 -0
  796. package/esm/types/3_poll_option.d.ts +34 -0
  797. package/esm/types/3_poll_option.d.ts.map +1 -0
  798. package/esm/types/3_poll_option.js +29 -0
  799. package/esm/types/3_pre_checkout_query.d.ts +42 -0
  800. package/esm/types/3_pre_checkout_query.d.ts.map +1 -0
  801. package/esm/types/3_pre_checkout_query.js +39 -0
  802. package/esm/types/3_reply_quote.d.ts +32 -0
  803. package/esm/types/3_reply_quote.d.ts.map +1 -0
  804. package/esm/types/3_reply_quote.js +30 -0
  805. package/esm/types/3_story.d.ts +13 -14
  806. package/esm/types/3_story.d.ts.map +1 -1
  807. package/esm/types/3_story.js +13 -14
  808. package/esm/types/4_chat_member_updated.d.ts +43 -0
  809. package/esm/types/4_chat_member_updated.d.ts.map +1 -0
  810. package/esm/types/4_chat_member_updated.js +52 -0
  811. package/esm/types/4_checklist.d.ts +38 -0
  812. package/esm/types/4_checklist.d.ts.map +1 -0
  813. package/esm/types/4_checklist.js +31 -0
  814. package/esm/types/4_gift.d.ts +100 -0
  815. package/esm/types/4_gift.d.ts.map +1 -0
  816. package/esm/types/4_gift.js +112 -0
  817. package/esm/types/4_join_request.d.ts +39 -0
  818. package/esm/types/4_join_request.d.ts.map +1 -0
  819. package/esm/types/4_join_request.js +62 -0
  820. package/esm/types/4_poll.d.ts +55 -0
  821. package/esm/types/4_poll.d.ts.map +1 -0
  822. package/esm/types/4_poll.js +43 -0
  823. package/esm/types/4_reply_to.d.ts +51 -0
  824. package/esm/types/4_reply_to.d.ts.map +1 -0
  825. package/esm/types/4_reply_to.js +20 -0
  826. package/esm/types/5_claimed_gift.d.ts +44 -0
  827. package/esm/types/5_claimed_gift.d.ts.map +1 -0
  828. package/esm/types/5_claimed_gift.js +43 -0
  829. package/esm/types/5_gift_non_upgraded_information.d.ts +47 -0
  830. package/esm/types/5_gift_non_upgraded_information.d.ts.map +1 -0
  831. package/esm/types/5_gift_non_upgraded_information.js +69 -0
  832. package/esm/types/5_gift_upgraded_information.d.ts +41 -0
  833. package/esm/types/5_gift_upgraded_information.d.ts.map +1 -0
  834. package/esm/types/5_gift_upgraded_information.js +58 -0
  835. package/esm/types/5_link_preview.d.ts +186 -0
  836. package/esm/types/5_link_preview.d.ts.map +1 -0
  837. package/esm/types/5_link_preview.js +205 -0
  838. package/esm/types/6_claimed_gifts.d.ts +33 -0
  839. package/esm/types/6_claimed_gifts.d.ts.map +1 -0
  840. package/esm/types/6_claimed_gifts.js +43 -0
  841. package/esm/types/6_message.d.ts +704 -0
  842. package/esm/types/6_message.d.ts.map +1 -0
  843. package/esm/types/6_message.js +553 -0
  844. package/esm/types/6_message_content.d.ts +124 -0
  845. package/esm/types/6_message_content.d.ts.map +1 -0
  846. package/esm/types/6_message_content.js +20 -0
  847. package/esm/types/7_callback_query.d.ts +43 -0
  848. package/esm/types/7_callback_query.d.ts.map +1 -0
  849. package/esm/types/7_callback_query.js +59 -0
  850. package/esm/types/7_chat_list_item.d.ts +43 -0
  851. package/esm/types/7_chat_list_item.d.ts.map +1 -0
  852. package/esm/types/7_chat_list_item.js +57 -0
  853. package/esm/types/7_inline_query_result.d.ts +251 -0
  854. package/esm/types/7_inline_query_result.d.ts.map +1 -0
  855. package/esm/types/7_inline_query_result.js +380 -0
  856. package/esm/types/7_message_list.d.ts +28 -0
  857. package/esm/types/7_message_list.d.ts.map +1 -0
  858. package/esm/types/7_message_list.js +20 -0
  859. package/esm/types/7_saved_chat.d.ts +35 -0
  860. package/esm/types/7_saved_chat.d.ts.map +1 -0
  861. package/esm/types/7_saved_chat.js +42 -0
  862. package/esm/types/7_topic.d.ts +44 -0
  863. package/esm/types/7_topic.d.ts.map +1 -0
  864. package/esm/types/7_topic.js +61 -0
  865. package/esm/types/8_inline_query_answer.d.ts +32 -0
  866. package/esm/types/8_inline_query_answer.d.ts.map +1 -0
  867. package/esm/types/8_inline_query_answer.js +28 -0
  868. package/esm/types/8_saved_chats.d.ts +33 -0
  869. package/esm/types/8_saved_chats.d.ts.map +1 -0
  870. package/esm/types/8_saved_chats.js +36 -0
  871. package/esm/types/8_update.d.ts +583 -0
  872. package/esm/types/8_update.d.ts.map +1 -0
  873. package/esm/types/8_update.js +20 -0
  874. package/esm/types/_file_id.d.ts +64 -51
  875. package/esm/types/_file_id.d.ts.map +1 -1
  876. package/esm/types/_file_id.js +96 -77
  877. package/esm/types/_getters.d.ts +4 -11
  878. package/esm/types/_getters.d.ts.map +1 -1
  879. package/esm/types/_getters.js +1 -1
  880. package/esm/utilities/0_color.d.ts +1 -1
  881. package/esm/utilities/0_color.js +1 -1
  882. package/esm/utilities/0_env.d.ts.map +1 -1
  883. package/esm/utilities/0_env.js +20 -1
  884. package/esm/utilities/0_gzip.d.ts +22 -0
  885. package/esm/utilities/0_gzip.d.ts.map +1 -0
  886. package/esm/utilities/0_gzip.js +42 -0
  887. package/esm/utilities/0_hash.d.ts +3 -3
  888. package/esm/utilities/0_hash.d.ts.map +1 -1
  889. package/esm/utilities/0_hash.js +1 -1
  890. package/esm/utilities/0_int.d.ts +71 -0
  891. package/esm/utilities/0_int.d.ts.map +1 -0
  892. package/esm/utilities/0_int.js +140 -0
  893. package/esm/utilities/0_misc.d.ts +29 -0
  894. package/esm/utilities/0_misc.d.ts.map +1 -0
  895. package/esm/utilities/0_misc.js +84 -0
  896. package/esm/utilities/0_mutex.d.ts +1 -1
  897. package/esm/utilities/0_mutex.js +5 -20
  898. package/esm/utilities/0_object.d.ts +1 -1
  899. package/esm/utilities/0_object.js +1 -1
  900. package/esm/utilities/0_part_stream.d.ts +4 -4
  901. package/esm/utilities/0_part_stream.d.ts.map +1 -1
  902. package/esm/utilities/0_part_stream.js +13 -27
  903. package/esm/utilities/0_rle.d.ts +3 -3
  904. package/esm/utilities/0_rle.d.ts.map +1 -1
  905. package/esm/utilities/0_rle.js +2 -2
  906. package/esm/utilities/0_text.d.ts +22 -0
  907. package/esm/utilities/0_text.d.ts.map +1 -0
  908. package/esm/utilities/0_text.js +27 -0
  909. package/esm/utilities/0_types.d.ts +1 -1
  910. package/esm/utilities/0_types.js +1 -1
  911. package/esm/utilities/0_units.d.ts +1 -4
  912. package/esm/utilities/0_units.d.ts.map +1 -1
  913. package/esm/utilities/0_units.js +1 -4
  914. package/esm/utilities/1_auth.d.ts +2 -2
  915. package/esm/utilities/1_auth.d.ts.map +1 -1
  916. package/esm/utilities/1_auth.js +5 -6
  917. package/esm/utilities/1_base64.d.ts +3 -3
  918. package/esm/utilities/1_base64.d.ts.map +1 -1
  919. package/esm/utilities/1_base64.js +3 -3
  920. package/esm/utilities/1_crypto.d.ts +30 -0
  921. package/esm/utilities/1_crypto.d.ts.map +1 -0
  922. package/esm/utilities/1_crypto.js +79 -0
  923. package/esm/utilities/1_logger.d.ts +3 -3
  924. package/esm/utilities/1_logger.d.ts.map +1 -1
  925. package/esm/utilities/1_logger.js +5 -4
  926. package/esm/utilities/1_math.d.ts +1 -1
  927. package/esm/utilities/1_math.js +4 -4
  928. package/esm/utilities/2_queue.d.ts +2 -2
  929. package/esm/utilities/2_queue.d.ts.map +1 -1
  930. package/esm/utilities/2_queue.js +33 -47
  931. package/package.json +2 -5
  932. package/script/0_deps.d.ts +23 -13
  933. package/script/0_deps.d.ts.map +1 -1
  934. package/script/0_deps.js +47 -41
  935. package/script/0_errors.d.ts +9 -2
  936. package/script/0_errors.d.ts.map +1 -1
  937. package/script/0_errors.js +21 -8
  938. package/script/1_utilities.d.ts +6 -7
  939. package/script/1_utilities.d.ts.map +1 -1
  940. package/script/1_utilities.js +6 -7
  941. package/script/2_connection.d.ts +1 -1
  942. package/script/2_connection.js +1 -1
  943. package/script/2_storage.d.ts +1 -1
  944. package/script/2_storage.js +1 -1
  945. package/script/2_tl.d.ts +7 -10
  946. package/script/2_tl.d.ts.map +1 -1
  947. package/script/2_tl.js +25 -19
  948. package/script/3_errors.d.ts +8 -3
  949. package/script/3_errors.d.ts.map +1 -1
  950. package/script/3_errors.js +16 -17
  951. package/script/3_transport.d.ts +4 -4
  952. package/script/3_transport.js +4 -4
  953. package/script/3_types.d.ts +74 -34
  954. package/script/3_types.d.ts.map +1 -1
  955. package/script/3_types.js +74 -34
  956. package/script/4_constants.d.ts +21 -2
  957. package/script/4_constants.d.ts.map +1 -1
  958. package/script/4_constants.js +6 -29
  959. package/script/4_errors.d.ts +4 -4
  960. package/script/4_errors.d.ts.map +1 -1
  961. package/script/4_errors.js +3 -13
  962. package/script/4_session.d.ts +24 -0
  963. package/script/4_session.d.ts.map +1 -0
  964. package/script/4_session.js +39 -0
  965. package/script/5_client.d.ts +9 -3
  966. package/script/5_client.d.ts.map +1 -1
  967. package/script/5_client.js +9 -3
  968. package/script/_dnt.polyfills.d.ts +20 -0
  969. package/script/_dnt.polyfills.d.ts.map +1 -1
  970. package/script/_dnt.polyfills.js +120 -0
  971. package/script/_dnt.shims.d.ts +0 -1
  972. package/script/_dnt.shims.d.ts.map +1 -1
  973. package/script/client/0_abortable_loop.d.ts +27 -0
  974. package/script/client/0_abortable_loop.d.ts.map +1 -0
  975. package/script/client/0_abortable_loop.js +60 -0
  976. package/script/client/0_client_abstract.d.ts +31 -28
  977. package/script/client/0_client_abstract.d.ts.map +1 -1
  978. package/script/client/0_client_abstract.js +23 -115
  979. package/script/client/0_html.d.ts +4 -3
  980. package/script/client/0_html.d.ts.map +1 -1
  981. package/script/client/0_html.js +413 -74
  982. package/script/client/0_markdown.d.ts +2 -2
  983. package/script/client/0_markdown.d.ts.map +1 -1
  984. package/script/client/0_markdown.js +39 -19
  985. package/script/client/0_params.d.ts +324 -41
  986. package/script/client/0_params.d.ts.map +1 -1
  987. package/script/client/0_params.js +1 -1
  988. package/script/client/0_password.d.ts +6 -6
  989. package/script/client/0_password.d.ts.map +1 -1
  990. package/script/client/0_password.js +11 -11
  991. package/script/client/0_storage_operations.d.ts +81 -69
  992. package/script/client/0_storage_operations.d.ts.map +1 -1
  993. package/script/client/0_storage_operations.js +393 -311
  994. package/script/client/0_update_processor.d.ts +26 -0
  995. package/script/client/0_update_processor.d.ts.map +1 -0
  996. package/script/client/0_update_processor.js +21 -0
  997. package/script/client/0_utilities.d.ts +10 -5
  998. package/script/client/0_utilities.d.ts.map +1 -1
  999. package/script/client/0_utilities.js +47 -32
  1000. package/script/client/0_worker_error.d.ts +26 -0
  1001. package/script/client/0_worker_error.d.ts.map +1 -0
  1002. package/script/client/0_worker_error.js +90 -0
  1003. package/script/client/0_worker_request.d.ts +27 -0
  1004. package/script/client/0_worker_request.d.ts.map +1 -0
  1005. package/script/client/0_worker_request.js +21 -0
  1006. package/script/client/1_client_generic.d.ts +1846 -0
  1007. package/script/client/1_client_generic.d.ts.map +1 -0
  1008. package/script/client/1_client_generic.js +28 -0
  1009. package/script/client/1_client_plain.d.ts +12 -9
  1010. package/script/client/1_client_plain.d.ts.map +1 -1
  1011. package/script/client/1_client_plain.js +34 -63
  1012. package/script/client/1_invoke_middleware.d.ts +32 -0
  1013. package/script/client/1_invoke_middleware.d.ts.map +1 -0
  1014. package/script/client/1_invoke_middleware.js +25 -0
  1015. package/script/client/1_types.d.ts +17 -32
  1016. package/script/client/1_types.d.ts.map +1 -1
  1017. package/script/client/1_types.js +1 -1
  1018. package/script/client/1_worker_response.d.ts +37 -0
  1019. package/script/client/1_worker_response.d.ts.map +1 -0
  1020. package/script/client/1_worker_response.js +21 -0
  1021. package/script/client/2_account_manager.d.ts +43 -5
  1022. package/script/client/2_account_manager.d.ts.map +1 -1
  1023. package/script/client/2_account_manager.js +367 -47
  1024. package/script/client/2_bot_info_manager.d.ts +12 -5
  1025. package/script/client/2_bot_info_manager.d.ts.map +1 -1
  1026. package/script/client/2_bot_info_manager.js +41 -39
  1027. package/script/client/2_business_connection_manager.d.ts +6 -5
  1028. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  1029. package/script/client/2_business_connection_manager.js +15 -28
  1030. package/script/client/2_client_encrypted.d.ts +58 -0
  1031. package/script/client/2_client_encrypted.d.ts.map +1 -0
  1032. package/script/client/2_client_encrypted.js +277 -0
  1033. package/script/client/2_file_manager.d.ts +27 -7
  1034. package/script/client/2_file_manager.d.ts.map +1 -1
  1035. package/script/client/2_file_manager.js +363 -348
  1036. package/script/client/2_network_statistics_manager.d.ts +5 -5
  1037. package/script/client/2_network_statistics_manager.d.ts.map +1 -1
  1038. package/script/client/2_network_statistics_manager.js +40 -27
  1039. package/script/client/2_payment_manager.d.ts +8 -7
  1040. package/script/client/2_payment_manager.d.ts.map +1 -1
  1041. package/script/client/2_payment_manager.js +12 -25
  1042. package/script/client/2_reaction_manager.d.ts +6 -5
  1043. package/script/client/2_reaction_manager.d.ts.map +1 -1
  1044. package/script/client/2_reaction_manager.js +18 -31
  1045. package/script/client/2_sign_in.d.ts +25 -0
  1046. package/script/client/2_sign_in.d.ts.map +1 -0
  1047. package/script/client/2_sign_in.js +118 -0
  1048. package/script/client/2_translations_manager.d.ts +35 -0
  1049. package/script/client/2_translations_manager.d.ts.map +1 -0
  1050. package/script/client/2_translations_manager.js +165 -0
  1051. package/script/client/2_update_manager.d.ts +11 -8
  1052. package/script/client/2_update_manager.d.ts.map +1 -1
  1053. package/script/client/2_update_manager.js +838 -775
  1054. package/script/client/3_client_encrypted_pool.d.ts +29 -0
  1055. package/script/client/3_client_encrypted_pool.d.ts.map +1 -0
  1056. package/script/client/3_client_encrypted_pool.js +51 -0
  1057. package/script/client/3_filters.d.ts +96 -0
  1058. package/script/client/3_filters.d.ts.map +1 -0
  1059. package/script/client/3_filters.js +55 -0
  1060. package/script/client/3_message_manager.d.ts +30 -35
  1061. package/script/client/3_message_manager.d.ts.map +1 -1
  1062. package/script/client/3_message_manager.js +1078 -785
  1063. package/script/client/3_video_chat_manager.d.ts +11 -10
  1064. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  1065. package/script/client/3_video_chat_manager.js +85 -93
  1066. package/script/client/4_callback_query_manager.d.ts +9 -8
  1067. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  1068. package/script/client/4_callback_query_manager.js +24 -35
  1069. package/script/client/4_chat_list_manager.d.ts +20 -11
  1070. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  1071. package/script/client/4_chat_list_manager.js +212 -442
  1072. package/script/client/4_chat_manager.d.ts +86 -0
  1073. package/script/client/4_chat_manager.d.ts.map +1 -0
  1074. package/script/client/4_chat_manager.js +482 -0
  1075. package/script/client/4_checklist_manager.d.ts +38 -0
  1076. package/script/client/4_checklist_manager.d.ts.map +1 -0
  1077. package/script/client/4_checklist_manager.js +72 -0
  1078. package/script/client/4_context.d.ts +691 -0
  1079. package/script/client/4_context.d.ts.map +1 -0
  1080. package/script/client/4_context.js +1410 -0
  1081. package/script/client/4_forum_manager.d.ts +40 -0
  1082. package/script/client/4_forum_manager.d.ts.map +1 -0
  1083. package/script/client/4_forum_manager.js +132 -0
  1084. package/script/client/4_gift_manager.d.ts +39 -0
  1085. package/script/client/4_gift_manager.d.ts.map +1 -0
  1086. package/script/client/4_gift_manager.js +88 -0
  1087. package/script/client/4_inline_query_manager.d.ts +10 -9
  1088. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  1089. package/script/client/4_inline_query_manager.js +23 -35
  1090. package/script/client/4_link_preview_manager.d.ts +39 -0
  1091. package/script/client/4_link_preview_manager.d.ts.map +1 -0
  1092. package/script/client/4_link_preview_manager.js +55 -0
  1093. package/script/client/4_poll_manager.d.ts +39 -0
  1094. package/script/client/4_poll_manager.d.ts.map +1 -0
  1095. package/script/client/4_poll_manager.js +109 -0
  1096. package/script/client/4_story_manager.d.ts +11 -10
  1097. package/script/client/4_story_manager.d.ts.map +1 -1
  1098. package/script/client/4_story_manager.js +51 -63
  1099. package/script/client/5_composer.d.ts +51 -0
  1100. package/script/client/5_composer.d.ts.map +1 -0
  1101. package/script/client/5_composer.js +113 -0
  1102. package/script/client/6_client.d.ts +1952 -0
  1103. package/script/client/6_client.d.ts.map +1 -0
  1104. package/script/client/6_client.js +3414 -0
  1105. package/script/client/6_client_dispatcher.d.ts +1917 -0
  1106. package/script/client/6_client_dispatcher.d.ts.map +1 -0
  1107. package/script/client/6_client_dispatcher.js +2480 -0
  1108. package/script/client/7_client_worker.d.ts +27 -0
  1109. package/script/client/7_client_worker.d.ts.map +1 -0
  1110. package/script/client/7_client_worker.js +80 -0
  1111. package/script/connection/0_connection.d.ts +9 -8
  1112. package/script/connection/0_connection.d.ts.map +1 -1
  1113. package/script/connection/0_connection.js +1 -1
  1114. package/script/connection/1_connection_tcp.d.ts +4 -5
  1115. package/script/connection/1_connection_tcp.d.ts.map +1 -1
  1116. package/script/connection/1_connection_tcp.js +65 -116
  1117. package/script/connection/1_connection_web_socket.d.ts +3 -3
  1118. package/script/connection/1_connection_web_socket.d.ts.map +1 -1
  1119. package/script/connection/1_connection_web_socket.js +79 -98
  1120. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts +18 -0
  1121. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.d.ts.map +1 -0
  1122. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js +71 -0
  1123. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts +3 -0
  1124. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.d.ts.map +1 -0
  1125. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +295 -0
  1126. package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +17 -0
  1127. package/script/deps/jsr.io/@std/assert/1.0.19/assert.d.ts.map +1 -0
  1128. package/script/deps/jsr.io/@std/assert/1.0.19/assert.js +26 -0
  1129. package/script/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts.map +1 -0
  1130. package/script/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +34 -0
  1131. package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +25 -0
  1132. package/script/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
  1133. package/script/deps/jsr.io/@std/assert/1.0.19/equal.js +230 -0
  1134. package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +37 -0
  1135. package/script/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
  1136. package/script/deps/jsr.io/@std/assert/1.0.19/equals.js +64 -0
  1137. package/script/deps/jsr.io/@std/assert/1.0.19/false.d.ts +19 -0
  1138. package/script/deps/jsr.io/@std/assert/1.0.19/false.d.ts.map +1 -0
  1139. package/script/deps/jsr.io/@std/assert/1.0.19/false.js +26 -0
  1140. package/script/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts.map +1 -0
  1141. package/script/deps/jsr.io/@std/assert/1.0.19/unreachable.js +23 -0
  1142. package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts +2 -0
  1143. package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +1 -0
  1144. package/script/deps/jsr.io/@std/async/1.2.0/_util.js +9 -0
  1145. package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +107 -0
  1146. package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +1 -0
  1147. package/script/deps/jsr.io/@std/async/1.2.0/abortable.js +49 -0
  1148. package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +37 -0
  1149. package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +1 -0
  1150. package/script/deps/jsr.io/@std/async/1.2.0/deadline.js +44 -0
  1151. package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +44 -0
  1152. package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +1 -0
  1153. package/script/deps/jsr.io/@std/async/1.2.0/debounce.js +60 -0
  1154. package/script/deps/jsr.io/@std/async/1.2.0/delay.d.ts +45 -0
  1155. package/script/deps/jsr.io/@std/async/1.2.0/delay.d.ts.map +1 -0
  1156. package/script/deps/jsr.io/@std/async/1.2.0/delay.js +87 -0
  1157. package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts +22 -0
  1158. package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +1 -0
  1159. package/script/deps/jsr.io/@std/async/1.2.0/mod.js +39 -0
  1160. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +111 -0
  1161. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +1 -0
  1162. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +158 -0
  1163. package/script/deps/jsr.io/@std/async/1.2.0/pool.d.ts +33 -0
  1164. package/script/deps/jsr.io/@std/async/1.2.0/pool.d.ts.map +1 -0
  1165. package/script/deps/jsr.io/@std/async/1.2.0/pool.js +102 -0
  1166. package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts +155 -0
  1167. package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +1 -0
  1168. package/script/deps/jsr.io/@std/async/1.2.0/retry.js +152 -0
  1169. package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts +43 -0
  1170. package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +1 -0
  1171. package/script/deps/jsr.io/@std/async/1.2.0/tee.js +82 -0
  1172. package/script/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts +9 -0
  1173. package/script/deps/jsr.io/@std/bytes/1.0.6/_types.d.ts.map +1 -0
  1174. package/script/deps/jsr.io/@std/bytes/1.0.6/_types.js +3 -0
  1175. package/script/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts +21 -0
  1176. package/script/deps/jsr.io/@std/bytes/1.0.6/concat.d.ts.map +1 -0
  1177. package/script/deps/jsr.io/@std/bytes/1.0.6/concat.js +35 -0
  1178. package/script/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts +22 -0
  1179. package/script/deps/jsr.io/@std/bytes/1.0.6/equals.d.ts.map +1 -0
  1180. package/script/deps/jsr.io/@std/bytes/1.0.6/equals.js +85 -0
  1181. package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts +24 -0
  1182. package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.d.ts.map +1 -0
  1183. package/script/deps/jsr.io/@std/bytes/1.0.6/starts_with.js +37 -0
  1184. package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts +12 -0
  1185. package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.d.ts.map +1 -0
  1186. package/script/deps/jsr.io/@std/cache/0.2.2/_serialize_arg_list.js +72 -0
  1187. package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts +155 -0
  1188. package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.d.ts.map +1 -0
  1189. package/script/deps/jsr.io/@std/cache/0.2.2/lru_cache.js +192 -0
  1190. package/script/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts +111 -0
  1191. package/script/deps/jsr.io/@std/cache/0.2.2/memoize.d.ts.map +1 -0
  1192. package/script/deps/jsr.io/@std/cache/0.2.2/memoize.js +85 -0
  1193. package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts +19 -0
  1194. package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.d.ts.map +1 -0
  1195. package/script/deps/jsr.io/@std/datetime/0.225.7/_date_time_formatter.js +541 -0
  1196. package/script/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts +265 -0
  1197. package/script/deps/jsr.io/@std/datetime/0.225.7/constants.d.ts.map +1 -0
  1198. package/script/deps/jsr.io/@std/datetime/0.225.7/constants.js +269 -0
  1199. package/script/deps/jsr.io/@std/datetime/0.225.7/format.d.ts +70 -0
  1200. package/script/deps/jsr.io/@std/datetime/0.225.7/format.d.ts.map +1 -0
  1201. package/script/deps/jsr.io/@std/datetime/0.225.7/format.js +69 -0
  1202. package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +23 -0
  1203. package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +1 -0
  1204. package/script/deps/jsr.io/@std/encoding/1.0.10/_common16.js +57 -0
  1205. package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
  1206. package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
  1207. package/script/deps/jsr.io/@std/encoding/1.0.10/_common64.js +119 -0
  1208. package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
  1209. package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
  1210. package/script/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +16 -0
  1211. package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
  1212. package/script/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
  1213. package/script/deps/jsr.io/@std/encoding/1.0.10/_types.js +3 -0
  1214. package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
  1215. package/script/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
  1216. package/script/deps/jsr.io/@std/encoding/1.0.10/base64.js +86 -0
  1217. package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +39 -0
  1218. package/script/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +1 -0
  1219. package/script/deps/jsr.io/@std/encoding/1.0.10/hex.js +91 -0
  1220. package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  1221. package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  1222. package/script/deps/jsr.io/@std/internal/1.0.12/_os.js +48 -0
  1223. package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +80 -0
  1224. package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
  1225. package/script/deps/jsr.io/@std/internal/1.0.12/build_message.js +121 -0
  1226. package/script/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
  1227. package/script/deps/jsr.io/@std/internal/1.0.12/diff.js +283 -0
  1228. package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
  1229. package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.js +188 -0
  1230. package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts +29 -0
  1231. package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
  1232. package/script/deps/jsr.io/@std/internal/1.0.12/format.js +106 -0
  1233. package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  1234. package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  1235. package/script/deps/jsr.io/@std/internal/1.0.12/os.js +8 -0
  1236. package/script/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
  1237. package/script/deps/jsr.io/@std/internal/1.0.12/styles.js +252 -0
  1238. package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts +25 -0
  1239. package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
  1240. package/script/deps/jsr.io/@std/internal/1.0.12/types.js +4 -0
  1241. package/script/deps/jsr.io/@std/io/0.225.3/_constants.d.ts.map +1 -0
  1242. package/script/deps/jsr.io/@std/io/0.225.3/_constants.js +7 -0
  1243. package/script/deps/jsr.io/@std/io/0.225.3/iterate_reader.d.ts.map +1 -0
  1244. package/script/deps/jsr.io/@std/io/0.225.3/iterate_reader.js +100 -0
  1245. package/script/deps/jsr.io/@std/io/0.225.3/types.d.ts.map +1 -0
  1246. package/script/deps/jsr.io/@std/io/0.225.3/types.js +18 -0
  1247. package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  1248. package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +10 -0
  1249. package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  1250. package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.js +45 -0
  1251. package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  1252. package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.js +49 -0
  1253. package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  1254. package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  1255. package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +12 -0
  1256. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  1257. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +11 -0
  1258. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  1259. package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +80 -0
  1260. package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  1261. package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +22 -0
  1262. package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  1263. package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +18 -0
  1264. package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  1265. package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  1266. package/script/deps/jsr.io/@std/path/1.1.4/basename.js +38 -0
  1267. package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  1268. package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  1269. package/script/deps/jsr.io/@std/path/1.1.4/extname.js +31 -0
  1270. package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  1271. package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +31 -0
  1272. package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  1273. package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  1274. package/script/deps/jsr.io/@std/path/1.1.4/join.js +32 -0
  1275. package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  1276. package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.js +11 -0
  1277. package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  1278. package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  1279. package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.js +55 -0
  1280. package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  1281. package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  1282. package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.js +96 -0
  1283. package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  1284. package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  1285. package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +24 -0
  1286. package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  1287. package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +26 -0
  1288. package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  1289. package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  1290. package/script/deps/jsr.io/@std/path/1.1.4/posix/join.js +48 -0
  1291. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  1292. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  1293. package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +61 -0
  1294. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  1295. package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +30 -0
  1296. package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  1297. package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +31 -0
  1298. package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  1299. package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.js +20 -0
  1300. package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  1301. package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  1302. package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.js +50 -0
  1303. package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  1304. package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  1305. package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.js +85 -0
  1306. package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  1307. package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  1308. package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +33 -0
  1309. package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  1310. package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +41 -0
  1311. package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  1312. package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  1313. package/script/deps/jsr.io/@std/path/1.1.4/windows/join.js +80 -0
  1314. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  1315. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  1316. package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +138 -0
  1317. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  1318. package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +37 -0
  1319. package/script/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.d.ts.map +1 -0
  1320. package/script/deps/jsr.io/@std/streams/1.0.17/to_array_buffer.js +38 -0
  1321. package/script/mod.d.ts +2 -2
  1322. package/script/mod.d.ts.map +1 -1
  1323. package/script/mod.js +19 -10
  1324. package/script/session/0_session_error.d.ts +24 -0
  1325. package/script/session/0_session_error.d.ts.map +1 -0
  1326. package/script/session/0_session_error.js +29 -0
  1327. package/script/session/0_session_state.d.ts +28 -0
  1328. package/script/session/0_session_state.d.ts.map +1 -0
  1329. package/script/session/0_session_state.js +55 -0
  1330. package/script/session/1_session.d.ts +51 -0
  1331. package/script/session/1_session.d.ts.map +1 -0
  1332. package/script/session/1_session.js +128 -0
  1333. package/script/session/2_session_encrypted.d.ts +41 -0
  1334. package/script/session/2_session_encrypted.d.ts.map +1 -0
  1335. package/script/session/2_session_encrypted.js +513 -0
  1336. package/script/session/2_session_plain.d.ts +25 -0
  1337. package/script/session/2_session_plain.d.ts.map +1 -0
  1338. package/script/session/2_session_plain.js +60 -0
  1339. package/script/storage/0_storage.d.ts +3 -2
  1340. package/script/storage/0_storage.d.ts.map +1 -1
  1341. package/script/storage/0_storage.js +1 -1
  1342. package/script/storage/1_utilities.d.ts +15 -11
  1343. package/script/storage/1_utilities.d.ts.map +1 -1
  1344. package/script/storage/1_utilities.js +47 -55
  1345. package/script/storage/2_storage_indexed_db.d.ts +3 -2
  1346. package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
  1347. package/script/storage/2_storage_indexed_db.js +33 -48
  1348. package/script/storage/2_storage_local_storage.d.ts +3 -2
  1349. package/script/storage/2_storage_local_storage.d.ts.map +1 -1
  1350. package/script/storage/2_storage_local_storage.js +10 -20
  1351. package/script/storage/2_storage_memory.d.ts +4 -3
  1352. package/script/storage/2_storage_memory.d.ts.map +1 -1
  1353. package/script/storage/2_storage_memory.js +30 -44
  1354. package/script/storage/2_storage_session_storage.d.ts +4 -3
  1355. package/script/storage/2_storage_session_storage.d.ts.map +1 -1
  1356. package/script/storage/2_storage_session_storage.js +10 -20
  1357. package/script/tl/0_types.d.ts +25 -0
  1358. package/script/tl/0_types.d.ts.map +1 -0
  1359. package/script/tl/0_types.js +21 -0
  1360. package/script/tl/0_utilities.d.ts +34 -0
  1361. package/script/tl/0_utilities.d.ts.map +1 -0
  1362. package/script/tl/0_utilities.js +89 -0
  1363. package/script/tl/1_mtproto_api.d.ts +371 -0
  1364. package/script/tl/1_mtproto_api.d.ts.map +1 -0
  1365. package/script/tl/1_mtproto_api.js +419 -0
  1366. package/script/tl/1_telegram_api.d.ts +19410 -0
  1367. package/script/tl/1_telegram_api.d.ts.map +1 -0
  1368. package/script/tl/1_telegram_api.js +22389 -0
  1369. package/script/tl/1_tl_reader.d.ts +39 -0
  1370. package/script/tl/1_tl_reader.d.ts.map +1 -0
  1371. package/script/tl/1_tl_reader.js +224 -0
  1372. package/script/tl/1_tl_writer.d.ts +37 -0
  1373. package/script/tl/1_tl_writer.d.ts.map +1 -0
  1374. package/script/tl/1_tl_writer.js +273 -0
  1375. package/script/tl/1_utilities.d.ts +9 -14
  1376. package/script/tl/1_utilities.d.ts.map +1 -1
  1377. package/script/tl/1_utilities.js +23 -44
  1378. package/script/tl/2_message.d.ts +36 -0
  1379. package/script/tl/2_message.d.ts.map +1 -0
  1380. package/script/tl/2_message.js +80 -0
  1381. package/script/tl/2_mtproto.d.ts +33 -0
  1382. package/script/tl/2_mtproto.d.ts.map +1 -0
  1383. package/script/tl/2_mtproto.js +78 -0
  1384. package/script/tl/2_telegram.d.ts +49 -0
  1385. package/script/tl/2_telegram.d.ts.map +1 -0
  1386. package/script/tl/2_telegram.js +189 -0
  1387. package/script/transport/0_obfuscation.d.ts +2 -2
  1388. package/script/transport/0_obfuscation.d.ts.map +1 -1
  1389. package/script/transport/0_obfuscation.js +9 -8
  1390. package/script/transport/0_transport.d.ts +4 -6
  1391. package/script/transport/0_transport.d.ts.map +1 -1
  1392. package/script/transport/0_transport.js +11 -19
  1393. package/script/transport/1_transport_abridged.d.ts +2 -4
  1394. package/script/transport/1_transport_abridged.d.ts.map +1 -1
  1395. package/script/transport/1_transport_abridged.js +21 -51
  1396. package/script/transport/1_transport_intermediate.d.ts +2 -4
  1397. package/script/transport/1_transport_intermediate.d.ts.map +1 -1
  1398. package/script/transport/1_transport_intermediate.js +15 -47
  1399. package/script/transport/1_transport_provider.d.ts +35 -0
  1400. package/script/transport/1_transport_provider.d.ts.map +1 -0
  1401. package/script/transport/1_transport_provider.js +86 -0
  1402. package/script/transport/2_transport_provider_tcp.d.ts +25 -0
  1403. package/script/transport/2_transport_provider_tcp.d.ts.map +1 -0
  1404. package/script/transport/2_transport_provider_tcp.js +32 -0
  1405. package/script/transport/2_transport_provider_web_socket.d.ts +24 -0
  1406. package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -0
  1407. package/script/transport/2_transport_provider_web_socket.js +47 -0
  1408. package/script/types/0_authorization_state.d.ts +2 -2
  1409. package/script/types/0_authorization_state.d.ts.map +1 -1
  1410. package/script/types/0_authorization_state.js +1 -1
  1411. package/script/types/0_birthday.d.ts +3 -2
  1412. package/script/types/0_birthday.d.ts.map +1 -1
  1413. package/script/types/0_birthday.js +10 -1
  1414. package/script/types/0_bot_command.d.ts +1 -1
  1415. package/script/types/0_bot_command.js +1 -1
  1416. package/script/types/0_bot_token_check_result.d.ts +31 -0
  1417. package/script/types/0_bot_token_check_result.d.ts.map +1 -0
  1418. package/script/types/0_bot_token_check_result.js +21 -0
  1419. package/script/types/0_button_style.d.ts +28 -0
  1420. package/script/types/0_button_style.d.ts.map +1 -0
  1421. package/script/types/0_button_style.js +40 -0
  1422. package/script/types/0_callback_query_answer.d.ts +3 -3
  1423. package/script/types/0_callback_query_answer.d.ts.map +1 -1
  1424. package/script/types/0_callback_query_answer.js +2 -2
  1425. package/script/types/0_callback_query_question.d.ts +1 -1
  1426. package/script/types/0_callback_query_question.js +3 -3
  1427. package/script/types/0_chat_action.d.ts +1 -1
  1428. package/script/types/0_chat_action.js +1 -1
  1429. package/script/types/0_chat_administrator_rights.d.ts +17 -7
  1430. package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
  1431. package/script/types/0_chat_administrator_rights.js +31 -16
  1432. package/script/types/0_chat_folder.d.ts +29 -0
  1433. package/script/types/0_chat_folder.d.ts.map +1 -0
  1434. package/script/types/0_chat_folder.js +28 -0
  1435. package/script/types/0_chat_member_rights.d.ts +3 -3
  1436. package/script/types/0_chat_member_rights.d.ts.map +1 -1
  1437. package/script/types/0_chat_member_rights.js +20 -20
  1438. package/script/types/0_chat_photo.d.ts +2 -2
  1439. package/script/types/0_chat_photo.d.ts.map +1 -1
  1440. package/script/types/0_chat_photo.js +4 -4
  1441. package/script/types/0_checklist_changed.d.ts +29 -0
  1442. package/script/types/0_checklist_changed.d.ts.map +1 -0
  1443. package/script/types/0_checklist_changed.js +28 -0
  1444. package/script/types/0_code_check_result.d.ts +47 -0
  1445. package/script/types/0_code_check_result.d.ts.map +1 -0
  1446. package/script/types/0_code_check_result.js +21 -0
  1447. package/script/types/0_connection_state.d.ts +1 -1
  1448. package/script/types/0_connection_state.js +1 -1
  1449. package/script/types/0_contact.d.ts +2 -2
  1450. package/script/types/0_contact.d.ts.map +1 -1
  1451. package/script/types/0_contact.js +1 -1
  1452. package/script/types/0_dice.d.ts +2 -2
  1453. package/script/types/0_dice.d.ts.map +1 -1
  1454. package/script/types/0_dice.js +1 -1
  1455. package/script/types/0_emoji_status.d.ts +48 -0
  1456. package/script/types/0_emoji_status.d.ts.map +1 -0
  1457. package/script/types/0_emoji_status.js +36 -0
  1458. package/script/types/0_failed_invitation.d.ts +8 -4
  1459. package/script/types/0_failed_invitation.d.ts.map +1 -1
  1460. package/script/types/0_failed_invitation.js +3 -3
  1461. package/script/types/0_file_source.d.ts +2 -2
  1462. package/script/types/0_file_source.d.ts.map +1 -1
  1463. package/script/types/0_file_source.js +1 -1
  1464. package/script/types/0_gift_component_rarity.d.ts +50 -0
  1465. package/script/types/0_gift_component_rarity.d.ts.map +1 -0
  1466. package/script/types/0_gift_component_rarity.js +46 -0
  1467. package/script/types/0_gift_value.d.ts +25 -0
  1468. package/script/types/0_gift_value.d.ts.map +1 -0
  1469. package/script/types/0_gift_value.js +21 -0
  1470. package/script/types/0_giveaway_parameters.d.ts +2 -2
  1471. package/script/types/0_giveaway_parameters.d.ts.map +1 -1
  1472. package/script/types/0_giveaway_parameters.js +4 -5
  1473. package/script/types/0_id.d.ts +1 -1
  1474. package/script/types/0_id.js +1 -1
  1475. package/script/types/0_input_emoji_status.d.ts +36 -0
  1476. package/script/types/0_input_emoji_status.d.ts.map +1 -0
  1477. package/script/types/0_input_emoji_status.js +21 -0
  1478. package/script/types/0_invoice.d.ts +3 -2
  1479. package/script/types/0_invoice.d.ts.map +1 -1
  1480. package/script/types/0_invoice.js +1 -1
  1481. package/script/types/0_keyboard_button_poll_type.d.ts +1 -1
  1482. package/script/types/0_keyboard_button_poll_type.js +1 -1
  1483. package/script/types/0_link_preview_media_size.d.ts +22 -0
  1484. package/script/types/0_link_preview_media_size.d.ts.map +1 -0
  1485. package/script/types/0_link_preview_media_size.js +21 -0
  1486. package/script/types/0_live_stream_channel.d.ts +2 -2
  1487. package/script/types/0_live_stream_channel.d.ts.map +1 -1
  1488. package/script/types/0_live_stream_channel.js +1 -1
  1489. package/script/types/0_location.d.ts +1 -1
  1490. package/script/types/0_location.d.ts.map +1 -1
  1491. package/script/types/0_location.js +5 -5
  1492. package/script/types/0_login_url.d.ts +1 -1
  1493. package/script/types/0_login_url.js +1 -1
  1494. package/script/types/0_mask_position.d.ts +2 -2
  1495. package/script/types/0_mask_position.d.ts.map +1 -1
  1496. package/script/types/0_mask_position.js +2 -2
  1497. package/script/types/0_message_reference.d.ts +1 -1
  1498. package/script/types/0_message_reference.js +1 -1
  1499. package/script/types/0_message_search_filter.d.ts +3 -2
  1500. package/script/types/0_message_search_filter.d.ts.map +1 -1
  1501. package/script/types/0_message_search_filter.js +1 -1
  1502. package/script/types/0_mini_app_button_info.d.ts +26 -0
  1503. package/script/types/0_mini_app_button_info.d.ts.map +1 -0
  1504. package/script/types/0_mini_app_button_info.js +25 -0
  1505. package/script/types/0_mini_app_mode.d.ts +22 -0
  1506. package/script/types/0_mini_app_mode.d.ts.map +1 -0
  1507. package/script/types/0_mini_app_mode.js +21 -0
  1508. package/script/types/0_network_statistics_entry.d.ts +1 -1
  1509. package/script/types/0_network_statistics_entry.js +1 -1
  1510. package/script/types/0_parse_mode.d.ts +1 -1
  1511. package/script/types/0_parse_mode.js +1 -1
  1512. package/script/types/0_password_check_result.d.ts +39 -0
  1513. package/script/types/0_password_check_result.d.ts.map +1 -0
  1514. package/script/types/0_password_check_result.js +21 -0
  1515. package/script/types/0_price_tag.d.ts +1 -1
  1516. package/script/types/0_price_tag.js +1 -1
  1517. package/script/types/0_reaction.d.ts +4 -1
  1518. package/script/types/0_reaction.d.ts.map +1 -1
  1519. package/script/types/0_reaction.js +9 -9
  1520. package/script/types/0_refunded_payment.d.ts +2 -2
  1521. package/script/types/0_refunded_payment.d.ts.map +1 -1
  1522. package/script/types/0_refunded_payment.js +2 -2
  1523. package/script/types/0_restriction_reason.d.ts +2 -2
  1524. package/script/types/0_restriction_reason.d.ts.map +1 -1
  1525. package/script/types/0_restriction_reason.js +1 -1
  1526. package/script/types/0_self_destruct_option.d.ts +11 -3
  1527. package/script/types/0_self_destruct_option.d.ts.map +1 -1
  1528. package/script/types/0_self_destruct_option.js +13 -3
  1529. package/script/types/0_shipping_address.d.ts +2 -2
  1530. package/script/types/0_shipping_address.d.ts.map +1 -1
  1531. package/script/types/0_shipping_address.js +1 -1
  1532. package/script/types/0_slow_mode_duration.d.ts +23 -0
  1533. package/script/types/0_slow_mode_duration.d.ts.map +1 -0
  1534. package/script/types/0_slow_mode_duration.js +31 -0
  1535. package/script/types/0_story_reference.d.ts +1 -1
  1536. package/script/types/0_story_reference.js +1 -1
  1537. package/script/types/0_switch_inline_query_chosen_chats.d.ts +20 -0
  1538. package/script/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
  1539. package/script/types/0_switch_inline_query_chosen_chats.js +19 -0
  1540. package/script/types/0_thumbnail.d.ts +1 -1
  1541. package/script/types/0_thumbnail.d.ts.map +1 -1
  1542. package/script/types/0_thumbnail.js +3 -3
  1543. package/script/types/0_translation.d.ts +32 -0
  1544. package/script/types/0_translation.d.ts.map +1 -0
  1545. package/script/types/0_translation.js +48 -0
  1546. package/script/types/0_upload_progress.d.ts +29 -0
  1547. package/script/types/0_upload_progress.d.ts.map +1 -0
  1548. package/script/types/0_upload_progress.js +21 -0
  1549. package/script/types/0_user_status.d.ts +66 -0
  1550. package/script/types/0_user_status.d.ts.map +1 -0
  1551. package/script/types/0_user_status.js +38 -0
  1552. package/script/types/0_video_chat.d.ts +8 -4
  1553. package/script/types/0_video_chat.d.ts.map +1 -1
  1554. package/script/types/0_video_chat.js +6 -7
  1555. package/script/types/0_voice.d.ts +2 -2
  1556. package/script/types/0_voice.d.ts.map +1 -1
  1557. package/script/types/0_voice.js +1 -1
  1558. package/script/types/0_voice_transcription.d.ts +31 -0
  1559. package/script/types/0_voice_transcription.d.ts.map +1 -0
  1560. package/script/types/0_voice_transcription.js +29 -0
  1561. package/script/types/0_working_hours_interval.d.ts +27 -0
  1562. package/script/types/0_working_hours_interval.d.ts.map +1 -0
  1563. package/script/types/0_working_hours_interval.js +21 -0
  1564. package/script/types/1_animation.d.ts +2 -2
  1565. package/script/types/1_animation.d.ts.map +1 -1
  1566. package/script/types/1_animation.js +2 -2
  1567. package/script/types/1_audio.d.ts +2 -2
  1568. package/script/types/1_audio.d.ts.map +1 -1
  1569. package/script/types/1_audio.js +2 -2
  1570. package/script/types/1_bot_command_scope.d.ts +3 -3
  1571. package/script/types/1_bot_command_scope.d.ts.map +1 -1
  1572. package/script/types/1_bot_command_scope.js +3 -3
  1573. package/script/types/1_bot_commands.d.ts +30 -0
  1574. package/script/types/1_bot_commands.d.ts.map +1 -0
  1575. package/script/types/1_bot_commands.js +21 -0
  1576. package/script/types/1_chat_p.d.ts +36 -7
  1577. package/script/types/1_chat_p.d.ts.map +1 -1
  1578. package/script/types/1_chat_p.js +43 -16
  1579. package/script/types/1_document.d.ts +2 -2
  1580. package/script/types/1_document.d.ts.map +1 -1
  1581. package/script/types/1_document.js +2 -2
  1582. package/script/types/1_giveaway.d.ts +3 -3
  1583. package/script/types/1_giveaway.d.ts.map +1 -1
  1584. package/script/types/1_giveaway.js +1 -1
  1585. package/script/types/1_inline_keyboard_button.d.ts +140 -0
  1586. package/script/types/1_inline_keyboard_button.d.ts.map +1 -0
  1587. package/script/types/1_inline_keyboard_button.js +132 -0
  1588. package/script/types/1_inline_query_result_button.d.ts +3 -3
  1589. package/script/types/1_inline_query_result_button.d.ts.map +1 -1
  1590. package/script/types/1_inline_query_result_button.js +1 -1
  1591. package/script/types/1_input_gift.d.ts +54 -0
  1592. package/script/types/1_input_gift.d.ts.map +1 -0
  1593. package/script/types/1_input_gift.js +35 -0
  1594. package/script/types/1_input_story_content.d.ts +3 -3
  1595. package/script/types/1_input_story_content.d.ts.map +1 -1
  1596. package/script/types/1_input_story_content.js +1 -1
  1597. package/script/types/1_keyboard_button.d.ts +14 -12
  1598. package/script/types/1_keyboard_button.d.ts.map +1 -1
  1599. package/script/types/1_keyboard_button.js +86 -33
  1600. package/script/types/1_message_reaction.d.ts +3 -3
  1601. package/script/types/1_message_reaction.d.ts.map +1 -1
  1602. package/script/types/1_message_reaction.js +7 -7
  1603. package/script/types/1_mini_app_info.d.ts +32 -0
  1604. package/script/types/1_mini_app_info.d.ts.map +1 -0
  1605. package/script/types/1_mini_app_info.js +30 -0
  1606. package/script/types/1_network_statistics.d.ts +2 -2
  1607. package/script/types/1_network_statistics.d.ts.map +1 -1
  1608. package/script/types/1_network_statistics.js +1 -1
  1609. package/script/types/1_order_info.d.ts +8 -3
  1610. package/script/types/1_order_info.d.ts.map +1 -1
  1611. package/script/types/1_order_info.js +1 -1
  1612. package/script/types/1_photo.d.ts +2 -2
  1613. package/script/types/1_photo.d.ts.map +1 -1
  1614. package/script/types/1_photo.js +3 -3
  1615. package/script/types/1_reaction_count.d.ts +3 -3
  1616. package/script/types/1_reaction_count.d.ts.map +1 -1
  1617. package/script/types/1_reaction_count.js +1 -1
  1618. package/script/types/1_sticker.d.ts +6 -5
  1619. package/script/types/1_sticker.d.ts.map +1 -1
  1620. package/script/types/1_sticker.js +15 -10
  1621. package/script/types/1_story_reaction.d.ts +4 -4
  1622. package/script/types/1_story_reaction.d.ts.map +1 -1
  1623. package/script/types/1_story_reaction.js +2 -2
  1624. package/script/types/1_venue.d.ts +2 -2
  1625. package/script/types/1_venue.d.ts.map +1 -1
  1626. package/script/types/1_venue.js +2 -2
  1627. package/script/types/1_video.d.ts +2 -2
  1628. package/script/types/1_video.d.ts.map +1 -1
  1629. package/script/types/1_video.js +2 -2
  1630. package/script/types/1_video_note.d.ts +2 -2
  1631. package/script/types/1_video_note.d.ts.map +1 -1
  1632. package/script/types/1_video_note.js +2 -2
  1633. package/script/types/1_working_hours.d.ts +31 -0
  1634. package/script/types/1_working_hours.d.ts.map +1 -0
  1635. package/script/types/1_working_hours.js +37 -0
  1636. package/script/types/2_chat.d.ts +14 -17
  1637. package/script/types/2_chat.d.ts.map +1 -1
  1638. package/script/types/2_chat.js +22 -27
  1639. package/script/types/2_chat_member.d.ts +72 -15
  1640. package/script/types/2_chat_member.d.ts.map +1 -1
  1641. package/script/types/2_chat_member.js +38 -26
  1642. package/script/types/2_inactive_chat.d.ts +3 -3
  1643. package/script/types/2_inactive_chat.d.ts.map +1 -1
  1644. package/script/types/2_inactive_chat.js +3 -4
  1645. package/script/types/2_message_entity.d.ts +148 -0
  1646. package/script/types/2_message_entity.d.ts.map +1 -0
  1647. package/script/types/2_message_entity.js +248 -0
  1648. package/script/types/2_message_interactions.d.ts +2 -2
  1649. package/script/types/2_message_interactions.d.ts.map +1 -1
  1650. package/script/types/2_message_interactions.js +1 -1
  1651. package/script/types/2_message_reaction_count.d.ts +6 -7
  1652. package/script/types/2_message_reaction_count.d.ts.map +1 -1
  1653. package/script/types/2_message_reaction_count.js +6 -9
  1654. package/script/types/2_message_reaction_list_item.d.ts +39 -0
  1655. package/script/types/2_message_reaction_list_item.d.ts.map +1 -0
  1656. package/script/types/2_message_reaction_list_item.js +53 -0
  1657. package/script/types/2_poll_answer.d.ts +32 -0
  1658. package/script/types/2_poll_answer.d.ts.map +1 -0
  1659. package/script/types/2_poll_answer.js +38 -0
  1660. package/script/types/2_reply_markup.d.ts +71 -0
  1661. package/script/types/2_reply_markup.d.ts.map +1 -0
  1662. package/script/types/2_reply_markup.js +131 -0
  1663. package/script/types/2_sticker_set.d.ts +51 -0
  1664. package/script/types/2_sticker_set.d.ts.map +1 -0
  1665. package/script/types/2_sticker_set.js +94 -0
  1666. package/script/types/2_story_content.d.ts +3 -3
  1667. package/script/types/2_story_content.d.ts.map +1 -1
  1668. package/script/types/2_story_content.js +6 -6
  1669. package/script/types/2_story_interactions.d.ts +3 -3
  1670. package/script/types/2_story_interactions.d.ts.map +1 -1
  1671. package/script/types/2_story_interactions.js +1 -1
  1672. package/script/types/2_story_interactive_area.d.ts +9 -9
  1673. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  1674. package/script/types/2_story_interactive_area.js +15 -14
  1675. package/script/types/2_story_privacy.d.ts +46 -0
  1676. package/script/types/2_story_privacy.d.ts.map +1 -0
  1677. package/script/types/2_story_privacy.js +80 -0
  1678. package/script/types/2_successful_payment.d.ts +11 -3
  1679. package/script/types/2_successful_payment.d.ts.map +1 -1
  1680. package/script/types/2_successful_payment.js +2 -2
  1681. package/script/types/2_user.d.ts +73 -0
  1682. package/script/types/2_user.d.ts.map +1 -0
  1683. package/script/types/2_user.js +86 -0
  1684. package/script/types/3_business_connection.d.ts +37 -0
  1685. package/script/types/3_business_connection.d.ts.map +1 -0
  1686. package/script/types/3_business_connection.js +39 -0
  1687. package/script/types/3_chat_settings.d.ts +47 -0
  1688. package/script/types/3_chat_settings.d.ts.map +1 -0
  1689. package/script/types/3_chat_settings.js +54 -0
  1690. package/script/types/3_checklist_item.d.ts +65 -0
  1691. package/script/types/3_checklist_item.d.ts.map +1 -0
  1692. package/script/types/3_checklist_item.js +54 -0
  1693. package/script/types/3_chosen_inline_result.d.ts +38 -0
  1694. package/script/types/3_chosen_inline_result.d.ts.map +1 -0
  1695. package/script/types/3_chosen_inline_result.js +40 -0
  1696. package/script/types/3_forward_header.d.ts +77 -0
  1697. package/script/types/3_forward_header.d.ts.map +1 -0
  1698. package/script/types/3_forward_header.js +76 -0
  1699. package/script/types/3_game.d.ts +40 -0
  1700. package/script/types/3_game.d.ts.map +1 -0
  1701. package/script/types/3_game.js +47 -0
  1702. package/script/types/3_gift_upgraded_component.d.ts +96 -0
  1703. package/script/types/3_gift_upgraded_component.d.ts.map +1 -0
  1704. package/script/types/3_gift_upgraded_component.js +91 -0
  1705. package/script/types/3_inline_query.d.ts +40 -0
  1706. package/script/types/3_inline_query.d.ts.map +1 -0
  1707. package/script/types/3_inline_query.js +63 -0
  1708. package/script/types/3_input_checklist_item.d.ts +31 -0
  1709. package/script/types/3_input_checklist_item.d.ts.map +1 -0
  1710. package/script/types/3_input_checklist_item.js +21 -0
  1711. package/script/types/3_input_media.d.ts +123 -0
  1712. package/script/types/3_input_media.d.ts.map +1 -0
  1713. package/script/types/3_input_media.js +21 -0
  1714. package/script/types/3_input_poll_option.d.ts +31 -0
  1715. package/script/types/3_input_poll_option.d.ts.map +1 -0
  1716. package/script/types/3_input_poll_option.js +21 -0
  1717. package/script/types/3_invite_link.d.ts +47 -0
  1718. package/script/types/3_invite_link.d.ts.map +1 -0
  1719. package/script/types/3_invite_link.js +51 -0
  1720. package/script/types/3_message_reaction_list.d.ts +32 -0
  1721. package/script/types/3_message_reaction_list.d.ts.map +1 -0
  1722. package/script/types/3_message_reaction_list.js +34 -0
  1723. package/script/types/3_message_reactions.d.ts +42 -0
  1724. package/script/types/3_message_reactions.d.ts.map +1 -0
  1725. package/script/types/3_message_reactions.js +57 -0
  1726. package/script/types/3_poll_option.d.ts +34 -0
  1727. package/script/types/3_poll_option.d.ts.map +1 -0
  1728. package/script/types/3_poll_option.js +32 -0
  1729. package/script/types/3_pre_checkout_query.d.ts +42 -0
  1730. package/script/types/3_pre_checkout_query.d.ts.map +1 -0
  1731. package/script/types/3_pre_checkout_query.js +42 -0
  1732. package/script/types/3_reply_quote.d.ts +32 -0
  1733. package/script/types/3_reply_quote.d.ts.map +1 -0
  1734. package/script/types/3_reply_quote.js +33 -0
  1735. package/script/types/3_story.d.ts +13 -14
  1736. package/script/types/3_story.d.ts.map +1 -1
  1737. package/script/types/3_story.js +14 -15
  1738. package/script/types/4_chat_member_updated.d.ts +43 -0
  1739. package/script/types/4_chat_member_updated.d.ts.map +1 -0
  1740. package/script/types/4_chat_member_updated.js +55 -0
  1741. package/script/types/4_checklist.d.ts +38 -0
  1742. package/script/types/4_checklist.d.ts.map +1 -0
  1743. package/script/types/4_checklist.js +34 -0
  1744. package/script/types/4_gift.d.ts +100 -0
  1745. package/script/types/4_gift.d.ts.map +1 -0
  1746. package/script/types/4_gift.js +117 -0
  1747. package/script/types/4_join_request.d.ts +39 -0
  1748. package/script/types/4_join_request.d.ts.map +1 -0
  1749. package/script/types/4_join_request.js +66 -0
  1750. package/script/types/4_poll.d.ts +55 -0
  1751. package/script/types/4_poll.d.ts.map +1 -0
  1752. package/script/types/4_poll.js +46 -0
  1753. package/script/types/4_reply_to.d.ts +51 -0
  1754. package/script/types/4_reply_to.d.ts.map +1 -0
  1755. package/script/types/4_reply_to.js +21 -0
  1756. package/script/types/5_claimed_gift.d.ts +44 -0
  1757. package/script/types/5_claimed_gift.d.ts.map +1 -0
  1758. package/script/types/5_claimed_gift.js +46 -0
  1759. package/script/types/5_gift_non_upgraded_information.d.ts +47 -0
  1760. package/script/types/5_gift_non_upgraded_information.d.ts.map +1 -0
  1761. package/script/types/5_gift_non_upgraded_information.js +72 -0
  1762. package/script/types/5_gift_upgraded_information.d.ts +41 -0
  1763. package/script/types/5_gift_upgraded_information.d.ts.map +1 -0
  1764. package/script/types/5_gift_upgraded_information.js +61 -0
  1765. package/script/types/5_link_preview.d.ts +186 -0
  1766. package/script/types/5_link_preview.d.ts.map +1 -0
  1767. package/script/types/5_link_preview.js +208 -0
  1768. package/script/types/6_claimed_gifts.d.ts +33 -0
  1769. package/script/types/6_claimed_gifts.d.ts.map +1 -0
  1770. package/script/types/6_claimed_gifts.js +46 -0
  1771. package/script/types/6_message.d.ts +704 -0
  1772. package/script/types/6_message.d.ts.map +1 -0
  1773. package/script/types/6_message.js +558 -0
  1774. package/script/types/6_message_content.d.ts +124 -0
  1775. package/script/types/6_message_content.d.ts.map +1 -0
  1776. package/script/types/6_message_content.js +21 -0
  1777. package/script/types/7_callback_query.d.ts +43 -0
  1778. package/script/types/7_callback_query.d.ts.map +1 -0
  1779. package/script/types/7_callback_query.js +63 -0
  1780. package/script/types/7_chat_list_item.d.ts +43 -0
  1781. package/script/types/7_chat_list_item.d.ts.map +1 -0
  1782. package/script/types/7_chat_list_item.js +60 -0
  1783. package/script/types/7_inline_query_result.d.ts +251 -0
  1784. package/script/types/7_inline_query_result.d.ts.map +1 -0
  1785. package/script/types/7_inline_query_result.js +384 -0
  1786. package/script/types/7_message_list.d.ts +28 -0
  1787. package/script/types/7_message_list.d.ts.map +1 -0
  1788. package/script/types/7_message_list.js +21 -0
  1789. package/script/types/7_saved_chat.d.ts +35 -0
  1790. package/script/types/7_saved_chat.d.ts.map +1 -0
  1791. package/script/types/7_saved_chat.js +45 -0
  1792. package/script/types/7_topic.d.ts +44 -0
  1793. package/script/types/7_topic.d.ts.map +1 -0
  1794. package/script/types/7_topic.js +64 -0
  1795. package/script/types/8_inline_query_answer.d.ts +32 -0
  1796. package/script/types/8_inline_query_answer.d.ts.map +1 -0
  1797. package/script/types/8_inline_query_answer.js +31 -0
  1798. package/script/types/8_saved_chats.d.ts +33 -0
  1799. package/script/types/8_saved_chats.d.ts.map +1 -0
  1800. package/script/types/8_saved_chats.js +39 -0
  1801. package/script/types/8_update.d.ts +583 -0
  1802. package/script/types/8_update.d.ts.map +1 -0
  1803. package/script/types/8_update.js +21 -0
  1804. package/script/types/_file_id.d.ts +64 -51
  1805. package/script/types/_file_id.d.ts.map +1 -1
  1806. package/script/types/_file_id.js +158 -139
  1807. package/script/types/_getters.d.ts +4 -11
  1808. package/script/types/_getters.d.ts.map +1 -1
  1809. package/script/types/_getters.js +1 -1
  1810. package/script/utilities/0_color.d.ts +1 -1
  1811. package/script/utilities/0_color.js +1 -1
  1812. package/script/utilities/0_env.d.ts.map +1 -1
  1813. package/script/utilities/0_env.js +37 -8
  1814. package/script/utilities/0_gzip.d.ts +22 -0
  1815. package/script/utilities/0_gzip.d.ts.map +1 -0
  1816. package/script/utilities/0_gzip.js +46 -0
  1817. package/script/utilities/0_hash.d.ts +3 -3
  1818. package/script/utilities/0_hash.d.ts.map +1 -1
  1819. package/script/utilities/0_hash.js +1 -1
  1820. package/script/utilities/0_int.d.ts +71 -0
  1821. package/script/utilities/0_int.d.ts.map +1 -0
  1822. package/script/utilities/0_int.js +149 -0
  1823. package/script/utilities/0_misc.d.ts +29 -0
  1824. package/script/utilities/0_misc.d.ts.map +1 -0
  1825. package/script/utilities/0_misc.js +95 -0
  1826. package/script/utilities/0_mutex.d.ts +1 -1
  1827. package/script/utilities/0_mutex.js +5 -20
  1828. package/script/utilities/0_object.d.ts +1 -1
  1829. package/script/utilities/0_object.js +1 -1
  1830. package/script/utilities/0_part_stream.d.ts +4 -4
  1831. package/script/utilities/0_part_stream.d.ts.map +1 -1
  1832. package/script/utilities/0_part_stream.js +13 -27
  1833. package/script/utilities/0_rle.d.ts +3 -3
  1834. package/script/utilities/0_rle.d.ts.map +1 -1
  1835. package/script/utilities/0_rle.js +2 -2
  1836. package/script/utilities/0_text.d.ts +22 -0
  1837. package/script/utilities/0_text.d.ts.map +1 -0
  1838. package/script/utilities/0_text.js +31 -0
  1839. package/script/utilities/0_types.d.ts +1 -1
  1840. package/script/utilities/0_types.js +1 -1
  1841. package/script/utilities/0_units.d.ts +1 -4
  1842. package/script/utilities/0_units.d.ts.map +1 -1
  1843. package/script/utilities/0_units.js +2 -5
  1844. package/script/utilities/1_auth.d.ts +2 -2
  1845. package/script/utilities/1_auth.d.ts.map +1 -1
  1846. package/script/utilities/1_auth.js +6 -7
  1847. package/script/utilities/1_base64.d.ts +3 -3
  1848. package/script/utilities/1_base64.d.ts.map +1 -1
  1849. package/script/utilities/1_base64.js +4 -4
  1850. package/script/utilities/1_crypto.d.ts +30 -0
  1851. package/script/utilities/1_crypto.d.ts.map +1 -0
  1852. package/script/utilities/1_crypto.js +83 -0
  1853. package/script/utilities/1_logger.d.ts +3 -3
  1854. package/script/utilities/1_logger.d.ts.map +1 -1
  1855. package/script/utilities/1_logger.js +5 -4
  1856. package/script/utilities/1_math.d.ts +1 -1
  1857. package/script/utilities/1_math.js +7 -7
  1858. package/script/utilities/2_queue.d.ts +2 -2
  1859. package/script/utilities/2_queue.d.ts.map +1 -1
  1860. package/script/utilities/2_queue.js +33 -47
  1861. package/esm/client/0_filters.d.ts +0 -58
  1862. package/esm/client/0_filters.d.ts.map +0 -1
  1863. package/esm/client/0_filters.js +0 -49
  1864. package/esm/client/0_message.d.ts +0 -29
  1865. package/esm/client/0_message.d.ts.map +0 -1
  1866. package/esm/client/0_message.js +0 -83
  1867. package/esm/client/1_client_encrypted.d.ts +0 -52
  1868. package/esm/client/1_client_encrypted.d.ts.map +0 -1
  1869. package/esm/client/1_client_encrypted.js +0 -339
  1870. package/esm/client/1_composer.d.ts +0 -51
  1871. package/esm/client/1_composer.d.ts.map +0 -1
  1872. package/esm/client/1_composer.js +0 -168
  1873. package/esm/client/5_client.d.ts +0 -1372
  1874. package/esm/client/5_client.d.ts.map +0 -1
  1875. package/esm/client/5_client.js +0 -2858
  1876. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
  1877. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts.map +0 -1
  1878. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -167
  1879. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts +0 -3
  1880. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts.map +0 -1
  1881. package/esm/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -308
  1882. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
  1883. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
  1884. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -46
  1885. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
  1886. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
  1887. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -46
  1888. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
  1889. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
  1890. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -22
  1891. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
  1892. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -30
  1893. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
  1894. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
  1895. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -183
  1896. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
  1897. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
  1898. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -45
  1899. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
  1900. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
  1901. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -27
  1902. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
  1903. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
  1904. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -20
  1905. package/esm/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
  1906. package/esm/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
  1907. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +0 -22
  1908. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
  1909. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
  1910. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -29
  1911. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
  1912. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
  1913. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -29
  1914. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
  1915. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
  1916. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -52
  1917. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
  1918. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
  1919. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -53
  1920. package/esm/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
  1921. package/esm/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
  1922. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +0 -28
  1923. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
  1924. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
  1925. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -29
  1926. package/esm/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
  1927. package/esm/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
  1928. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +0 -26
  1929. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
  1930. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
  1931. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -45
  1932. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
  1933. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
  1934. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -32
  1935. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
  1936. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
  1937. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -29
  1938. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
  1939. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
  1940. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -26
  1941. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
  1942. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
  1943. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -32
  1944. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
  1945. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
  1946. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -159
  1947. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
  1948. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
  1949. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -53
  1950. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
  1951. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
  1952. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -57
  1953. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
  1954. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
  1955. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -26
  1956. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
  1957. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
  1958. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -44
  1959. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
  1960. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
  1961. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -20
  1962. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
  1963. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -20
  1964. package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts +0 -19
  1965. package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  1966. package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -32
  1967. package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts +0 -2
  1968. package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts.map +0 -1
  1969. package/esm/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +0 -26
  1970. package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts +0 -38
  1971. package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts.map +0 -1
  1972. package/esm/deps/jsr.io/@std/encoding/1.0.5/base64.js +0 -163
  1973. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  1974. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  1975. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -110
  1976. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  1977. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -276
  1978. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  1979. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -179
  1980. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  1981. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  1982. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -37
  1983. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  1984. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -207
  1985. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  1986. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  1987. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -2
  1988. package/esm/deps/jsr.io/@std/io/0.225.0/_constants.d.ts.map +0 -1
  1989. package/esm/deps/jsr.io/@std/io/0.225.0/_constants.js +0 -4
  1990. package/esm/deps/jsr.io/@std/io/0.225.0/iterate_reader.d.ts.map +0 -1
  1991. package/esm/deps/jsr.io/@std/io/0.225.0/iterate_reader.js +0 -96
  1992. package/esm/deps/jsr.io/@std/io/0.225.0/types.d.ts.map +0 -1
  1993. package/esm/deps/jsr.io/@std/io/0.225.0/types.js +0 -15
  1994. package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
  1995. package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -7
  1996. package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
  1997. package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -40
  1998. package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
  1999. package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -46
  2000. package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
  2001. package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -8
  2002. package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
  2003. package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -77
  2004. package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
  2005. package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -19
  2006. package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
  2007. package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -15
  2008. package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
  2009. package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
  2010. package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +0 -9
  2011. package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
  2012. package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
  2013. package/esm/deps/jsr.io/@std/path/1.0.8/basename.js +0 -36
  2014. package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
  2015. package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
  2016. package/esm/deps/jsr.io/@std/path/1.0.8/extname.js +0 -29
  2017. package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
  2018. package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -28
  2019. package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
  2020. package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
  2021. package/esm/deps/jsr.io/@std/path/1.0.8/join.js +0 -29
  2022. package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
  2023. package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -8
  2024. package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
  2025. package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
  2026. package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -49
  2027. package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
  2028. package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
  2029. package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -89
  2030. package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
  2031. package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -23
  2032. package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
  2033. package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
  2034. package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -42
  2035. package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
  2036. package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
  2037. package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -57
  2038. package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
  2039. package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -27
  2040. package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
  2041. package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -28
  2042. package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
  2043. package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -15
  2044. package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
  2045. package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
  2046. package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -44
  2047. package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
  2048. package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
  2049. package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -81
  2050. package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
  2051. package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -38
  2052. package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
  2053. package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
  2054. package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -74
  2055. package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
  2056. package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
  2057. package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -134
  2058. package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
  2059. package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -34
  2060. package/esm/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.d.ts.map +0 -1
  2061. package/esm/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.js +0 -35
  2062. package/esm/tl/0_api.d.ts +0 -15839
  2063. package/esm/tl/0_api.d.ts.map +0 -1
  2064. package/esm/tl/0_api.js +0 -24746
  2065. package/esm/tl/0_tl_raw_reader.d.ts +0 -36
  2066. package/esm/tl/0_tl_raw_reader.d.ts.map +0 -1
  2067. package/esm/tl/0_tl_raw_reader.js +0 -87
  2068. package/esm/tl/0_tl_raw_writer.d.ts +0 -34
  2069. package/esm/tl/0_tl_raw_writer.d.ts.map +0 -1
  2070. package/esm/tl/0_tl_raw_writer.js +0 -86
  2071. package/esm/tl/2_deserialize.d.ts +0 -23
  2072. package/esm/tl/2_deserialize.d.ts.map +0 -1
  2073. package/esm/tl/2_deserialize.js +0 -95
  2074. package/esm/tl/2_serialize.d.ts +0 -22
  2075. package/esm/tl/2_serialize.d.ts.map +0 -1
  2076. package/esm/tl/2_serialize.js +0 -160
  2077. package/esm/tl/3_tl_reader.d.ts +0 -26
  2078. package/esm/tl/3_tl_reader.d.ts.map +0 -1
  2079. package/esm/tl/3_tl_reader.js +0 -49
  2080. package/esm/tl/3_utilities.d.ts +0 -34
  2081. package/esm/tl/3_utilities.d.ts.map +0 -1
  2082. package/esm/tl/3_utilities.js +0 -89
  2083. package/esm/tl/4_rpc_result.d.ts +0 -27
  2084. package/esm/tl/4_rpc_result.d.ts.map +0 -1
  2085. package/esm/tl/4_rpc_result.js +0 -28
  2086. package/esm/tl/4_tl_writer.d.ts +0 -25
  2087. package/esm/tl/4_tl_writer.d.ts.map +0 -1
  2088. package/esm/tl/4_tl_writer.js +0 -45
  2089. package/esm/tl/5_message.d.ts +0 -39
  2090. package/esm/tl/5_message.d.ts.map +0 -1
  2091. package/esm/tl/5_message.js +0 -98
  2092. package/esm/transport/2_transport_provider.d.ts +0 -35
  2093. package/esm/transport/2_transport_provider.d.ts.map +0 -1
  2094. package/esm/transport/2_transport_provider.js +0 -81
  2095. package/esm/transport/3_transport_provider_tcp.d.ts +0 -25
  2096. package/esm/transport/3_transport_provider_tcp.d.ts.map +0 -1
  2097. package/esm/transport/3_transport_provider_tcp.js +0 -29
  2098. package/esm/transport/3_transport_provider_web_socket.d.ts +0 -24
  2099. package/esm/transport/3_transport_provider_web_socket.d.ts.map +0 -1
  2100. package/esm/transport/3_transport_provider_web_socket.js +0 -43
  2101. package/esm/types/0_link_preview.d.ts +0 -35
  2102. package/esm/types/0_link_preview.d.ts.map +0 -1
  2103. package/esm/types/0_link_preview.js +0 -28
  2104. package/esm/types/0_message_entity.d.ts +0 -139
  2105. package/esm/types/0_message_entity.d.ts.map +0 -1
  2106. package/esm/types/0_message_entity.js +0 -183
  2107. package/esm/types/0_mini_app_info.d.ts +0 -26
  2108. package/esm/types/0_mini_app_info.d.ts.map +0 -1
  2109. package/esm/types/0_mini_app_info.js +0 -22
  2110. package/esm/types/0_opening_hours.d.ts +0 -26
  2111. package/esm/types/0_opening_hours.d.ts.map +0 -1
  2112. package/esm/types/0_opening_hours.js +0 -25
  2113. package/esm/types/1_input_media.d.ts +0 -122
  2114. package/esm/types/1_input_media.d.ts.map +0 -1
  2115. package/esm/types/1_input_media.js +0 -20
  2116. package/esm/types/1_message_content.d.ts +0 -119
  2117. package/esm/types/1_message_content.d.ts.map +0 -1
  2118. package/esm/types/1_message_content.js +0 -20
  2119. package/esm/types/1_poll_option.d.ts +0 -32
  2120. package/esm/types/1_poll_option.d.ts.map +0 -1
  2121. package/esm/types/1_poll_option.js +0 -27
  2122. package/esm/types/1_reply_quote.d.ts +0 -32
  2123. package/esm/types/1_reply_quote.d.ts.map +0 -1
  2124. package/esm/types/1_reply_quote.js +0 -30
  2125. package/esm/types/1_story_privacy.d.ts +0 -46
  2126. package/esm/types/1_story_privacy.d.ts.map +0 -1
  2127. package/esm/types/1_story_privacy.js +0 -76
  2128. package/esm/types/1_user.d.ts +0 -56
  2129. package/esm/types/1_user.d.ts.map +0 -1
  2130. package/esm/types/1_user.js +0 -47
  2131. package/esm/types/2_business_connection.d.ts +0 -37
  2132. package/esm/types/2_business_connection.d.ts.map +0 -1
  2133. package/esm/types/2_business_connection.js +0 -30
  2134. package/esm/types/2_chosen_inline_result.d.ts +0 -38
  2135. package/esm/types/2_chosen_inline_result.d.ts.map +0 -1
  2136. package/esm/types/2_chosen_inline_result.js +0 -37
  2137. package/esm/types/2_forward_header.d.ts +0 -40
  2138. package/esm/types/2_forward_header.d.ts.map +0 -1
  2139. package/esm/types/2_forward_header.js +0 -55
  2140. package/esm/types/2_game.d.ts +0 -40
  2141. package/esm/types/2_game.d.ts.map +0 -1
  2142. package/esm/types/2_game.js +0 -44
  2143. package/esm/types/2_inline_keyboard_button.d.ts +0 -138
  2144. package/esm/types/2_inline_keyboard_button.d.ts.map +0 -1
  2145. package/esm/types/2_inline_keyboard_button.js +0 -117
  2146. package/esm/types/2_inline_query.d.ts +0 -40
  2147. package/esm/types/2_inline_query.d.ts.map +0 -1
  2148. package/esm/types/2_inline_query.js +0 -60
  2149. package/esm/types/2_invite_link.d.ts +0 -47
  2150. package/esm/types/2_invite_link.d.ts.map +0 -1
  2151. package/esm/types/2_invite_link.js +0 -48
  2152. package/esm/types/2_message_reactions.d.ts +0 -43
  2153. package/esm/types/2_message_reactions.d.ts.map +0 -1
  2154. package/esm/types/2_message_reactions.js +0 -56
  2155. package/esm/types/2_poll.d.ts +0 -55
  2156. package/esm/types/2_poll.d.ts.map +0 -1
  2157. package/esm/types/2_poll.js +0 -43
  2158. package/esm/types/2_pre_checkout_query.d.ts +0 -34
  2159. package/esm/types/2_pre_checkout_query.d.ts.map +0 -1
  2160. package/esm/types/2_pre_checkout_query.js +0 -39
  2161. package/esm/types/2_reply_to.d.ts +0 -35
  2162. package/esm/types/2_reply_to.d.ts.map +0 -1
  2163. package/esm/types/2_reply_to.js +0 -20
  2164. package/esm/types/3_chat_member_updated.d.ts +0 -44
  2165. package/esm/types/3_chat_member_updated.d.ts.map +0 -1
  2166. package/esm/types/3_chat_member_updated.js +0 -53
  2167. package/esm/types/3_join_request.d.ts +0 -39
  2168. package/esm/types/3_join_request.d.ts.map +0 -1
  2169. package/esm/types/3_join_request.js +0 -45
  2170. package/esm/types/3_reply_markup.d.ts +0 -71
  2171. package/esm/types/3_reply_markup.d.ts.map +0 -1
  2172. package/esm/types/3_reply_markup.js +0 -127
  2173. package/esm/types/4_inline_query_result.d.ts +0 -251
  2174. package/esm/types/4_inline_query_result.d.ts.map +0 -1
  2175. package/esm/types/4_inline_query_result.js +0 -380
  2176. package/esm/types/4_message.d.ts +0 -615
  2177. package/esm/types/4_message.d.ts.map +0 -1
  2178. package/esm/types/4_message.js +0 -533
  2179. package/esm/types/5_callback_query.d.ts +0 -43
  2180. package/esm/types/5_callback_query.d.ts.map +0 -1
  2181. package/esm/types/5_callback_query.js +0 -60
  2182. package/esm/types/5_chat_list_item.d.ts +0 -36
  2183. package/esm/types/5_chat_list_item.d.ts.map +0 -1
  2184. package/esm/types/5_chat_list_item.js +0 -86
  2185. package/esm/types/5_inline_query_answer.d.ts +0 -32
  2186. package/esm/types/5_inline_query_answer.d.ts.map +0 -1
  2187. package/esm/types/5_inline_query_answer.js +0 -28
  2188. package/esm/types/6_update.d.ts +0 -388
  2189. package/esm/types/6_update.d.ts.map +0 -1
  2190. package/esm/types/6_update.js +0 -20
  2191. package/esm/utilities/0_bigint.d.ts +0 -29
  2192. package/esm/utilities/0_bigint.d.ts.map +0 -1
  2193. package/esm/utilities/0_bigint.js +0 -90
  2194. package/esm/utilities/0_buffer.d.ts +0 -21
  2195. package/esm/utilities/0_buffer.d.ts.map +0 -1
  2196. package/esm/utilities/0_buffer.js +0 -51
  2197. package/esm/utilities/0_cache_map.d.ts +0 -26
  2198. package/esm/utilities/0_cache_map.d.ts.map +0 -1
  2199. package/esm/utilities/0_cache_map.js +0 -52
  2200. package/esm/utilities/0_crypto.d.ts +0 -27
  2201. package/esm/utilities/0_crypto.d.ts.map +0 -1
  2202. package/esm/utilities/0_crypto.js +0 -48
  2203. package/esm/utilities/0_gunzip.d.ts +0 -2
  2204. package/esm/utilities/0_gunzip.d.ts.map +0 -1
  2205. package/esm/utilities/0_gunzip.js +0 -17
  2206. package/esm/utilities/1_misc.d.ts +0 -29
  2207. package/esm/utilities/1_misc.d.ts.map +0 -1
  2208. package/esm/utilities/1_misc.js +0 -72
  2209. package/script/client/0_filters.d.ts +0 -58
  2210. package/script/client/0_filters.d.ts.map +0 -1
  2211. package/script/client/0_filters.js +0 -52
  2212. package/script/client/0_message.d.ts +0 -29
  2213. package/script/client/0_message.d.ts.map +0 -1
  2214. package/script/client/0_message.js +0 -90
  2215. package/script/client/1_client_encrypted.d.ts +0 -52
  2216. package/script/client/1_client_encrypted.d.ts.map +0 -1
  2217. package/script/client/1_client_encrypted.js +0 -343
  2218. package/script/client/1_composer.d.ts +0 -51
  2219. package/script/client/1_composer.d.ts.map +0 -1
  2220. package/script/client/1_composer.js +0 -175
  2221. package/script/client/5_client.d.ts +0 -1372
  2222. package/script/client/5_client.d.ts.map +0 -1
  2223. package/script/client/5_client.js +0 -2863
  2224. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts +0 -55
  2225. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.d.ts.map +0 -1
  2226. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/mod.js +0 -182
  2227. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts +0 -3
  2228. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.d.ts.map +0 -1
  2229. package/script/deps/jsr.io/@roj/tgcrypto/0.4.1/dist/tgcrypto.js +0 -310
  2230. package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
  2231. package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
  2232. package/script/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -49
  2233. package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
  2234. package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
  2235. package/script/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -49
  2236. package/script/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
  2237. package/script/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
  2238. package/script/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -25
  2239. package/script/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
  2240. package/script/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -34
  2241. package/script/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
  2242. package/script/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
  2243. package/script/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -209
  2244. package/script/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
  2245. package/script/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
  2246. package/script/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -48
  2247. package/script/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
  2248. package/script/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
  2249. package/script/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -30
  2250. package/script/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
  2251. package/script/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
  2252. package/script/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -23
  2253. package/script/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
  2254. package/script/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
  2255. package/script/deps/jsr.io/@std/assert/1.0.8/false.js +0 -25
  2256. package/script/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
  2257. package/script/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
  2258. package/script/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -32
  2259. package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
  2260. package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
  2261. package/script/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -32
  2262. package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
  2263. package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
  2264. package/script/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -55
  2265. package/script/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
  2266. package/script/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
  2267. package/script/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -56
  2268. package/script/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
  2269. package/script/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
  2270. package/script/deps/jsr.io/@std/assert/1.0.8/less.js +0 -31
  2271. package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
  2272. package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
  2273. package/script/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -32
  2274. package/script/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
  2275. package/script/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
  2276. package/script/deps/jsr.io/@std/assert/1.0.8/match.js +0 -29
  2277. package/script/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
  2278. package/script/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
  2279. package/script/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -61
  2280. package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
  2281. package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
  2282. package/script/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -35
  2283. package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
  2284. package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
  2285. package/script/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -32
  2286. package/script/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
  2287. package/script/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
  2288. package/script/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -29
  2289. package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
  2290. package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
  2291. package/script/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -35
  2292. package/script/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
  2293. package/script/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
  2294. package/script/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -162
  2295. package/script/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
  2296. package/script/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
  2297. package/script/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -56
  2298. package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
  2299. package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
  2300. package/script/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -60
  2301. package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
  2302. package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
  2303. package/script/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -29
  2304. package/script/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
  2305. package/script/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
  2306. package/script/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -47
  2307. package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
  2308. package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
  2309. package/script/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -23
  2310. package/script/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
  2311. package/script/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -23
  2312. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts +0 -19
  2313. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  2314. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -35
  2315. package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts +0 -2
  2316. package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.d.ts.map +0 -1
  2317. package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +0 -29
  2318. package/script/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts +0 -38
  2319. package/script/deps/jsr.io/@std/encoding/1.0.5/base64.d.ts.map +0 -1
  2320. package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +0 -167
  2321. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
  2322. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  2323. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
  2324. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  2325. package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
  2326. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  2327. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
  2328. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
  2329. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  2330. package/script/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
  2331. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  2332. package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
  2333. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
  2334. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  2335. package/script/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
  2336. package/script/deps/jsr.io/@std/io/0.225.0/_constants.d.ts.map +0 -1
  2337. package/script/deps/jsr.io/@std/io/0.225.0/_constants.js +0 -7
  2338. package/script/deps/jsr.io/@std/io/0.225.0/iterate_reader.d.ts.map +0 -1
  2339. package/script/deps/jsr.io/@std/io/0.225.0/iterate_reader.js +0 -100
  2340. package/script/deps/jsr.io/@std/io/0.225.0/types.d.ts.map +0 -1
  2341. package/script/deps/jsr.io/@std/io/0.225.0/types.js +0 -18
  2342. package/script/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
  2343. package/script/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -10
  2344. package/script/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
  2345. package/script/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -45
  2346. package/script/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
  2347. package/script/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -49
  2348. package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
  2349. package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -11
  2350. package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
  2351. package/script/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -80
  2352. package/script/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
  2353. package/script/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -22
  2354. package/script/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
  2355. package/script/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -18
  2356. package/script/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
  2357. package/script/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
  2358. package/script/deps/jsr.io/@std/path/1.0.8/_os.js +0 -35
  2359. package/script/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
  2360. package/script/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
  2361. package/script/deps/jsr.io/@std/path/1.0.8/basename.js +0 -39
  2362. package/script/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
  2363. package/script/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
  2364. package/script/deps/jsr.io/@std/path/1.0.8/extname.js +0 -32
  2365. package/script/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
  2366. package/script/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -31
  2367. package/script/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
  2368. package/script/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
  2369. package/script/deps/jsr.io/@std/path/1.0.8/join.js +0 -32
  2370. package/script/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
  2371. package/script/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -11
  2372. package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
  2373. package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
  2374. package/script/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -52
  2375. package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
  2376. package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
  2377. package/script/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -92
  2378. package/script/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
  2379. package/script/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -26
  2380. package/script/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
  2381. package/script/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
  2382. package/script/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -45
  2383. package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
  2384. package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
  2385. package/script/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -60
  2386. package/script/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
  2387. package/script/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -30
  2388. package/script/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
  2389. package/script/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -31
  2390. package/script/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
  2391. package/script/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -20
  2392. package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
  2393. package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
  2394. package/script/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -47
  2395. package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
  2396. package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
  2397. package/script/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -84
  2398. package/script/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
  2399. package/script/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -41
  2400. package/script/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
  2401. package/script/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
  2402. package/script/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -77
  2403. package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
  2404. package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
  2405. package/script/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -137
  2406. package/script/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
  2407. package/script/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -37
  2408. package/script/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.d.ts.map +0 -1
  2409. package/script/deps/jsr.io/@std/streams/1.0.8/to_array_buffer.js +0 -38
  2410. package/script/tl/0_api.d.ts +0 -15839
  2411. package/script/tl/0_api.d.ts.map +0 -1
  2412. package/script/tl/0_api.js +0 -24772
  2413. package/script/tl/0_tl_raw_reader.d.ts +0 -36
  2414. package/script/tl/0_tl_raw_reader.d.ts.map +0 -1
  2415. package/script/tl/0_tl_raw_reader.js +0 -92
  2416. package/script/tl/0_tl_raw_writer.d.ts +0 -34
  2417. package/script/tl/0_tl_raw_writer.d.ts.map +0 -1
  2418. package/script/tl/0_tl_raw_writer.js +0 -90
  2419. package/script/tl/2_deserialize.d.ts +0 -23
  2420. package/script/tl/2_deserialize.d.ts.map +0 -1
  2421. package/script/tl/2_deserialize.js +0 -98
  2422. package/script/tl/2_serialize.d.ts +0 -22
  2423. package/script/tl/2_serialize.d.ts.map +0 -1
  2424. package/script/tl/2_serialize.js +0 -163
  2425. package/script/tl/3_tl_reader.d.ts +0 -26
  2426. package/script/tl/3_tl_reader.d.ts.map +0 -1
  2427. package/script/tl/3_tl_reader.js +0 -53
  2428. package/script/tl/3_utilities.d.ts +0 -34
  2429. package/script/tl/3_utilities.d.ts.map +0 -1
  2430. package/script/tl/3_utilities.js +0 -97
  2431. package/script/tl/4_rpc_result.d.ts +0 -27
  2432. package/script/tl/4_rpc_result.d.ts.map +0 -1
  2433. package/script/tl/4_rpc_result.js +0 -32
  2434. package/script/tl/4_tl_writer.d.ts +0 -25
  2435. package/script/tl/4_tl_writer.d.ts.map +0 -1
  2436. package/script/tl/4_tl_writer.js +0 -49
  2437. package/script/tl/5_message.d.ts +0 -39
  2438. package/script/tl/5_message.d.ts.map +0 -1
  2439. package/script/tl/5_message.js +0 -106
  2440. package/script/transport/2_transport_provider.d.ts +0 -35
  2441. package/script/transport/2_transport_provider.d.ts.map +0 -1
  2442. package/script/transport/2_transport_provider.js +0 -86
  2443. package/script/transport/3_transport_provider_tcp.d.ts +0 -25
  2444. package/script/transport/3_transport_provider_tcp.d.ts.map +0 -1
  2445. package/script/transport/3_transport_provider_tcp.js +0 -32
  2446. package/script/transport/3_transport_provider_web_socket.d.ts +0 -24
  2447. package/script/transport/3_transport_provider_web_socket.d.ts.map +0 -1
  2448. package/script/transport/3_transport_provider_web_socket.js +0 -47
  2449. package/script/types/0_link_preview.d.ts +0 -35
  2450. package/script/types/0_link_preview.d.ts.map +0 -1
  2451. package/script/types/0_link_preview.js +0 -31
  2452. package/script/types/0_message_entity.d.ts +0 -139
  2453. package/script/types/0_message_entity.d.ts.map +0 -1
  2454. package/script/types/0_message_entity.js +0 -188
  2455. package/script/types/0_mini_app_info.d.ts +0 -26
  2456. package/script/types/0_mini_app_info.d.ts.map +0 -1
  2457. package/script/types/0_mini_app_info.js +0 -25
  2458. package/script/types/0_opening_hours.d.ts +0 -26
  2459. package/script/types/0_opening_hours.d.ts.map +0 -1
  2460. package/script/types/0_opening_hours.js +0 -28
  2461. package/script/types/1_input_media.d.ts +0 -122
  2462. package/script/types/1_input_media.d.ts.map +0 -1
  2463. package/script/types/1_input_media.js +0 -21
  2464. package/script/types/1_message_content.d.ts +0 -119
  2465. package/script/types/1_message_content.d.ts.map +0 -1
  2466. package/script/types/1_message_content.js +0 -21
  2467. package/script/types/1_poll_option.d.ts +0 -32
  2468. package/script/types/1_poll_option.d.ts.map +0 -1
  2469. package/script/types/1_poll_option.js +0 -30
  2470. package/script/types/1_reply_quote.d.ts +0 -32
  2471. package/script/types/1_reply_quote.d.ts.map +0 -1
  2472. package/script/types/1_reply_quote.js +0 -33
  2473. package/script/types/1_story_privacy.d.ts +0 -46
  2474. package/script/types/1_story_privacy.d.ts.map +0 -1
  2475. package/script/types/1_story_privacy.js +0 -80
  2476. package/script/types/1_user.d.ts +0 -56
  2477. package/script/types/1_user.d.ts.map +0 -1
  2478. package/script/types/1_user.js +0 -50
  2479. package/script/types/2_business_connection.d.ts +0 -37
  2480. package/script/types/2_business_connection.d.ts.map +0 -1
  2481. package/script/types/2_business_connection.js +0 -33
  2482. package/script/types/2_chosen_inline_result.d.ts +0 -38
  2483. package/script/types/2_chosen_inline_result.d.ts.map +0 -1
  2484. package/script/types/2_chosen_inline_result.js +0 -40
  2485. package/script/types/2_forward_header.d.ts +0 -40
  2486. package/script/types/2_forward_header.d.ts.map +0 -1
  2487. package/script/types/2_forward_header.js +0 -58
  2488. package/script/types/2_game.d.ts +0 -40
  2489. package/script/types/2_game.d.ts.map +0 -1
  2490. package/script/types/2_game.js +0 -47
  2491. package/script/types/2_inline_keyboard_button.d.ts +0 -138
  2492. package/script/types/2_inline_keyboard_button.d.ts.map +0 -1
  2493. package/script/types/2_inline_keyboard_button.js +0 -121
  2494. package/script/types/2_inline_query.d.ts +0 -40
  2495. package/script/types/2_inline_query.d.ts.map +0 -1
  2496. package/script/types/2_inline_query.js +0 -63
  2497. package/script/types/2_invite_link.d.ts +0 -47
  2498. package/script/types/2_invite_link.d.ts.map +0 -1
  2499. package/script/types/2_invite_link.js +0 -51
  2500. package/script/types/2_message_reactions.d.ts +0 -43
  2501. package/script/types/2_message_reactions.d.ts.map +0 -1
  2502. package/script/types/2_message_reactions.js +0 -59
  2503. package/script/types/2_poll.d.ts +0 -55
  2504. package/script/types/2_poll.d.ts.map +0 -1
  2505. package/script/types/2_poll.js +0 -46
  2506. package/script/types/2_pre_checkout_query.d.ts +0 -34
  2507. package/script/types/2_pre_checkout_query.d.ts.map +0 -1
  2508. package/script/types/2_pre_checkout_query.js +0 -42
  2509. package/script/types/2_reply_to.d.ts +0 -35
  2510. package/script/types/2_reply_to.d.ts.map +0 -1
  2511. package/script/types/2_reply_to.js +0 -21
  2512. package/script/types/3_chat_member_updated.d.ts +0 -44
  2513. package/script/types/3_chat_member_updated.d.ts.map +0 -1
  2514. package/script/types/3_chat_member_updated.js +0 -56
  2515. package/script/types/3_join_request.d.ts +0 -39
  2516. package/script/types/3_join_request.d.ts.map +0 -1
  2517. package/script/types/3_join_request.js +0 -48
  2518. package/script/types/3_reply_markup.d.ts +0 -71
  2519. package/script/types/3_reply_markup.d.ts.map +0 -1
  2520. package/script/types/3_reply_markup.js +0 -131
  2521. package/script/types/4_inline_query_result.d.ts +0 -251
  2522. package/script/types/4_inline_query_result.d.ts.map +0 -1
  2523. package/script/types/4_inline_query_result.js +0 -384
  2524. package/script/types/4_message.d.ts +0 -615
  2525. package/script/types/4_message.d.ts.map +0 -1
  2526. package/script/types/4_message.js +0 -537
  2527. package/script/types/5_callback_query.d.ts +0 -43
  2528. package/script/types/5_callback_query.d.ts.map +0 -1
  2529. package/script/types/5_callback_query.js +0 -64
  2530. package/script/types/5_chat_list_item.d.ts +0 -36
  2531. package/script/types/5_chat_list_item.d.ts.map +0 -1
  2532. package/script/types/5_chat_list_item.js +0 -93
  2533. package/script/types/5_inline_query_answer.d.ts +0 -32
  2534. package/script/types/5_inline_query_answer.d.ts.map +0 -1
  2535. package/script/types/5_inline_query_answer.js +0 -31
  2536. package/script/types/6_update.d.ts +0 -388
  2537. package/script/types/6_update.d.ts.map +0 -1
  2538. package/script/types/6_update.js +0 -21
  2539. package/script/utilities/0_bigint.d.ts +0 -29
  2540. package/script/utilities/0_bigint.d.ts.map +0 -1
  2541. package/script/utilities/0_bigint.js +0 -98
  2542. package/script/utilities/0_buffer.d.ts +0 -21
  2543. package/script/utilities/0_buffer.d.ts.map +0 -1
  2544. package/script/utilities/0_buffer.js +0 -54
  2545. package/script/utilities/0_cache_map.d.ts +0 -26
  2546. package/script/utilities/0_cache_map.d.ts.map +0 -1
  2547. package/script/utilities/0_cache_map.js +0 -56
  2548. package/script/utilities/0_crypto.d.ts +0 -27
  2549. package/script/utilities/0_crypto.d.ts.map +0 -1
  2550. package/script/utilities/0_crypto.js +0 -52
  2551. package/script/utilities/0_gunzip.d.ts +0 -2
  2552. package/script/utilities/0_gunzip.d.ts.map +0 -1
  2553. package/script/utilities/0_gunzip.js +0 -20
  2554. package/script/utilities/1_misc.d.ts +0 -29
  2555. package/script/utilities/1_misc.d.ts.map +0 -1
  2556. package/script/utilities/1_misc.js +0 -82
  2557. /package/esm/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/assertion_error.d.ts +0 -0
  2558. /package/esm/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/unreachable.d.ts +0 -0
  2559. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff.d.ts +0 -0
  2560. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff_str.d.ts +0 -0
  2561. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/styles.d.ts +0 -0
  2562. /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/_constants.d.ts +0 -0
  2563. /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/iterate_reader.d.ts +0 -0
  2564. /package/esm/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/types.d.ts +0 -0
  2565. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/assert_path.d.ts +0 -0
  2566. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/basename.d.ts +0 -0
  2567. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/constants.d.ts +0 -0
  2568. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize.d.ts +0 -0
  2569. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize_string.d.ts +0 -0
  2570. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/strip_trailing_separators.d.ts +0 -0
  2571. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/to_file_url.d.ts +0 -0
  2572. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/is_absolute.d.ts +0 -0
  2573. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/_util.d.ts +0 -0
  2574. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/is_absolute.d.ts +0 -0
  2575. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/to_file_url.d.ts +0 -0
  2576. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/to_file_url.d.ts +0 -0
  2577. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/_util.d.ts +0 -0
  2578. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/is_absolute.d.ts +0 -0
  2579. /package/esm/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/to_file_url.d.ts +0 -0
  2580. /package/esm/deps/jsr.io/@std/streams/{1.0.8 → 1.0.17}/to_array_buffer.d.ts +0 -0
  2581. /package/script/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/assertion_error.d.ts +0 -0
  2582. /package/script/deps/jsr.io/@std/assert/{1.0.8 → 1.0.19}/unreachable.d.ts +0 -0
  2583. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff.d.ts +0 -0
  2584. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/diff_str.d.ts +0 -0
  2585. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.12}/styles.d.ts +0 -0
  2586. /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/_constants.d.ts +0 -0
  2587. /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/iterate_reader.d.ts +0 -0
  2588. /package/script/deps/jsr.io/@std/io/{0.225.0 → 0.225.3}/types.d.ts +0 -0
  2589. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/assert_path.d.ts +0 -0
  2590. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/basename.d.ts +0 -0
  2591. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/constants.d.ts +0 -0
  2592. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize.d.ts +0 -0
  2593. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/normalize_string.d.ts +0 -0
  2594. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/strip_trailing_separators.d.ts +0 -0
  2595. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/_common/to_file_url.d.ts +0 -0
  2596. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/is_absolute.d.ts +0 -0
  2597. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/_util.d.ts +0 -0
  2598. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/is_absolute.d.ts +0 -0
  2599. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/posix/to_file_url.d.ts +0 -0
  2600. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/to_file_url.d.ts +0 -0
  2601. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/_util.d.ts +0 -0
  2602. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/is_absolute.d.ts +0 -0
  2603. /package/script/deps/jsr.io/@std/path/{1.0.8 → 1.1.4}/windows/to_file_url.d.ts +0 -0
  2604. /package/script/deps/jsr.io/@std/streams/{1.0.8 → 1.0.17}/to_array_buffer.d.ts +0 -0
@@ -0,0 +1,3414 @@
1
+ "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2026 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.Client = exports.handleMigrationError = exports.restartAuth = void 0;
23
+ const _0_deps_js_1 = require("../0_deps.js");
24
+ const _0_errors_js_1 = require("../0_errors.js");
25
+ const _1_utilities_js_1 = require("../1_utilities.js");
26
+ const _2_storage_js_1 = require("../2_storage.js");
27
+ const _2_tl_js_1 = require("../2_tl.js");
28
+ const _3_transport_js_1 = require("../3_transport.js");
29
+ const _3_types_js_1 = require("../3_types.js");
30
+ const _4_constants_js_1 = require("../4_constants.js");
31
+ const _4_errors_js_1 = require("../4_errors.js");
32
+ const _2_telegram_js_1 = require("../tl/2_telegram.js");
33
+ const _0_abortable_loop_js_1 = require("./0_abortable_loop.js");
34
+ const _0_storage_operations_js_1 = require("./0_storage_operations.js");
35
+ const _0_utilities_js_1 = require("./0_utilities.js");
36
+ const _1_invoke_middleware_js_1 = require("./1_invoke_middleware.js");
37
+ const _2_account_manager_js_1 = require("./2_account_manager.js");
38
+ const _2_bot_info_manager_js_1 = require("./2_bot_info_manager.js");
39
+ const _2_business_connection_manager_js_1 = require("./2_business_connection_manager.js");
40
+ const _2_client_encrypted_js_1 = require("./2_client_encrypted.js");
41
+ const _2_file_manager_js_1 = require("./2_file_manager.js");
42
+ const _2_network_statistics_manager_js_1 = require("./2_network_statistics_manager.js");
43
+ const _2_payment_manager_js_1 = require("./2_payment_manager.js");
44
+ const _2_reaction_manager_js_1 = require("./2_reaction_manager.js");
45
+ const _2_sign_in_js_1 = require("./2_sign_in.js");
46
+ const _2_translations_manager_js_1 = require("./2_translations_manager.js");
47
+ const _2_update_manager_js_1 = require("./2_update_manager.js");
48
+ const _3_client_encrypted_pool_js_1 = require("./3_client_encrypted_pool.js");
49
+ const _3_message_manager_js_1 = require("./3_message_manager.js");
50
+ const _3_video_chat_manager_js_1 = require("./3_video_chat_manager.js");
51
+ const _4_callback_query_manager_js_1 = require("./4_callback_query_manager.js");
52
+ const _4_chat_list_manager_js_1 = require("./4_chat_list_manager.js");
53
+ const _4_chat_manager_js_1 = require("./4_chat_manager.js");
54
+ const _4_checklist_manager_js_1 = require("./4_checklist_manager.js");
55
+ const _4_forum_manager_js_1 = require("./4_forum_manager.js");
56
+ const _4_gift_manager_js_1 = require("./4_gift_manager.js");
57
+ const _4_inline_query_manager_js_1 = require("./4_inline_query_manager.js");
58
+ const _4_link_preview_manager_js_1 = require("./4_link_preview_manager.js");
59
+ const _4_poll_manager_js_1 = require("./4_poll_manager.js");
60
+ const _4_story_manager_js_1 = require("./4_story_manager.js");
61
+ const _5_composer_js_1 = require("./5_composer.js");
62
+ var _2_sign_in_js_2 = require("./2_sign_in.js");
63
+ Object.defineProperty(exports, "restartAuth", { enumerable: true, get: function () { return _2_sign_in_js_2.restartAuth; } });
64
+ exports.handleMigrationError = Symbol("handleMigrationError");
65
+ // global Client ID counter for logs
66
+ let id = 0;
67
+ const getPeer = Symbol();
68
+ const mustGetPeer = Symbol();
69
+ /**
70
+ * An MTKruto client.
71
+ */
72
+ class Client extends _5_composer_js_1.Composer {
73
+ #clients = new Array();
74
+ #downloadPools = {};
75
+ #uploadPools = {};
76
+ #guaranteeUpdateDelivery;
77
+ // 2_
78
+ #accountManager;
79
+ #botInfoManager;
80
+ #businessConnectionManager;
81
+ #fileManager;
82
+ #networkStatisticsManager;
83
+ #paymentManager;
84
+ #reactionManager;
85
+ #translationsManager;
86
+ #updateManager;
87
+ // 3_
88
+ #messageManager;
89
+ #videoChatManager;
90
+ // 4_
91
+ #callbackQueryManager;
92
+ #chatListManager;
93
+ #chatManager;
94
+ #checklistManager;
95
+ #forumManager;
96
+ #giftManager;
97
+ #inlineQueryManager;
98
+ #linkPreviewManager;
99
+ #pollManager;
100
+ #storyManager;
101
+ // deno-lint-ignore no-explicit-any
102
+ #managers;
103
+ // deno-lint-ignore no-explicit-any
104
+ get managers() {
105
+ return this.#managers ?? (this.#managers ??= {
106
+ // 2_
107
+ accountManager: this.#accountManager,
108
+ botInfoManager: this.#botInfoManager,
109
+ businessConnectionManager: this.#businessConnectionManager,
110
+ fileManager: this.#fileManager,
111
+ networkStatisticsManager: this.#networkStatisticsManager,
112
+ paymentManager: this.#paymentManager,
113
+ reactionManager: this.#reactionManager,
114
+ translationsManager: this.#translationsManager,
115
+ updateManager: this.#updateManager,
116
+ // 3_
117
+ messageManager: this.#messageManager,
118
+ videoChatManager: this.#videoChatManager,
119
+ // 4_
120
+ callbackQueryManager: this.#callbackQueryManager,
121
+ chatListManager: this.#chatListManager,
122
+ chatManager: this.#chatManager,
123
+ checklistManager: this.#checklistManager,
124
+ forumManager: this.#forumManager,
125
+ giftManager: this.#giftManager,
126
+ inlineQueryManager: this.#inlineQueryManager,
127
+ linkPreviewManager: this.#linkPreviewManager,
128
+ pollManager: this.#pollManager,
129
+ storyManager: this.#storyManager,
130
+ });
131
+ }
132
+ #storage_;
133
+ #messageStorage_;
134
+ storage;
135
+ messageStorage;
136
+ #parseMode;
137
+ #apiId;
138
+ #apiHash;
139
+ #transportProvider;
140
+ appVersion;
141
+ deviceModel;
142
+ language;
143
+ platform;
144
+ systemLangCode;
145
+ systemVersion;
146
+ #publicKeys;
147
+ #outgoingMessages;
148
+ #persistCache;
149
+ #disableUpdates;
150
+ #authString;
151
+ #initialDc;
152
+ #L;
153
+ #LsignIn;
154
+ #LupdateGapRecoveryLoop;
155
+ #LstorageWriteLoop;
156
+ #LhandleMigrationError;
157
+ #Lmin;
158
+ /**
159
+ * Constructs the client.
160
+ */
161
+ constructor(params) {
162
+ super();
163
+ this.#apiId = params?.apiId ?? 0;
164
+ this.#apiHash = params?.apiHash ?? "";
165
+ this.#transportProvider = params?.transportProvider;
166
+ this.#initialDc = params?.initialDc ?? _4_constants_js_1.INITIAL_DC;
167
+ this.#storage_ = params?.storage || new _2_storage_js_1.StorageMemory();
168
+ this.#persistCache = params?.persistCache ?? false;
169
+ if (!this.#persistCache) {
170
+ this.#messageStorage_ = new _2_storage_js_1.StorageMemory();
171
+ }
172
+ else {
173
+ this.#messageStorage_ = this.#storage_;
174
+ }
175
+ this.storage = new _0_storage_operations_js_1.StorageOperations(this.#storage_);
176
+ this.messageStorage = new _0_storage_operations_js_1.StorageOperations(this.#messageStorage_);
177
+ this.#parseMode = params?.parseMode ?? null;
178
+ this.#disableUpdates = params?.disableUpdates ?? false;
179
+ this.#authString = params?.authString;
180
+ this.appVersion = params?.appVersion ?? _4_constants_js_1.APP_VERSION;
181
+ this.deviceModel = params?.deviceModel ?? _4_constants_js_1.DEVICE_MODEL;
182
+ this.language = params?.language ?? _4_constants_js_1.LANG_CODE;
183
+ this.platform = params?.platform ?? _4_constants_js_1.LANG_PACK;
184
+ this.systemLangCode = params?.systemLangCode ?? _4_constants_js_1.SYSTEM_LANG_CODE;
185
+ this.systemVersion = params?.systemVersion ?? _4_constants_js_1.SYSTEM_VERSION;
186
+ this.#publicKeys = params?.publicKeys;
187
+ this.#outgoingMessages = params?.outgoingMessages ?? false;
188
+ this.#guaranteeUpdateDelivery = params?.guaranteeUpdateDelivery ?? false;
189
+ const L = this.#L = (0, _1_utilities_js_1.getLogger)("Client").client(id++);
190
+ this.#LsignIn = L.branch("signIn");
191
+ this.#LupdateGapRecoveryLoop = L.branch("updateGapRecoveryLoop");
192
+ this.#LstorageWriteLoop = L.branch("storageWriteLoop");
193
+ this.#LhandleMigrationError = L.branch("[handleMigrationError]");
194
+ this.#Lmin = L.branch("min");
195
+ const c = {
196
+ id,
197
+ getUploadPoolSize: this.#getUploadPoolSize.bind(this),
198
+ invoke: async (function_, params) => {
199
+ if (params?.businessConnectionId) {
200
+ if (_2_tl_js_1.Mtproto.is("ping", function_)) {
201
+ (0, _0_deps_js_1.unreachable)();
202
+ }
203
+ return await this.invoke({ _: "invokeWithBusinessConnection", connection_id: params.businessConnectionId, query: function_ }, params);
204
+ }
205
+ else {
206
+ return await this.invoke(function_, params);
207
+ }
208
+ },
209
+ storage: this.storage,
210
+ messageStorage: this.messageStorage,
211
+ guaranteeUpdateDelivery: this.#guaranteeUpdateDelivery,
212
+ setConnectionState: this.#propagateConnectionState.bind(this),
213
+ resetConnectionState: () => this.#stateChangeHandler(this.isConnected),
214
+ getSelfId: this.#getSelfId.bind(this),
215
+ getIsPremium: this.#getIsPremium.bind(this),
216
+ getInputPeer: this.getInputPeer.bind(this),
217
+ getInputChannel: this.getInputChannel.bind(this),
218
+ getInputUser: this.getInputUser.bind(this),
219
+ getInputPeerChatId: this.#getInputPeerChatId.bind(this),
220
+ getPeer: this[mustGetPeer].bind(this),
221
+ handleUpdate: this.#queueHandleCtxUpdate.bind(this),
222
+ parseMode: this.#parseMode,
223
+ outgoingMessages: this.#outgoingMessages,
224
+ dropPendingUpdates: params?.dropPendingUpdates,
225
+ isDisconnected: () => this.isDisconnected,
226
+ langPack: this.platform,
227
+ langCode: this.language,
228
+ };
229
+ // 2_
230
+ this.#accountManager = new _2_account_manager_js_1.AccountManager(c);
231
+ this.#botInfoManager = new _2_bot_info_manager_js_1.BotInfoManager(c);
232
+ this.#businessConnectionManager = new _2_business_connection_manager_js_1.BusinessConnectionManager(c);
233
+ const fileManager = this.#fileManager = new _2_file_manager_js_1.FileManager(c);
234
+ this.#networkStatisticsManager = new _2_network_statistics_manager_js_1.NetworkStatisticsManager(c);
235
+ this.#paymentManager = new _2_payment_manager_js_1.PaymentManager(c);
236
+ this.#reactionManager = new _2_reaction_manager_js_1.ReactionManager(c);
237
+ this.#translationsManager = new _2_translations_manager_js_1.TranslationsManager(c);
238
+ this.#updateManager = new _2_update_manager_js_1.UpdateManager(c);
239
+ // 3_
240
+ const messageManager = this.#messageManager = new _3_message_manager_js_1.MessageManager({ ...c, fileManager });
241
+ this.#videoChatManager = new _3_video_chat_manager_js_1.VideoChatManager({ ...c, fileManager });
242
+ // 4_
243
+ this.#callbackQueryManager = new _4_callback_query_manager_js_1.CallbackQueryManager({ ...c, messageManager });
244
+ this.#chatListManager = new _4_chat_list_manager_js_1.ChatListManager({ ...c, fileManager, messageManager });
245
+ this.#chatManager = new _4_chat_manager_js_1.ChatManager({ ...c, fileManager, messageManager });
246
+ this.#checklistManager = new _4_checklist_manager_js_1.ChecklistManager({ ...c, messageManager });
247
+ this.#forumManager = new _4_forum_manager_js_1.ForumManager({ ...c, messageManager });
248
+ this.#giftManager = new _4_gift_manager_js_1.GiftManager({ ...c, messageManager });
249
+ this.#inlineQueryManager = new _4_inline_query_manager_js_1.InlineQueryManager({ ...c, messageManager });
250
+ this.#linkPreviewManager = new _4_link_preview_manager_js_1.LinkPreviewManager({ ...c, messageManager });
251
+ this.#pollManager = new _4_poll_manager_js_1.PollManager({ ...c, messageManager });
252
+ this.#storyManager = new _4_story_manager_js_1.StoryManager({ ...c, fileManager, messageManager });
253
+ this.#updateManager.setUpdateHandler(this.#handleUpdate.bind(this));
254
+ if (params?.defaultHandlers ?? true) {
255
+ this.invoke.use(async ({ error }, next) => {
256
+ if (error instanceof _4_errors_js_1.FloodWait && error.seconds <= 10) {
257
+ L.warning("sleeping for", error.seconds, "because of:", error);
258
+ await (0, _0_deps_js_1.delay)(error.seconds * _0_deps_js_1.SECOND);
259
+ return true;
260
+ }
261
+ else {
262
+ return next();
263
+ }
264
+ });
265
+ }
266
+ }
267
+ #setMainClient(client) {
268
+ this.#disconnectAllClients();
269
+ this.#clients = [client];
270
+ client.handlers.onUpdate = (updates) => {
271
+ this.#updateManager.processUpdates(updates, true, null);
272
+ this.#lastUpdates = new Date();
273
+ };
274
+ client.handlers.onDeserializationError = async () => {
275
+ await this.#updateManager.recoverUpdateGap("deserialization error");
276
+ };
277
+ client.handlers.onNewServerSalt = async (serverSalt) => {
278
+ await this.storage.setServerSalt(serverSalt);
279
+ };
280
+ client.onConnectionStateChange = this.#onConnectionStateChange.bind(this);
281
+ }
282
+ #newClient(dc, main, isCdn) {
283
+ const client = new _2_client_encrypted_js_1.ClientEncrypted(dc, this.#apiId, {
284
+ appVersion: this.appVersion,
285
+ deviceModel: this.deviceModel,
286
+ langCode: this.language,
287
+ langPack: this.platform,
288
+ systemLangCode: this.systemLangCode,
289
+ systemVersion: this.systemVersion,
290
+ transportProvider: this.#transportProvider,
291
+ isCdn: isCdn,
292
+ disableUpdates: !main || isCdn,
293
+ publicKeys: this.#publicKeys,
294
+ });
295
+ client.connectionCallback = this.#networkStatisticsManager.getTransportReadWriteCallback(isCdn);
296
+ return client;
297
+ }
298
+ #disconnectAllClients() {
299
+ for (const client of this.#clients) {
300
+ client.disconnect();
301
+ }
302
+ for (const pool of Object.values(this.#downloadPools)) {
303
+ pool.disconnect();
304
+ }
305
+ for (const pool of Object.values(this.#uploadPools)) {
306
+ pool.disconnect();
307
+ }
308
+ }
309
+ get #client() {
310
+ return this.#clients[0];
311
+ }
312
+ // direct ClientEncrypted property proxies
313
+ get isConnected() {
314
+ return this.#client?.isConnected ?? false;
315
+ }
316
+ get isDisconnected() {
317
+ return this.#client?.isDisconnected ?? true;
318
+ }
319
+ #propagateConnectionState(connectionState) {
320
+ this.#queueHandleCtxUpdate({ connectionState });
321
+ this.#lastPropagatedConnectionState = connectionState;
322
+ }
323
+ #lastPropagatedConnectionState = null;
324
+ #stateChangeHandler = ((isConnected) => {
325
+ const connectionState = isConnected ? "ready" : "notConnected";
326
+ if (this.#lastPropagatedConnectionState !== connectionState) {
327
+ this.#propagateConnectionState(connectionState);
328
+ }
329
+ }).bind(this);
330
+ #storageInited = false;
331
+ async #initStorage() {
332
+ if (!this.#storageInited) {
333
+ await this.storage.initialize();
334
+ if (!this.#guaranteeUpdateDelivery) {
335
+ await this.storage.deleteUpdates();
336
+ await this.storage.commit(true);
337
+ }
338
+ this.#storageInited = true;
339
+ }
340
+ }
341
+ #connectMutex = new _1_utilities_js_1.Mutex();
342
+ /**
343
+ * Loads the session if `setDc` was not called, initializes and connnects
344
+ * a `ClientPlain` to generate auth key if there was none, and connects the client.
345
+ * Before establishing the connection, the session is saved.
346
+ */
347
+ async connect() {
348
+ const unlock = await this.#connectMutex.lock();
349
+ try {
350
+ if (this.isConnected) {
351
+ return;
352
+ }
353
+ await this.#initStorage();
354
+ if (this.#authString && !this.#authStringImported) {
355
+ await this.importAuthString(this.#authString);
356
+ }
357
+ const auth = this.storage.auth.mustGet();
358
+ if (auth.authKey !== null && auth.dc !== null) {
359
+ if (!this.#client || this.#client.dc !== auth.dc) {
360
+ this.#client?.disconnect();
361
+ this.#setMainClient(this.#newClient(auth.dc, true, false));
362
+ }
363
+ await this.#client.setAuthKey(auth.authKey);
364
+ if (this.#client.serverSalt === 0n) {
365
+ this.#client.serverSalt = await this.storage.getServerSalt() ?? 0n;
366
+ }
367
+ }
368
+ else {
369
+ const dc = auth.dc ?? this.#initialDc;
370
+ if (!this.#client || this.#client.dc !== dc) {
371
+ this.#client?.disconnect();
372
+ this.#setMainClient(this.#newClient(dc, true, false));
373
+ }
374
+ }
375
+ await this.#client.connect();
376
+ await this.storage.auth.update((v) => {
377
+ v.authKey = this.#client.authKey;
378
+ v.dc = this.#client.dc;
379
+ });
380
+ await this.storage.setServerSalt(this.#client.serverSalt);
381
+ this.#updateGapRecoveryLoop.start();
382
+ this.#clientDisconnectionLoop.start();
383
+ if (!this.#messageStorage_.isMemory) {
384
+ this.#storageWriteLoop.start();
385
+ }
386
+ else {
387
+ this.#L.debug("not starting storageWriteLoop");
388
+ }
389
+ await this.storage.commit(true);
390
+ }
391
+ finally {
392
+ unlock();
393
+ }
394
+ }
395
+ async [exports.handleMigrationError](err) {
396
+ let newDc = String(err.dc);
397
+ if (Math.abs((0, _3_transport_js_1.getDcId)(this.#client.dc, this.#client.isCdn)) >= 10_000) {
398
+ newDc += "-test";
399
+ }
400
+ this.disconnect();
401
+ await this.storage.auth.update((v) => {
402
+ v.authKey = null;
403
+ v.dc = newDc;
404
+ });
405
+ await this.connect();
406
+ this.#LhandleMigrationError.debug(`migrated to DC${newDc}`);
407
+ }
408
+ async disconnect() {
409
+ this.#disconnectAllClients();
410
+ this.#clientDisconnectionLoop.abort();
411
+ this.#updateGapRecoveryLoop.abort();
412
+ this.#storageWriteLoop.abort();
413
+ this.#updateManager.closeAllChats();
414
+ await this.storage.commit(true);
415
+ await this.messageStorage.commit(true);
416
+ }
417
+ #lastPropagatedAuthorizationState = null;
418
+ async #propagateAuthorizationState(authorized) {
419
+ if (this.#lastPropagatedAuthorizationState !== authorized) {
420
+ await this.#handleCtxUpdate({ authorizationState: { isAuthorized: authorized } });
421
+ this.#lastPropagatedAuthorizationState = authorized;
422
+ }
423
+ }
424
+ async #getSelfId() {
425
+ const id = await this.storage.getAccountId();
426
+ if (id === null) {
427
+ throw new Error("Unauthorized");
428
+ }
429
+ return id;
430
+ }
431
+ async #getIsPremium() {
432
+ const maybeIsPremium = await this.storage.getIsPremium();
433
+ if (maybeIsPremium !== null) {
434
+ return maybeIsPremium;
435
+ }
436
+ return this.#lastGetMe?.isPremium ?? false;
437
+ }
438
+ #lastUpdates = new Date();
439
+ #updateGapRecoveryLoop = new _0_abortable_loop_js_1.AbortableLoop(async (loop, signal) => {
440
+ await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal });
441
+ if (!this.isConnected) {
442
+ loop.abort();
443
+ return;
444
+ }
445
+ if (Date.now() - this.#lastUpdates.getTime() >= 15 * _0_deps_js_1.MINUTE) {
446
+ (0, _1_utilities_js_1.drop)(this.#updateManager.recoverUpdateGap("lastUpdates").then(() => {
447
+ this.#lastUpdates = new Date();
448
+ }));
449
+ }
450
+ }, (loop, err) => {
451
+ if (!this.isConnected) {
452
+ loop.abort();
453
+ }
454
+ else {
455
+ this.#LupdateGapRecoveryLoop.error(err);
456
+ }
457
+ });
458
+ #clientDisconnectionLoop = new _0_abortable_loop_js_1.AbortableLoop(async (loop, signal) => {
459
+ await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal });
460
+ if (!this.isConnected) {
461
+ loop.abort();
462
+ return;
463
+ }
464
+ const now = Date.now();
465
+ const disconnectAfter = 5 * _0_deps_js_1.MINUTE;
466
+ for (const [i, client] of this.#clients.entries()) {
467
+ if (i > 0 && !client.isDisconnected && client.lastRequest && now - client.lastRequest.getTime() >= disconnectAfter) {
468
+ client?.disconnect();
469
+ }
470
+ }
471
+ }, (loop) => {
472
+ if (!this.isConnected) {
473
+ loop.abort();
474
+ }
475
+ });
476
+ #storageWriteLoop = new _0_abortable_loop_js_1.AbortableLoop(async (_loop, signal) => {
477
+ await (0, _0_deps_js_1.delay)(5 * _0_deps_js_1.SECOND, { signal });
478
+ await this.messageStorage.commit();
479
+ await this.storage.commit();
480
+ }, (err) => {
481
+ this.#LstorageWriteLoop.error(err);
482
+ });
483
+ async #checkAuthorization() {
484
+ if (this.#lastGetMe) {
485
+ return this.#lastGetMe;
486
+ }
487
+ try {
488
+ await this.#updateManager.fetchState("#checkAuthorization");
489
+ const me = await this.#getMe();
490
+ await this.#propagateAuthorizationState(true);
491
+ (0, _1_utilities_js_1.drop)(this.#updateManager.recoverUpdateGap("#checkAuthorization"));
492
+ return me;
493
+ }
494
+ catch (err) {
495
+ if (!(err instanceof _4_errors_js_1.AuthKeyUnregistered) && !(err instanceof _4_errors_js_1.SessionRevoked)) {
496
+ throw err;
497
+ }
498
+ }
499
+ }
500
+ /**
501
+ * Send a user verification code.
502
+ *
503
+ * @param phoneNumber The phone number to send the code to.
504
+ * @method ac
505
+ */
506
+ async sendCode(phoneNumber) {
507
+ const me = await this.#checkAuthorization();
508
+ if (me) {
509
+ return;
510
+ }
511
+ try {
512
+ await this.#accountManager.sendCode(phoneNumber, this.#apiId, this.#apiHash);
513
+ }
514
+ catch (err) {
515
+ if (err instanceof _4_errors_js_1.Migrate) {
516
+ await this[exports.handleMigrationError](err);
517
+ await this.#accountManager.sendCode(phoneNumber, this.#apiId, this.#apiHash);
518
+ }
519
+ else {
520
+ throw err;
521
+ }
522
+ }
523
+ }
524
+ /**
525
+ * Check if a code entered by the user was the same as the verification code.
526
+ *
527
+ * @param code A code entered by the user.
528
+ * @method ac
529
+ */
530
+ async checkCode(code) {
531
+ const result = await this.#accountManager.checkCode(code);
532
+ if (result.type === "signedIn") {
533
+ await this.storage.auth.update((v) => {
534
+ v.userId = result.userId;
535
+ v.isBot = false;
536
+ });
537
+ this.#LsignIn.debug("signed in as user");
538
+ await this.#propagateAuthorizationState(true);
539
+ await this.#updateManager.fetchState("checkCode");
540
+ }
541
+ return result;
542
+ }
543
+ /**
544
+ * Get the user account password's hint.
545
+ *
546
+ * @method ac
547
+ */
548
+ async getPasswordHint() {
549
+ return await this.#accountManager.getPasswordHint();
550
+ }
551
+ /**
552
+ * Check whether a password entered by the user is the same as the account's one.
553
+ *
554
+ * @param password The password to check
555
+ * @returns The result of the check.
556
+ * @method ac
557
+ */
558
+ async checkPassword(password) {
559
+ const result = await this.#accountManager.checkPassword(password);
560
+ if (result.type === "signedIn") {
561
+ await this.storage.auth.update((v) => {
562
+ v.userId = result.userId;
563
+ v.isBot = false;
564
+ });
565
+ await this.storage.commit(true);
566
+ this.#LsignIn.debug("signed in as user");
567
+ await this.#propagateAuthorizationState(true);
568
+ await this.#updateManager.fetchState("checkPassword");
569
+ }
570
+ return result;
571
+ }
572
+ /**
573
+ * Check whether a bot token is valid.
574
+ *
575
+ * @param password The password to check
576
+ * @returns The result of the check.
577
+ * @method ac
578
+ */
579
+ async checkBotToken(botToken) {
580
+ const me = await this.#checkAuthorization();
581
+ if (me) {
582
+ return {
583
+ type: "signedIn",
584
+ userId: me.id,
585
+ };
586
+ }
587
+ while (true) {
588
+ try {
589
+ const result = await this.#accountManager.checkBotToken(botToken, this.#apiId, this.#apiHash);
590
+ if (result.type === "signedIn") {
591
+ await this.storage.auth.update((v) => {
592
+ v.userId = result.userId;
593
+ v.isBot = true;
594
+ });
595
+ await this.storage.commit(true);
596
+ this.#LsignIn.debug("signed in as bot");
597
+ await this.#propagateAuthorizationState(true);
598
+ await this.#updateManager.fetchState("checkBotToken");
599
+ }
600
+ return result;
601
+ }
602
+ catch (err) {
603
+ if (err instanceof _4_errors_js_1.Migrate) {
604
+ await this[exports.handleMigrationError](err);
605
+ continue;
606
+ }
607
+ else {
608
+ throw err;
609
+ }
610
+ }
611
+ }
612
+ }
613
+ /**
614
+ * Signs in using the provided parameters if not already signed in.
615
+ * If no parameters are provided, the credentials will be prompted in runtime.
616
+ *
617
+ * Notes:
618
+ * 1. Requires the `apiId` and `apiHash` paramters to be passed when constructing the client.
619
+ * 3. Reconnects the client to the appropriate DC in case of MIGRATE_X errors.
620
+ */
621
+ async signIn(params) {
622
+ await (0, _2_sign_in_js_1.signIn)(this, this.#LsignIn, params);
623
+ }
624
+ async signOut() {
625
+ try {
626
+ await Promise.all([
627
+ this.storage.reset(),
628
+ this.invoke({ _: "auth.logOut" }).then(() => {
629
+ this.#propagateAuthorizationState(false);
630
+ }),
631
+ ]);
632
+ }
633
+ finally {
634
+ this.#lastGetMe = null;
635
+ this.disconnect();
636
+ await this.connect();
637
+ }
638
+ }
639
+ /**
640
+ * Same as calling `.connect()` followed by `.signIn(params)`.
641
+ */
642
+ async start(params) {
643
+ await this.connect();
644
+ await this.signIn(params);
645
+ }
646
+ async #getClient(params) {
647
+ let client;
648
+ switch (params.type) {
649
+ case undefined:
650
+ client = await this.#getMainClient(params.dc);
651
+ break;
652
+ case "download":
653
+ client = await this.#getDownloadClient(params.dc);
654
+ break;
655
+ case "upload":
656
+ client = await this.#getUploadClient();
657
+ break;
658
+ }
659
+ if (client !== this.#client && !this.isDisconnected && client.isDisconnected) {
660
+ await client.connect();
661
+ }
662
+ return client;
663
+ }
664
+ #getMainClientMutex = new _1_utilities_js_1.Mutex();
665
+ async #getMainClient(dc) {
666
+ if (dc === undefined || dc === this.#client?.dc) {
667
+ return this.#client;
668
+ }
669
+ let client = this.#clients.find((v) => v.dc === dc);
670
+ if (client) {
671
+ return client;
672
+ }
673
+ const unlock = await this.#getMainClientMutex.lock();
674
+ client = this.#clients.find((v) => v.dc === dc);
675
+ if (client) {
676
+ return client;
677
+ }
678
+ try {
679
+ client = this.#newClient(dc, false, false);
680
+ await this.#setupClient(client);
681
+ this.#clients.push(client);
682
+ return client;
683
+ }
684
+ finally {
685
+ unlock();
686
+ }
687
+ }
688
+ async #getDownloadClient(dc) {
689
+ dc ??= this.#client.dc;
690
+ const pool = this.#downloadPools[dc] ??= new _3_client_encrypted_pool_js_1.ClientEncryptedPool();
691
+ if (!pool.size) {
692
+ if (!pool.size) {
693
+ for (let i = 0; i < _0_utilities_js_1.DOWNLOAD_POOL_SIZE; ++i) {
694
+ pool.add(this.#newClient(dc, false, true));
695
+ }
696
+ }
697
+ }
698
+ const client = pool.nextClient();
699
+ if (client.authKey.length) {
700
+ return client;
701
+ }
702
+ await this.#setupClient(client);
703
+ return client;
704
+ }
705
+ async #getUploadPoolSize() {
706
+ const dc = this.#client.dc;
707
+ return (dc !== "2" && dc !== "4") || await this.#getIsPremium() ? 8 : 4;
708
+ }
709
+ async #getUploadClient() {
710
+ const dc = this.#client.dc;
711
+ const poolSize = await this.#getUploadPoolSize();
712
+ const pool = this.#uploadPools[dc] ??= new _3_client_encrypted_pool_js_1.ClientEncryptedPool();
713
+ if (!pool.size) {
714
+ for (let i = 0; i < poolSize; ++i) {
715
+ pool.add(await this.#newClient(dc, false, true));
716
+ }
717
+ }
718
+ const client = pool.nextClient();
719
+ if (client.authKey.length) {
720
+ return client;
721
+ }
722
+ await this.#setupClient(client);
723
+ return client;
724
+ }
725
+ async #setupClient(client) {
726
+ const storage = client.dc === this.#client.dc ? this.storage : new _0_storage_operations_js_1.StorageOperations(this.storage.provider.branch(client.dc + (client.isCdn ? "_cdn" : "")));
727
+ await storage.initialize();
728
+ const auth = storage.auth.mustGet();
729
+ const serverSalt = await storage.getServerSalt();
730
+ if (auth.authKey !== null) {
731
+ await client.setAuthKey(auth.authKey);
732
+ if (serverSalt) {
733
+ client.serverSalt = serverSalt;
734
+ }
735
+ }
736
+ await client.connect();
737
+ if (auth.authKey === null) {
738
+ await this.#importAuthorization(client);
739
+ }
740
+ await storage.auth.update((v) => v.authKey = client.authKey);
741
+ if (client.dc !== this.#client.dc) {
742
+ await storage.setServerSalt(client.serverSalt);
743
+ client.handlers.onNewServerSalt = async (serverSalt) => {
744
+ await storage.setServerSalt(serverSalt);
745
+ };
746
+ }
747
+ }
748
+ async #importAuthorization(client) {
749
+ if (this.#client.dc === client.dc && this.#client.isCdn === client.isCdn) {
750
+ const auth = this.storage.auth.mustGet();
751
+ const serverSalt = await this.storage.getServerSalt();
752
+ if (auth.authKey !== null) {
753
+ await client.setAuthKey(auth.authKey);
754
+ if (serverSalt) {
755
+ client.serverSalt = serverSalt;
756
+ }
757
+ }
758
+ return;
759
+ }
760
+ const exportedAuthorization = await this.#client.invoke({ _: "auth.exportAuthorization", dc_id: (0, _3_transport_js_1.getDcId)(client.dc, client.isCdn) });
761
+ await client.invoke({ ...exportedAuthorization, _: "auth.importAuthorization" });
762
+ }
763
+ async #invoke(function_, params) {
764
+ if (!this.#client) {
765
+ throw new _0_errors_js_1.ConnectionError("The connection is not open.");
766
+ }
767
+ let n = 1;
768
+ let client;
769
+ while (true) {
770
+ client = params ? await this.#getClient(params) : this.#client;
771
+ const main = client === this.#client;
772
+ try {
773
+ const result = await client.invoke(function_);
774
+ if (main) {
775
+ try {
776
+ await this.#updateManager.processResult(result);
777
+ }
778
+ catch (err) {
779
+ this.#L.error("failed to process result:", err);
780
+ }
781
+ if (_2_tl_js_1.Api.isOfEnum("Update", result) || _2_tl_js_1.Api.isOfEnum("Updates", result)) {
782
+ return new Promise((resolve) => {
783
+ this.#updateManager.processUpdates(result, true, _2_tl_js_1.Mtproto.is("ping", function_) ? null : function_, () => resolve(result));
784
+ });
785
+ }
786
+ }
787
+ return result;
788
+ }
789
+ catch (err) {
790
+ if (err instanceof _4_errors_js_1.AuthKeyUnregistered && !main) {
791
+ await this.#importAuthorization(client);
792
+ continue;
793
+ }
794
+ else if (err instanceof _0_errors_js_1.ConnectionError && !main && !this.isDisconnected) {
795
+ continue;
796
+ }
797
+ else if (await this.#handleInvokeError(Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
798
+ continue;
799
+ }
800
+ else {
801
+ throw err;
802
+ }
803
+ }
804
+ }
805
+ }
806
+ #handleInvokeError = (0, _1_invoke_middleware_js_1.skipInvoke)();
807
+ /**
808
+ * Invokes a function waiting and returning its reply.
809
+ * Requires the client to be connected.
810
+ *
811
+ * @param function_ The function to invoke.
812
+ */
813
+ invoke = Object.assign(this.#invoke, {
814
+ use: (handler) => {
815
+ const handle = this.#handleInvokeError;
816
+ this.#handleInvokeError = async (ctx, next) => {
817
+ let result = null;
818
+ return await handle(ctx, async () => {
819
+ if (result !== null)
820
+ return result;
821
+ result = await handler(ctx, next);
822
+ return result;
823
+ });
824
+ };
825
+ },
826
+ });
827
+ exportAuthString() {
828
+ return this.storage.exportAuthString(this.#apiId);
829
+ }
830
+ #authStringImported = false;
831
+ async importAuthString(authString) {
832
+ if (this.isConnected) {
833
+ throw new Error("Cannot import auth string while the client is connected");
834
+ }
835
+ await this.#initStorage();
836
+ await this.storage.importAuthString(authString);
837
+ this.#authStringImported = true;
838
+ if (!this.#apiId) {
839
+ this.#apiId = this.storage.auth.mustGet().apiId;
840
+ }
841
+ }
842
+ async #getUserAccessHash(userId) {
843
+ const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUser", user_id: userId, access_hash: 0n }] });
844
+ const user = _2_tl_js_1.Api.is("user", users[0]) ? users[0] : undefined;
845
+ return user?.access_hash ?? 0n;
846
+ }
847
+ async #getChannelAccessHash(channelId) {
848
+ const channels = await this.invoke({ _: "channels.getChannels", id: [{ _: "inputChannel", channel_id: channelId, access_hash: 0n }] });
849
+ const channel = _2_tl_js_1.Api.is("channel", channels.chats[0]) ? channels.chats[0] : undefined;
850
+ return channel?.access_hash ?? 0n;
851
+ }
852
+ /**
853
+ * Get a chat's inputPeer. Useful when calling API functions directly.
854
+ *
855
+ * @param id The identifier of a chat.
856
+ */
857
+ async getInputPeer(id) {
858
+ if (id === "me" || id === await this.#getSelfId()) {
859
+ return { _: "inputPeerSelf" };
860
+ }
861
+ const inputPeer = await this.#getInputPeerInner(id);
862
+ if (((_2_tl_js_1.Api.is("inputPeerUser", inputPeer) || _2_tl_js_1.Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash === 0n) && this.storage.isBot) {
863
+ if ("channel_id" in inputPeer) {
864
+ inputPeer.access_hash = await this.#getChannelAccessHash(inputPeer.channel_id);
865
+ }
866
+ else {
867
+ inputPeer.access_hash = await this.#getUserAccessHash(inputPeer.user_id);
868
+ }
869
+ }
870
+ if ((_2_tl_js_1.Api.is("inputPeerUser", inputPeer) || _2_tl_js_1.Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash === 0n) {
871
+ throw new _0_errors_js_1.AccessError(`The chat ${id} cannot be accessed.`);
872
+ }
873
+ return inputPeer;
874
+ }
875
+ async #getInputPeerChatId(inputPeer) {
876
+ if (_2_tl_js_1.Api.isOneOf(["inputPeerSelf", "inputUserSelf"], inputPeer)) {
877
+ return await this.#getSelfId();
878
+ }
879
+ else if (_2_tl_js_1.Api.isOneOf(["inputPeerEmpty", "inputUserEmpty", "inputChannelEmpty"], inputPeer)) {
880
+ (0, _0_deps_js_1.unreachable)();
881
+ }
882
+ else {
883
+ return _2_tl_js_1.Api.peerToChatId(inputPeer);
884
+ }
885
+ }
886
+ /**
887
+ * Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
888
+ *
889
+ * @param id The identifier of the channel or the supergroup.
890
+ */
891
+ async getInputChannel(id) {
892
+ const inputPeer = await this.getInputPeer(id);
893
+ if (!(0, _0_utilities_js_1.canBeInputChannel)(inputPeer)) {
894
+ throw new TypeError(`The chat ${id} is not a channel neither a supergroup.`);
895
+ }
896
+ return (0, _0_utilities_js_1.toInputChannel)(inputPeer);
897
+ }
898
+ /**
899
+ * Get a user's inputUser. Useful when calling API functions directly.
900
+ *
901
+ * @param id The identifier of the user.
902
+ */
903
+ async getInputUser(id) {
904
+ const inputPeer = await this.getInputPeer(id);
905
+ if (!(0, _0_utilities_js_1.canBeInputUser)(inputPeer)) {
906
+ throw new TypeError(`The chat ${id} is not a private chat.`);
907
+ }
908
+ return (0, _0_utilities_js_1.toInputUser)(inputPeer);
909
+ }
910
+ async #getInputPeerInner(id) {
911
+ const idn = Number(id);
912
+ if (!isNaN(idn)) {
913
+ id = idn;
914
+ }
915
+ let peer;
916
+ if (typeof id === "string") {
917
+ id = (0, _0_utilities_js_1.getUsername)(id);
918
+ let resolvedId = 0;
919
+ const maybeUsername = await this.messageStorage.usernames.get([id]);
920
+ if (maybeUsername !== null && Date.now() - maybeUsername[1].getTime() < _4_constants_js_1.USERNAME_TTL) {
921
+ const [id] = maybeUsername;
922
+ resolvedId = id;
923
+ }
924
+ else {
925
+ const resolved = await this.invoke({ _: "contacts.resolveUsername", username: id });
926
+ this.#updateManager.processChats(resolved.chats, resolved);
927
+ this.#updateManager.processUsers(resolved.users, resolved);
928
+ if (_2_tl_js_1.Api.is("peerUser", resolved.peer)) {
929
+ resolvedId = _2_tl_js_1.Api.peerToChatId(resolved.peer);
930
+ }
931
+ else if (_2_tl_js_1.Api.is("peerChannel", resolved.peer)) {
932
+ resolvedId = _2_tl_js_1.Api.peerToChatId(resolved.peer);
933
+ }
934
+ else {
935
+ (0, _0_deps_js_1.unreachable)();
936
+ }
937
+ }
938
+ const resolvedIdType = _2_tl_js_1.Api.getChatIdPeerType(resolvedId);
939
+ if (resolvedIdType === "user") {
940
+ const accessHash = await this.messageStorage.getUserAccessHash(resolvedId);
941
+ peer = { _: "inputPeerUser", user_id: _2_tl_js_1.Api.chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
942
+ }
943
+ else if (resolvedIdType === "channel") {
944
+ const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId);
945
+ peer = { _: "inputPeerChannel", channel_id: _2_tl_js_1.Api.chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
946
+ }
947
+ else {
948
+ (0, _0_deps_js_1.unreachable)();
949
+ }
950
+ }
951
+ else if (id > 0) {
952
+ const accessHash = await this.messageStorage.getUserAccessHash(id);
953
+ peer = { _: "inputPeerUser", user_id: _2_tl_js_1.Api.chatIdToPeerId(id), access_hash: accessHash ?? 0n };
954
+ }
955
+ else if (-_4_constants_js_1.MAX_CHAT_ID <= id) {
956
+ peer = { _: "inputPeerChat", chat_id: BigInt(Math.abs(id)) };
957
+ }
958
+ else if (_1_utilities_js_1.ZERO_CHANNEL_ID - _4_constants_js_1.MAX_CHANNEL_ID <= id && id !== _1_utilities_js_1.ZERO_CHANNEL_ID) {
959
+ const accessHash = await this.messageStorage.getChannelAccessHash(id);
960
+ peer = { _: "inputPeerChannel", channel_id: _2_tl_js_1.Api.chatIdToPeerId(id), access_hash: accessHash ?? 0n };
961
+ }
962
+ else {
963
+ throw new _0_errors_js_1.InputError("The ID is of an format unknown.");
964
+ }
965
+ if (!_2_tl_js_1.Api.is("inputPeerChat", peer) && !peer.access_hash) {
966
+ // TODO
967
+ // const chatId = Api.peerToChatId(peer);
968
+ // const minPeerReference = await this.messageStorage.getLastMinPeerReference(chatId);
969
+ // if (minPeerReference) {
970
+ // const minInputPeer = await this.#getMinInputPeer(canBeInputChannel(peer) ? "channel" : "user", { ...minPeerReference, senderId: chatId });
971
+ // if (minInputPeer) {
972
+ // this.#Lmin.debug("resolved input min peer", minInputPeer);
973
+ // peer = minInputPeer;
974
+ // }
975
+ // }
976
+ }
977
+ return peer;
978
+ }
979
+ async #getMinInputPeer(type, reference) {
980
+ const peer_ = await this.messageStorage.peers.get([reference.chatId]);
981
+ if (peer_ !== null && (peer_[0].type === "channel" || peer_[0].type === "supergroup")) {
982
+ const peer = { _: "inputPeerChannel", channel_id: BigInt(peer_[0].id), access_hash: peer_[1] };
983
+ if (type === "user") {
984
+ return { _: "inputPeerUserFromMessage", peer, msg_id: reference.messageId, user_id: _2_tl_js_1.Api.chatIdToPeerId(reference.senderId) };
985
+ }
986
+ else {
987
+ return { _: "inputPeerChannelFromMessage", peer, msg_id: reference.messageId, channel_id: _2_tl_js_1.Api.chatIdToPeerId(reference.senderId) };
988
+ }
989
+ }
990
+ else {
991
+ return null;
992
+ }
993
+ }
994
+ async [getPeer](peer) {
995
+ const id = _2_tl_js_1.Api.peerToChatId(peer);
996
+ const entity = await this.messageStorage.peers.get([id]);
997
+ if (entity === null) {
998
+ if (entity === null && this.storage.isBot && _2_tl_js_1.Api.is("peerUser", peer) || _2_tl_js_1.Api.is("peerChannel", peer)) {
999
+ await this.getInputPeer(id);
1000
+ }
1001
+ else {
1002
+ return entity;
1003
+ }
1004
+ }
1005
+ return await this.messageStorage.peers.get([id]);
1006
+ }
1007
+ [mustGetPeer](peer) {
1008
+ return this.messageStorage.peers.mustGet([(0, _2_telegram_js_1.peerToChatId)(peer)]);
1009
+ }
1010
+ async #handleCtxUpdate(update) {
1011
+ if (this.#disableUpdates && !("authorizationState" in update) && !("connectionState" in update)) {
1012
+ return;
1013
+ }
1014
+ try {
1015
+ await this.handleUpdate(this, update);
1016
+ }
1017
+ catch (err) {
1018
+ this.#L.error("Failed to handle update:", err);
1019
+ throw err;
1020
+ }
1021
+ }
1022
+ #queueHandleCtxUpdate(update) {
1023
+ this.#updateManager.getHandleUpdateQueue(_2_update_manager_js_1.UpdateManager.MAIN_BOX_ID).add(async () => {
1024
+ await this.#handleCtxUpdate(update);
1025
+ });
1026
+ }
1027
+ async #handleUpdate(update) {
1028
+ const maybePromises = new Array();
1029
+ if (_2_tl_js_1.Api.is("updateUserName", update)) {
1030
+ const value = [Number(update.user_id), new Date()];
1031
+ for (const username_ of update.usernames) {
1032
+ const username = username_.username.toLowerCase();
1033
+ this.messageStorage.usernames.set([username], value);
1034
+ }
1035
+ const peer = { ...update, _: "peerUser" };
1036
+ const peer_ = await this[getPeer](peer);
1037
+ if (peer_ !== null) {
1038
+ const username = update.usernames[0];
1039
+ if (username !== undefined) {
1040
+ peer_[0].username = username.username;
1041
+ const also = update.usernames.filter((v) => v !== username);
1042
+ if (also.length) {
1043
+ peer_[0].also = also.map((v) => v.username);
1044
+ }
1045
+ else {
1046
+ delete peer_[0].also;
1047
+ }
1048
+ }
1049
+ else {
1050
+ delete peer_[0].username;
1051
+ }
1052
+ this.messageStorage.setPeer2(peer_[0], peer_[1]);
1053
+ }
1054
+ }
1055
+ if (this.#messageManager.canHandleUpdate(update)) {
1056
+ maybePromises.push(() => this.#messageManager.handleUpdate(update));
1057
+ }
1058
+ if (this.#chatManager.canHandleUpdate(update)) {
1059
+ maybePromises.push(() => this.#chatManager.handleUpdate(update));
1060
+ }
1061
+ if (this.#pollManager.canHandleUpdate(update)) {
1062
+ maybePromises.push(() => this.#pollManager.handleUpdate(update));
1063
+ }
1064
+ if (this.#videoChatManager.canHandleUpdate(update)) {
1065
+ maybePromises.push(() => this.#videoChatManager.handleUpdate(update));
1066
+ }
1067
+ if (this.#callbackQueryManager.canHandleUpdate(update)) {
1068
+ maybePromises.push(() => this.#callbackQueryManager.handleUpdate(update));
1069
+ }
1070
+ if (this.#inlineQueryManager.canHandleUpdate(update)) {
1071
+ maybePromises.push(() => this.#inlineQueryManager.handleUpdate(update));
1072
+ }
1073
+ if (this.#linkPreviewManager.canHandleUpdate(update)) {
1074
+ maybePromises.push(() => this.#linkPreviewManager.handleUpdate(update));
1075
+ }
1076
+ if (this.#reactionManager.canHandleUpdate(update)) {
1077
+ maybePromises.push(() => this.#reactionManager.handleUpdate(update));
1078
+ }
1079
+ if (this.#chatListManager.canHandleUpdate(update)) {
1080
+ maybePromises.push(() => this.#chatListManager.handleUpdate(update));
1081
+ }
1082
+ if (this.#storyManager.canHandleUpdate(update)) {
1083
+ maybePromises.push(() => this.#storyManager.handleUpdate(update));
1084
+ }
1085
+ if (this.#businessConnectionManager.canHandleUpdate(update)) {
1086
+ maybePromises.push(() => this.#businessConnectionManager.handleUpdate(update));
1087
+ }
1088
+ if (this.#storyManager.canHandleUpdate(update)) {
1089
+ maybePromises.push(() => this.#storyManager.handleUpdate(update));
1090
+ }
1091
+ if (this.#paymentManager.canHandleUpdate(update)) {
1092
+ maybePromises.push(() => this.#paymentManager.handleUpdate(update));
1093
+ }
1094
+ if (this.#translationsManager.canHandleUpdate(update)) {
1095
+ maybePromises.push(() => this.#translationsManager.handleUpdate(update));
1096
+ }
1097
+ if (this.#botInfoManager.canHandleUpdate(update)) {
1098
+ maybePromises.push(() => this.#botInfoManager.handleUpdate(update));
1099
+ }
1100
+ if (this.#accountManager.canHandleUpdate(update)) {
1101
+ maybePromises.push(() => this.#accountManager.handleUpdate(update));
1102
+ }
1103
+ return () => Promise.resolve().then(async () => {
1104
+ const updates = [{ update }];
1105
+ for (const maybePromise of maybePromises) {
1106
+ try {
1107
+ const value = maybePromise();
1108
+ const update = value instanceof Promise ? await value : value;
1109
+ if (update) {
1110
+ updates.push(update);
1111
+ }
1112
+ }
1113
+ catch (err) {
1114
+ this.#L.error("failed to construct update:", err);
1115
+ }
1116
+ }
1117
+ for (const update of updates) {
1118
+ try {
1119
+ await this.#handleCtxUpdate(update);
1120
+ }
1121
+ finally {
1122
+ if ("deletedMessages" in update) {
1123
+ for (const { chatId, messageId } of update.deletedMessages) {
1124
+ await this.messageStorage.setMessage(chatId, messageId, null);
1125
+ }
1126
+ }
1127
+ }
1128
+ }
1129
+ });
1130
+ }
1131
+ #lastGetMe = null;
1132
+ async #getMe() {
1133
+ if (this.#lastGetMe !== null) {
1134
+ return this.#lastGetMe;
1135
+ }
1136
+ else {
1137
+ const user = await this.#getMeInner();
1138
+ this.#lastGetMe = user;
1139
+ return user;
1140
+ }
1141
+ }
1142
+ async #getMeInner() {
1143
+ let chatP = (await this[getPeer]({ _: "peerUser", user_id: BigInt(await this.#getSelfId()) }))?.[0] ?? null;
1144
+ if (chatP === null) {
1145
+ const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUserSelf" }] });
1146
+ chatP = (0, _3_types_js_1.constructChatP)(_2_tl_js_1.Api.as("user", users[0]));
1147
+ await this.storage.setIsPremium(chatP.isPremium);
1148
+ }
1149
+ const user = (0, _3_types_js_1.constructUser2)(chatP);
1150
+ this.#lastGetMe = user;
1151
+ return user;
1152
+ }
1153
+ #previouslyConnected = false;
1154
+ #lastConnectionState = false;
1155
+ #onConnectionStateChange(isConnected) {
1156
+ if (this.#lastConnectionState !== isConnected) {
1157
+ if (isConnected) {
1158
+ if (this.#previouslyConnected) {
1159
+ (0, _1_utilities_js_1.drop)(this.#updateManager.recoverUpdateGap("reconnect"));
1160
+ }
1161
+ this.#previouslyConnected = true;
1162
+ }
1163
+ const connectionState = isConnected ? "ready" : "notConnected";
1164
+ this.#queueHandleCtxUpdate({ connectionState });
1165
+ }
1166
+ }
1167
+ //
1168
+ // ========================= ACCOUNT ========================= //
1169
+ //
1170
+ /**
1171
+ * Get information on the currently authorized user.
1172
+ *
1173
+ * @method ac
1174
+ * @returns Information on the currently authorized user.
1175
+ */
1176
+ async getMe() {
1177
+ if (this.#lastGetMe === null) {
1178
+ const me = await this.#checkAuthorization();
1179
+ if (!me) {
1180
+ throw new _0_errors_js_1.InputError("Not signed in.");
1181
+ }
1182
+ else {
1183
+ return me;
1184
+ }
1185
+ }
1186
+ return await this.#getMeInner();
1187
+ }
1188
+ /**
1189
+ * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
1190
+ *
1191
+ * @method ac
1192
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1193
+ * @param username The username to show.
1194
+ */
1195
+ async showUsername(id, username) {
1196
+ await this.#accountManager.showUsername(id, username);
1197
+ }
1198
+ /**
1199
+ * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
1200
+ *
1201
+ * @method ac
1202
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1203
+ * @param username The username to hide.
1204
+ */
1205
+ async hideUsername(id, username) {
1206
+ await this.#accountManager.hideUsername(id, username);
1207
+ }
1208
+ /**
1209
+ * Check the availability of a username. User-only.
1210
+ *
1211
+ * @method ac
1212
+ * @param username The username to check.
1213
+ * @returns Whether the username is available.
1214
+ */
1215
+ async checkUsername(username, params) {
1216
+ return await this.#accountManager.checkUsername(username, params);
1217
+ }
1218
+ /**
1219
+ * Set the username of the current account. User-only.
1220
+ *
1221
+ * @method ac
1222
+ * @param username The username to set.
1223
+ */
1224
+ async setUsername(username) {
1225
+ await this.#accountManager.setUsername(username);
1226
+ }
1227
+ /**
1228
+ * Remove the current account's username. User-only.
1229
+ *
1230
+ * @method ac
1231
+ */
1232
+ async removeUsername() {
1233
+ await this.#accountManager.removeUsername();
1234
+ }
1235
+ /**
1236
+ * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
1237
+ *
1238
+ * @method ac
1239
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
1240
+ * @param order The new order to use.
1241
+ * @returns Whether the order was changed.
1242
+ */
1243
+ async reorderUsernames(id, order) {
1244
+ return await this.#accountManager.reorderUsernames(id, order);
1245
+ }
1246
+ /**
1247
+ * Hide all usernames from a supergroup or a channel's profile. User-only.
1248
+ *
1249
+ * @method ac
1250
+ * @param id A supergroup ID or a channel ID.
1251
+ * @returns Whether any username was hidden.
1252
+ */
1253
+ async hideUsernames(id) {
1254
+ return await this.#accountManager.hideUsernames(id);
1255
+ }
1256
+ /**
1257
+ * Get a business connection. Bot-only.
1258
+ *
1259
+ * @method ac
1260
+ * @param id The identifier of the business connection.
1261
+ * @cache
1262
+ */
1263
+ async getBusinessConnection(id) {
1264
+ return await this.#businessConnectionManager.getBusinessConnection(id);
1265
+ }
1266
+ /**
1267
+ * Set the current account's online status. User-only.
1268
+ *
1269
+ * @method ac
1270
+ * @param isOnline The new online status.
1271
+ */
1272
+ async setIsOnline(isOnline) {
1273
+ await this.#accountManager.setIsOnline(isOnline);
1274
+ }
1275
+ /**
1276
+ * Set the current account's emoji status. User-only.
1277
+ *
1278
+ * @method ac
1279
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
1280
+ */
1281
+ async setEmojiStatus(emojiStatus, params) {
1282
+ await this.#accountManager.setEmojiStatus(emojiStatus, params);
1283
+ }
1284
+ /**
1285
+ * Remove the current account's emoji status. User-only.
1286
+ *
1287
+ * @method ac
1288
+ */
1289
+ async removeEmojiStatus() {
1290
+ await this.#accountManager.removeEmojiStatus();
1291
+ }
1292
+ /**
1293
+ * Set the emoji status of a channel. User-only.
1294
+ *
1295
+ * @method ac
1296
+ * @param chatId The identifier of a channel.
1297
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
1298
+ */
1299
+ async setChannelEmojiStatus(chatId, emojiStatus, params) {
1300
+ await this.#accountManager.setChannelEmojiStatus(chatId, emojiStatus, params);
1301
+ }
1302
+ /**
1303
+ * Remove the emoji status of a channel. User-only.
1304
+ *
1305
+ * @method ac
1306
+ * @param chatId The identifier of a channel.
1307
+ */
1308
+ async removeChannelEmojiStatus(chatId) {
1309
+ await this.#accountManager.removeChannelEmojiStatus(chatId);
1310
+ }
1311
+ /**
1312
+ * Set the emoji status of a bot's user. Bot-only.
1313
+ *
1314
+ * @method ac
1315
+ * @param userId The identifier of a user of the bot.
1316
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
1317
+ */
1318
+ async setUserEmojiStatus(userId, emojiStatus, params) {
1319
+ await this.#accountManager.setUserEmojiStatus(userId, emojiStatus, params);
1320
+ }
1321
+ /**
1322
+ * Remove the emoji status of a bot's user. Bot-only.
1323
+ *
1324
+ * @method ac
1325
+ * @param userId The identifier of a user of the bot.
1326
+ */
1327
+ async removeUserEmojiStatus(userId) {
1328
+ await this.#accountManager.removeUserEmojiStatus(userId);
1329
+ }
1330
+ /**
1331
+ * Update the profile of the current user. At least one parameter must be specified. User-only.
1332
+ *
1333
+ * @method ac
1334
+ */
1335
+ async updateProfile(params) {
1336
+ await this.#accountManager.updateProfile(params);
1337
+ }
1338
+ /**
1339
+ * Set the birthday of the current user. User-only.
1340
+ *
1341
+ * @method ac
1342
+ */
1343
+ async setBirthday(params) {
1344
+ await this.#accountManager.setBirthday(params);
1345
+ }
1346
+ /**
1347
+ * Set the personal channel of the current user. User-only.
1348
+ *
1349
+ * @method ac
1350
+ */
1351
+ async setPersonalChannel(params) {
1352
+ await this.#accountManager.setPersonalChannel(params);
1353
+ }
1354
+ /**
1355
+ * Set the name color of the current user. User-only.
1356
+ *
1357
+ * @method ac
1358
+ * @param color The identifier of the color to set.
1359
+ */
1360
+ async setNameColor(color, params) {
1361
+ await this.#accountManager.setNameColor(color, params);
1362
+ }
1363
+ /**
1364
+ * Set the profile color of the current user. User-only.
1365
+ *
1366
+ * @method ac
1367
+ * @param color The identifier of the color to set.
1368
+ */
1369
+ async setProfileColor(color, params) {
1370
+ await this.#accountManager.setProfileColor(color, params);
1371
+ }
1372
+ /**
1373
+ * Set the location of the current user. User-only.
1374
+ *
1375
+ * @method ac
1376
+ */
1377
+ async setLocation(params) {
1378
+ await this.#accountManager.setLocation(params);
1379
+ }
1380
+ /**
1381
+ * Set the working hours of the current user. User-only.
1382
+ *
1383
+ * @method ac
1384
+ */
1385
+ async setWorkingHours(params) {
1386
+ await this.#accountManager.setWorkingHours(params);
1387
+ }
1388
+ /**
1389
+ * Enable sponsored messages on the current user. User-only.
1390
+ *
1391
+ * @method ac
1392
+ */
1393
+ async enableSponsoredMessages() {
1394
+ await this.#accountManager.enableSponsoredMessages();
1395
+ }
1396
+ /**
1397
+ * Disable sponsored messages on the current user. User-only.
1398
+ *
1399
+ * @method ac
1400
+ */
1401
+ async disableSponsoredMessages() {
1402
+ await this.#accountManager.disableSponsoredMessages();
1403
+ }
1404
+ /**
1405
+ * Pause the business bot in a chat. User-only.
1406
+ *
1407
+ * @method ac
1408
+ */
1409
+ async pauseBusinessBotConnection(chatId) {
1410
+ await this.#accountManager.pauseBusinessBotConnection(chatId);
1411
+ }
1412
+ /**
1413
+ * Resume the business bot in a chat. User-only.
1414
+ *
1415
+ * @method ac
1416
+ */
1417
+ async resumeBusinessBotConnection(chatId) {
1418
+ await this.#accountManager.resumeBusinessBotConnection(chatId);
1419
+ }
1420
+ //
1421
+ // ========================= MESSAGES ========================= //
1422
+ //
1423
+ /**
1424
+ * Send a text message.
1425
+ *
1426
+ * @method ms
1427
+ * @param chatId The identifier of a chat to send the message to.
1428
+ * @param text The message's text.
1429
+ * @returns The sent text message.
1430
+ */
1431
+ async sendMessage(chatId, text, params) {
1432
+ return await this.#messageManager.sendMessage(chatId, text, params);
1433
+ }
1434
+ /**
1435
+ * Stream a drafted text message. Bot-only.
1436
+ *
1437
+ * @method ms
1438
+ * @param chatId The identifier of a chat to send the message to.
1439
+ * @param draftId The identifier of the draft.
1440
+ * @param text The message's text.
1441
+ */
1442
+ async sendMessageDraft(chatId, draftId, text, params) {
1443
+ await this.#messageManager.sendMessageDraft(chatId, draftId, text, params);
1444
+ }
1445
+ /**
1446
+ * Send a photo.
1447
+ *
1448
+ * @method ms
1449
+ * @param chatId The identifier of a chat to send the photo to.
1450
+ * @param photo The photo to send.
1451
+ * @returns The sent photo.
1452
+ */
1453
+ async sendPhoto(chatId, photo, params) {
1454
+ return await this.#messageManager.sendPhoto(chatId, photo, params);
1455
+ }
1456
+ /**
1457
+ * Send a document.
1458
+ *
1459
+ * @method ms
1460
+ * @param chatId The identifier of a chat to send the document to.
1461
+ * @param document The document to send.
1462
+ * @returns The sent document.
1463
+ */
1464
+ async sendDocument(chatId, document, params) {
1465
+ return await this.#messageManager.sendDocument(chatId, document, params);
1466
+ }
1467
+ /**
1468
+ * Send a sticker.
1469
+ *
1470
+ * @method ms
1471
+ * @param chatId The identifier of a chat to send the sticker to.
1472
+ * @param document The sticker to send.
1473
+ * @returns The sent sticker.
1474
+ */
1475
+ async sendSticker(chatId, sticker, params) {
1476
+ return await this.#messageManager.sendSticker(chatId, sticker, params);
1477
+ }
1478
+ /**
1479
+ * Send a video.
1480
+ *
1481
+ * @method ms
1482
+ * @param chatId The identifier of a chat to send the video to.
1483
+ * @param video The video to send.
1484
+ * @returns The sent video.
1485
+ */
1486
+ async sendVideo(chatId, video, params) {
1487
+ return await this.#messageManager.sendVideo(chatId, video, params);
1488
+ }
1489
+ /**
1490
+ * Send an animation.
1491
+ *
1492
+ * @method ms
1493
+ * @param chatId The identifier of a chat to send the animation to.
1494
+ * @param animation The animation to send.
1495
+ * @returns The sent animation.
1496
+ */
1497
+ async sendAnimation(chatId, animation, params) {
1498
+ return await this.#messageManager.sendAnimation(chatId, animation, params);
1499
+ }
1500
+ /**
1501
+ * Send a voice message.
1502
+ *
1503
+ * @method ms
1504
+ * @param chatId The identifier of a chat to send the voice message to.
1505
+ * @param voice The voice to send.
1506
+ * @returns The sent voice message.
1507
+ */
1508
+ async sendVoice(chatId, voice, params) {
1509
+ return await this.#messageManager.sendVoice(chatId, voice, params);
1510
+ }
1511
+ /**
1512
+ * Send an audio file.
1513
+ *
1514
+ * @method ms
1515
+ * @param chatId The identifier of a chat to send the audio file to.
1516
+ * @param audio The audio to send.
1517
+ * @returns The sent audio filr.
1518
+ */
1519
+ async sendAudio(chatId, audio, params) {
1520
+ return await this.#messageManager.sendAudio(chatId, audio, params);
1521
+ }
1522
+ /**
1523
+ * Send a media group.
1524
+ *
1525
+ * @method ms
1526
+ * @param chatId The identifier of a chat to send the media group to.
1527
+ * @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
1528
+ * @returns The sent messages.
1529
+ */
1530
+ async sendMediaGroup(chatId, media, params) {
1531
+ return await this.#messageManager.sendMediaGroup(chatId, media, params);
1532
+ }
1533
+ /**
1534
+ * Send a video note.
1535
+ *
1536
+ * @method ms
1537
+ * @param chatId The identifier of a chat to send the video note to.
1538
+ * @param videoNote The video note to send.
1539
+ * @returns The sent video note.
1540
+ */
1541
+ async sendVideoNote(chatId, videoNote, params) {
1542
+ return await this.#messageManager.sendVideoNote(chatId, videoNote, params);
1543
+ }
1544
+ /**
1545
+ * Send a location.
1546
+ *
1547
+ * @method ms
1548
+ * @param chatId The identifier of a chat to send the location to.
1549
+ * @param latitude The location's latitude.
1550
+ * @param longitude The location's longitude.
1551
+ * @returns The sent location.
1552
+ */
1553
+ async sendLocation(chatId, latitude, longitude, params) {
1554
+ return await this.#messageManager.sendLocation(chatId, latitude, longitude, params);
1555
+ }
1556
+ /**
1557
+ * Send a contact.
1558
+ *
1559
+ * @method ms
1560
+ * @param chatId The identifier of a chat to send the contact to.
1561
+ * @param firstName The contact's first name.
1562
+ * @param number The contact's phone number.
1563
+ * @returns The sent contact.
1564
+ */
1565
+ async sendContact(chatId, firstName, number, params) {
1566
+ return await this.#messageManager.sendContact(chatId, firstName, number, params);
1567
+ }
1568
+ /**
1569
+ * Send a dice.
1570
+ *
1571
+ * @method ms
1572
+ * @param chatId The identifier of a chat to send the dice to.
1573
+ * @returns The sent dice.
1574
+ */
1575
+ async sendDice(chatId, params) {
1576
+ return await this.#messageManager.sendDice(chatId, params);
1577
+ }
1578
+ /**
1579
+ * Send a venue.
1580
+ *
1581
+ * @method ms
1582
+ * @param chatId The identifier of a chat to send the venue to.
1583
+ * @param latitude The latitude of the venue.
1584
+ * @param longitude The longitude of the venue.
1585
+ * @param title The title of the venue.
1586
+ * @param address The written address of the venue.
1587
+ * @returns The sent venue.
1588
+ */
1589
+ async sendVenue(chatId, latitude, longitude, title, address, params) {
1590
+ return await this.#messageManager.sendVenue(chatId, latitude, longitude, title, address, params);
1591
+ }
1592
+ /**
1593
+ * Send a poll.
1594
+ *
1595
+ * @method ms
1596
+ * @param chatId The identifier of a chat to send the poll to.
1597
+ * @param question The poll's question.
1598
+ * @param options The poll's options.
1599
+ * @returns The sent poll.
1600
+ */
1601
+ async sendPoll(chatId, question, options, params) {
1602
+ return await this.#messageManager.sendPoll(chatId, question, options, params);
1603
+ }
1604
+ /**
1605
+ * Send a checklist. User-only.
1606
+ *
1607
+ * @method ms
1608
+ * @param chatId The identifier of a chat to send the checklist to.
1609
+ * @param title The checklist's title.
1610
+ * @param items The checklist's items.
1611
+ * @returns The sent checklist.
1612
+ */
1613
+ async sendChecklist(chatId, title, items, params) {
1614
+ return await this.#messageManager.sendChecklist(chatId, title, items, params);
1615
+ }
1616
+ /**
1617
+ * Send an invoice. Bot-only.
1618
+ *
1619
+ * @method ms
1620
+ * @param chatId The identifier of a chat to send the invoice to.
1621
+ * @param title The invoice's title.
1622
+ * @param description The invoice's description.
1623
+ * @param payload The invoice's payload.
1624
+ * @param currency The invoice's currency.
1625
+ * @param prices The invoice's price tags.
1626
+ * @returns The sent invoice.
1627
+ */
1628
+ async sendInvoice(chatId, title, description, payload, currency, prices, params) {
1629
+ return await this.#messageManager.sendInvoice(chatId, title, description, payload, currency, prices, params);
1630
+ }
1631
+ /**
1632
+ * Edit a message's text.
1633
+ *
1634
+ * @method ms
1635
+ * @param chatId The identifier of the chat which the message belongs to.
1636
+ * @param messageId The identifier of the message.
1637
+ * @param text The new text of the message.
1638
+ * @returns The edited text message.
1639
+ */
1640
+ async editMessageText(chatId, messageId, text, params) {
1641
+ return await this.#messageManager.editMessageText(chatId, messageId, text, params);
1642
+ }
1643
+ /**
1644
+ * Edit a message's caption.
1645
+ *
1646
+ * @method ms
1647
+ * @param chatId The identifier of the chat which the message belongs to.
1648
+ * @param messageId The identifier of the message.
1649
+ * @param text The new caption of the message.
1650
+ * @returns The edited message.
1651
+ */
1652
+ async editMessageCaption(chatId, messageId, params) {
1653
+ return await this.#messageManager.editMessageCaption(chatId, messageId, params);
1654
+ }
1655
+ /**
1656
+ * Edit a message's media.
1657
+ *
1658
+ * @method ms
1659
+ * @param chatId The identifier of the chat which the message belongs to.
1660
+ * @param messageId The identifier of the message.
1661
+ * @param media The new media of the message.
1662
+ * @returns The edited message.
1663
+ */
1664
+ async editMessageMedia(chatId, messageId, media, params) {
1665
+ return await this.#messageManager.editMessageMedia(chatId, messageId, media, params);
1666
+ }
1667
+ /**
1668
+ * Edit an inline message's media.
1669
+ *
1670
+ * @method ms
1671
+ * @param inlineMessageId The identifier of the inline message.
1672
+ * @param media The new media of the message.
1673
+ */
1674
+ async editInlineMessageMedia(inlineMessageId, media, params) {
1675
+ await this.#messageManager.editInlineMessageMedia(inlineMessageId, media, params);
1676
+ }
1677
+ /**
1678
+ * Edit an inline message's text. Bot-only.
1679
+ *
1680
+ * @method ms
1681
+ * @param inlineMessageId The identifier of the inline message.
1682
+ * @param text The new text of the message.
1683
+ */
1684
+ async editInlineMessageText(inlineMessageId, text, params) {
1685
+ await this.#messageManager.editInlineMessageText(inlineMessageId, text, params);
1686
+ }
1687
+ /**
1688
+ * Edit an inline message's caption. Bot-only.
1689
+ *
1690
+ * @method ms
1691
+ * @param inlineMessageId The identifier of the inline message.
1692
+ */
1693
+ async editInlineMessageCaption(inlineMessageId, params) {
1694
+ await this.#messageManager.editInlineMessageCaption(inlineMessageId, params);
1695
+ }
1696
+ /**
1697
+ * Edit a message's reply markup.
1698
+ *
1699
+ * @method ms
1700
+ * @param chatId The identifier of the chat which the message belongs to.
1701
+ * @param messageId The identifier of the message.
1702
+ * @returns The edited message.
1703
+ */
1704
+ async editMessageReplyMarkup(chatId, messageId, params) {
1705
+ return await this.#messageManager.editMessageReplyMarkup(chatId, messageId, params);
1706
+ }
1707
+ /**
1708
+ * Edit an inline message's reply markup. Bot-only.
1709
+ *
1710
+ * @method ms
1711
+ * @param inlineMessageId The identifier of the inline message.
1712
+ */
1713
+ async editInlineMessageReplyMarkup(inlineMessageId, params) {
1714
+ await this.#messageManager.editInlineMessageReplyMarkup(inlineMessageId, params);
1715
+ }
1716
+ /**
1717
+ * Edit a message's live location.
1718
+ *
1719
+ * @method ms
1720
+ * @param chatId The identifier of the chat which the message belongs to.
1721
+ * @param messageId The identifier of the message.
1722
+ * @param latitude The new latitude.
1723
+ * @param longitude The new longitude.
1724
+ * @returns The edited location message.
1725
+ */
1726
+ async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
1727
+ return await this.#messageManager.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
1728
+ }
1729
+ /**
1730
+ * Edit an inline message's live location. Bot-only.
1731
+ *
1732
+ * @method ms
1733
+ * @param inlineMessageId The identifier of the inline message.
1734
+ * @param latitude The new latitude.
1735
+ * @param longitude The new longitude.
1736
+ * @returns The edited location message.
1737
+ */
1738
+ async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
1739
+ await this.#messageManager.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
1740
+ }
1741
+ /**
1742
+ * Retrieve multiple messages.
1743
+ *
1744
+ * @method ms
1745
+ * @param chatId The identifier of a chat to retrieve the messages from.
1746
+ * @param messageIds The identifiers of the messages to retrieve.
1747
+ * @example ```ts
1748
+ * const message = await client.getMessages("@MTKruto", [210, 212]);
1749
+ * ```
1750
+ * @returns The retrieved messages.
1751
+ * @cache
1752
+ */
1753
+ async getMessages(chatId, messageIds) {
1754
+ return await this.#messageManager.getMessages(chatId, messageIds);
1755
+ }
1756
+ /**
1757
+ * Retrieve a single message.
1758
+ *
1759
+ * @method ms
1760
+ * @param chatId The identifier of a chat.
1761
+ * @param messageId The identifier of the message to retrieve.
1762
+ * @example ```ts
1763
+ * const message = await client.getMessage("@MTKruto", 212);
1764
+ * ```
1765
+ * @returns The retrieved message.
1766
+ * @cache
1767
+ */
1768
+ async getMessage(chatId, messageId) {
1769
+ return await this.#messageManager.getMessage(chatId, messageId);
1770
+ }
1771
+ /**
1772
+ * Retrieve a message using its link.
1773
+ *
1774
+ * @method ms
1775
+ * @param link A message link.
1776
+ * @example ```ts
1777
+ * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
1778
+ * ```
1779
+ * @returns The message that was linked to.
1780
+ */
1781
+ async resolveMessageLink(link) {
1782
+ return await this.#messageManager.resolveMessageLink(link);
1783
+ }
1784
+ /**
1785
+ * Delete multiple messages.
1786
+ *
1787
+ * @method ms
1788
+ * @param chatId The identifier of the chat which the message belongs to.
1789
+ * @param messageIds The identifiers of the messages to delete.
1790
+ */
1791
+ async deleteMessages(chatId, messageIds, params) {
1792
+ await this.#messageManager.deleteMessages(chatId, messageIds, params);
1793
+ }
1794
+ /**
1795
+ * Delete a single message.
1796
+ *
1797
+ * @method ms
1798
+ * @param chatId The identifier of the chat which the message belongs to.
1799
+ * @param messageId The identifier of the message to delete.
1800
+ */
1801
+ async deleteMessage(chatId, messageId, params) {
1802
+ await this.#messageManager.deleteMessages(chatId, [messageId], params);
1803
+ }
1804
+ /**
1805
+ * Delete all messages sent by a specific member of a chat. User-only.
1806
+ *
1807
+ * @method ms
1808
+ * @param chatId The identifier of a chat. Must be a supergroup.
1809
+ * @param memberId The identifier of the member.
1810
+ */
1811
+ async deleteChatMemberMessages(chatId, memberId) {
1812
+ await this.#messageManager.deleteChatMemberMessages(chatId, memberId);
1813
+ }
1814
+ /**
1815
+ * Delete multiple scheduled messages.
1816
+ *
1817
+ * @method ms
1818
+ * @param chatId The identifier of a chat.
1819
+ * @param messageIds The identifiers of the scheduled messages to delete.
1820
+ */
1821
+ async deleteScheduledMessages(chatId, messageIds) {
1822
+ await this.#messageManager.deleteScheduledMessages(chatId, messageIds);
1823
+ }
1824
+ /**
1825
+ * Delete a scheduled message.
1826
+ *
1827
+ * @method ms
1828
+ * @param chatId The identifier of a chat.
1829
+ * @param messageId The identifier of the scheduled message to delete.
1830
+ */
1831
+ async deleteScheduledMessage(chatId, messageId) {
1832
+ await this.#messageManager.deleteScheduledMessage(chatId, messageId);
1833
+ }
1834
+ /**
1835
+ * Send multiple scheduled messages before their schedule.
1836
+ *
1837
+ * @method ms
1838
+ * @param chatId The identifier of a chat.
1839
+ * @param messageIds The identifiers of the scheduled messages to send.
1840
+ */
1841
+ async sendScheduledMessages(chatId, messageIds) {
1842
+ return await this.#messageManager.sendScheduledMessages(chatId, messageIds);
1843
+ }
1844
+ /**
1845
+ * Send a scheduled message before its schedule.
1846
+ *
1847
+ * @method ms
1848
+ * @param chatId The identifier of a chat.
1849
+ * @param messageId The identifier of the scheduled message to send.
1850
+ */
1851
+ async sendScheduledMessage(chatId, messageId) {
1852
+ return await this.#messageManager.sendScheduledMessage(chatId, messageId);
1853
+ }
1854
+ /**
1855
+ * Pin a message in a chat.
1856
+ *
1857
+ * @method ms
1858
+ * @param chatId The identifier of a chat.
1859
+ * @param messageId The identifier of the message.
1860
+ */
1861
+ async pinMessage(chatId, messageId, params) {
1862
+ await this.#messageManager.pinMessage(chatId, messageId, params);
1863
+ }
1864
+ /**
1865
+ * Unpin a pinned message.
1866
+ *
1867
+ * @method ms
1868
+ * @param chatId The identifier of a chat.
1869
+ * @param messageId The identifier of the message.
1870
+ */
1871
+ async unpinMessage(chatId, messageId, params) {
1872
+ await this.#messageManager.unpinMessage(chatId, messageId, params);
1873
+ }
1874
+ /**
1875
+ * Unpin all pinned messages.
1876
+ *
1877
+ * @method ms
1878
+ * @param chatId The identifier of a chat.
1879
+ */
1880
+ async unpinMessages(chatId, params) {
1881
+ await this.#messageManager.unpinMessages(chatId, params);
1882
+ }
1883
+ /**
1884
+ * Forward multiple messages.
1885
+ *
1886
+ * @method ms
1887
+ * @param from The identifier of a chat to forward the messages from.
1888
+ * @param to The identifier of a chat to forward the messages to.
1889
+ * @param messageIds The identifiers of the messages to forward.
1890
+ * @returns The forwarded messages.
1891
+ */
1892
+ async forwardMessages(from, to, messageIds, params) {
1893
+ return await this.#messageManager.forwardMessages(from, to, messageIds, params);
1894
+ }
1895
+ /**
1896
+ * Forward a single message.
1897
+ *
1898
+ * @method ms
1899
+ * @param from The identifier of a chat to forward the message from.
1900
+ * @param to The identifier of a chat to forward the message to.
1901
+ * @param messageId The identifier of the message to forward.
1902
+ * @returns The forwarded message.
1903
+ */
1904
+ async forwardMessage(from, to, messageId, params) {
1905
+ return (await this.forwardMessages(from, to, [messageId], params))[0];
1906
+ }
1907
+ /**
1908
+ * Stop a poll.
1909
+ *
1910
+ * @method ms
1911
+ * @param chatId The chat that includes the poll.
1912
+ * @param messageId The idenfifier of the poll's message.
1913
+ * @returns The new state of the poll.
1914
+ */
1915
+ async stopPoll(chatId, messageId, params) {
1916
+ return await this.#messageManager.stopPoll(chatId, messageId, params);
1917
+ }
1918
+ /**
1919
+ * Send a chat action.
1920
+ *
1921
+ * @method ms
1922
+ * @param chatId The identifier of a chat to send the chat action to.
1923
+ * @param action The chat action.
1924
+ * @param messageThreadId The thread to send the chat action to.
1925
+ */
1926
+ async sendChatAction(chatId, action, params) {
1927
+ await this.#messageManager.sendChatAction(chatId, action, params);
1928
+ }
1929
+ /**
1930
+ * Search for messages. User-only.
1931
+ *
1932
+ * @method ms
1933
+ */
1934
+ async searchMessages(params) {
1935
+ return await this.#messageManager.searchMessages(params);
1936
+ }
1937
+ /**
1938
+ * Mark messages as read. User-only.
1939
+ *
1940
+ * @method ms
1941
+ * @param chatId The identifier of the chat which the messages belong to.
1942
+ * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
1943
+ */
1944
+ async readMessages(chatId, untilMessageId) {
1945
+ await this.#messageManager.readMessages(chatId, untilMessageId);
1946
+ }
1947
+ /**
1948
+ * Start a bot. User-only.
1949
+ *
1950
+ * @method ms
1951
+ * @param botId The identifier of the bot to start.
1952
+ * @returns The start message.
1953
+ */
1954
+ async startBot(botId, params) {
1955
+ return await this.#messageManager.startBot(botId, params);
1956
+ }
1957
+ /**
1958
+ * Transcribe a voice message. User-only.
1959
+ *
1960
+ * @method ms
1961
+ * @param chatId The identifier of the chat which the message belongs to.
1962
+ * @param messageId The identifier of the message.
1963
+ * @cache
1964
+ */
1965
+ async transcribeVoice(chatId, messageId) {
1966
+ return await this.#messageManager.transcribeVoice(chatId, messageId);
1967
+ }
1968
+ /**
1969
+ * Get a sticker set.
1970
+ *
1971
+ * @method ms
1972
+ * @param name The name of the sticker set or its link.
1973
+ */
1974
+ async getStickerSet(name) {
1975
+ return await this.#messageManager.getStickerSet(name);
1976
+ }
1977
+ /*
1978
+ * Get the link preview for a message that is about to be sent. User-only.
1979
+ *
1980
+ * @method ms
1981
+ * @param text The message's text.
1982
+ */
1983
+ async getLinkPreview(text, params) {
1984
+ return await this.#linkPreviewManager.getLinkPreview(text, params);
1985
+ }
1986
+ /**
1987
+ * Open a mini app. User-only.
1988
+ *
1989
+ * @method ms
1990
+ * @param botId The identifier of a bot with the mini app.
1991
+ * @param chatId The identifier of the chat from which the mini app is opened.
1992
+ * @cache
1993
+ */
1994
+ async openMiniApp(botId, chatId, params) {
1995
+ return await this.#messageManager.openMiniApp(botId, chatId, params);
1996
+ }
1997
+ /**
1998
+ * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
1999
+ *
2000
+ * @method ms
2001
+ * @cache
2002
+ */
2003
+ async getProgressId() {
2004
+ return await this.#fileManager.getProgressId();
2005
+ }
2006
+ /**
2007
+ * Get messages saved from a specific chat.
2008
+ *
2009
+ * @method ms
2010
+ * @param chatId The identifier of a chat.
2011
+ */
2012
+ async getSavedMessages(chatId, params) {
2013
+ return await this.#messageManager.getSavedMessages(chatId, params);
2014
+ }
2015
+ /**
2016
+ * Get a list of saved chats.
2017
+ *
2018
+ * @method ms
2019
+ */
2020
+ async getSavedChats(params) {
2021
+ return await this.#messageManager.getSavedChats(params);
2022
+ }
2023
+ /**
2024
+ * Get a list of reactions made to a message. User-only.
2025
+ *
2026
+ * @param chatId The identifier of a chat.
2027
+ * @param messageId The identifier of the message.
2028
+ * @method ms
2029
+ */
2030
+ async getMessageReactions(chatId, messageId, params) {
2031
+ return await this.#messageManager.getMessageReactions(chatId, messageId, params);
2032
+ }
2033
+ //
2034
+ // ========================= POLLS ========================= //
2035
+ //
2036
+ /**
2037
+ * Cast a vote. User-only.
2038
+ *
2039
+ * @method pl
2040
+ * @param chatId The identifier of the chat that includes the poll.
2041
+ * @param messageId The identifier of the message that includes the poll.
2042
+ * @param optionIndexes The indexes of the options to cast for.
2043
+ */
2044
+ async vote(chatId, messageId, optionIndexes) {
2045
+ await this.#pollManager.vote(chatId, messageId, optionIndexes);
2046
+ }
2047
+ /**
2048
+ * Retract a vote. User-only.
2049
+ *
2050
+ * @method pl
2051
+ * @param chatId The identifier of the chat that includes the poll.
2052
+ * @param messageId The identifier of the message that includes the poll.
2053
+ */
2054
+ async retractVote(chatId, messageId) {
2055
+ await this.#pollManager.retractVote(chatId, messageId);
2056
+ }
2057
+ //
2058
+ // ========================= CHECKLISTS ========================= //
2059
+ //
2060
+ /**
2061
+ * Add items to a checklist. User-only.
2062
+ *
2063
+ * @param chatId The identifier of a chat.
2064
+ * @param messageId The identifier of the checklist message.
2065
+ * @param items The items to add.
2066
+ * @method cl
2067
+ */
2068
+ async addToChecklist(chatId, messageId, items) {
2069
+ await this.#checklistManager.addToChecklist(chatId, messageId, items);
2070
+ }
2071
+ /**
2072
+ * Update a checklist. User-only.
2073
+ *
2074
+ * @param chatId The identifier of a chat.
2075
+ * @param messageId The identifier of the checklist message.
2076
+ * @method cl
2077
+ */
2078
+ async updateChecklist(chatId, messageId, params) {
2079
+ await this.#checklistManager.updateChecklist(chatId, messageId, params);
2080
+ }
2081
+ /**
2082
+ * Check multiple items of a checklist. User-only.
2083
+ *
2084
+ * @param chatId The identifier of a chat.
2085
+ * @param messageId The identifier of the checklist message.
2086
+ * @param items The identifiers of the items to check.
2087
+ * @method cl
2088
+ */
2089
+ async checkChecklistItems(chatId, messageId, items) {
2090
+ await this.#checklistManager.checkChecklistItems(chatId, messageId, items);
2091
+ }
2092
+ /**
2093
+ * Uncheck multiple items of a checklist. User-only.
2094
+ *
2095
+ * @param chatId The identifier of a chat.
2096
+ * @param messageId The identifier of the checklist message.
2097
+ * @param items The identifiers of the items to uncheck.
2098
+ * @method cl
2099
+ */
2100
+ async uncheckChecklistItems(chatId, messageId, items) {
2101
+ await this.#checklistManager.uncheckChecklistItems(chatId, messageId, items);
2102
+ }
2103
+ /**
2104
+ * Check a single item of a checklist. User-only.
2105
+ *
2106
+ * @param chatId The identifier of a chat.
2107
+ * @param messageId The identifier of the checklist message.
2108
+ * @param item The identifier of the item to check.
2109
+ * @method cl
2110
+ */
2111
+ async checkChecklistItem(chatId, messageId, item) {
2112
+ await this.#checklistManager.checkChecklistItem(chatId, messageId, item);
2113
+ }
2114
+ /**
2115
+ * Uncheck a single item of a checklist. User-only.
2116
+ *
2117
+ * @param chatId The identifier of a chat.
2118
+ * @param messageId The identifier of the checklist message.
2119
+ * @param item The identifier of the item to uncheck.
2120
+ * @method cl
2121
+ */
2122
+ async uncheckChecklistItem(chatId, messageId, item) {
2123
+ await this.#checklistManager.uncheckChecklistItem(chatId, messageId, item);
2124
+ }
2125
+ //
2126
+ // ========================= FILES ========================= //
2127
+ //
2128
+ /**
2129
+ * Download a chunk of a file.
2130
+ *
2131
+ * @method fs
2132
+ * @param fileId The identifier of a file.
2133
+ * @example ```ts
2134
+ * const chunk = await client.downloadChunk(fileId, { chunkSize: 256 * 1024 });
2135
+ * ```
2136
+ * @returns The downloaded chunk.
2137
+ * @cache file
2138
+ */
2139
+ async downloadChunk(fileId, params) {
2140
+ const controller = new AbortController();
2141
+ for await (const chunk of this.#fileManager.download(fileId, { ...params, signal: controller.signal })) {
2142
+ controller.abort();
2143
+ return chunk;
2144
+ }
2145
+ (0, _0_deps_js_1.unreachable)();
2146
+ }
2147
+ /**
2148
+ * Download a file.
2149
+ *
2150
+ * @method fs
2151
+ * @param fileId The identifier of the file to download.
2152
+ * @example ```ts
2153
+ * for await (const chunk of client.download(fileId, { chunkSize: 256 * 1024 })) {
2154
+ * await outFile.write(chunk);
2155
+ * }
2156
+ * ```
2157
+ * @returns A generator yielding the contents of the file.
2158
+ * @cache file
2159
+ */
2160
+ async *download(fileId, params) {
2161
+ for await (const chunk of this.#fileManager.download(fileId, params)) {
2162
+ yield chunk;
2163
+ }
2164
+ }
2165
+ /**
2166
+ * Get custom emoji documents for download.
2167
+ *
2168
+ * @method fs
2169
+ * @param id Identifier of one or more of custom emojis.
2170
+ * @returns The custom emoji documents.
2171
+ * @cache
2172
+ */
2173
+ async getCustomEmojiStickers(id) {
2174
+ return await this.#fileManager.getCustomEmojiStickers(id);
2175
+ }
2176
+ //
2177
+ // ========================= CHATS ========================= //
2178
+ //
2179
+ /**
2180
+ * Get chats from a chat list. User-only.
2181
+ *
2182
+ * @method ch
2183
+ */
2184
+ async getChats(params) {
2185
+ return await this.#chatListManager.getChats(params?.from, params?.after, params?.limit);
2186
+ }
2187
+ /**
2188
+ * Get pinned chats from a chat list. User-only.
2189
+ *
2190
+ * @method ch
2191
+ * @param from The chat list to get the pinned chats from. Defaults to main.
2192
+ */
2193
+ async getPinnedChats(from) {
2194
+ return await this.#chatListManager.getPinnedChats(from);
2195
+ }
2196
+ /**
2197
+ * Get a chat.
2198
+ *
2199
+ * @method ch
2200
+ * @cache
2201
+ */
2202
+ async getChat(chatId) {
2203
+ return await this.#chatListManager.getChat(chatId);
2204
+ }
2205
+ /**
2206
+ * Get chat history. User-only.
2207
+ *
2208
+ * @method ch
2209
+ * @param chatId The identifier of a chat.
2210
+ */
2211
+ async getHistory(chatId, params) {
2212
+ return await this.#messageManager.getHistory(chatId, params);
2213
+ }
2214
+ /**
2215
+ * Set a chat's available reactions. User-only.
2216
+ *
2217
+ * @method ch
2218
+ * @param chatId The identifier of a chat.
2219
+ * @param availableReactions The new available reactions.
2220
+ */
2221
+ async setAvailableReactions(chatId, availableReactions) {
2222
+ await this.#chatManager.setAvailableReactions(chatId, availableReactions);
2223
+ }
2224
+ /**
2225
+ * Set a chat's photo.
2226
+ *
2227
+ * @method ch
2228
+ * @param chatId The identifier of a chat.
2229
+ * @param photo A photo to set as the chat's photo.
2230
+ */
2231
+ async setChatPhoto(chatId, photo, params) {
2232
+ await this.#chatManager.setChatPhoto(chatId, photo, params);
2233
+ }
2234
+ /**
2235
+ * Delete a chat's photo.
2236
+ *
2237
+ * @method ch
2238
+ * @param chatId The identifier of a chat.
2239
+ */
2240
+ async deleteChatPhoto(chatId) {
2241
+ await this.#chatManager.deleteChatPhoto(chatId);
2242
+ }
2243
+ /**
2244
+ * Ban a member from a chat.
2245
+ *
2246
+ * @method ch
2247
+ * @param chatId The identifier of a chat.
2248
+ * @param memberId The identifier of the member.
2249
+ */
2250
+ async banChatMember(chatId, memberId, params) {
2251
+ await this.#chatManager.banChatMember(chatId, memberId, params);
2252
+ }
2253
+ /**
2254
+ * Unban a member from a chat.
2255
+ *
2256
+ * @method ch
2257
+ * @param chatId The identifier of a chat. Must be a supergroup.
2258
+ * @param memberId The identifier of the member.
2259
+ */
2260
+ async unbanChatMember(chatId, memberId) {
2261
+ await this.#chatManager.unbanChatMember(chatId, memberId);
2262
+ }
2263
+ /**
2264
+ * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
2265
+ *
2266
+ * @method ch
2267
+ * @param chatId The identifier of a chat. Must be a supergroup.
2268
+ * @param memberId The identifier of the member.
2269
+ */
2270
+ async kickChatMember(chatId, memberId) {
2271
+ await this.#chatManager.banChatMember(chatId, memberId);
2272
+ await this.#chatManager.unbanChatMember(chatId, memberId);
2273
+ }
2274
+ /**
2275
+ * Set the rights of a chat member.
2276
+ *
2277
+ * @method ch
2278
+ * @param chatId The identifier of a chat. Must be a supergroup.
2279
+ * @param memberId The identifier of the member.
2280
+ */
2281
+ async setChatMemberRights(chatId, memberId, params) {
2282
+ await this.#chatManager.setChatMemberRights(chatId, memberId, params);
2283
+ }
2284
+ /**
2285
+ * Get the administrators of a chat.
2286
+ *
2287
+ * @method ch
2288
+ * @param chatId The identifier of a chat.
2289
+ * @returns The chat's administrators.
2290
+ */
2291
+ async getChatAdministrators(chatId) {
2292
+ return await this.#chatListManager.getChatAdministrators(chatId);
2293
+ }
2294
+ /**
2295
+ * Enable join requests in a chat. User-only.
2296
+ *
2297
+ * @method ch
2298
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2299
+ */
2300
+ async enableJoinRequests(chatId) {
2301
+ await this.#chatManager.enableJoinRequests(chatId);
2302
+ }
2303
+ /**
2304
+ * Disable join requests in a chat. User-only.
2305
+ *
2306
+ * @method ch
2307
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2308
+ */
2309
+ async disableJoinRequests(chatId) {
2310
+ await this.#chatManager.disableJoinRequests(chatId);
2311
+ }
2312
+ /**
2313
+ * Get inactive chats. User-only.
2314
+ *
2315
+ * @method ch
2316
+ * @retuns A list of inactive chats the current user is member of.
2317
+ */
2318
+ async getInactiveChats() {
2319
+ return await this.#accountManager.getInactiveChats();
2320
+ }
2321
+ /**
2322
+ * Get the invite links created for a chat. User-only.
2323
+ *
2324
+ * @method ch
2325
+ * @param chatId The identifier of a chat.
2326
+ * @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
2327
+ */
2328
+ async getCreatedInviteLinks(chatId, params) {
2329
+ return await this.#chatManager.getCreatedInviteLinks(chatId, params);
2330
+ }
2331
+ /**
2332
+ * Join a chat. User-only.
2333
+ *
2334
+ * @method ch
2335
+ * @param chatId The identifier of a chat.
2336
+ */
2337
+ async joinChat(chatId) {
2338
+ await this.#chatManager.joinChat(chatId);
2339
+ }
2340
+ /**
2341
+ * Leave a chat.
2342
+ *
2343
+ * @method ch
2344
+ * @param chatId The identifier of a chat.
2345
+ */
2346
+ async leaveChat(chatId) {
2347
+ await this.#chatManager.leaveChat(chatId);
2348
+ }
2349
+ /**
2350
+ * Get information on a user's chat membership.
2351
+ *
2352
+ * @method ch
2353
+ * @param chatId The identifier of a chat.
2354
+ * @param userId The identifier of the user.
2355
+ */
2356
+ async getChatMember(chatId, userId) {
2357
+ return await this.#chatListManager.getChatMember(chatId, userId);
2358
+ }
2359
+ /**
2360
+ * Get the members of a chat.
2361
+ *
2362
+ * @method ch
2363
+ * @param chatId The identifier of a chat.
2364
+ */
2365
+ async getChatMembers(chatId, params) {
2366
+ return await this.#chatListManager.getChatMembers(chatId, params);
2367
+ }
2368
+ /**
2369
+ * Set a chat's sticker set.
2370
+ *
2371
+ * @method ch
2372
+ * @param chatId The identifier of a chat. Must be a supergroup.
2373
+ * @param setName The name of the set.
2374
+ */
2375
+ async setChatStickerSet(chatId, setName) {
2376
+ await this.#messageManager.setChatStickerSet(chatId, setName);
2377
+ }
2378
+ /**
2379
+ * Delete a chat's sticker set.
2380
+ *
2381
+ * @method ch
2382
+ * @param chatId The identifier of a chat. Must be a supergroup.
2383
+ */
2384
+ async deleteChatStickerSet(chatId) {
2385
+ await this.#messageManager.deleteChatStickerSet(chatId);
2386
+ }
2387
+ /**
2388
+ * Set the number of boosts required to circument a chat's default restrictions. User-only.
2389
+ *
2390
+ * @method ch
2391
+ * @param chatId The identifier of a chat.
2392
+ * @param boosts The number of boosts required to circumvent its restrictions.
2393
+ */
2394
+ async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
2395
+ await this.#chatManager.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
2396
+ }
2397
+ /**
2398
+ * Create an invite link.
2399
+ *
2400
+ * @method ch
2401
+ * @param chatId The identifier of a chat to create the invite link for.
2402
+ * @returns The newly created invite link.
2403
+ */
2404
+ async createInviteLink(chatId, params) {
2405
+ return await this.#chatManager.createInviteLink(chatId, params);
2406
+ }
2407
+ /**
2408
+ * Approve a join request.
2409
+ *
2410
+ * @method ch
2411
+ * @param chatId The identifier of a chat with the join request.
2412
+ * @param userId The user who made the join request.
2413
+ */
2414
+ async approveJoinRequest(chatId, userId) {
2415
+ await this.#chatManager.approveJoinRequest(chatId, userId);
2416
+ }
2417
+ /**
2418
+ * Decline a join request.
2419
+ *
2420
+ * @method ch
2421
+ * @param chatId The identifier of a chat with the join request.
2422
+ * @param userId The user who made the join request.
2423
+ */
2424
+ async declineJoinRequest(chatId, userId) {
2425
+ await this.#chatManager.declineJoinRequest(chatId, userId);
2426
+ }
2427
+ /**
2428
+ * Approve all join requests. User-only.
2429
+ *
2430
+ * @method ch
2431
+ * @param chatId The identifier of a chat with the join requests.
2432
+ */
2433
+ async approveJoinRequests(chatId, params) {
2434
+ await this.#chatManager.approveJoinRequests(chatId, params);
2435
+ }
2436
+ /**
2437
+ * Decline all join requests. User-only.
2438
+ *
2439
+ * @method ch
2440
+ * @param chatId The identifier of a chat with the join requests.
2441
+ */
2442
+ async declineJoinRequests(chatId, params) {
2443
+ await this.#chatManager.declineJoinRequests(chatId, params);
2444
+ }
2445
+ /**
2446
+ * Get pending join requests in a chat. User-only.
2447
+ *
2448
+ * @method ch
2449
+ * @param chatId The identifier of a chat with the join requests.
2450
+ */
2451
+ async getJoinRequests(chatId, params) {
2452
+ return await this.#chatManager.getJoinRequests(chatId, params);
2453
+ }
2454
+ /**
2455
+ * Add a single user to a chat.
2456
+ *
2457
+ * @method ch
2458
+ * @param chatId The identifier of a chat to add the user to.
2459
+ * @param userId The identifier of the user to add to the chat.
2460
+ * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
2461
+ */
2462
+ async addChatMember(chatId, userId, params) {
2463
+ return await this.#chatManager.addChatMember(chatId, userId, params);
2464
+ }
2465
+ /**
2466
+ * Add multiple users at once to a channel or a supergroup.
2467
+ *
2468
+ * @method ch
2469
+ * @param chatId The identifier of the channel or supergroup to add the users to.
2470
+ * @param userId The identifiers of the users to add to the channel or supergroup.
2471
+ * @returns An array of FailedInvitation that has at most a length that is the same as that of the parameter userIds. If empty, it means that all the provided users were added.
2472
+ */
2473
+ async addChatMembers(chatId, userIds) {
2474
+ return await this.#chatManager.addChatMembers(chatId, userIds);
2475
+ }
2476
+ /**
2477
+ * Open a chat.
2478
+ *
2479
+ * @method ch
2480
+ * @param chatId The identifier of a chat to open.
2481
+ */
2482
+ async openChat(chatId, params) {
2483
+ await this.#updateManager.openChat(chatId, params);
2484
+ }
2485
+ /**
2486
+ * Close a chat previously opened by openChat.
2487
+ *
2488
+ * @method ch
2489
+ * @param chatId The identifier of a chat to close.
2490
+ */
2491
+ async closeChat(chatId) {
2492
+ await this.#updateManager.closeChat(chatId);
2493
+ }
2494
+ /**
2495
+ * Create a group. User-only.
2496
+ *
2497
+ * @method ch
2498
+ * @param title The title of the group.
2499
+ * @returns The created group.
2500
+ */
2501
+ async createGroup(title, params) {
2502
+ return await this.#chatListManager.createGroup(title, params);
2503
+ }
2504
+ /**
2505
+ * Create a supergroup. User-only.
2506
+ *
2507
+ * @method ch
2508
+ * @param title The title of the supergroup.
2509
+ * @returns The created supergroup.
2510
+ */
2511
+ async createSupergroup(title, params) {
2512
+ return await this.#chatListManager.createSupergroup(title, params);
2513
+ }
2514
+ /**
2515
+ * Create a channel. User-only.
2516
+ *
2517
+ * @method ch
2518
+ * @param title The title of the channel.
2519
+ * @returns The created channel.
2520
+ */
2521
+ async createChannel(title, params) {
2522
+ return await this.#chatListManager.createChannel(title, params);
2523
+ }
2524
+ /**
2525
+ * Set the time to live of the messages of a chat. User-only.
2526
+ *
2527
+ * @method ch
2528
+ * @param chatId The identifier of a chat.
2529
+ * @param messageTtl The time to live of the messages in seconds.
2530
+ */
2531
+ async setMessageTtl(chatId, messageTtl) {
2532
+ await this.#chatListManager.setMessageTtl(chatId, messageTtl);
2533
+ }
2534
+ /**
2535
+ * Archive multiple chats. User-only.
2536
+ *
2537
+ * @method ch
2538
+ * @param chatIds The identifiers of the chats to archive.
2539
+ */
2540
+ async archiveChats(chatIds) {
2541
+ await this.#chatListManager.archiveChats(chatIds);
2542
+ }
2543
+ /**
2544
+ * Archive a single chat. User-only.
2545
+ *
2546
+ * @method ch
2547
+ * @param chatId The identifier of a chat.
2548
+ */
2549
+ async archiveChat(chatId) {
2550
+ await this.#chatListManager.archiveChat(chatId);
2551
+ }
2552
+ /**
2553
+ * Unarchive multiple chats. User-only.
2554
+ *
2555
+ * @method ch
2556
+ * @param chatIds The identifiers of the chats to unarchive.
2557
+ */
2558
+ async unarchiveChats(chatIds) {
2559
+ await this.#chatListManager.unarchiveChats(chatIds);
2560
+ }
2561
+ /**
2562
+ * Unarchive a single chat. User-only.
2563
+ *
2564
+ * @method ch
2565
+ * @param chatId The identifier of a chat.
2566
+ */
2567
+ async unarchiveChat(chatId) {
2568
+ await this.#chatListManager.unarchiveChat(chatId);
2569
+ }
2570
+ /**
2571
+ * Get common chats between a user and the current one. User-only.
2572
+ *
2573
+ * @method ch
2574
+ * @param userId The identifier of the user to get the common chats with them.
2575
+ */
2576
+ async getCommonChats(userId, params) {
2577
+ return await this.#chatListManager.getCommonChats(userId, params);
2578
+ }
2579
+ /**
2580
+ * Get the settings of a chat. User-only.
2581
+ *
2582
+ * @method ch
2583
+ * @param chatId The identifier of a chat.
2584
+ */
2585
+ async getChatSettings(chatId) {
2586
+ return await this.#chatListManager.getChatSettings(chatId);
2587
+ }
2588
+ /**
2589
+ * Disable business bots in a private chat. User-only.
2590
+ *
2591
+ * @method ch
2592
+ * @param chatId The identifier of the private chat to disable business bots in.
2593
+ */
2594
+ async disableBusinessBots(chatId) {
2595
+ await this.#chatListManager.disableBusinessBots(chatId);
2596
+ }
2597
+ /**
2598
+ * Enable business bots in a private chat. User-only.
2599
+ *
2600
+ * @method ch
2601
+ * @param chatId The identifier of the private chat to enable business bots in.
2602
+ */
2603
+ async enableBusinessBots(chatId) {
2604
+ await this.#chatListManager.enableBusinessBots(chatId);
2605
+ }
2606
+ /**
2607
+ * Disable slow mode in a group. User-only.
2608
+ *
2609
+ * @method ch
2610
+ * @param chatId The identifier of the group to disable slow mode in.
2611
+ */
2612
+ async disableSlowMode(chatId) {
2613
+ await this.#chatManager.disableSlowMode(chatId);
2614
+ }
2615
+ /**
2616
+ * Change slow mode in a group. User-only.
2617
+ *
2618
+ * @method ch
2619
+ * @param chatId The identifier of the group to change slow mode in.
2620
+ * @param duration New slow mode duration.
2621
+ */
2622
+ async setSlowMode(chatId, duration) {
2623
+ await this.#chatManager.setSlowMode(chatId, duration);
2624
+ }
2625
+ /**
2626
+ * Change the title of a chat.
2627
+ *
2628
+ * @method ch
2629
+ * @param chatId The identifier of a chat.
2630
+ * @param title The new title.
2631
+ */
2632
+ async setChatTitle(chatId, title) {
2633
+ await this.#chatManager.setChatTitle(chatId, title);
2634
+ }
2635
+ /**
2636
+ * Change the description of a chat.
2637
+ *
2638
+ * @method ch
2639
+ * @param chatId The identifier of a chat.
2640
+ * @param description The new description.
2641
+ */
2642
+ async setChatDescription(chatId, description) {
2643
+ await this.#chatManager.setChatDescription(chatId, description);
2644
+ }
2645
+ /**
2646
+ * Hide the member list of a group to non-admins. User-only.
2647
+ *
2648
+ * @method ch
2649
+ * @param chatId The identifier of the group.
2650
+ */
2651
+ async hideMemberList(chatId) {
2652
+ await this.#chatManager.hideMemberList(chatId);
2653
+ }
2654
+ /**
2655
+ * Show the member list of a group to non-admins. User-only.
2656
+ *
2657
+ * @method ch
2658
+ * @param chatId The identifier of the group.
2659
+ */
2660
+ async showMemberList(chatId) {
2661
+ await this.#chatManager.showMemberList(chatId);
2662
+ }
2663
+ /**
2664
+ * Enable topics in a group. User-only.
2665
+ *
2666
+ * @method ch
2667
+ * @param chatId The identifier of the group.
2668
+ * @param isShownAsTabs Whether topics should be displayed as tabs.
2669
+ */
2670
+ async enableTopics(chatId, isShownAsTabs) {
2671
+ await this.#chatManager.enableTopics(chatId, isShownAsTabs);
2672
+ }
2673
+ /**
2674
+ * Disable topics in a group. User-only.
2675
+ *
2676
+ * @method ch
2677
+ * @param chatId The identifier of the group.
2678
+ */
2679
+ async disableTopics(chatId) {
2680
+ await this.#chatManager.disableTopics(chatId);
2681
+ }
2682
+ /**
2683
+ * Enable automatic anti-spam in a group. User-only.
2684
+ *
2685
+ * @method ch
2686
+ * @param chatId The identifier of the group.
2687
+ */
2688
+ async enableAntispam(chatId) {
2689
+ await this.#chatManager.enableAntispam(chatId);
2690
+ }
2691
+ /**
2692
+ * Disable automatic anti-spam in a group. User-only.
2693
+ *
2694
+ * @method ch
2695
+ * @param chatId The identifier of the group.
2696
+ */
2697
+ async disableAntispam(chatId) {
2698
+ await this.#chatManager.disableAntispam(chatId);
2699
+ }
2700
+ /**
2701
+ * Enable post signatures in a channel. User-only.
2702
+ *
2703
+ * @method ch
2704
+ * @param chatId The identifier of the channel.
2705
+ */
2706
+ async enableSignatures(chatId, params) {
2707
+ await this.#chatManager.enableSignatures(chatId, params);
2708
+ }
2709
+ /**
2710
+ * Disable post signatures in a channel. User-only.
2711
+ *
2712
+ * @method ch
2713
+ * @param chatId The identifier of the channel.
2714
+ */
2715
+ async disableSignatures(chatId) {
2716
+ await this.#chatManager.disableSignatures(chatId);
2717
+ }
2718
+ /**
2719
+ * Delete a chat. User-only.
2720
+ *
2721
+ * @method ch
2722
+ * @param chatId The identifier of a chat.
2723
+ */
2724
+ async deleteChat(chatId) {
2725
+ await this.#chatManager.deleteChat(chatId);
2726
+ }
2727
+ /**
2728
+ * Get discussion chat suggestions. User-only.
2729
+ *
2730
+ * @method ch
2731
+ */
2732
+ async getDiscussionChatSuggestions() {
2733
+ return await this.#chatManager.getDiscussionChatSuggestions();
2734
+ }
2735
+ /**
2736
+ * Set a channel's discussion chat. User-only.
2737
+ *
2738
+ * @method ch
2739
+ * @param chatId The identifier of a channel.
2740
+ * @param discussionChatId The identifier of a chat to use as discussion for the channel.
2741
+ */
2742
+ async setDiscussionChat(chatId, discussionChatId) {
2743
+ await this.#chatManager.setDiscussionChat(chatId, discussionChatId);
2744
+ }
2745
+ /**
2746
+ * Transfer the ownership of a chat. User-only.
2747
+ *
2748
+ * @method ch
2749
+ * @param chatId The identifier of a chat.
2750
+ * @param userId The identifier of the new owner.
2751
+ * @param password The password of the current account.
2752
+ */
2753
+ async transferChatOwnership(chatId, userId, password) {
2754
+ await this.#chatManager.transferChatOwnership(chatId, userId, password);
2755
+ }
2756
+ /**
2757
+ * Create a forum topic.
2758
+ *
2759
+ * @method ch
2760
+ * @param chatId The identifier of a chat.
2761
+ * @param title The title of the topic.
2762
+ * @returns The created topic.
2763
+ */
2764
+ async createTopic(chatId, title, params) {
2765
+ return await this.#forumManager.createTopic(chatId, title, params);
2766
+ }
2767
+ /**
2768
+ * Edit a forum topic.
2769
+ *
2770
+ * @method ch
2771
+ * @param chatId The identifier of a chat.
2772
+ * @param topicId The identifier of the topic.
2773
+ * @param title The new title of the topic.
2774
+ * @returns The new topic.
2775
+ */
2776
+ async editTopic(chatId, topicId, title, params) {
2777
+ return await this.#forumManager.editTopic(chatId, topicId, title, params);
2778
+ }
2779
+ /**
2780
+ * Hide the general forum topic.
2781
+ *
2782
+ * @method ch
2783
+ * @param chatId The identifier of a chat.
2784
+ */
2785
+ async hideGeneralTopic(chatId) {
2786
+ await this.#forumManager.hideGeneralTopic(chatId);
2787
+ }
2788
+ /**
2789
+ * Show the general forum topic.
2790
+ *
2791
+ * @method ch
2792
+ * @param chatId The identifier of a chat.
2793
+ */
2794
+ async showGeneralTopic(chatId) {
2795
+ await this.#forumManager.showGeneralTopic(chatId);
2796
+ }
2797
+ /**
2798
+ * Close a forum topic.
2799
+ *
2800
+ * @method ch
2801
+ * @param chatId The identifier of a chat.
2802
+ * @param topicId The identifier of the topic.
2803
+ */
2804
+ async closeTopic(chatId, topicId) {
2805
+ await this.#forumManager.closeTopic(chatId, topicId);
2806
+ }
2807
+ /**
2808
+ * Reopen a forum topic.
2809
+ *
2810
+ * @method ch
2811
+ * @param chatId The identifier of a chat.
2812
+ * @param topicId The identifier of the topic.
2813
+ */
2814
+ async reopenTopic(chatId, topicId) {
2815
+ await this.#forumManager.reopenTopic(chatId, topicId);
2816
+ }
2817
+ /**
2818
+ * Pin a forum topic.
2819
+ *
2820
+ * @method ch
2821
+ * @param chatId The identifier of a chat.
2822
+ * @param topicId The identifier of the topic.
2823
+ */
2824
+ async pinTopic(chatId, topicId) {
2825
+ await this.#forumManager.pinTopic(chatId, topicId);
2826
+ }
2827
+ /**
2828
+ * Unpin a forum topic.
2829
+ *
2830
+ * @method ch
2831
+ * @param chatId The identifier of a chat.
2832
+ * @param topicId The identifier of the topic.
2833
+ */
2834
+ async unpinTopic(chatId, topicId) {
2835
+ await this.#forumManager.unpinTopic(chatId, topicId);
2836
+ }
2837
+ /**
2838
+ * Promote a chat member.
2839
+ *
2840
+ * @method ch
2841
+ * @param chatId The identifier of a chat.
2842
+ * @param userId The identifier of the user to promote.
2843
+ */
2844
+ async promoteChatMember(chatId, userId, params) {
2845
+ await this.#chatManager.promoteChatMember(chatId, userId, params);
2846
+ }
2847
+ /**
2848
+ * Change the tag of a chat member.
2849
+ *
2850
+ * @method ch
2851
+ * @param chatId The identifier of a chat.
2852
+ * @param userId The identifier of the user that is a member of the chat.
2853
+ */
2854
+ async setChatMemberTag(chatId, userId, params) {
2855
+ await this.#chatManager.setChatMemberTag(chatId, userId, params);
2856
+ }
2857
+ /**
2858
+ * Enable sharing in a chat. User-only.
2859
+ *
2860
+ * @method ch
2861
+ * @param chatId The identifier of a chat.
2862
+ */
2863
+ async enableSharing(chatId) {
2864
+ await this.#chatManager.enableSharing(chatId);
2865
+ }
2866
+ /**
2867
+ * Disable sharing in a chat. User-only.
2868
+ *
2869
+ * @method ch
2870
+ * @param chatId The identifier of a chat.
2871
+ */
2872
+ async disableSharing(chatId) {
2873
+ await this.#chatManager.disableSharing(chatId);
2874
+ }
2875
+ /**
2876
+ * Get recommended channels. User-only.
2877
+ *
2878
+ * @method ch
2879
+ * @returns A list of recommended channels.
2880
+ */
2881
+ async getRecommendedChannels() {
2882
+ return await this.#chatManager.getRecommendedChannels();
2883
+ }
2884
+ /**
2885
+ * Get similar channels. User-only.
2886
+ *
2887
+ * @method ch
2888
+ * @param chatId The identifier of a channel to get similar channels for.
2889
+ * @returns A list of similar channels.
2890
+ */
2891
+ async getSimilarChannels(chatId) {
2892
+ return await this.#chatManager.getSimilarChannels(chatId);
2893
+ }
2894
+ /**
2895
+ * Get similar bots. User-only.
2896
+ *
2897
+ * @method ch
2898
+ * @param chatId The identifier of a bot to get similar bots for.
2899
+ * @returns A list of similar bots.
2900
+ */
2901
+ async getSimilarBots(chatId) {
2902
+ return await this.#chatManager.getSimilarBots(chatId);
2903
+ }
2904
+ //
2905
+ // ========================= CALLBACK QUERIES ========================= //
2906
+ //
2907
+ /**
2908
+ * Send a callback query. User-only.
2909
+ *
2910
+ * @method cq
2911
+ * @param botId The identifier of the bot to send the callback query to.
2912
+ * @param messageId The identifier of the message that includes at a button responsible for the callback query question.
2913
+ * @param question The callback query's question.
2914
+ * @returns The bot's answer to the callback query.
2915
+ * @cache
2916
+ */
2917
+ async sendCallbackQuery(botId, messageId, question) {
2918
+ return await this.#callbackQueryManager.sendCallbackQuery(botId, messageId, question);
2919
+ }
2920
+ /**
2921
+ * Answer a callback query. Bot-only.
2922
+ *
2923
+ * @method cq
2924
+ * @param id ID of the callback query to answer.
2925
+ */
2926
+ async answerCallbackQuery(id, params) {
2927
+ await this.#callbackQueryManager.answerCallbackQuery(id, params);
2928
+ }
2929
+ //
2930
+ // ========================= INLINE QUERIES ========================= //
2931
+ //
2932
+ /**
2933
+ * Send an inline query. User-only.
2934
+ *
2935
+ * @method iq
2936
+ * @param botId The identifier of a bot to send the inline query to.
2937
+ * @param chatId The identifier of the chat from which the inline query is sent.
2938
+ * @returns The bot's answer to the inline query.
2939
+ * @cache
2940
+ */
2941
+ async sendInlineQuery(botId, chatId, params) {
2942
+ return await this.#inlineQueryManager.sendInlineQuery(botId, chatId, params);
2943
+ }
2944
+ /**
2945
+ * Answer an inline query. Bot-only.
2946
+ *
2947
+ * @method iq
2948
+ * @param id The identifier of the inline query to answer.
2949
+ * @param results The results to answer with.
2950
+ */
2951
+ async answerInlineQuery(id, results, params) {
2952
+ await this.#inlineQueryManager.answerInlineQuery(id, results, params);
2953
+ }
2954
+ //
2955
+ // ========================= BOTS ========================= //
2956
+ //
2957
+ /**
2958
+ * Set the bot's description in the given language. Bot-only.
2959
+ *
2960
+ * @method bs
2961
+ */
2962
+ async setMyDescription(params) {
2963
+ await this.#botInfoManager.setMyDescription(params);
2964
+ }
2965
+ /**
2966
+ * Set the bot's name in the given language. Bot-only.
2967
+ *
2968
+ * @method bs
2969
+ */
2970
+ async setMyName(params) {
2971
+ await this.#botInfoManager.setMyName(params);
2972
+ }
2973
+ /**
2974
+ * Set the bot's short description in the given language. Bot-only.
2975
+ *
2976
+ * @method bs
2977
+ */
2978
+ async setMyShortDescription(params) {
2979
+ await this.#botInfoManager.setMyShortDescription(params);
2980
+ }
2981
+ /**
2982
+ * Get the bot's description in the given language. Bot-only.
2983
+ *
2984
+ * @method bs
2985
+ * @returns The current bot's description in the specified language.
2986
+ */
2987
+ async getMyDescription(params) {
2988
+ return await this.#botInfoManager.getMyDescription(params);
2989
+ }
2990
+ /**
2991
+ * Get the bot's name in the given language. Bot-only.
2992
+ *
2993
+ * @method bs
2994
+ * @returns The current bot's name in the specified language.
2995
+ */
2996
+ async getMyName(params) {
2997
+ return await this.#botInfoManager.getMyName(params);
2998
+ }
2999
+ /**
3000
+ * Get the bot's short description in the given language. Bot-only.
3001
+ *
3002
+ * @method bs
3003
+ * @returns The current bot's short description in the specified language.
3004
+ */
3005
+ async getMyShortDescription(params) {
3006
+ return await this.#botInfoManager.getMyShortDescription(params);
3007
+ }
3008
+ /**
3009
+ * Set the bot's commands in the given scope and/or language. Bot-only.
3010
+ *
3011
+ * @method bs
3012
+ * @param commands The commands to set.
3013
+ */
3014
+ async setMyCommands(commands, params) {
3015
+ await this.#botInfoManager.setMyCommands(commands, params);
3016
+ }
3017
+ /**
3018
+ * Get the bot's commands in the given scope and/or language. Bot-only.
3019
+ *
3020
+ * @method bs
3021
+ * @returns The current bot's commands in the specified language.
3022
+ */
3023
+ async getMyCommands(params) {
3024
+ return await this.#botInfoManager.getMyCommands(params);
3025
+ }
3026
+ //
3027
+ // ========================= REACTIONS ========================= //
3028
+ //
3029
+ /**
3030
+ * Change reactions made to a message.
3031
+ *
3032
+ * @method re
3033
+ * @param chatId The identifier of the chat which the message belongs to.
3034
+ * @param messageId The identifier of the message to add the reaction to.
3035
+ * @param reactions The new reactions.
3036
+ */
3037
+ async setReactions(chatId, messageId, reactions, params) {
3038
+ await this.#messageManager.setReactions(chatId, messageId, reactions, params);
3039
+ }
3040
+ /**
3041
+ * Make a reaction to a message.
3042
+ *
3043
+ * @method re
3044
+ * @param chatId The identifier of the chat which the message belongs to.
3045
+ * @param messageId The identifier of the message to add the reaction to.
3046
+ * @param reaction The reaction to add.
3047
+ */
3048
+ async addReaction(chatId, messageId, reaction, params) {
3049
+ await this.#messageManager.addReaction(chatId, messageId, reaction, params);
3050
+ }
3051
+ /**
3052
+ * Undo a reaction made to a message.
3053
+ *
3054
+ * @method re
3055
+ * @param chatId The identifier of the chat which the message belongs to.
3056
+ * @param messageId The identifier of the message which the reaction was made to.
3057
+ * @param reaction The reaction to remove.
3058
+ */
3059
+ async removeReaction(chatId, messageId, reaction) {
3060
+ await this.#messageManager.removeReaction(chatId, messageId, reaction);
3061
+ }
3062
+ //
3063
+ // ========================= STORIES ========================= //
3064
+ //
3065
+ /**
3066
+ * Create a story. User-only.
3067
+ *
3068
+ * @method st
3069
+ * @param content The content of the story.
3070
+ * @returns The created story.
3071
+ */
3072
+ async createStory(chatId, content, params) {
3073
+ return await this.#storyManager.createStory(chatId, content, params);
3074
+ }
3075
+ /**
3076
+ * Retrieve multiple stories. User-only.
3077
+ *
3078
+ * @method st
3079
+ * @param chatId The identifier of a chat.
3080
+ * @param storyIds The identifiers of the stories to retrieve.
3081
+ * @returns The retrieved stories.
3082
+ */
3083
+ async getStories(chatId, storyIds) {
3084
+ if (!storyIds.length) {
3085
+ return [];
3086
+ }
3087
+ return await this.#storyManager.getStories(chatId, storyIds);
3088
+ }
3089
+ /**
3090
+ * Retrieve a single story. User-only.
3091
+ *
3092
+ * @method st
3093
+ * @param chatId The identifier of a chat.
3094
+ * @param storyId The identifier of the story to retrieve.
3095
+ * @returns The retrieved story.
3096
+ */
3097
+ async getStory(chatId, storyId) {
3098
+ return await this.#storyManager.getStory(chatId, storyId);
3099
+ }
3100
+ /**
3101
+ * Delete multiple stories. User-only.
3102
+ *
3103
+ * @method st
3104
+ * @param chatId The identifier of a chat.
3105
+ * @param storyIds The identifiers of the stories to delete.
3106
+ */
3107
+ async deleteStories(chatId, storyIds) {
3108
+ await this.#storyManager.deleteStories(chatId, storyIds);
3109
+ }
3110
+ /**
3111
+ * Delete a single story. User-only.
3112
+ *
3113
+ * @method st
3114
+ * @param chatId The identifier of a chat.
3115
+ * @param storyId The identifier of the story to delete.
3116
+ */
3117
+ async deleteStory(chatId, storyId) {
3118
+ await this.#storyManager.deleteStory(chatId, storyId);
3119
+ }
3120
+ /**
3121
+ * Add multiple stories to highlights. User-only.
3122
+ *
3123
+ * @method st
3124
+ * @param chatId The identifier of a chat.
3125
+ * @param storyIds The identifiers of the stories to add to highlights.
3126
+ */
3127
+ async addStoriesToHighlights(chatId, storyIds) {
3128
+ await this.#storyManager.addStoriesToHighlights(chatId, storyIds);
3129
+ }
3130
+ /**
3131
+ * Add a single story to highlights. User-only.
3132
+ *
3133
+ * @method st
3134
+ * @param chatId The identifier of a chat.
3135
+ * @param storyId The identifier of the story to add to highlights.
3136
+ */
3137
+ async addStoryToHighlights(chatId, storyId) {
3138
+ await this.#storyManager.addStoryToHighlights(chatId, storyId);
3139
+ }
3140
+ /**
3141
+ * Remove multiple stories from highlights. User-only.
3142
+ *
3143
+ * @method st
3144
+ * @param chatId The identifier of a chat.
3145
+ * @param storyIds The identifiers of the stories to remove from highlights.
3146
+ */
3147
+ async removeStoriesFromHighlights(chatId, storyIds) {
3148
+ await this.#storyManager.removeStoriesFromHighlights(chatId, storyIds);
3149
+ }
3150
+ /**
3151
+ * Remove a single story from highlights. User-only.
3152
+ *
3153
+ * @method st
3154
+ * @param chatId The identifier of a chat.
3155
+ * @param storyId The identifier of the story to remove from highlights.
3156
+ */
3157
+ async removeStoryFromHighlights(chatId, storyId) {
3158
+ await this.#storyManager.removeStoryFromHighlights(chatId, storyId);
3159
+ }
3160
+ //
3161
+ // ========================= MISC ========================= //
3162
+ //
3163
+ /**
3164
+ * Get network statistics. This might not always be available.
3165
+ *
3166
+ * @method mc
3167
+ */
3168
+ async getNetworkStatistics() {
3169
+ return await this.#networkStatisticsManager.getNetworkStatistics();
3170
+ }
3171
+ /**
3172
+ * Block a user. User-only.
3173
+ *
3174
+ * @method mc
3175
+ * @param userId The identifier of the user to block.
3176
+ */
3177
+ async blockUser(userId) {
3178
+ await this.#messageManager.blockUser(userId);
3179
+ }
3180
+ /**
3181
+ * Unblock a user. User-only.
3182
+ *
3183
+ * @method mc
3184
+ * @param userId The identifier of the user to unblock.
3185
+ */
3186
+ async unblockUser(userId) {
3187
+ await this.#messageManager.unblockUser(userId);
3188
+ }
3189
+ //
3190
+ // ========================= VIDEO CHATS ========================= //
3191
+ //
3192
+ /**
3193
+ * Start a video chat. User-only.
3194
+ *
3195
+ * @method vc
3196
+ * @param chatId The identifier of a chat to start the video chat in.
3197
+ * @returns The started video chat.
3198
+ */
3199
+ async startVideoChat(chatId, params) {
3200
+ return await this.#videoChatManager.startVideoChat(chatId, params);
3201
+ }
3202
+ /**
3203
+ * Schedule a video chat. User-only.
3204
+ *
3205
+ * @method vc
3206
+ * @param chatId The identifier of a chat to schedule the video chat in.
3207
+ * @param startAt A point in time within the future in which the video chat will be started.
3208
+ * @returns The scheduled video chat.
3209
+ */
3210
+ async scheduleVideoChat(chatId, startAt, params) {
3211
+ return await this.#videoChatManager.scheduleVideoChat(chatId, startAt, params);
3212
+ }
3213
+ /**
3214
+ * Join a video chat. User-only.
3215
+ *
3216
+ * @method vc
3217
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3218
+ * @param params_ WebRTC connection parameters.
3219
+ * @returns Parameters to be passed to the used WebRTC library.
3220
+ */
3221
+ async joinVideoChat(id, params_, params) {
3222
+ return await this.#videoChatManager.joinVideoChat(id, params_, params);
3223
+ }
3224
+ /**
3225
+ * Leave a video chat. User-only.
3226
+ *
3227
+ * @method vc
3228
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3229
+ */
3230
+ async leaveVideoChat(id) {
3231
+ await this.#videoChatManager.leaveVideoChat(id);
3232
+ }
3233
+ /**
3234
+ * Join a live stream. User-only.
3235
+ *
3236
+ * @method vc
3237
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3238
+ */
3239
+ async joinLiveStream(id) {
3240
+ await this.#videoChatManager.joinLiveStream(id);
3241
+ }
3242
+ /**
3243
+ * Get a video chat. User-only.
3244
+ *
3245
+ * @method vc
3246
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3247
+ * @cache
3248
+ */
3249
+ async getVideoChat(id) {
3250
+ return await this.#videoChatManager.getVideoChat(id);
3251
+ }
3252
+ /**
3253
+ * Get live stream channels. User-only.
3254
+ *
3255
+ * @method vc
3256
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3257
+ */
3258
+ async getLiveStreamChannels(id) {
3259
+ return await this.#videoChatManager.getLiveStreamChannels(id);
3260
+ }
3261
+ /**
3262
+ * Download a live stream segment. User-only.
3263
+ *
3264
+ * @method vc
3265
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
3266
+ * @param channelId Stream channel ID.
3267
+ * @param scale Stream channel scale.
3268
+ * @param timestamp Millisecond timestamp of the chunk to download.
3269
+ */
3270
+ async downloadLiveStreamSegment(id, channelId, scale, timestamp, params) {
3271
+ return await this.#videoChatManager.downloadLiveStreamSegment(id, channelId, scale, timestamp, params);
3272
+ }
3273
+ //
3274
+ // ========================= PAYMENTS ========================= //
3275
+ //
3276
+ /**
3277
+ * Answer a pre-checkout query. Bot-only.
3278
+ *
3279
+ * @method pa
3280
+ * @param preCheckoutQueryId The identifier of the pre-checkout query.
3281
+ * @param ok Whether the checkout is going to be processed.
3282
+ */
3283
+ async answerPreCheckoutQuery(preCheckoutQueryId, ok, params) {
3284
+ await this.#paymentManager.answerPreCheckoutQuery(preCheckoutQueryId, ok, params);
3285
+ }
3286
+ /**
3287
+ * Refund a star payment. Bot-only.
3288
+ *
3289
+ * @method pa
3290
+ * @param userId The identifier of the user that was charged.
3291
+ * @param telegramPaymentChargeId The identifier of the charge.
3292
+ */
3293
+ async refundStarPayment(userId, telegramPaymentChargeId) {
3294
+ await this.#paymentManager.refundStarPayment(userId, telegramPaymentChargeId);
3295
+ }
3296
+ //
3297
+ // ========================= CONTACTS ========================= //
3298
+ //
3299
+ /**
3300
+ * Get contacts. User-only.
3301
+ *
3302
+ * @method co
3303
+ */
3304
+ async getContacts() {
3305
+ return await this.#accountManager.getContacts();
3306
+ }
3307
+ /**
3308
+ * Delete multiple contacts. User-only.
3309
+ *
3310
+ * @method co
3311
+ * @param userIds The identifiers of contacts to delete.
3312
+ */
3313
+ async deleteContacts(userIds) {
3314
+ await this.#accountManager.deleteContacts(userIds);
3315
+ }
3316
+ /**
3317
+ * Delete a single contact. User-only.
3318
+ *
3319
+ * @method co
3320
+ * @param userId The identifier of the contact to delete.
3321
+ */
3322
+ async deleteContact(userId) {
3323
+ await this.#accountManager.deleteContact(userId);
3324
+ }
3325
+ /**
3326
+ * Add a contact. User-only.
3327
+ *
3328
+ * @method co
3329
+ * @param userId The identifier of the user to add as contact.
3330
+ */
3331
+ async addContact(userId, params) {
3332
+ await this.#accountManager.addContact(userId, params);
3333
+ }
3334
+ //
3335
+ // ========================= TRANSLATIONS ========================= //
3336
+ //
3337
+ /**
3338
+ * Get translations. User-only.
3339
+ *
3340
+ * @method ta
3341
+ * @cache
3342
+ */
3343
+ async getTranslations(params) {
3344
+ return await this.#translationsManager.getTranslations(params);
3345
+ }
3346
+ //
3347
+ // ========================= GIFTS ========================= //
3348
+ //
3349
+ /**
3350
+ * Get available gifts.
3351
+ *
3352
+ * @method gf
3353
+ */
3354
+ async getGifts() {
3355
+ return await this.#giftManager.getGifts();
3356
+ }
3357
+ /**
3358
+ * Get gifts claimed by a user or a channel. User-only.
3359
+ *
3360
+ * @method gf
3361
+ * @param chatId The identifier of a user or a channel to get gifts for.
3362
+ */
3363
+ async getClaimedGifts(chatId, params) {
3364
+ return await this.#giftManager.getClaimedGifts(chatId, params);
3365
+ }
3366
+ /**
3367
+ * Send a gift.
3368
+ *
3369
+ * @method gf
3370
+ * @param chatId The identifier of a user or a channel to send the gift to.
3371
+ * @param giftId The identifier of the gift to send.
3372
+ */
3373
+ async sendGift(chatId, giftId, params) {
3374
+ await this.#giftManager.sendGift(chatId, giftId, params);
3375
+ }
3376
+ /**
3377
+ * Sell a gift.
3378
+ *
3379
+ * @method gf
3380
+ * @param gift The gift to sell.
3381
+ */
3382
+ async sellGift(gift) {
3383
+ await this.#giftManager.sellGift(gift);
3384
+ }
3385
+ /**
3386
+ * Craft gifts.
3387
+ *
3388
+ * @method gf
3389
+ * @param gift The gifts to craft.
3390
+ */
3391
+ async craftGifts(gifts) {
3392
+ await this.#giftManager.craftGifts(gifts);
3393
+ }
3394
+ /**
3395
+ * Get a gift using its slug.
3396
+ *
3397
+ * @method gf
3398
+ * @param slug The slug of a gift.
3399
+ */
3400
+ async getGift(slug) {
3401
+ return await this.#giftManager.getGift(slug);
3402
+ }
3403
+ /**
3404
+ * Transfer a gift. User-only.
3405
+ *
3406
+ * @method gf
3407
+ * @param chatId The identifier of a chat to transfer the gift to.
3408
+ * @param gift The gift to transfer.
3409
+ */
3410
+ async transferGift(chatId, gift) {
3411
+ return await this.#giftManager.transferGift(chatId, gift);
3412
+ }
3413
+ }
3414
+ exports.Client = Client;