@mtkruto/browser 0.1.800 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (660) hide show
  1. package/esm/0_deps.d.ts +2 -0
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +2 -1
  4. package/esm/2_tl.d.ts +7 -8
  5. package/esm/2_tl.d.ts.map +1 -1
  6. package/esm/2_tl.js +7 -8
  7. package/esm/3_errors.d.ts +519 -515
  8. package/esm/3_errors.d.ts.map +1 -1
  9. package/esm/3_errors.js +527 -512
  10. package/esm/3_transport.d.ts +1 -0
  11. package/esm/3_transport.d.ts.map +1 -1
  12. package/esm/3_transport.js +1 -0
  13. package/esm/4_constants.d.ts +0 -19
  14. package/esm/4_constants.d.ts.map +1 -1
  15. package/esm/4_constants.js +2 -1
  16. package/esm/4_errors.d.ts +7 -7
  17. package/esm/4_errors.d.ts.map +1 -1
  18. package/esm/4_errors.js +5 -5
  19. package/esm/_dnt.shims.d.ts +1 -0
  20. package/esm/_dnt.shims.d.ts.map +1 -1
  21. package/esm/client/0_client_abstract.d.ts +1 -21
  22. package/esm/client/0_client_abstract.d.ts.map +1 -1
  23. package/esm/client/0_client_abstract.js +17 -15
  24. package/esm/client/0_message.d.ts +3 -3
  25. package/esm/client/0_message.d.ts.map +1 -1
  26. package/esm/client/0_message.js +4 -20
  27. package/esm/client/0_params.d.ts +1 -1
  28. package/esm/client/0_params.d.ts.map +1 -1
  29. package/esm/client/0_password.d.ts +2 -2
  30. package/esm/client/0_password.d.ts.map +1 -1
  31. package/esm/client/0_password.js +3 -8
  32. package/esm/client/0_storage_operations.d.ts +23 -23
  33. package/esm/client/0_storage_operations.d.ts.map +1 -1
  34. package/esm/client/0_storage_operations.js +13 -12
  35. package/esm/client/0_utilities.d.ts.map +1 -1
  36. package/esm/client/0_utilities.js +13 -10
  37. package/esm/client/1_client_encrypted.d.ts +3 -5
  38. package/esm/client/1_client_encrypted.d.ts.map +1 -1
  39. package/esm/client/1_client_encrypted.js +44 -28
  40. package/esm/client/1_client_plain.d.ts +2 -2
  41. package/esm/client/1_client_plain.d.ts.map +1 -1
  42. package/esm/client/1_client_plain.js +27 -19
  43. package/esm/client/1_types.d.ts +9 -22
  44. package/esm/client/1_types.d.ts.map +1 -1
  45. package/esm/client/2_account_manager.d.ts +2 -2
  46. package/esm/client/2_account_manager.js +16 -16
  47. package/esm/client/2_bot_info_manager.d.ts.map +1 -1
  48. package/esm/client/2_bot_info_manager.js +7 -6
  49. package/esm/client/2_business_connection_manager.d.ts +3 -3
  50. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  51. package/esm/client/2_business_connection_manager.js +6 -5
  52. package/esm/client/2_file_manager.d.ts +4 -23
  53. package/esm/client/2_file_manager.d.ts.map +1 -1
  54. package/esm/client/2_file_manager.js +40 -36
  55. package/esm/client/2_reaction_manager.d.ts +3 -3
  56. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  57. package/esm/client/2_reaction_manager.js +16 -10
  58. package/esm/client/2_update_manager.d.ts +11 -11
  59. package/esm/client/2_update_manager.d.ts.map +1 -1
  60. package/esm/client/2_update_manager.js +162 -160
  61. package/esm/client/3_message_manager.d.ts +8 -9
  62. package/esm/client/3_message_manager.d.ts.map +1 -1
  63. package/esm/client/3_message_manager.js +205 -474
  64. package/esm/client/3_video_chat_manager.d.ts +3 -3
  65. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  66. package/esm/client/3_video_chat_manager.js +26 -36
  67. package/esm/client/4_callback_query_manager.d.ts +3 -3
  68. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  69. package/esm/client/4_callback_query_manager.js +5 -16
  70. package/esm/client/4_chat_list_manager.d.ts +5 -4
  71. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  72. package/esm/client/4_chat_list_manager.js +56 -34
  73. package/esm/client/4_inline_query_manager.d.ts +3 -3
  74. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  75. package/esm/client/4_inline_query_manager.js +6 -15
  76. package/esm/client/4_story_manager.d.ts +3 -3
  77. package/esm/client/4_story_manager.d.ts.map +1 -1
  78. package/esm/client/4_story_manager.js +15 -32
  79. package/esm/client/5_client.d.ts +10 -12
  80. package/esm/client/5_client.d.ts.map +1 -1
  81. package/esm/client/5_client.js +60 -114
  82. package/esm/{tl/7_message.d.ts → connection/1_connection_tcp.d.ts} +14 -12
  83. package/esm/connection/1_connection_tcp.d.ts.map +1 -0
  84. package/esm/connection/1_connection_tcp.js +169 -0
  85. package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
  86. package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
  87. package/esm/deps/deno.land/std@0.224.0/io/_constants.js +4 -0
  88. package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
  89. package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
  90. package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.js +86 -0
  91. package/esm/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
  92. package/esm/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
  93. package/esm/deps/deno.land/std@0.224.0/io/types.js +3 -0
  94. package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
  95. package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
  96. package/esm/deps/deno.land/std@0.224.0/io/write_all.js +49 -0
  97. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
  98. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
  99. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +253 -0
  100. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
  101. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
  102. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +1 -0
  103. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
  104. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
  105. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +13 -0
  106. package/esm/mod.d.ts +0 -1
  107. package/esm/mod.d.ts.map +1 -1
  108. package/esm/mod.js +0 -1
  109. package/esm/tl/0_api.d.ts +14813 -0
  110. package/esm/tl/0_api.d.ts.map +1 -0
  111. package/esm/tl/0_api.js +23222 -0
  112. package/esm/tl/1_utilities.d.ts +32 -0
  113. package/esm/tl/1_utilities.d.ts.map +1 -0
  114. package/esm/tl/1_utilities.js +65 -0
  115. package/esm/tl/2_deserialize.d.ts +23 -0
  116. package/esm/tl/2_deserialize.d.ts.map +1 -0
  117. package/esm/tl/{3_deserialize.js → 2_deserialize.js} +16 -17
  118. package/esm/tl/2_serialize.d.ts +22 -0
  119. package/esm/tl/2_serialize.d.ts.map +1 -0
  120. package/esm/tl/2_serialize.js +160 -0
  121. package/esm/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
  122. package/esm/tl/3_tl_reader.d.ts.map +1 -0
  123. package/esm/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
  124. package/esm/tl/3_utilities.d.ts +5 -5
  125. package/esm/tl/3_utilities.d.ts.map +1 -1
  126. package/esm/tl/3_utilities.js +9 -10
  127. package/esm/tl/4_rpc_result.d.ts +27 -0
  128. package/esm/tl/4_rpc_result.d.ts.map +1 -0
  129. package/esm/tl/4_rpc_result.js +28 -0
  130. package/{script/tl/5_tl_writer.d.ts → esm/tl/4_tl_writer.d.ts} +2 -2
  131. package/esm/tl/4_tl_writer.d.ts.map +1 -0
  132. package/esm/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
  133. package/esm/tl/5_message.d.ts +39 -0
  134. package/esm/tl/5_message.d.ts.map +1 -0
  135. package/esm/tl/5_message.js +98 -0
  136. package/esm/transport/3_transport_provider_tcp.d.ts +14 -0
  137. package/esm/transport/3_transport_provider_tcp.d.ts.map +1 -0
  138. package/esm/transport/3_transport_provider_tcp.js +15 -0
  139. package/esm/types/0_birthday.d.ts +2 -2
  140. package/esm/types/0_birthday.d.ts.map +1 -1
  141. package/esm/types/0_callback_query_answer.d.ts +2 -2
  142. package/esm/types/0_callback_query_answer.d.ts.map +1 -1
  143. package/esm/types/0_chat_administrator_rights.d.ts +3 -3
  144. package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
  145. package/esm/types/0_chat_administrator_rights.js +1 -11
  146. package/esm/types/0_chat_member_rights.d.ts +3 -3
  147. package/esm/types/0_chat_member_rights.d.ts.map +1 -1
  148. package/esm/types/0_chat_member_rights.js +3 -3
  149. package/esm/types/0_chat_photo.d.ts +2 -2
  150. package/esm/types/0_chat_photo.d.ts.map +1 -1
  151. package/esm/types/0_chat_photo.js +2 -2
  152. package/esm/types/0_contact.d.ts +2 -2
  153. package/esm/types/0_contact.d.ts.map +1 -1
  154. package/esm/types/0_dice.d.ts +2 -2
  155. package/esm/types/0_dice.d.ts.map +1 -1
  156. package/esm/types/0_giveaway_parameters.d.ts +2 -2
  157. package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
  158. package/esm/types/0_giveaway_parameters.js +3 -3
  159. package/esm/types/0_link_preview.d.ts +2 -2
  160. package/esm/types/0_link_preview.d.ts.map +1 -1
  161. package/esm/types/0_live_stream_channel.d.ts +2 -2
  162. package/esm/types/0_live_stream_channel.d.ts.map +1 -1
  163. package/esm/types/0_location.d.ts +2 -2
  164. package/esm/types/0_location.d.ts.map +1 -1
  165. package/esm/types/0_location.js +5 -5
  166. package/esm/types/0_mask_position.d.ts +2 -2
  167. package/esm/types/0_mask_position.d.ts.map +1 -1
  168. package/esm/types/0_message_entity.d.ts +3 -3
  169. package/esm/types/0_message_entity.d.ts.map +1 -1
  170. package/esm/types/0_message_entity.js +42 -42
  171. package/esm/types/0_message_search_filter.d.ts +2 -2
  172. package/esm/types/0_message_search_filter.d.ts.map +1 -1
  173. package/esm/types/0_message_search_filter.js +14 -15
  174. package/esm/types/0_opening_hours.d.ts +2 -2
  175. package/esm/types/0_opening_hours.d.ts.map +1 -1
  176. package/esm/types/0_poll_option.d.ts +2 -2
  177. package/esm/types/0_poll_option.d.ts.map +1 -1
  178. package/esm/types/0_reaction.d.ts +3 -3
  179. package/esm/types/0_reaction.d.ts.map +1 -1
  180. package/esm/types/0_reaction.js +4 -4
  181. package/esm/types/0_restriction_reason.d.ts +2 -2
  182. package/esm/types/0_restriction_reason.d.ts.map +1 -1
  183. package/esm/types/0_thumbnail.d.ts +2 -2
  184. package/esm/types/0_thumbnail.d.ts.map +1 -1
  185. package/esm/types/0_thumbnail.js +3 -3
  186. package/esm/types/0_video_chat.d.ts +2 -2
  187. package/esm/types/0_video_chat.d.ts.map +1 -1
  188. package/esm/types/0_video_chat.js +2 -2
  189. package/esm/types/0_voice.d.ts +2 -2
  190. package/esm/types/0_voice.d.ts.map +1 -1
  191. package/esm/types/1_animation.d.ts +2 -2
  192. package/esm/types/1_animation.d.ts.map +1 -1
  193. package/esm/types/1_animation.js +2 -2
  194. package/esm/types/1_audio.d.ts +2 -2
  195. package/esm/types/1_audio.d.ts.map +1 -1
  196. package/esm/types/1_audio.js +2 -2
  197. package/esm/types/1_bot_command_scope.d.ts +9 -2
  198. package/esm/types/1_bot_command_scope.d.ts.map +1 -1
  199. package/esm/types/1_bot_command_scope.js +9 -9
  200. package/esm/types/1_chat_p.d.ts +5 -5
  201. package/esm/types/1_chat_p.d.ts.map +1 -1
  202. package/esm/types/1_chat_p.js +6 -6
  203. package/esm/types/1_document.d.ts +2 -2
  204. package/esm/types/1_document.d.ts.map +1 -1
  205. package/esm/types/1_document.js +2 -2
  206. package/esm/types/1_giveaway.d.ts +2 -2
  207. package/esm/types/1_giveaway.d.ts.map +1 -1
  208. package/esm/types/1_keyboard_button.d.ts +3 -3
  209. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  210. package/esm/types/1_keyboard_button.js +18 -45
  211. package/esm/types/1_message_reaction.d.ts +2 -2
  212. package/esm/types/1_message_reaction.d.ts.map +1 -1
  213. package/esm/types/1_message_reaction.js +5 -5
  214. package/esm/types/1_photo.d.ts +5 -5
  215. package/esm/types/1_photo.d.ts.map +1 -1
  216. package/esm/types/1_photo.js +4 -4
  217. package/esm/types/1_poll.d.ts +2 -2
  218. package/esm/types/1_poll.d.ts.map +1 -1
  219. package/esm/types/1_reaction_count.d.ts +2 -2
  220. package/esm/types/1_reaction_count.d.ts.map +1 -1
  221. package/esm/types/1_reply_quote.d.ts +2 -2
  222. package/esm/types/1_reply_quote.d.ts.map +1 -1
  223. package/esm/types/1_sticker.d.ts +3 -3
  224. package/esm/types/1_sticker.d.ts.map +1 -1
  225. package/esm/types/1_sticker.js +9 -9
  226. package/esm/types/1_story_privacy.d.ts +3 -3
  227. package/esm/types/1_story_privacy.d.ts.map +1 -1
  228. package/esm/types/1_story_privacy.js +14 -14
  229. package/esm/types/1_story_reaction.d.ts +2 -2
  230. package/esm/types/1_story_reaction.d.ts.map +1 -1
  231. package/esm/types/1_user.d.ts +2 -2
  232. package/esm/types/1_user.d.ts.map +1 -1
  233. package/esm/types/1_user.js +2 -2
  234. package/esm/types/1_venue.d.ts +2 -2
  235. package/esm/types/1_venue.d.ts.map +1 -1
  236. package/esm/types/1_venue.js +2 -2
  237. package/esm/types/1_video.d.ts +2 -2
  238. package/esm/types/1_video.d.ts.map +1 -1
  239. package/esm/types/1_video.js +2 -2
  240. package/esm/types/1_video_note.d.ts +2 -2
  241. package/esm/types/1_video_note.d.ts.map +1 -1
  242. package/esm/types/1_video_note.js +2 -2
  243. package/esm/types/2_business_connection.d.ts +2 -2
  244. package/esm/types/2_business_connection.d.ts.map +1 -1
  245. package/esm/types/2_business_connection.js +1 -2
  246. package/esm/types/2_chat.d.ts +2 -2
  247. package/esm/types/2_chat.d.ts.map +1 -1
  248. package/esm/types/2_chat.js +11 -11
  249. package/esm/types/2_chat_member.d.ts +2 -2
  250. package/esm/types/2_chat_member.d.ts.map +1 -1
  251. package/esm/types/2_chat_member.js +10 -10
  252. package/esm/types/2_chosen_inline_result.d.ts +2 -2
  253. package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
  254. package/esm/types/2_chosen_inline_result.js +5 -5
  255. package/esm/types/2_game.d.ts +2 -2
  256. package/esm/types/2_game.d.ts.map +1 -1
  257. package/esm/types/2_game.js +4 -4
  258. package/esm/types/2_inactive_chat.d.ts +2 -2
  259. package/esm/types/2_inactive_chat.d.ts.map +1 -1
  260. package/esm/types/2_inactive_chat.js +2 -2
  261. package/esm/types/2_inline_keyboard_button.d.ts +3 -3
  262. package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
  263. package/esm/types/2_inline_keyboard_button.js +15 -21
  264. package/esm/types/2_inline_query.d.ts +2 -2
  265. package/esm/types/2_inline_query.d.ts.map +1 -1
  266. package/esm/types/2_inline_query.js +8 -8
  267. package/esm/types/2_invite_link.d.ts +2 -2
  268. package/esm/types/2_invite_link.d.ts.map +1 -1
  269. package/esm/types/2_invite_link.js +1 -2
  270. package/esm/types/2_message_reaction_count.d.ts +2 -2
  271. package/esm/types/2_message_reaction_count.d.ts.map +1 -1
  272. package/esm/types/2_message_reactions.d.ts +2 -2
  273. package/esm/types/2_message_reactions.d.ts.map +1 -1
  274. package/esm/types/2_message_reactions.js +2 -2
  275. package/esm/types/2_story_content.d.ts +2 -2
  276. package/esm/types/2_story_content.d.ts.map +1 -1
  277. package/esm/types/2_story_content.js +6 -6
  278. package/esm/types/2_story_interactions.d.ts +2 -2
  279. package/esm/types/2_story_interactions.d.ts.map +1 -1
  280. package/esm/types/2_story_interactive_area.d.ts +3 -3
  281. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  282. package/esm/types/2_story_interactive_area.js +19 -29
  283. package/esm/types/3_chat_member_updated.d.ts +2 -2
  284. package/esm/types/3_chat_member_updated.d.ts.map +1 -1
  285. package/esm/types/3_chat_member_updated.js +7 -7
  286. package/esm/types/3_reply_markup.d.ts +3 -3
  287. package/esm/types/3_reply_markup.d.ts.map +1 -1
  288. package/esm/types/3_reply_markup.js +12 -22
  289. package/esm/types/3_story.d.ts +2 -2
  290. package/esm/types/3_story.d.ts.map +1 -1
  291. package/esm/types/4_inline_query_result.d.ts +3 -3
  292. package/esm/types/4_inline_query_result.d.ts.map +1 -1
  293. package/esm/types/4_inline_query_result.js +53 -161
  294. package/esm/types/4_message.d.ts +3 -3
  295. package/esm/types/4_message.d.ts.map +1 -1
  296. package/esm/types/4_message.js +68 -59
  297. package/esm/types/5_callback_query.d.ts +3 -3
  298. package/esm/types/5_callback_query.d.ts.map +1 -1
  299. package/esm/types/5_callback_query.js +5 -5
  300. package/esm/types/5_chat_list_item.d.ts +3 -3
  301. package/esm/types/5_chat_list_item.d.ts.map +1 -1
  302. package/esm/types/5_chat_list_item.js +2 -2
  303. package/esm/types/5_inline_query_answer.d.ts +2 -2
  304. package/esm/types/5_inline_query_answer.d.ts.map +1 -1
  305. package/esm/types/_file_id.d.ts +2 -2
  306. package/esm/types/_file_id.d.ts.map +1 -1
  307. package/esm/types/_file_id.js +4 -4
  308. package/esm/types/_getters.d.ts +7 -7
  309. package/esm/types/_getters.d.ts.map +1 -1
  310. package/package.json +4 -1
  311. package/script/0_deps.d.ts +2 -0
  312. package/script/0_deps.d.ts.map +1 -1
  313. package/script/0_deps.js +5 -2
  314. package/script/2_tl.d.ts +7 -8
  315. package/script/2_tl.d.ts.map +1 -1
  316. package/script/2_tl.js +20 -11
  317. package/script/3_errors.d.ts +519 -515
  318. package/script/3_errors.d.ts.map +1 -1
  319. package/script/3_errors.js +543 -514
  320. package/script/3_transport.d.ts +1 -0
  321. package/script/3_transport.d.ts.map +1 -1
  322. package/script/3_transport.js +1 -0
  323. package/script/4_constants.d.ts +0 -19
  324. package/script/4_constants.d.ts.map +1 -1
  325. package/script/4_constants.js +27 -3
  326. package/script/4_errors.d.ts +7 -7
  327. package/script/4_errors.d.ts.map +1 -1
  328. package/script/4_errors.js +6 -6
  329. package/script/_dnt.shims.d.ts +1 -0
  330. package/script/_dnt.shims.d.ts.map +1 -1
  331. package/script/client/0_client_abstract.d.ts +1 -21
  332. package/script/client/0_client_abstract.d.ts.map +1 -1
  333. package/script/client/0_client_abstract.js +41 -16
  334. package/script/client/0_message.d.ts +3 -3
  335. package/script/client/0_message.d.ts.map +1 -1
  336. package/script/client/0_message.js +3 -19
  337. package/script/client/0_params.d.ts +1 -1
  338. package/script/client/0_params.d.ts.map +1 -1
  339. package/script/client/0_password.d.ts +2 -2
  340. package/script/client/0_password.d.ts.map +1 -1
  341. package/script/client/0_password.js +2 -7
  342. package/script/client/0_storage_operations.d.ts +23 -23
  343. package/script/client/0_storage_operations.d.ts.map +1 -1
  344. package/script/client/0_storage_operations.js +12 -11
  345. package/script/client/0_utilities.d.ts.map +1 -1
  346. package/script/client/0_utilities.js +12 -9
  347. package/script/client/1_client_encrypted.d.ts +3 -5
  348. package/script/client/1_client_encrypted.d.ts.map +1 -1
  349. package/script/client/1_client_encrypted.js +42 -26
  350. package/script/client/1_client_plain.d.ts +2 -2
  351. package/script/client/1_client_plain.d.ts.map +1 -1
  352. package/script/client/1_client_plain.js +25 -17
  353. package/script/client/1_types.d.ts +9 -22
  354. package/script/client/1_types.d.ts.map +1 -1
  355. package/script/client/2_account_manager.d.ts +2 -2
  356. package/script/client/2_account_manager.js +15 -15
  357. package/script/client/2_bot_info_manager.d.ts.map +1 -1
  358. package/script/client/2_bot_info_manager.js +7 -6
  359. package/script/client/2_business_connection_manager.d.ts +3 -3
  360. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  361. package/script/client/2_business_connection_manager.js +5 -4
  362. package/script/client/2_file_manager.d.ts +4 -23
  363. package/script/client/2_file_manager.d.ts.map +1 -1
  364. package/script/client/2_file_manager.js +64 -37
  365. package/script/client/2_reaction_manager.d.ts +3 -3
  366. package/script/client/2_reaction_manager.d.ts.map +1 -1
  367. package/script/client/2_reaction_manager.js +15 -9
  368. package/script/client/2_update_manager.d.ts +11 -11
  369. package/script/client/2_update_manager.d.ts.map +1 -1
  370. package/script/client/2_update_manager.js +161 -159
  371. package/script/client/3_message_manager.d.ts +8 -9
  372. package/script/client/3_message_manager.d.ts.map +1 -1
  373. package/script/client/3_message_manager.js +204 -473
  374. package/script/client/3_video_chat_manager.d.ts +3 -3
  375. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  376. package/script/client/3_video_chat_manager.js +25 -35
  377. package/script/client/4_callback_query_manager.d.ts +3 -3
  378. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  379. package/script/client/4_callback_query_manager.js +4 -15
  380. package/script/client/4_chat_list_manager.d.ts +5 -4
  381. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  382. package/script/client/4_chat_list_manager.js +54 -32
  383. package/script/client/4_inline_query_manager.d.ts +3 -3
  384. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  385. package/script/client/4_inline_query_manager.js +5 -14
  386. package/script/client/4_story_manager.d.ts +3 -3
  387. package/script/client/4_story_manager.d.ts.map +1 -1
  388. package/script/client/4_story_manager.js +14 -31
  389. package/script/client/5_client.d.ts +10 -12
  390. package/script/client/5_client.d.ts.map +1 -1
  391. package/script/client/5_client.js +59 -113
  392. package/{esm/tl/6_rpc_result.d.ts → script/connection/1_connection_tcp.d.ts} +14 -10
  393. package/script/connection/1_connection_tcp.d.ts.map +1 -0
  394. package/script/connection/1_connection_tcp.js +196 -0
  395. package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
  396. package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
  397. package/script/deps/deno.land/std@0.224.0/io/_constants.js +7 -0
  398. package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
  399. package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
  400. package/script/deps/deno.land/std@0.224.0/io/iterate_reader.js +91 -0
  401. package/script/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
  402. package/script/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
  403. package/script/deps/deno.land/std@0.224.0/io/types.js +4 -0
  404. package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
  405. package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
  406. package/script/deps/deno.land/std@0.224.0/io/write_all.js +54 -0
  407. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
  408. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
  409. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +280 -0
  410. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
  411. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
  412. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +5 -0
  413. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
  414. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
  415. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +40 -0
  416. package/script/mod.d.ts +0 -1
  417. package/script/mod.d.ts.map +1 -1
  418. package/script/mod.js +0 -1
  419. package/script/tl/0_api.d.ts +14813 -0
  420. package/script/tl/0_api.d.ts.map +1 -0
  421. package/script/tl/0_api.js +23248 -0
  422. package/script/tl/1_utilities.d.ts +32 -0
  423. package/script/tl/1_utilities.d.ts.map +1 -0
  424. package/script/tl/1_utilities.js +76 -0
  425. package/script/tl/2_deserialize.d.ts +23 -0
  426. package/script/tl/2_deserialize.d.ts.map +1 -0
  427. package/script/tl/{3_deserialize.js → 2_deserialize.js} +19 -20
  428. package/script/tl/2_serialize.d.ts +22 -0
  429. package/script/tl/2_serialize.d.ts.map +1 -0
  430. package/script/tl/2_serialize.js +164 -0
  431. package/script/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
  432. package/script/tl/3_tl_reader.d.ts.map +1 -0
  433. package/script/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
  434. package/script/tl/3_utilities.d.ts +5 -5
  435. package/script/tl/3_utilities.d.ts.map +1 -1
  436. package/script/tl/3_utilities.js +9 -10
  437. package/script/tl/4_rpc_result.d.ts +27 -0
  438. package/script/tl/4_rpc_result.d.ts.map +1 -0
  439. package/{esm/tl/8_message_container.d.ts → script/tl/4_rpc_result.js} +12 -12
  440. package/{esm/tl/5_tl_writer.d.ts → script/tl/4_tl_writer.d.ts} +2 -2
  441. package/script/tl/4_tl_writer.d.ts.map +1 -0
  442. package/script/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
  443. package/script/tl/5_message.d.ts +39 -0
  444. package/script/tl/5_message.d.ts.map +1 -0
  445. package/script/tl/5_message.js +106 -0
  446. package/script/transport/3_transport_provider_tcp.d.ts +14 -0
  447. package/script/transport/3_transport_provider_tcp.d.ts.map +1 -0
  448. package/script/transport/3_transport_provider_tcp.js +19 -0
  449. package/script/types/0_birthday.d.ts +2 -2
  450. package/script/types/0_birthday.d.ts.map +1 -1
  451. package/script/types/0_callback_query_answer.d.ts +2 -2
  452. package/script/types/0_callback_query_answer.d.ts.map +1 -1
  453. package/script/types/0_chat_administrator_rights.d.ts +3 -3
  454. package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
  455. package/script/types/0_chat_administrator_rights.js +1 -11
  456. package/script/types/0_chat_member_rights.d.ts +3 -3
  457. package/script/types/0_chat_member_rights.d.ts.map +1 -1
  458. package/script/types/0_chat_member_rights.js +3 -3
  459. package/script/types/0_chat_photo.d.ts +2 -2
  460. package/script/types/0_chat_photo.d.ts.map +1 -1
  461. package/script/types/0_chat_photo.js +1 -1
  462. package/script/types/0_contact.d.ts +2 -2
  463. package/script/types/0_contact.d.ts.map +1 -1
  464. package/script/types/0_dice.d.ts +2 -2
  465. package/script/types/0_dice.d.ts.map +1 -1
  466. package/script/types/0_giveaway_parameters.d.ts +2 -2
  467. package/script/types/0_giveaway_parameters.d.ts.map +1 -1
  468. package/script/types/0_giveaway_parameters.js +2 -2
  469. package/script/types/0_link_preview.d.ts +2 -2
  470. package/script/types/0_link_preview.d.ts.map +1 -1
  471. package/script/types/0_live_stream_channel.d.ts +2 -2
  472. package/script/types/0_live_stream_channel.d.ts.map +1 -1
  473. package/script/types/0_location.d.ts +2 -2
  474. package/script/types/0_location.d.ts.map +1 -1
  475. package/script/types/0_location.js +4 -4
  476. package/script/types/0_mask_position.d.ts +2 -2
  477. package/script/types/0_mask_position.d.ts.map +1 -1
  478. package/script/types/0_message_entity.d.ts +3 -3
  479. package/script/types/0_message_entity.d.ts.map +1 -1
  480. package/script/types/0_message_entity.js +41 -41
  481. package/script/types/0_message_search_filter.d.ts +2 -2
  482. package/script/types/0_message_search_filter.d.ts.map +1 -1
  483. package/script/types/0_message_search_filter.js +14 -15
  484. package/script/types/0_opening_hours.d.ts +2 -2
  485. package/script/types/0_opening_hours.d.ts.map +1 -1
  486. package/script/types/0_poll_option.d.ts +2 -2
  487. package/script/types/0_poll_option.d.ts.map +1 -1
  488. package/script/types/0_reaction.d.ts +3 -3
  489. package/script/types/0_reaction.d.ts.map +1 -1
  490. package/script/types/0_reaction.js +3 -3
  491. package/script/types/0_restriction_reason.d.ts +2 -2
  492. package/script/types/0_restriction_reason.d.ts.map +1 -1
  493. package/script/types/0_thumbnail.d.ts +2 -2
  494. package/script/types/0_thumbnail.d.ts.map +1 -1
  495. package/script/types/0_thumbnail.js +2 -2
  496. package/script/types/0_video_chat.d.ts +2 -2
  497. package/script/types/0_video_chat.d.ts.map +1 -1
  498. package/script/types/0_video_chat.js +1 -1
  499. package/script/types/0_voice.d.ts +2 -2
  500. package/script/types/0_voice.d.ts.map +1 -1
  501. package/script/types/1_animation.d.ts +2 -2
  502. package/script/types/1_animation.d.ts.map +1 -1
  503. package/script/types/1_animation.js +1 -1
  504. package/script/types/1_audio.d.ts +2 -2
  505. package/script/types/1_audio.d.ts.map +1 -1
  506. package/script/types/1_audio.js +1 -1
  507. package/script/types/1_bot_command_scope.d.ts +9 -2
  508. package/script/types/1_bot_command_scope.d.ts.map +1 -1
  509. package/script/types/1_bot_command_scope.js +8 -8
  510. package/script/types/1_chat_p.d.ts +5 -5
  511. package/script/types/1_chat_p.d.ts.map +1 -1
  512. package/script/types/1_chat_p.js +5 -5
  513. package/script/types/1_document.d.ts +2 -2
  514. package/script/types/1_document.d.ts.map +1 -1
  515. package/script/types/1_document.js +1 -1
  516. package/script/types/1_giveaway.d.ts +2 -2
  517. package/script/types/1_giveaway.d.ts.map +1 -1
  518. package/script/types/1_keyboard_button.d.ts +3 -3
  519. package/script/types/1_keyboard_button.d.ts.map +1 -1
  520. package/script/types/1_keyboard_button.js +17 -44
  521. package/script/types/1_message_reaction.d.ts +2 -2
  522. package/script/types/1_message_reaction.d.ts.map +1 -1
  523. package/script/types/1_message_reaction.js +4 -4
  524. package/script/types/1_photo.d.ts +5 -5
  525. package/script/types/1_photo.d.ts.map +1 -1
  526. package/script/types/1_photo.js +3 -3
  527. package/script/types/1_poll.d.ts +2 -2
  528. package/script/types/1_poll.d.ts.map +1 -1
  529. package/script/types/1_reaction_count.d.ts +2 -2
  530. package/script/types/1_reaction_count.d.ts.map +1 -1
  531. package/script/types/1_reply_quote.d.ts +2 -2
  532. package/script/types/1_reply_quote.d.ts.map +1 -1
  533. package/script/types/1_sticker.d.ts +3 -3
  534. package/script/types/1_sticker.d.ts.map +1 -1
  535. package/script/types/1_sticker.js +8 -8
  536. package/script/types/1_story_privacy.d.ts +3 -3
  537. package/script/types/1_story_privacy.d.ts.map +1 -1
  538. package/script/types/1_story_privacy.js +13 -13
  539. package/script/types/1_story_reaction.d.ts +2 -2
  540. package/script/types/1_story_reaction.d.ts.map +1 -1
  541. package/script/types/1_user.d.ts +2 -2
  542. package/script/types/1_user.d.ts.map +1 -1
  543. package/script/types/1_user.js +1 -1
  544. package/script/types/1_venue.d.ts +2 -2
  545. package/script/types/1_venue.d.ts.map +1 -1
  546. package/script/types/1_venue.js +1 -1
  547. package/script/types/1_video.d.ts +2 -2
  548. package/script/types/1_video.d.ts.map +1 -1
  549. package/script/types/1_video.js +1 -1
  550. package/script/types/1_video_note.d.ts +2 -2
  551. package/script/types/1_video_note.d.ts.map +1 -1
  552. package/script/types/1_video_note.js +1 -1
  553. package/script/types/2_business_connection.d.ts +2 -2
  554. package/script/types/2_business_connection.d.ts.map +1 -1
  555. package/script/types/2_business_connection.js +1 -2
  556. package/script/types/2_chat.d.ts +2 -2
  557. package/script/types/2_chat.d.ts.map +1 -1
  558. package/script/types/2_chat.js +10 -10
  559. package/script/types/2_chat_member.d.ts +2 -2
  560. package/script/types/2_chat_member.d.ts.map +1 -1
  561. package/script/types/2_chat_member.js +9 -9
  562. package/script/types/2_chosen_inline_result.d.ts +2 -2
  563. package/script/types/2_chosen_inline_result.d.ts.map +1 -1
  564. package/script/types/2_chosen_inline_result.js +4 -4
  565. package/script/types/2_game.d.ts +2 -2
  566. package/script/types/2_game.d.ts.map +1 -1
  567. package/script/types/2_game.js +3 -3
  568. package/script/types/2_inactive_chat.d.ts +2 -2
  569. package/script/types/2_inactive_chat.d.ts.map +1 -1
  570. package/script/types/2_inactive_chat.js +1 -1
  571. package/script/types/2_inline_keyboard_button.d.ts +3 -3
  572. package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
  573. package/script/types/2_inline_keyboard_button.js +14 -20
  574. package/script/types/2_inline_query.d.ts +2 -2
  575. package/script/types/2_inline_query.d.ts.map +1 -1
  576. package/script/types/2_inline_query.js +7 -7
  577. package/script/types/2_invite_link.d.ts +2 -2
  578. package/script/types/2_invite_link.d.ts.map +1 -1
  579. package/script/types/2_invite_link.js +1 -2
  580. package/script/types/2_message_reaction_count.d.ts +2 -2
  581. package/script/types/2_message_reaction_count.d.ts.map +1 -1
  582. package/script/types/2_message_reactions.d.ts +2 -2
  583. package/script/types/2_message_reactions.d.ts.map +1 -1
  584. package/script/types/2_message_reactions.js +1 -1
  585. package/script/types/2_story_content.d.ts +2 -2
  586. package/script/types/2_story_content.d.ts.map +1 -1
  587. package/script/types/2_story_content.js +5 -5
  588. package/script/types/2_story_interactions.d.ts +2 -2
  589. package/script/types/2_story_interactions.d.ts.map +1 -1
  590. package/script/types/2_story_interactive_area.d.ts +3 -3
  591. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  592. package/script/types/2_story_interactive_area.js +18 -28
  593. package/script/types/3_chat_member_updated.d.ts +2 -2
  594. package/script/types/3_chat_member_updated.d.ts.map +1 -1
  595. package/script/types/3_chat_member_updated.js +6 -6
  596. package/script/types/3_reply_markup.d.ts +3 -3
  597. package/script/types/3_reply_markup.d.ts.map +1 -1
  598. package/script/types/3_reply_markup.js +11 -21
  599. package/script/types/3_story.d.ts +2 -2
  600. package/script/types/3_story.d.ts.map +1 -1
  601. package/script/types/4_inline_query_result.d.ts +3 -3
  602. package/script/types/4_inline_query_result.d.ts.map +1 -1
  603. package/script/types/4_inline_query_result.js +52 -160
  604. package/script/types/4_message.d.ts +3 -3
  605. package/script/types/4_message.d.ts.map +1 -1
  606. package/script/types/4_message.js +67 -58
  607. package/script/types/5_callback_query.d.ts +3 -3
  608. package/script/types/5_callback_query.d.ts.map +1 -1
  609. package/script/types/5_callback_query.js +4 -4
  610. package/script/types/5_chat_list_item.d.ts +3 -3
  611. package/script/types/5_chat_list_item.d.ts.map +1 -1
  612. package/script/types/5_chat_list_item.js +1 -1
  613. package/script/types/5_inline_query_answer.d.ts +2 -2
  614. package/script/types/5_inline_query_answer.d.ts.map +1 -1
  615. package/script/types/_file_id.d.ts +2 -2
  616. package/script/types/_file_id.d.ts.map +1 -1
  617. package/script/types/_file_id.js +3 -3
  618. package/script/types/_getters.d.ts +7 -7
  619. package/script/types/_getters.d.ts.map +1 -1
  620. package/esm/tl/1_tl_object.d.ts +0 -64
  621. package/esm/tl/1_tl_object.d.ts.map +0 -1
  622. package/esm/tl/1_tl_object.js +0 -221
  623. package/esm/tl/2_types.d.ts +0 -28060
  624. package/esm/tl/2_types.d.ts.map +0 -1
  625. package/esm/tl/2_types.js +0 -68685
  626. package/esm/tl/3_deserialize.d.ts +0 -23
  627. package/esm/tl/3_deserialize.d.ts.map +0 -1
  628. package/esm/tl/3_functions.d.ts +0 -14094
  629. package/esm/tl/3_functions.d.ts.map +0 -1
  630. package/esm/tl/3_functions.js +0 -28475
  631. package/esm/tl/4_tl_reader.d.ts.map +0 -1
  632. package/esm/tl/5_tl_writer.d.ts.map +0 -1
  633. package/esm/tl/6_rpc_result.d.ts.map +0 -1
  634. package/esm/tl/6_rpc_result.js +0 -49
  635. package/esm/tl/7_message.d.ts.map +0 -1
  636. package/esm/tl/7_message.js +0 -90
  637. package/esm/tl/8_message_container.d.ts.map +0 -1
  638. package/esm/tl/8_message_container.js +0 -72
  639. package/script/tl/1_tl_object.d.ts +0 -64
  640. package/script/tl/1_tl_object.d.ts.map +0 -1
  641. package/script/tl/1_tl_object.js +0 -228
  642. package/script/tl/2_types.d.ts +0 -28060
  643. package/script/tl/2_types.d.ts.map +0 -1
  644. package/script/tl/2_types.js +0 -70558
  645. package/script/tl/3_deserialize.d.ts +0 -23
  646. package/script/tl/3_deserialize.d.ts.map +0 -1
  647. package/script/tl/3_functions.d.ts +0 -14094
  648. package/script/tl/3_functions.d.ts.map +0 -1
  649. package/script/tl/3_functions.js +0 -29121
  650. package/script/tl/4_tl_reader.d.ts.map +0 -1
  651. package/script/tl/5_tl_writer.d.ts.map +0 -1
  652. package/script/tl/6_rpc_result.d.ts +0 -30
  653. package/script/tl/6_rpc_result.d.ts.map +0 -1
  654. package/script/tl/6_rpc_result.js +0 -53
  655. package/script/tl/7_message.d.ts +0 -32
  656. package/script/tl/7_message.d.ts.map +0 -1
  657. package/script/tl/7_message.js +0 -95
  658. package/script/tl/8_message_container.d.ts +0 -32
  659. package/script/tl/8_message_container.d.ts.map +0 -1
  660. package/script/tl/8_message_container.js +0 -76
