@mtkruto/node 0.3.1 → 0.5.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 (352) hide show
  1. package/esm/0_deps.d.ts +1 -1
  2. package/esm/0_deps.js +1 -1
  3. package/esm/4_constants.d.ts +1 -1
  4. package/esm/4_constants.js +4 -4
  5. package/esm/client/0_params.d.ts +10 -3
  6. package/esm/client/0_params.d.ts.map +1 -1
  7. package/esm/client/0_password.js +2 -2
  8. package/esm/client/0_utilities.d.ts +4 -4
  9. package/esm/client/0_utilities.d.ts.map +1 -1
  10. package/esm/client/1_client_encrypted.d.ts.map +1 -1
  11. package/esm/client/2_update_manager.js +1 -1
  12. package/esm/client/3_message_manager.d.ts.map +1 -1
  13. package/esm/client/3_message_manager.js +16 -0
  14. package/esm/client/5_client.d.ts.map +1 -1
  15. package/esm/client/5_client.js +3 -3
  16. package/esm/deps/jsr.io/@std/assert/1.0.6/array_includes.js +1 -1
  17. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js +4 -4
  18. package/esm/deps/jsr.io/@std/assert/1.0.6/greater.js +1 -1
  19. package/esm/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +1 -1
  20. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.js +1 -1
  21. package/esm/deps/jsr.io/@std/assert/1.0.6/less.js +1 -1
  22. package/esm/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +1 -1
  23. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +1 -1
  24. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +5 -5
  25. package/{script/deps/jsr.io/@std/internal/1.0.4 → esm/deps/jsr.io/@std/internal/1.0.5}/build_message.d.ts.map +1 -1
  26. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
  27. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
  28. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
  29. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
  30. package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
  31. package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts.map +1 -1
  32. package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
  33. package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
  34. package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
  35. package/esm/tl/0_api.d.ts +199 -41
  36. package/esm/tl/0_api.d.ts.map +1 -1
  37. package/esm/tl/0_api.js +314 -75
  38. package/esm/transport/1_transport_abridged.d.ts.map +1 -1
  39. package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
  40. package/esm/transport/2_transport_provider.js +4 -4
  41. package/esm/types/2_inline_keyboard_button.d.ts +9 -1
  42. package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
  43. package/esm/types/2_inline_keyboard_button.js +6 -0
  44. package/esm/types/2_invite_link.d.ts +5 -1
  45. package/esm/types/2_invite_link.d.ts.map +1 -1
  46. package/esm/types/2_invite_link.js +2 -0
  47. package/esm/utilities/0_cache_map.d.ts.map +1 -1
  48. package/esm/utilities/0_units.js +3 -3
  49. package/esm/utilities/2_queue.d.ts.map +1 -1
  50. package/package.json +1 -1
  51. package/script/0_deps.d.ts +1 -1
  52. package/script/0_deps.js +3 -3
  53. package/script/4_constants.d.ts +1 -1
  54. package/script/4_constants.js +4 -4
  55. package/script/4_errors.js +2 -2
  56. package/script/client/0_filters.js +1 -2
  57. package/script/client/0_html.js +1 -2
  58. package/script/client/0_markdown.js +2 -2
  59. package/script/client/0_message.js +5 -6
  60. package/script/client/0_params.d.ts +10 -3
  61. package/script/client/0_params.d.ts.map +1 -1
  62. package/script/client/0_password.js +8 -8
  63. package/script/client/0_utilities.d.ts +4 -4
  64. package/script/client/0_utilities.d.ts.map +1 -1
  65. package/script/client/0_utilities.js +16 -16
  66. package/script/client/1_client_encrypted.d.ts.map +1 -1
  67. package/script/client/1_composer.js +4 -4
  68. package/script/client/2_update_manager.js +1 -1
  69. package/script/client/3_message_manager.d.ts.map +1 -1
  70. package/script/client/3_message_manager.js +16 -0
  71. package/script/client/5_client.d.ts.map +1 -1
  72. package/script/client/5_client.js +2 -2
  73. package/script/deps/deno.land/std@0.224.0/io/write_all.js +2 -3
  74. package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.js +1 -1
  75. package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +2 -2
  76. package/script/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.js +2 -2
  77. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Node.js +9 -9
  78. package/script/deps/deno.land/x/html_parser@v0.1.3/src/mod.js +4 -4
  79. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.js +1 -1
  80. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.js +3 -3
  81. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +4 -4
  82. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +4 -4
  83. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.js +5 -6
  84. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.js +6 -7
  85. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.js +6 -7
  86. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.js +5 -6
  87. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.js +8 -9
  88. package/script/deps/deno.land/x/tgcrypto@0.4.1/mod.js +10 -11
  89. package/script/deps/jsr.io/@std/assert/1.0.6/almost_equals.js +1 -2
  90. package/script/deps/jsr.io/@std/assert/1.0.6/array_includes.js +2 -3
  91. package/script/deps/jsr.io/@std/assert/1.0.6/assert.js +1 -2
  92. package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +1 -2
  93. package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +5 -6
  94. package/script/deps/jsr.io/@std/assert/1.0.6/exists.js +1 -2
  95. package/script/deps/jsr.io/@std/assert/1.0.6/fail.js +1 -2
  96. package/script/deps/jsr.io/@std/assert/1.0.6/false.js +1 -2
  97. package/script/deps/jsr.io/@std/assert/1.0.6/greater.js +2 -3
  98. package/script/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +2 -3
  99. package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.js +1 -2
  100. package/script/deps/jsr.io/@std/assert/1.0.6/is_error.js +2 -3
  101. package/script/deps/jsr.io/@std/assert/1.0.6/less.js +2 -3
  102. package/script/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +2 -3
  103. package/script/deps/jsr.io/@std/assert/1.0.6/match.js +1 -2
  104. package/script/deps/jsr.io/@std/assert/1.0.6/not_equals.js +1 -2
  105. package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +1 -2
  106. package/script/deps/jsr.io/@std/assert/1.0.6/not_match.js +1 -2
  107. package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +2 -3
  108. package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +1 -2
  109. package/script/deps/jsr.io/@std/assert/1.0.6/rejects.js +1 -2
  110. package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +6 -7
  111. package/script/deps/jsr.io/@std/assert/1.0.6/string_includes.js +1 -2
  112. package/script/deps/jsr.io/@std/assert/1.0.6/throws.js +1 -2
  113. package/script/deps/jsr.io/@std/assert/1.0.6/unimplemented.js +1 -2
  114. package/script/deps/jsr.io/@std/assert/1.0.6/unreachable.js +1 -2
  115. package/script/deps/jsr.io/@std/bytes/1.0.2/concat.js +1 -2
  116. package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +1 -2
  117. package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +2 -3
  118. package/{esm/deps/jsr.io/@std/internal/1.0.4 → script/deps/jsr.io/@std/internal/1.0.5}/build_message.d.ts.map +1 -1
  119. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +3 -4
  120. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
  121. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +5 -6
  122. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
  123. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +4 -5
  124. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
  125. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +1 -2
  126. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
  127. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +10 -11
  128. package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
  129. package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts.map +1 -1
  130. package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
  131. package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
  132. package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +2 -3
  133. package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
  134. package/script/deps/jsr.io/@std/media-types/1.0.3/_util.js +8 -9
  135. package/script/deps/jsr.io/@std/media-types/1.0.3/all_extensions.js +1 -2
  136. package/script/deps/jsr.io/@std/media-types/1.0.3/content_type.js +1 -2
  137. package/script/deps/jsr.io/@std/media-types/1.0.3/extension.js +1 -2
  138. package/script/deps/jsr.io/@std/media-types/1.0.3/format_media_type.js +1 -2
  139. package/script/deps/jsr.io/@std/media-types/1.0.3/get_charset.js +1 -2
  140. package/script/deps/jsr.io/@std/media-types/1.0.3/parse_media_type.js +1 -2
  141. package/script/deps/jsr.io/@std/media-types/1.0.3/type_by_extension.js +1 -2
  142. package/script/deps/jsr.io/@std/path/1.0.6/_common/assert_path.js +1 -2
  143. package/script/deps/jsr.io/@std/path/1.0.6/_common/basename.js +3 -4
  144. package/script/deps/jsr.io/@std/path/1.0.6/_common/common.js +1 -2
  145. package/script/deps/jsr.io/@std/path/1.0.6/_common/dirname.js +1 -2
  146. package/script/deps/jsr.io/@std/path/1.0.6/_common/format.js +2 -3
  147. package/script/deps/jsr.io/@std/path/1.0.6/_common/from_file_url.js +1 -2
  148. package/script/deps/jsr.io/@std/path/1.0.6/_common/glob_to_reg_exp.js +1 -2
  149. package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize.js +1 -2
  150. package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize_string.js +1 -2
  151. package/script/deps/jsr.io/@std/path/1.0.6/_common/relative.js +1 -2
  152. package/script/deps/jsr.io/@std/path/1.0.6/_common/strip_trailing_separators.js +1 -2
  153. package/script/deps/jsr.io/@std/path/1.0.6/_common/to_file_url.js +1 -2
  154. package/script/deps/jsr.io/@std/path/1.0.6/basename.js +1 -2
  155. package/script/deps/jsr.io/@std/path/1.0.6/common.js +1 -2
  156. package/script/deps/jsr.io/@std/path/1.0.6/dirname.js +1 -2
  157. package/script/deps/jsr.io/@std/path/1.0.6/extname.js +1 -2
  158. package/script/deps/jsr.io/@std/path/1.0.6/format.js +1 -2
  159. package/script/deps/jsr.io/@std/path/1.0.6/from_file_url.js +1 -2
  160. package/script/deps/jsr.io/@std/path/1.0.6/glob_to_regexp.js +1 -2
  161. package/script/deps/jsr.io/@std/path/1.0.6/is_absolute.js +1 -2
  162. package/script/deps/jsr.io/@std/path/1.0.6/is_glob.js +1 -2
  163. package/script/deps/jsr.io/@std/path/1.0.6/join.js +1 -2
  164. package/script/deps/jsr.io/@std/path/1.0.6/join_globs.js +1 -2
  165. package/script/deps/jsr.io/@std/path/1.0.6/normalize.js +1 -2
  166. package/script/deps/jsr.io/@std/path/1.0.6/normalize_glob.js +1 -2
  167. package/script/deps/jsr.io/@std/path/1.0.6/parse.js +1 -2
  168. package/script/deps/jsr.io/@std/path/1.0.6/posix/_util.js +1 -2
  169. package/script/deps/jsr.io/@std/path/1.0.6/posix/basename.js +1 -2
  170. package/script/deps/jsr.io/@std/path/1.0.6/posix/dirname.js +1 -2
  171. package/script/deps/jsr.io/@std/path/1.0.6/posix/extname.js +1 -2
  172. package/script/deps/jsr.io/@std/path/1.0.6/posix/format.js +1 -2
  173. package/script/deps/jsr.io/@std/path/1.0.6/posix/from_file_url.js +1 -2
  174. package/script/deps/jsr.io/@std/path/1.0.6/posix/glob_to_regexp.js +1 -2
  175. package/script/deps/jsr.io/@std/path/1.0.6/posix/is_absolute.js +1 -2
  176. package/script/deps/jsr.io/@std/path/1.0.6/posix/join.js +1 -2
  177. package/script/deps/jsr.io/@std/path/1.0.6/posix/join_globs.js +1 -2
  178. package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize.js +1 -2
  179. package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize_glob.js +1 -2
  180. package/script/deps/jsr.io/@std/path/1.0.6/posix/parse.js +1 -2
  181. package/script/deps/jsr.io/@std/path/1.0.6/posix/relative.js +1 -2
  182. package/script/deps/jsr.io/@std/path/1.0.6/posix/resolve.js +1 -2
  183. package/script/deps/jsr.io/@std/path/1.0.6/posix/to_file_url.js +1 -2
  184. package/script/deps/jsr.io/@std/path/1.0.6/posix/to_namespaced_path.js +1 -2
  185. package/script/deps/jsr.io/@std/path/1.0.6/relative.js +1 -2
  186. package/script/deps/jsr.io/@std/path/1.0.6/resolve.js +1 -2
  187. package/script/deps/jsr.io/@std/path/1.0.6/to_file_url.js +1 -2
  188. package/script/deps/jsr.io/@std/path/1.0.6/to_namespaced_path.js +1 -2
  189. package/script/deps/jsr.io/@std/path/1.0.6/windows/_util.js +3 -4
  190. package/script/deps/jsr.io/@std/path/1.0.6/windows/basename.js +1 -2
  191. package/script/deps/jsr.io/@std/path/1.0.6/windows/dirname.js +1 -2
  192. package/script/deps/jsr.io/@std/path/1.0.6/windows/extname.js +1 -2
  193. package/script/deps/jsr.io/@std/path/1.0.6/windows/format.js +1 -2
  194. package/script/deps/jsr.io/@std/path/1.0.6/windows/from_file_url.js +1 -2
  195. package/script/deps/jsr.io/@std/path/1.0.6/windows/glob_to_regexp.js +1 -2
  196. package/script/deps/jsr.io/@std/path/1.0.6/windows/is_absolute.js +1 -2
  197. package/script/deps/jsr.io/@std/path/1.0.6/windows/join.js +1 -2
  198. package/script/deps/jsr.io/@std/path/1.0.6/windows/join_globs.js +1 -2
  199. package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize.js +1 -2
  200. package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize_glob.js +1 -2
  201. package/script/deps/jsr.io/@std/path/1.0.6/windows/parse.js +1 -2
  202. package/script/deps/jsr.io/@std/path/1.0.6/windows/relative.js +1 -2
  203. package/script/deps/jsr.io/@std/path/1.0.6/windows/resolve.js +1 -2
  204. package/script/deps/jsr.io/@std/path/1.0.6/windows/to_file_url.js +1 -2
  205. package/script/deps/jsr.io/@std/path/1.0.6/windows/to_namespaced_path.js +1 -2
  206. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/utils/uint8.js +1 -2
  207. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.js +2 -2
  208. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/adler32.js +1 -1
  209. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/crc32.js +2 -3
  210. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/deflate.js +6 -6
  211. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inffast.js +1 -1
  212. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inflate.js +10 -10
  213. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inftrees.js +1 -1
  214. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/trees.js +5 -6
  215. package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +1 -2
  216. package/script/storage/1_utilities.js +7 -7
  217. package/script/tl/0_api.d.ts +199 -41
  218. package/script/tl/0_api.d.ts.map +1 -1
  219. package/script/tl/0_api.js +314 -75
  220. package/script/tl/1_utilities.js +9 -10
  221. package/script/tl/2_deserialize.js +1 -2
  222. package/script/tl/2_serialize.js +1 -2
  223. package/script/tl/3_utilities.js +6 -7
  224. package/script/tl/4_rpc_result.js +2 -2
  225. package/script/tl/5_message.js +6 -6
  226. package/script/transport/0_obfuscation.js +1 -2
  227. package/script/transport/1_transport_abridged.d.ts.map +1 -1
  228. package/script/transport/1_transport_intermediate.d.ts.map +1 -1
  229. package/script/transport/2_transport_provider.js +7 -8
  230. package/script/transport/3_transport_provider_tcp.js +1 -2
  231. package/script/types/0_birthday.js +1 -2
  232. package/script/types/0_callback_query_answer.js +1 -2
  233. package/script/types/0_callback_query_question.js +1 -2
  234. package/script/types/0_chat_administrator_rights.js +2 -3
  235. package/script/types/0_chat_member_rights.js +2 -3
  236. package/script/types/0_chat_photo.js +1 -2
  237. package/script/types/0_contact.js +1 -2
  238. package/script/types/0_dice.js +1 -2
  239. package/script/types/0_failed_invitation.js +1 -2
  240. package/script/types/0_giveaway_parameters.js +1 -2
  241. package/script/types/0_invoice.js +1 -2
  242. package/script/types/0_link_preview.js +1 -2
  243. package/script/types/0_live_stream_channel.js +1 -2
  244. package/script/types/0_location.js +1 -2
  245. package/script/types/0_mask_position.js +1 -2
  246. package/script/types/0_message_entity.js +3 -4
  247. package/script/types/0_message_search_filter.js +1 -2
  248. package/script/types/0_mini_app_info.js +1 -2
  249. package/script/types/0_opening_hours.js +1 -2
  250. package/script/types/0_reaction.js +3 -4
  251. package/script/types/0_refunded_payment.js +1 -2
  252. package/script/types/0_restriction_reason.js +1 -2
  253. package/script/types/0_self_destruct_option.js +1 -2
  254. package/script/types/0_shipping_address.js +1 -2
  255. package/script/types/0_thumbnail.js +1 -2
  256. package/script/types/0_video_chat.js +1 -2
  257. package/script/types/0_voice.js +1 -2
  258. package/script/types/1_animation.js +1 -2
  259. package/script/types/1_audio.js +1 -2
  260. package/script/types/1_bot_command_scope.js +1 -2
  261. package/script/types/1_chat_p.js +1 -2
  262. package/script/types/1_document.js +1 -2
  263. package/script/types/1_giveaway.js +1 -2
  264. package/script/types/1_keyboard_button.js +2 -3
  265. package/script/types/1_message_reaction.js +1 -2
  266. package/script/types/1_order_info.js +1 -2
  267. package/script/types/1_photo.js +2 -3
  268. package/script/types/1_poll_option.js +1 -2
  269. package/script/types/1_reaction_count.js +1 -2
  270. package/script/types/1_reply_quote.js +1 -2
  271. package/script/types/1_sticker.js +1 -2
  272. package/script/types/1_story_privacy.js +2 -3
  273. package/script/types/1_story_reaction.js +1 -2
  274. package/script/types/1_user.js +1 -2
  275. package/script/types/1_venue.js +1 -2
  276. package/script/types/1_video.js +1 -2
  277. package/script/types/1_video_note.js +1 -2
  278. package/script/types/2_business_connection.js +1 -2
  279. package/script/types/2_chat.js +1 -2
  280. package/script/types/2_chat_member.js +1 -2
  281. package/script/types/2_chosen_inline_result.js +1 -2
  282. package/script/types/2_forward_header.js +1 -2
  283. package/script/types/2_game.js +1 -2
  284. package/script/types/2_inactive_chat.js +1 -2
  285. package/script/types/2_inline_keyboard_button.d.ts +9 -1
  286. package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
  287. package/script/types/2_inline_keyboard_button.js +8 -3
  288. package/script/types/2_inline_query.js +1 -2
  289. package/script/types/2_invite_link.d.ts +5 -1
  290. package/script/types/2_invite_link.d.ts.map +1 -1
  291. package/script/types/2_invite_link.js +3 -2
  292. package/script/types/2_message_reaction_count.js +1 -2
  293. package/script/types/2_message_reactions.js +1 -2
  294. package/script/types/2_poll.js +1 -2
  295. package/script/types/2_pre_checkout_query.js +1 -2
  296. package/script/types/2_story_content.js +1 -2
  297. package/script/types/2_story_interactions.js +1 -2
  298. package/script/types/2_story_interactive_area.js +2 -3
  299. package/script/types/2_successful_payment.js +1 -2
  300. package/script/types/3_chat_member_updated.js +1 -2
  301. package/script/types/3_join_request.js +1 -2
  302. package/script/types/3_reply_markup.js +2 -3
  303. package/script/types/3_story.js +1 -2
  304. package/script/types/4_inline_query_result.js +2 -3
  305. package/script/types/4_message.js +2 -3
  306. package/script/types/5_callback_query.js +2 -3
  307. package/script/types/5_chat_list_item.js +5 -6
  308. package/script/types/5_inline_query_answer.js +1 -2
  309. package/script/types/_file_id.js +5 -5
  310. package/script/utilities/0_bigint.js +6 -7
  311. package/script/utilities/0_buffer.js +1 -2
  312. package/script/utilities/0_cache_map.d.ts.map +1 -1
  313. package/script/utilities/0_color.js +2 -3
  314. package/script/utilities/0_env.js +2 -3
  315. package/script/utilities/0_hash.js +2 -3
  316. package/script/utilities/0_object.js +1 -2
  317. package/script/utilities/0_rle.js +2 -3
  318. package/script/utilities/0_units.js +3 -3
  319. package/script/utilities/1_auth.js +1 -2
  320. package/script/utilities/1_base64.js +2 -3
  321. package/script/utilities/1_logger.js +5 -5
  322. package/script/utilities/1_math.js +1 -2
  323. package/script/utilities/1_misc.js +8 -8
  324. package/script/utilities/2_queue.d.ts.map +1 -1
  325. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
  326. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
  327. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
  328. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
  329. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
  330. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
  331. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
  332. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
  333. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
  334. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
  335. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
  336. /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
  337. /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
  338. /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
  339. /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +0 -0
  340. /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
  341. /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
  342. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
  343. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
  344. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
  345. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
  346. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
  347. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
  348. /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
  349. /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
  350. /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
  351. /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
  352. /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
@@ -20,13 +20,20 @@
20
20
  */
21
21
  // deno-lint-ignore-file no-explicit-any
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.isGenericFunction = exports.as = exports.isOfEnum = exports.isOneOf = exports.is = exports.assertIsValidType = exports.isValidType = exports.analyzeOptionalParam = exports.isOptionalParam = void 0;
23
+ exports.isOptionalParam = isOptionalParam;
24
+ exports.analyzeOptionalParam = analyzeOptionalParam;
25
+ exports.isValidType = isValidType;
26
+ exports.assertIsValidType = assertIsValidType;
27
+ exports.is = is;
28
+ exports.isOneOf = isOneOf;
29
+ exports.isOfEnum = isOfEnum;
30
+ exports.as = as;
31
+ exports.isGenericFunction = isGenericFunction;
24
32
  const _0_deps_js_1 = require("../0_deps.js");
25
33
  const _0_api_js_1 = require("./0_api.js");
26
34
  function isOptionalParam(ntype) {
27
35
  return ntype.includes("?");
28
36
  }
29
- exports.isOptionalParam = isOptionalParam;
30
37
  function analyzeOptionalParam(ntype) {
31
38
  if (!isOptionalParam(ntype)) {
32
39
  throw new Error("Parameter not optional");
@@ -37,17 +44,14 @@ function analyzeOptionalParam(ntype) {
37
44
  (0, _0_deps_js_1.assertFalse)(isNaN(bitIndex));
38
45
  return { flagField, bitIndex };
39
46
  }
40
- exports.analyzeOptionalParam = analyzeOptionalParam;
41
47
  function isValidType(object) {
42
48
  return object != null && typeof object === "object" && typeof object._ === "string" && (0, _0_api_js_1.getType)(object._) !== undefined;
43
49
  }
44
- exports.isValidType = isValidType;
45
50
  function assertIsValidType(object) {
46
51
  if (!isValidType(object)) {
47
52
  throw new Error("Invalid object");
48
53
  }
49
54
  }
50
- exports.assertIsValidType = assertIsValidType;
51
55
  function is(typeName, value) {
52
56
  if (!isValidType(value)) {
53
57
  return false;
@@ -56,15 +60,12 @@ function is(typeName, value) {
56
60
  return value._ === typeName;
57
61
  }
58
62
  }
59
- exports.is = is;
60
63
  function isOneOf(typeNames, value) {
61
64
  return typeNames.some((v) => is(v, value));
62
65
  }
63
- exports.isOneOf = isOneOf;
64
66
  function isOfEnum(enumName, value) {
65
67
  return isOneOf((0, _0_api_js_1.getEnum)(enumName) ?? [], value);
66
68
  }
67
- exports.isOfEnum = isOfEnum;
68
69
  function as(typeName, value) {
69
70
  if (is(typeName, value)) {
70
71
  return value;
@@ -73,7 +74,6 @@ function as(typeName, value) {
73
74
  (0, _0_deps_js_1.unreachable)();
74
75
  }
75
76
  }
76
- exports.as = as;
77
77
  const GENERIC_FUNCTIONS = [
78
78
  "invokeAfterMsg",
79
79
  "invokeAfterMsgs",
@@ -86,4 +86,3 @@ const GENERIC_FUNCTIONS = [
86
86
  function isGenericFunction(value) {
87
87
  return isOneOf(GENERIC_FUNCTIONS, value);
88
88
  }
89
- exports.isGenericFunction = isGenericFunction;
@@ -20,7 +20,7 @@
20
20
  */
21
21
  // deno-lint-ignore-file no-explicit-any
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.deserialize = void 0;
23
+ exports.deserialize = deserialize;
24
24
  const _0_deps_js_1 = require("../0_deps.js");
25
25
  const _1_utilities_js_1 = require("./1_utilities.js");
26
26
  const _0_api_js_1 = require("./0_api.js");
@@ -96,4 +96,3 @@ function deserialize(reader, paramDesc, name) {
96
96
  }
97
97
  return type_;
98
98
  }
99
- exports.deserialize = deserialize;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serialize = void 0;
3
+ exports.serialize = serialize;
4
4
  /**
5
5
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
6
6
  * Copyright (C) 2023-2024 Roj <https://roj.im/>
@@ -161,4 +161,3 @@ function serialize(type_) {
161
161
  }
162
162
  return writer.buffer;
163
163
  }
164
- exports.serialize = serialize;
@@ -19,13 +19,17 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.inputPeerToPeer = exports.getChatIdPeerType = exports.chatIdToPeerId = exports.chatIdToPeer = exports.peerToChatId = exports.getChannelChatId = void 0;
22
+ exports.getChannelChatId = getChannelChatId;
23
+ exports.peerToChatId = peerToChatId;
24
+ exports.chatIdToPeer = chatIdToPeer;
25
+ exports.chatIdToPeerId = chatIdToPeerId;
26
+ exports.getChatIdPeerType = getChatIdPeerType;
27
+ exports.inputPeerToPeer = inputPeerToPeer;
23
28
  const _0_deps_js_1 = require("../0_deps.js");
24
29
  const _1_utilities_js_1 = require("../1_utilities.js");
25
30
  function getChannelChatId(channelId) {
26
31
  return _1_utilities_js_1.ZERO_CHANNEL_ID + -Number(channelId);
27
32
  }
28
- exports.getChannelChatId = getChannelChatId;
29
33
  function peerToChatId(peer) {
30
34
  if (("_" in peer && (peer._ == "peerUser" || peer._ == "inputPeerUser" || peer._ == "inputPeerUserFromMessage" || peer._ == "user" || peer._ == "userFull")) || "user_id" in peer) {
31
35
  return Number("user_id" in peer ? peer.user_id : peer.id);
@@ -40,7 +44,6 @@ function peerToChatId(peer) {
40
44
  (0, _0_deps_js_1.unreachable)();
41
45
  }
42
46
  }
43
- exports.peerToChatId = peerToChatId;
44
47
  function chatIdToPeer(chatId) {
45
48
  if (chatId > 0) {
46
49
  return { _: "peerUser", user_id: BigInt(chatId) };
@@ -52,7 +55,6 @@ function chatIdToPeer(chatId) {
52
55
  return { _: "peerChannel", channel_id: BigInt(_1_utilities_js_1.ZERO_CHANNEL_ID - chatId) };
53
56
  }
54
57
  }
55
- exports.chatIdToPeer = chatIdToPeer;
56
58
  function chatIdToPeerId(chatId) {
57
59
  const peer = chatIdToPeer(chatId);
58
60
  if ("user_id" in peer) {
@@ -68,7 +70,6 @@ function chatIdToPeerId(chatId) {
68
70
  (0, _0_deps_js_1.unreachable)();
69
71
  }
70
72
  }
71
- exports.chatIdToPeerId = chatIdToPeerId;
72
73
  function getChatIdPeerType(chatId) {
73
74
  if (chatId > 0) {
74
75
  return "user";
@@ -80,7 +81,6 @@ function getChatIdPeerType(chatId) {
80
81
  return "channel";
81
82
  }
82
83
  }
83
- exports.getChatIdPeerType = getChatIdPeerType;
84
84
  function inputPeerToPeer(inputPeer) {
85
85
  if ("user_id" in inputPeer) {
86
86
  return { ...inputPeer, _: "peerUser" };
@@ -95,4 +95,3 @@ function inputPeerToPeer(inputPeer) {
95
95
  (0, _0_deps_js_1.unreachable)();
96
96
  }
97
97
  }
98
- exports.inputPeerToPeer = inputPeerToPeer;
@@ -19,7 +19,8 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.deserializeRpcResult = exports.RPC_RESULT_ID = void 0;
22
+ exports.RPC_RESULT_ID = void 0;
23
+ exports.deserializeRpcResult = deserializeRpcResult;
23
24
  const _3_tl_reader_js_1 = require("./3_tl_reader.js");
24
25
  // rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult;
25
26
  exports.RPC_RESULT_ID = 0xF35C6D01;
@@ -29,4 +30,3 @@ function deserializeRpcResult(buffer) {
29
30
  const result = reader.readObject();
30
31
  return { _: "rpc_result", req_msg_id: messageId, result };
31
32
  }
32
- exports.deserializeRpcResult = deserializeRpcResult;
@@ -19,7 +19,12 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.deserializeMsgContainer = exports.serializeMsgContainer = exports.MSG_CONTAINER_ID = exports.deserializeMessage = exports.serializeMessage = exports.calculateLength = void 0;
22
+ exports.MSG_CONTAINER_ID = void 0;
23
+ exports.calculateLength = calculateLength;
24
+ exports.serializeMessage = serializeMessage;
25
+ exports.deserializeMessage = deserializeMessage;
26
+ exports.serializeMsgContainer = serializeMsgContainer;
27
+ exports.deserializeMsgContainer = deserializeMsgContainer;
23
28
  const _2_serialize_js_1 = require("./2_serialize.js");
24
29
  const _3_tl_reader_js_1 = require("./3_tl_reader.js");
25
30
  const _4_rpc_result_js_1 = require("./4_rpc_result.js");
@@ -44,7 +49,6 @@ function calculateLength(object) {
44
49
  }
45
50
  return length;
46
51
  }
47
- exports.calculateLength = calculateLength;
48
52
  function serializeMessage(message) {
49
53
  if (message.body._ == "rpc_result") {
50
54
  throw new Error("Not applicable");
@@ -61,7 +65,6 @@ function serializeMessage(message) {
61
65
  }
62
66
  return writer.buffer;
63
67
  }
64
- exports.serializeMessage = serializeMessage;
65
68
  function deserializeMessage(reader) {
66
69
  const id_ = reader.readInt64();
67
70
  const seqno = reader.readInt32();
@@ -82,7 +85,6 @@ function deserializeMessage(reader) {
82
85
  }
83
86
  return { _: "message", msg_id: id_, seqno, body };
84
87
  }
85
- exports.deserializeMessage = deserializeMessage;
86
88
  exports.MSG_CONTAINER_ID = 0x73F1F8DC;
87
89
  function serializeMsgContainer(msgContainer) {
88
90
  const writer = new _4_tl_writer_js_1.TLWriter();
@@ -93,7 +95,6 @@ function serializeMsgContainer(msgContainer) {
93
95
  }
94
96
  return writer.buffer;
95
97
  }
96
- exports.serializeMsgContainer = serializeMsgContainer;
97
98
  function deserializeMsgContainer(buffer) {
98
99
  const reader = new _3_tl_reader_js_1.TLReader(buffer);
99
100
  const length = reader.readInt32();
@@ -103,4 +104,3 @@ function deserializeMsgContainer(buffer) {
103
104
  }
104
105
  return { _: "msg_container", messages };
105
106
  }
106
- exports.deserializeMsgContainer = deserializeMsgContainer;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getObfuscationParameters = void 0;
26
+ exports.getObfuscationParameters = getObfuscationParameters;
27
27
  /**
28
28
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
29
29
  * Copyright (C) 2023-2024 Roj <https://roj.im/>
@@ -76,4 +76,3 @@ async function getObfuscationParameters(protocol, connection) {
76
76
  await connection.write((0, _0_deps_js_1.concat)([init.subarray(0, 56), encryptedInit.subarray(56, 56 + 8)]));
77
77
  return { encryptionCTR, decryptionCTR };
78
78
  }
79
- exports.getObfuscationParameters = getObfuscationParameters;
@@ -1 +1 @@
1
- {"version":3,"file":"1_transport_abridged.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_abridged.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,iBAAkB,SAAQ,SAAU,YAAW,SAAS;;gBAKvD,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAWV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IA2B9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAe7B,YAAY;IAKZ,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
1
+ {"version":3,"file":"1_transport_abridged.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_abridged.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,iBAAkB,SAAQ,SAAU,YAAW,SAAS;;gBAKvD,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAWV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IA2B9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAepB,YAAY;IAKrB,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"1_transport_intermediate.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_intermediate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,qBAAsB,SAAQ,SAAU,YAAW,SAAS;;gBAK3D,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAaV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAiB9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAY7B,YAAY;IAKZ,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
1
+ {"version":3,"file":"1_transport_intermediate.d.ts","sourceRoot":"","sources":["../../src/transport/1_transport_intermediate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBAAa,qBAAsB,SAAQ,SAAU,YAAW,SAAS;;gBAK3D,UAAU,EAAE,UAAU,EAAE,UAAU,UAAQ;IAMhD,UAAU;IAaV,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAiB9B,IAAI,CAAC,MAAM,EAAE,UAAU;IAYpB,YAAY;IAKrB,IAAI,WAAW,IAAI,OAAO,CAEzB;CACF"}
@@ -19,7 +19,9 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.getDc = exports.getDcId = exports.getDcIps = void 0;
22
+ exports.getDcIps = getDcIps;
23
+ exports.getDcId = getDcId;
24
+ exports.getDc = getDc;
23
25
  const _0_deps_js_1 = require("../0_deps.js");
24
26
  function getDcIps(dc, version) {
25
27
  switch (version) {
@@ -71,17 +73,14 @@ function getDcIps(dc, version) {
71
73
  (0, _0_deps_js_1.unreachable)();
72
74
  }
73
75
  }
74
- exports.getDcIps = getDcIps;
75
76
  function getDcId(dc, cdn) {
76
- return Number(dc[0]) + (dc.endsWith("-test") ? 10000 : 0) * (cdn ? -1 : 1);
77
+ return Number(dc[0]) + (dc.endsWith("-test") ? 10_000 : 0) * (cdn ? -1 : 1);
77
78
  }
78
- exports.getDcId = getDcId;
79
79
  function getDc(dcId) {
80
80
  dcId = Math.abs(dcId);
81
- const test = dcId >= 10000;
82
- if (dcId >= 10000) {
83
- dcId -= 10000;
81
+ const test = dcId >= 10_000;
82
+ if (dcId >= 10_000) {
83
+ dcId -= 10_000;
84
84
  }
85
85
  return `${dcId}${test ? "-test" : ""}`;
86
86
  }
87
- exports.getDc = getDc;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transportProviderTcp = void 0;
3
+ exports.transportProviderTcp = transportProviderTcp;
4
4
  const _0_deps_js_1 = require("../0_deps.js");
5
5
  const _1_connection_tcp_node_js_1 = require("../connection/1_connection_tcp.node.js");
6
6
  const _1_transport_abridged_js_1 = require("./1_transport_abridged.js");
@@ -16,4 +16,3 @@ function transportProviderTcp(params) {
16
16
  return { connection, transport, dcId: (0, _2_transport_provider_js_1.getDcId)(dc, cdn) };
17
17
  };
18
18
  }
19
- exports.transportProviderTcp = transportProviderTcp;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructBirthday = void 0;
22
+ exports.constructBirthday = constructBirthday;
23
23
  function constructBirthday(birthday) {
24
24
  return {
25
25
  day: birthday.day,
@@ -27,4 +27,3 @@ function constructBirthday(birthday) {
27
27
  year: birthday.year,
28
28
  };
29
29
  }
30
- exports.constructBirthday = constructBirthday;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructCallbackQueryAnswer = void 0;
22
+ exports.constructCallbackQueryAnswer = constructCallbackQueryAnswer;
23
23
  function constructCallbackQueryAnswer(answer) {
24
24
  return {
25
25
  alert: !!answer.alert,
@@ -27,4 +27,3 @@ function constructCallbackQueryAnswer(answer) {
27
27
  url: answer.url ?? "",
28
28
  };
29
29
  }
30
- exports.constructCallbackQueryAnswer = constructCallbackQueryAnswer;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.validateCallbackQueryQuestion = void 0;
22
+ exports.validateCallbackQueryQuestion = validateCallbackQueryQuestion;
23
23
  const _0_errors_js_1 = require("../0_errors.js");
24
24
  function validateCallbackQueryQuestion(q) {
25
25
  if (!["game", "password", "button"].includes(q.type)) {
@@ -32,4 +32,3 @@ function validateCallbackQueryQuestion(q) {
32
32
  throw new _0_errors_js_1.InputError("Got empty button data.");
33
33
  }
34
34
  }
35
- exports.validateCallbackQueryQuestion = validateCallbackQueryQuestion;
@@ -19,7 +19,8 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.chatAdministratorRightsToTlObject = exports.constructChatAdministratorRights = void 0;
22
+ exports.constructChatAdministratorRights = constructChatAdministratorRights;
23
+ exports.chatAdministratorRightsToTlObject = chatAdministratorRightsToTlObject;
23
24
  function constructChatAdministratorRights(rights_) {
24
25
  const rights = {
25
26
  isAnonymous: rights_.anonymous || false,
@@ -45,8 +46,6 @@ function constructChatAdministratorRights(rights_) {
45
46
  }
46
47
  return rights;
47
48
  }
48
- exports.constructChatAdministratorRights = constructChatAdministratorRights;
49
49
  function chatAdministratorRightsToTlObject(rights) {
50
50
  return { _: "chatAdminRights", anonymous: rights.isAnonymous || undefined, other: rights.canManageChat || undefined, delete_messages: rights.canDeleteMessages || undefined, manage_call: rights.canManageChat || undefined, ban_users: rights.canRestrictMembers || undefined, add_admins: rights.canPromoteMembers || undefined, change_info: rights.canChangeInfo || undefined, invite_users: rights.canInviteUsers || undefined };
51
51
  }
52
- exports.chatAdministratorRightsToTlObject = chatAdministratorRightsToTlObject;
@@ -19,7 +19,8 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.chatMemberRightsToTlObject = exports.constructChatMemberRights = void 0;
22
+ exports.constructChatMemberRights = constructChatMemberRights;
23
+ exports.chatMemberRightsToTlObject = chatMemberRightsToTlObject;
23
24
  const _1_utilities_js_1 = require("../1_utilities.js");
24
25
  function constructChatMemberRights(rights) {
25
26
  return {
@@ -42,7 +43,6 @@ function constructChatMemberRights(rights) {
42
43
  canManageTopics: rights.manage_topics ? true : undefined,
43
44
  };
44
45
  }
45
- exports.constructChatMemberRights = constructChatMemberRights;
46
46
  function chatMemberRightsToTlObject(rights, untilDate) {
47
47
  return {
48
48
  _: "chatBannedRights",
@@ -66,4 +66,3 @@ function chatMemberRightsToTlObject(rights, untilDate) {
66
66
  manage_topics: rights?.canManageTopics ? true : undefined,
67
67
  };
68
68
  }
69
- exports.chatMemberRightsToTlObject = chatMemberRightsToTlObject;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructChatPhoto = void 0;
22
+ exports.constructChatPhoto = constructChatPhoto;
23
23
  const _1_utilities_js_1 = require("../1_utilities.js");
24
24
  const _2_tl_js_1 = require("../2_tl.js");
25
25
  const _file_id_js_1 = require("./_file_id.js");
@@ -59,4 +59,3 @@ function constructChatPhoto(photo, chatId, chatAccessHash) {
59
59
  });
60
60
  }
61
61
  }
62
- exports.constructChatPhoto = constructChatPhoto;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructContact = void 0;
22
+ exports.constructContact = constructContact;
23
23
  function constructContact(contact) {
24
24
  return {
25
25
  phoneNumber: contact.phone_number,
@@ -29,4 +29,3 @@ function constructContact(contact) {
29
29
  vcard: contact.vcard || undefined,
30
30
  };
31
31
  }
32
- exports.constructContact = constructContact;
@@ -19,8 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructDice = void 0;
22
+ exports.constructDice = constructDice;
23
23
  function constructDice(dice_) {
24
24
  return { emoji: dice_.emoticon, value: dice_.value };
25
25
  }
26
- exports.constructDice = constructDice;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructFailedInvitation = void 0;
22
+ exports.constructFailedInvitation = constructFailedInvitation;
23
23
  function constructFailedInvitation(missingInvitee) {
24
24
  return {
25
25
  userId: Number(missingInvitee.user_id),
@@ -27,4 +27,3 @@ function constructFailedInvitation(missingInvitee) {
27
27
  premiumRequiredToSendMessage: !!missingInvitee.premium_required_for_pm,
28
28
  };
29
29
  }
30
- exports.constructFailedInvitation = constructFailedInvitation;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructGiveawayParameters = void 0;
22
+ exports.constructGiveawayParameters = constructGiveawayParameters;
23
23
  const _1_utilities_js_1 = require("../1_utilities.js");
24
24
  const _2_tl_js_1 = require("../2_tl.js");
25
25
  function constructGiveawayParameters(g) {
@@ -30,4 +30,3 @@ function constructGiveawayParameters(g) {
30
30
  const winnerSelectionDate = (0, _1_utilities_js_1.fromUnixTimestamp)(g.until_date);
31
31
  return { boostedChatId, additionalChatIds, winnerSelectionDate, onlyNewMembers, countries };
32
32
  }
33
- exports.constructGiveawayParameters = constructGiveawayParameters;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructInvoice = void 0;
22
+ exports.constructInvoice = constructInvoice;
23
23
  function constructInvoice(invoice) {
24
24
  return {
25
25
  title: invoice.title,
@@ -29,4 +29,3 @@ function constructInvoice(invoice) {
29
29
  totalAmount: Number(invoice.total_amount),
30
30
  };
31
31
  }
32
- exports.constructInvoice = constructInvoice;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructLinkPreview = void 0;
22
+ exports.constructLinkPreview = constructLinkPreview;
23
23
  const _1_utilities_js_1 = require("../1_utilities.js");
24
24
  function constructLinkPreview(media, invert) {
25
25
  return (0, _1_utilities_js_1.cleanObject)({
@@ -29,4 +29,3 @@ function constructLinkPreview(media, invert) {
29
29
  putAboveText: !!invert,
30
30
  });
31
31
  }
32
- exports.constructLinkPreview = constructLinkPreview;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructLiveStreamChannel = void 0;
22
+ exports.constructLiveStreamChannel = constructLiveStreamChannel;
23
23
  function constructLiveStreamChannel(channel) {
24
24
  return {
25
25
  id: channel.channel,
@@ -27,4 +27,3 @@ function constructLiveStreamChannel(channel) {
27
27
  timestamp: Number(channel.last_timestamp_ms),
28
28
  };
29
29
  }
30
- exports.constructLiveStreamChannel = constructLiveStreamChannel;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructLocation = void 0;
22
+ exports.constructLocation = constructLocation;
23
23
  const _2_tl_js_1 = require("../2_tl.js");
24
24
  function constructLocation(geo_) {
25
25
  if ((0, _2_tl_js_1.is)("messageMediaGeo", geo_)) {
@@ -50,4 +50,3 @@ function constructLocation(geo_) {
50
50
  };
51
51
  }
52
52
  }
53
- exports.constructLocation = constructLocation;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructMaskPosition = void 0;
22
+ exports.constructMaskPosition = constructMaskPosition;
23
23
  function constructMaskPosition({ n, x, y, zoom }) {
24
24
  return {
25
25
  point: n == 0 ? "forehead" : n == 1 ? "eyes" : n == 2 ? "mouth" : "chin",
@@ -28,4 +28,3 @@ function constructMaskPosition({ n, x, y, zoom }) {
28
28
  scale: zoom,
29
29
  };
30
30
  }
31
- exports.constructMaskPosition = constructMaskPosition;
@@ -19,7 +19,9 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.sortMessageEntities = exports.messageEntityToTlObject = exports.constructMessageEntity = void 0;
22
+ exports.constructMessageEntity = constructMessageEntity;
23
+ exports.messageEntityToTlObject = messageEntityToTlObject;
24
+ exports.sortMessageEntities = sortMessageEntities;
23
25
  const _0_deps_js_1 = require("../0_deps.js");
24
26
  const _1_utilities_js_1 = require("../1_utilities.js");
25
27
  const _2_tl_js_1 = require("../2_tl.js");
@@ -85,7 +87,6 @@ function constructMessageEntity(obj) {
85
87
  return null;
86
88
  }
87
89
  }
88
- exports.constructMessageEntity = constructMessageEntity;
89
90
  async function messageEntityToTlObject(entity, getEntity) {
90
91
  const { offset, length } = entity;
91
92
  switch (entity.type) {
@@ -151,7 +152,6 @@ async function messageEntityToTlObject(entity, getEntity) {
151
152
  return { _: "messageEntityCustomEmoji", offset, length, document_id: BigInt(entity.customEmojiId) };
152
153
  }
153
154
  }
154
- exports.messageEntityToTlObject = messageEntityToTlObject;
155
155
  const priorities = {
156
156
  "mention": 50,
157
157
  "hashtag": 50,
@@ -186,4 +186,3 @@ function sortMessageEntities(entities) {
186
186
  return priority < otherPriority ? -1 : 1;
187
187
  });
188
188
  }
189
- exports.sortMessageEntities = sortMessageEntities;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.messageSearchFilterToTlObject = void 0;
22
+ exports.messageSearchFilterToTlObject = messageSearchFilterToTlObject;
23
23
  const _0_deps_js_1 = require("../0_deps.js");
24
24
  function messageSearchFilterToTlObject(filter) {
25
25
  switch (filter) {
@@ -55,4 +55,3 @@ function messageSearchFilterToTlObject(filter) {
55
55
  (0, _0_deps_js_1.unreachable)();
56
56
  }
57
57
  }
58
- exports.messageSearchFilterToTlObject = messageSearchFilterToTlObject;
@@ -19,8 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructMiniAppInfo = void 0;
22
+ exports.constructMiniAppInfo = constructMiniAppInfo;
23
23
  function constructMiniAppInfo(url) {
24
24
  return { url };
25
25
  }
26
- exports.constructMiniAppInfo = constructMiniAppInfo;
@@ -19,11 +19,10 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructOpeningHours = void 0;
22
+ exports.constructOpeningHours = constructOpeningHours;
23
23
  function constructOpeningHours(hours) {
24
24
  return {
25
25
  timezone: hours.timezone_id,
26
26
  intervals: hours.weekly_open.map((v) => [v.start_minute, v.end_minute]),
27
27
  };
28
28
  }
29
- exports.constructOpeningHours = constructOpeningHours;
@@ -19,7 +19,9 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.reactionEqual = exports.reactionToTlObject = exports.constructReaction = void 0;
22
+ exports.constructReaction = constructReaction;
23
+ exports.reactionToTlObject = reactionToTlObject;
24
+ exports.reactionEqual = reactionEqual;
23
25
  const _0_deps_js_1 = require("../0_deps.js");
24
26
  const _2_tl_js_1 = require("../2_tl.js");
25
27
  function constructReaction(reaction) {
@@ -36,11 +38,9 @@ function constructReaction(reaction) {
36
38
  (0, _0_deps_js_1.unreachable)();
37
39
  }
38
40
  }
39
- exports.constructReaction = constructReaction;
40
41
  function reactionToTlObject(reaction) {
41
42
  return reaction.type == "emoji" ? ({ _: "reactionEmoji", emoticon: reaction.emoji }) : reaction.type == "custom" ? ({ _: "reactionCustomEmoji", document_id: BigInt(reaction.id) }) : { _: "reactionPaid" };
42
43
  }
43
- exports.reactionToTlObject = reactionToTlObject;
44
44
  function reactionEqual(left, right) {
45
45
  if (left.type == "emoji") {
46
46
  if (right.type == "emoji" && left.emoji == right.emoji) {
@@ -54,4 +54,3 @@ function reactionEqual(left, right) {
54
54
  }
55
55
  return false;
56
56
  }
57
- exports.reactionEqual = reactionEqual;
@@ -19,7 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructRefundedPayment = void 0;
22
+ exports.constructRefundedPayment = constructRefundedPayment;
23
23
  const _1_utilities_js_1 = require("../1_utilities.js");
24
24
  function constructRefundedPayment(action) {
25
25
  return (0, _1_utilities_js_1.cleanObject)({
@@ -30,4 +30,3 @@ function constructRefundedPayment(action) {
30
30
  providerPaymentChargeId: action.charge.provider_charge_id,
31
31
  });
32
32
  }
33
- exports.constructRefundedPayment = constructRefundedPayment;
@@ -19,8 +19,7 @@
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.constructRestrictionReason = void 0;
22
+ exports.constructRestrictionReason = constructRestrictionReason;
23
23
  function constructRestrictionReason(rr) {
24
24
  return { platform: rr.platform, reason: rr.reason, text: rr.text };
25
25
  }
26
- exports.constructRestrictionReason = constructRestrictionReason;