@mtkruto/node 0.101.1 → 0.102.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 (101) hide show
  1. package/esm/3_types.d.ts +2 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +2 -0
  4. package/esm/client/0_params.d.ts +4 -0
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +32 -5
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_account_manager.d.ts +4 -1
  9. package/esm/client/2_account_manager.d.ts.map +1 -1
  10. package/esm/client/2_account_manager.js +18 -0
  11. package/esm/client/2_update_manager.js +7 -7
  12. package/esm/client/3_message_manager.js +17 -17
  13. package/esm/client/3_video_chat_manager.js +3 -3
  14. package/esm/client/4_chat_manager.js +3 -3
  15. package/esm/client/4_gift_manager.d.ts +3 -2
  16. package/esm/client/4_gift_manager.d.ts.map +1 -1
  17. package/esm/client/4_gift_manager.js +8 -7
  18. package/esm/client/5_client.d.ts +32 -5
  19. package/esm/client/5_client.d.ts.map +1 -1
  20. package/esm/client/5_client.js +39 -4
  21. package/esm/client/5_client_dispatcher.d.ts +32 -5
  22. package/esm/client/5_client_dispatcher.d.ts.map +1 -1
  23. package/esm/client/5_client_dispatcher.js +39 -4
  24. package/esm/types/0_button_style.d.ts +28 -0
  25. package/esm/types/0_button_style.d.ts.map +1 -0
  26. package/esm/types/0_button_style.js +36 -0
  27. package/esm/types/0_code_check_result.d.ts +14 -16
  28. package/esm/types/0_code_check_result.d.ts.map +1 -1
  29. package/esm/types/0_gift_component_rarity.d.ts +5 -0
  30. package/esm/types/0_gift_component_rarity.d.ts.map +1 -1
  31. package/esm/types/0_link_preview_media_size.d.ts +1 -0
  32. package/esm/types/0_link_preview_media_size.d.ts.map +1 -1
  33. package/esm/types/0_mini_app_button_info.d.ts +1 -0
  34. package/esm/types/0_mini_app_button_info.d.ts.map +1 -1
  35. package/esm/types/0_slow_mode_duration.d.ts +1 -0
  36. package/esm/types/0_slow_mode_duration.d.ts.map +1 -1
  37. package/esm/types/0_switch_inline_query_chosen_chats.d.ts +1 -0
  38. package/esm/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
  39. package/esm/types/1_bot_command_scope.js +1 -1
  40. package/esm/types/1_inline_keyboard_button.d.ts +2 -0
  41. package/esm/types/1_inline_keyboard_button.d.ts.map +1 -1
  42. package/esm/types/1_inline_keyboard_button.js +30 -19
  43. package/esm/types/1_input_gift.d.ts +54 -0
  44. package/esm/types/1_input_gift.d.ts.map +1 -0
  45. package/esm/types/1_input_gift.js +32 -0
  46. package/esm/types/1_keyboard_button.d.ts +2 -0
  47. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  48. package/esm/types/1_keyboard_button.js +67 -14
  49. package/esm/types/2_message_entity.js +2 -2
  50. package/esm/types/7_inline_query_result.js +6 -6
  51. package/package.json +1 -1
  52. package/script/3_types.d.ts +2 -0
  53. package/script/3_types.d.ts.map +1 -1
  54. package/script/3_types.js +2 -0
  55. package/script/client/0_params.d.ts +4 -0
  56. package/script/client/0_params.d.ts.map +1 -1
  57. package/script/client/1_client_generic.d.ts +32 -5
  58. package/script/client/1_client_generic.d.ts.map +1 -1
  59. package/script/client/2_account_manager.d.ts +4 -1
  60. package/script/client/2_account_manager.d.ts.map +1 -1
  61. package/script/client/2_account_manager.js +18 -0
  62. package/script/client/2_update_manager.js +7 -7
  63. package/script/client/3_message_manager.js +17 -17
  64. package/script/client/3_video_chat_manager.js +3 -3
  65. package/script/client/4_chat_manager.js +3 -3
  66. package/script/client/4_gift_manager.d.ts +3 -2
  67. package/script/client/4_gift_manager.d.ts.map +1 -1
  68. package/script/client/4_gift_manager.js +7 -6
  69. package/script/client/5_client.d.ts +32 -5
  70. package/script/client/5_client.d.ts.map +1 -1
  71. package/script/client/5_client.js +39 -4
  72. package/script/client/5_client_dispatcher.d.ts +32 -5
  73. package/script/client/5_client_dispatcher.d.ts.map +1 -1
  74. package/script/client/5_client_dispatcher.js +39 -4
  75. package/script/types/0_button_style.d.ts +28 -0
  76. package/script/types/0_button_style.d.ts.map +1 -0
  77. package/script/types/0_button_style.js +40 -0
  78. package/script/types/0_code_check_result.d.ts +14 -16
  79. package/script/types/0_code_check_result.d.ts.map +1 -1
  80. package/script/types/0_gift_component_rarity.d.ts +5 -0
  81. package/script/types/0_gift_component_rarity.d.ts.map +1 -1
  82. package/script/types/0_link_preview_media_size.d.ts +1 -0
  83. package/script/types/0_link_preview_media_size.d.ts.map +1 -1
  84. package/script/types/0_mini_app_button_info.d.ts +1 -0
  85. package/script/types/0_mini_app_button_info.d.ts.map +1 -1
  86. package/script/types/0_slow_mode_duration.d.ts +1 -0
  87. package/script/types/0_slow_mode_duration.d.ts.map +1 -1
  88. package/script/types/0_switch_inline_query_chosen_chats.d.ts +1 -0
  89. package/script/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -1
  90. package/script/types/1_bot_command_scope.js +1 -1
  91. package/script/types/1_inline_keyboard_button.d.ts +2 -0
  92. package/script/types/1_inline_keyboard_button.d.ts.map +1 -1
  93. package/script/types/1_inline_keyboard_button.js +30 -19
  94. package/script/types/1_input_gift.d.ts +54 -0
  95. package/script/types/1_input_gift.d.ts.map +1 -0
  96. package/script/types/1_input_gift.js +35 -0
  97. package/script/types/1_keyboard_button.d.ts +2 -0
  98. package/script/types/1_keyboard_button.d.ts.map +1 -1
  99. package/script/types/1_keyboard_button.js +67 -14
  100. package/script/types/2_message_entity.js +2 -2
  101. package/script/types/7_inline_query_result.js +6 -6