@@ -30,7 +30,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
30
30
  };
31
31
  var _AccountManager_instances, _AccountManager_c, _AccountManager_toggleUsername;
32
32
  import { unreachable } from "../0_deps.js";
33
- import { types } from "../2_tl.js";
33
+ import { is } from "../2_tl.js";
34
34
  import { constructInactiveChat } from "../3_types.js";
35
35
  export class AccountManager {
36
36
  constructor(c) {
@@ -49,14 +49,14 @@ export class AccountManager {
49
49
  async reorderUsernames(id, order) {
50
50
  await __classPrivateFieldGet(this, _AccountManager_c, "f").storage.assertUser("reorderUsernames");
51
51
  const peer = await __classPrivateFieldGet(this, _AccountManager_c, "f").getInputPeer(id);
52
- if (peer instanceof types.InputPeerSelf) {
53
- return await __classPrivateFieldGet(this, _AccountManager_c, "f").api.account.reorderUsernames({ order });
52
+ if (is("inputPeerSelf", peer)) {
53
+ return await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "account.reorderUsernames", order });
54
54
  }
55
- else if (peer instanceof types.InputPeerUser) {
56
- return await __classPrivateFieldGet(this, _AccountManager_c, "f").api.bots.reorderUsernames({ bot: new types.InputUser(peer), order });
55
+ else if (is("inputPeerUser", peer)) {
56
+ return await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "bots.reorderUsernames", bot: { ...peer, _: "inputUser" }, order });
57
57
  }
58
- else if (peer instanceof types.InputPeerChannel) {
59
- return await __classPrivateFieldGet(this, _AccountManager_c, "f").api.channels.reorderUsernames({ channel: new types.InputChannel(peer), order });
58
+ else if (is("inputPeerChannel", peer)) {
59
+ return await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "channels.reorderUsernames", channel: { ...peer, _: "inputChannel" }, order });
60
60
  }
61
61
  else {
62
62
  unreachable();
@@ -65,8 +65,8 @@ export class AccountManager {
65
65
  async hideUsernames(id) {
66
66
  await __classPrivateFieldGet(this, _AccountManager_c, "f").storage.assertUser("hideUsernames");
67
67
  const peer = await __classPrivateFieldGet(this, _AccountManager_c, "f").getInputPeer(id);
68
- if (peer instanceof types.InputPeerChannel) {
69
- return await __classPrivateFieldGet(this, _AccountManager_c, "f").api.channels.deactivateAllUsernames({ channel: new types.InputChannel(peer) });
68
+ if (is("inputPeerChannel", peer)) {
69
+ return await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "channels.deactivateAllUsernames", channel: { ...peer, _: "inputChannel" } });
70
70
  }
71
71
  else {
72
72
  unreachable();
@@ -74,20 +74,20 @@ export class AccountManager {
74
74
  }
75
75
  async getInactiveChats() {
76
76
  await __classPrivateFieldGet(this, _AccountManager_c, "f").storage.assertUser("getInactiveChats");
77
- const { chats, dates } = await __classPrivateFieldGet(this, _AccountManager_c, "f").api.channels.getInactiveChannels();
77
+ const { chats, dates } = await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "channels.getInactiveChannels" });
78
78
  return chats.map((v, i) => constructInactiveChat(v, dates[i]));
79
79
  }
80
80
  }
81
81
  _AccountManager_c = new WeakMap(), _AccountManager_instances = new WeakSet(), _AccountManager_toggleUsername = async function _AccountManager_toggleUsername(id, username, active) {
82
82
  const peer = await __classPrivateFieldGet(this, _AccountManager_c, "f").getInputPeer(id);
83
- if (peer instanceof types.InputPeerSelf) {
84
- await __classPrivateFieldGet(this, _AccountManager_c, "f").api.account.toggleUsername({ username, active });
83
+ if (is("inputPeerSelf", peer)) {
84
+ await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "account.toggleUsername", username, active });
85
85
  }
86
- else if (peer instanceof types.InputPeerUser) {
87
- await __classPrivateFieldGet(this, _AccountManager_c, "f").api.bots.toggleUsername({ bot: new types.InputUser(peer), username, active });
86
+ else if (is("inputPeerUser", peer)) {
87
+ await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "bots.toggleUsername", bot: { ...peer, _: "inputUser" }, username, active });
88
88
  }
