@mtkruto/node 0.0.998 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/esm/0_deps.d.ts +1 -1
  2. package/esm/0_deps.js +1 -1
  3. package/esm/3_errors.d.ts +1531 -0
  4. package/esm/3_errors.js +1531 -0
  5. package/esm/3_types.d.ts +39 -3
  6. package/esm/3_types.js +39 -3
  7. package/esm/4_constants.d.ts +1 -1
  8. package/esm/4_constants.js +1 -1
  9. package/esm/4_errors.d.ts +25 -0
  10. package/esm/4_errors.js +64 -0
  11. package/esm/client/2_client_plain.js +1 -1
  12. package/esm/client/3_types.d.ts +1 -5
  13. package/esm/client/4_client.d.ts +20 -3
  14. package/esm/client/4_client.js +61 -62
  15. package/esm/connection/1_connection_web_socket.js +2 -1
  16. package/esm/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.d.ts +2 -2
  17. package/esm/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.js +19 -6
  18. package/esm/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.d.ts +2 -0
  19. package/esm/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +991 -0
  20. package/esm/mod.d.ts +3 -2
  21. package/esm/mod.js +3 -2
  22. package/esm/tl/2_types.d.ts +1 -1
  23. package/esm/tl/2_types.js +1 -2
  24. package/esm/tl/3_functions.d.ts +1 -1
  25. package/esm/tl/3_functions.js +1 -2
  26. package/esm/types/{!0_file_id.js → 0__file_id.js} +0 -1
  27. package/esm/types/0_bot_command.d.ts +4 -0
  28. package/esm/types/0_chat_id.d.ts +4 -0
  29. package/esm/types/0_chat_id.js +1 -0
  30. package/esm/types/0_chat_photo.js +1 -1
  31. package/esm/types/0_input_contact_message_content.d.ts +6 -0
  32. package/esm/types/0_input_contact_message_content.js +1 -0
  33. package/esm/types/0_input_location_message_content.d.ts +8 -0
  34. package/esm/types/0_input_location_message_content.js +1 -0
  35. package/esm/types/0_input_venue_message_content.d.ts +10 -0
  36. package/esm/types/0_input_venue_message_content.js +1 -0
  37. package/esm/types/0_labeled_price.d.ts +4 -0
  38. package/esm/types/0_labeled_price.js +1 -0
  39. package/esm/types/0_parse_mode.d.ts +1 -0
  40. package/esm/types/0_parse_mode.js +1 -0
  41. package/esm/types/0_thumbnail.js +1 -1
  42. package/esm/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
  43. package/esm/types/1__getters.js +1 -0
  44. package/esm/types/1_bot_command_scope.d.ts +32 -0
  45. package/esm/types/1_bot_command_scope.js +27 -0
  46. package/esm/types/1_chat.d.ts +1 -1
  47. package/esm/types/1_chat.js +1 -1
  48. package/esm/types/1_inline_query_result_button.d.ts +6 -0
  49. package/esm/types/1_inline_query_result_button.js +1 -0
  50. package/esm/types/1_input_invoice_message_content.d.ts +23 -0
  51. package/esm/types/1_input_invoice_message_content.js +1 -0
  52. package/esm/types/1_input_text_message_content.d.ts +8 -0
  53. package/esm/types/1_input_text_message_content.js +1 -0
  54. package/esm/types/1_photo.js +1 -1
  55. package/esm/types/1_sticker.d.ts +1 -1
  56. package/esm/types/1_sticker.js +1 -1
  57. package/esm/types/1_user.d.ts +1 -1
  58. package/esm/types/1_user.js +1 -1
  59. package/esm/types/2_game.js +1 -1
  60. package/{script/types/1_inline_keyboard_button.d.ts → esm/types/2_inline_keyboard_button.d.ts} +3 -3
  61. package/esm/types/2_inline_query.d.ts +1 -1
  62. package/esm/types/2_input_message_content.d.ts +6 -0
  63. package/esm/types/2_input_message_content.js +1 -0
  64. package/esm/types/{2_inline_keyboard_markup.d.ts → 3_inline_keyboard_markup.d.ts} +3 -2
  65. package/esm/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +1 -1
  66. package/esm/types/3_message.d.ts +13 -13
  67. package/esm/types/3_message.js +13 -13
  68. package/esm/types/4_callback_query.d.ts +1 -1
  69. package/esm/types/4_inline_query_result_article.d.ts +15 -0
  70. package/esm/types/4_inline_query_result_article.js +1 -0
  71. package/esm/types/4_inline_query_result_audio.d.ts +17 -0
  72. package/esm/types/4_inline_query_result_audio.js +1 -0
  73. package/esm/types/4_inline_query_result_cached_audio.d.ts +14 -0
  74. package/esm/types/4_inline_query_result_cached_audio.js +1 -0
  75. package/esm/types/4_inline_query_result_cached_document.d.ts +15 -0
  76. package/esm/types/4_inline_query_result_cached_document.js +1 -0
  77. package/esm/types/4_inline_query_result_cached_gif.d.ts +15 -0
  78. package/esm/types/4_inline_query_result_cached_gif.js +1 -0
  79. package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
  80. package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +1 -0
  81. package/esm/types/4_inline_query_result_cached_photo.d.ts +16 -0
  82. package/esm/types/4_inline_query_result_cached_photo.js +1 -0
  83. package/esm/types/4_inline_query_result_cached_sticker.d.ts +9 -0
  84. package/esm/types/4_inline_query_result_cached_sticker.js +1 -0
  85. package/esm/types/4_inline_query_result_cached_video.d.ts +16 -0
  86. package/esm/types/4_inline_query_result_cached_video.js +1 -0
  87. package/esm/types/4_inline_query_result_cached_voice.d.ts +15 -0
  88. package/esm/types/4_inline_query_result_cached_voice.js +1 -0
  89. package/esm/types/4_inline_query_result_contact.d.ts +15 -0
  90. package/esm/types/4_inline_query_result_contact.js +1 -0
  91. package/esm/types/4_inline_query_result_document.d.ts +18 -0
  92. package/esm/types/4_inline_query_result_document.js +1 -0
  93. package/esm/types/4_inline_query_result_game.d.ts +7 -0
  94. package/esm/types/4_inline_query_result_game.js +1 -0
  95. package/esm/types/4_inline_query_result_gif.d.ts +20 -0
  96. package/esm/types/4_inline_query_result_gif.js +1 -0
  97. package/esm/types/4_inline_query_result_location.d.ts +18 -0
  98. package/esm/types/4_inline_query_result_location.js +1 -0
  99. package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
  100. package/esm/types/4_inline_query_result_mpeg4_gif.js +1 -0
  101. package/esm/types/4_inline_query_result_photo.d.ts +19 -0
  102. package/esm/types/4_inline_query_result_photo.js +1 -0
  103. package/esm/types/4_inline_query_result_venue.d.ts +19 -0
  104. package/esm/types/4_inline_query_result_venue.js +1 -0
  105. package/esm/types/4_inline_query_result_video.d.ts +21 -0
  106. package/esm/types/4_inline_query_result_video.js +1 -0
  107. package/esm/types/4_inline_query_result_voice.d.ts +16 -0
  108. package/esm/types/4_inline_query_result_voice.js +1 -0
  109. package/esm/types/4_reply_markup.d.ts +7 -0
  110. package/esm/types/4_reply_markup.js +22 -0
  111. package/esm/types/5_inline_query_result.d.ts +29 -0
  112. package/esm/types/5_inline_query_result.js +256 -0
  113. package/esm/utilities/0_crypto.js +6 -4
  114. package/package.json +1 -1
  115. package/script/0_deps.d.ts +1 -1
  116. package/script/0_deps.js +1 -1
  117. package/script/3_errors.d.ts +1531 -0
  118. package/script/3_errors.js +2053 -0
  119. package/script/3_types.d.ts +39 -3
  120. package/script/3_types.js +39 -3
  121. package/script/4_constants.d.ts +1 -1
  122. package/script/4_constants.js +1 -1
  123. package/script/4_errors.d.ts +25 -0
  124. package/script/4_errors.js +88 -0
  125. package/script/client/2_client_plain.js +1 -1
  126. package/script/client/3_types.d.ts +1 -5
  127. package/script/client/4_client.d.ts +20 -3
  128. package/script/client/4_client.js +60 -61
  129. package/script/connection/1_connection_web_socket.js +2 -1
  130. package/script/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.d.ts +2 -2
  131. package/script/deps/deno.land/x/{tgcrypto@0.1.3 → tgcrypto@0.2.1}/mod.js +19 -6
  132. package/script/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.d.ts +2 -0
  133. package/script/deps/deno.land/x/tgcrypto@0.2.1/tgcrypto.js +993 -0
  134. package/script/mod.d.ts +3 -2
  135. package/script/mod.js +16 -3
  136. package/script/tl/2_types.d.ts +1 -1
  137. package/script/tl/2_types.js +0 -1
  138. package/script/tl/3_functions.d.ts +1 -1
  139. package/script/tl/3_functions.js +0 -1
  140. package/script/types/{!0_file_id.js → 0__file_id.js} +0 -1
  141. package/script/types/0_bot_command.d.ts +4 -0
  142. package/script/types/0_chat_id.d.ts +4 -0
  143. package/script/types/0_chat_id.js +2 -0
  144. package/script/types/0_chat_photo.js +7 -7
  145. package/script/types/0_input_contact_message_content.d.ts +6 -0
  146. package/script/types/0_input_contact_message_content.js +2 -0
  147. package/script/types/0_input_location_message_content.d.ts +8 -0
  148. package/script/types/0_input_location_message_content.js +2 -0
  149. package/script/types/0_input_venue_message_content.d.ts +10 -0
  150. package/script/types/0_input_venue_message_content.js +2 -0
  151. package/script/types/0_labeled_price.d.ts +4 -0
  152. package/script/types/0_labeled_price.js +2 -0
  153. package/script/types/0_parse_mode.d.ts +1 -0
  154. package/script/types/0_parse_mode.js +2 -0
  155. package/script/types/0_thumbnail.js +5 -5
  156. package/script/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
  157. package/script/types/1__getters.js +2 -0
  158. package/script/types/1_bot_command_scope.d.ts +32 -0
  159. package/script/types/1_bot_command_scope.js +31 -0
  160. package/script/types/1_chat.d.ts +1 -1
  161. package/script/types/1_chat.js +1 -1
  162. package/script/types/1_inline_query_result_button.d.ts +6 -0
  163. package/script/types/1_inline_query_result_button.js +2 -0
  164. package/script/types/1_input_invoice_message_content.d.ts +23 -0
  165. package/script/types/1_input_invoice_message_content.js +2 -0
  166. package/script/types/1_input_text_message_content.d.ts +8 -0
  167. package/script/types/1_input_text_message_content.js +2 -0
  168. package/script/types/1_photo.js +5 -5
  169. package/script/types/1_sticker.d.ts +1 -1
  170. package/script/types/1_sticker.js +1 -1
  171. package/script/types/1_user.d.ts +1 -1
  172. package/script/types/1_user.js +1 -1
  173. package/script/types/2_game.js +3 -3
  174. package/{esm/types/1_inline_keyboard_button.d.ts → script/types/2_inline_keyboard_button.d.ts} +3 -3
  175. package/script/types/2_inline_query.d.ts +1 -1
  176. package/script/types/2_input_message_content.d.ts +6 -0
  177. package/script/types/2_input_message_content.js +2 -0
  178. package/script/types/{2_inline_keyboard_markup.d.ts → 3_inline_keyboard_markup.d.ts} +3 -2
  179. package/script/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +3 -3
  180. package/script/types/3_message.d.ts +13 -13
  181. package/script/types/3_message.js +23 -23
  182. package/script/types/4_callback_query.d.ts +1 -1
  183. package/script/types/4_inline_query_result_article.d.ts +15 -0
  184. package/script/types/4_inline_query_result_article.js +2 -0
  185. package/script/types/4_inline_query_result_audio.d.ts +17 -0
  186. package/script/types/4_inline_query_result_audio.js +2 -0
  187. package/script/types/4_inline_query_result_cached_audio.d.ts +14 -0
  188. package/script/types/4_inline_query_result_cached_audio.js +2 -0
  189. package/script/types/4_inline_query_result_cached_document.d.ts +15 -0
  190. package/script/types/4_inline_query_result_cached_document.js +2 -0
  191. package/script/types/4_inline_query_result_cached_gif.d.ts +15 -0
  192. package/script/types/4_inline_query_result_cached_gif.js +2 -0
  193. package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
  194. package/script/types/4_inline_query_result_cached_mpeg4_gif.js +2 -0
  195. package/script/types/4_inline_query_result_cached_photo.d.ts +16 -0
  196. package/script/types/4_inline_query_result_cached_photo.js +2 -0
  197. package/script/types/4_inline_query_result_cached_sticker.d.ts +9 -0
  198. package/script/types/4_inline_query_result_cached_sticker.js +2 -0
  199. package/script/types/4_inline_query_result_cached_video.d.ts +16 -0
  200. package/script/types/4_inline_query_result_cached_video.js +2 -0
  201. package/script/types/4_inline_query_result_cached_voice.d.ts +15 -0
  202. package/script/types/4_inline_query_result_cached_voice.js +2 -0
  203. package/script/types/4_inline_query_result_contact.d.ts +15 -0
  204. package/script/types/4_inline_query_result_contact.js +2 -0
  205. package/script/types/4_inline_query_result_document.d.ts +18 -0
  206. package/script/types/4_inline_query_result_document.js +2 -0
  207. package/script/types/4_inline_query_result_game.d.ts +7 -0
  208. package/script/types/4_inline_query_result_game.js +2 -0
  209. package/script/types/4_inline_query_result_gif.d.ts +20 -0
  210. package/script/types/4_inline_query_result_gif.js +2 -0
  211. package/script/types/4_inline_query_result_location.d.ts +18 -0
  212. package/script/types/4_inline_query_result_location.js +2 -0
  213. package/script/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
  214. package/script/types/4_inline_query_result_mpeg4_gif.js +2 -0
  215. package/script/types/4_inline_query_result_photo.d.ts +19 -0
  216. package/script/types/4_inline_query_result_photo.js +2 -0
  217. package/script/types/4_inline_query_result_venue.d.ts +19 -0
  218. package/script/types/4_inline_query_result_venue.js +2 -0
  219. package/script/types/4_inline_query_result_video.d.ts +21 -0
  220. package/script/types/4_inline_query_result_video.js +2 -0
  221. package/script/types/4_inline_query_result_voice.d.ts +16 -0
  222. package/script/types/4_inline_query_result_voice.js +2 -0
  223. package/script/types/4_reply_markup.d.ts +7 -0
  224. package/script/types/4_reply_markup.js +26 -0
  225. package/script/types/5_inline_query_result.d.ts +29 -0
  226. package/script/types/5_inline_query_result.js +260 -0
  227. package/script/utilities/0_crypto.js +6 -4
  228. package/esm/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -2
  229. package/esm/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.js +0 -1078
  230. package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -2
  231. package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.js +0 -1080
  232. /package/esm/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
  233. /package/esm/types/{!0_misc.js → 0_bot_command.js} +0 -0
  234. /package/esm/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
  235. /package/script/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
  236. /package/script/types/{!0_misc.js → 0_bot_command.js} +0 -0
  237. /package/script/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