@@ -331,7 +331,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
331
331
  const title = "title" in result_ ? result_.title : undefined;
332
332
  const description = "description" in result_ ? result_.description : undefined;
333
333
  if (document !== null) {
334
- return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, content: document, send_message: ({ _: "inputBotInlineMessageMediaAuto", message, entities, reply_markup: replyMarkup }) };
334
+ return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, content: document, send_message: { _: "inputBotInlineMessageMediaAuto", message, entities, reply_markup: replyMarkup } };
335
335
  }
336
336
  else if (fileId_ !== null) {
337
337
  const fileId = (0, _file_id_js_1.deserializeFileId)(fileId_);
@@ -341,20 +341,20 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
341
341
  type: type === "document" ? "file" : type,
342
342
  title,
343
343
  description,
344
- document: ({
344
+ document: {
345
345
  _: "inputDocument",
346
346
  id: "id" in fileId.location ? fileId.location.id : (0, _0_deps_js_1.unreachable)(),
347
347
  access_hash: fileId.location.accessHash,
348
348
  file_reference: fileId.fileReference ?? new Uint8Array(),
349
- }),
349
+ },
350
350
  send_message: sendMessage,
351
351
  };
352
352
  }
353
353
  else if (result_.type === "location") {
354
- return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, send_message: ({ _: "inputBotInlineMessageMediaGeo", geo_point: ({ _: "inputGeoPoint", lat: result_.latitude, long: result_.longitude, accuracy_radius: result_.horizontalAccuracy }), heading: result_.heading, period: result_.livePeriod, proximity_notification_radius: result_.proximityAlertRadius, reply_markup: replyMarkup }) };
354
+ return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, send_message: { _: "inputBotInlineMessageMediaGeo", geo_point: { _: "inputGeoPoint", lat: result_.latitude, long: result_.longitude, accuracy_radius: result_.horizontalAccuracy }, heading: result_.heading, period: result_.livePeriod, proximity_notification_radius: result_.proximityAlertRadius, reply_markup: replyMarkup } };
355
355
  }
356
356
  else if (result_.type === "game") {
357
- return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, send_message: ({ _: "inputBotInlineMessageGame", reply_markup: replyMarkup }) };
357
+ return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, send_message: { _: "inputBotInlineMessageGame", reply_markup: replyMarkup } };
358
358
  }
359
359
  else if (result_.type === "article") {
360
360
  if (!("text" in result_.messageContent)) {
@@ -376,7 +376,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
376
376
  if (!result_.foursquareId || !result_.foursquareType) {
377
377
  (0, _0_deps_js_1.unreachable)();
378
378
  }
379
- return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, send_message: ({ _: "inputBotInlineMessageMediaVenue", geo_point: ({ _: "inputGeoPoint", long: result_.longitude, lat: result_.latitude }), address: result_.address, provider: "foursquare", title: result_.title, venue_id: result_.foursquareId, venue_type: result_.foursquareType, reply_markup: replyMarkup }) };
379
+ return { _: "inputBotInlineResult", id, type, title, description, thumb: thumb === null ? undefined : thumb, send_message: { _: "inputBotInlineMessageMediaVenue", geo_point: { _: "inputGeoPoint", long: result_.longitude, lat: result_.latitude }, address: result_.address, provider: "foursquare", title: result_.title, venue_id: result_.foursquareId, venue_type: result_.foursquareType, reply_markup: replyMarkup } };
380
380
  }
381
381
  else {
382
382
  (0, _0_deps_js_1.unreachable)();