@mtkruto/node 0.1.138 → 0.1.140

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 (287) hide show
  1. package/esm/3_types.d.ts +10 -36
  2. package/esm/3_types.js +10 -36
  3. package/esm/4_constants.d.ts +1 -1
  4. package/esm/4_constants.js +1 -1
  5. package/esm/5_client.d.ts +1 -1
  6. package/esm/5_client.js +1 -1
  7. package/esm/_dnt.polyfills.d.ts +6 -0
  8. package/esm/client/0_filters.d.ts +60 -0
  9. package/esm/client/0_filters.js +27 -0
  10. package/esm/client/0_message.js +2 -2
  11. package/esm/client/{3_params.d.ts → 0_params.d.ts} +30 -33
  12. package/esm/client/0_types.d.ts +39 -0
  13. package/esm/client/0_types.js +2 -0
  14. package/esm/client/0_utilities.d.ts +1 -47
  15. package/esm/client/0_utilities.js +0 -27
  16. package/esm/client/1_composer.d.ts +1 -1
  17. package/esm/client/1_composer.js +1 -1
  18. package/esm/client/1_file_manager.d.ts +10 -0
  19. package/esm/client/1_file_manager.js +241 -0
  20. package/esm/client/1_update_manager.d.ts +18 -0
  21. package/esm/client/1_update_manager.js +553 -0
  22. package/esm/client/2_message_manager.d.ts +40 -0
  23. package/esm/client/2_message_manager.js +621 -0
  24. package/esm/client/3_chat_list_manager.d.ts +21 -0
  25. package/esm/client/3_chat_list_manager.js +353 -0
  26. package/esm/client/3_reaction_manager.d.ts +16 -0
  27. package/esm/client/3_reaction_manager.js +61 -0
  28. package/esm/client/4_client.d.ts +187 -60
  29. package/esm/client/4_client.js +492 -1699
  30. package/esm/connection/1_connection_web_socket.js +6 -6
  31. package/esm/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.d.ts +1 -1
  32. package/esm/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.js +1 -1
  33. package/esm/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.d.ts +1 -0
  34. package/esm/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.js +524 -0
  35. package/esm/mod.d.ts +1 -0
  36. package/esm/mod.js +1 -0
  37. package/esm/storage/0_storage.d.ts +5 -3
  38. package/esm/storage/0_storage.js +14 -4
  39. package/esm/tl/1_tl_object.d.ts +1 -0
  40. package/esm/tl/1_tl_object.js +24 -0
  41. package/esm/types/0_bot_command.d.ts +1 -0
  42. package/esm/types/0_chat_member_rights.d.ts +37 -0
  43. package/esm/types/0_chat_photo.d.ts +4 -4
  44. package/esm/types/0_file_source.d.ts +5 -0
  45. package/esm/types/0_giveaway_parameters.js +2 -1
  46. package/esm/types/0_id.d.ts +4 -0
  47. package/esm/types/0_message_entity.d.ts +20 -20
  48. package/esm/types/1__getters.d.ts +2 -2
  49. package/esm/types/1_animation.d.ts +1 -1
  50. package/esm/types/1_bot_command_scope.d.ts +5 -4
  51. package/esm/types/1_chat_p.d.ts +5 -6
  52. package/esm/types/1_document.d.ts +1 -0
  53. package/esm/types/1_input_message_content.d.ts +88 -0
  54. package/esm/types/1_photo.d.ts +1 -1
  55. package/esm/types/1_sticker.d.ts +1 -1
  56. package/esm/types/1_user.d.ts +1 -1
  57. package/esm/types/1_video.d.ts +1 -1
  58. package/esm/types/1_video_note.d.ts +1 -1
  59. package/esm/types/2_inline_keyboard_button.d.ts +10 -10
  60. package/esm/types/2_message_reaction_count.d.ts +3 -0
  61. package/esm/types/2_message_reaction_count.js +17 -1
  62. package/esm/types/2_message_reactions.d.ts +15 -0
  63. package/esm/types/2_message_reactions.js +37 -0
  64. package/esm/types/3_reply_markup.d.ts +42 -0
  65. package/esm/types/3_reply_markup.js +117 -0
  66. package/esm/types/4_inline_query_result.d.ts +193 -0
  67. package/esm/types/{5_inline_query_result.js → 4_inline_query_result.js} +2 -2
  68. package/esm/types/4_message.d.ts +36 -39
  69. package/esm/types/4_message.js +7 -24
  70. package/esm/types/5_callback_query.d.ts +2 -1
  71. package/esm/types/5_chat.d.ts +8 -5
  72. package/esm/types/6_update.d.ts +12 -2
  73. package/esm/utilities/0_buffer.js +9 -6
  74. package/esm/utilities/0_object.d.ts +1 -1
  75. package/esm/utilities/0_object.js +1 -6
  76. package/esm/utilities/1_misc.d.ts +2 -0
  77. package/esm/utilities/1_misc.js +6 -0
  78. package/package.json +1 -2
  79. package/script/3_types.d.ts +10 -36
  80. package/script/3_types.js +10 -36
  81. package/script/4_constants.d.ts +1 -1
  82. package/script/4_constants.js +1 -1
  83. package/script/5_client.d.ts +1 -1
  84. package/script/5_client.js +1 -1
  85. package/script/_dnt.polyfills.d.ts +6 -0
  86. package/script/client/0_filters.d.ts +60 -0
  87. package/script/client/0_filters.js +31 -0
  88. package/script/client/0_message.js +1 -1
  89. package/script/client/{3_params.d.ts → 0_params.d.ts} +30 -33
  90. package/script/client/0_types.d.ts +39 -0
  91. package/script/client/0_types.js +6 -0
  92. package/script/client/0_utilities.d.ts +1 -47
  93. package/script/client/0_utilities.js +1 -29
  94. package/script/client/1_composer.d.ts +1 -1
  95. package/script/client/1_composer.js +2 -2
  96. package/script/client/1_file_manager.d.ts +10 -0
  97. package/script/client/1_file_manager.js +245 -0
  98. package/script/client/1_update_manager.d.ts +18 -0
  99. package/script/client/1_update_manager.js +557 -0
  100. package/script/client/2_message_manager.d.ts +40 -0
  101. package/script/client/2_message_manager.js +625 -0
  102. package/script/client/3_chat_list_manager.d.ts +21 -0
  103. package/script/client/3_chat_list_manager.js +357 -0
  104. package/script/client/3_reaction_manager.d.ts +16 -0
  105. package/script/client/3_reaction_manager.js +65 -0
  106. package/script/client/4_client.d.ts +187 -60
  107. package/script/client/4_client.js +491 -1699
  108. package/script/connection/1_connection_web_socket.js +5 -5
  109. package/script/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.d.ts +1 -1
  110. package/script/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.js +2 -2
  111. package/script/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.d.ts +1 -0
  112. package/script/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.js +550 -0
  113. package/script/mod.d.ts +1 -0
  114. package/script/mod.js +1 -0
  115. package/script/storage/0_storage.d.ts +5 -3
  116. package/script/storage/0_storage.js +14 -4
  117. package/script/tl/1_tl_object.d.ts +1 -0
  118. package/script/tl/1_tl_object.js +24 -0
  119. package/script/types/0_bot_command.d.ts +1 -0
  120. package/script/types/0_chat_member_rights.d.ts +37 -0
  121. package/script/types/0_chat_photo.d.ts +4 -4
  122. package/script/types/0_file_source.d.ts +5 -0
  123. package/script/types/0_giveaway_parameters.js +2 -1
  124. package/script/types/0_id.d.ts +4 -0
  125. package/script/types/0_message_entity.d.ts +20 -20
  126. package/script/types/1__getters.d.ts +2 -2
  127. package/script/types/1_animation.d.ts +1 -1
  128. package/script/types/1_bot_command_scope.d.ts +5 -4
  129. package/script/types/1_chat_p.d.ts +5 -6
  130. package/script/types/1_document.d.ts +1 -0
  131. package/script/types/1_input_message_content.d.ts +88 -0
  132. package/script/types/1_photo.d.ts +1 -1
  133. package/script/types/1_sticker.d.ts +1 -1
  134. package/script/types/1_user.d.ts +1 -1
  135. package/script/types/1_video.d.ts +1 -1
  136. package/script/types/1_video_note.d.ts +1 -1
  137. package/script/types/2_inline_keyboard_button.d.ts +10 -10
  138. package/script/types/2_message_reaction_count.d.ts +3 -0
  139. package/script/types/2_message_reaction_count.js +19 -0
  140. package/script/types/2_message_reactions.d.ts +15 -0
  141. package/script/types/2_message_reactions.js +41 -0
  142. package/script/types/3_reply_markup.d.ts +42 -0
  143. package/script/types/3_reply_markup.js +122 -0
  144. package/script/types/4_inline_query_result.d.ts +193 -0
  145. package/script/types/{5_inline_query_result.js → 4_inline_query_result.js} +3 -3
  146. package/script/types/4_message.d.ts +36 -39
  147. package/script/types/4_message.js +6 -23
  148. package/script/types/5_callback_query.d.ts +2 -1
  149. package/script/types/5_chat.d.ts +8 -5
  150. package/script/types/6_update.d.ts +12 -2
  151. package/script/utilities/0_buffer.js +9 -6
  152. package/script/utilities/0_object.d.ts +1 -1
  153. package/script/utilities/0_object.js +1 -6
  154. package/script/utilities/1_misc.d.ts +2 -0
  155. package/script/utilities/1_misc.js +9 -1
  156. package/esm/types/0_chat_id.d.ts +0 -4
  157. package/esm/types/0_force_reply.d.ts +0 -12
  158. package/esm/types/0_force_reply.js +0 -17
  159. package/esm/types/0_input_contact_message_content.d.ts +0 -11
  160. package/esm/types/0_input_location_message_content.d.ts +0 -15
  161. package/esm/types/0_input_venue_message_content.d.ts +0 -19
  162. package/esm/types/0_reply_keyboard_remove.d.ts +0 -10
  163. package/esm/types/0_reply_keyboard_remove.js +0 -8
  164. package/esm/types/1_input_invoice_message_content.d.ts +0 -23
  165. package/esm/types/1_input_text_message_content.d.ts +0 -8
  166. package/esm/types/1_input_text_message_content.js +0 -1
  167. package/esm/types/2_input_message_content.d.ts +0 -6
  168. package/esm/types/2_input_message_content.js +0 -1
  169. package/esm/types/2_reply_keyboard_markup.d.ts +0 -12
  170. package/esm/types/2_reply_keyboard_markup.js +0 -37
  171. package/esm/types/3_inline_keyboard_markup.d.ts +0 -8
  172. package/esm/types/3_inline_keyboard_markup.js +0 -24
  173. package/esm/types/4_inline_query_result_article.d.ts +0 -15
  174. package/esm/types/4_inline_query_result_article.js +0 -1
  175. package/esm/types/4_inline_query_result_audio.d.ts +0 -17
  176. package/esm/types/4_inline_query_result_audio.js +0 -1
  177. package/esm/types/4_inline_query_result_cached_audio.d.ts +0 -14
  178. package/esm/types/4_inline_query_result_cached_audio.js +0 -1
  179. package/esm/types/4_inline_query_result_cached_document.d.ts +0 -15
  180. package/esm/types/4_inline_query_result_cached_document.js +0 -1
  181. package/esm/types/4_inline_query_result_cached_gif.d.ts +0 -15
  182. package/esm/types/4_inline_query_result_cached_gif.js +0 -1
  183. package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +0 -15
  184. package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +0 -1
  185. package/esm/types/4_inline_query_result_cached_photo.d.ts +0 -16
  186. package/esm/types/4_inline_query_result_cached_photo.js +0 -1
  187. package/esm/types/4_inline_query_result_cached_sticker.d.ts +0 -9
  188. package/esm/types/4_inline_query_result_cached_sticker.js +0 -1
  189. package/esm/types/4_inline_query_result_cached_video.d.ts +0 -16
  190. package/esm/types/4_inline_query_result_cached_video.js +0 -1
  191. package/esm/types/4_inline_query_result_cached_voice.d.ts +0 -15
  192. package/esm/types/4_inline_query_result_cached_voice.js +0 -1
  193. package/esm/types/4_inline_query_result_contact.d.ts +0 -15
  194. package/esm/types/4_inline_query_result_contact.js +0 -1
  195. package/esm/types/4_inline_query_result_document.d.ts +0 -18
  196. package/esm/types/4_inline_query_result_document.js +0 -1
  197. package/esm/types/4_inline_query_result_game.d.ts +0 -7
  198. package/esm/types/4_inline_query_result_game.js +0 -1
  199. package/esm/types/4_inline_query_result_gif.d.ts +0 -20
  200. package/esm/types/4_inline_query_result_gif.js +0 -1
  201. package/esm/types/4_inline_query_result_location.d.ts +0 -18
  202. package/esm/types/4_inline_query_result_location.js +0 -1
  203. package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +0 -20
  204. package/esm/types/4_inline_query_result_mpeg4_gif.js +0 -1
  205. package/esm/types/4_inline_query_result_photo.d.ts +0 -19
  206. package/esm/types/4_inline_query_result_photo.js +0 -1
  207. package/esm/types/4_inline_query_result_venue.d.ts +0 -19
  208. package/esm/types/4_inline_query_result_venue.js +0 -1
  209. package/esm/types/4_inline_query_result_video.d.ts +0 -21
  210. package/esm/types/4_inline_query_result_video.js +0 -1
  211. package/esm/types/4_inline_query_result_voice.d.ts +0 -16
  212. package/esm/types/4_inline_query_result_voice.js +0 -1
  213. package/esm/types/4_reply_markup.d.ts +0 -7
  214. package/esm/types/4_reply_markup.js +0 -22
  215. package/esm/types/5_inline_query_result.d.ts +0 -28
  216. package/script/types/0_chat_id.d.ts +0 -4
  217. package/script/types/0_force_reply.d.ts +0 -12
  218. package/script/types/0_force_reply.js +0 -22
  219. package/script/types/0_input_contact_message_content.d.ts +0 -11
  220. package/script/types/0_input_location_message_content.d.ts +0 -15
  221. package/script/types/0_input_venue_message_content.d.ts +0 -19
  222. package/script/types/0_reply_keyboard_remove.d.ts +0 -10
  223. package/script/types/0_reply_keyboard_remove.js +0 -13
  224. package/script/types/1_input_invoice_message_content.d.ts +0 -23
  225. package/script/types/1_input_text_message_content.d.ts +0 -8
  226. package/script/types/1_input_text_message_content.js +0 -2
  227. package/script/types/2_input_message_content.d.ts +0 -6
  228. package/script/types/2_input_message_content.js +0 -2
  229. package/script/types/2_reply_keyboard_markup.d.ts +0 -12
  230. package/script/types/2_reply_keyboard_markup.js +0 -42
  231. package/script/types/3_inline_keyboard_markup.d.ts +0 -8
  232. package/script/types/3_inline_keyboard_markup.js +0 -29
  233. package/script/types/4_inline_query_result_article.d.ts +0 -15
  234. package/script/types/4_inline_query_result_article.js +0 -2
  235. package/script/types/4_inline_query_result_audio.d.ts +0 -17
  236. package/script/types/4_inline_query_result_audio.js +0 -2
  237. package/script/types/4_inline_query_result_cached_audio.d.ts +0 -14
  238. package/script/types/4_inline_query_result_cached_audio.js +0 -2
  239. package/script/types/4_inline_query_result_cached_document.d.ts +0 -15
  240. package/script/types/4_inline_query_result_cached_document.js +0 -2
  241. package/script/types/4_inline_query_result_cached_gif.d.ts +0 -15
  242. package/script/types/4_inline_query_result_cached_gif.js +0 -2
  243. package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +0 -15
  244. package/script/types/4_inline_query_result_cached_mpeg4_gif.js +0 -2
  245. package/script/types/4_inline_query_result_cached_photo.d.ts +0 -16
  246. package/script/types/4_inline_query_result_cached_photo.js +0 -2
  247. package/script/types/4_inline_query_result_cached_sticker.d.ts +0 -9
  248. package/script/types/4_inline_query_result_cached_sticker.js +0 -2
  249. package/script/types/4_inline_query_result_cached_video.d.ts +0 -16
  250. package/script/types/4_inline_query_result_cached_video.js +0 -2
  251. package/script/types/4_inline_query_result_cached_voice.d.ts +0 -15
  252. package/script/types/4_inline_query_result_cached_voice.js +0 -2
  253. package/script/types/4_inline_query_result_contact.d.ts +0 -15
  254. package/script/types/4_inline_query_result_contact.js +0 -2
  255. package/script/types/4_inline_query_result_document.d.ts +0 -18
  256. package/script/types/4_inline_query_result_document.js +0 -2
  257. package/script/types/4_inline_query_result_game.d.ts +0 -7
  258. package/script/types/4_inline_query_result_game.js +0 -2
  259. package/script/types/4_inline_query_result_gif.d.ts +0 -20
  260. package/script/types/4_inline_query_result_gif.js +0 -2
  261. package/script/types/4_inline_query_result_location.d.ts +0 -18
  262. package/script/types/4_inline_query_result_location.js +0 -2
  263. package/script/types/4_inline_query_result_mpeg4_gif.d.ts +0 -20
  264. package/script/types/4_inline_query_result_mpeg4_gif.js +0 -2
  265. package/script/types/4_inline_query_result_photo.d.ts +0 -19
  266. package/script/types/4_inline_query_result_photo.js +0 -2
  267. package/script/types/4_inline_query_result_venue.d.ts +0 -19
  268. package/script/types/4_inline_query_result_venue.js +0 -2
  269. package/script/types/4_inline_query_result_video.d.ts +0 -21
  270. package/script/types/4_inline_query_result_video.js +0 -2
  271. package/script/types/4_inline_query_result_voice.d.ts +0 -16
  272. package/script/types/4_inline_query_result_voice.js +0 -2
  273. package/script/types/4_reply_markup.d.ts +0 -7
  274. package/script/types/4_reply_markup.js +0 -26
  275. package/script/types/5_inline_query_result.d.ts +0 -28
  276. /package/esm/{client/3_params.js → _dnt.polyfills.js} +0 -0
  277. /package/esm/{types/0_chat_id.js → client/0_params.js} +0 -0
  278. /package/esm/types/{0_input_contact_message_content.js → 0_chat_member_rights.js} +0 -0
  279. /package/esm/types/{0_input_location_message_content.js → 0_file_source.js} +0 -0
  280. /package/esm/types/{0_input_venue_message_content.js → 0_id.js} +0 -0
  281. /package/esm/types/{1_input_invoice_message_content.js → 1_input_message_content.js} +0 -0
  282. /package/script/{client/3_params.js → _dnt.polyfills.js} +0 -0
  283. /package/script/{types/0_chat_id.js → client/0_params.js} +0 -0
  284. /package/script/types/{0_input_contact_message_content.js → 0_chat_member_rights.js} +0 -0
  285. /package/script/types/{0_input_location_message_content.js → 0_file_source.js} +0 -0
  286. /package/script/types/{0_input_venue_message_content.js → 0_id.js} +0 -0
  287. /package/script/types/{1_input_invoice_message_content.js → 1_input_message_content.js} +0 -0