89
- else if (peer instanceof types.InputPeerChannel) {
90
- await __classPrivateFieldGet(this, _AccountManager_c, "f").api.channels.toggleUsername({ channel: new types.InputChannel(peer), username, active });
89
+ else if (is("inputPeerChannel", peer)) {
90
+ await __classPrivateFieldGet(this, _AccountManager_c, "f").invoke({ _: "channels.toggleUsername", channel: { ...peer, _: "inputChannel" }, username, active });
91
91
  }
92
92
  else {
93
93
  unreachable();
@@ -1 +1 @@
1
- {"version":3,"file":"2_bot_info_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_bot_info_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,UAAU,EAA6B,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,qBAAa,cAAc;;gBAGb,CAAC,EAAE,CAAC;IAQV,gBAAgB,CAAC,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAKzE,SAAS,CAAC,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAK3D,qBAAqB,CAAC,MAAM,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IASnF,gBAAgB,CAAC,MAAM,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAKrE,SAAS,CAAC,MAAM,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAK9D,qBAAqB,CAAC,MAAM,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAK1E,aAAa,CAAC,MAAM,C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CAAC;IAUlE,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,MAAM,CAAC,EAAE,mBAAmB;CASzE"}
@@ -29,7 +29,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
29
29
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
30
30
  };
31
31
  var _BotInfoManager_instances, _BotInfoManager_c, _BotInfoManager_setMyInfo, _BotInfoManager_getMyInfo;
32
- import { types } from "../2_tl.js";
33
32
  import { botCommandScopeToTlObject } from "../3_types.js";
34
33
  export class BotInfoManager {
35
34
  constructor(c) {
@@ -63,7 +62,8 @@ export class BotInfoManager {
63
62
  }
64
63
  async getMyCommands(params) {
65
64
  await __classPrivateFieldGet(this, _BotInfoManager_c, "f").storage.assertBot("getMyCommands");
66
- const commands_ = await __classPrivateFieldGet(this, _BotInfoManager_c, "f").api.bots.getBotCommands({
65
+ const commands_ = await __classPrivateFieldGet(this, _BotInfoManager_c, "f").invoke({
66
+ _: "bots.getBotCommands",
67
67
  lang_code: params?.languageCode ?? "",
68
68
  scope: await botCommandScopeToTlObject(params?.scope ?? { type: "default" }, __classPrivateFieldGet(this, _BotInfoManager_c, "f").getInputPeer),
69
69
  });
@@ -71,15 +71,16 @@ export class BotInfoManager {
71
71
  }
72
72
  async setMyCommands(commands, params) {
73
73
  await __classPrivateFieldGet(this, _BotInfoManager_c, "f").storage.assertBot("setMyCommands");
74
- await __classPrivateFieldGet(this, _BotInfoManager_c, "f").api.bots.setBotCommands({
75
- commands: commands.map((v) => new types.BotCommand(v)),
74
+ await __classPrivateFieldGet(this, _BotInfoManager_c, "f").invoke({
75
+ _: "bots.setBotCommands",
76
+ commands: commands.map((v) => ({ ...v, _: "botCommand" })),
76
77
  lang_code: params?.languageCode ?? "",
77
78
  scope: await botCommandScopeToTlObject(params?.scope ?? { type: "default" }, __classPrivateFieldGet(this, _BotInfoManager_c, "f").getInputPeer),
78
79
  });
79
80
  }
80
81
  }
81
82
  _BotInfoManager_c = new WeakMap(), _BotInfoManager_instances = new WeakSet(), _BotInfoManager_setMyInfo = async function _BotInfoManager_setMyInfo(info) {
82
- await __classPrivateFieldGet(this, _BotInfoManager_c, "f").api.bots.setBotInfo({ bot: new types.InputUserSelf(), ...info });
83
+ await __classPrivateFieldGet(this, _BotInfoManager_c, "f").invoke({ _: "bots.setBotInfo", bot: { _: "inputUserSelf" }, ...info });
83
84
  }, _BotInfoManager_getMyInfo = function _BotInfoManager_getMyInfo(languageCode) {
84
- return __classPrivateFieldGet(this, _BotInfoManager_c, "f").api.bots.getBotInfo({ bot: new types.InputUserSelf(), lang_code: languageCode ?? "" });
85
+ return __classPrivateFieldGet(this, _BotInfoManager_c, "f").invoke({ _: "bots.getBotInfo", bot: { _: "inputUserSelf" }, lang_code: languageCode ?? "" });
85
86
  };
@@ -17,15 +17,15 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { enums, types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { Update } from "../3_types.js";
22
22
  import { C } from "./1_types.js";
23
- export type BusinessConnectionManagerUpdate = types.UpdateBotBusinessConnect;
23
+ export type BusinessConnectionManagerUpdate = Api.updateBotBusinessConnect;
24
24
  export declare class BusinessConnectionManager {
25
25
  #private;
26
26
  constructor(c: C);
27
27
  getBusinessConnection(id: string): Promise<import("../3_types.js").BusinessConnection>;
28
- static canHandleUpdate(update: enums.Update): update is BusinessConnectionManagerUpdate;
28
+ static canHandleUpdate(update: Api.Update): update is BusinessConnectionManagerUpdate;
29
29
  handleUpdate(update: BusinessConnectionManagerUpdate): Promise<Update>;
30
30
  }
31
31
  //# sourceMappingURL=2_business_connection_manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_business_connection_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_business_connection_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAM,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC,wBAAwB,CAAC;AAE7E,qBAAa,yBAAyB;;gBAGxB,CAAC,EAAE,CAAC;IAIV,qBAAqB,CAAC,EAAE,EAAE,MAAM;IAatC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,IAAI,+BAA+B;IAIjF,YAAY,CAAC,MAAM,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC;CAS7E"}
1
+ {"version":3,"file":"2_business_connection_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_business_connection_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,MAAM,MAAM,+BAA+B,GAAG,GAAG,CAAC,wBAAwB,CAAC;AAE3E,qBAAa,yBAAyB;;gBAGxB,CAAC,EAAE,CAAC;IAIV,qBAAqB,CAAC,EAAE,EAAE,MAAM;IAatC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,IAAI,+BAA+B;IAI/E,YAAY,CAAC,MAAM,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC;CAS7E"}
@@ -29,7 +29,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
29
29
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
30
30
  };
31
31
  var _BusinessConnectionManager_c;
32
- import { as, types } from "../2_tl.js";
32
+ import { is } from "../2_tl.js";
33
+ import { as } from "../2_tl.js";
33
34
  import { constructBusinessConnection } from "../3_types.js";
34
35
  export class BusinessConnectionManager {
35
36
  constructor(c) {
@@ -39,9 +40,9 @@ export class BusinessConnectionManager {
39
40
  async getBusinessConnection(id) {
40
41
  const connection_ = await __classPrivateFieldGet(this, _BusinessConnectionManager_c, "f").messageStorage.getBusinessConnection(id);
41
42
  if (!connection_) {
42
- const connection_ = await __classPrivateFieldGet(this, _BusinessConnectionManager_c, "f").api.account.getBotBusinessConnection({ connection_id: id })
43
- .then((v) => v[as](types.Updates))
44
- .then((v) => v.updates[0][as](types.UpdateBotBusinessConnect).connection);
43
+ const connection_ = await __classPrivateFieldGet(this, _BusinessConnectionManager_c, "f").invoke({ _: "account.getBotBusinessConnection", connection_id: id })
44
+ .then((v) => as("updates", v))
45
+ .then((v) => as("updateBotBusinessConnect", v.updates[0]).connection);
45
46
  await __classPrivateFieldGet(this, _BusinessConnectionManager_c, "f").messageStorage.setBusinessConnection(id, connection_);
46
47
  return await constructBusinessConnection(connection_, __classPrivateFieldGet(this, _BusinessConnectionManager_c, "f").getEntity);
47
48
  }
@@ -50,7 +51,7 @@ export class BusinessConnectionManager {
50
51
  }
51
52
  }
52
53
  static canHandleUpdate(update) {
53
- return update instanceof types.UpdateBotBusinessConnect;
54
+ return is("updateBotBusinessConnect", update);
54
55
  }
55
56
  async handleUpdate(update) {
56
57
  if (update.connection.disabled) {
@@ -1,38 +1,19 @@
1
- /**
2
- * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
- *
5
- * This file is part of MTKruto.
6
- *
7
- * This program is free software: you can redistribute it and/or modify
8
- * it under the terms of the GNU Lesser General Public License as published by
9
- * the Free Software Foundation, either version 3 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public License
18
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
- */
20
- import { enums, types } from "../2_tl.js";
1
+ import { Api } from "../2_tl.js";
21
2
  import { FileSource, Sticker } from "../3_types.js";
22
3
  import { DownloadParams, UploadParams } from "./0_params.js";
23
4
  import { C } from "./1_types.js";
24
5
  export declare class FileManager {
25
6
  #private;
26
7
  constructor(c: C);
27
- upload(file: FileSource, params?: UploadParams, checkName?: null | ((name: string) => string), allowStream?: boolean): Promise<import("../tl/2_types.js").InputFile_ | import("../tl/2_types.js").InputFileBig_>;
28
- downloadInner(location: enums.InputFileLocation, dcId: number, params?: {
8
+ upload(file: FileSource, params?: UploadParams, checkName?: null | ((name: string) => string), allowStream?: boolean): Promise<Api.InputFile>;
9
+ downloadInner(location: Api.InputFileLocation, dcId: number, params?: {
29
10
  chunkSize?: number;
30
11
  offset?: number;
31
12
  }): AsyncGenerator<Uint8Array, void, unknown>;
32
13
  static validateChunkSize(chunkSize: number, max: number): void;
33
14
  static validateOffset(offset: number): void;
34
15
  download(fileId: string, params?: DownloadParams): AsyncGenerator<Uint8Array, void, unknown>;
35
- getStickerSetName(inputStickerSet: types.InputStickerSetID, hash?: number): Promise<string>;
16
+ getStickerSetName(inputStickerSet: Api.inputStickerSetID, hash?: number): Promise<string>;
36
17
  getCustomEmojiStickers(id: string | string[]): Promise<Sticker[]>;
37
18
  }
38
19
  //# sourceMappingURL=2_file_manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_file_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_file_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAM,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAA+C,UAAU,EAA8C,OAAO,EAAkB,MAAM,eAAe,CAAC;AAG7J,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AM,CAAC,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,EAAE,WAAW,UAAO,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IAmNzI,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAmDpH,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAevD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM;IAY7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc;IAmDjD,iBAAiB,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,SAAI;IAalE,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE;CA6CnD"}
@@ -1,3 +1,15 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_UPLOAD_REQUEST_PER_CONNECTION, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_handleUploadError, _FileManager_getFileContents, _FileManager_CUSTOM_EMOJI_TTL;
1
13
  /**
2
14
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
15
  * Copyright (C) 2023-2024 Roj <https://roj.im/>
@@ -17,22 +29,11 @@
17
29
  * You should have received a copy of the GNU Lesser General Public License
18
30
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
31
  */
20
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
21
- if (kind === "m") throw new TypeError("Private method is not writable");
22
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
23
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
24
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
25
- };
26
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
27
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
28
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
29
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
30
- };
31
- var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_UPLOAD_REQUEST_PER_CONNECTION, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_handleUploadError, _FileManager_getFileContents, _FileManager_CUSTOM_EMOJI_TTL;
32
+ import * as dntShim from "../_dnt.shims.js";
32
33
  import { extension, path, unreachable } from "../0_deps.js";
33
34
  import { InputError } from "../0_errors.js";
34
35
  import { drop, getLogger, getRandomId, iterateReadableStream, kilobyte, megabyte, minute, mod, PartStream } from "../1_utilities.js";
35
- import { as, types } from "../2_tl.js";
36
+ import { as, is } from "../2_tl.js";
36
37
  import { constructSticker, deserializeFileId, FileType, PhotoSourceType, serializeFileId, toUniqueFileId } from "../3_types.js";
37
38
  import { STICKER_SET_NAME_TTL } from "../4_constants.js";
38
39
  import { FloodWait } from "../4_errors.js";
@@ -77,10 +78,10 @@ export class FileManager {
77
78
  }
78
79
  __classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploaded ` + result.parts + " part(s)");
79
80
  if (result.small) {
80
- return new types.InputFile({ id: fileId, name, parts: result.parts, md5_checksum: "" });
81
+ return { _: "inputFile", id: fileId, name, parts: result.parts, md5_checksum: "" };
81
82
  }
82
83
  else {
83
- return new types.InputFileBig({ id: fileId, parts: result.parts, name });
84
+ return { _: "inputFileBig", id: fileId, name, parts: result.parts };
84
85
  }
85
86
  }
86
87
  async *downloadInner(location, dcId, params) {
@@ -105,8 +106,8 @@ export class FileManager {
105
106
  let part = 0;
106
107
  try {
107
108
  while (true) {
108
- const file = await connection.api.upload.getFile({ location, offset, limit });
109
- if (file instanceof types.upload.File) {
109
+ const file = await connection.invoke({ _: "upload.getFile", location, offset, limit });
110
+ if (is("upload.file", file)) {
110
111
  yield file.bytes;
111
112
  if (id != null) {
112
113
  await __classPrivateFieldGet(this, _FileManager_c, "f").storage.saveFilePart(id, part, file.bytes);
@@ -165,40 +166,43 @@ export class FileManager {
165
166
  unreachable();
166
167
  }
167
168
  const big = fileId_.location.source.type == PhotoSourceType.ChatPhotoBig;
168
- const peer = await __classPrivateFieldGet(this, _FileManager_c, "f").getInputPeer(Number(fileId_.location.source.chatId)); // TODO: use access hash from source?
169
- const location = new types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer, photo_id: fileId_.location.id });
169
+ const peer = await __classPrivateFieldGet(this, _FileManager_c, "f").getInputPeer(Number(fileId_.location.source.chatId));
170
+ const location = { _: "inputPeerPhotoFileLocation", big: big ? true : undefined, peer, photo_id: fileId_.location.id };
170
171
  yield* this.downloadInner(location, fileId_.dcId, params);
171
172
  break;
172
173
  }
173
174
  case FileType.Photo: {
174
- const location = new types.InputPhotoFileLocation({
175
+ const location = {
176
+ _: "inputPhotoFileLocation",
175
177
  id: fileId_.location.id,
176
178
  access_hash: fileId_.location.accessHash,
177
179
  file_reference: fileId_.fileReference ?? new Uint8Array(),
178
180
  thumb_size: "thumbnailType" in fileId_.location.source ? String.fromCharCode(fileId_.location.source.thumbnailType) : "",
179
- });
181
+ };
180
182
  yield* this.downloadInner(location, fileId_.dcId, params);
181
183
  break;
182
184
  }
183
185
  case FileType.Thumbnail: {
184
- const location = new types.InputDocumentFileLocation({
186
+ const location = {
187
+ _: "inputDocumentFileLocation",
185
188
  id: fileId_.location.id,
186
189
  access_hash: fileId_.location.accessHash,
187
190
  file_reference: fileId_.fileReference ?? new Uint8Array(),
188
191
  thumb_size: "thumbnailType" in fileId_.location.source ? String.fromCharCode(fileId_.location.source.thumbnailType) : unreachable(),
189
- });
192
+ };
190
193
  yield* this.downloadInner(location, fileId_.dcId, params);
191
194
  break;
192
195
  }
193
196
  }
194
197
  }
195
198
  else if (fileId_.location.type == "common") {
196
- const location = new types.InputDocumentFileLocation({
199
+ const location = {
200
+ _: "inputDocumentFileLocation",
197
201
  id: fileId_.location.id,
198
202
  access_hash: fileId_.location.accessHash,
199
203
  file_reference: fileId_.fileReference ?? new Uint8Array(),
200
204
  thumb_size: "",
201
- });
205
+ };
202
206
  yield* this.downloadInner(location, fileId_.dcId, params);
203
207
  }
204
208
  else {
@@ -211,8 +215,8 @@ export class FileManager {
211
215
  return maybeStickerSetName[0];
212
216
  }
213
217
  else {
214
- const stickerSet = await __classPrivateFieldGet(this, _FileManager_c, "f").api.messages.getStickerSet({ stickerset: inputStickerSet, hash });
215
- const name = stickerSet[as](types.messages.StickerSet).set.short_name;
218
+ const stickerSet = await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "messages.getStickerSet", stickerset: inputStickerSet, hash });
219
+ const name = as("messages.stickerSet", stickerSet).set.short_name;
216
220
  await __classPrivateFieldGet(this, _FileManager_c, "f").messageStorage.updateStickerSetName(inputStickerSet.id, inputStickerSet.access_hash, name);
217
221
  return name;
218
222
  }
@@ -247,7 +251,7 @@ export class FileManager {
247
251
  if (!shouldFetch) {
248
252
  return stickers;
249
253
  }
250
- const documents_ = await __classPrivateFieldGet(this, _FileManager_c, "f").api.messages.getCustomEmojiDocuments({ document_id: id.map(BigInt) }).then((v) => v.map((v) => v[as](types.Document)));
254
+ const documents_ = await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "messages.getCustomEmojiDocuments", document_id: id.map(BigInt) }).then((v) => v.map((v) => as("document", v)));
251
255
  for (const [i, document_] of documents_.entries()) {
252
256
  await __classPrivateFieldGet(this, _FileManager_c, "f").messageStorage.setCustomEmojiDocument(document_.id, document_);
253
257
  const fileId_ = {
@@ -267,17 +271,17 @@ export class FileManager {
267
271
  _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new WeakMap(), _FileManager_instances = new WeakSet(), _FileManager_uploadStream = async function _FileManager_uploadStream(stream, fileId, chunkSize, signal, pool) {
268
272
  let part;
269
273
  let promises = new Array();
270
- let api = pool.api();
274
+ let invoke = pool.invoke();
271
275
  let apiPromiseCount = 0;
272
276
  for await (part of iterateReadableStream(stream.pipeThrough(new PartStream(chunkSize)))) {
273
277
  promises.push(Promise.resolve().then(async () => {
274
278
  while (true) {
275
279
  try {
276
280
  if (part.small) {
277
- await api.upload.saveFilePart({ file_id: fileId, bytes: part.bytes, file_part: part.part });
281
+ await invoke({ _: "upload.saveFilePart", file_id: fileId, bytes: part.bytes, file_part: part.part });
278
282
  }
279
283
  else {
280
- await api.upload.saveBigFilePart({ file_id: fileId, file_part: part.part, bytes: part.bytes, file_total_parts: part.totalParts });
284
+ await invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: part.part, bytes: part.bytes, file_total_parts: part.totalParts });
281
285
  }
282
286
  __classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploaded part ` + (part.part + 1));
283
287
  break;
@@ -290,7 +294,7 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
290
294
  }
291
295
  }));
292
296
  if (++apiPromiseCount >= __classPrivateFieldGet(_a, _a, "f", _FileManager_UPLOAD_REQUEST_PER_CONNECTION)) {
293
- api = pool.api();
297
+ invoke = pool.invoke();
294
298
  apiPromiseCount = 0;
295
299
  }
296
300
  if (promises.length == pool.size * __classPrivateFieldGet(_a, _a, "f", _FileManager_UPLOAD_REQUEST_PER_CONNECTION)) {
@@ -306,7 +310,7 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
306
310
  let promises = new Array();
307
311
  main: for (let part = 0; part < partCount;) {
308
312
  for (let i = 0; i < pool.size; ++i) {
309
- const api = pool.api();
313
+ const invoke = pool.invoke();
310
314
  for (let i = 0; i < __classPrivateFieldGet(_a, _a, "f", _FileManager_UPLOAD_REQUEST_PER_CONNECTION); ++i) {
311
315
  const start = part * chunkSize;
312
316
  const end = start + chunkSize;
@@ -320,10 +324,10 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
320
324
  try {
321
325
  signal?.throwIfAborted();
322
326
  if (isBig) {
323
- await api.upload.saveBigFilePart({ file_id: fileId, file_part: thisPart, bytes, file_total_parts: partCount });
327
+ await invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: thisPart, bytes, file_total_parts: partCount });
324
328
  }
325
329
  else {
326
- await api.upload.saveFilePart({ file_id: fileId, bytes, file_part: thisPart });
330
+ await invoke({ _: "upload.saveFilePart", file_id: fileId, bytes, file_part: thisPart });
327
331
  }
328
332
  __classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploaded part ` + (thisPart + 1) + " / " + partCount);
329
333
  break;
@@ -393,7 +397,7 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
393
397
  }
394
398
  else {
395
399
  // @ts-ignore: lib
396
- path_ = path.join(Deno.cwd(), source);
400
+ path_ = path.join(dntShim.Deno.cwd(), source);
397
401
  }
398
402
  url = path.toFileUrl(path_).toString();
399
403
  name = path.basename(path_);
@@ -17,14 +17,14 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { enums, types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { Update } from "../3_types.js";
22
22
  import { C } from "./1_types.js";
23
- type ReactionManagerUpdate = types.UpdateBotMessageReactions | types.UpdateBotMessageReaction | types.UpdateMessageReactions | types.UpdateChannelMessageViews | types.UpdateChannelMessageForwards;
23
+ type ReactionManagerUpdate = Api.updateBotMessageReactions | Api.updateBotMessageReaction | Api.updateMessageReactions | Api.updateChannelMessageViews | Api.updateChannelMessageForwards;
24
24
  export declare class ReactionManager {
25
25
  #private;
26
26
  constructor(c: C);
27
- static canHandleUpdate(update: enums.Update): update is ReactionManagerUpdate;
27
+ static canHandleUpdate(update: Api.Update): update is ReactionManagerUpdate;
28
28
  handleUpdate(update: ReactionManagerUpdate): Promise<Update | null>;
29
29
  }
30
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"2_reaction_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_reaction_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAsF,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,KAAK,qBAAqB,GACtB,KAAK,CAAC,yBAAyB,GAC/B,KAAK,CAAC,wBAAwB,GAC9B,KAAK,CAAC,sBAAsB,GAC5B,KAAK,CAAC,yBAAyB,GAC/B,KAAK,CAAC,4BAA4B,CAAC;AAEvC,qBAAa,eAAe;;gBAGd,CAAC,EAAE,CAAC;IAIhB,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,IAAI,qBAAqB;IAIvE,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAmD1E"}
1
+ {"version":3,"file":"2_reaction_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_reaction_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAA6B,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAsF,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,KAAK,qBAAqB,GACtB,GAAG,CAAC,yBAAyB,GAC7B,GAAG,CAAC,wBAAwB,GAC5B,GAAG,CAAC,sBAAsB,GAC1B,GAAG,CAAC,yBAAyB,GAC7B,GAAG,CAAC,4BAA4B,CAAC;AAErC,qBAAa,eAAe;;gBAGd,CAAC,EAAE,CAAC;IAIhB,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,IAAI,qBAAqB;IAUrE,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAmD1E"}
@@ -30,7 +30,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
30
30
  };
31
31
  var _ReactionManager_c;
32
32
  import { unreachable } from "../0_deps.js";
33
- import { peerToChatId, types } from "../2_tl.js";
33
+ import { is, isOneOf, peerToChatId } from "../2_tl.js";
34
34
  import { constructMessageReaction, constructMessageReactionCount, constructMessageReactions } from "../3_types.js";
35
35
  export class ReactionManager {
36
36
  constructor(c) {
@@ -38,10 +38,16 @@ export class ReactionManager {
38
38
  __classPrivateFieldSet(this, _ReactionManager_c, c, "f");
39
39
  }
40
40
  static canHandleUpdate(update) {
41
- return update instanceof types.UpdateBotMessageReactions || update instanceof types.UpdateBotMessageReaction || update instanceof types.UpdateMessageReactions || update instanceof types.UpdateChannelMessageViews || update instanceof types.UpdateChannelMessageForwards;
41
+ return isOneOf([
42
+ "updateBotMessageReactions",
43
+ "updateBotMessageReaction",
44
+ "updateMessageReactions",
45
+ "updateChannelMessageViews",
46
+ "updateChannelMessageForwards",
47
+ ], update);
42
48
  }
43
49
  async handleUpdate(update) {
44
- if (update instanceof types.UpdateBotMessageReactions) {
50
+ if (is("updateBotMessageReactions", update)) {
45
51
  const messageReactionCount = await constructMessageReactionCount(update, __classPrivateFieldGet(this, _ReactionManager_c, "f").getEntity);
46
52
  if (messageReactionCount) {
47
53
  return { messageReactionCount };
@@ -50,7 +56,7 @@ export class ReactionManager {
50
56
  return null;
51
57
  }
52
58
  }
53
- else if (update instanceof types.UpdateBotMessageReaction) {
59
+ else if (is("updateBotMessageReaction", update)) {
54
60
  const messageReactions = await constructMessageReactions(update, __classPrivateFieldGet(this, _ReactionManager_c, "f").getEntity);
55
61
  if (messageReactions) {
56
62
  return { messageReactions };
@@ -59,26 +65,26 @@ export class ReactionManager {
59
65
  return null;
60
66
  }
61
67
  }
62
- else if (update instanceof types.UpdateMessageReactions) {
68
+ else if (is("updateMessageReactions", update)) {
63
69
  const chatId = peerToChatId(update.peer);
64
70
  const message = await __classPrivateFieldGet(this, _ReactionManager_c, "f").messageStorage.getMessage(chatId, update.msg_id);
65
- if (message instanceof types.Message) {
71
+ if (is("message", message)) {
66
72
  message.reactions = update.reactions;
67
73
  await __classPrivateFieldGet(this, _ReactionManager_c, "f").messageStorage.setMessage(chatId, update.msg_id, message);
68
74
  const views = message.views ?? 0;
69
75
  const forwards = message.forwards ?? 0;
70
76
  const recentReactions = update.reactions.recent_reactions ?? [];
71
77
  const reactions = update.reactions.results.map((v) => constructMessageReaction(v, recentReactions));
72
- return ({ messageInteractions: { chatId, messageId: update.msg_id, reactions, views, forwards } });
78
+ return { messageInteractions: { chatId, messageId: update.msg_id, reactions, views, forwards } };
73
79
  }
74
80
  else {
75
81
  return null;
76
82
  }
77
83
  }
78
- else if (update instanceof types.UpdateChannelMessageViews || update instanceof types.UpdateChannelMessageForwards) {
79
- const chatId = peerToChatId(new types.PeerChannel(update));
84
+ else if (isOneOf(["updateChannelMessageViews", "updateChannelMessageForwards"], update)) {
85
+ const chatId = peerToChatId({ ...update, _: "peerChannel" });
80
86
  const message = await __classPrivateFieldGet(this, _ReactionManager_c, "f").messageStorage.getMessage(chatId, update.id);
81
- if (message instanceof types.Message) {
87
+ if (is("message", message)) {
82
88
  if ("views" in update) {
83
89
  message.views = update.views;
84
90
  }
@@ -18,26 +18,26 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import { Queue } from "../1_utilities.js";
21
- import { enums, ReadObject, TLObject, types } from "../2_tl.js";
21
+ import { Api, ReadObject } from "../2_tl.js";
22
22
  import { C } from "./1_types.js";
23
- type UpdateHandler = (update: enums.Update) => Promise<(() => Promise<unknown>)>;
24
- export type PtsUpdate = types.UpdateNewMessage | types.UpdateDeleteMessages | types.UpdateReadHistoryInbox | types.UpdateReadHistoryOutbox | types.UpdatePinnedChannelMessages | types.UpdatePinnedMessages | types.UpdateFolderPeers | types.UpdateChannelWebPage | types.UpdateEditMessage | types.UpdateReadMessagesContents | types.UpdateWebPage;
25
- export type ChannelPtsUpdate = types.UpdateNewChannelMessage | types.UpdateEditChannelMessage | types.UpdateDeleteChannelMessages | types.UpdateChannelTooLong;
26
- export type QtsUpdate = types.UpdateNewEncryptedMessage | types.UpdateMessagePollVote | types.UpdateBotStopped | types.UpdateChatParticipant | types.UpdateChannelParticipant | types.UpdateBotChatInviteRequester | types.UpdateBotChatBoost | types.UpdateBotMessageReaction | types.UpdateBotMessageReactions | types.UpdateBotBusinessConnect | types.UpdateBotNewBusinessMessage | types.UpdateBotEditBusinessMessage | types.UpdateBotDeleteBusinessMessage;
23
+ type UpdateHandler = (update: Api.Update) => Promise<(() => Promise<unknown>)>;
24
+ export type PtsUpdate = Api.updateNewMessage | Api.updateDeleteMessages | Api.updateReadHistoryInbox | Api.updateReadHistoryOutbox | Api.updatePinnedChannelMessages | Api.updatePinnedMessages | Api.updateFolderPeers | Api.updateChannelWebPage | Api.updateEditMessage | Api.updateReadMessagesContents | Api.updateWebPage;
25
+ export type ChannelPtsUpdate = Api.updateNewChannelMessage | Api.updateEditChannelMessage | Api.updateDeleteChannelMessages | Api.updateChannelTooLong;
26
+ export type QtsUpdate = Api.updateNewEncryptedMessage | Api.updateMessagePollVote | Api.updateBotStopped | Api.updateChatParticipant | Api.updateChannelParticipant | Api.updateBotChatInviteRequester | Api.updateBotChatBoost | Api.updateBotMessageReaction | Api.updateBotMessageReactions | Api.updateBotBusinessConnect | Api.updateBotNewBusinessMessage | Api.updateBotEditBusinessMessage | Api.updateBotDeleteBusinessMessage;
27
27
  export declare class UpdateManager {
28
28
  #private;
29
29
  static readonly QTS_COUNT = 1;
30
30
  static readonly MAIN_BOX_ID = 0n;
31
31
  constructor(c: C);
32
- static isPtsUpdate(v: enums.Update): v is PtsUpdate;
33
- static isQtsUpdate(v: enums.Update): v is QtsUpdate;
34
- static isChannelPtsUpdate(v: enums.Update | enums.Updates): v is ChannelPtsUpdate;
32
+ static isPtsUpdate(v: Api.Update): v is PtsUpdate;
33
+ static isQtsUpdate(v: Api.Update): v is QtsUpdate;
34
+ static isChannelPtsUpdate(v: Api.Update | Api.Updates): v is ChannelPtsUpdate;
35
35
  fetchState(source: string): Promise<void>;
36
- processChats(chats: enums.Chat[]): Promise<void>;
36
+ processChats(chats: Api.Chat[]): Promise<void>;
37
37
  processResult(result: ReadObject): Promise<void>;
38
- processUsers(users: enums.User[]): Promise<void>;
38
+ processUsers(users: Api.User[]): Promise<void>;
39
39
  getHandleUpdateQueue(boxId: bigint): Queue;
40
- processUpdates(updates: enums.Update | enums.Updates, checkGap: boolean, call?: TLObject | null, callback?: () => void): void;
40
+ processUpdates(updates: Api.Update | Api.Updates, checkGap: boolean, call?: Api.AnyObject | null, callback?: () => void): void;
41
41
  recoverUpdateGap(source: string): Promise<void>;
42
42
  setUpdateHandler(handler: UpdateHandler): void;
43
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"2_update_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_update_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAqB,KAAK,EAAmB,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAM,KAAK,EAA4C,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE9G,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,KAAK,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAEjF,MAAM,MAAM,SAAS,GACjB,KAAK,CAAC,gBAAgB,GACtB,KAAK,CAAC,oBAAoB,GAC1B,KAAK,CAAC,sBAAsB,GAC5B,KAAK,CAAC,uBAAuB,GAC7B,KAAK,CAAC,2BAA2B,GACjC,KAAK,CAAC,oBAAoB,GAC1B,KAAK,CAAC,iBAAiB,GACvB,KAAK,CAAC,oBAAoB,GAC1B,KAAK,CAAC,iBAAiB,GACvB,KAAK,CAAC,0BAA0B,GAChC,KAAK,CAAC,aAAa,CAAC;AAExB,MAAM,MAAM,gBAAgB,GACxB,KAAK,CAAC,uBAAuB,GAC7B,KAAK,CAAC,wBAAwB,GAC9B,KAAK,CAAC,2BAA2B,GACjC,KAAK,CAAC,oBAAoB,CAAC;AAE/B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