@mtcute/core 0.28.2 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (751) hide show
  1. package/client.cjs +0 -4
  2. package/client.js +0 -4
  3. package/highlevel/base.cjs +11 -11
  4. package/highlevel/base.d.cts +1 -1
  5. package/highlevel/base.d.ts +1 -1
  6. package/highlevel/base.js +11 -11
  7. package/highlevel/client.d.cts +9 -18
  8. package/highlevel/client.d.ts +9 -18
  9. package/highlevel/client.types.d.cts +5 -2
  10. package/highlevel/client.types.d.ts +5 -2
  11. package/highlevel/managers/timers.cjs +38 -18
  12. package/highlevel/managers/timers.d.cts +18 -4
  13. package/highlevel/managers/timers.d.ts +18 -4
  14. package/highlevel/managers/timers.js +38 -18
  15. package/highlevel/managers/timers.test.d.cts +1 -0
  16. package/highlevel/managers/timers.test.d.ts +1 -0
  17. package/highlevel/methods/auth/check-password.d.cts +1 -1
  18. package/highlevel/methods/auth/check-password.d.ts +1 -1
  19. package/highlevel/methods/auth/send-code.d.cts +1 -1
  20. package/highlevel/methods/auth/send-code.d.ts +1 -1
  21. package/highlevel/methods/auth/sign-in-qr.cjs +4 -4
  22. package/highlevel/methods/auth/sign-in-qr.js +4 -4
  23. package/highlevel/methods/auth/start.cjs +6 -6
  24. package/highlevel/methods/auth/start.d.cts +1 -1
  25. package/highlevel/methods/auth/start.d.ts +1 -1
  26. package/highlevel/methods/auth/start.js +6 -6
  27. package/highlevel/methods/auth/utils.d.cts +1 -1
  28. package/highlevel/methods/auth/utils.d.ts +1 -1
  29. package/highlevel/methods/bots/answer-inline-query.d.cts +1 -1
  30. package/highlevel/methods/bots/answer-inline-query.d.ts +1 -1
  31. package/highlevel/methods/bots/answer-pre-checkout-query.d.cts +1 -1
  32. package/highlevel/methods/bots/answer-pre-checkout-query.d.ts +1 -1
  33. package/highlevel/methods/bots/delete-my-commands.d.cts +1 -1
  34. package/highlevel/methods/bots/delete-my-commands.d.ts +1 -1
  35. package/highlevel/methods/bots/get-bot-info.d.cts +1 -1
  36. package/highlevel/methods/bots/get-bot-info.d.ts +1 -1
  37. package/highlevel/methods/bots/get-bot-menu-button.d.cts +1 -1
  38. package/highlevel/methods/bots/get-bot-menu-button.d.ts +1 -1
  39. package/highlevel/methods/bots/get-callback-answer.d.cts +1 -1
  40. package/highlevel/methods/bots/get-callback-answer.d.ts +1 -1
  41. package/highlevel/methods/bots/get-game-high-scores.d.cts +1 -1
  42. package/highlevel/methods/bots/get-game-high-scores.d.ts +1 -1
  43. package/highlevel/methods/bots/get-my-commands.d.cts +1 -1
  44. package/highlevel/methods/bots/get-my-commands.d.ts +1 -1
  45. package/highlevel/methods/bots/normalize-command-scope.cjs +2 -2
  46. package/highlevel/methods/bots/normalize-command-scope.d.cts +1 -1
  47. package/highlevel/methods/bots/normalize-command-scope.d.ts +1 -1
  48. package/highlevel/methods/bots/normalize-command-scope.js +2 -2
  49. package/highlevel/methods/bots/open-webview.cjs +15 -9
  50. package/highlevel/methods/bots/open-webview.d.cts +1 -1
  51. package/highlevel/methods/bots/open-webview.d.ts +1 -1
  52. package/highlevel/methods/bots/open-webview.js +15 -9
  53. package/highlevel/methods/bots/prepare-inline-message.d.cts +1 -1
  54. package/highlevel/methods/bots/prepare-inline-message.d.ts +1 -1
  55. package/highlevel/methods/bots/set-bot-menu-button.d.cts +1 -1
  56. package/highlevel/methods/bots/set-bot-menu-button.d.ts +1 -1
  57. package/highlevel/methods/bots/set-game-score.d.cts +1 -1
  58. package/highlevel/methods/bots/set-game-score.d.ts +1 -1
  59. package/highlevel/methods/bots/set-my-commands.d.cts +1 -1
  60. package/highlevel/methods/bots/set-my-commands.d.ts +1 -1
  61. package/highlevel/methods/bots/set-my-default-rights.d.cts +1 -1
  62. package/highlevel/methods/bots/set-my-default-rights.d.ts +1 -1
  63. package/highlevel/methods/chats/add-chat-members.d.cts +1 -1
  64. package/highlevel/methods/chats/add-chat-members.d.ts +1 -1
  65. package/highlevel/methods/chats/batched-queries.cjs +3 -3
  66. package/highlevel/methods/chats/batched-queries.d.cts +1 -1
  67. package/highlevel/methods/chats/batched-queries.d.ts +1 -1
  68. package/highlevel/methods/chats/batched-queries.js +3 -3
  69. package/highlevel/methods/chats/create-group.d.cts +1 -1
  70. package/highlevel/methods/chats/create-group.d.ts +1 -1
  71. package/highlevel/methods/chats/edit-admin-rights.d.cts +1 -1
  72. package/highlevel/methods/chats/edit-admin-rights.d.ts +1 -1
  73. package/highlevel/methods/chats/get-chat-event-log.d.cts +1 -1
  74. package/highlevel/methods/chats/get-chat-event-log.d.ts +1 -1
  75. package/highlevel/methods/chats/get-chat-member.cjs +2 -2
  76. package/highlevel/methods/chats/get-chat-member.js +2 -2
  77. package/highlevel/methods/chats/restrict-chat-member.d.cts +1 -1
  78. package/highlevel/methods/chats/restrict-chat-member.d.ts +1 -1
  79. package/highlevel/methods/chats/save-draft.d.cts +1 -1
  80. package/highlevel/methods/chats/save-draft.d.ts +1 -1
  81. package/highlevel/methods/chats/set-chat-color.d.cts +1 -1
  82. package/highlevel/methods/chats/set-chat-color.d.ts +1 -1
  83. package/highlevel/methods/chats/set-chat-default-permissions.d.cts +1 -1
  84. package/highlevel/methods/chats/set-chat-default-permissions.d.ts +1 -1
  85. package/highlevel/methods/chats/set-chat-photo.cjs +3 -3
  86. package/highlevel/methods/chats/set-chat-photo.js +3 -3
  87. package/highlevel/methods/contacts/import-contacts.d.cts +1 -1
  88. package/highlevel/methods/contacts/import-contacts.d.ts +1 -1
  89. package/highlevel/methods/contacts/set-contact-note.cjs +0 -2
  90. package/highlevel/methods/contacts/set-contact-note.js +0 -2
  91. package/highlevel/methods/dialogs/create-folder.d.cts +1 -1
  92. package/highlevel/methods/dialogs/create-folder.d.ts +1 -1
  93. package/highlevel/methods/dialogs/delete-folder.d.cts +1 -1
  94. package/highlevel/methods/dialogs/delete-folder.d.ts +1 -1
  95. package/highlevel/methods/dialogs/edit-folder.d.cts +1 -1
  96. package/highlevel/methods/dialogs/edit-folder.d.ts +1 -1
  97. package/highlevel/methods/dialogs/find-folder.cjs +1 -1
  98. package/highlevel/methods/dialogs/find-folder.d.cts +1 -1
  99. package/highlevel/methods/dialogs/find-folder.d.ts +1 -1
  100. package/highlevel/methods/dialogs/find-folder.js +1 -1
  101. package/highlevel/methods/dialogs/get-folders.d.cts +1 -1
  102. package/highlevel/methods/dialogs/get-folders.d.ts +1 -1
  103. package/highlevel/methods/dialogs/iter-dialogs.d.cts +1 -1
  104. package/highlevel/methods/dialogs/iter-dialogs.d.ts +1 -1
  105. package/highlevel/methods/dialogs/join-chatlist.d.cts +1 -1
  106. package/highlevel/methods/dialogs/join-chatlist.d.ts +1 -1
  107. package/highlevel/methods/files/download-chunk.cjs +2 -2
  108. package/highlevel/methods/files/download-chunk.js +2 -2
  109. package/highlevel/methods/files/download-iterable.cjs +3 -3
  110. package/highlevel/methods/files/download-iterable.d.cts +1 -1
  111. package/highlevel/methods/files/download-iterable.d.ts +1 -1
  112. package/highlevel/methods/files/download-iterable.js +3 -3
  113. package/highlevel/methods/files/normalize-file-to-document.cjs +2 -2
  114. package/highlevel/methods/files/normalize-file-to-document.d.cts +1 -1
  115. package/highlevel/methods/files/normalize-file-to-document.d.ts +1 -1
  116. package/highlevel/methods/files/normalize-file-to-document.js +2 -2
  117. package/highlevel/methods/files/normalize-input-file.cjs +3 -3
  118. package/highlevel/methods/files/normalize-input-file.d.cts +1 -1
  119. package/highlevel/methods/files/normalize-input-file.d.ts +1 -1
  120. package/highlevel/methods/files/normalize-input-file.js +3 -3
  121. package/highlevel/methods/files/normalize-input-media.cjs +5 -5
  122. package/highlevel/methods/files/normalize-input-media.d.cts +1 -1
  123. package/highlevel/methods/files/normalize-input-media.d.ts +1 -1
  124. package/highlevel/methods/files/normalize-input-media.js +5 -5
  125. package/highlevel/methods/forums/create-forum-topic.d.cts +1 -1
  126. package/highlevel/methods/forums/create-forum-topic.d.ts +1 -1
  127. package/highlevel/methods/forums/edit-forum-topic.d.cts +1 -1
  128. package/highlevel/methods/forums/edit-forum-topic.d.ts +1 -1
  129. package/highlevel/methods/gifts/_normalize-input-star-gift.d.cts +1 -1
  130. package/highlevel/methods/gifts/_normalize-input-star-gift.d.ts +1 -1
  131. package/highlevel/methods/gifts/get-resale-star-gifts.d.cts +1 -1
  132. package/highlevel/methods/gifts/get-resale-star-gifts.d.ts +1 -1
  133. package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.cts +1 -1
  134. package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.ts +1 -1
  135. package/highlevel/methods/gifts/send-star-gift-offer.d.cts +1 -1
  136. package/highlevel/methods/gifts/send-star-gift-offer.d.ts +1 -1
  137. package/highlevel/methods/gifts/transfer-star-gift.cjs +2 -2
  138. package/highlevel/methods/gifts/transfer-star-gift.js +2 -2
  139. package/highlevel/methods/gifts/upgrade-star-gift.cjs +2 -2
  140. package/highlevel/methods/gifts/upgrade-star-gift.js +2 -2
  141. package/highlevel/methods/invite-links/create-invite-link.d.cts +1 -1
  142. package/highlevel/methods/invite-links/create-invite-link.d.ts +1 -1
  143. package/highlevel/methods/invite-links/get-invite-link-members.d.cts +1 -1
  144. package/highlevel/methods/invite-links/get-invite-link-members.d.ts +1 -1
  145. package/highlevel/methods/messages/edit-inline-message.cjs +2 -2
  146. package/highlevel/methods/messages/edit-inline-message.d.cts +1 -1
  147. package/highlevel/methods/messages/edit-inline-message.d.ts +1 -1
  148. package/highlevel/methods/messages/edit-inline-message.js +2 -2
  149. package/highlevel/methods/messages/edit-message.cjs +3 -2
  150. package/highlevel/methods/messages/edit-message.js +3 -2
  151. package/highlevel/methods/messages/find-in-update.d.cts +1 -1
  152. package/highlevel/methods/messages/find-in-update.d.ts +1 -1
  153. package/highlevel/methods/messages/forward-messages.cjs +1 -1
  154. package/highlevel/methods/messages/forward-messages.d.cts +1 -1
  155. package/highlevel/methods/messages/forward-messages.d.ts +1 -1
  156. package/highlevel/methods/messages/forward-messages.js +1 -1
  157. package/highlevel/methods/messages/get-callback-query-message.d.cts +1 -1
  158. package/highlevel/methods/messages/get-callback-query-message.d.ts +1 -1
  159. package/highlevel/methods/messages/get-discussion-message.d.cts +1 -1
  160. package/highlevel/methods/messages/get-discussion-message.d.ts +1 -1
  161. package/highlevel/methods/messages/search-global.d.cts +1 -1
  162. package/highlevel/methods/messages/search-global.d.ts +1 -1
  163. package/highlevel/methods/messages/search-hashtag.d.cts +1 -1
  164. package/highlevel/methods/messages/search-hashtag.d.ts +1 -1
  165. package/highlevel/methods/messages/search-messages.d.cts +1 -1
  166. package/highlevel/methods/messages/search-messages.d.ts +1 -1
  167. package/highlevel/methods/messages/search-posts-global.d.cts +1 -1
  168. package/highlevel/methods/messages/search-posts-global.d.ts +1 -1
  169. package/highlevel/methods/messages/send-common.cjs +1 -1
  170. package/highlevel/methods/messages/send-common.d.cts +1 -1
  171. package/highlevel/methods/messages/send-common.d.ts +1 -1
  172. package/highlevel/methods/messages/send-common.js +1 -1
  173. package/highlevel/methods/messages/send-media-group.cjs +6 -5
  174. package/highlevel/methods/messages/send-media-group.js +6 -5
  175. package/highlevel/methods/messages/send-media.cjs +6 -5
  176. package/highlevel/methods/messages/send-media.js +6 -5
  177. package/highlevel/methods/messages/send-paid-reaction.cjs +2 -2
  178. package/highlevel/methods/messages/send-paid-reaction.js +2 -2
  179. package/highlevel/methods/messages/send-text.cjs +6 -5
  180. package/highlevel/methods/messages/send-text.js +6 -5
  181. package/highlevel/methods/messages/send-typing.cjs +3 -2
  182. package/highlevel/methods/messages/send-typing.d.cts +1 -1
  183. package/highlevel/methods/messages/send-typing.d.ts +1 -1
  184. package/highlevel/methods/messages/send-typing.js +3 -2
  185. package/highlevel/methods/messages/set-typing.cjs +12 -8
  186. package/highlevel/methods/messages/set-typing.d.cts +1 -1
  187. package/highlevel/methods/messages/set-typing.d.ts +1 -1
  188. package/highlevel/methods/messages/set-typing.js +12 -8
  189. package/highlevel/methods/messages/set-typing.test.d.cts +1 -0
  190. package/highlevel/methods/messages/set-typing.test.d.ts +1 -0
  191. package/highlevel/methods/misc/chain-id.d.cts +1 -1
  192. package/highlevel/methods/misc/chain-id.d.ts +1 -1
  193. package/highlevel/methods/misc/init-takeout-session.d.cts +1 -1
  194. package/highlevel/methods/misc/init-takeout-session.d.ts +1 -1
  195. package/highlevel/methods/misc/normalize-privacy-rules.d.cts +1 -1
  196. package/highlevel/methods/misc/normalize-privacy-rules.d.ts +1 -1
  197. package/highlevel/methods/misc/normalize-text.d.cts +1 -1
  198. package/highlevel/methods/misc/normalize-text.d.ts +1 -1
  199. package/highlevel/methods/premium/_normalize-stars-amount.d.cts +1 -1
  200. package/highlevel/methods/premium/_normalize-stars-amount.d.ts +1 -1
  201. package/highlevel/methods/premium/set-business-intro.d.cts +1 -1
  202. package/highlevel/methods/premium/set-business-intro.d.ts +1 -1
  203. package/highlevel/methods/premium/set-business-work-hours.d.cts +1 -1
  204. package/highlevel/methods/premium/set-business-work-hours.d.ts +1 -1
  205. package/highlevel/methods/stickers/_utils.d.cts +1 -1
  206. package/highlevel/methods/stickers/_utils.d.ts +1 -1
  207. package/highlevel/methods/stickers/get-custom-emojis.cjs +4 -5
  208. package/highlevel/methods/stickers/get-custom-emojis.d.cts +3 -3
  209. package/highlevel/methods/stickers/get-custom-emojis.d.ts +3 -3
  210. package/highlevel/methods/stickers/get-custom-emojis.js +4 -5
  211. package/highlevel/methods/stickers/set-sticker-set-thumb.d.cts +1 -1
  212. package/highlevel/methods/stickers/set-sticker-set-thumb.d.ts +1 -1
  213. package/highlevel/methods/stories/can-send-story.cjs +3 -3
  214. package/highlevel/methods/stories/can-send-story.js +3 -3
  215. package/highlevel/methods/stories/edit-story.d.cts +1 -1
  216. package/highlevel/methods/stories/edit-story.d.ts +1 -1
  217. package/highlevel/methods/stories/find-in-update.d.cts +1 -1
  218. package/highlevel/methods/stories/find-in-update.d.ts +1 -1
  219. package/highlevel/methods/stories/get-profile-stories.cjs +3 -3
  220. package/highlevel/methods/stories/get-profile-stories.js +3 -3
  221. package/highlevel/methods/stories/get-stories-by-id.cjs +3 -3
  222. package/highlevel/methods/stories/get-stories-by-id.js +3 -3
  223. package/highlevel/methods/stories/send-story.d.cts +1 -1
  224. package/highlevel/methods/stories/send-story.d.ts +1 -1
  225. package/highlevel/methods/users/_resolve-common.cjs +74 -0
  226. package/highlevel/methods/users/_resolve-common.d.cts +4 -0
  227. package/highlevel/methods/users/_resolve-common.d.ts +4 -0
  228. package/highlevel/methods/users/_resolve-common.js +69 -0
  229. package/highlevel/methods/users/delete-profile-photos.d.cts +1 -1
  230. package/highlevel/methods/users/delete-profile-photos.d.ts +1 -1
  231. package/highlevel/methods/users/get-profile-photo.cjs +1 -2
  232. package/highlevel/methods/users/get-profile-photo.d.cts +2 -2
  233. package/highlevel/methods/users/get-profile-photo.d.ts +2 -2
  234. package/highlevel/methods/users/get-profile-photo.js +1 -2
  235. package/highlevel/methods/users/get-profile-photos.cjs +3 -3
  236. package/highlevel/methods/users/get-profile-photos.js +3 -3
  237. package/highlevel/methods/users/get-saved-music.cjs +1 -0
  238. package/highlevel/methods/users/get-saved-music.js +1 -0
  239. package/highlevel/methods/users/is-peer-available.cjs +2 -2
  240. package/highlevel/methods/users/is-peer-available.js +1 -1
  241. package/highlevel/methods/users/resolve-peer-many.d.cts +1 -1
  242. package/highlevel/methods/users/resolve-peer-many.d.ts +1 -1
  243. package/highlevel/methods/users/resolve-peer.cjs +7 -68
  244. package/highlevel/methods/users/resolve-peer.d.cts +1 -3
  245. package/highlevel/methods/users/resolve-peer.d.ts +1 -3
  246. package/highlevel/methods/users/resolve-peer.js +8 -69
  247. package/highlevel/methods/users/resolve-phone-number.cjs +4 -4
  248. package/highlevel/methods/users/resolve-phone-number.d.cts +1 -1
  249. package/highlevel/methods/users/resolve-phone-number.d.ts +1 -1
  250. package/highlevel/methods/users/resolve-phone-number.js +3 -3
  251. package/highlevel/methods/users/save-music-to-profile.cjs +2 -2
  252. package/highlevel/methods/users/save-music-to-profile.js +2 -2
  253. package/highlevel/methods/users/set-emoji-status.d.cts +1 -1
  254. package/highlevel/methods/users/set-emoji-status.d.ts +1 -1
  255. package/highlevel/methods/users/set-my-profile-photo.cjs +5 -2
  256. package/highlevel/methods/users/set-my-profile-photo.d.cts +1 -1
  257. package/highlevel/methods/users/set-my-profile-photo.d.ts +1 -1
  258. package/highlevel/methods/users/set-my-profile-photo.js +5 -2
  259. package/highlevel/methods/users/set-online.cjs +9 -5
  260. package/highlevel/methods/users/set-online.js +9 -5
  261. package/highlevel/methods.d.cts +0 -1
  262. package/highlevel/methods.d.ts +0 -1
  263. package/highlevel/storage/service/current-user.cjs +1 -1
  264. package/highlevel/storage/service/current-user.d.cts +1 -1
  265. package/highlevel/storage/service/current-user.d.ts +1 -1
  266. package/highlevel/storage/service/current-user.js +1 -1
  267. package/highlevel/storage/service/peers.d.cts +1 -1
  268. package/highlevel/storage/service/peers.d.ts +1 -1
  269. package/highlevel/types/auth/sent-code.d.cts +1 -1
  270. package/highlevel/types/auth/sent-code.d.ts +1 -1
  271. package/highlevel/types/bots/command-scope/inner.d.cts +1 -1
  272. package/highlevel/types/bots/command-scope/inner.d.ts +1 -1
  273. package/highlevel/types/bots/game-high-score.d.cts +1 -1
  274. package/highlevel/types/bots/game-high-score.d.ts +1 -1
  275. package/highlevel/types/bots/inline-message/factories.d.cts +1 -1
  276. package/highlevel/types/bots/inline-message/factories.d.ts +1 -1
  277. package/highlevel/types/bots/inline-result/factories.d.cts +1 -1
  278. package/highlevel/types/bots/inline-result/factories.d.ts +1 -1
  279. package/highlevel/types/bots/inline-result/types.d.cts +1 -1
  280. package/highlevel/types/bots/inline-result/types.d.ts +1 -1
  281. package/highlevel/types/bots/keyboards/builder.d.cts +1 -1
  282. package/highlevel/types/bots/keyboards/builder.d.ts +1 -1
  283. package/highlevel/types/bots/keyboards/factories.cjs +2 -2
  284. package/highlevel/types/bots/keyboards/factories.d.cts +1 -1
  285. package/highlevel/types/bots/keyboards/factories.d.ts +1 -1
  286. package/highlevel/types/bots/keyboards/factories.js +2 -2
  287. package/highlevel/types/bots/keyboards/types.d.cts +1 -1
  288. package/highlevel/types/bots/keyboards/types.d.ts +1 -1
  289. package/highlevel/types/bots/webview.d.cts +1 -1
  290. package/highlevel/types/bots/webview.d.ts +1 -1
  291. package/highlevel/types/conversation.d.cts +1 -1
  292. package/highlevel/types/conversation.d.ts +1 -1
  293. package/highlevel/types/files/file-location.d.cts +1 -1
  294. package/highlevel/types/files/file-location.d.ts +1 -1
  295. package/highlevel/types/files/uploaded-file.d.cts +1 -1
  296. package/highlevel/types/files/uploaded-file.d.ts +1 -1
  297. package/highlevel/types/files/utils.d.cts +1 -1
  298. package/highlevel/types/files/utils.d.ts +1 -1
  299. package/highlevel/types/files/web-document.d.cts +1 -1
  300. package/highlevel/types/files/web-document.d.ts +1 -1
  301. package/highlevel/types/media/audio.d.cts +1 -1
  302. package/highlevel/types/media/audio.d.ts +1 -1
  303. package/highlevel/types/media/contact.d.cts +1 -1
  304. package/highlevel/types/media/contact.d.ts +1 -1
  305. package/highlevel/types/media/dice.d.cts +1 -1
  306. package/highlevel/types/media/dice.d.ts +1 -1
  307. package/highlevel/types/media/document-utils.d.cts +1 -1
  308. package/highlevel/types/media/document-utils.d.ts +1 -1
  309. package/highlevel/types/media/document.d.cts +1 -1
  310. package/highlevel/types/media/document.d.ts +1 -1
  311. package/highlevel/types/media/extended-media.d.cts +1 -1
  312. package/highlevel/types/media/extended-media.d.ts +1 -1
  313. package/highlevel/types/media/game.d.cts +1 -1
  314. package/highlevel/types/media/game.d.ts +1 -1
  315. package/highlevel/types/media/input-media/factories.d.cts +1 -1
  316. package/highlevel/types/media/input-media/factories.d.ts +1 -1
  317. package/highlevel/types/media/input-media/types.d.cts +1 -1
  318. package/highlevel/types/media/input-media/types.d.ts +1 -1
  319. package/highlevel/types/media/invoice.d.cts +1 -1
  320. package/highlevel/types/media/invoice.d.ts +1 -1
  321. package/highlevel/types/media/location.d.cts +1 -1
  322. package/highlevel/types/media/location.d.ts +1 -1
  323. package/highlevel/types/media/paid-media.d.cts +1 -1
  324. package/highlevel/types/media/paid-media.d.ts +1 -1
  325. package/highlevel/types/media/photo.d.cts +1 -1
  326. package/highlevel/types/media/photo.d.ts +1 -1
  327. package/highlevel/types/media/poll.d.cts +1 -1
  328. package/highlevel/types/media/poll.d.ts +1 -1
  329. package/highlevel/types/media/sticker.d.cts +1 -1
  330. package/highlevel/types/media/sticker.d.ts +1 -1
  331. package/highlevel/types/media/story.d.cts +1 -1
  332. package/highlevel/types/media/story.d.ts +1 -1
  333. package/highlevel/types/media/thumbnail.d.cts +1 -1
  334. package/highlevel/types/media/thumbnail.d.ts +1 -1
  335. package/highlevel/types/media/todo.d.cts +1 -1
  336. package/highlevel/types/media/todo.d.ts +1 -1
  337. package/highlevel/types/media/venue.cjs +2 -2
  338. package/highlevel/types/media/venue.d.cts +1 -1
  339. package/highlevel/types/media/venue.d.ts +1 -1
  340. package/highlevel/types/media/venue.js +2 -2
  341. package/highlevel/types/media/video.d.cts +1 -1
  342. package/highlevel/types/media/video.d.ts +1 -1
  343. package/highlevel/types/media/voice.d.cts +1 -1
  344. package/highlevel/types/media/voice.d.ts +1 -1
  345. package/highlevel/types/media/web-page.d.cts +1 -1
  346. package/highlevel/types/media/web-page.d.ts +1 -1
  347. package/highlevel/types/messages/dialog.d.cts +1 -1
  348. package/highlevel/types/messages/dialog.d.ts +1 -1
  349. package/highlevel/types/messages/draft-message.d.cts +1 -1
  350. package/highlevel/types/messages/draft-message.d.ts +1 -1
  351. package/highlevel/types/messages/fact-check.d.cts +1 -1
  352. package/highlevel/types/messages/fact-check.d.ts +1 -1
  353. package/highlevel/types/messages/message-action.cjs +4 -0
  354. package/highlevel/types/messages/message-action.d.cts +1 -1
  355. package/highlevel/types/messages/message-action.d.ts +1 -1
  356. package/highlevel/types/messages/message-action.js +4 -0
  357. package/highlevel/types/messages/message-effect.cjs +2 -6
  358. package/highlevel/types/messages/message-effect.d.cts +1 -1
  359. package/highlevel/types/messages/message-effect.d.ts +1 -1
  360. package/highlevel/types/messages/message-effect.js +2 -6
  361. package/highlevel/types/messages/message-entity.d.cts +1 -1
  362. package/highlevel/types/messages/message-entity.d.ts +1 -1
  363. package/highlevel/types/messages/message-forward.d.cts +1 -1
  364. package/highlevel/types/messages/message-forward.d.ts +1 -1
  365. package/highlevel/types/messages/message-media.d.cts +1 -1
  366. package/highlevel/types/messages/message-media.d.ts +1 -1
  367. package/highlevel/types/messages/message-reactions.d.cts +1 -1
  368. package/highlevel/types/messages/message-reactions.d.ts +1 -1
  369. package/highlevel/types/messages/message-replies.d.cts +1 -1
  370. package/highlevel/types/messages/message-replies.d.ts +1 -1
  371. package/highlevel/types/messages/message.d.cts +1 -1
  372. package/highlevel/types/messages/message.d.ts +1 -1
  373. package/highlevel/types/messages/replied-message.cjs +4 -14
  374. package/highlevel/types/messages/replied-message.d.cts +2 -2
  375. package/highlevel/types/messages/replied-message.d.ts +2 -2
  376. package/highlevel/types/messages/replied-message.js +2 -12
  377. package/highlevel/types/messages/suggested-post.d.cts +1 -1
  378. package/highlevel/types/messages/suggested-post.d.ts +1 -1
  379. package/highlevel/types/misc/collectible-info.d.cts +1 -1
  380. package/highlevel/types/misc/collectible-info.d.ts +1 -1
  381. package/highlevel/types/misc/entities.d.cts +1 -1
  382. package/highlevel/types/misc/entities.d.ts +1 -1
  383. package/highlevel/types/misc/input-privacy-rule/allow.d.cts +1 -1
  384. package/highlevel/types/misc/input-privacy-rule/allow.d.ts +1 -1
  385. package/highlevel/types/misc/input-privacy-rule/disallow.d.cts +1 -1
  386. package/highlevel/types/misc/input-privacy-rule/disallow.d.ts +1 -1
  387. package/highlevel/types/misc/input-privacy-rule/types.d.cts +1 -1
  388. package/highlevel/types/misc/input-privacy-rule/types.d.ts +1 -1
  389. package/highlevel/types/misc/sticker-set.cjs +5 -3
  390. package/highlevel/types/misc/sticker-set.d.cts +1 -1
  391. package/highlevel/types/misc/sticker-set.d.ts +1 -1
  392. package/highlevel/types/misc/sticker-set.js +5 -3
  393. package/highlevel/types/misc/takeout-session.d.cts +1 -1
  394. package/highlevel/types/misc/takeout-session.d.ts +1 -1
  395. package/highlevel/types/peers/bot-info.d.cts +1 -1
  396. package/highlevel/types/peers/bot-info.d.ts +1 -1
  397. package/highlevel/types/peers/bot-verification.d.cts +1 -1
  398. package/highlevel/types/peers/bot-verification.d.ts +1 -1
  399. package/highlevel/types/peers/chat-colors.d.cts +1 -1
  400. package/highlevel/types/peers/chat-colors.d.ts +1 -1
  401. package/highlevel/types/peers/chat-event/actions.cjs +4 -5
  402. package/highlevel/types/peers/chat-event/actions.d.cts +5 -6
  403. package/highlevel/types/peers/chat-event/actions.d.ts +5 -6
  404. package/highlevel/types/peers/chat-event/actions.js +4 -5
  405. package/highlevel/types/peers/chat-event/filters.d.cts +1 -1
  406. package/highlevel/types/peers/chat-event/filters.d.ts +1 -1
  407. package/highlevel/types/peers/chat-event/index.d.cts +1 -1
  408. package/highlevel/types/peers/chat-event/index.d.ts +1 -1
  409. package/highlevel/types/peers/chat-invite-link-member.d.cts +1 -1
  410. package/highlevel/types/peers/chat-invite-link-member.d.ts +1 -1
  411. package/highlevel/types/peers/chat-invite-link.d.cts +1 -1
  412. package/highlevel/types/peers/chat-invite-link.d.ts +1 -1
  413. package/highlevel/types/peers/chat-member.d.cts +1 -1
  414. package/highlevel/types/peers/chat-member.d.ts +1 -1
  415. package/highlevel/types/peers/chat-permissions.d.cts +1 -1
  416. package/highlevel/types/peers/chat-permissions.d.ts +1 -1
  417. package/highlevel/types/peers/chat-photo.d.cts +1 -1
  418. package/highlevel/types/peers/chat-photo.d.ts +1 -1
  419. package/highlevel/types/peers/chat-preview.d.cts +1 -1
  420. package/highlevel/types/peers/chat-preview.d.ts +1 -1
  421. package/highlevel/types/peers/chat.d.cts +1 -1
  422. package/highlevel/types/peers/chat.d.ts +1 -1
  423. package/highlevel/types/peers/chatlist-preview.d.cts +1 -1
  424. package/highlevel/types/peers/chatlist-preview.d.ts +1 -1
  425. package/highlevel/types/peers/forum-topic.d.cts +1 -1
  426. package/highlevel/types/peers/forum-topic.d.ts +1 -1
  427. package/highlevel/types/peers/full-chat.cjs +0 -11
  428. package/highlevel/types/peers/full-chat.d.cts +1 -6
  429. package/highlevel/types/peers/full-chat.d.ts +1 -6
  430. package/highlevel/types/peers/full-chat.js +0 -11
  431. package/highlevel/types/peers/full-user.d.cts +1 -1
  432. package/highlevel/types/peers/full-user.d.ts +1 -1
  433. package/highlevel/types/peers/index.d.cts +0 -1
  434. package/highlevel/types/peers/index.d.ts +0 -1
  435. package/highlevel/types/peers/peer-settings.d.cts +1 -1
  436. package/highlevel/types/peers/peer-settings.d.ts +1 -1
  437. package/highlevel/types/peers/peer.d.cts +2 -2
  438. package/highlevel/types/peers/peer.d.ts +2 -2
  439. package/highlevel/types/peers/peers-index.cjs +3 -1
  440. package/highlevel/types/peers/peers-index.d.cts +1 -1
  441. package/highlevel/types/peers/peers-index.d.ts +1 -1
  442. package/highlevel/types/peers/peers-index.js +3 -1
  443. package/highlevel/types/peers/user.d.cts +1 -1
  444. package/highlevel/types/peers/user.d.ts +1 -1
  445. package/highlevel/types/premium/boost-slot.d.cts +1 -1
  446. package/highlevel/types/premium/boost-slot.d.ts +1 -1
  447. package/highlevel/types/premium/boost-stats.d.cts +1 -1
  448. package/highlevel/types/premium/boost-stats.d.ts +1 -1
  449. package/highlevel/types/premium/boost.d.cts +1 -1
  450. package/highlevel/types/premium/boost.d.ts +1 -1
  451. package/highlevel/types/premium/business-account.d.cts +1 -1
  452. package/highlevel/types/premium/business-account.d.ts +1 -1
  453. package/highlevel/types/premium/business-chat-link.d.cts +1 -1
  454. package/highlevel/types/premium/business-chat-link.d.ts +1 -1
  455. package/highlevel/types/premium/business-connection.d.cts +1 -1
  456. package/highlevel/types/premium/business-connection.d.ts +1 -1
  457. package/highlevel/types/premium/business-intro.d.cts +1 -1
  458. package/highlevel/types/premium/business-intro.d.ts +1 -1
  459. package/highlevel/types/premium/business-location.d.cts +1 -1
  460. package/highlevel/types/premium/business-location.d.ts +1 -1
  461. package/highlevel/types/premium/business-work-hours.d.cts +1 -1
  462. package/highlevel/types/premium/business-work-hours.d.ts +1 -1
  463. package/highlevel/types/premium/saved-star-gift.d.cts +1 -1
  464. package/highlevel/types/premium/saved-star-gift.d.ts +1 -1
  465. package/highlevel/types/premium/star-gift-unique.d.cts +1 -1
  466. package/highlevel/types/premium/star-gift-unique.d.ts +1 -1
  467. package/highlevel/types/premium/star-gift-value.d.cts +1 -1
  468. package/highlevel/types/premium/star-gift-value.d.ts +1 -1
  469. package/highlevel/types/premium/star-gift.cjs +0 -4
  470. package/highlevel/types/premium/star-gift.d.cts +1 -3
  471. package/highlevel/types/premium/star-gift.d.ts +1 -3
  472. package/highlevel/types/premium/star-gift.js +0 -4
  473. package/highlevel/types/premium/stars-status.d.cts +1 -1
  474. package/highlevel/types/premium/stars-status.d.ts +1 -1
  475. package/highlevel/types/premium/stars-transaction.d.cts +1 -1
  476. package/highlevel/types/premium/stars-transaction.d.ts +1 -1
  477. package/highlevel/types/reactions/emoji-status.d.cts +1 -1
  478. package/highlevel/types/reactions/emoji-status.d.ts +1 -1
  479. package/highlevel/types/reactions/peer-reaction.cjs +5 -8
  480. package/highlevel/types/reactions/peer-reaction.d.cts +4 -5
  481. package/highlevel/types/reactions/peer-reaction.d.ts +4 -5
  482. package/highlevel/types/reactions/peer-reaction.js +5 -8
  483. package/highlevel/types/reactions/reaction-count.d.cts +1 -1
  484. package/highlevel/types/reactions/reaction-count.d.ts +1 -1
  485. package/highlevel/types/reactions/types.d.cts +1 -1
  486. package/highlevel/types/reactions/types.d.ts +1 -1
  487. package/highlevel/types/stories/all-stories.d.cts +1 -1
  488. package/highlevel/types/stories/all-stories.d.ts +1 -1
  489. package/highlevel/types/stories/interactive/base.d.cts +1 -1
  490. package/highlevel/types/stories/interactive/base.d.ts +1 -1
  491. package/highlevel/types/stories/interactive/channel-post.d.cts +1 -1
  492. package/highlevel/types/stories/interactive/channel-post.d.ts +1 -1
  493. package/highlevel/types/stories/interactive/index.d.cts +1 -1
  494. package/highlevel/types/stories/interactive/index.d.ts +1 -1
  495. package/highlevel/types/stories/interactive/input.d.cts +1 -1
  496. package/highlevel/types/stories/interactive/input.d.ts +1 -1
  497. package/highlevel/types/stories/interactive/location.d.cts +1 -1
  498. package/highlevel/types/stories/interactive/location.d.ts +1 -1
  499. package/highlevel/types/stories/interactive/reaction.d.cts +1 -1
  500. package/highlevel/types/stories/interactive/reaction.d.ts +1 -1
  501. package/highlevel/types/stories/interactive/star-gift.d.cts +1 -1
  502. package/highlevel/types/stories/interactive/star-gift.d.ts +1 -1
  503. package/highlevel/types/stories/interactive/url.d.cts +1 -1
  504. package/highlevel/types/stories/interactive/url.d.ts +1 -1
  505. package/highlevel/types/stories/interactive/venue.d.cts +1 -1
  506. package/highlevel/types/stories/interactive/venue.d.ts +1 -1
  507. package/highlevel/types/stories/interactive/weather.d.cts +1 -1
  508. package/highlevel/types/stories/interactive/weather.d.ts +1 -1
  509. package/highlevel/types/stories/peer-stories.cjs +4 -4
  510. package/highlevel/types/stories/peer-stories.d.cts +1 -1
  511. package/highlevel/types/stories/peer-stories.d.ts +1 -1
  512. package/highlevel/types/stories/peer-stories.js +4 -4
  513. package/highlevel/types/stories/stealth-mode.d.cts +1 -1
  514. package/highlevel/types/stories/stealth-mode.d.ts +1 -1
  515. package/highlevel/types/stories/story-interactions.d.cts +1 -1
  516. package/highlevel/types/stories/story-interactions.d.ts +1 -1
  517. package/highlevel/types/stories/story-viewer.cjs +3 -4
  518. package/highlevel/types/stories/story-viewer.d.cts +3 -3
  519. package/highlevel/types/stories/story-viewer.d.ts +3 -3
  520. package/highlevel/types/stories/story-viewer.js +3 -4
  521. package/highlevel/types/stories/story.d.cts +1 -1
  522. package/highlevel/types/stories/story.d.ts +1 -1
  523. package/highlevel/types/updates/bot-chat-join-request.d.cts +1 -1
  524. package/highlevel/types/updates/bot-chat-join-request.d.ts +1 -1
  525. package/highlevel/types/updates/bot-reaction.d.cts +1 -1
  526. package/highlevel/types/updates/bot-reaction.d.ts +1 -1
  527. package/highlevel/types/updates/bot-stopped.d.cts +1 -1
  528. package/highlevel/types/updates/bot-stopped.d.ts +1 -1
  529. package/highlevel/types/updates/business-message.d.cts +1 -1
  530. package/highlevel/types/updates/business-message.d.ts +1 -1
  531. package/highlevel/types/updates/callback-query.d.cts +1 -1
  532. package/highlevel/types/updates/callback-query.d.ts +1 -1
  533. package/highlevel/types/updates/chat-join-request.d.cts +1 -1
  534. package/highlevel/types/updates/chat-join-request.d.ts +1 -1
  535. package/highlevel/types/updates/chat-member-update.cjs +2 -2
  536. package/highlevel/types/updates/chat-member-update.d.cts +1 -1
  537. package/highlevel/types/updates/chat-member-update.d.ts +1 -1
  538. package/highlevel/types/updates/chat-member-update.js +2 -2
  539. package/highlevel/types/updates/chosen-inline-result.d.cts +1 -1
  540. package/highlevel/types/updates/chosen-inline-result.d.ts +1 -1
  541. package/highlevel/types/updates/delete-business-message-update.d.cts +1 -1
  542. package/highlevel/types/updates/delete-business-message-update.d.ts +1 -1
  543. package/highlevel/types/updates/delete-message-update.d.cts +1 -1
  544. package/highlevel/types/updates/delete-message-update.d.ts +1 -1
  545. package/highlevel/types/updates/delete-story-update.d.cts +1 -1
  546. package/highlevel/types/updates/delete-story-update.d.ts +1 -1
  547. package/highlevel/types/updates/history-read-update.d.cts +1 -1
  548. package/highlevel/types/updates/history-read-update.d.ts +1 -1
  549. package/highlevel/types/updates/inline-query.d.cts +1 -1
  550. package/highlevel/types/updates/inline-query.d.ts +1 -1
  551. package/highlevel/types/updates/poll-update.d.cts +1 -1
  552. package/highlevel/types/updates/poll-update.d.ts +1 -1
  553. package/highlevel/types/updates/poll-vote.d.cts +1 -1
  554. package/highlevel/types/updates/poll-vote.d.ts +1 -1
  555. package/highlevel/types/updates/pre-checkout-query.d.cts +1 -1
  556. package/highlevel/types/updates/pre-checkout-query.d.ts +1 -1
  557. package/highlevel/types/updates/story-update.d.cts +1 -1
  558. package/highlevel/types/updates/story-update.d.ts +1 -1
  559. package/highlevel/types/updates/user-status-update.d.cts +1 -1
  560. package/highlevel/types/updates/user-status-update.d.ts +1 -1
  561. package/highlevel/types/updates/user-typing-update.d.cts +1 -1
  562. package/highlevel/types/updates/user-typing-update.d.ts +1 -1
  563. package/highlevel/updates/manager.cjs +8 -9
  564. package/highlevel/updates/manager.d.cts +4 -2
  565. package/highlevel/updates/manager.d.ts +4 -2
  566. package/highlevel/updates/manager.js +8 -9
  567. package/highlevel/updates/types.d.cts +1 -1
  568. package/highlevel/updates/types.d.ts +1 -1
  569. package/highlevel/updates/utils.d.cts +1 -1
  570. package/highlevel/updates/utils.d.ts +1 -1
  571. package/highlevel/utils/convert-file-id.d.cts +1 -1
  572. package/highlevel/utils/convert-file-id.d.ts +1 -1
  573. package/highlevel/utils/file-utils.d.cts +1 -1
  574. package/highlevel/utils/file-utils.d.ts +1 -1
  575. package/highlevel/utils/inline-utils.d.cts +1 -1
  576. package/highlevel/utils/inline-utils.d.ts +1 -1
  577. package/highlevel/utils/peer-utils.cjs +25 -4
  578. package/highlevel/utils/peer-utils.d.cts +2 -2
  579. package/highlevel/utils/peer-utils.d.ts +2 -2
  580. package/highlevel/utils/peer-utils.js +25 -4
  581. package/highlevel/worker/errors.cjs +3 -3
  582. package/highlevel/worker/errors.js +3 -3
  583. package/highlevel/worker/invoker.cjs +67 -9
  584. package/highlevel/worker/invoker.d.cts +9 -1
  585. package/highlevel/worker/invoker.d.ts +9 -1
  586. package/highlevel/worker/invoker.js +67 -9
  587. package/highlevel/worker/invoker.test.d.cts +1 -0
  588. package/highlevel/worker/invoker.test.d.ts +1 -0
  589. package/highlevel/worker/port.cjs +50 -16
  590. package/highlevel/worker/port.d.cts +9 -5
  591. package/highlevel/worker/port.d.ts +9 -5
  592. package/highlevel/worker/port.js +51 -17
  593. package/highlevel/worker/protocol.cjs +19 -7
  594. package/highlevel/worker/protocol.d.cts +28 -4
  595. package/highlevel/worker/protocol.d.ts +28 -4
  596. package/highlevel/worker/protocol.js +19 -7
  597. package/highlevel/worker/protocol.test.d.cts +1 -0
  598. package/highlevel/worker/protocol.test.d.ts +1 -0
  599. package/highlevel/worker/storage.cjs +4 -1
  600. package/highlevel/worker/storage.d.cts +2 -1
  601. package/highlevel/worker/storage.d.ts +2 -1
  602. package/highlevel/worker/storage.js +4 -1
  603. package/highlevel/worker/timers.cjs +19 -0
  604. package/highlevel/worker/timers.d.cts +11 -0
  605. package/highlevel/worker/timers.d.ts +11 -0
  606. package/highlevel/worker/timers.js +14 -0
  607. package/highlevel/worker/timers.test.d.cts +1 -0
  608. package/highlevel/worker/timers.test.d.ts +1 -0
  609. package/highlevel/worker/worker.cjs +266 -53
  610. package/highlevel/worker/worker.d.cts +30 -2
  611. package/highlevel/worker/worker.d.ts +30 -2
  612. package/highlevel/worker/worker.js +267 -54
  613. package/highlevel/worker/worker.test.d.cts +1 -0
  614. package/highlevel/worker/worker.test.d.ts +1 -0
  615. package/index.cjs +4 -11
  616. package/index.d.cts +2 -2
  617. package/index.d.ts +2 -2
  618. package/index.js +4 -5
  619. package/methods.cjs +0 -2
  620. package/methods.js +0 -2
  621. package/network/auth-key.d.cts +1 -1
  622. package/network/auth-key.d.ts +1 -1
  623. package/network/authorization.cjs +2 -2
  624. package/network/authorization.js +2 -2
  625. package/network/client.cjs +9 -9
  626. package/network/client.d.cts +1 -12
  627. package/network/client.d.ts +1 -12
  628. package/network/client.js +7 -7
  629. package/network/config-manager.d.cts +1 -1
  630. package/network/config-manager.d.ts +1 -1
  631. package/network/middlewares/internal-errors.cjs +8 -8
  632. package/network/middlewares/internal-errors.js +8 -8
  633. package/network/middlewares/on-error.d.cts +1 -1
  634. package/network/middlewares/on-error.d.ts +1 -1
  635. package/network/middlewares/on-method.d.cts +1 -1
  636. package/network/middlewares/on-method.d.ts +1 -1
  637. package/network/mtproto-session.cjs +0 -3
  638. package/network/mtproto-session.d.cts +1 -2
  639. package/network/mtproto-session.d.ts +1 -2
  640. package/network/mtproto-session.js +0 -3
  641. package/network/mtproxy/index.d.cts +1 -1
  642. package/network/mtproxy/index.d.ts +1 -1
  643. package/network/multi-session-connection.d.cts +1 -1
  644. package/network/multi-session-connection.d.ts +1 -1
  645. package/network/network-manager.cjs +43 -3
  646. package/network/network-manager.d.cts +12 -3
  647. package/network/network-manager.d.ts +12 -3
  648. package/network/network-manager.js +44 -4
  649. package/network/persistent-connection.d.cts +1 -1
  650. package/network/persistent-connection.d.ts +1 -1
  651. package/network/server-salt.d.cts +1 -1
  652. package/network/server-salt.d.ts +1 -1
  653. package/network/session-connection.cjs +10 -17
  654. package/network/session-connection.d.cts +1 -3
  655. package/network/session-connection.d.ts +1 -3
  656. package/network/session-connection.js +10 -17
  657. package/network/transports/abstract.d.cts +1 -1
  658. package/network/transports/abstract.d.ts +1 -1
  659. package/network/transports/intermediate.cjs +0 -2
  660. package/network/transports/intermediate.js +0 -2
  661. package/package.json +9 -6
  662. package/storage/service/base.d.cts +1 -1
  663. package/storage/service/base.d.ts +1 -1
  664. package/storage/service/future-salts.d.cts +1 -1
  665. package/storage/service/future-salts.d.ts +1 -1
  666. package/storage/sqlite/driver.cjs +0 -22
  667. package/storage/sqlite/driver.d.cts +0 -3
  668. package/storage/sqlite/driver.d.ts +0 -3
  669. package/storage/sqlite/driver.js +0 -22
  670. package/storage/sqlite/repository/kv.cjs +5 -47
  671. package/storage/sqlite/repository/kv.js +5 -47
  672. package/storage/sqlite/repository/peers.cjs +0 -3
  673. package/storage/sqlite/repository/peers.js +0 -3
  674. package/storage/storage.cjs +1 -3
  675. package/storage/storage.js +1 -3
  676. package/tl/api-schema.json +1 -0
  677. package/tl/app-config.json +1 -0
  678. package/tl/binary/reader.cjs +5248 -0
  679. package/tl/binary/reader.d.cts +3 -0
  680. package/tl/binary/reader.d.ts +3 -0
  681. package/tl/binary/reader.js +5243 -0
  682. package/tl/binary/rsa-keys.cjs +9 -0
  683. package/tl/binary/rsa-keys.d.cts +38 -0
  684. package/tl/binary/rsa-keys.d.ts +38 -0
  685. package/tl/binary/rsa-keys.js +4 -0
  686. package/tl/binary/writer.cjs +18718 -0
  687. package/tl/binary/writer.d.cts +4 -0
  688. package/tl/binary/writer.d.ts +4 -0
  689. package/tl/binary/writer.js +18713 -0
  690. package/tl/compat/reader.cjs +313 -0
  691. package/tl/compat/reader.d.cts +1 -0
  692. package/tl/compat/reader.d.ts +1 -0
  693. package/tl/compat/reader.js +308 -0
  694. package/tl/index.d.cts +58614 -0
  695. package/tl/index.d.ts +58614 -0
  696. package/tl/inner-mtp.cjs +63 -0
  697. package/tl/inner-mtp.js +58 -0
  698. package/tl/inner-tl.cjs +1261 -0
  699. package/tl/inner-tl.js +1256 -0
  700. package/tl/mtp-schema.json +1 -0
  701. package/tl/raw-errors.json +1 -0
  702. package/utils/binary/compat.cjs +10 -10
  703. package/utils/binary/compat.d.cts +1 -1
  704. package/utils/binary/compat.d.ts +1 -1
  705. package/utils/binary/compat.js +5 -5
  706. package/utils/binary/serialization.cjs +7 -7
  707. package/utils/binary/serialization.d.cts +1 -1
  708. package/utils/binary/serialization.d.ts +1 -1
  709. package/utils/binary/serialization.js +5 -5
  710. package/utils/crypto/keys.cjs +5 -5
  711. package/utils/crypto/keys.d.cts +1 -1
  712. package/utils/crypto/keys.d.ts +1 -1
  713. package/utils/crypto/keys.js +1 -1
  714. package/utils/crypto/password.d.cts +1 -1
  715. package/utils/crypto/password.d.ts +1 -1
  716. package/utils/date-entity-format.d.cts +1 -1
  717. package/utils/date-entity-format.d.ts +1 -1
  718. package/utils/index.d.cts +2 -6
  719. package/utils/index.d.ts +2 -6
  720. package/utils/links/bots.d.cts +1 -1
  721. package/utils/links/bots.d.ts +1 -1
  722. package/utils/logger.cjs +2 -2
  723. package/utils/logger.js +2 -2
  724. package/utils/misc-utils.cjs +8 -0
  725. package/utils/misc-utils.d.cts +2 -0
  726. package/utils/misc-utils.d.ts +2 -0
  727. package/utils/misc-utils.js +8 -0
  728. package/utils/peer-utils.d.cts +1 -1
  729. package/utils/peer-utils.d.ts +1 -1
  730. package/utils/tl-json.d.cts +1 -1
  731. package/utils/tl-json.d.ts +1 -1
  732. package/utils/type-assertions.d.cts +1 -1
  733. package/utils/type-assertions.d.ts +1 -1
  734. package/utils.cjs +5 -18
  735. package/utils.js +4 -11
  736. package/highlevel/methods/chats/get-nearby-chats.cjs +0 -37
  737. package/highlevel/methods/chats/get-nearby-chats.d.cts +0 -9
  738. package/highlevel/methods/chats/get-nearby-chats.d.ts +0 -9
  739. package/highlevel/methods/chats/get-nearby-chats.js +0 -32
  740. package/highlevel/methods/messages/_business-connection.cjs +0 -42
  741. package/highlevel/methods/messages/_business-connection.d.cts +0 -8
  742. package/highlevel/methods/messages/_business-connection.d.ts +0 -8
  743. package/highlevel/methods/messages/_business-connection.js +0 -37
  744. package/highlevel/types/peers/chat-location.cjs +0 -30
  745. package/highlevel/types/peers/chat-location.d.cts +0 -17
  746. package/highlevel/types/peers/chat-location.d.ts +0 -17
  747. package/highlevel/types/peers/chat-location.js +0 -25
  748. package/utils/error-reporting.cjs +0 -23
  749. package/utils/error-reporting.d.cts +0 -3
  750. package/utils/error-reporting.d.ts +0 -3
  751. package/utils/error-reporting.js +0 -18
@@ -6,12 +6,12 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
8
  const fileId = require("@mtcute/file-id");
9
- const tl = require("@mtcute/tl");
10
9
  const errors = require("../../../types/errors.cjs");
11
10
  const uploadFile = require("./upload-file.cjs");
12
11
  const uploadedFile = require("../../types/files/uploaded-file.cjs");
12
+ const innerTl = require("../../../tl/inner-tl.cjs");
13
13
  async function _normalizeInputFile(client, input, params) {
14
- if (typeof input === "object" && tl.tl.isAnyInputMedia(input)) {
14
+ if (typeof input === "object" && innerTl.isAnyInputMedia(input)) {
15
15
  throw new errors.MtArgumentError("InputFile can't be created from an InputMedia");
16
16
  } else if (fileId.tdFileId.isFileIdLike(input)) {
17
17
  if (typeof input === "string" && input.match(/^file:/)) {
@@ -24,7 +24,7 @@ async function _normalizeInputFile(client, input, params) {
24
24
  throw new errors.MtArgumentError("InputFile can't be created from an URL or a File ID");
25
25
  } else if (uploadedFile.isUploadedFile(input)) {
26
26
  return input.inputFile;
27
- } else if (typeof input === "object" && tl.tl.isAnyInputFile(input)) {
27
+ } else if (typeof input === "object" && innerTl.isAnyInputFile(input)) {
28
28
  return input;
29
29
  } else {
30
30
  const uploaded = await uploadFile.uploadFile(client, {
@@ -1,6 +1,6 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
2
  import { InputFileLike } from '../../types/files/index.js';
3
- import { tl } from '@mtcute/tl';
3
+ import { tl } from '../../../tl/index.js';
4
4
  /**
5
5
  * Normalize a {@link InputFileLike} to `InputFile`,
6
6
  * uploading it if needed.
@@ -1,6 +1,6 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
2
  import { InputFileLike } from '../../types/files/index.js';
3
- import { tl } from '@mtcute/tl';
3
+ import { tl } from '../../../tl/index.js';
4
4
  /**
5
5
  * Normalize a {@link InputFileLike} to `InputFile`,
6
6
  * uploading it if needed.
@@ -1,10 +1,10 @@
1
1
  import { tdFileId } from "@mtcute/file-id";
2
- import { tl } from "@mtcute/tl";
3
2
  import { MtArgumentError } from "../../../types/errors.js";
4
3
  import { uploadFile } from "./upload-file.js";
5
4
  import { isUploadedFile } from "../../types/files/uploaded-file.js";
5
+ import { isAnyInputMedia, isAnyInputFile } from "../../../tl/inner-tl.js";
6
6
  async function _normalizeInputFile(client, input, params) {
7
- if (typeof input === "object" && tl.isAnyInputMedia(input)) {
7
+ if (typeof input === "object" && isAnyInputMedia(input)) {
8
8
  throw new MtArgumentError("InputFile can't be created from an InputMedia");
9
9
  } else if (tdFileId.isFileIdLike(input)) {
10
10
  if (typeof input === "string" && input.match(/^file:/)) {
@@ -17,7 +17,7 @@ async function _normalizeInputFile(client, input, params) {
17
17
  throw new MtArgumentError("InputFile can't be created from an URL or a File ID");
18
18
  } else if (isUploadedFile(input)) {
19
19
  return input.inputFile;
20
- } else if (typeof input === "object" && tl.isAnyInputFile(input)) {
20
+ } else if (typeof input === "object" && isAnyInputFile(input)) {
21
21
  return input;
22
22
  } else {
23
23
  const uploaded = await uploadFile(client, {
@@ -6,7 +6,6 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
8
  const fileId = require("@mtcute/file-id");
9
- const tl = require("@mtcute/tl");
10
9
  const Long = require("long");
11
10
  const typeAssertions = require("../../../utils/type-assertions.cjs");
12
11
  const uploadedFile = require("../../types/files/uploaded-file.cjs");
@@ -18,8 +17,9 @@ const normalizeText = require("../misc/normalize-text.cjs");
18
17
  const resolvePeer = require("../users/resolve-peer.cjs");
19
18
  const normalizeInputFile = require("./normalize-input-file.cjs");
20
19
  const uploadFile = require("./upload-file.cjs");
20
+ const innerTl = require("../../../tl/inner-tl.cjs");
21
21
  async function _normalizeInputMedia(client, media, params = {}, uploadMedia = false) {
22
- if (tl.tl.isAnyInputMedia(media)) {
22
+ if (innerTl.isAnyInputMedia(media)) {
23
23
  switch (media._) {
24
24
  case "inputMediaStory":
25
25
  return {
@@ -118,7 +118,7 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
118
118
  }
119
119
  if (media.type === "poll" || media.type === "quiz") {
120
120
  const answers = media.answers.map((ans, idx) => {
121
- if (typeof ans === "object" && tl.tl.isAnyPollAnswer(ans)) return ans;
121
+ if (typeof ans === "object" && innerTl.isAnyPollAnswer(ans)) return ans;
122
122
  return {
123
123
  _: "pollAnswer",
124
124
  text: entities.inputTextToTl(ans),
@@ -318,12 +318,12 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
318
318
  spoiler
319
319
  };
320
320
  }
321
- } else if (typeof input === "object" && tl.tl.isAnyInputMedia(input)) {
321
+ } else if (typeof input === "object" && innerTl.isAnyInputMedia(input)) {
322
322
  return input;
323
323
  } else if (uploadedFile.isUploadedFile(input)) {
324
324
  inputFile = input.inputFile;
325
325
  mime = input.mime;
326
- } else if (typeof input === "object" && tl.tl.isAnyInputFile(input)) {
326
+ } else if (typeof input === "object" && innerTl.isAnyInputFile(input)) {
327
327
  inputFile = input;
328
328
  } else {
329
329
  await upload(input);
@@ -1,6 +1,6 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
2
  import { InputMediaLike } from '../../types/media/input-media/types.js';
3
- import { tl } from '@mtcute/tl';
3
+ import { tl } from '../../../tl/index.js';
4
4
  /**
5
5
  * Normalize an {@link InputMediaLike} to `InputMedia`,
6
6
  * uploading the file if needed.
@@ -1,6 +1,6 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
2
  import { InputMediaLike } from '../../types/media/input-media/types.js';
3
- import { tl } from '@mtcute/tl';
3
+ import { tl } from '../../../tl/index.js';
4
4
  /**
5
5
  * Normalize an {@link InputMediaLike} to `InputMedia`,
6
6
  * uploading the file if needed.
@@ -1,5 +1,4 @@
1
1
  import { tdFileId, parseFileId } from "@mtcute/file-id";
2
- import { tl } from "@mtcute/tl";
3
2
  import Long from "long";
4
3
  import { assertTypeIs } from "../../../utils/type-assertions.js";
5
4
  import { isUploadedFile } from "../../types/files/uploaded-file.js";
@@ -11,8 +10,9 @@ import { _normalizeInputText } from "../misc/normalize-text.js";
11
10
  import { resolvePeer } from "../users/resolve-peer.js";
12
11
  import { _normalizeInputFile } from "./normalize-input-file.js";
13
12
  import { uploadFile } from "./upload-file.js";
13
+ import { isAnyInputMedia, isAnyPollAnswer, isAnyInputFile } from "../../../tl/inner-tl.js";
14
14
  async function _normalizeInputMedia(client, media, params = {}, uploadMedia = false) {
15
- if (tl.isAnyInputMedia(media)) {
15
+ if (isAnyInputMedia(media)) {
16
16
  switch (media._) {
17
17
  case "inputMediaStory":
18
18
  return {
@@ -111,7 +111,7 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
111
111
  }
112
112
  if (media.type === "poll" || media.type === "quiz") {
113
113
  const answers = media.answers.map((ans, idx) => {
114
- if (typeof ans === "object" && tl.isAnyPollAnswer(ans)) return ans;
114
+ if (typeof ans === "object" && isAnyPollAnswer(ans)) return ans;
115
115
  return {
116
116
  _: "pollAnswer",
117
117
  text: inputTextToTl(ans),
@@ -311,12 +311,12 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
311
311
  spoiler
312
312
  };
313
313
  }
314
- } else if (typeof input === "object" && tl.isAnyInputMedia(input)) {
314
+ } else if (typeof input === "object" && isAnyInputMedia(input)) {
315
315
  return input;
316
316
  } else if (isUploadedFile(input)) {
317
317
  inputFile = input.inputFile;
318
318
  mime = input.mime;
319
- } else if (typeof input === "object" && tl.isAnyInputFile(input)) {
319
+ } else if (typeof input === "object" && isAnyInputFile(input)) {
320
320
  inputFile = input;
321
321
  } else {
322
322
  await upload(input);
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, Message } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, Message } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ForumTopic, InputPeerLike, Message } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ForumTopic, InputPeerLike, Message } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputStarGift } from '../../types/index.js';
4
4
  export declare function _normalizeInputStarGift(client: ITelegramClient, gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputStarGift } from '../../types/index.js';
4
4
  export declare function _normalizeInputStarGift(client: ITelegramClient, gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
@@ -1,5 +1,5 @@
1
1
  import { MaybeArray } from '@fuman/utils';
2
- import { tl } from '@mtcute/tl';
2
+ import { tl } from '../../../tl/index.js';
3
3
  import { ITelegramClient } from '../../client.types.js';
4
4
  import { ArrayPaginatedWithMeta, StarGiftUnique, StarGiftUniqueAttribute, StarGiftUniqueBackdrop } from '../../types/index.js';
5
5
  import { default as Long } from 'long';
@@ -1,5 +1,5 @@
1
1
  import { MaybeArray } from '@fuman/utils';
2
- import { tl } from '@mtcute/tl';
2
+ import { tl } from '../../../tl/index.js';
3
3
  import { ITelegramClient } from '../../client.types.js';
4
4
  import { ArrayPaginatedWithMeta, StarGiftUnique, StarGiftUniqueAttribute, StarGiftUniqueBackdrop } from '../../types/index.js';
5
5
  import { default as Long } from 'long';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { StarGiftUniqueAttribute, StarGiftUniqueBackdrop } from '../../types/index.js';
4
4
  export interface StarGiftUpgradeOptions {
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { StarGiftUniqueAttribute, StarGiftUniqueBackdrop } from '../../types/index.js';
4
4
  export interface StarGiftUpgradeOptions {
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, Message } from '../../types/index.js';
4
4
  import { InputStarsAmount } from '../premium/_normalize-stars-amount.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, Message } from '../../types/index.js';
4
4
  import { InputStarsAmount } from '../premium/_normalize-stars-amount.js';
@@ -5,11 +5,11 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
5
5
  }
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
- const tl = require("@mtcute/tl");
9
8
  const typeAssertions = require("../../../utils/type-assertions.cjs");
10
9
  const findInUpdate = require("../messages/find-in-update.cjs");
11
10
  const resolvePeer = require("../users/resolve-peer.cjs");
12
11
  const _normalizeInputStarGift = require("./_normalize-input-star-gift.cjs");
12
+ const innerTl = require("../../../tl/inner-tl.cjs");
13
13
  async function transferStarGift(client, params) {
14
14
  const { gift, recipient, shouldDispatch } = params;
15
15
  const invoice = {
@@ -31,7 +31,7 @@ async function transferStarGift(client, params) {
31
31
  typeAssertions.assertTypeIs("payments.sendStarsForm", res, "payments.paymentResult");
32
32
  updates = res.updates;
33
33
  } catch (e) {
34
- if (tl.tl.RpcError.is(e, "NO_PAYMENT_NEEDED")) {
34
+ if (innerTl.RpcError.is(e, "NO_PAYMENT_NEEDED")) {
35
35
  updates = await client.call({
36
36
  _: "payments.transferStarGift",
37
37
  stargift: invoice.stargift,
@@ -1,8 +1,8 @@
1
- import { tl } from "@mtcute/tl";
2
1
  import { assertTypeIs } from "../../../utils/type-assertions.js";
3
2
  import { _findMessageInUpdate } from "../messages/find-in-update.js";
4
3
  import { resolvePeer } from "../users/resolve-peer.js";
5
4
  import { _normalizeInputStarGift } from "./_normalize-input-star-gift.js";
5
+ import { RpcError } from "../../../tl/inner-tl.js";
6
6
  async function transferStarGift(client, params) {
7
7
  const { gift, recipient, shouldDispatch } = params;
8
8
  const invoice = {
@@ -24,7 +24,7 @@ async function transferStarGift(client, params) {
24
24
  assertTypeIs("payments.sendStarsForm", res, "payments.paymentResult");
25
25
  updates = res.updates;
26
26
  } catch (e) {
27
- if (tl.RpcError.is(e, "NO_PAYMENT_NEEDED")) {
27
+ if (RpcError.is(e, "NO_PAYMENT_NEEDED")) {
28
28
  updates = await client.call({
29
29
  _: "payments.transferStarGift",
30
30
  stargift: invoice.stargift,
@@ -5,10 +5,10 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
5
5
  }
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
- const tl = require("@mtcute/tl");
9
8
  const typeAssertions = require("../../../utils/type-assertions.cjs");
10
9
  const findInUpdate = require("../messages/find-in-update.cjs");
11
10
  const _normalizeInputStarGift = require("./_normalize-input-star-gift.cjs");
11
+ const innerTl = require("../../../tl/inner-tl.cjs");
12
12
  async function upgradeStarGift(client, params) {
13
13
  const { gift, keepOriginalDetails, shouldDispatch } = params;
14
14
  const invoice = {
@@ -30,7 +30,7 @@ async function upgradeStarGift(client, params) {
30
30
  typeAssertions.assertTypeIs("payments.sendStarsForm", res, "payments.paymentResult");
31
31
  updates = res.updates;
32
32
  } catch (e) {
33
- if (tl.tl.RpcError.is(e, "NO_PAYMENT_NEEDED")) {
33
+ if (innerTl.RpcError.is(e, "NO_PAYMENT_NEEDED")) {
34
34
  updates = await client.call({
35
35
  _: "payments.upgradeStarGift",
36
36
  stargift: invoice.stargift,
@@ -1,7 +1,7 @@
1
- import { tl } from "@mtcute/tl";
2
1
  import { assertTypeIs } from "../../../utils/type-assertions.js";
3
2
  import { _findMessageInUpdate } from "../messages/find-in-update.js";
4
3
  import { _normalizeInputStarGift } from "./_normalize-input-star-gift.js";
4
+ import { RpcError } from "../../../tl/inner-tl.js";
5
5
  async function upgradeStarGift(client, params) {
6
6
  const { gift, keepOriginalDetails, shouldDispatch } = params;
7
7
  const invoice = {
@@ -23,7 +23,7 @@ async function upgradeStarGift(client, params) {
23
23
  assertTypeIs("payments.sendStarsForm", res, "payments.paymentResult");
24
24
  updates = res.updates;
25
25
  } catch (e) {
26
- if (tl.RpcError.is(e, "NO_PAYMENT_NEEDED")) {
26
+ if (RpcError.is(e, "NO_PAYMENT_NEEDED")) {
27
27
  updates = await client.call({
28
28
  _: "payments.upgradeStarGift",
29
29
  stargift: invoice.stargift,
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, ChatInviteLink } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, ChatInviteLink } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated, ChatInviteLink, InputPeerLike, ChatInviteLinkMember } from '../../types/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated, ChatInviteLink, InputPeerLike, ChatInviteLinkMember } from '../../types/index.js';
4
4
  /**
@@ -5,11 +5,11 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
5
5
  }
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
- const tl = require("@mtcute/tl");
9
8
  const inlineUtils = require("../../utils/inline-utils.cjs");
10
9
  const normalizeInputMedia = require("../files/normalize-input-media.cjs");
11
10
  const normalizeText = require("../misc/normalize-text.cjs");
12
11
  const factories = require("../../types/bots/keyboards/factories.cjs");
12
+ const innerTl = require("../../../tl/inner-tl.cjs");
13
13
  async function editInlineMessage(client, params) {
14
14
  let content;
15
15
  let entities;
@@ -41,7 +41,7 @@ async function editInlineMessage(client, params) {
41
41
  );
42
42
  return;
43
43
  } catch (e) {
44
- if (tl.tl.RpcError.is(e, "MEDIA_EMPTY")) {
44
+ if (innerTl.RpcError.is(e, "MEDIA_EMPTY")) {
45
45
  continue;
46
46
  }
47
47
  throw e;
@@ -1,6 +1,6 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
2
  import { InputMediaLike, InputText, ReplyMarkup } from '../../types/index.js';
3
- import { tl } from '@mtcute/tl';
3
+ import { tl } from '../../../tl/index.js';
4
4
  /**
5
5
  * Edit sent inline message text, media and reply markup.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
2
  import { InputMediaLike, InputText, ReplyMarkup } from '../../types/index.js';
3
- import { tl } from '@mtcute/tl';
3
+ import { tl } from '../../../tl/index.js';
4
4
  /**
5
5
  * Edit sent inline message text, media and reply markup.
6
6
  *
@@ -1,8 +1,8 @@
1
- import { tl } from "@mtcute/tl";
2
1
  import { normalizeInlineId } from "../../utils/inline-utils.js";
3
2
  import { _normalizeInputMedia } from "../files/normalize-input-media.js";
4
3
  import { _normalizeInputText } from "../misc/normalize-text.js";
5
4
  import { _convertToTl } from "../../types/bots/keyboards/factories.js";
5
+ import { RpcError } from "../../../tl/inner-tl.js";
6
6
  async function editInlineMessage(client, params) {
7
7
  let content;
8
8
  let entities;
@@ -34,7 +34,7 @@ async function editInlineMessage(client, params) {
34
34
  );
35
35
  return;
36
36
  } catch (e) {
37
- if (tl.RpcError.is(e, "MEDIA_EMPTY")) {
37
+ if (RpcError.is(e, "MEDIA_EMPTY")) {
38
38
  continue;
39
39
  }
40
40
  throw e;
@@ -8,7 +8,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
8
  const normalizeInputMedia = require("../files/normalize-input-media.cjs");
9
9
  const normalizeText = require("../misc/normalize-text.cjs");
10
10
  const resolvePeer = require("../users/resolve-peer.cjs");
11
- const _businessConnection = require("./_business-connection.cjs");
12
11
  const findInUpdate = require("./find-in-update.cjs");
13
12
  const inputMessageId = require("../../types/messages/input-message-id.cjs");
14
13
  const factories = require("../../types/bots/keyboards/factories.cjs");
@@ -26,7 +25,7 @@ async function editMessage(client, params) {
26
25
  if (params.text !== void 0) {
27
26
  [content, entities] = await normalizeText._normalizeInputText(client, params.text);
28
27
  }
29
- const res = await _businessConnection._maybeInvokeWithBusinessConnection(client, params.businessConnectionId, {
28
+ const res = await client.call({
30
29
  _: "messages.editMessage",
31
30
  id: message,
32
31
  peer: await resolvePeer.resolvePeer(client, chatId),
@@ -36,6 +35,8 @@ async function editMessage(client, params) {
36
35
  entities,
37
36
  media,
38
37
  invertMedia: params.invertMedia
38
+ }, {
39
+ businessConnectionId: params.businessConnectionId
39
40
  });
40
41
  return findInUpdate._findMessageInUpdate(client, res, true, !params.shouldDispatch);
41
42
  }
@@ -1,7 +1,6 @@
1
1
  import { _normalizeInputMedia } from "../files/normalize-input-media.js";
2
2
  import { _normalizeInputText } from "../misc/normalize-text.js";
3
3
  import { resolvePeer } from "../users/resolve-peer.js";
4
- import { _maybeInvokeWithBusinessConnection } from "./_business-connection.js";
5
4
  import { _findMessageInUpdate } from "./find-in-update.js";
6
5
  import { normalizeInputMessageId } from "../../types/messages/input-message-id.js";
7
6
  import { _convertToTl } from "../../types/bots/keyboards/factories.js";
@@ -19,7 +18,7 @@ async function editMessage(client, params) {
19
18
  if (params.text !== void 0) {
20
19
  [content, entities] = await _normalizeInputText(client, params.text);
21
20
  }
22
- const res = await _maybeInvokeWithBusinessConnection(client, params.businessConnectionId, {
21
+ const res = await client.call({
23
22
  _: "messages.editMessage",
24
23
  id: message,
25
24
  peer: await resolvePeer(client, chatId),
@@ -29,6 +28,8 @@ async function editMessage(client, params) {
29
28
  entities,
30
29
  media,
31
30
  invertMedia: params.invertMedia
31
+ }, {
32
+ businessConnectionId: params.businessConnectionId
32
33
  });
33
34
  return _findMessageInUpdate(client, res, true, !params.shouldDispatch);
34
35
  }
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { Message } from '../../types/messages/index.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { Message } from '../../types/messages/index.js';
4
4
  /**
@@ -34,7 +34,7 @@ async function forwardMessagesById(client, params) {
34
34
  throw new errors.MtArgumentError("You can forward no more than 100 messages at once");
35
35
  }
36
36
  const toPeer = await resolvePeer.resolvePeer(client, toChatId);
37
- client.timers.cancel(setTyping._getTypingTimerId(toPeer));
37
+ await client.timers.cancel(setTyping._getTypingTimerId(toPeer));
38
38
  const res = await client.call({
39
39
  _: "messages.forwardMessages",
40
40
  toPeer,
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, Message } from '../../types/index.js';
4
4
  export interface ForwardMessageOptions {
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike, Message } from '../../types/index.js';
4
4
  export interface ForwardMessageOptions {
@@ -27,7 +27,7 @@ async function forwardMessagesById(client, params) {
27
27
  throw new MtArgumentError("You can forward no more than 100 messages at once");
28
28
  }
29
29
  const toPeer = await resolvePeer(client, toChatId);
30
- client.timers.cancel(_getTypingTimerId(toPeer));
30
+ await client.timers.cancel(_getTypingTimerId(toPeer));
31
31
  const res = await client.call({
32
32
  _: "messages.forwardMessages",
33
33
  toPeer,
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike } from '../../types/peers/index.js';
4
4
  import { CallbackQuery } from '../../types/updates/callback-query.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputPeerLike } from '../../types/peers/index.js';
4
4
  import { CallbackQuery } from '../../types/updates/callback-query.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputMessageId, Message } from '../../types/messages/index.js';
4
4
  import { InputPeerLike } from '../../types/peers/index.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { InputMessageId, Message } from '../../types/messages/index.js';
4
4
  import { InputPeerLike } from '../../types/peers/index.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated, Message } from '../../types/index.js';
4
4
  export interface SearchGlobalOffset {
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated, Message } from '../../types/index.js';
4
4
  export interface SearchGlobalOffset {
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated } from '../../types/utils.js';
4
4
  import { Message } from '../../types/index.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated } from '../../types/utils.js';
4
4
  import { Message } from '../../types/index.js';
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated, InputPeerLike, Message } from '../../types/index.js';
4
4
  export type SearchMessagesOffset = number;
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginated, InputPeerLike, Message } from '../../types/index.js';
4
4
  export type SearchMessagesOffset = number;
@@ -1,4 +1,4 @@
1
- import { tl } from '@mtcute/tl';
1
+ import { tl } from '../../../tl/index.js';
2
2
  import { ITelegramClient } from '../../client.types.js';
3
3
  import { ArrayPaginatedWithMeta } from '../../types/utils.js';
4
4
  import { Message } from '../../types/index.js';