@@ -1,12 +0,0 @@
1
- import { types } from "../2_tl.js";
2
- /** Forces the user's client to select the message as the one that is to be replied. */
3
- export interface ForceReply {
4
- /** Differentiate from other reply markup types. */
5
- forceReply: true;
6
- /** A placeholder to be shown in the client's message box. */
7
- inputFieldPlaceholder?: string;
8
- /** Whether to only affect specific users. If true, only users that were mentioned will be affected along with the author of the replied message if any. */
9
- selective?: boolean;
10
- }
11
- export declare function constructForceReply(replyMarkup_: types.ReplyKeyboardForceReply): ForceReply;
12
- export declare function forceReplyToTlObject(replyMarkup: ForceReply): import("../tl/2_types.js").ReplyKeyboardForceReply_;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.forceReplyToTlObject = exports.constructForceReply = void 0;
4
- const _2_tl_js_1 = require("../2_tl.js");
5
- function constructForceReply(replyMarkup_) {
6
- const replyMarkup = { forceReply: true };
7
- if (replyMarkup_.placeholder) {
8
- replyMarkup.inputFieldPlaceholder = replyMarkup_.placeholder;
9
- }
10
- if (replyMarkup_.selective) {
11
- replyMarkup.selective = true;
12
- }
13
- return replyMarkup;
14
- }
15
- exports.constructForceReply = constructForceReply;
16
- function forceReplyToTlObject(replyMarkup) {
17
- return new _2_tl_js_1.types.ReplyKeyboardForceReply({
18
- selective: replyMarkup.selective || undefined,
19
- placeholder: replyMarkup.inputFieldPlaceholder,
20
- });
21
- }
22
- exports.forceReplyToTlObject = forceReplyToTlObject;
@@ -1,11 +0,0 @@
1
- /** A message content that shares a contact. */
2
- export interface InputContactMessageContent {
3
- /** The contact's phone number. */
4
- phoneNumber: string;
5
- /** The contact's first name. */
6
- firstName: string;
7
- /** The contact's last name. */
8
- lastName?: string;
9
- /** Additional information in the vCard format. */
10
- vcard?: string;
11
- }
@@ -1,15 +0,0 @@
1
- /** A message content that shares a location. */
2
- export interface InputLocationMessageContent {
3
- /** The latitude of the location. */
4
- latitude: number;
5
- /** The longitude of the location. */
6
- longitude: number;
7
- /** The accuracy radius of the location in meters. Must be in the range of 0-1500. */
8
- horizontalAccuracy?: number;
9
- /** The duration in which the location can be updated in seconds. Must be in the range of 80-864,000. */
10
- livePeriod?: number;
11
- /** The direction which the user is moving towards. Must be in the range of 1-350. */
12
- heading?: number;
13
- /** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
14
- proximityAlertRadius?: number;
15
- }
@@ -1,19 +0,0 @@
1
- /** A message content that shares a venue. */
2
- export interface InputVenuMessageContent {
3
- /** The latitude of the venue. */
4
- latitude: number;
5
- /** The longitude of the venue. */
6
- longitude: number;
7
- /** The name of the venue. */
8
- title: string;
9
- /** The address of the venue. */
10
- address: string;
11
- /** The Foursquare identifier of the venue. */
12
- foursquareId?: string;
13
- /** The Foursquare type of the venue. */
14
- foursquareType?: string;
15
- /** The Google Places identifier of the venue. */
16
- googlePlaceId?: string;
17
- /** The Google Places type of the venue. */
18
- googlePlaceType?: string;
19
- }
@@ -1,10 +0,0 @@
1
- import { types } from "../2_tl.js";
2
- /** Makes the user's client hide the current custom keyboard. */
3
- export interface ReplyKeyboardRemove {
4
- /** Differentiate from other reply markup types. */
5
- removeKeyboard: true;
6
- /** Whether to only affect specific users. If true, only users that were mentioned will be affected along with the author of the replied message if any. */
7
- selective?: boolean;
8
- }
9
- export declare function constructReplyKeyboardRemove(replyMarkup_: types.ReplyKeyboardHide): ReplyKeyboardRemove;
10
- export declare function replyKeyboardRemoveToTlObject(replyMarkup: ReplyKeyboardRemove): import("../tl/2_types.js").ReplyKeyboardHide_;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replyKeyboardRemoveToTlObject = exports.constructReplyKeyboardRemove = void 0;
4
- const _1_utilities_js_1 = require("../1_utilities.js");
5
- const _2_tl_js_1 = require("../2_tl.js");
6
- function constructReplyKeyboardRemove(replyMarkup_) {
7
- return (0, _1_utilities_js_1.cleanObject)({ removeKeyboard: true, selective: replyMarkup_.selective });
8
- }
9
- exports.constructReplyKeyboardRemove = constructReplyKeyboardRemove;
10
- function replyKeyboardRemoveToTlObject(replyMarkup) {
11
- return new _2_tl_js_1.types.ReplyKeyboardHide({ selective: replyMarkup.selective || undefined });
12
- }
13
- exports.replyKeyboardRemoveToTlObject = replyKeyboardRemoveToTlObject;
@@ -1,23 +0,0 @@
1
- import { LabeledPrice } from "./0_labeled_price.js";
2
- export interface InputInvoiceMessageContent {
3
- title: string;
4
- description: string;
5
- payload: string;
6
- providerToken: string;
7
- currency: string;
8
- prices: LabeledPrice[];
9
- maxTipAmount?: number;
10
- suggestedTipAmounts?: number[];
11
- providerData?: string;
12
- photoUrl?: string;
13
- photoSize?: number;
14
- photoWidth?: number;
15
- photoHeight?: number;
16
- needName?: boolean;
17
- needPhoneNumber?: boolean;
18
- needEmail?: boolean;
19
- needShippingAAddress?: boolean;
20
- sendPhoneNumberToPorvider?: boolean;
21
- sendEmailToProvider?: boolean;
22
- isFlexible?: boolean;
23
- }
@@ -1,8 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- export interface InputTextMessageContent {
4
- messageText: string;
5
- parseMode?: ParseMode;
6
- entities?: MessageEntity[];
7
- disableWebPagePreview?: boolean;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import { InputContactMessageContent } from "./0_input_contact_message_content.js";
2
- import { InputLocationMessageContent } from "./0_input_location_message_content.js";
3
- import { InputVenuMessageContent } from "./0_input_venue_message_content.js";
4
- import { InputInvoiceMessageContent } from "./1_input_invoice_message_content.js";
5
- import { InputTextMessageContent } from "./1_input_text_message_content.js";
6
- export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenuMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- import { types } from "../2_tl.js";
2
- import { KeyboardButton } from "./1_keyboard_button.js";
3
- export interface ReplyKeyboardMarkup {
4
- keyboard: KeyboardButton[][];
5
- isPersistent?: boolean;
6
- resizeKeyboard?: boolean;
7
- oneTimeKeyboard?: boolean;
8
- inputFieldPlaceholder?: string;
9
- selective?: boolean;
10
- }
11
- export declare function constructReplyKeyboardMarkup(keyboard_: types.ReplyKeyboardMarkup): ReplyKeyboardMarkup;
12
- export declare function replyKeyboardMarkupToTlObject(replyMarkup: ReplyKeyboardMarkup): import("../tl/2_types.js").ReplyKeyboardMarkup_;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replyKeyboardMarkupToTlObject = exports.constructReplyKeyboardMarkup = void 0;
4
- const _2_tl_js_1 = require("../2_tl.js");
5
- const _1_keyboard_button_js_1 = require("./1_keyboard_button.js");
6
- function constructReplyKeyboardMarkup(keyboard_) {
7
- const rows = new Array();
8
- for (const row_ of keyboard_.rows) {
9
- const row = new Array();
10
- for (const button_ of row_.buttons) {
11
- row.push((0, _1_keyboard_button_js_1.constructKeyboardButton)(button_));
12
- }
13
- rows.push(row);
14
- }
15
- return {
16
- resizeKeyboard: keyboard_.resize || false,
17
- oneTimeKeyboard: keyboard_.single_use || false,
18
- selective: keyboard_.selective || false,
19
- isPersistent: keyboard_.persistent || false,
20
- keyboard: rows,
21
- };
22
- }
23
- exports.constructReplyKeyboardMarkup = constructReplyKeyboardMarkup;
24
- function replyKeyboardMarkupToTlObject(replyMarkup) {
25
- const rows_ = new Array();
26
- for (const row of replyMarkup.keyboard) {
27
- const row_ = new Array();
28
- for (const button of row) {
29
- row_.push((0, _1_keyboard_button_js_1.keyboardButtonToTlObject)(button));
30
- }
31
- rows_.push(new _2_tl_js_1.types.KeyboardButtonRow({ buttons: row_ }));
32
- }
33
- return new _2_tl_js_1.types.ReplyKeyboardMarkup({
34
- resize: replyMarkup.resizeKeyboard || undefined,
35
- single_use: replyMarkup.oneTimeKeyboard || undefined,
36
- selective: replyMarkup.selective || undefined,
37
- persistent: replyMarkup.isPersistent || undefined,
38
- rows: rows_,
39
- placeholder: replyMarkup.inputFieldPlaceholder,
40
- });
41
- }
42
- exports.replyKeyboardMarkupToTlObject = replyKeyboardMarkupToTlObject;
@@ -1,8 +0,0 @@
1
- import { types } from "../2_tl.js";
2
- import { UsernameResolver } from "./1__getters.js";
3
- import { InlineKeyboardButton } from "./2_inline_keyboard_button.js";
4
- export interface InlineKeyboardMarkup {
5
- inlineKeyboard: InlineKeyboardButton[][];
6
- }
7
- export declare function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): InlineKeyboardMarkup;
8
- export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: UsernameResolver): Promise<import("../tl/2_types.js").ReplyInlineMarkup_>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.inlineKeyboardMarkupToTlObject = exports.constructInlineKeyboardMarkup = void 0;
4
- const _2_tl_js_1 = require("../2_tl.js");
5
- const _2_inline_keyboard_button_js_1 = require("./2_inline_keyboard_button.js");
6
- function constructInlineKeyboardMarkup(keyboard_) {
7
- const rows = new Array();
8
- for (const row_ of keyboard_.rows) {
9
- const row = new Array();
10
- for (const button_ of row_.buttons) {
11
- row.push((0, _2_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
12
- }
13
- rows.push(row);
14
- }
15
- return { inlineKeyboard: rows };
16
- }
17
- exports.constructInlineKeyboardMarkup = constructInlineKeyboardMarkup;
18
- async function inlineKeyboardMarkupToTlObject(keyboard, usernameResolver) {
19
- const rows_ = new Array();
20
- for (const row of keyboard.inlineKeyboard) {
21
- const row_ = new Array();
22
- for (const button of row) {
23
- row_.push(await (0, _2_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
24
- }
25
- rows_.push(new _2_tl_js_1.types.KeyboardButtonRow({ buttons: row_ }));
26
- }
27
- return new _2_tl_js_1.types.ReplyInlineMarkup({ rows: rows_ });
28
- }
29
- exports.inlineKeyboardMarkupToTlObject = inlineKeyboardMarkupToTlObject;
@@ -1,15 +0,0 @@
1
- import { InputMessageContent } from "./2_input_message_content.js";
2
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
3
- export interface InlineQueryResultArticle {
4
- type: "article";
5
- id: string;
6
- title: string;
7
- inputMessageContent: InputMessageContent;
8
- replyMarkup?: InlineKeyboardMarkup;
9
- url?: string;
10
- hideUrl?: boolean;
11
- description?: string;
12
- thumbnailUrl?: string;
13
- thumbnailWidth?: string;
14
- thumbnailHeight?: string;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,17 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultAudio {
6
- type: "audio";
7
- id: string;
8
- audioUrl: string;
9
- title: string;
10
- caption?: string;
11
- parseMode?: ParseMode;
12
- captionEntities?: MessageEntity[];
13
- performer?: string;
14
- audioDuration?: number;
15
- replyMarkup?: InlineKeyboardMarkup;
16
- inputMessageContent?: InputMessageContent;
17
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedAudio {
6
- type: "audio";
7
- id: string;
8
- audioFileId: string;
9
- caption?: string;
10
- parseMode?: ParseMode;
11
- captionEntities?: MessageEntity[];
12
- replyMarkup?: InlineKeyboardMarkup;
13
- inputMessageContent?: InputMessageContent;
14
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedDocument {
6
- type: "document";
7
- id: string;
8
- documentFileId: string;
9
- description?: string;
10
- caption?: string;
11
- parseMode?: ParseMode;
12
- captionEntities?: MessageEntity[];
13
- replyMarkup?: InlineKeyboardMarkup;
14
- inputMessageContent?: InputMessageContent;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedGif {
6
- type: "gif";
7
- id: string;
8
- gifFileId: string;
9
- title?: string;
10
- caption?: string;
11
- parseMode?: ParseMode;
12
- captionEntities?: MessageEntity[];
13
- replyMarkup?: InlineKeyboardMarkup;
14
- inputMessageContent?: InputMessageContent;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedMpeg4Gif {
6
- type: "mpeg4_gif";
7
- id: string;
8
- mpeg4FileId: string;
9
- title?: string;
10
- caption?: string;
11
- parseMode?: ParseMode;
12
- captionEntities?: MessageEntity[];
13
- replyMarkup?: InlineKeyboardMarkup;
14
- inputMessageContent?: InputMessageContent;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedPhoto {
6
- type: "photo";
7
- id: string;
8
- photoFileId: string;
9
- title?: string;
10
- description?: string;
11
- caption?: string;
12
- parseMode?: ParseMode;
13
- captionEntities?: MessageEntity[];
14
- replyMarkup?: InlineKeyboardMarkup;
15
- inputMessageContent?: InputMessageContent;
16
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { InputMessageContent } from "./2_input_message_content.js";
2
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
3
- export interface InlineQueryResultCachedSticker {
4
- type: "sticker";
5
- id: string;
6
- stickerFileId: string;
7
- replyMarkup?: InlineKeyboardMarkup;
8
- inputMessageContent?: InputMessageContent;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedVideo {
6
- type: "video";
7
- id: string;
8
- videoFileId: string;
9
- title: string;
10
- description?: string;
11
- caption?: string;
12
- parseMode?: ParseMode;
13
- captionEntities?: MessageEntity[];
14
- replyMarkup?: InlineKeyboardMarkup;
15
- inputMessageContent?: InputMessageContent;
16
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultCachedVoice {
6
- type: "voice";
7
- id: string;
8
- voiceFileId: string;
9
- title: string;
10
- caption?: string;
11
- parseMode?: ParseMode;
12
- captionEntities?: MessageEntity[];
13
- replyMarkup?: InlineKeyboardMarkup;
14
- inputMessageContent?: InputMessageContent;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { InputMessageContent } from "./2_input_message_content.js";
2
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
3
- export interface InlineQueryResultContact {
4
- type: "game";
5
- id: string;
6
- phoneNumber: string;
7
- firstName: string;
8
- lastName?: string;
9
- vcard?: string;
10
- replyMarkup?: InlineKeyboardMarkup;
11
- inputMessageContent?: InputMessageContent;
12
- thumbnailUrl?: string;
13
- thumbnailWidth?: string;
14
- thumbnailHeight?: string;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultDocument {
6
- type: "document";
7
- id: string;
8
- documentUrl: string;
9
- title: string;
10
- caption?: string;
11
- parseMode?: ParseMode;
12
- captionEntities?: MessageEntity[];
13
- replyMarkup?: InlineKeyboardMarkup;
14
- inputMessageContent?: InputMessageContent;
15
- thumbnailUrl?: string;
16
- thumbnailWidth?: string;
17
- thumbnailHeight?: string;
18
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
2
- export interface InlineQueryResultGame {
3
- type: "game";
4
- id: string;
5
- gameShortName: string;
6
- replyMarkup?: InlineKeyboardMarkup;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,20 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultGif {
6
- type: "gif";
7
- id: string;
8
- gifUrl: string;
9
- gifWidth?: number;
10
- gifHeight?: number;
11
- gifDuration?: number;
12
- thumbnailUrl?: string;
13
- thumbnailMimeType?: string;
14
- title?: string;
15
- caption?: string;
16
- parseMode?: ParseMode;
17
- captionEntities?: MessageEntity[];
18
- replyMarkup?: InlineKeyboardMarkup;
19
- inputMessageContent?: InputMessageContent;
20
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +0,0 @@
1
- import { InputMessageContent } from "./2_input_message_content.js";
2
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
3
- export interface InlineQueryResultLocation {
4
- type: "location";
5
- id: string;
6
- latitude: number;
7
- longitude: number;
8
- title: string;
9
- horizontalAccuracy?: number;
10
- livePeriod?: number;
11
- heading?: number;
12
- proximityAlertRadius?: number;
13
- replyMarkup?: InlineKeyboardMarkup;
14
- inputMessageContent?: InputMessageContent;
15
- thumbnailUrl?: string;
16
- thumbnailWidth?: string;
17
- thumbnailHeight?: string;
18
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,20 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultMpeg4Gif {
6
- type: "mpeg4_gif";
7
- id: string;
8
- mpeg4Url: string;
9
- mpeg4Width?: number;
10
- mpeg4Height?: number;
11
- mpeg4Duration?: number;
12
- thumbnailUrl?: string;
13
- thumbnailMimeType?: string;
14
- title?: string;
15
- caption?: string;
16
- parseMode?: ParseMode;
17
- captionEntities?: MessageEntity[];
18
- replyMarkup?: InlineKeyboardMarkup;
19
- inputMessageContent?: InputMessageContent;
20
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +0,0 @@
1
- import { MessageEntity } from "./0_message_entity.js";
2
- import { ParseMode } from "./0_parse_mode.js";
3
- import { InputMessageContent } from "./2_input_message_content.js";
4
- import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
5
- export interface InlineQueryResultPhoto {
6
- type: "photo";
7
- id: string;
8
- photoUrl: string;
9
- thumbnailUrl: string;
10
- photoWidth?: number;
11
- photoHeight?: number;
12
- title?: string;
13
- description?: string;
14
- caption?: string;
15
- parseMode?: ParseMode;
16
- captionEntities?: MessageEntity[];
17
- replyMarkup?: InlineKeyboardMarkup;
18
- inputMessageContent?: InputMessageContent;
19
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });