@mtkruto/node 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 (664) 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_errors.d.ts +7 -7
  14. package/esm/4_errors.d.ts.map +1 -1
  15. package/esm/4_errors.js +5 -5
  16. package/esm/client/0_client_abstract.d.ts +1 -21
  17. package/esm/client/0_client_abstract.d.ts.map +1 -1
  18. package/esm/client/0_client_abstract.js +17 -15
  19. package/esm/client/0_message.d.ts +3 -3
  20. package/esm/client/0_message.d.ts.map +1 -1
  21. package/esm/client/0_message.js +4 -20
  22. package/esm/client/0_params.d.ts +1 -1
  23. package/esm/client/0_params.d.ts.map +1 -1
  24. package/esm/client/0_password.d.ts +2 -2
  25. package/esm/client/0_password.d.ts.map +1 -1
  26. package/esm/client/0_password.js +3 -8
  27. package/esm/client/0_storage_operations.d.ts +23 -23
  28. package/esm/client/0_storage_operations.d.ts.map +1 -1
  29. package/esm/client/0_storage_operations.js +13 -12
  30. package/esm/client/0_utilities.d.ts.map +1 -1
  31. package/esm/client/0_utilities.js +13 -10
  32. package/esm/client/1_client_encrypted.d.ts +3 -5
  33. package/esm/client/1_client_encrypted.d.ts.map +1 -1
  34. package/esm/client/1_client_encrypted.js +44 -28
  35. package/esm/client/1_client_plain.d.ts +2 -2
  36. package/esm/client/1_client_plain.d.ts.map +1 -1
  37. package/esm/client/1_client_plain.js +27 -19
  38. package/esm/client/1_types.d.ts +9 -22
  39. package/esm/client/1_types.d.ts.map +1 -1
  40. package/esm/client/2_account_manager.d.ts +2 -2
  41. package/esm/client/2_account_manager.js +16 -16
  42. package/esm/client/2_bot_info_manager.d.ts.map +1 -1
  43. package/esm/client/2_bot_info_manager.js +7 -6
  44. package/esm/client/2_business_connection_manager.d.ts +3 -3
  45. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  46. package/esm/client/2_business_connection_manager.js +6 -5
  47. package/esm/client/2_file_manager.d.ts +4 -4
  48. package/esm/client/2_file_manager.d.ts.map +1 -1
  49. package/esm/client/2_file_manager.js +26 -23
  50. package/esm/client/2_reaction_manager.d.ts +3 -3
  51. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  52. package/esm/client/2_reaction_manager.js +16 -10
  53. package/esm/client/2_update_manager.d.ts +11 -11
  54. package/esm/client/2_update_manager.d.ts.map +1 -1
  55. package/esm/client/2_update_manager.js +162 -160
  56. package/esm/client/3_message_manager.d.ts +8 -9
  57. package/esm/client/3_message_manager.d.ts.map +1 -1
  58. package/esm/client/3_message_manager.js +205 -474
  59. package/esm/client/3_video_chat_manager.d.ts +3 -3
  60. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  61. package/esm/client/3_video_chat_manager.js +26 -36
  62. package/esm/client/4_callback_query_manager.d.ts +3 -3
  63. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  64. package/esm/client/4_callback_query_manager.js +5 -16
  65. package/esm/client/4_chat_list_manager.d.ts +5 -4
  66. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  67. package/esm/client/4_chat_list_manager.js +56 -34
  68. package/esm/client/4_inline_query_manager.d.ts +3 -3
  69. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  70. package/esm/client/4_inline_query_manager.js +6 -15
  71. package/esm/client/4_story_manager.d.ts +3 -3
  72. package/esm/client/4_story_manager.d.ts.map +1 -1
  73. package/esm/client/4_story_manager.js +15 -32
  74. package/esm/client/5_client.d.ts +10 -12
  75. package/esm/client/5_client.d.ts.map +1 -1
  76. package/esm/client/5_client.js +60 -114
  77. package/esm/{tl/7_message.d.ts → connection/1_connection_tcp.d.ts} +14 -12
  78. package/esm/connection/1_connection_tcp.d.ts.map +1 -0
  79. package/esm/connection/1_connection_tcp.js +169 -0
  80. package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
  81. package/esm/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
  82. package/esm/deps/deno.land/std@0.224.0/io/_constants.js +4 -0
  83. package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
  84. package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
  85. package/esm/deps/deno.land/std@0.224.0/io/iterate_reader.js +86 -0
  86. package/esm/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
  87. package/esm/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
  88. package/esm/deps/deno.land/std@0.224.0/io/types.js +3 -0
  89. package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
  90. package/esm/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
  91. package/esm/deps/deno.land/std@0.224.0/io/write_all.js +49 -0
  92. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
  93. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
  94. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +253 -0
  95. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
  96. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
  97. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +1 -0
  98. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
  99. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
  100. package/esm/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +13 -0
  101. package/esm/mod.d.ts +0 -1
  102. package/esm/mod.d.ts.map +1 -1
  103. package/esm/mod.js +0 -1
  104. package/esm/tl/0_api.d.ts +14813 -0
  105. package/esm/tl/0_api.d.ts.map +1 -0
  106. package/esm/tl/0_api.js +23222 -0
  107. package/esm/tl/1_utilities.d.ts +32 -0
  108. package/esm/tl/1_utilities.d.ts.map +1 -0
  109. package/esm/tl/1_utilities.js +65 -0
  110. package/esm/tl/1_utilities_test.d.ts.map +1 -0
  111. package/esm/tl/2_deserialize.d.ts +23 -0
  112. package/esm/tl/2_deserialize.d.ts.map +1 -0
  113. package/esm/tl/{3_deserialize.js → 2_deserialize.js} +16 -17
  114. package/esm/tl/2_serialize.d.ts +22 -0
  115. package/esm/tl/2_serialize.d.ts.map +1 -0
  116. package/esm/tl/2_serialize.js +160 -0
  117. package/esm/tl/2_serialize_test.d.ts.map +1 -0
  118. package/esm/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
  119. package/esm/tl/3_tl_reader.d.ts.map +1 -0
  120. package/esm/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
  121. package/esm/tl/3_utilities.d.ts +5 -5
  122. package/esm/tl/3_utilities.d.ts.map +1 -1
  123. package/esm/tl/3_utilities.js +9 -10
  124. package/esm/tl/4_rpc_result.d.ts +27 -0
  125. package/esm/tl/4_rpc_result.d.ts.map +1 -0
  126. package/esm/tl/4_rpc_result.js +28 -0
  127. package/{script/tl/5_tl_writer.d.ts → esm/tl/4_tl_writer.d.ts} +2 -2
  128. package/esm/tl/4_tl_writer.d.ts.map +1 -0
  129. package/esm/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
  130. package/esm/tl/5_message.d.ts +39 -0
  131. package/esm/tl/5_message.d.ts.map +1 -0
  132. package/esm/tl/5_message.js +98 -0
  133. package/esm/tl/5_message_test.d.ts.map +1 -0
  134. package/esm/transport/3_transport_provider_tcp.d.ts +14 -0
  135. package/esm/transport/3_transport_provider_tcp.d.ts.map +1 -0
  136. package/esm/transport/3_transport_provider_tcp.js +15 -0
  137. package/esm/types/0_birthday.d.ts +2 -2
  138. package/esm/types/0_birthday.d.ts.map +1 -1
  139. package/esm/types/0_callback_query_answer.d.ts +2 -2
  140. package/esm/types/0_callback_query_answer.d.ts.map +1 -1
  141. package/esm/types/0_chat_administrator_rights.d.ts +3 -3
  142. package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
  143. package/esm/types/0_chat_administrator_rights.js +1 -11
  144. package/esm/types/0_chat_member_rights.d.ts +3 -3
  145. package/esm/types/0_chat_member_rights.d.ts.map +1 -1
  146. package/esm/types/0_chat_member_rights.js +3 -3
  147. package/esm/types/0_chat_photo.d.ts +2 -2
  148. package/esm/types/0_chat_photo.d.ts.map +1 -1
  149. package/esm/types/0_chat_photo.js +2 -2
  150. package/esm/types/0_contact.d.ts +2 -2
  151. package/esm/types/0_contact.d.ts.map +1 -1
  152. package/esm/types/0_dice.d.ts +2 -2
  153. package/esm/types/0_dice.d.ts.map +1 -1
  154. package/esm/types/0_giveaway_parameters.d.ts +2 -2
  155. package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
  156. package/esm/types/0_giveaway_parameters.js +3 -3
  157. package/esm/types/0_link_preview.d.ts +2 -2
  158. package/esm/types/0_link_preview.d.ts.map +1 -1
  159. package/esm/types/0_live_stream_channel.d.ts +2 -2
  160. package/esm/types/0_live_stream_channel.d.ts.map +1 -1
  161. package/esm/types/0_location.d.ts +2 -2
  162. package/esm/types/0_location.d.ts.map +1 -1
  163. package/esm/types/0_location.js +5 -5
  164. package/esm/types/0_mask_position.d.ts +2 -2
  165. package/esm/types/0_mask_position.d.ts.map +1 -1
  166. package/esm/types/0_message_entity.d.ts +3 -3
  167. package/esm/types/0_message_entity.d.ts.map +1 -1
  168. package/esm/types/0_message_entity.js +42 -42
  169. package/esm/types/0_message_search_filter.d.ts +2 -2
  170. package/esm/types/0_message_search_filter.d.ts.map +1 -1
  171. package/esm/types/0_message_search_filter.js +14 -15
  172. package/esm/types/0_opening_hours.d.ts +2 -2
  173. package/esm/types/0_opening_hours.d.ts.map +1 -1
  174. package/esm/types/0_poll_option.d.ts +2 -2
  175. package/esm/types/0_poll_option.d.ts.map +1 -1
  176. package/esm/types/0_reaction.d.ts +3 -3
  177. package/esm/types/0_reaction.d.ts.map +1 -1
  178. package/esm/types/0_reaction.js +4 -4
  179. package/esm/types/0_restriction_reason.d.ts +2 -2
  180. package/esm/types/0_restriction_reason.d.ts.map +1 -1
  181. package/esm/types/0_thumbnail.d.ts +2 -2
  182. package/esm/types/0_thumbnail.d.ts.map +1 -1
  183. package/esm/types/0_thumbnail.js +3 -3
  184. package/esm/types/0_video_chat.d.ts +2 -2
  185. package/esm/types/0_video_chat.d.ts.map +1 -1
  186. package/esm/types/0_video_chat.js +2 -2
  187. package/esm/types/0_voice.d.ts +2 -2
  188. package/esm/types/0_voice.d.ts.map +1 -1
  189. package/esm/types/1_animation.d.ts +2 -2
  190. package/esm/types/1_animation.d.ts.map +1 -1
  191. package/esm/types/1_animation.js +2 -2
  192. package/esm/types/1_audio.d.ts +2 -2
  193. package/esm/types/1_audio.d.ts.map +1 -1
  194. package/esm/types/1_audio.js +2 -2
  195. package/esm/types/1_bot_command_scope.d.ts +9 -2
  196. package/esm/types/1_bot_command_scope.d.ts.map +1 -1
  197. package/esm/types/1_bot_command_scope.js +9 -9
  198. package/esm/types/1_chat_p.d.ts +5 -5
  199. package/esm/types/1_chat_p.d.ts.map +1 -1
  200. package/esm/types/1_chat_p.js +6 -6
  201. package/esm/types/1_document.d.ts +2 -2
  202. package/esm/types/1_document.d.ts.map +1 -1
  203. package/esm/types/1_document.js +2 -2
  204. package/esm/types/1_giveaway.d.ts +2 -2
  205. package/esm/types/1_giveaway.d.ts.map +1 -1
  206. package/esm/types/1_keyboard_button.d.ts +3 -3
  207. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  208. package/esm/types/1_keyboard_button.js +18 -45
  209. package/esm/types/1_message_reaction.d.ts +2 -2
  210. package/esm/types/1_message_reaction.d.ts.map +1 -1
  211. package/esm/types/1_message_reaction.js +5 -5
  212. package/esm/types/1_photo.d.ts +5 -5
  213. package/esm/types/1_photo.d.ts.map +1 -1
  214. package/esm/types/1_photo.js +4 -4
  215. package/esm/types/1_poll.d.ts +2 -2
  216. package/esm/types/1_poll.d.ts.map +1 -1
  217. package/esm/types/1_reaction_count.d.ts +2 -2
  218. package/esm/types/1_reaction_count.d.ts.map +1 -1
  219. package/esm/types/1_reply_quote.d.ts +2 -2
  220. package/esm/types/1_reply_quote.d.ts.map +1 -1
  221. package/esm/types/1_sticker.d.ts +3 -3
  222. package/esm/types/1_sticker.d.ts.map +1 -1
  223. package/esm/types/1_sticker.js +9 -9
  224. package/esm/types/1_story_privacy.d.ts +3 -3
  225. package/esm/types/1_story_privacy.d.ts.map +1 -1
  226. package/esm/types/1_story_privacy.js +14 -14
  227. package/esm/types/1_story_reaction.d.ts +2 -2
  228. package/esm/types/1_story_reaction.d.ts.map +1 -1
  229. package/esm/types/1_user.d.ts +2 -2
  230. package/esm/types/1_user.d.ts.map +1 -1
  231. package/esm/types/1_user.js +2 -2
  232. package/esm/types/1_venue.d.ts +2 -2
  233. package/esm/types/1_venue.d.ts.map +1 -1
  234. package/esm/types/1_venue.js +2 -2
  235. package/esm/types/1_video.d.ts +2 -2
  236. package/esm/types/1_video.d.ts.map +1 -1
  237. package/esm/types/1_video.js +2 -2
  238. package/esm/types/1_video_note.d.ts +2 -2
  239. package/esm/types/1_video_note.d.ts.map +1 -1
  240. package/esm/types/1_video_note.js +2 -2
  241. package/esm/types/2_business_connection.d.ts +2 -2
  242. package/esm/types/2_business_connection.d.ts.map +1 -1
  243. package/esm/types/2_business_connection.js +1 -2
  244. package/esm/types/2_chat.d.ts +2 -2
  245. package/esm/types/2_chat.d.ts.map +1 -1
  246. package/esm/types/2_chat.js +11 -11
  247. package/esm/types/2_chat_member.d.ts +2 -2
  248. package/esm/types/2_chat_member.d.ts.map +1 -1
  249. package/esm/types/2_chat_member.js +10 -10
  250. package/esm/types/2_chosen_inline_result.d.ts +2 -2
  251. package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
  252. package/esm/types/2_chosen_inline_result.js +5 -5
  253. package/esm/types/2_game.d.ts +2 -2
  254. package/esm/types/2_game.d.ts.map +1 -1
  255. package/esm/types/2_game.js +4 -4
  256. package/esm/types/2_inactive_chat.d.ts +2 -2
  257. package/esm/types/2_inactive_chat.d.ts.map +1 -1
  258. package/esm/types/2_inactive_chat.js +2 -2
  259. package/esm/types/2_inline_keyboard_button.d.ts +3 -3
  260. package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
  261. package/esm/types/2_inline_keyboard_button.js +15 -21
  262. package/esm/types/2_inline_query.d.ts +2 -2
  263. package/esm/types/2_inline_query.d.ts.map +1 -1
  264. package/esm/types/2_inline_query.js +8 -8
  265. package/esm/types/2_invite_link.d.ts +2 -2
  266. package/esm/types/2_invite_link.d.ts.map +1 -1
  267. package/esm/types/2_invite_link.js +1 -2
  268. package/esm/types/2_message_reaction_count.d.ts +2 -2
  269. package/esm/types/2_message_reaction_count.d.ts.map +1 -1
  270. package/esm/types/2_message_reactions.d.ts +2 -2
  271. package/esm/types/2_message_reactions.d.ts.map +1 -1
  272. package/esm/types/2_message_reactions.js +2 -2
  273. package/esm/types/2_story_content.d.ts +2 -2
  274. package/esm/types/2_story_content.d.ts.map +1 -1
  275. package/esm/types/2_story_content.js +6 -6
  276. package/esm/types/2_story_interactions.d.ts +2 -2
  277. package/esm/types/2_story_interactions.d.ts.map +1 -1
  278. package/esm/types/2_story_interactive_area.d.ts +3 -3
  279. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  280. package/esm/types/2_story_interactive_area.js +19 -29
  281. package/esm/types/3_chat_member_updated.d.ts +2 -2
  282. package/esm/types/3_chat_member_updated.d.ts.map +1 -1
  283. package/esm/types/3_chat_member_updated.js +7 -7
  284. package/esm/types/3_reply_markup.d.ts +3 -3
  285. package/esm/types/3_reply_markup.d.ts.map +1 -1
  286. package/esm/types/3_reply_markup.js +12 -22
  287. package/esm/types/3_story.d.ts +2 -2
  288. package/esm/types/3_story.d.ts.map +1 -1
  289. package/esm/types/4_inline_query_result.d.ts +3 -3
  290. package/esm/types/4_inline_query_result.d.ts.map +1 -1
  291. package/esm/types/4_inline_query_result.js +53 -161
  292. package/esm/types/4_message.d.ts +3 -3
  293. package/esm/types/4_message.d.ts.map +1 -1
  294. package/esm/types/4_message.js +68 -59
  295. package/esm/types/5_callback_query.d.ts +3 -3
  296. package/esm/types/5_callback_query.d.ts.map +1 -1
  297. package/esm/types/5_callback_query.js +5 -5
  298. package/esm/types/5_chat_list_item.d.ts +3 -3
  299. package/esm/types/5_chat_list_item.d.ts.map +1 -1
  300. package/esm/types/5_chat_list_item.js +2 -2
  301. package/esm/types/5_inline_query_answer.d.ts +2 -2
  302. package/esm/types/5_inline_query_answer.d.ts.map +1 -1
  303. package/esm/types/_file_id.d.ts +2 -2
  304. package/esm/types/_file_id.d.ts.map +1 -1
  305. package/esm/types/_file_id.js +4 -4
  306. package/esm/types/_getters.d.ts +7 -7
  307. package/esm/types/_getters.d.ts.map +1 -1
  308. package/package.json +1 -1
  309. package/script/0_deps.d.ts +2 -0
  310. package/script/0_deps.d.ts.map +1 -1
  311. package/script/0_deps.js +5 -2
  312. package/script/2_tl.d.ts +7 -8
  313. package/script/2_tl.d.ts.map +1 -1
  314. package/script/2_tl.js +20 -11
  315. package/script/3_errors.d.ts +519 -515
  316. package/script/3_errors.d.ts.map +1 -1
  317. package/script/3_errors.js +543 -514
  318. package/script/3_transport.d.ts +1 -0
  319. package/script/3_transport.d.ts.map +1 -1
  320. package/script/3_transport.js +1 -0
  321. package/script/4_errors.d.ts +7 -7
  322. package/script/4_errors.d.ts.map +1 -1
  323. package/script/4_errors.js +6 -6
  324. package/script/client/0_client_abstract.d.ts +1 -21
  325. package/script/client/0_client_abstract.d.ts.map +1 -1
  326. package/script/client/0_client_abstract.js +41 -16
  327. package/script/client/0_message.d.ts +3 -3
  328. package/script/client/0_message.d.ts.map +1 -1
  329. package/script/client/0_message.js +3 -19
  330. package/script/client/0_params.d.ts +1 -1
  331. package/script/client/0_params.d.ts.map +1 -1
  332. package/script/client/0_password.d.ts +2 -2
  333. package/script/client/0_password.d.ts.map +1 -1
  334. package/script/client/0_password.js +2 -7
  335. package/script/client/0_storage_operations.d.ts +23 -23
  336. package/script/client/0_storage_operations.d.ts.map +1 -1
  337. package/script/client/0_storage_operations.js +12 -11
  338. package/script/client/0_utilities.d.ts.map +1 -1
  339. package/script/client/0_utilities.js +12 -9
  340. package/script/client/1_client_encrypted.d.ts +3 -5
  341. package/script/client/1_client_encrypted.d.ts.map +1 -1
  342. package/script/client/1_client_encrypted.js +42 -26
  343. package/script/client/1_client_plain.d.ts +2 -2
  344. package/script/client/1_client_plain.d.ts.map +1 -1
  345. package/script/client/1_client_plain.js +25 -17
  346. package/script/client/1_types.d.ts +9 -22
  347. package/script/client/1_types.d.ts.map +1 -1
  348. package/script/client/2_account_manager.d.ts +2 -2
  349. package/script/client/2_account_manager.js +15 -15
  350. package/script/client/2_bot_info_manager.d.ts.map +1 -1
  351. package/script/client/2_bot_info_manager.js +7 -6
  352. package/script/client/2_business_connection_manager.d.ts +3 -3
  353. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  354. package/script/client/2_business_connection_manager.js +5 -4
  355. package/script/client/2_file_manager.d.ts +4 -4
  356. package/script/client/2_file_manager.d.ts.map +1 -1
  357. package/script/client/2_file_manager.js +25 -22
  358. package/script/client/2_reaction_manager.d.ts +3 -3
  359. package/script/client/2_reaction_manager.d.ts.map +1 -1
  360. package/script/client/2_reaction_manager.js +15 -9
  361. package/script/client/2_update_manager.d.ts +11 -11
  362. package/script/client/2_update_manager.d.ts.map +1 -1
  363. package/script/client/2_update_manager.js +161 -159
  364. package/script/client/3_message_manager.d.ts +8 -9
  365. package/script/client/3_message_manager.d.ts.map +1 -1
  366. package/script/client/3_message_manager.js +204 -473
  367. package/script/client/3_video_chat_manager.d.ts +3 -3
  368. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  369. package/script/client/3_video_chat_manager.js +25 -35
  370. package/script/client/4_callback_query_manager.d.ts +3 -3
  371. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  372. package/script/client/4_callback_query_manager.js +4 -15
  373. package/script/client/4_chat_list_manager.d.ts +5 -4
  374. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  375. package/script/client/4_chat_list_manager.js +54 -32
  376. package/script/client/4_inline_query_manager.d.ts +3 -3
  377. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  378. package/script/client/4_inline_query_manager.js +5 -14
  379. package/script/client/4_story_manager.d.ts +3 -3
  380. package/script/client/4_story_manager.d.ts.map +1 -1
  381. package/script/client/4_story_manager.js +14 -31
  382. package/script/client/5_client.d.ts +10 -12
  383. package/script/client/5_client.d.ts.map +1 -1
  384. package/script/client/5_client.js +59 -113
  385. package/{esm/tl/6_rpc_result.d.ts → script/connection/1_connection_tcp.d.ts} +14 -10
  386. package/script/connection/1_connection_tcp.d.ts.map +1 -0
  387. package/script/connection/1_connection_tcp.js +196 -0
  388. package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts +3 -0
  389. package/script/deps/deno.land/std@0.224.0/io/_constants.d.ts.map +1 -0
  390. package/script/deps/deno.land/std@0.224.0/io/_constants.js +7 -0
  391. package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts +70 -0
  392. package/script/deps/deno.land/std@0.224.0/io/iterate_reader.d.ts.map +1 -0
  393. package/script/deps/deno.land/std@0.224.0/io/iterate_reader.js +91 -0
  394. package/script/deps/deno.land/std@0.224.0/io/types.d.ts +95 -0
  395. package/script/deps/deno.land/std@0.224.0/io/types.d.ts.map +1 -0
  396. package/script/deps/deno.land/std@0.224.0/io/types.js +4 -0
  397. package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts +39 -0
  398. package/script/deps/deno.land/std@0.224.0/io/write_all.d.ts.map +1 -0
  399. package/script/deps/deno.land/std@0.224.0/io/write_all.js +54 -0
  400. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts +45 -0
  401. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.d.ts.map +1 -0
  402. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/client.js +280 -0
  403. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts +3 -0
  404. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.d.ts.map +1 -0
  405. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/deps.js +5 -0
  406. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts +3 -0
  407. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.d.ts.map +1 -0
  408. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +40 -0
  409. package/script/mod.d.ts +0 -1
  410. package/script/mod.d.ts.map +1 -1
  411. package/script/mod.js +0 -1
  412. package/script/tl/0_api.d.ts +14813 -0
  413. package/script/tl/0_api.d.ts.map +1 -0
  414. package/script/tl/0_api.js +23248 -0
  415. package/script/tl/1_utilities.d.ts +32 -0
  416. package/script/tl/1_utilities.d.ts.map +1 -0
  417. package/script/tl/1_utilities.js +76 -0
  418. package/script/tl/1_utilities_test.d.ts.map +1 -0
  419. package/script/tl/2_deserialize.d.ts +23 -0
  420. package/script/tl/2_deserialize.d.ts.map +1 -0
  421. package/script/tl/{3_deserialize.js → 2_deserialize.js} +19 -20
  422. package/script/tl/2_serialize.d.ts +22 -0
  423. package/script/tl/2_serialize.d.ts.map +1 -0
  424. package/script/tl/2_serialize.js +164 -0
  425. package/script/tl/2_serialize_test.d.ts.map +1 -0
  426. package/script/tl/{4_tl_reader.d.ts → 3_tl_reader.d.ts} +3 -3
  427. package/script/tl/3_tl_reader.d.ts.map +1 -0
  428. package/script/tl/{4_tl_reader.js → 3_tl_reader.js} +5 -5
  429. package/script/tl/3_utilities.d.ts +5 -5
  430. package/script/tl/3_utilities.d.ts.map +1 -1
  431. package/script/tl/3_utilities.js +9 -10
  432. package/script/tl/4_rpc_result.d.ts +27 -0
  433. package/script/tl/4_rpc_result.d.ts.map +1 -0
  434. package/{esm/tl/8_message_container.d.ts → script/tl/4_rpc_result.js} +12 -12
  435. package/{esm/tl/5_tl_writer.d.ts → script/tl/4_tl_writer.d.ts} +2 -2
  436. package/script/tl/4_tl_writer.d.ts.map +1 -0
  437. package/script/tl/{5_tl_writer.js → 4_tl_writer.js} +4 -4
  438. package/script/tl/5_message.d.ts +39 -0
  439. package/script/tl/5_message.d.ts.map +1 -0
  440. package/script/tl/5_message.js +106 -0
  441. package/script/tl/5_message_test.d.ts.map +1 -0
  442. package/script/transport/3_transport_provider_tcp.d.ts +14 -0
  443. package/script/transport/3_transport_provider_tcp.d.ts.map +1 -0
  444. package/script/transport/3_transport_provider_tcp.js +19 -0
  445. package/script/types/0_birthday.d.ts +2 -2
  446. package/script/types/0_birthday.d.ts.map +1 -1
  447. package/script/types/0_callback_query_answer.d.ts +2 -2
  448. package/script/types/0_callback_query_answer.d.ts.map +1 -1
  449. package/script/types/0_chat_administrator_rights.d.ts +3 -3
  450. package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
  451. package/script/types/0_chat_administrator_rights.js +1 -11
  452. package/script/types/0_chat_member_rights.d.ts +3 -3
  453. package/script/types/0_chat_member_rights.d.ts.map +1 -1
  454. package/script/types/0_chat_member_rights.js +3 -3
  455. package/script/types/0_chat_photo.d.ts +2 -2
  456. package/script/types/0_chat_photo.d.ts.map +1 -1
  457. package/script/types/0_chat_photo.js +1 -1
  458. package/script/types/0_contact.d.ts +2 -2
  459. package/script/types/0_contact.d.ts.map +1 -1
  460. package/script/types/0_dice.d.ts +2 -2
  461. package/script/types/0_dice.d.ts.map +1 -1
  462. package/script/types/0_giveaway_parameters.d.ts +2 -2
  463. package/script/types/0_giveaway_parameters.d.ts.map +1 -1
  464. package/script/types/0_giveaway_parameters.js +2 -2
  465. package/script/types/0_link_preview.d.ts +2 -2
  466. package/script/types/0_link_preview.d.ts.map +1 -1
  467. package/script/types/0_live_stream_channel.d.ts +2 -2
  468. package/script/types/0_live_stream_channel.d.ts.map +1 -1
  469. package/script/types/0_location.d.ts +2 -2
  470. package/script/types/0_location.d.ts.map +1 -1
  471. package/script/types/0_location.js +4 -4
  472. package/script/types/0_mask_position.d.ts +2 -2
  473. package/script/types/0_mask_position.d.ts.map +1 -1
  474. package/script/types/0_message_entity.d.ts +3 -3
  475. package/script/types/0_message_entity.d.ts.map +1 -1
  476. package/script/types/0_message_entity.js +41 -41
  477. package/script/types/0_message_search_filter.d.ts +2 -2
  478. package/script/types/0_message_search_filter.d.ts.map +1 -1
  479. package/script/types/0_message_search_filter.js +14 -15
  480. package/script/types/0_opening_hours.d.ts +2 -2
  481. package/script/types/0_opening_hours.d.ts.map +1 -1
  482. package/script/types/0_poll_option.d.ts +2 -2
  483. package/script/types/0_poll_option.d.ts.map +1 -1
  484. package/script/types/0_reaction.d.ts +3 -3
  485. package/script/types/0_reaction.d.ts.map +1 -1
  486. package/script/types/0_reaction.js +3 -3
  487. package/script/types/0_restriction_reason.d.ts +2 -2
  488. package/script/types/0_restriction_reason.d.ts.map +1 -1
  489. package/script/types/0_thumbnail.d.ts +2 -2
  490. package/script/types/0_thumbnail.d.ts.map +1 -1
  491. package/script/types/0_thumbnail.js +2 -2
  492. package/script/types/0_video_chat.d.ts +2 -2
  493. package/script/types/0_video_chat.d.ts.map +1 -1
  494. package/script/types/0_video_chat.js +1 -1
  495. package/script/types/0_voice.d.ts +2 -2
  496. package/script/types/0_voice.d.ts.map +1 -1
  497. package/script/types/1_animation.d.ts +2 -2
  498. package/script/types/1_animation.d.ts.map +1 -1
  499. package/script/types/1_animation.js +1 -1
  500. package/script/types/1_audio.d.ts +2 -2
  501. package/script/types/1_audio.d.ts.map +1 -1
  502. package/script/types/1_audio.js +1 -1
  503. package/script/types/1_bot_command_scope.d.ts +9 -2
  504. package/script/types/1_bot_command_scope.d.ts.map +1 -1
  505. package/script/types/1_bot_command_scope.js +8 -8
  506. package/script/types/1_chat_p.d.ts +5 -5
  507. package/script/types/1_chat_p.d.ts.map +1 -1
  508. package/script/types/1_chat_p.js +5 -5
  509. package/script/types/1_document.d.ts +2 -2
  510. package/script/types/1_document.d.ts.map +1 -1
  511. package/script/types/1_document.js +1 -1
  512. package/script/types/1_giveaway.d.ts +2 -2
  513. package/script/types/1_giveaway.d.ts.map +1 -1
  514. package/script/types/1_keyboard_button.d.ts +3 -3
  515. package/script/types/1_keyboard_button.d.ts.map +1 -1
  516. package/script/types/1_keyboard_button.js +17 -44
  517. package/script/types/1_message_reaction.d.ts +2 -2
  518. package/script/types/1_message_reaction.d.ts.map +1 -1
  519. package/script/types/1_message_reaction.js +4 -4
  520. package/script/types/1_photo.d.ts +5 -5
  521. package/script/types/1_photo.d.ts.map +1 -1
  522. package/script/types/1_photo.js +3 -3
  523. package/script/types/1_poll.d.ts +2 -2
  524. package/script/types/1_poll.d.ts.map +1 -1
  525. package/script/types/1_reaction_count.d.ts +2 -2
  526. package/script/types/1_reaction_count.d.ts.map +1 -1
  527. package/script/types/1_reply_quote.d.ts +2 -2
  528. package/script/types/1_reply_quote.d.ts.map +1 -1
  529. package/script/types/1_sticker.d.ts +3 -3
  530. package/script/types/1_sticker.d.ts.map +1 -1
  531. package/script/types/1_sticker.js +8 -8
  532. package/script/types/1_story_privacy.d.ts +3 -3
  533. package/script/types/1_story_privacy.d.ts.map +1 -1
  534. package/script/types/1_story_privacy.js +13 -13
  535. package/script/types/1_story_reaction.d.ts +2 -2
  536. package/script/types/1_story_reaction.d.ts.map +1 -1
  537. package/script/types/1_user.d.ts +2 -2
  538. package/script/types/1_user.d.ts.map +1 -1
  539. package/script/types/1_user.js +1 -1
  540. package/script/types/1_venue.d.ts +2 -2
  541. package/script/types/1_venue.d.ts.map +1 -1
  542. package/script/types/1_venue.js +1 -1
  543. package/script/types/1_video.d.ts +2 -2
  544. package/script/types/1_video.d.ts.map +1 -1
  545. package/script/types/1_video.js +1 -1
  546. package/script/types/1_video_note.d.ts +2 -2
  547. package/script/types/1_video_note.d.ts.map +1 -1
  548. package/script/types/1_video_note.js +1 -1
  549. package/script/types/2_business_connection.d.ts +2 -2
  550. package/script/types/2_business_connection.d.ts.map +1 -1
  551. package/script/types/2_business_connection.js +1 -2
  552. package/script/types/2_chat.d.ts +2 -2
  553. package/script/types/2_chat.d.ts.map +1 -1
  554. package/script/types/2_chat.js +10 -10
  555. package/script/types/2_chat_member.d.ts +2 -2
  556. package/script/types/2_chat_member.d.ts.map +1 -1
  557. package/script/types/2_chat_member.js +9 -9
  558. package/script/types/2_chosen_inline_result.d.ts +2 -2
  559. package/script/types/2_chosen_inline_result.d.ts.map +1 -1
  560. package/script/types/2_chosen_inline_result.js +4 -4
  561. package/script/types/2_game.d.ts +2 -2
  562. package/script/types/2_game.d.ts.map +1 -1
  563. package/script/types/2_game.js +3 -3
  564. package/script/types/2_inactive_chat.d.ts +2 -2
  565. package/script/types/2_inactive_chat.d.ts.map +1 -1
  566. package/script/types/2_inactive_chat.js +1 -1
  567. package/script/types/2_inline_keyboard_button.d.ts +3 -3
  568. package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
  569. package/script/types/2_inline_keyboard_button.js +14 -20
  570. package/script/types/2_inline_query.d.ts +2 -2
  571. package/script/types/2_inline_query.d.ts.map +1 -1
  572. package/script/types/2_inline_query.js +7 -7
  573. package/script/types/2_invite_link.d.ts +2 -2
  574. package/script/types/2_invite_link.d.ts.map +1 -1
  575. package/script/types/2_invite_link.js +1 -2
  576. package/script/types/2_message_reaction_count.d.ts +2 -2
  577. package/script/types/2_message_reaction_count.d.ts.map +1 -1
  578. package/script/types/2_message_reactions.d.ts +2 -2
  579. package/script/types/2_message_reactions.d.ts.map +1 -1
  580. package/script/types/2_message_reactions.js +1 -1
  581. package/script/types/2_story_content.d.ts +2 -2
  582. package/script/types/2_story_content.d.ts.map +1 -1
  583. package/script/types/2_story_content.js +5 -5
  584. package/script/types/2_story_interactions.d.ts +2 -2
  585. package/script/types/2_story_interactions.d.ts.map +1 -1
  586. package/script/types/2_story_interactive_area.d.ts +3 -3
  587. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  588. package/script/types/2_story_interactive_area.js +18 -28
  589. package/script/types/3_chat_member_updated.d.ts +2 -2
  590. package/script/types/3_chat_member_updated.d.ts.map +1 -1
  591. package/script/types/3_chat_member_updated.js +6 -6
  592. package/script/types/3_reply_markup.d.ts +3 -3
  593. package/script/types/3_reply_markup.d.ts.map +1 -1
  594. package/script/types/3_reply_markup.js +11 -21
  595. package/script/types/3_story.d.ts +2 -2
  596. package/script/types/3_story.d.ts.map +1 -1
  597. package/script/types/4_inline_query_result.d.ts +3 -3
  598. package/script/types/4_inline_query_result.d.ts.map +1 -1
  599. package/script/types/4_inline_query_result.js +52 -160
  600. package/script/types/4_message.d.ts +3 -3
  601. package/script/types/4_message.d.ts.map +1 -1
  602. package/script/types/4_message.js +67 -58
  603. package/script/types/5_callback_query.d.ts +3 -3
  604. package/script/types/5_callback_query.d.ts.map +1 -1
  605. package/script/types/5_callback_query.js +4 -4
  606. package/script/types/5_chat_list_item.d.ts +3 -3
  607. package/script/types/5_chat_list_item.d.ts.map +1 -1
  608. package/script/types/5_chat_list_item.js +1 -1
  609. package/script/types/5_inline_query_answer.d.ts +2 -2
  610. package/script/types/5_inline_query_answer.d.ts.map +1 -1
  611. package/script/types/_file_id.d.ts +2 -2
  612. package/script/types/_file_id.d.ts.map +1 -1
  613. package/script/types/_file_id.js +3 -3
  614. package/script/types/_getters.d.ts +7 -7
  615. package/script/types/_getters.d.ts.map +1 -1
  616. package/esm/tl/1_tl_object.d.ts +0 -64
  617. package/esm/tl/1_tl_object.d.ts.map +0 -1
  618. package/esm/tl/1_tl_object.js +0 -221
  619. package/esm/tl/1_tl_object_test.d.ts.map +0 -1
  620. package/esm/tl/2_types.d.ts +0 -28060
  621. package/esm/tl/2_types.d.ts.map +0 -1
  622. package/esm/tl/2_types.js +0 -68685
  623. package/esm/tl/2_types_test.d.ts.map +0 -1
  624. package/esm/tl/3_deserialize.d.ts +0 -23
  625. package/esm/tl/3_deserialize.d.ts.map +0 -1
  626. package/esm/tl/3_functions.d.ts +0 -14094
  627. package/esm/tl/3_functions.d.ts.map +0 -1
  628. package/esm/tl/3_functions.js +0 -28475
  629. package/esm/tl/3_functions_test.d.ts.map +0 -1
  630. package/esm/tl/4_tl_reader.d.ts.map +0 -1
  631. package/esm/tl/5_tl_writer.d.ts.map +0 -1
  632. package/esm/tl/6_rpc_result.d.ts.map +0 -1
  633. package/esm/tl/6_rpc_result.js +0 -49
  634. package/esm/tl/7_message.d.ts.map +0 -1
  635. package/esm/tl/7_message.js +0 -90
  636. package/esm/tl/7_message_test.d.ts.map +0 -1
  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/1_tl_object_test.d.ts.map +0 -1
  643. package/script/tl/2_types.d.ts +0 -28060
  644. package/script/tl/2_types.d.ts.map +0 -1
  645. package/script/tl/2_types.js +0 -70558
  646. package/script/tl/2_types_test.d.ts.map +0 -1
  647. package/script/tl/3_deserialize.d.ts +0 -23
  648. package/script/tl/3_deserialize.d.ts.map +0 -1
  649. package/script/tl/3_functions.d.ts +0 -14094
  650. package/script/tl/3_functions.d.ts.map +0 -1
  651. package/script/tl/3_functions.js +0 -29121
  652. package/script/tl/3_functions_test.d.ts.map +0 -1
  653. package/script/tl/4_tl_reader.d.ts.map +0 -1
  654. package/script/tl/5_tl_writer.d.ts.map +0 -1
  655. package/script/tl/6_rpc_result.d.ts +0 -30
  656. package/script/tl/6_rpc_result.d.ts.map +0 -1
  657. package/script/tl/6_rpc_result.js +0 -53
  658. package/script/tl/7_message.d.ts +0 -32
  659. package/script/tl/7_message.d.ts.map +0 -1
  660. package/script/tl/7_message.js +0 -95
  661. package/script/tl/7_message_test.d.ts.map +0 -1
  662. package/script/tl/8_message_container.d.ts +0 -32
  663. package/script/tl/8_message_container.d.ts.map +0 -1
  664. package/script/tl/8_message_container.js +0 -76
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { enums } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { EntityGetter } from "./_getters.js";
22
22
  /** @unlisted */
