@mtkruto/node 0.13.0 → 0.15.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 (815) hide show
  1. package/esm/0_deps.d.ts +1 -1
  2. package/esm/0_deps.js +1 -1
  3. package/esm/0_errors.d.ts +1 -1
  4. package/esm/0_errors.js +1 -1
  5. package/esm/1_utilities.d.ts +1 -1
  6. package/esm/1_utilities.js +1 -1
  7. package/esm/2_connection.d.ts +1 -1
  8. package/esm/2_connection.js +1 -1
  9. package/esm/2_storage.d.ts +1 -1
  10. package/esm/2_storage.js +1 -1
  11. package/esm/2_tl.d.ts +1 -1
  12. package/esm/2_tl.js +1 -1
  13. package/esm/3_errors.d.ts +1 -1
  14. package/esm/3_errors.js +1 -1
  15. package/esm/3_transport.d.ts +1 -1
  16. package/esm/3_transport.js +1 -1
  17. package/esm/3_types.d.ts +5 -1
  18. package/esm/3_types.d.ts.map +1 -1
  19. package/esm/3_types.js +5 -1
  20. package/esm/4_constants.d.ts +1 -1
  21. package/esm/4_constants.js +2 -2
  22. package/esm/4_errors.d.ts +1 -1
  23. package/esm/4_errors.js +1 -1
  24. package/esm/5_client.d.ts +1 -1
  25. package/esm/5_client.js +1 -1
  26. package/esm/client/0_client_abstract.js +1 -1
  27. package/esm/client/0_filters.d.ts +1 -1
  28. package/esm/client/0_filters.js +1 -1
  29. package/esm/client/0_html.d.ts +1 -1
  30. package/esm/client/0_html.js +1 -1
  31. package/esm/client/0_markdown.d.ts +1 -1
  32. package/esm/client/0_markdown.js +1 -1
  33. package/esm/client/0_message.d.ts +1 -1
  34. package/esm/client/0_message.js +1 -1
  35. package/esm/client/0_params.d.ts +31 -9
  36. package/esm/client/0_params.d.ts.map +1 -1
  37. package/esm/client/0_params.js +1 -1
  38. package/esm/client/0_password.js +1 -1
  39. package/esm/client/0_storage_operations.d.ts +1 -1
  40. package/esm/client/0_storage_operations.js +1 -1
  41. package/esm/client/0_update_processor.d.ts +7 -0
  42. package/esm/client/0_update_processor.d.ts.map +1 -0
  43. package/esm/client/0_update_processor.js +1 -0
  44. package/esm/client/0_utilities.d.ts +3 -3
  45. package/esm/client/0_utilities.d.ts.map +1 -1
  46. package/esm/client/0_utilities.js +1 -1
  47. package/esm/client/1_client_encrypted.d.ts +1 -1
  48. package/esm/client/1_client_encrypted.js +1 -1
  49. package/esm/client/1_client_plain.d.ts +1 -1
  50. package/esm/client/1_client_plain.js +1 -1
  51. package/esm/client/1_composer.d.ts +1 -1
  52. package/esm/client/1_composer.js +1 -1
  53. package/esm/client/1_types.d.ts +1 -1
  54. package/esm/client/1_types.js +1 -1
  55. package/esm/client/2_account_manager.d.ts +1 -1
  56. package/esm/client/2_account_manager.js +1 -1
  57. package/esm/client/2_bot_info_manager.d.ts +1 -1
  58. package/esm/client/2_bot_info_manager.js +1 -1
  59. package/esm/client/2_business_connection_manager.d.ts +4 -3
  60. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  61. package/esm/client/2_business_connection_manager.js +2 -2
  62. package/esm/client/2_file_manager.js +1 -1
  63. package/esm/client/2_gift_manager.d.ts +29 -0
  64. package/esm/client/2_gift_manager.d.ts.map +1 -0
  65. package/esm/client/2_gift_manager.js +62 -0
  66. package/esm/client/2_network_statistics_manager.d.ts +1 -1
  67. package/esm/client/2_network_statistics_manager.js +1 -1
  68. package/esm/client/2_payment_manager.d.ts +4 -3
  69. package/esm/client/2_payment_manager.d.ts.map +1 -1
  70. package/esm/client/2_payment_manager.js +2 -2
  71. package/esm/client/2_reaction_manager.d.ts +4 -3
  72. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  73. package/esm/client/2_reaction_manager.js +2 -2
  74. package/esm/client/2_translations_manager.d.ts +3 -2
  75. package/esm/client/2_translations_manager.d.ts.map +1 -1
  76. package/esm/client/2_translations_manager.js +1 -1
  77. package/esm/client/2_update_manager.d.ts +1 -1
  78. package/esm/client/2_update_manager.js +1 -1
  79. package/esm/client/3_message_manager.d.ts +10 -26
  80. package/esm/client/3_message_manager.d.ts.map +1 -1
  81. package/esm/client/3_message_manager.js +64 -241
  82. package/esm/client/3_video_chat_manager.d.ts +5 -4
  83. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  84. package/esm/client/3_video_chat_manager.js +5 -2
  85. package/esm/client/4_callback_query_manager.d.ts +4 -3
  86. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  87. package/esm/client/4_callback_query_manager.js +2 -2
  88. package/esm/client/4_chat_list_manager.d.ts +5 -4
  89. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  90. package/esm/client/4_chat_list_manager.js +3 -2
  91. package/esm/client/4_chat_manager.d.ts +61 -0
  92. package/esm/client/4_chat_manager.d.ts.map +1 -0
  93. package/esm/client/4_chat_manager.js +293 -0
  94. package/esm/client/4_inline_query_manager.d.ts +4 -3
  95. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  96. package/esm/client/4_inline_query_manager.js +2 -2
  97. package/esm/client/4_poll_manager.d.ts +4 -3
  98. package/esm/client/4_poll_manager.d.ts.map +1 -1
  99. package/esm/client/4_poll_manager.js +2 -2
  100. package/esm/client/4_story_manager.d.ts +4 -3
  101. package/esm/client/4_story_manager.d.ts.map +1 -1
  102. package/esm/client/4_story_manager.js +2 -2
  103. package/esm/client/5_client.d.ts +44 -7
  104. package/esm/client/5_client.d.ts.map +1 -1
  105. package/esm/client/5_client.js +182 -73
  106. package/esm/connection/0_connection.d.ts +1 -1
  107. package/esm/connection/0_connection.js +1 -1
  108. package/esm/connection/1_connection_tcp.node.d.ts +1 -1
  109. package/esm/connection/1_connection_tcp.node.js +1 -1
  110. package/esm/connection/1_connection_web_socket.js +1 -1
  111. package/esm/mod.d.ts +1 -1
  112. package/esm/mod.js +1 -1
  113. package/esm/storage/0_storage.d.ts +1 -1
  114. package/esm/storage/0_storage.js +1 -1
  115. package/esm/storage/1_utilities.d.ts +1 -1
  116. package/esm/storage/1_utilities.js +1 -1
  117. package/esm/storage/2_storage_indexed_db.d.ts +1 -1
  118. package/esm/storage/2_storage_indexed_db.js +1 -1
  119. package/esm/storage/2_storage_local_storage.node.d.ts +1 -1
  120. package/esm/storage/2_storage_local_storage.node.js +1 -1
  121. package/esm/storage/2_storage_memory.d.ts +1 -1
  122. package/esm/storage/2_storage_memory.js +1 -1
  123. package/esm/storage/2_storage_session_storage.d.ts +1 -1
  124. package/esm/storage/2_storage_session_storage.js +1 -1
  125. package/esm/tl/0_api.d.ts +218 -79
  126. package/esm/tl/0_api.d.ts.map +1 -1
  127. package/esm/tl/0_api.js +362 -159
  128. package/esm/tl/0_tl_raw_reader.d.ts +1 -1
  129. package/esm/tl/0_tl_raw_reader.js +1 -1
  130. package/esm/tl/0_tl_raw_writer.d.ts +1 -1
  131. package/esm/tl/0_tl_raw_writer.js +1 -1
  132. package/esm/tl/1_utilities.d.ts +1 -1
  133. package/esm/tl/1_utilities.js +1 -1
  134. package/esm/tl/2_deserialize.d.ts +1 -1
  135. package/esm/tl/2_deserialize.js +1 -1
  136. package/esm/tl/2_serialize.d.ts +1 -1
  137. package/esm/tl/2_serialize.js +1 -1
  138. package/esm/tl/3_tl_reader.d.ts +1 -1
  139. package/esm/tl/3_tl_reader.js +1 -1
  140. package/esm/tl/3_utilities.d.ts +1 -1
  141. package/esm/tl/3_utilities.js +1 -1
  142. package/esm/tl/4_rpc_result.d.ts +1 -1
  143. package/esm/tl/4_rpc_result.js +1 -1
  144. package/esm/tl/4_tl_writer.d.ts +1 -1
  145. package/esm/tl/4_tl_writer.js +1 -1
  146. package/esm/tl/5_message.d.ts +1 -1
  147. package/esm/tl/5_message.js +1 -1
  148. package/esm/transport/0_obfuscation.js +1 -1
  149. package/esm/transport/0_transport.d.ts +1 -1
  150. package/esm/transport/0_transport.js +1 -1
  151. package/esm/transport/1_transport_abridged.d.ts +1 -1
  152. package/esm/transport/1_transport_abridged.js +1 -1
  153. package/esm/transport/1_transport_intermediate.d.ts +1 -1
  154. package/esm/transport/1_transport_intermediate.js +1 -1
  155. package/esm/transport/2_transport_provider.d.ts +1 -1
  156. package/esm/transport/2_transport_provider.js +1 -1
  157. package/esm/transport/3_transport_provider_tcp.d.ts +1 -1
  158. package/esm/transport/3_transport_provider_tcp.js +1 -1
  159. package/esm/transport/3_transport_provider_web_socket.d.ts +1 -1
  160. package/esm/transport/3_transport_provider_web_socket.js +1 -1
  161. package/esm/types/0_authorization_state.d.ts +1 -1
  162. package/esm/types/0_authorization_state.js +1 -1
  163. package/esm/types/0_birthday.d.ts +1 -1
  164. package/esm/types/0_birthday.js +1 -1
  165. package/esm/types/0_bot_command.d.ts +1 -1
  166. package/esm/types/0_bot_command.js +1 -1
  167. package/esm/types/0_callback_query_answer.d.ts +1 -1
  168. package/esm/types/0_callback_query_answer.js +1 -1
  169. package/esm/types/0_callback_query_question.d.ts +1 -1
  170. package/esm/types/0_callback_query_question.js +1 -1
  171. package/esm/types/0_chat_action.d.ts +1 -1
  172. package/esm/types/0_chat_action.js +1 -1
  173. package/esm/types/0_chat_administrator_rights.d.ts +1 -1
  174. package/esm/types/0_chat_administrator_rights.js +1 -1
  175. package/esm/types/0_chat_member_rights.d.ts +1 -1
  176. package/esm/types/0_chat_member_rights.js +1 -1
  177. package/esm/types/0_chat_photo.d.ts +1 -1
  178. package/esm/types/0_chat_photo.js +1 -1
  179. package/esm/types/0_connection_state.d.ts +1 -1
  180. package/esm/types/0_connection_state.js +1 -1
  181. package/esm/types/0_contact.d.ts +1 -1
  182. package/esm/types/0_contact.js +1 -1
  183. package/esm/types/0_dice.d.ts +1 -1
  184. package/esm/types/0_dice.js +1 -1
  185. package/esm/types/0_failed_invitation.d.ts +1 -1
  186. package/esm/types/0_failed_invitation.js +1 -1
  187. package/esm/types/0_file_source.d.ts +1 -1
  188. package/esm/types/0_file_source.js +1 -1
  189. package/esm/types/0_giveaway_parameters.d.ts +1 -1
  190. package/esm/types/0_giveaway_parameters.js +1 -1
  191. package/esm/types/0_id.d.ts +1 -1
  192. package/esm/types/0_id.js +1 -1
  193. package/esm/types/0_invoice.d.ts +1 -1
  194. package/esm/types/0_invoice.js +1 -1
  195. package/esm/types/0_keyboard_button_poll_type.d.ts +1 -1
  196. package/esm/types/0_keyboard_button_poll_type.js +1 -1
  197. package/esm/types/0_link_preview.d.ts +1 -1
  198. package/esm/types/0_link_preview.js +1 -1
  199. package/esm/types/0_live_stream_channel.d.ts +1 -1
  200. package/esm/types/0_live_stream_channel.js +1 -1
  201. package/esm/types/0_location.d.ts +1 -1
  202. package/esm/types/0_location.js +1 -1
  203. package/esm/types/0_login_url.d.ts +1 -1
  204. package/esm/types/0_login_url.js +1 -1
  205. package/esm/types/0_mask_position.d.ts +1 -1
  206. package/esm/types/0_mask_position.js +1 -1
  207. package/esm/types/0_message_entity.d.ts +1 -1
  208. package/esm/types/0_message_entity.js +1 -1
  209. package/esm/types/0_message_reference.d.ts +1 -1
  210. package/esm/types/0_message_reference.js +1 -1
  211. package/esm/types/0_message_search_filter.d.ts +1 -1
  212. package/esm/types/0_message_search_filter.js +1 -1
  213. package/esm/types/0_mini_app_info.d.ts +1 -1
  214. package/esm/types/0_mini_app_info.js +1 -1
  215. package/esm/types/0_network_statistics_entry.d.ts +1 -1
  216. package/esm/types/0_network_statistics_entry.js +1 -1
  217. package/esm/types/0_opening_hours.d.ts +1 -1
  218. package/esm/types/0_opening_hours.js +1 -1
  219. package/esm/types/0_parse_mode.d.ts +1 -1
  220. package/esm/types/0_parse_mode.js +1 -1
  221. package/esm/types/0_price_tag.d.ts +1 -1
  222. package/esm/types/0_price_tag.js +1 -1
  223. package/esm/types/0_reaction.d.ts +1 -1
  224. package/esm/types/0_reaction.js +1 -1
  225. package/esm/types/0_refunded_payment.d.ts +1 -1
  226. package/esm/types/0_refunded_payment.js +1 -1
  227. package/esm/types/0_restriction_reason.d.ts +1 -1
  228. package/esm/types/0_restriction_reason.js +1 -1
  229. package/esm/types/0_self_destruct_option.d.ts +1 -1
  230. package/esm/types/0_self_destruct_option.js +1 -1
  231. package/esm/types/0_shipping_address.d.ts +1 -1
  232. package/esm/types/0_shipping_address.js +1 -1
  233. package/esm/types/0_story_reference.d.ts +1 -1
  234. package/esm/types/0_story_reference.js +1 -1
  235. package/esm/types/0_switch_inline_query_chosen_chats.d.ts +1 -1
  236. package/esm/types/0_switch_inline_query_chosen_chats.js +1 -1
  237. package/esm/types/0_thumbnail.d.ts +1 -1
  238. package/esm/types/0_thumbnail.js +1 -1
  239. package/esm/types/0_video_chat.d.ts +1 -1
  240. package/esm/types/0_video_chat.js +1 -1
  241. package/esm/types/0_voice.d.ts +1 -1
  242. package/esm/types/0_voice.js +1 -1
  243. package/esm/types/1_animation.d.ts +1 -1
  244. package/esm/types/1_animation.js +1 -1
  245. package/esm/types/1_audio.d.ts +1 -1
  246. package/esm/types/1_audio.js +1 -1
  247. package/esm/types/1_bot_command_scope.d.ts +1 -1
  248. package/esm/types/1_bot_command_scope.js +1 -1
  249. package/esm/types/1_chat_p.d.ts +1 -1
  250. package/esm/types/1_chat_p.js +1 -1
  251. package/esm/types/1_document.d.ts +1 -1
  252. package/esm/types/1_document.js +1 -1
  253. package/esm/types/1_giveaway.d.ts +1 -1
  254. package/esm/types/1_giveaway.js +1 -1
  255. package/esm/types/1_inline_query_result_button.d.ts +1 -1
  256. package/esm/types/1_inline_query_result_button.js +1 -1
  257. package/esm/types/1_input_media.d.ts +1 -1
  258. package/esm/types/1_input_media.js +1 -1
  259. package/esm/types/1_input_story_content.d.ts +1 -1
  260. package/esm/types/1_input_story_content.js +1 -1
  261. package/esm/types/1_keyboard_button.d.ts +1 -1
  262. package/esm/types/1_keyboard_button.js +1 -1
  263. package/esm/types/1_message_content.d.ts +2 -2
  264. package/esm/types/1_message_content.d.ts.map +1 -1
  265. package/esm/types/1_message_content.js +1 -1
  266. package/esm/types/1_message_reaction.d.ts +1 -1
  267. package/esm/types/1_message_reaction.js +1 -1
  268. package/esm/types/1_network_statistics.d.ts +1 -1
  269. package/esm/types/1_network_statistics.js +1 -1
  270. package/esm/types/1_order_info.d.ts +1 -1
  271. package/esm/types/1_order_info.js +1 -1
  272. package/esm/types/1_photo.d.ts +1 -1
  273. package/esm/types/1_photo.js +1 -1
  274. package/esm/types/1_poll_option.d.ts +1 -1
  275. package/esm/types/1_poll_option.js +1 -1
  276. package/esm/types/1_reaction_count.d.ts +1 -1
  277. package/esm/types/1_reaction_count.js +1 -1
  278. package/esm/types/1_reply_quote.d.ts +1 -1
  279. package/esm/types/1_reply_quote.js +1 -1
  280. package/esm/types/1_sticker.d.ts +2 -1
  281. package/esm/types/1_sticker.d.ts.map +1 -1
  282. package/esm/types/1_sticker.js +7 -3
  283. package/esm/types/1_story_privacy.d.ts +1 -1
  284. package/esm/types/1_story_privacy.js +1 -1
  285. package/esm/types/1_story_reaction.d.ts +1 -1
  286. package/esm/types/1_story_reaction.js +1 -1
  287. package/esm/types/1_user.d.ts +1 -1
  288. package/esm/types/1_user.js +1 -1
  289. package/esm/types/1_venue.d.ts +1 -1
  290. package/esm/types/1_venue.js +1 -1
  291. package/esm/types/1_video.d.ts +1 -1
  292. package/esm/types/1_video.js +1 -1
  293. package/esm/types/1_video_note.d.ts +1 -1
  294. package/esm/types/1_video_note.js +1 -1
  295. package/esm/types/2_business_connection.d.ts +1 -1
  296. package/esm/types/2_business_connection.js +1 -1
  297. package/esm/types/2_chat.d.ts +1 -1
  298. package/esm/types/2_chat.js +1 -1
  299. package/esm/types/2_chat_member.d.ts +1 -1
  300. package/esm/types/2_chat_member.js +1 -1
  301. package/esm/types/2_chosen_inline_result.d.ts +1 -1
  302. package/esm/types/2_chosen_inline_result.js +1 -1
  303. package/esm/types/2_forward_header.d.ts +1 -1
  304. package/esm/types/2_forward_header.js +1 -1
  305. package/esm/types/2_game.d.ts +1 -1
  306. package/esm/types/2_game.js +1 -1
  307. package/esm/types/2_gift_upgraded_component.d.ts +95 -0
  308. package/esm/types/2_gift_upgraded_component.d.ts.map +1 -0
  309. package/esm/types/2_gift_upgraded_component.js +88 -0
  310. package/esm/types/2_inactive_chat.d.ts +1 -1
  311. package/esm/types/2_inactive_chat.js +1 -1
  312. package/esm/types/2_inline_keyboard_button.d.ts +1 -1
  313. package/esm/types/2_inline_keyboard_button.js +1 -1
  314. package/esm/types/2_inline_query.d.ts +1 -1
  315. package/esm/types/2_inline_query.js +1 -1
  316. package/esm/types/2_invite_link.d.ts +1 -1
  317. package/esm/types/2_invite_link.js +1 -1
  318. package/esm/types/2_message_interactions.d.ts +1 -1
  319. package/esm/types/2_message_interactions.js +1 -1
  320. package/esm/types/2_message_reaction_count.d.ts +1 -1
  321. package/esm/types/2_message_reaction_count.js +1 -1
  322. package/esm/types/2_message_reactions.d.ts +1 -1
  323. package/esm/types/2_message_reactions.js +1 -1
  324. package/esm/types/2_poll.d.ts +1 -1
  325. package/esm/types/2_poll.js +1 -1
  326. package/esm/types/2_pre_checkout_query.d.ts +1 -1
  327. package/esm/types/2_pre_checkout_query.js +1 -1
  328. package/esm/types/2_reply_to.d.ts +1 -1
  329. package/esm/types/2_reply_to.js +1 -1
  330. package/esm/types/2_story_content.d.ts +1 -1
  331. package/esm/types/2_story_content.js +1 -1
  332. package/esm/types/2_story_interactions.d.ts +1 -1
  333. package/esm/types/2_story_interactions.js +1 -1
  334. package/esm/types/2_story_interactive_area.d.ts +1 -1
  335. package/esm/types/2_story_interactive_area.js +1 -1
  336. package/esm/types/2_successful_payment.d.ts +1 -1
  337. package/esm/types/2_successful_payment.js +1 -1
  338. package/esm/types/3_chat_member_updated.d.ts +1 -1
  339. package/esm/types/3_chat_member_updated.js +1 -1
  340. package/esm/types/3_gift.d.ts +82 -0
  341. package/esm/types/3_gift.d.ts.map +1 -0
  342. package/esm/types/3_gift.js +88 -0
  343. package/esm/types/3_join_request.d.ts +1 -1
  344. package/esm/types/3_join_request.js +1 -1
  345. package/esm/types/3_reply_markup.d.ts +1 -1
  346. package/esm/types/3_reply_markup.js +1 -1
  347. package/esm/types/3_story.d.ts +1 -1
  348. package/esm/types/3_story.js +1 -1
  349. package/esm/types/4_inline_query_result.d.ts +1 -1
  350. package/esm/types/4_inline_query_result.js +1 -1
  351. package/esm/types/4_message.d.ts +2 -1
  352. package/esm/types/4_message.d.ts.map +1 -1
  353. package/esm/types/4_message.js +9 -3
  354. package/esm/types/4_user_gift.d.ts +44 -0
  355. package/esm/types/4_user_gift.d.ts.map +1 -0
  356. package/esm/types/4_user_gift.js +43 -0
  357. package/esm/types/5_callback_query.d.ts +1 -1
  358. package/esm/types/5_callback_query.js +1 -1
  359. package/esm/types/5_chat_list_item.d.ts +1 -1
  360. package/esm/types/5_chat_list_item.js +1 -1
  361. package/esm/types/5_inline_query_answer.d.ts +1 -1
  362. package/esm/types/5_inline_query_answer.js +1 -1
  363. package/esm/types/5_user_gifts.d.ts +32 -0
  364. package/esm/types/5_user_gifts.d.ts.map +1 -0
  365. package/esm/types/5_user_gifts.js +29 -0
  366. package/esm/types/6_update.d.ts +1 -1
  367. package/esm/types/6_update.js +1 -1
  368. package/esm/types/_file_id.d.ts +1 -1
  369. package/esm/types/_file_id.js +1 -1
  370. package/esm/types/_getters.d.ts +1 -1
  371. package/esm/types/_getters.js +1 -1
  372. package/esm/utilities/0_bigint.js +1 -1
  373. package/esm/utilities/0_buffer.d.ts +1 -1
  374. package/esm/utilities/0_buffer.js +1 -1
  375. package/esm/utilities/0_cache_map.d.ts +1 -1
  376. package/esm/utilities/0_cache_map.js +1 -1
  377. package/esm/utilities/0_color.d.ts +1 -1
  378. package/esm/utilities/0_color.js +1 -1
  379. package/esm/utilities/0_env.js +1 -1
  380. package/esm/utilities/0_gunzip.d.ts +1 -1
  381. package/esm/utilities/0_gunzip.js +1 -1
  382. package/esm/utilities/0_hash.js +1 -1
  383. package/esm/utilities/0_misc.d.ts +1 -1
  384. package/esm/utilities/0_misc.js +1 -1
  385. package/esm/utilities/0_mutex.d.ts +1 -1
  386. package/esm/utilities/0_mutex.js +1 -1
  387. package/esm/utilities/0_object.d.ts +1 -1
  388. package/esm/utilities/0_object.js +1 -1
  389. package/esm/utilities/0_part_stream.d.ts +1 -1
  390. package/esm/utilities/0_part_stream.js +1 -1
  391. package/esm/utilities/0_rle.d.ts +1 -1
  392. package/esm/utilities/0_rle.js +1 -1
  393. package/esm/utilities/0_types.d.ts +1 -1
  394. package/esm/utilities/0_types.js +1 -1
  395. package/esm/utilities/0_units.d.ts +1 -1
  396. package/esm/utilities/0_units.js +1 -1
  397. package/esm/utilities/1_auth.js +1 -1
  398. package/esm/utilities/1_base64.d.ts +1 -1
  399. package/esm/utilities/1_base64.js +1 -1
  400. package/esm/utilities/1_crypto.d.ts +1 -1
  401. package/esm/utilities/1_crypto.js +1 -1
  402. package/esm/utilities/1_logger.d.ts +1 -1
  403. package/esm/utilities/1_logger.js +1 -1
  404. package/esm/utilities/1_math.d.ts +1 -1
  405. package/esm/utilities/1_math.js +1 -1
  406. package/esm/utilities/2_queue.d.ts +1 -1
  407. package/esm/utilities/2_queue.js +1 -1
  408. package/package.json +1 -1
  409. package/script/0_deps.d.ts +1 -1
  410. package/script/0_deps.js +1 -1
  411. package/script/0_errors.d.ts +1 -1
  412. package/script/0_errors.js +1 -1
  413. package/script/1_utilities.d.ts +1 -1
  414. package/script/1_utilities.js +1 -1
  415. package/script/2_connection.d.ts +1 -1
  416. package/script/2_connection.js +1 -1
  417. package/script/2_storage.d.ts +1 -1
  418. package/script/2_storage.js +1 -1
  419. package/script/2_tl.d.ts +1 -1
  420. package/script/2_tl.js +1 -1
  421. package/script/3_errors.d.ts +1 -1
  422. package/script/3_errors.js +1 -1
  423. package/script/3_transport.d.ts +1 -1
  424. package/script/3_transport.js +1 -1
  425. package/script/3_types.d.ts +5 -1
  426. package/script/3_types.d.ts.map +1 -1
  427. package/script/3_types.js +5 -1
  428. package/script/4_constants.d.ts +1 -1
  429. package/script/4_constants.js +2 -2
  430. package/script/4_errors.d.ts +1 -1
  431. package/script/4_errors.js +1 -1
  432. package/script/5_client.d.ts +1 -1
  433. package/script/5_client.js +1 -1
  434. package/script/client/0_client_abstract.js +1 -1
  435. package/script/client/0_filters.d.ts +1 -1
  436. package/script/client/0_filters.js +1 -1
  437. package/script/client/0_html.d.ts +1 -1
  438. package/script/client/0_html.js +1 -1
  439. package/script/client/0_markdown.d.ts +1 -1
  440. package/script/client/0_markdown.js +1 -1
  441. package/script/client/0_message.d.ts +1 -1
  442. package/script/client/0_message.js +1 -1
  443. package/script/client/0_params.d.ts +31 -9
  444. package/script/client/0_params.d.ts.map +1 -1
  445. package/script/client/0_params.js +1 -1
  446. package/script/client/0_password.js +1 -1
  447. package/script/client/0_storage_operations.d.ts +1 -1
  448. package/script/client/0_storage_operations.js +1 -1
  449. package/script/client/0_update_processor.d.ts +7 -0
  450. package/script/client/0_update_processor.d.ts.map +1 -0
  451. package/script/client/0_update_processor.js +2 -0
  452. package/script/client/0_utilities.d.ts +3 -3
  453. package/script/client/0_utilities.d.ts.map +1 -1
  454. package/script/client/0_utilities.js +1 -1
  455. package/script/client/1_client_encrypted.d.ts +1 -1
  456. package/script/client/1_client_encrypted.js +1 -1
  457. package/script/client/1_client_plain.d.ts +1 -1
  458. package/script/client/1_client_plain.js +1 -1
  459. package/script/client/1_composer.d.ts +1 -1
  460. package/script/client/1_composer.js +1 -1
  461. package/script/client/1_types.d.ts +1 -1
  462. package/script/client/1_types.js +1 -1
  463. package/script/client/2_account_manager.d.ts +1 -1
  464. package/script/client/2_account_manager.js +1 -1
  465. package/script/client/2_bot_info_manager.d.ts +1 -1
  466. package/script/client/2_bot_info_manager.js +1 -1
  467. package/script/client/2_business_connection_manager.d.ts +4 -3
  468. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  469. package/script/client/2_business_connection_manager.js +2 -2
  470. package/script/client/2_file_manager.js +1 -1
  471. package/script/client/2_gift_manager.d.ts +29 -0
  472. package/script/client/2_gift_manager.d.ts.map +1 -0
  473. package/script/client/2_gift_manager.js +66 -0
  474. package/script/client/2_network_statistics_manager.d.ts +1 -1
  475. package/script/client/2_network_statistics_manager.js +1 -1
  476. package/script/client/2_payment_manager.d.ts +4 -3
  477. package/script/client/2_payment_manager.d.ts.map +1 -1
  478. package/script/client/2_payment_manager.js +2 -2
  479. package/script/client/2_reaction_manager.d.ts +4 -3
  480. package/script/client/2_reaction_manager.d.ts.map +1 -1
  481. package/script/client/2_reaction_manager.js +2 -2
  482. package/script/client/2_translations_manager.d.ts +3 -2
  483. package/script/client/2_translations_manager.d.ts.map +1 -1
  484. package/script/client/2_translations_manager.js +1 -1
  485. package/script/client/2_update_manager.d.ts +1 -1
  486. package/script/client/2_update_manager.js +1 -1
  487. package/script/client/3_message_manager.d.ts +10 -26
  488. package/script/client/3_message_manager.d.ts.map +1 -1
  489. package/script/client/3_message_manager.js +61 -238
  490. package/script/client/3_video_chat_manager.d.ts +5 -4
  491. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  492. package/script/client/3_video_chat_manager.js +5 -2
  493. package/script/client/4_callback_query_manager.d.ts +4 -3
  494. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  495. package/script/client/4_callback_query_manager.js +2 -2
  496. package/script/client/4_chat_list_manager.d.ts +5 -4
  497. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  498. package/script/client/4_chat_list_manager.js +3 -2
  499. package/script/client/4_chat_manager.d.ts +61 -0
  500. package/script/client/4_chat_manager.d.ts.map +1 -0
  501. package/script/client/4_chat_manager.js +297 -0
  502. package/script/client/4_inline_query_manager.d.ts +4 -3
  503. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  504. package/script/client/4_inline_query_manager.js +2 -2
  505. package/script/client/4_poll_manager.d.ts +4 -3
  506. package/script/client/4_poll_manager.d.ts.map +1 -1
  507. package/script/client/4_poll_manager.js +2 -2
  508. package/script/client/4_story_manager.d.ts +4 -3
  509. package/script/client/4_story_manager.d.ts.map +1 -1
  510. package/script/client/4_story_manager.js +2 -2
  511. package/script/client/5_client.d.ts +44 -7
  512. package/script/client/5_client.d.ts.map +1 -1
  513. package/script/client/5_client.js +182 -73
  514. package/script/connection/0_connection.d.ts +1 -1
  515. package/script/connection/0_connection.js +1 -1
  516. package/script/connection/1_connection_tcp.node.d.ts +1 -1
  517. package/script/connection/1_connection_tcp.node.js +1 -1
  518. package/script/connection/1_connection_web_socket.js +1 -1
  519. package/script/mod.d.ts +1 -1
  520. package/script/mod.js +1 -1
  521. package/script/storage/0_storage.d.ts +1 -1
  522. package/script/storage/0_storage.js +1 -1
  523. package/script/storage/1_utilities.d.ts +1 -1
  524. package/script/storage/1_utilities.js +1 -1
  525. package/script/storage/2_storage_indexed_db.d.ts +1 -1
  526. package/script/storage/2_storage_indexed_db.js +1 -1
  527. package/script/storage/2_storage_local_storage.node.d.ts +1 -1
  528. package/script/storage/2_storage_local_storage.node.js +1 -1
  529. package/script/storage/2_storage_memory.d.ts +1 -1
  530. package/script/storage/2_storage_memory.js +1 -1
  531. package/script/storage/2_storage_session_storage.d.ts +1 -1
  532. package/script/storage/2_storage_session_storage.js +1 -1
  533. package/script/tl/0_api.d.ts +218 -79
  534. package/script/tl/0_api.d.ts.map +1 -1
  535. package/script/tl/0_api.js +362 -159
  536. package/script/tl/0_tl_raw_reader.d.ts +1 -1
  537. package/script/tl/0_tl_raw_reader.js +1 -1
  538. package/script/tl/0_tl_raw_writer.d.ts +1 -1
  539. package/script/tl/0_tl_raw_writer.js +1 -1
  540. package/script/tl/1_utilities.d.ts +1 -1
  541. package/script/tl/1_utilities.js +1 -1
  542. package/script/tl/2_deserialize.d.ts +1 -1
  543. package/script/tl/2_deserialize.js +1 -1
  544. package/script/tl/2_serialize.d.ts +1 -1
  545. package/script/tl/2_serialize.js +1 -1
  546. package/script/tl/3_tl_reader.d.ts +1 -1
  547. package/script/tl/3_tl_reader.js +1 -1
  548. package/script/tl/3_utilities.d.ts +1 -1
  549. package/script/tl/3_utilities.js +1 -1
  550. package/script/tl/4_rpc_result.d.ts +1 -1
  551. package/script/tl/4_rpc_result.js +1 -1
  552. package/script/tl/4_tl_writer.d.ts +1 -1
  553. package/script/tl/4_tl_writer.js +1 -1
  554. package/script/tl/5_message.d.ts +1 -1
  555. package/script/tl/5_message.js +1 -1
  556. package/script/transport/0_obfuscation.js +1 -1
  557. package/script/transport/0_transport.d.ts +1 -1
  558. package/script/transport/0_transport.js +1 -1
  559. package/script/transport/1_transport_abridged.d.ts +1 -1
  560. package/script/transport/1_transport_abridged.js +1 -1
  561. package/script/transport/1_transport_intermediate.d.ts +1 -1
  562. package/script/transport/1_transport_intermediate.js +1 -1
  563. package/script/transport/2_transport_provider.d.ts +1 -1
  564. package/script/transport/2_transport_provider.js +1 -1
  565. package/script/transport/3_transport_provider_tcp.d.ts +1 -1
  566. package/script/transport/3_transport_provider_tcp.js +1 -1
  567. package/script/transport/3_transport_provider_web_socket.d.ts +1 -1
  568. package/script/transport/3_transport_provider_web_socket.js +1 -1
  569. package/script/types/0_authorization_state.d.ts +1 -1
  570. package/script/types/0_authorization_state.js +1 -1
  571. package/script/types/0_birthday.d.ts +1 -1
  572. package/script/types/0_birthday.js +1 -1
  573. package/script/types/0_bot_command.d.ts +1 -1
  574. package/script/types/0_bot_command.js +1 -1
  575. package/script/types/0_callback_query_answer.d.ts +1 -1
  576. package/script/types/0_callback_query_answer.js +1 -1
  577. package/script/types/0_callback_query_question.d.ts +1 -1
  578. package/script/types/0_callback_query_question.js +1 -1
  579. package/script/types/0_chat_action.d.ts +1 -1
  580. package/script/types/0_chat_action.js +1 -1
  581. package/script/types/0_chat_administrator_rights.d.ts +1 -1
  582. package/script/types/0_chat_administrator_rights.js +1 -1
  583. package/script/types/0_chat_member_rights.d.ts +1 -1
  584. package/script/types/0_chat_member_rights.js +1 -1
  585. package/script/types/0_chat_photo.d.ts +1 -1
  586. package/script/types/0_chat_photo.js +1 -1
  587. package/script/types/0_connection_state.d.ts +1 -1
  588. package/script/types/0_connection_state.js +1 -1
  589. package/script/types/0_contact.d.ts +1 -1
  590. package/script/types/0_contact.js +1 -1
  591. package/script/types/0_dice.d.ts +1 -1
  592. package/script/types/0_dice.js +1 -1
  593. package/script/types/0_failed_invitation.d.ts +1 -1
  594. package/script/types/0_failed_invitation.js +1 -1
  595. package/script/types/0_file_source.d.ts +1 -1
  596. package/script/types/0_file_source.js +1 -1
  597. package/script/types/0_giveaway_parameters.d.ts +1 -1
  598. package/script/types/0_giveaway_parameters.js +1 -1
  599. package/script/types/0_id.d.ts +1 -1
  600. package/script/types/0_id.js +1 -1
  601. package/script/types/0_invoice.d.ts +1 -1
  602. package/script/types/0_invoice.js +1 -1
  603. package/script/types/0_keyboard_button_poll_type.d.ts +1 -1
  604. package/script/types/0_keyboard_button_poll_type.js +1 -1
  605. package/script/types/0_link_preview.d.ts +1 -1
  606. package/script/types/0_link_preview.js +1 -1
  607. package/script/types/0_live_stream_channel.d.ts +1 -1
  608. package/script/types/0_live_stream_channel.js +1 -1
  609. package/script/types/0_location.d.ts +1 -1
  610. package/script/types/0_location.js +1 -1
  611. package/script/types/0_login_url.d.ts +1 -1
  612. package/script/types/0_login_url.js +1 -1
  613. package/script/types/0_mask_position.d.ts +1 -1
  614. package/script/types/0_mask_position.js +1 -1
  615. package/script/types/0_message_entity.d.ts +1 -1
  616. package/script/types/0_message_entity.js +1 -1
  617. package/script/types/0_message_reference.d.ts +1 -1
  618. package/script/types/0_message_reference.js +1 -1
  619. package/script/types/0_message_search_filter.d.ts +1 -1
  620. package/script/types/0_message_search_filter.js +1 -1
  621. package/script/types/0_mini_app_info.d.ts +1 -1
  622. package/script/types/0_mini_app_info.js +1 -1
  623. package/script/types/0_network_statistics_entry.d.ts +1 -1
  624. package/script/types/0_network_statistics_entry.js +1 -1
  625. package/script/types/0_opening_hours.d.ts +1 -1
  626. package/script/types/0_opening_hours.js +1 -1
  627. package/script/types/0_parse_mode.d.ts +1 -1
  628. package/script/types/0_parse_mode.js +1 -1
  629. package/script/types/0_price_tag.d.ts +1 -1
  630. package/script/types/0_price_tag.js +1 -1
  631. package/script/types/0_reaction.d.ts +1 -1
  632. package/script/types/0_reaction.js +1 -1
  633. package/script/types/0_refunded_payment.d.ts +1 -1
  634. package/script/types/0_refunded_payment.js +1 -1
  635. package/script/types/0_restriction_reason.d.ts +1 -1
  636. package/script/types/0_restriction_reason.js +1 -1
  637. package/script/types/0_self_destruct_option.d.ts +1 -1
  638. package/script/types/0_self_destruct_option.js +1 -1
  639. package/script/types/0_shipping_address.d.ts +1 -1
  640. package/script/types/0_shipping_address.js +1 -1
  641. package/script/types/0_story_reference.d.ts +1 -1
  642. package/script/types/0_story_reference.js +1 -1
  643. package/script/types/0_switch_inline_query_chosen_chats.d.ts +1 -1
  644. package/script/types/0_switch_inline_query_chosen_chats.js +1 -1
  645. package/script/types/0_thumbnail.d.ts +1 -1
  646. package/script/types/0_thumbnail.js +1 -1
  647. package/script/types/0_video_chat.d.ts +1 -1
  648. package/script/types/0_video_chat.js +1 -1
  649. package/script/types/0_voice.d.ts +1 -1
  650. package/script/types/0_voice.js +1 -1
  651. package/script/types/1_animation.d.ts +1 -1
  652. package/script/types/1_animation.js +1 -1
  653. package/script/types/1_audio.d.ts +1 -1
  654. package/script/types/1_audio.js +1 -1
  655. package/script/types/1_bot_command_scope.d.ts +1 -1
  656. package/script/types/1_bot_command_scope.js +1 -1
  657. package/script/types/1_chat_p.d.ts +1 -1
  658. package/script/types/1_chat_p.js +1 -1
  659. package/script/types/1_document.d.ts +1 -1
  660. package/script/types/1_document.js +1 -1
  661. package/script/types/1_giveaway.d.ts +1 -1
  662. package/script/types/1_giveaway.js +1 -1
  663. package/script/types/1_inline_query_result_button.d.ts +1 -1
  664. package/script/types/1_inline_query_result_button.js +1 -1
  665. package/script/types/1_input_media.d.ts +1 -1
  666. package/script/types/1_input_media.js +1 -1
  667. package/script/types/1_input_story_content.d.ts +1 -1
  668. package/script/types/1_input_story_content.js +1 -1
  669. package/script/types/1_keyboard_button.d.ts +1 -1
  670. package/script/types/1_keyboard_button.js +1 -1
  671. package/script/types/1_message_content.d.ts +2 -2
  672. package/script/types/1_message_content.d.ts.map +1 -1
  673. package/script/types/1_message_content.js +1 -1
  674. package/script/types/1_message_reaction.d.ts +1 -1
  675. package/script/types/1_message_reaction.js +1 -1
  676. package/script/types/1_network_statistics.d.ts +1 -1
  677. package/script/types/1_network_statistics.js +1 -1
  678. package/script/types/1_order_info.d.ts +1 -1
  679. package/script/types/1_order_info.js +1 -1
  680. package/script/types/1_photo.d.ts +1 -1
  681. package/script/types/1_photo.js +1 -1
  682. package/script/types/1_poll_option.d.ts +1 -1
  683. package/script/types/1_poll_option.js +1 -1
  684. package/script/types/1_reaction_count.d.ts +1 -1
  685. package/script/types/1_reaction_count.js +1 -1
  686. package/script/types/1_reply_quote.d.ts +1 -1
  687. package/script/types/1_reply_quote.js +1 -1
  688. package/script/types/1_sticker.d.ts +2 -1
  689. package/script/types/1_sticker.d.ts.map +1 -1
  690. package/script/types/1_sticker.js +8 -3
  691. package/script/types/1_story_privacy.d.ts +1 -1
  692. package/script/types/1_story_privacy.js +1 -1
  693. package/script/types/1_story_reaction.d.ts +1 -1
  694. package/script/types/1_story_reaction.js +1 -1
  695. package/script/types/1_user.d.ts +1 -1
  696. package/script/types/1_user.js +1 -1
  697. package/script/types/1_venue.d.ts +1 -1
  698. package/script/types/1_venue.js +1 -1
  699. package/script/types/1_video.d.ts +1 -1
  700. package/script/types/1_video.js +1 -1
  701. package/script/types/1_video_note.d.ts +1 -1
  702. package/script/types/1_video_note.js +1 -1
  703. package/script/types/2_business_connection.d.ts +1 -1
  704. package/script/types/2_business_connection.js +1 -1
  705. package/script/types/2_chat.d.ts +1 -1
  706. package/script/types/2_chat.js +1 -1
  707. package/script/types/2_chat_member.d.ts +1 -1
  708. package/script/types/2_chat_member.js +1 -1
  709. package/script/types/2_chosen_inline_result.d.ts +1 -1
  710. package/script/types/2_chosen_inline_result.js +1 -1
  711. package/script/types/2_forward_header.d.ts +1 -1
  712. package/script/types/2_forward_header.js +1 -1
  713. package/script/types/2_game.d.ts +1 -1
  714. package/script/types/2_game.js +1 -1
  715. package/script/types/2_gift_upgraded_component.d.ts +95 -0
  716. package/script/types/2_gift_upgraded_component.d.ts.map +1 -0
  717. package/script/types/2_gift_upgraded_component.js +91 -0
  718. package/script/types/2_inactive_chat.d.ts +1 -1
  719. package/script/types/2_inactive_chat.js +1 -1
  720. package/script/types/2_inline_keyboard_button.d.ts +1 -1
  721. package/script/types/2_inline_keyboard_button.js +1 -1
  722. package/script/types/2_inline_query.d.ts +1 -1
  723. package/script/types/2_inline_query.js +1 -1
  724. package/script/types/2_invite_link.d.ts +1 -1
  725. package/script/types/2_invite_link.js +1 -1
  726. package/script/types/2_message_interactions.d.ts +1 -1
  727. package/script/types/2_message_interactions.js +1 -1
  728. package/script/types/2_message_reaction_count.d.ts +1 -1
  729. package/script/types/2_message_reaction_count.js +1 -1
  730. package/script/types/2_message_reactions.d.ts +1 -1
  731. package/script/types/2_message_reactions.js +1 -1
  732. package/script/types/2_poll.d.ts +1 -1
  733. package/script/types/2_poll.js +1 -1
  734. package/script/types/2_pre_checkout_query.d.ts +1 -1
  735. package/script/types/2_pre_checkout_query.js +1 -1
  736. package/script/types/2_reply_to.d.ts +1 -1
  737. package/script/types/2_reply_to.js +1 -1
  738. package/script/types/2_story_content.d.ts +1 -1
  739. package/script/types/2_story_content.js +1 -1
  740. package/script/types/2_story_interactions.d.ts +1 -1
  741. package/script/types/2_story_interactions.js +1 -1
  742. package/script/types/2_story_interactive_area.d.ts +1 -1
  743. package/script/types/2_story_interactive_area.js +1 -1
  744. package/script/types/2_successful_payment.d.ts +1 -1
  745. package/script/types/2_successful_payment.js +1 -1
  746. package/script/types/3_chat_member_updated.d.ts +1 -1
  747. package/script/types/3_chat_member_updated.js +1 -1
  748. package/script/types/3_gift.d.ts +82 -0
  749. package/script/types/3_gift.d.ts.map +1 -0
  750. package/script/types/3_gift.js +93 -0
  751. package/script/types/3_join_request.d.ts +1 -1
  752. package/script/types/3_join_request.js +1 -1
  753. package/script/types/3_reply_markup.d.ts +1 -1
  754. package/script/types/3_reply_markup.js +1 -1
  755. package/script/types/3_story.d.ts +1 -1
  756. package/script/types/3_story.js +1 -1
  757. package/script/types/4_inline_query_result.d.ts +1 -1
  758. package/script/types/4_inline_query_result.js +1 -1
  759. package/script/types/4_message.d.ts +2 -1
  760. package/script/types/4_message.d.ts.map +1 -1
  761. package/script/types/4_message.js +10 -3
  762. package/script/types/4_user_gift.d.ts +44 -0
  763. package/script/types/4_user_gift.d.ts.map +1 -0
  764. package/script/types/4_user_gift.js +46 -0
  765. package/script/types/5_callback_query.d.ts +1 -1
  766. package/script/types/5_callback_query.js +1 -1
  767. package/script/types/5_chat_list_item.d.ts +1 -1
  768. package/script/types/5_chat_list_item.js +1 -1
  769. package/script/types/5_inline_query_answer.d.ts +1 -1
  770. package/script/types/5_inline_query_answer.js +1 -1
  771. package/script/types/5_user_gifts.d.ts +32 -0
  772. package/script/types/5_user_gifts.d.ts.map +1 -0
  773. package/script/types/5_user_gifts.js +32 -0
  774. package/script/types/6_update.d.ts +1 -1
  775. package/script/types/6_update.js +1 -1
  776. package/script/types/_file_id.d.ts +1 -1
  777. package/script/types/_file_id.js +1 -1
  778. package/script/types/_getters.d.ts +1 -1
  779. package/script/types/_getters.js +1 -1
  780. package/script/utilities/0_bigint.js +1 -1
  781. package/script/utilities/0_buffer.d.ts +1 -1
  782. package/script/utilities/0_buffer.js +1 -1
  783. package/script/utilities/0_cache_map.d.ts +1 -1
  784. package/script/utilities/0_cache_map.js +1 -1
  785. package/script/utilities/0_color.d.ts +1 -1
  786. package/script/utilities/0_color.js +1 -1
  787. package/script/utilities/0_env.js +1 -1
  788. package/script/utilities/0_gunzip.d.ts +1 -1
  789. package/script/utilities/0_gunzip.js +1 -1
  790. package/script/utilities/0_hash.js +1 -1
  791. package/script/utilities/0_misc.d.ts +1 -1
  792. package/script/utilities/0_misc.js +1 -1
  793. package/script/utilities/0_mutex.d.ts +1 -1
  794. package/script/utilities/0_mutex.js +1 -1
  795. package/script/utilities/0_object.d.ts +1 -1
  796. package/script/utilities/0_object.js +1 -1
  797. package/script/utilities/0_part_stream.d.ts +1 -1
  798. package/script/utilities/0_part_stream.js +1 -1
  799. package/script/utilities/0_rle.d.ts +1 -1
  800. package/script/utilities/0_rle.js +1 -1
  801. package/script/utilities/0_types.d.ts +1 -1
  802. package/script/utilities/0_types.js +1 -1
  803. package/script/utilities/0_units.d.ts +1 -1
  804. package/script/utilities/0_units.js +1 -1
  805. package/script/utilities/1_auth.js +1 -1
  806. package/script/utilities/1_base64.d.ts +1 -1
  807. package/script/utilities/1_base64.js +1 -1
  808. package/script/utilities/1_crypto.d.ts +1 -1
  809. package/script/utilities/1_crypto.js +1 -1
  810. package/script/utilities/1_logger.d.ts +1 -1
  811. package/script/utilities/1_logger.js +1 -1
  812. package/script/utilities/1_math.d.ts +1 -1
  813. package/script/utilities/1_math.js +1 -1
  814. package/script/utilities/2_queue.d.ts +1 -1
  815. package/script/utilities/2_queue.js +1 -1
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.constructGiftUpgradedComponent = constructGiftUpgradedComponent;
23
+ const _0_deps_js_1 = require("../0_deps.js");
24
+ const _1_utilities_js_1 = require("../1_utilities.js");
25
+ const _2_tl_js_1 = require("../2_tl.js");
26
+ const _file_id_js_1 = require("./_file_id.js");
27
+ const _0_message_entity_js_1 = require("./0_message_entity.js");
28
+ const _1_sticker_js_1 = require("./1_sticker.js");
29
+ function constructGiftUpgradedComponent(attribute) {
30
+ const name = "name" in attribute ? attribute.name : "";
31
+ const rarityLevel = "rarity_permille" in attribute ? attribute.rarity_permille : 0;
32
+ switch (attribute._) {
33
+ case "starGiftAttributeModel": {
34
+ if (!(0, _2_tl_js_1.is)("document", attribute.document)) {
35
+ (0, _0_deps_js_1.unreachable)();
36
+ }
37
+ const fileId = {
38
+ type: _file_id_js_1.FileType.Sticker,
39
+ dcId: attribute.document.dc_id,
40
+ fileReference: attribute.document.file_reference,
41
+ location: { type: "common", id: attribute.document.id, accessHash: attribute.document.access_hash },
42
+ };
43
+ const sticker = (0, _1_sticker_js_1.constructSticker2)(attribute.document, (0, _file_id_js_1.serializeFileId)(fileId), (0, _file_id_js_1.toUniqueFileId)(fileId), undefined, "");
44
+ return {
45
+ type: "model",
46
+ name,
47
+ sticker,
48
+ rarityLevel,
49
+ };
50
+ }
51
+ case "starGiftAttributePattern": {
52
+ if (!(0, _2_tl_js_1.is)("document", attribute.document)) {
53
+ (0, _0_deps_js_1.unreachable)();
54
+ }
55
+ const fileId = {
56
+ type: _file_id_js_1.FileType.Sticker,
57
+ dcId: attribute.document.dc_id,
58
+ fileReference: attribute.document.file_reference,
59
+ location: { type: "common", id: attribute.document.id, accessHash: attribute.document.access_hash },
60
+ };
61
+ const sticker = (0, _1_sticker_js_1.constructSticker2)(attribute.document, (0, _file_id_js_1.serializeFileId)(fileId), (0, _file_id_js_1.toUniqueFileId)(fileId), undefined, "");
62
+ return {
63
+ type: "pattern",
64
+ name,
65
+ sticker,
66
+ rarityLevel,
67
+ };
68
+ }
69
+ case "starGiftAttributeBackdrop":
70
+ return {
71
+ type: "backdrop",
72
+ name,
73
+ centerColor: attribute.center_color,
74
+ edgeColor: attribute.edge_color,
75
+ patternColor: attribute.pattern_color,
76
+ textColor: attribute.text_color,
77
+ rarityLevel,
78
+ };
79
+ case "starGiftAttributeOriginalDetails":
80
+ return (0, _1_utilities_js_1.cleanObject)({
81
+ type: "originalDetails",
82
+ senderId: attribute.sender_id ? Number(attribute.sender_id) : undefined,
83
+ recipientId: Number(attribute.recipient_id),
84
+ date: (0, _1_utilities_js_1.fromUnixTimestamp)(attribute.date),
85
+ message: attribute.message?.text,
86
+ entities: attribute.message ? attribute.message.entities.map(_0_message_entity_js_1.constructMessageEntity).filter((v) => !!v) : undefined,
87
+ });
88
+ default:
89
+ (0, _0_deps_js_1.unreachable)();
90
+ }
91
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -0,0 +1,82 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2025 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 { Api } from "../2_tl.js";
21
+ import { Sticker } from "./1_sticker.js";
22
+ import { GiftUpgradedComponent } from "./2_gift_upgraded_component.js";
23
+ /**
24
+ * An non-upgraded gift.
25
+ *
26
+ * @unlisted
27
+ */
28
+ export interface GiftNonUpgraded {
29
+ /** @discriminator */
30
+ type: "nonupgraded";
31
+ /** The identifier of the gift. */
32
+ id: string;
33
+ /** The sticker that represents the gift. */
34
+ sticker: Sticker;
35
+ /** The price of the sticker in Telegram Stars. */
36
+ price: number;
37
+ /** Whether the supply of this gift is limited. */
38
+ limited: boolean;
39
+ /** The remaining supply of the gift if limited. */
40
+ remaining?: number;
41
+ /** The total supply of the gift if limited. */
42
+ total?: number;
43
+ /** Whether the gift is sold out if limited. */
44
+ soldOut?: boolean;
45
+ /** Whether the gift is dedicated to birthdays. */
46
+ birthday: boolean;
47
+ /** The amount of Telegram Stars that the gift can be swapped with. */
48
+ conversionPrice: number;
49
+ /** The date of the first sale of the gift if sold out. */
50
+ firstSaleDate?: Date;
51
+ /** The date of the last sale of the gift if sold out. */
52
+ lastSaleDate?: Date;
53
+ }
54
+ /**
55
+ * An upgraded gift.
56
+ *
57
+ * @unlisted
58
+ */
59
+ export interface GiftUpgraded {
60
+ /** @discriminator */
61
+ type: "upgraded";
62
+ /** The identifier of the gift. */
63
+ id: string;
64
+ /** The title of the gift. */
65
+ title: string;
66
+ /** The unique index of the gift among others of the same type. */
67
+ index: number;
68
+ /** The identifier of the user that owns the gift. */
69
+ ownerId: number;
70
+ /** The count of the amount of upgraded gifts of the same type. */
71
+ currentUpgrades: number;
72
+ /** The maximum count of gifts of the same type that can be upgraded. */
73
+ maxUpgrades: number;
74
+ /** The components of the gift. */
75
+ components: GiftUpgradedComponent[];
76
+ }
77
+ /** A gift. */
78
+ export type Gift = GiftNonUpgraded | GiftUpgraded;
79
+ export declare function constructGift(gift: Api.StarGift): Gift;
80
+ export declare function constructGiftUpgraded(gift: Api.starGiftUnique): GiftUpgraded;
81
+ export declare function constructGiftNonUpgraded(gift: Api.starGift): Gift;
82
+ //# sourceMappingURL=3_gift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_gift.d.ts","sourceRoot":"","sources":["../../src/types/3_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AAErC,OAAO,EAAqB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAkC,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvG;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,yDAAyD;IACzD,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,UAAU,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED,cAAc;AACd,MAAM,MAAM,IAAI,GAAG,eAAe,GAAG,YAAY,CAAC;AAElD,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAMtD;AACD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,cAAc,GAAG,YAAY,CAkB5E;AACD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAmCjE"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.constructGift = constructGift;
23
+ exports.constructGiftUpgraded = constructGiftUpgraded;
24
+ exports.constructGiftNonUpgraded = constructGiftNonUpgraded;
25
+ const _0_deps_js_1 = require("../0_deps.js");
26
+ const _1_utilities_js_1 = require("../1_utilities.js");
27
+ const _2_tl_js_1 = require("../2_tl.js");
28
+ const _file_id_js_1 = require("./_file_id.js");
29
+ const _1_sticker_js_1 = require("./1_sticker.js");
30
+ const _2_gift_upgraded_component_js_1 = require("./2_gift_upgraded_component.js");
31
+ function constructGift(gift) {
32
+ if ((0, _2_tl_js_1.is)("starGiftUnique", gift)) {
33
+ return constructGiftUpgraded(gift);
34
+ }
35
+ else {
36
+ return constructGiftNonUpgraded(gift);
37
+ }
38
+ }
39
+ function constructGiftUpgraded(gift) {
40
+ const id = String(gift.id);
41
+ const title = gift.title;
42
+ const index = gift.num;
43
+ const ownerId = Number(gift.owner_id);
44
+ const currentUpgrades = gift.availability_issued;
45
+ const maxUpgrades = gift.availability_total;
46
+ const components = gift.attributes.map(_2_gift_upgraded_component_js_1.constructGiftUpgradedComponent);
47
+ return {
48
+ type: "upgraded",
49
+ id,
50
+ title,
51
+ index,
52
+ ownerId,
53
+ currentUpgrades,
54
+ maxUpgrades,
55
+ components,
56
+ };
57
+ }
58
+ function constructGiftNonUpgraded(gift) {
59
+ if (!(0, _2_tl_js_1.is)("document", gift.sticker)) {
60
+ (0, _0_deps_js_1.unreachable)();
61
+ }
62
+ const id = String(gift.id);
63
+ const fileId = {
64
+ type: _file_id_js_1.FileType.Sticker,
65
+ dcId: gift.sticker.dc_id,
66
+ fileReference: gift.sticker.file_reference,
67
+ location: { type: "common", id: gift.sticker.id, accessHash: gift.sticker.access_hash },
68
+ };
69
+ const sticker = (0, _1_sticker_js_1.constructSticker2)(gift.sticker, (0, _file_id_js_1.serializeFileId)(fileId), (0, _file_id_js_1.toUniqueFileId)(fileId), undefined, "");
70
+ const price = Number(gift.stars);
71
+ const limited = !!gift.limited;
72
+ const remaining = limited ? gift.availability_remains ?? 0 : undefined;
73
+ const total = limited ? gift.availability_total ?? 0 : undefined;
74
+ const soldOut = limited ? !!gift.sold_out : undefined;
75
+ const birthday = !!gift.birthday;
76
+ const conversionPrice = Number(gift.convert_stars);
77
+ const firstSaleDate = limited ? gift.first_sale_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(gift.first_sale_date) : undefined : undefined;
78
+ const lastSaleDate = limited ? gift.last_sale_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(gift.last_sale_date) : undefined : undefined;
79
+ return (0, _1_utilities_js_1.cleanObject)({
80
+ type: "nonupgraded",
81
+ id,
82
+ sticker,
83
+ price,
84
+ limited,
85
+ remaining,
86
+ total,
87
+ soldOut,
88
+ birthday,
89
+ conversionPrice,
90
+ firstSaleDate,
91
+ lastSaleDate,
92
+ });
93
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
3
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
4
4
  *
5
5
  * This file is part of MTKruto.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
- * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ * Copyright (C) 2023-2025 Roj <https://roj.im/>
5
5
  *
6
6
  * This file is part of MTKruto.
7
7
  *