package/script/mod.d.ts CHANGED
@@ -4,10 +4,11 @@ export declare const utils: {
4
4
  checkPassword: typeof checkPassword;
5
5
  getRandomId: typeof getRandomId;
6
6
  };
7
- export * from "./2_tl.js";
8
7
  export * from "./2_connection.js";
9
8
  export * from "./3_storage.js";
10
9
  export * from "./3_transport.js";
10
+ export * from "./2_tl.js";
11
+ export * from "./3_types.js";
11
12
  export { APP_VERSION, DEVICE_MODEL, INITIAL_DC, LANG_CODE, LANG_PACK, LAYER, SYSTEM_LANG_CODE, SYSTEM_VERSION } from "./4_constants.js";
13
+ export * as errors from "./4_errors.js";
12
14
  export * from "./5_client.js";
13
- export * from "./3_types.js";
package/script/mod.js CHANGED
@@ -10,18 +10,31 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
13
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
20
  };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
16
28
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.utils = void 0;
29
+ exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.utils = void 0;
18
30
  const _1_utilities_js_1 = require("./1_utilities.js");
19
31
  const _0_password_js_1 = require("./client/0_password.js");
20
32
  exports.utils = { checkPassword: _0_password_js_1.checkPassword, getRandomId: _1_utilities_js_1.getRandomId };