23
23
  export interface StoryPrivacyEveryone {
@@ -41,6 +41,6 @@ export interface StoryPrivacyOnly {
41
41
  }
42
42
  /** A story's privacy choice. */
43
43
  export type StoryPrivacy = StoryPrivacyEveryone | StoryPrivacyConctacts | StoryPrivacyCloseFriends | StoryPrivacyOnly;
44
- export declare function storyPrivacyToTlObject(privacy: StoryPrivacy, getEntity: EntityGetter): Promise<enums.InputPrivacyRule[]>;
45
- export declare function constructStoryPrivacy(privacy: enums.PrivacyRule[]): StoryPrivacy;
44
+ export declare function storyPrivacyToTlObject(privacy: StoryPrivacy, getEntity: EntityGetter): Promise<Api.InputPrivacyRule[]>;
45
+ export declare function constructStoryPrivacy(privacy: Api.PrivacyRule[]): StoryPrivacy;
46
46
  //# sourceMappingURL=1_story_privacy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/1_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,KAAK,EAAS,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,qBAAqB;IACrB,YAAY,EAAE,IAAI,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,gCAAgC;AAChC,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,CAAC;AAqBrB,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAkB9H;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,EAAE,GAAG,YAAY,CAYhF"}
1
+ {"version":3,"file":"1_story_privacy.d.ts","sourceRoot":"","sources":["../../src/types/1_story_privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,qBAAqB;IACrB,YAAY,EAAE,IAAI,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,qBAAqB;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,gCAAgC;AAChC,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,CAAC;AAqBrB,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAkB5H;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,GAAG,YAAY,CAY9E"}
@@ -25,12 +25,12 @@ const _2_tl_js_1 = require("../2_tl.js");
25
25
  async function resolveUsers(ids, getEntity) {
26
26
  const users = new Array();
27
27
  for (const id of ids) {
28
- const entity = await getEntity(new _2_tl_js_1.types.PeerUser({ user_id: BigInt(id) }));
29
- if (!(entity instanceof _2_tl_js_1.types.User)) {
28
+ const entity = await getEntity({ _: "peerUser", user_id: BigInt(id) });
29
+ if (!((0, _2_tl_js_1.is)("user", entity))) {
30
30
  (0, _0_deps_js_1.unreachable)();
31
31
  }
32
32
  else {
33
- users.push(new _2_tl_js_1.types.InputUser({ user_id: entity.id, access_hash: entity.access_hash ?? 0n }));
33
+ users.push({ _: "inputUser", user_id: entity.id, access_hash: entity.access_hash ?? 0n });
34
34
  }
35
35
  }
36
36
  return users;
@@ -38,44 +38,44 @@ async function resolveUsers(ids, getEntity) {
38
38
  async function restrict(users_, rules, getEntity) {
39
39
  if (users_.length) {
40
40
  const users = await resolveUsers(users_, getEntity);
41
- rules.push(new _2_tl_js_1.types.InputPrivacyValueDisallowUsers({ users }));
41
+ rules.push({ _: "inputPrivacyValueDisallowUsers", users });
42
42
  }
43
43
  }
44
44
  async function storyPrivacyToTlObject(privacy, getEntity) {
45
45
  const rules = new Array();
46
46
  if ("everyoneExcept" in privacy) {
47
47
  await restrict(privacy.everyoneExcept, rules, getEntity);
48
- rules.push(new _2_tl_js_1.types.InputPrivacyValueAllowAll());
48
+ rules.push({ _: "inputPrivacyValueAllowAll" });
49
49
  }
50
50
  else if ("contactsExcept" in privacy) {
51
51
  await restrict(privacy.contactsExcept, rules, getEntity);
52
- rules.push(new _2_tl_js_1.types.InputPrivacyValueAllowContacts());
52
+ rules.push({ _: "inputPrivacyValueAllowContacts" });
53
53
  }
54
54
  else if ("closeFriends" in privacy) {
55
- rules.push(new _2_tl_js_1.types.InputPrivacyValueAllowCloseFriends());
55
+ rules.push({ _: "inputPrivacyValueAllowCloseFriends" });
56
56
  }
57
57
  else if ("only" in privacy) {
58
58
  if (!privacy.only.length) {
59
59
  (0, _0_deps_js_1.unreachable)();
60
60
  }
61
61
  const users = await resolveUsers(privacy.only, getEntity);
62
- rules.push(new _2_tl_js_1.types.InputPrivacyValueAllowUsers({ users }));
62
+ rules.push({ _: "inputPrivacyValueAllowUsers", users });
63
63
  }
64
64
  return rules;
65
65
  }
66
66
  exports.storyPrivacyToTlObject = storyPrivacyToTlObject;
67
67
  function constructStoryPrivacy(privacy) {
68
- const except = privacy.find((v) => v instanceof _2_tl_js_1.types.PrivacyValueDisallowUsers)?.users?.map(Number) ?? [];
69
- if (privacy.some((v) => v instanceof _2_tl_js_1.types.PrivacyValueAllowAll)) {
68
+ const except = privacy.find((v) => (0, _2_tl_js_1.is)("privacyValueDisallowUsers", v))?.users?.map(Number) ?? [];
69
+ if (privacy.some((v) => (0, _2_tl_js_1.is)("privacyValueAllowAll", v))) {
70
70
  return { everyoneExcept: except };
71
71
  }
72
- else if (privacy.some((v) => v instanceof _2_tl_js_1.types.PrivacyValueAllowContacts)) {
72
+ else if (privacy.some((v) => (0, _2_tl_js_1.is)("privacyValueAllowContacts", v))) {
73
73
  return { contactsExcept: except };
74
74
  }
75
- else if (privacy.some((v) => v instanceof _2_tl_js_1.types.PrivacyValueAllowCloseFriends)) {
75
+ else if (privacy.some((v) => (0, _2_tl_js_1.is)("privacyValueAllowCloseFriends", v))) {
76
76
  return { closeFriends: true };
77
77
  }
78
- const only = privacy.find((v) => v instanceof _2_tl_js_1.types.PrivacyValueAllowUsers)?.users?.map(Number) ?? [];
78
+ const only = privacy.find((v) => (0, _2_tl_js_1.is)("privacyValueAllowUsers", v))?.users?.map(Number) ?? [];
79
79
  return { only };
80
80
  }
81
81
  exports.constructStoryPrivacy = constructStoryPrivacy;
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { Reaction } from "./0_reaction.js";
22
22
  /** Represents a type of reaction made to a story. */
23
23
  export interface StoryReaction {
@@ -28,5 +28,5 @@ export interface StoryReaction {
28
28
  /** Whether the current user made this reaction. */
29
29
  chosen: boolean;
30
30
  }
31
- export declare function constructStoryReaction(reaction_: types.ReactionCount): StoryReaction;
31
+ export declare function constructStoryReaction(reaction_: Api.reactionCount): StoryReaction;
32
32
  //# sourceMappingURL=1_story_reaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_story_reaction.d.ts","sourceRoot":"","sources":["../../src/types/1_story_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,KAAK,CAAC,aAAa,GAAG,aAAa,CAKpF"}
1
+ {"version":3,"file":"1_story_reaction.d.ts","sourceRoot":"","sources":["../../src/types/1_story_reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,GAAG,CAAC,aAAa,GAAG,aAAa,CAKlF"}
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { ChatPhoto } from "./0_chat_photo.js";
22
22
  /** A user. */
23
23
  export interface User {
@@ -52,5 +52,5 @@ export interface User {
52
52
  /** Whether the user is a bot that has been added to the attachment menu by the current user. */
53
53
  addedToAttachmentMenu: boolean;
54
54
  }
55
- export declare function constructUser(user_: types.User): User;
55
+ export declare function constructUser(user_: Api.user): User;
56
56
  //# sourceMappingURL=1_user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_user.d.ts","sourceRoot":"","sources":["../../src/types/1_user.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAsB,MAAM,mBAAmB,CAAC;AAElE,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;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+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,gGAAgG;IAChG,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAyBnD"}
@@ -43,7 +43,7 @@ function constructUser(user_) {
43
43
  isSupport: user_.support || false,
44
44
  addedToAttachmentMenu: user_.attach_menu_enabled || false,
45
45
  };
46
- if (user_.photo instanceof _2_tl_js_1.types.UserProfilePhoto) {
46
+ if ((0, _2_tl_js_1.is)("userProfilePhoto", user_.photo)) {
47
47
  user.photo = (0, _0_chat_photo_js_1.constructChatPhoto)(user_.photo, user.id, user_.access_hash ?? 0n);
48
48
  }
49
49
  return (0, _1_utilities_js_1.cleanObject)(user);
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { Location } from "./0_location.js";
22
22
  /** A shared venue. */
23
23
  export interface Venue {
@@ -32,5 +32,5 @@ export interface Venue {
32
32
  /** The Foursquare type of the venue. */
33
33
  foursquareType?: string;
34
34
  }
35
- export declare function constructVenue(media_: types.MessageMediaVenue | types.MediaAreaVenue): Venue;
35
+ export declare function constructVenue(media_: Api.messageMediaVenue | Api.mediaAreaVenue): Venue;
36
36
  //# sourceMappingURL=1_venue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_venue.d.ts","sourceRoot":"","sources":["../../src/types/1_venue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAM,KAAK,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,sBAAsB;AACtB,MAAM,WAAW,KAAK;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,cAAc,GAAG,KAAK,CAa5F"}
1
+ {"version":3,"file":"1_venue.d.ts","sourceRoot":"","sources":["../../src/types/1_venue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,sBAAsB;AACtB,MAAM,WAAW,KAAK;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,cAAc,GAAG,KAAK,CAaxF"}
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.constructVenue = void 0;
23
23
  const _2_tl_js_1 = require("../2_tl.js");
24
24
  function constructVenue(media_) {
25
- const geo = media_.geo[_2_tl_js_1.as](_2_tl_js_1.types.GeoPoint);
25
+ const geo = (0, _2_tl_js_1.as)("geoPoint", media_.geo);
26
26
  return {
27
27
  location: {
28
28
  latitude: geo.lat,
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { Thumbnail } from "./0_thumbnail.js";
22
22
  /** A video file. */
23
23
  export interface Video {
@@ -40,5 +40,5 @@ export interface Video {
40
40
  /** Size of the file in bytes. */
41
41
  fileSize: number;
42
42
  }
43
- export declare function constructVideo(document: types.Document, videoAttribute: types.DocumentAttributeVideo, fileName: string | undefined, fileId: string, fileUniqueId: string): Video;
43
+ export declare function constructVideo(document: Api.document, videoAttribute: Api.documentAttributeVideo, fileName: string | undefined, fileId: string, fileUniqueId: string): Video;
44
44
  //# sourceMappingURL=1_video.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,CAAC,sBAAsB,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAYhL"}
1
+ {"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAY5K"}
@@ -29,7 +29,7 @@ function constructVideo(document, videoAttribute, fileName, fileId, fileUniqueId
29
29
  width: videoAttribute.w,
30
30
  height: videoAttribute.h,
31
31
  duration: videoAttribute.duration,
32
- thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof _2_tl_js_1.types.PhotoSize ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
32
+ thumbnails: document.thumbs ? document.thumbs.map((v) => (0, _2_tl_js_1.is)("photoSize", v) ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
33
33
  fileName,
34
34
  mimeType: document.mime_type,
35
35
  fileSize: Number(document.size),
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { Thumbnail } from "./0_thumbnail.js";
22
22
  /** A video note. */
23
23
  export interface VideoNote {
@@ -36,5 +36,5 @@ export interface VideoNote {
36
36
  /** Size of the file in bytes. */
37
37
  fileSize: number;
38
38
  }
39
- export declare function constructVideoNote(document: types.Document, videoAttribute: types.DocumentAttributeVideo, fileId: string, fileUniqueId: string): VideoNote;
39
+ export declare function constructVideoNote(document: Api.document, videoAttribute: Api.documentAttributeVideo, fileId: string, fileUniqueId: string): VideoNote;
40
40
  //# sourceMappingURL=1_video_note.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAS1J"}
1
+ {"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAStJ"}
@@ -28,7 +28,7 @@ function constructVideoNote(document, videoAttribute, fileId, fileUniqueId) {
28
28
  fileUniqueId,
29
29
  length: videoAttribute.w,
30
30
  duration: videoAttribute.duration,
31
- thumbnails: document.thumbs ? document.thumbs.map((v) => v instanceof _2_tl_js_1.types.PhotoSize ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
31
+ thumbnails: document.thumbs ? document.thumbs.map((v) => (0, _2_tl_js_1.is)("photoSize", v) ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
32
32
  fileSize: Number(document.size),
33
33
  };
34
34
  }
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { EntityGetter } from "./_getters.js";
22
22
  import { User } from "./1_user.js";
23
23
  /** A business connection. */
@@ -33,5 +33,5 @@ export interface BusinessConnection {
33
33
  /** Whether the connection is active. */
34
34
  isEnabled: boolean;
35
35
  }
36
- export declare function constructBusinessConnection(connection: types.BotBusinessConnection, getEntity: EntityGetter): Promise<BusinessConnection>;
36
+ export declare function constructBusinessConnection(connection: Api.botBusinessConnection, getEntity: EntityGetter): Promise<BusinessConnection>;
37
37
  //# sourceMappingURL=2_business_connection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_business_connection.d.ts","sourceRoot":"","sources":["../../src/types/2_business_connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,6BAA6B;AAC7B,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,IAAI,EAAE,IAAI,CAAC;IACX,sEAAsE;IACtE,IAAI,EAAE,IAAI,CAAC;IACX,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,2BAA2B,CAAC,UAAU,EAAE,KAAK,CAAC,qBAAqB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAQ/I"}
1
+ {"version":3,"file":"2_business_connection.d.ts","sourceRoot":"","sources":["../../src/types/2_business_connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,6BAA6B;AAC7B,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,IAAI,EAAE,IAAI,CAAC;IACX,sEAAsE;IACtE,IAAI,EAAE,IAAI,CAAC;IACX,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,2BAA2B,CAAC,UAAU,EAAE,GAAG,CAAC,qBAAqB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAQ7I"}
@@ -21,12 +21,11 @@
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.constructBusinessConnection = void 0;
23
23
  const _1_utilities_js_1 = require("../1_utilities.js");
24
- const _2_tl_js_1 = require("../2_tl.js");
25
24
  const _1_user_js_1 = require("./1_user.js");
26
25
  async function constructBusinessConnection(connection, getEntity) {
27
26
  return {
28
27
  id: connection.connection_id,
29
- user: (0, _1_user_js_1.constructUser)((await getEntity(new _2_tl_js_1.types.PeerUser(connection)))),
28
+ user: (0, _1_user_js_1.constructUser)((await getEntity({ ...connection, _: "peerUser" }))),
30
29
  date: (0, _1_utilities_js_1.fromUnixTimestamp)(connection.date),
31
30
  canReply: !!connection.can_reply,
32
31
  isEnabled: !connection.disabled,
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { EntityGetter } from "./_getters.js";
22
22
  import { OpeningHours } from "./0_opening_hours.js";
23
23
  import { ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup } from "./1_chat_p.js";
@@ -59,5 +59,5 @@ export interface ChatPrivate extends ChatBase, ChatPPrivate {
59
59
  * A chat with more fields.
60
60
  */
61
61
  export type Chat = ChatChannel | ChatSupergroup | ChatGroup | ChatPrivate;
62
- export declare function constructChat(fullChat: types.UserFull | types.ChatFull | types.ChannelFull, getEntity: EntityGetter): Promise<Chat>;
62
+ export declare function constructChat(fullChat: Api.userFull | Api.chatFull | Api.channelFull, getEntity: EntityGetter): Promise<Chat>;
63
63
  //# sourceMappingURL=2_chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAyB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAkB,MAAM,eAAe,CAAC;AAExG,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAqB,MAAM,iBAAiB,CAAC;AAG9D,gBAAgB;AAChB,MAAM,WAAW,QAAQ;IACvB,wBAAwB;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,WAAY,SAAQ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_js_1 = require("../1_utilities.js");
31
31
  async function constructChat(fullChat, getEntity) {
32
- if (fullChat instanceof _2_tl_js_1.types.UserFull) {
33
- const user = await getEntity(new _2_tl_js_1.types.PeerUser({ user_id: fullChat.id }));
32
+ if ((0, _2_tl_js_1.is)("userFull", fullChat)) {
33
+ const user = await getEntity({ _: "peerUser", user_id: fullChat.id });
34
34
  if (user == null)
35
35
  (0, _0_deps_js_1.unreachable)();
36
36
  const chatP = (0, _1_chat_p_js_1.constructChatP)(user);
37
37
  return (0, _1_utilities_js_1.cleanObject)({
38
38
  ...chatP,
39
39
  birthday: fullChat.birthday ? (0, _0_birthday_js_1.constructBirthday)(fullChat.birthday) : undefined,
40
- photo: fullChat.profile_photo && fullChat.profile_photo instanceof _2_tl_js_1.types.Photo ? (0, _1_photo_js_1.constructPhoto)(fullChat.profile_photo) : undefined,
40
+ photo: fullChat.profile_photo && (0, _2_tl_js_1.is)("photo", fullChat.profile_photo) ? (0, _1_photo_js_1.constructPhoto)(fullChat.profile_photo) : undefined,
41
41
  address: fullChat.business_location?.address,
42
- location: fullChat.business_location?.geo_point && fullChat.business_location.geo_point instanceof _2_tl_js_1.types.GeoPoint ? (0, _0_location_js_1.constructLocation)(fullChat.business_location.geo_point) : undefined,
42
+ location: fullChat.business_location?.geo_point && (0, _2_tl_js_1.is)("geoPoint", fullChat.business_location.geo_point) ? (0, _0_location_js_1.constructLocation)(fullChat.business_location.geo_point) : undefined,
43
43
  openingHours: fullChat.business_work_hours ? (0, _0_opening_hours_js_1.constructOpeningHours)(fullChat.business_work_hours) : undefined,
44
44
  });
45
45
  }
46
- else if (fullChat instanceof _2_tl_js_1.types.ChatFull) {
47
- const chat = await getEntity(new _2_tl_js_1.types.PeerChat({ chat_id: fullChat.id }));
46
+ else if ((0, _2_tl_js_1.is)("chatFull", fullChat)) {
47
+ const chat = await getEntity({ _: "peerChat", chat_id: fullChat.id });
48
48
  if (chat == null)
49
49
  (0, _0_deps_js_1.unreachable)();
50
50
  const chatP = (0, _1_chat_p_js_1.constructChatP)(chat);
51
51
  return (0, _1_utilities_js_1.cleanObject)({
52
52
  ...chatP,
53
- photo: fullChat.chat_photo && fullChat.chat_photo instanceof _2_tl_js_1.types.Photo ? (0, _1_photo_js_1.constructPhoto)(fullChat.chat_photo) : undefined,
53
+ photo: fullChat.chat_photo && (0, _2_tl_js_1.is)("photo", fullChat.chat_photo) ? (0, _1_photo_js_1.constructPhoto)(fullChat.chat_photo) : undefined,
54
54
  videoChatId: fullChat.call ? String(fullChat.call.id) : undefined,
55
55
  });
56
56
  }
57
- else if (fullChat instanceof _2_tl_js_1.types.ChannelFull) {
58
- const chat = await getEntity(new _2_tl_js_1.types.PeerChannel({ channel_id: fullChat.id }));
57
+ else if ((0, _2_tl_js_1.is)("channelFull", fullChat)) {
58
+ const chat = await getEntity({ _: "peerChannel", channel_id: fullChat.id });
59
59
  if (chat == null)
60
60
  (0, _0_deps_js_1.unreachable)();
61
61
  const chatP = (0, _1_chat_p_js_1.constructChatP)(chat);
62
62
  return (0, _1_utilities_js_1.cleanObject)({
63
63
  ...chatP,
64
- photo: fullChat.chat_photo && fullChat.chat_photo instanceof _2_tl_js_1.types.Photo ? (0, _1_photo_js_1.constructPhoto)(fullChat.chat_photo) : undefined,
64
+ photo: fullChat.chat_photo && (0, _2_tl_js_1.is)("photo", fullChat.chat_photo) ? (0, _1_photo_js_1.constructPhoto)(fullChat.chat_photo) : undefined,
65
65
  videoChatId: fullChat.call ? String(fullChat.call.id) : undefined,
66
66
  });
67
67
  }
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { enums } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { EntityGetter } from "./_getters.js";
22
22
  import { ChatAdministratorRights } from "./0_chat_administrator_rights.js";
23
23
  import { ChatMemberRights } from "./0_chat_member_rights.js";
@@ -63,5 +63,5 @@ export interface ChatMemberBanned extends _ChatMemberBase {
63
63
  }
64
64
  /** A chat member. */
65
65
  export type ChatMember = ChatMemberCreator | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
66
- export declare function constructChatMember(participant: enums.ChannelParticipant | enums.ChatParticipant, getEntity: EntityGetter): Promise<ChatMember>;
66
+ export declare function constructChatMember(participant: Api.ChannelParticipant | Api.ChatParticipant, getEntity: EntityGetter): Promise<ChatMember>;
67
67
  //# sourceMappingURL=2_chat_member.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,KAAK,EAAS,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAoC,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAA6B,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzG,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,CAAC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C,UAAU,CAAC,CA0EjJ"}
@@ -27,17 +27,17 @@ const _0_chat_administrator_rights_js_1 = require("./0_chat_administrator_rights
27
27
  const _0_chat_member_rights_js_1 = require("./0_chat_member_rights.js");
28
28
  const _1_user_js_1 = require("./1_user.js");
29
29
  async function constructChatMember(participant, getEntity) {
30
- const user_ = "user_id" in participant ? await getEntity(new _2_tl_js_1.types.PeerUser(participant)) : "peer" in participant ? participant.peer instanceof _2_tl_js_1.types.PeerUser ? await getEntity(participant.peer) : (0, _0_deps_js_1.unreachable)() : (0, _0_deps_js_1.unreachable)(); // TODO: support other peer types
30
+ const user_ = "user_id" in participant ? await getEntity({ ...participant, _: "peerUser" }) : "peer" in participant ? (0, _2_tl_js_1.is)("peerUser", participant.peer) ? await getEntity(participant.peer) : (0, _0_deps_js_1.unreachable)() : (0, _0_deps_js_1.unreachable)(); // TODO: support other peer types
31
31
  if (user_ == null)
32
32
  (0, _0_deps_js_1.unreachable)();
33
33
  const user = (0, _1_user_js_1.constructUser)(user_);
34
- if (participant instanceof _2_tl_js_1.types.ChannelParticipant || participant instanceof _2_tl_js_1.types.ChatParticipant) {
34
+ if ((0, _2_tl_js_1.is)("channelParticipant", participant) || (0, _2_tl_js_1.is)("chatParticipant", participant)) {
35
35
  return {
36
36
  status: "member",
37
37
  user,
38
38
  };
39
39
  }
40
- else if (participant instanceof _2_tl_js_1.types.ChannelParticipantCreator) {
40
+ else if ((0, _2_tl_js_1.is)("channelParticipantCreator", participant)) {
41
41
  return (0, _1_utilities_js_1.cleanObject)({
42
42
  status: "creator",
43
43
  user,
@@ -45,7 +45,7 @@ async function constructChatMember(participant, getEntity) {
45
45
  title: participant.rank,
46
46
  });
47
47
  }
48
- else if (participant instanceof _2_tl_js_1.types.ChannelParticipantAdmin) {
48
+ else if ((0, _2_tl_js_1.is)("channelParticipantAdmin", participant)) {
49
49
  return (0, _1_utilities_js_1.cleanObject)({
50
50
  status: "administrator",
51
51
  user,
@@ -53,7 +53,7 @@ async function constructChatMember(participant, getEntity) {
53
53
  title: participant.rank,
54
54
  });
55
55
  }
56
- else if (participant instanceof _2_tl_js_1.types.ChannelParticipantBanned) {
56
+ else if ((0, _2_tl_js_1.is)("channelParticipantBanned", participant)) {
57
57
  const untilDate = participant.banned_rights.until_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(participant.banned_rights.until_date) : undefined;
58
58
  if (!participant.banned_rights.view_messages) {
59
59
  participant.peer;
@@ -73,13 +73,13 @@ async function constructChatMember(participant, getEntity) {
73
73
  untilDate,
74
74
  });
75
75
  }
76
- else if (participant instanceof _2_tl_js_1.types.ChannelParticipantSelf) {
76
+ else if ((0, _2_tl_js_1.is)("channelParticipantSelf", participant)) {
77
77
  (0, _0_deps_js_1.unreachable)(); // TODO: implement
78
78
  }
79
- else if (participant instanceof _2_tl_js_1.types.ChannelParticipantLeft) {
79
+ else if ((0, _2_tl_js_1.is)("channelParticipantLeft", participant)) {
80
80
  return { status: "left", user };
81
81
  }
82
- else if (participant instanceof _2_tl_js_1.types.ChatParticipantAdmin) {
82
+ else if ((0, _2_tl_js_1.is)("chatParticipantAdmin", participant)) {
83
83
  return (0, _1_utilities_js_1.cleanObject)({
84
84
  status: "administrator",
85
85
  user,
@@ -99,7 +99,7 @@ async function constructChatMember(participant, getEntity) {
99
99
  },
100
100
  });
101
101
  }
102
- else if (participant instanceof _2_tl_js_1.types.ChatParticipantCreator) {
102
+ else if ((0, _2_tl_js_1.is)("chatParticipantCreator", participant)) {
103
103
  return (0, _1_utilities_js_1.cleanObject)({
104
104
  status: "creator",
105
105
  user,
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { EntityGetter } from "./_getters.js";
22
22
  import { Location } from "./0_location.js";
23
23
  import { User } from "./1_user.js";
@@ -34,5 +34,5 @@ export interface ChosenInlineResult {
34
34
  /** The query that was used to obtain the result. */
35
35
  query: string;
36
36
  }
37
- export declare function constructChosenInlineResult(ubis: types.UpdateBotInlineSend, getEntity: EntityGetter): Promise<ChosenInlineResult>;
37
+ export declare function constructChosenInlineResult(ubis: Api.updateBotInlineSend, getEntity: EntityGetter): Promise<ChosenInlineResult>;
38
38
  //# sourceMappingURL=2_chosen_inline_result.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_chosen_inline_result.d.ts","sourceRoot":"","sources":["../../src/types/2_chosen_inline_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAa,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,KAAK,CAAC,mBAAmB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAYvI"}
1
+ {"version":3,"file":"2_chosen_inline_result.d.ts","sourceRoot":"","sources":["../../src/types/2_chosen_inline_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAiB,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,GAAG,CAAC,mBAAmB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAYrI"}
@@ -26,15 +26,15 @@ const _2_tl_js_1 = require("../2_tl.js");
26
26
  const _0_location_js_1 = require("./0_location.js");
27
27
  const _1_user_js_1 = require("./1_user.js");
28
28
  async function constructChosenInlineResult(ubis, getEntity) {
29
- const entity = await getEntity(new _2_tl_js_1.types.PeerUser(ubis));
30
- if (!entity || !(entity instanceof _2_tl_js_1.types.User)) {
29
+ const entity = await getEntity({ ...ubis, _: "peerUser" });
30
+ if (!entity || !((0, _2_tl_js_1.is)("user", entity))) {
31
31
  (0, _0_deps_js_1.unreachable)();
32
32
  }
33
33
  return (0, _1_utilities_js_1.cleanObject)({
34
34
  resultId: ubis.id,
35
35
  from: (0, _1_user_js_1.constructUser)(entity),
36
- location: ubis.geo instanceof _2_tl_js_1.types.GeoPoint ? (0, _0_location_js_1.constructLocation)(ubis.geo) : undefined,
37
- inlineMessageId: ubis.msg_id === undefined ? undefined : (0, _1_utilities_js_1.base64EncodeUrlSafe)(ubis.msg_id[_2_tl_js_1.serialize]()),
36
+ location: (0, _2_tl_js_1.is)("geoPoint", ubis.geo) ? (0, _0_location_js_1.constructLocation)(ubis.geo) : undefined,
37
+ inlineMessageId: ubis.msg_id === undefined ? undefined : (0, _1_utilities_js_1.base64EncodeUrlSafe)((0, _2_tl_js_1.serialize)(ubis.msg_id)),
38
38
  query: ubis.query,
39
39
  });
40
40
  }
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { types } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { MessageEntity } from "./0_message_entity.js";
22
22
  import { Animation } from "./1_animation.js";
23
23
  import { Photo } from "./1_photo.js";
@@ -36,5 +36,5 @@ export interface Game {
36
36
  /** An animation that is displayed when the game is shared. */
37
37
  animation?: Animation;
38
38
  }
39
- export declare function constructGame(media_: types.MessageMediaGame): Game;
39
+ export declare function constructGame(media_: Api.messageMediaGame): Game;
40
40
  //# sourceMappingURL=2_game.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_game.d.ts","sourceRoot":"","sources":["../../src/types/2_game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAM,KAAK,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAsB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,gBAAgB,GAAG,IAAI,CA0BlE"}
1
+ {"version":3,"file":"2_game.d.ts","sourceRoot":"","sources":["../../src/types/2_game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAU,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAsB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CA0BhE"}
@@ -27,7 +27,7 @@ const _1_animation_js_1 = require("./1_animation.js");
27
27
  const _1_photo_js_1 = require("./1_photo.js");
28
28
  function constructGame(media_) {
29
29
  const game_ = media_.game;
30
- const document_ = game_.document ? game_.document[_2_tl_js_1.as](_2_tl_js_1.types.Document) : undefined;
30
+ const document_ = game_.document ? (0, _2_tl_js_1.as)("document", game_.document) : undefined;
31
31
  const fileId_ = document_
32
32
  ? {
33
33
  type: _file_id_js_1.FileType.Animation,
@@ -39,9 +39,9 @@ function constructGame(media_) {
39
39
  return (0, _1_utilities_js_1.cleanObject)({
40
40
  title: game_.title,
41
41
  description: media_.game.description,
42
- photo: (0, _1_photo_js_1.constructPhoto)(game_.photo[_2_tl_js_1.as](_2_tl_js_1.types.Photo)),
42
+ photo: (0, _1_photo_js_1.constructPhoto)((0, _2_tl_js_1.as)("photo", game_.photo)),
43
43
  animation: fileId_ && document_
44
- ? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), (0, _file_id_js_1.serializeFileId)(fileId_), (0, _file_id_js_1.toUniqueFileId)(fileId_))
44
+ ? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => (0, _2_tl_js_1.is)("documentAttributeVideo", v)), document_.attributes.find((v) => (0, _2_tl_js_1.is)("documentAttributeFilename", v)), (0, _file_id_js_1.serializeFileId)(fileId_), (0, _file_id_js_1.toUniqueFileId)(fileId_))
45
45
  : undefined,
46
46
  });
47
47
  }
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { enums } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { ChatP } from "./1_chat_p.js";
22
22
  /** An inactive chat. */
23
23
  export interface InactiveChat {
@@ -26,5 +26,5 @@ export interface InactiveChat {
26
26
  /** The chat that has been marked as inactive. */
27
27
  chat: ChatP;
28
28
  }
29
- export declare function constructInactiveChat(chat_: enums.Chat, lastActivity: number): InactiveChat;
29
+ export declare function constructInactiveChat(chat_: Api.Chat, lastActivity: number): InactiveChat;
30
30
  //# sourceMappingURL=2_inactive_chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"2_inactive_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_inactive_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,KAAK,EAAS,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AAEtD,wBAAwB;AACxB,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,YAAY,EAAE,IAAI,CAAC;IACnB,iDAAiD;IACjD,IAAI,EAAE,KAAK,CAAC;CACb;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CAS3F"}
1
+ {"version":3,"file":"2_inactive_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_inactive_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AAEtD,wBAAwB;AACxB,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,YAAY,EAAE,IAAI,CAAC;IACnB,iDAAiD;IACjD,IAAI,EAAE,KAAK,CAAC;CACb;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CASzF"}
@@ -25,7 +25,7 @@ const _1_utilities_js_1 = require("../1_utilities.js");
25
25
  const _2_tl_js_1 = require("../2_tl.js");
26
26
  const _1_chat_p_js_1 = require("./1_chat_p.js");
27
27
  function constructInactiveChat(chat_, lastActivity) {
28
- if (chat_ instanceof _2_tl_js_1.types.ChatEmpty) {
28
+ if ((0, _2_tl_js_1.is)("chatEmpty", chat_)) {
29
29
  (0, _0_deps_js_1.unreachable)();
30
30
  }
31
31
  const chat = (0, _1_chat_p_js_1.constructChatP)(chat_);