21
- __exportStar(require("./2_tl.js"), exports);
22
33
  __exportStar(require("./2_connection.js"), exports);
23
34
  __exportStar(require("./3_storage.js"), exports);
24
35
  __exportStar(require("./3_transport.js"), exports);
36
+ __exportStar(require("./2_tl.js"), exports);
37
+ __exportStar(require("./3_types.js"), exports);
25
38
  var _4_constants_js_1 = require("./4_constants.js");
26
39
  Object.defineProperty(exports, "APP_VERSION", { enumerable: true, get: function () { return _4_constants_js_1.APP_VERSION; } });
27
40
  Object.defineProperty(exports, "DEVICE_MODEL", { enumerable: true, get: function () { return _4_constants_js_1.DEVICE_MODEL; } });
@@ -31,5 +44,5 @@ Object.defineProperty(exports, "LANG_PACK", { enumerable: true, get: function ()
31
44
  Object.defineProperty(exports, "LAYER", { enumerable: true, get: function () { return _4_constants_js_1.LAYER; } });
32
45
  Object.defineProperty(exports, "SYSTEM_LANG_CODE", { enumerable: true, get: function () { return _4_constants_js_1.SYSTEM_LANG_CODE; } });
33
46
  Object.defineProperty(exports, "SYSTEM_VERSION", { enumerable: true, get: function () { return _4_constants_js_1.SYSTEM_VERSION; } });
47
+ exports.errors = __importStar(require("./4_errors.js"));
34
48
  __exportStar(require("./5_client.js"), exports);
35
- __exportStar(require("./3_types.js"), exports);
@@ -1,4 +1,4 @@
1
- import { id, params, TLObject, Params, TLObjectConstructor, ParamDesc, paramDesc } from "./1_tl_object.js";
1
+ import { id, ParamDesc, paramDesc, Params, params, TLObject, TLObjectConstructor } from "./1_tl_object.js";
2
2
  export declare abstract class Type extends TLObject {
3
3
  }
4
4
  export declare abstract class TypeX extends Type {
@@ -33,7 +33,6 @@ exports.AttachMenuBotIcon = exports.AttachMenuBotIconColor = exports.PhoneGroupC
33
33
  exports.EmailVerificationGoogle = exports.EmailVerificationCode = exports.EmailVerifyPurposePassport = exports.EmailVerifyPurposeLoginChange = exports.EmailVerifyPurposeLoginSetup = exports.MessagesReactions = exports.MessagesReactionsNotModified = exports.ChatReactionsSome = exports.ChatReactionsAll = exports.ChatReactionsNone = exports.ReactionCustomEmoji = exports.ReactionEmoji = exports.ReactionEmpty = exports.AccountEmojiStatuses = exports.AccountEmojiStatusesNotModified = exports.EmojiStatusUntil = exports.EmojiStatus = exports.EmojiStatusEmpty = exports.PaymentFormMethod = exports.PremiumGiftOption = exports.InputStorePaymentGiftPremium = exports.InputStorePaymentPremiumSubscription = exports.HelpPremiumPromo = exports.MessagesTranscribedAudio = exports.PaymentsExportedInvoice = exports.InputInvoiceSlug = exports.InputInvoiceMessage = exports.AttachMenuPeerTypeBroadcast = exports.AttachMenuPeerTypeChat = exports.AttachMenuPeerTypePM = exports.AttachMenuPeerTypeBotPM = exports.AttachMenuPeerTypeSameBotPM = exports.AccountSavedRingtoneConverted = exports.AccountSavedRingtone = exports.NotificationSoundRingtone = exports.NotificationSoundLocal = exports.NotificationSoundNone = exports.NotificationSoundDefault = exports.AccountSavedRingtones = exports.AccountSavedRingtonesNotModified = exports.BotMenuButton = exports.BotMenuButtonCommands = exports.BotMenuButtonDefault = exports.WebViewMessageSent = exports.SimpleWebViewResultURL = exports.WebViewResultURL = exports.AttachMenuBotsBot = exports.AttachMenuBots = exports.AttachMenuBotsNotModified = exports.AttachMenuBot = void 0;
34
34
  exports.StoryViews = exports.SponsoredWebPage = exports.MessagePeerVoteMultiple = exports.MessagePeerVoteInputOption = exports.MessagePeerVote = exports.BotsBotInfo = exports.ChatlistsChatlistUpdates = exports.ChatlistsChatlistInvite = exports.ChatlistsChatlistInviteAlready = exports.ChatlistsExportedInvites = exports.ChatlistsExportedChatlistInvite = exports.ExportedChatlistInvite = exports.InputChatlistDialogFilter = exports.ReadParticipantDate = exports.InlineBotWebView = exports.AppWebViewResultURL = exports.MessagesBotApp = exports.BotApp = exports.BotAppNotModified = exports.InputBotAppShortName = exports.InputBotAppID = exports.HelpAppConfig = exports.HelpAppConfigNotModified = exports.AccountAutoSaveSettings = exports.AutoSaveException = exports.AutoSaveSettings = exports.MessagesTranslateResult = exports.TextWithEntities = exports.MessagesEmojiGroups = exports.MessagesEmojiGroupsNotModified = exports.EmojiGroup = exports.EmojiList = exports.EmojiListNotModified = exports.RequestPeerTypeBroadcast = exports.RequestPeerTypeChat = exports.RequestPeerTypeUser = exports.ExportedContactToken = exports.DefaultHistoryTTL = exports.MessagesForumTopics = exports.ForumTopic = exports.ForumTopicDeleted = exports.Username = exports.StickerKeyword = exports.MessageExtendedMedia = exports.MessageExtendedMediaPreview = exports.SendAsPeer = exports.PremiumSubscriptionOption = exports.AccountEmailVerifiedLogin = exports.AccountEmailVerified = exports.EmailVerificationApple = void 0;
35
35
  exports.map = exports.MediaAreaGeoPoint = exports.InputMediaAreaVenue = exports.MediaAreaVenue = exports.MediaAreaCoordinates = exports.StoriesStealthMode = exports.ExportedStoryLink = exports.InputReplyToStory = exports.InputReplyToMessage = exports.StoriesStoryViews = exports.StoriesStoryViewsList = exports.StoryView = exports.StoriesUserStories = exports.StoriesStories = exports.StoriesAllStories = exports.StoriesAllStoriesNotModified = exports.UserStories = exports.StoryItem = exports.StoryItemSkipped = exports.StoryItemDeleted = void 0;
36
- // deno-fmt-ignore-file
37
36
  const _1_tl_object_js_1 = require("./1_tl_object.js");
38
37
  class Type extends _1_tl_object_js_1.TLObject {
39
38
  }
@@ -1,4 +1,4 @@
1
- import { id, params, TLObject, Params, paramDesc, ParamDesc } from "./1_tl_object.js";
1
+ import { id, ParamDesc, paramDesc, Params, params, TLObject } from "./1_tl_object.js";
2
2
  import * as types from "./2_types.js";
3
3
  export declare abstract class Function<T> extends TLObject {
4
4
  __R: T;
@@ -34,7 +34,6 @@ exports.ChannelsInviteToChannel = exports.ChannelsLeaveChannel = exports.Channel
34
34
  exports.BotsGetBotInfo = exports.BotsSetBotInfo = exports.BotsSetBotGroupDefaultAdminRights = exports.BotsSetBotBroadcastDefaultAdminRights = exports.BotsGetBotMenuButton = exports.BotsSetBotMenuButton = exports.BotsGetBotCommands = exports.BotsResetBotCommands = exports.BotsSetBotCommands = exports.BotsAnswerWebhookJSONQuery = exports.BotsSendCustomRequest = exports.ChannelsClickSponsoredMessage = exports.ChannelsToggleParticipantsHidden = exports.ChannelsReportAntiSpamFalsePositive = exports.ChannelsToggleAntiSpam = exports.ChannelsReorderPinnedForumTopics = exports.ChannelsDeleteTopicHistory = exports.ChannelsUpdatePinnedForumTopic = exports.ChannelsEditForumTopic = exports.ChannelsGetForumTopicsByID = exports.ChannelsGetForumTopics = exports.ChannelsCreateForumTopic = exports.ChannelsToggleForum = exports.ChannelsDeactivateAllUsernames = exports.ChannelsToggleUsername = exports.ChannelsReorderUsernames = exports.ChannelsToggleJoinRequest = exports.ChannelsToggleJoinToSend = exports.ChannelsDeleteParticipantHistory = exports.ChannelsGetSendAs = exports.ChannelsGetSponsoredMessages = exports.ChannelsViewSponsoredMessage = exports.ChannelsConvertToGigagroup = exports.ChannelsGetInactiveChannels = exports.ChannelsToggleSlowMode = exports.ChannelsEditLocation = exports.ChannelsEditCreator = exports.ChannelsSetDiscussionGroup = exports.ChannelsGetGroupsForDiscussion = exports.ChannelsGetLeftChannels = exports.ChannelsTogglePreHistoryHidden = exports.ChannelsDeleteHistory = exports.ChannelsReadMessageContents = exports.ChannelsSetStickers = exports.ChannelsGetAdminLog = exports.ChannelsEditBanned = exports.ChannelsGetAdminedPublicChannels = exports.ChannelsToggleSignatures = exports.ChannelsExportMessageLink = exports.ChannelsDeleteChannel = void 0;
35
35
  exports.PhoneJoinGroupCallPresentation = exports.PhoneSaveDefaultGroupCallJoinAs = exports.PhoneStartScheduledGroupCall = exports.PhoneToggleGroupCallStartSubscription = exports.PhoneExportGroupCallInvite = exports.PhoneGetGroupCallJoinAs = exports.PhoneEditGroupCallTitle = exports.PhoneEditGroupCallParticipant = exports.PhoneToggleGroupCallRecord = exports.PhoneCheckGroupCall = exports.PhoneGetGroupParticipants = exports.PhoneGetGroupCall = exports.PhoneToggleGroupCallSettings = exports.PhoneDiscardGroupCall = exports.PhoneInviteToGroupCall = exports.PhoneLeaveGroupCall = exports.PhoneJoinGroupCall = exports.PhoneCreateGroupCall = exports.PhoneSendSignalingData = exports.PhoneSaveCallDebug = exports.PhoneSetCallRating = exports.PhoneDiscardCall = exports.PhoneReceivedCall = exports.PhoneConfirmCall = exports.PhoneAcceptCall = exports.PhoneRequestCall = exports.PhoneGetCallConfig = exports.StickersDeleteStickerSet = exports.StickersRenameStickerSet = exports.StickersChangeSticker = exports.StickersSuggestShortName = exports.StickersCheckShortName = exports.StickersSetStickerSetThumb = exports.StickersAddStickerToSet = exports.StickersChangeStickerPosition = exports.StickersRemoveStickerFromSet = exports.StickersCreateStickerSet = exports.PaymentsCanPurchasePremium = exports.PaymentsAssignPlayMarketTransaction = exports.PaymentsAssignAppStoreTransaction = exports.PaymentsExportInvoice = exports.PaymentsGetBankCardData = exports.PaymentsClearSavedInfo = exports.PaymentsGetSavedInfo = exports.PaymentsSendPaymentForm = exports.PaymentsValidateRequestedInfo = exports.PaymentsGetPaymentReceipt = exports.PaymentsGetPaymentForm = exports.BotsToggleUsername = exports.BotsReorderUsernames = void 0;
36
36
  exports.StoriesSendReaction = exports.StoriesActivateStealthMode = exports.StoriesReport = exports.StoriesExportStoryLink = exports.StoriesGetStoriesViews = exports.StoriesGetStoryViewsList = exports.StoriesIncrementStoryViews = exports.StoriesReadStories = exports.StoriesGetAllReadUserStories = exports.StoriesToggleAllStoriesHidden = exports.StoriesGetStoriesByID = exports.StoriesGetStoriesArchive = exports.StoriesGetPinnedStories = exports.StoriesGetUserStories = exports.StoriesGetAllStories = exports.StoriesTogglePinned = exports.StoriesDeleteStories = exports.StoriesEditStory = exports.StoriesSendStory = exports.ChatlistsLeaveChatlist = exports.ChatlistsGetLeaveChatlistSuggestions = exports.ChatlistsHideChatlistUpdates = exports.ChatlistsJoinChatlistUpdates = exports.ChatlistsGetChatlistUpdates = exports.ChatlistsJoinChatlistInvite = exports.ChatlistsCheckChatlistInvite = exports.ChatlistsGetExportedInvites = exports.ChatlistsEditExportedInvite = exports.ChatlistsDeleteExportedInvite = exports.ChatlistsExportChatlistInvite = exports.StatsGetMessageStats = exports.StatsGetMessagePublicForwards = exports.StatsGetMegagroupStats = exports.StatsLoadAsyncGraph = exports.StatsGetBroadcastStats = exports.FoldersEditPeerFolders = exports.LangpackGetLanguage = exports.LangpackGetLanguages = exports.LangpackGetDifference = exports.LangpackGetStrings = exports.LangpackGetLangPack = exports.PhoneSaveCallLog = exports.PhoneGetGroupCallStreamRtmpURL = exports.PhoneGetGroupCallStreamChannels = exports.PhoneLeaveGroupCallPresentation = void 0;
37
- // deno-fmt-ignore-file
38
37
  const _1_tl_object_js_1 = require("./1_tl_object.js");
39
38
  const types = __importStar(require("./2_types.js"));
40
39
  class Function extends _1_tl_object_js_1.TLObject {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FileUniqueID = exports.FileUniqueType = exports.FileID = exports.ThumbnailSource = exports.FileType = void 0;
4
- // Direct port from Pyrogram
5
4
  const _1_utilities_js_1 = require("../1_utilities.js");
6
5
  const _2_tl_js_1 = require("../2_tl.js");
7
6
  var FileType;
@@ -0,0 +1,4 @@
1
+ export interface BotCommand {
2
+ command: string;
3
+ description: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A chat identifier as provided by MTKruto or a string starting with a @ that is followed by a username.
3
+ */
4
+ export type ChatID = number | string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,28 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructChatPhoto = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _0_file_id_js_1 = require("./!0_file_id.js");
5
+ const _0__file_id_js_1 = require("./0__file_id.js");
6
6
  function constructChatPhoto(photo, chatId, chatAccessHash) {
7
- const smallFileId = new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.ChatPhoto, photo.dcId, {
7
+ const smallFileId = new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.ChatPhoto, photo.dcId, {
8
8
  mediaId: photo.photoId,
9
- thumbnailSource: _0_file_id_js_1.ThumbnailSource.ChatPhotoSmall,
9
+ thumbnailSource: _0__file_id_js_1.ThumbnailSource.ChatPhotoSmall,
10
10
  chatId,
11
11
  chatAccessHash,
12
12
  accessHash: 0n,
13
13
  volumeId: 0n,
14
14
  localId: 0,
15
15
  }).encode();
16
- const smallFileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
17
- const bigFileId = new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.ChatPhoto, photo.dcId, {
16
+ const smallFileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
17
+ const bigFileId = new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.ChatPhoto, photo.dcId, {
18
18
  mediaId: photo.photoId,
19
- thumbnailSource: _0_file_id_js_1.ThumbnailSource.ChatPhotoBig,
19
+ thumbnailSource: _0__file_id_js_1.ThumbnailSource.ChatPhotoBig,
20
20
  chatId,
21
21
  chatAccessHash,
22
22
  accessHash: 0n,
23
23
  volumeId: 0n,
24
24
  localId: 0,
25
25
  }).encode();
26
- const bigFileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
26
+ const bigFileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.photoId }).encode();
27
27
  if (photo instanceof _2_tl_js_1.types.ChatPhoto) {
28
28
  return {
29
29
  smallFileId,
@@ -0,0 +1,6 @@
1
+ export interface InputContactMessageContent {
2
+ phoneNumber: string;
3
+ firstName: string;
4
+ lastName?: string;
5
+ vcard?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface InputLocationMessageContent {
2
+ latitude: number;
3
+ longitude: number;
4
+ horizontalAccuracy?: number;
5
+ livePeriod?: number;
6
+ heading?: number;
7
+ proximityAlertRadius?: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface InputVenuMessageContent {
2
+ latitude: number;
3
+ loingitude: number;
4
+ title: string;
5
+ address: string;
6
+ foursquareId?: string;
7
+ foursquareType?: string;
8
+ googlePlaceId?: string;
9
+ googlePlaceType?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface LabeledPrice {
2
+ label: string;
3
+ amount: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type ParseMode = "HTML" | null;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,20 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructThumbnail = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _0_file_id_js_1 = require("./!0_file_id.js");
5
+ const _0__file_id_js_1 = require("./0__file_id.js");
6
6
  function constructThumbnail(size, file) {
7
- const fileType = file instanceof _2_tl_js_1.types.Photo ? _0_file_id_js_1.FileType.Photo : _0_file_id_js_1.FileType.Document;
8
- const fileId = new _0_file_id_js_1.FileID(null, null, fileType, file.dcId, {
7
+ const fileType = file instanceof _2_tl_js_1.types.Photo ? _0__file_id_js_1.FileType.Photo : _0__file_id_js_1.FileType.Document;
8
+ const fileId = new _0__file_id_js_1.FileID(null, null, fileType, file.dcId, {
9
9
  mediaId: file.id,
10
10
  accessHash: file.accessHash,
11
11
  fileReference: file.fileReference,
12
12
  thumbnailFileType: fileType,
13
- thumbnailSource: _0_file_id_js_1.ThumbnailSource.Thumbnail,
13
+ thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
14
14
  thumbnailSize: size.type,
15
15
  volumeId: 0n,
16
16
  localId: 0,
17
17
  }).encode();
18
- const fileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: file.id }).encode();
18
+ const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: file.id }).encode();
19
19
  return {
20
20
  fileId,
21
21
  fileUniqueId,
@@ -1,7 +1,14 @@
1
1
  import { MaybePromise } from "../1_utilities.js";
2
2
  import { types } from "../2_tl.js";
3
+ import { ChatID } from "./0_chat_id.js";
3
4
  export interface EntityGetter {
4
5
  (peer: types.PeerUser): MaybePromise<types.User | null>;
5
6
  (peer: types.PeerChat): MaybePromise<types.Chat | null>;
6
7
  (peer: types.PeerChannel): MaybePromise<types.Channel | null>;
7
8
  }
9
+ export interface InputPeerGetter {
10
+ (id: ChatID): Promise<types.InputPeerUser | types.InputPeerChannel | types.InputPeerChat>;
11
+ }
12
+ export interface UsernameResolver {
13
+ (username: string): MaybePromise<types.InputUser>;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { types } from "../2_tl.js";
2
+ import { ChatID } from "./0_chat_id.js";
3
+ import { InputPeerGetter } from "./1__getters.js";
4
+ export declare namespace BotCommandScope {
5
+ interface Default {
6
+ type: "default";
7
+ }
8
+ interface AllPrivateChats {
9
+ type: "allPrivateChats";
10
+ }
11
+ interface AllGroupChats {
12
+ type: "allGroupChats";
13
+ }
14
+ interface AllChatAdministrators {
15
+ type: "allChatAdministrators";
16
+ }
17
+ interface Chat {
18
+ type: "chat";
19
+ chatId: ChatID;
20
+ }
21
+ interface ChatAdministrators {
22
+ type: "chatAdministrators";
23
+ chatId: ChatID;
24
+ }
25
+ interface ChatMember {
26
+ type: "chatMember";
27
+ chatId: ChatID;
28
+ userId: number;
29
+ }
30
+ }
31
+ export type BotCommandScope = BotCommandScope.Default | BotCommandScope.AllPrivateChats | BotCommandScope.AllGroupChats | BotCommandScope.AllChatAdministrators | BotCommandScope.Chat | BotCommandScope.ChatAdministrators | BotCommandScope.ChatMember;
32
+ export declare function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise<types.BotCommandScopeDefault | types.BotCommandScopeUsers | types.BotCommandScopeChats | types.BotCommandScopeChatAdmins | types.BotCommandScopePeer | types.BotCommandScopePeerAdmins | types.BotCommandScopePeerUser>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.botCommandScopeToTlObject = void 0;
4
+ const _1_utilities_js_1 = require("../1_utilities.js");
5
+ const _2_tl_js_1 = require("../2_tl.js");
6
+ async function botCommandScopeToTlObject(scope, getInputPeer) {
7
+ switch (scope.type) {
8
+ case "default":
9
+ return new _2_tl_js_1.types.BotCommandScopeDefault();
10
+ case "allPrivateChats":
11
+ return new _2_tl_js_1.types.BotCommandScopeUsers();
12
+ case "allGroupChats":
13
+ return new _2_tl_js_1.types.BotCommandScopeChats();
14
+ case "allChatAdministrators":
15
+ return new _2_tl_js_1.types.BotCommandScopeChatAdmins();
16
+ case "chat":
17
+ return new _2_tl_js_1.types.BotCommandScopePeer({ peer: await getInputPeer(scope.chatId) });
18
+ case "chatAdministrators":
19
+ return new _2_tl_js_1.types.BotCommandScopePeerAdmins({ peer: await getInputPeer(scope.chatId) });
20
+ case "chatMember": {
21
+ const user = await getInputPeer(scope.userId);
22
+ if (!(user instanceof _2_tl_js_1.types.InputPeerUser)) {
23
+ (0, _1_utilities_js_1.UNREACHABLE)();
24
+ }
25
+ return new _2_tl_js_1.types.BotCommandScopePeerUser({ peer: await getInputPeer(scope.chatId), userId: new _2_tl_js_1.types.InputUser({ userId: user.userId, accessHash: user.accessHash }) });
26
+ }
27
+ default:
28
+ (0, _1_utilities_js_1.UNREACHABLE)();
29
+ }
30
+ }
31
+ exports.botCommandScopeToTlObject = botCommandScopeToTlObject;
@@ -1,6 +1,6 @@
1
1
  import { types } from "../2_tl.js";
2
- import { Color } from "./0_color.js";
3
2
  import { ChatPhoto } from "./0_chat_photo.js";
3
+ import { Color } from "./0_color.js";
4
4
  export type ChatType = "private" | "group" | "supergroup" | "channel";
5
5
  export declare namespace Chat {
6
6
  interface Base {
@@ -4,8 +4,8 @@ exports.constructChat = void 0;
4
4
  const _1_utilities_js_1 = require("../1_utilities.js");
5
5
  const _2_tl_js_1 = require("../2_tl.js");
6
6
  const _4_constants_js_1 = require("../4_constants.js");
7
- const _0_color_js_1 = require("./0_color.js");
8
7
  const _0_chat_photo_js_1 = require("./0_chat_photo.js");
8
+ const _0_color_js_1 = require("./0_color.js");
9
9
  function constructChat(chat) {
10
10
  if (chat instanceof _2_tl_js_1.types.User) {
11
11
  const id = Number(chat.id);
@@ -0,0 +1,6 @@
1
+ import { WebAppInfo } from "./0_web_app_info.js";
2
+ export interface InlineQueryResultButton {
3
+ text: string;
4
+ webApp?: WebAppInfo;
5
+ startParameter?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { LabeledPrice } from "../tl/2_types.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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructPhoto = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _0_file_id_js_1 = require("./!0_file_id.js");
5
+ const _0__file_id_js_1 = require("./0__file_id.js");
6
6
  const _0_thumbnail_js_1 = require("./0_thumbnail.js");
7
7
  function constructPhoto(photo) {
8
8
  const sizes = photo.sizes
@@ -18,14 +18,14 @@ function constructPhoto(photo) {
18
18
  .sort((a, b) => a.size - b.size);
19
19
  const largest = sizes.slice(-1)[0];
20
20
  const { dcId, id: mediaId, accessHash, fileReference } = photo;
21
- const fileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: photo.id }).encode();
21
+ const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.id }).encode();
22
22
  return {
23
- fileId: new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.Photo, dcId, {
23
+ fileId: new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Photo, dcId, {
24
24
  mediaId,
25
25
  accessHash,
26
26
  fileReference,
27
- thumbnailSource: _0_file_id_js_1.ThumbnailSource.Thumbnail,
28
- thumbnailFileType: _0_file_id_js_1.FileType.Photo,
27
+ thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
28
+ thumbnailFileType: _0__file_id_js_1.FileType.Photo,
29
29
  thumbnailSize: largest.type,
30
30
  volumeId: 0n,
31
31
  localId: 0,
@@ -1,7 +1,7 @@
1
1
  import { MaybePromise } from "../1_utilities.js";
2
2
  import { types } from "../2_tl.js";
3
- import { Thumbnail } from "./0_thumbnail.js";
4
3
  import { MaskPosition } from "./0_mask_position.js";
4
+ import { Thumbnail } from "./0_thumbnail.js";
5
5
  /** This object represents a sticker. */
6
6
  export interface Sticker {
7
7
  /** Identifier for this file, which can be used to download or reuse the file */
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructSticker = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _0_thumbnail_js_1 = require("./0_thumbnail.js");
6
5
  const _0_mask_position_js_1 = require("./0_mask_position.js");
6
+ const _0_thumbnail_js_1 = require("./0_thumbnail.js");
7
7
  async function constructSticker(document, fileId, fileUniqueId, getStickerSetName) {
8
8
  const stickerAttribute = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeSticker);
9
9
  const imageSizeAttribute = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeImageSize);
@@ -1,6 +1,6 @@
1
1
  import { types } from "../2_tl.js";
2
- import { Color } from "./0_color.js";
3
2
  import { ChatPhoto } from "./0_chat_photo.js";
3
+ import { Color } from "./0_color.js";
4
4
  /** This object represents a Telegram user or bot. */
5
5
  export interface User {
6
6
  /** Unique identifier for this user or bot */
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructUser = void 0;
4
4
  const _1_utilities_js_1 = require("../1_utilities.js");
5
5
  const _2_tl_js_1 = require("../2_tl.js");
6
- const _0_color_js_1 = require("./0_color.js");
7
6
  const _0_chat_photo_js_1 = require("./0_chat_photo.js");
7
+ const _0_color_js_1 = require("./0_color.js");
8
8
  function constructUser(user_) {
9
9
  const id = Number(user_.id);
10
10
  const user = {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructGame = void 0;
4
4
  const _1_utilities_js_1 = require("../1_utilities.js");
5
5
  const _2_tl_js_1 = require("../2_tl.js");
6
- const _0_file_id_js_1 = require("./!0_file_id.js");
6
+ const _0__file_id_js_1 = require("./0__file_id.js");
7
7
  const _1_animation_js_1 = require("./1_animation.js");
8
8
  const _1_photo_js_1 = require("./1_photo.js");
9
9
  function constructGame(media_) {
@@ -14,11 +14,11 @@ function constructGame(media_) {
14
14
  description: media_.game.description,
15
15
  photo: (0, _1_photo_js_1.constructPhoto)(game_.photo[_2_tl_js_1.as](_2_tl_js_1.types.Photo)),
16
16
  animation: document_
17
- ? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.Animation, document_.dcId, {
17
+ ? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Animation, document_.dcId, {
18
18
  mediaId: document_.id,
19
19
  accessHash: document_.accessHash,
20
20
  fileReference: document_.fileReference,
21
- }).encode(), new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: document_.id }).encode())
21
+ }).encode(), new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: document_.id }).encode())
22
22
  : undefined,
23
23
  });
24
24
  }
@@ -1,7 +1,7 @@
1
- import { MaybePromise } from "../1_utilities.js";
2
1
  import { types } from "../2_tl.js";
3
- import { WebAppInfo } from "./0_web_app_info.js";
4
2
  import { LoginUrl } from "./0_login_url.js";
3
+ import { WebAppInfo } from "./0_web_app_info.js";
4
+ import { UsernameResolver } from "./1__getters.js";
5
5
  export declare namespace InlineKeyboardButton {
6
6
  interface Base {
7
7
  /** Label text on the button */
@@ -42,4 +42,4 @@ export declare namespace InlineKeyboardButton {
42
42
  /** This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. */
43
43
  export type InlineKeyboardButton = InlineKeyboardButton.URL | InlineKeyboardButton.Callback | InlineKeyboardButton.WebApp | InlineKeyboardButton.Login | InlineKeyboardButton.SwitchInline | InlineKeyboardButton.SwitchInlineCurrent | InlineKeyboardButton.Game | InlineKeyboardButton.Pay;
44
44
  export declare function constructInlineKeyboardButton(button_: types.TypeKeyboardButton): InlineKeyboardButton;
45
- export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: (username: string) => MaybePromise<types.InputUser>): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
45
+ export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
@@ -1,6 +1,6 @@
1
1
  import { types } from "../2_tl.js";
2
- import { EntityGetter } from "./!0_misc.js";
3
2
  import { Location } from "./0_location.js";
3
+ import { EntityGetter } from "./1__getters.js";
4
4
  import { User } from "./1_user.js";
5
5
  export interface InlineQuery {
6
6
  /** Unique identifier for this query */
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,10 @@
1
1
  import { types } from "../2_tl.js";
2
- import { InlineKeyboardButton, inlineKeyboardButtonToTlObject } from "./1_inline_keyboard_button.js";
2
+ import { UsernameResolver } from "./1__getters.js";
3
+ import { InlineKeyboardButton } from "./2_inline_keyboard_button.js";
3
4
  /** This object represents an inline keyboard that appears right next to the message it belongs to. */
4
5
  export interface InlineKeyboardMarkup {
5
6
  /** Array of button rows, each represented by an Array of InlineKeyboardButton objects */
6
7
  inlineKeyboard: InlineKeyboardButton[][];
7
8
  }
8
9
  export declare function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): InlineKeyboardMarkup;
9
- export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: Parameters<typeof inlineKeyboardButtonToTlObject>[1]): Promise<types.ReplyInlineMarkup>;
10
+ export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: UsernameResolver): Promise<types.ReplyInlineMarkup>;
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inlineKeyboardMarkupToTlObject = exports.constructInlineKeyboardMarkup = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _1_inline_keyboard_button_js_1 = require("./1_inline_keyboard_button.js");
5
+ const _2_inline_keyboard_button_js_1 = require("./2_inline_keyboard_button.js");
6
6
  function constructInlineKeyboardMarkup(keyboard_) {
7
7
  const rows = new Array();
8
8
  for (const row_ of keyboard_.rows) {
9
9
  const row = new Array();
10
10
  for (const button_ of row_.buttons) {
11
- row.push((0, _1_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
11
+ row.push((0, _2_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
12
12
  }
13
13
  rows.push(row);
14
14
  }
@@ -20,7 +20,7 @@ async function inlineKeyboardMarkupToTlObject(keyboard, usernameResolver) {
20
20
  for (const row of keyboard.inlineKeyboard) {
21
21
  const row_ = new Array();
22
22
  for (const button of row) {
23
- row_.push(await (0, _1_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
23
+ row_.push(await (0, _2_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
24
24
  }
25
25
  rows_.push(new _2_tl_js_1.types.KeyboardButtonRow({ buttons: row_ }));
26
26
  }