@mtkruto/node 0.180.1 → 0.191.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 (157) hide show
  1. package/esm/3_types.d.ts +6 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +6 -0
  4. package/esm/client/0_params.d.ts +42 -30
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +1158 -1056
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +19 -12
  10. package/esm/client/2_file_manager.js +1 -1
  11. package/esm/client/3_account_manager.d.ts +6 -0
  12. package/esm/client/3_account_manager.d.ts.map +1 -1
  13. package/esm/client/3_account_manager.js +30 -1
  14. package/esm/client/3_message_manager.d.ts +3 -1
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +33 -19
  17. package/esm/client/3_secret_chat_manager.d.ts +3 -1
  18. package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
  19. package/esm/client/3_secret_chat_manager.js +77 -3
  20. package/esm/client/4_chat_manager.d.ts +2 -1
  21. package/esm/client/4_chat_manager.d.ts.map +1 -1
  22. package/esm/client/4_chat_manager.js +7 -1
  23. package/esm/client/4_context.d.ts +132 -48
  24. package/esm/client/4_context.d.ts.map +1 -1
  25. package/esm/client/4_context.js +336 -125
  26. package/esm/client/4_poll_manager.d.ts +3 -1
  27. package/esm/client/4_poll_manager.d.ts.map +1 -1
  28. package/esm/client/4_poll_manager.js +16 -5
  29. package/esm/client/6_client.d.ts +1158 -1056
  30. package/esm/client/6_client.d.ts.map +1 -1
  31. package/esm/client/6_client.js +1514 -1386
  32. package/esm/client/6_client_dispatcher.d.ts +1158 -1056
  33. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  34. package/esm/client/6_client_dispatcher.js +1478 -1356
  35. package/esm/types/0_checklist_changed.d.ts +1 -1
  36. package/esm/types/0_checklist_changed.d.ts.map +1 -1
  37. package/esm/types/0_location.d.ts +2 -2
  38. package/esm/types/0_location.d.ts.map +1 -1
  39. package/esm/types/0_message_viewer.d.ts +29 -0
  40. package/esm/types/0_message_viewer.d.ts.map +1 -0
  41. package/esm/types/0_message_viewer.js +25 -0
  42. package/esm/types/0_secret_chat_action_type.d.ts +69 -0
  43. package/esm/types/0_secret_chat_action_type.d.ts.map +1 -0
  44. package/esm/types/0_secret_chat_action_type.js +46 -0
  45. package/esm/types/1_chat_p.d.ts +1 -5
  46. package/esm/types/1_chat_p.d.ts.map +1 -1
  47. package/esm/types/1_input_poll_media.d.ts +5 -5
  48. package/esm/types/1_input_poll_media.d.ts.map +1 -1
  49. package/esm/types/1_input_sticker.d.ts +1 -1
  50. package/esm/types/1_secret_chat_action.d.ts +30 -0
  51. package/esm/types/1_secret_chat_action.d.ts.map +1 -0
  52. package/esm/types/1_secret_chat_action.js +28 -0
  53. package/esm/types/1_sticker.d.ts +3 -3
  54. package/esm/types/1_sticker.d.ts.map +1 -1
  55. package/esm/types/1_video.d.ts +3 -3
  56. package/esm/types/1_video.d.ts.map +1 -1
  57. package/esm/types/1_video_note.d.ts +3 -3
  58. package/esm/types/1_video_note.d.ts.map +1 -1
  59. package/esm/types/2_poll_voter.d.ts +13 -0
  60. package/esm/types/2_poll_voter.d.ts.map +1 -0
  61. package/esm/types/2_poll_voter.js +18 -0
  62. package/esm/types/3_connected_website.d.ts +35 -0
  63. package/esm/types/3_connected_website.d.ts.map +1 -0
  64. package/esm/types/3_connected_website.js +39 -0
  65. package/esm/types/3_input_media.d.ts +5 -5
  66. package/esm/types/3_input_media.d.ts.map +1 -1
  67. package/esm/types/3_poll_voter_list.d.ts +31 -0
  68. package/esm/types/3_poll_voter_list.d.ts.map +1 -0
  69. package/esm/types/3_poll_voter_list.js +28 -0
  70. package/esm/types/4_reply_to.d.ts +2 -2
  71. package/esm/types/4_reply_to.d.ts.map +1 -1
  72. package/esm/types/6_message_content.d.ts +2 -2
  73. package/esm/types/6_message_content.d.ts.map +1 -1
  74. package/esm/types/9_message.d.ts +8 -1
  75. package/esm/types/9_message.d.ts.map +1 -1
  76. package/esm/types/9_message.js +3 -0
  77. package/esm/types/B_update.d.ts +25 -10
  78. package/esm/types/B_update.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/script/3_types.d.ts +6 -0
  81. package/script/3_types.d.ts.map +1 -1
  82. package/script/3_types.js +6 -0
  83. package/script/client/0_params.d.ts +42 -30
  84. package/script/client/0_params.d.ts.map +1 -1
  85. package/script/client/1_client_generic.d.ts +1158 -1056
  86. package/script/client/1_client_generic.d.ts.map +1 -1
  87. package/script/client/2_client_encrypted.d.ts.map +1 -1
  88. package/script/client/2_client_encrypted.js +19 -12
  89. package/script/client/2_file_manager.js +1 -1
  90. package/script/client/3_account_manager.d.ts +6 -0
  91. package/script/client/3_account_manager.d.ts.map +1 -1
  92. package/script/client/3_account_manager.js +29 -0
  93. package/script/client/3_message_manager.d.ts +3 -1
  94. package/script/client/3_message_manager.d.ts.map +1 -1
  95. package/script/client/3_message_manager.js +32 -18
  96. package/script/client/3_secret_chat_manager.d.ts +3 -1
  97. package/script/client/3_secret_chat_manager.d.ts.map +1 -1
  98. package/script/client/3_secret_chat_manager.js +76 -2
  99. package/script/client/4_chat_manager.d.ts +2 -1
  100. package/script/client/4_chat_manager.d.ts.map +1 -1
  101. package/script/client/4_chat_manager.js +7 -1
  102. package/script/client/4_context.d.ts +132 -48
  103. package/script/client/4_context.d.ts.map +1 -1
  104. package/script/client/4_context.js +336 -125
  105. package/script/client/4_poll_manager.d.ts +3 -1
  106. package/script/client/4_poll_manager.d.ts.map +1 -1
  107. package/script/client/4_poll_manager.js +15 -4
  108. package/script/client/6_client.d.ts +1158 -1056
  109. package/script/client/6_client.d.ts.map +1 -1
  110. package/script/client/6_client.js +1514 -1386
  111. package/script/client/6_client_dispatcher.d.ts +1158 -1056
  112. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  113. package/script/client/6_client_dispatcher.js +1478 -1356
  114. package/script/types/0_checklist_changed.d.ts +1 -1
  115. package/script/types/0_checklist_changed.d.ts.map +1 -1
  116. package/script/types/0_location.d.ts +2 -2
  117. package/script/types/0_location.d.ts.map +1 -1
  118. package/script/types/0_message_viewer.d.ts +29 -0
  119. package/script/types/0_message_viewer.d.ts.map +1 -0
  120. package/script/types/0_message_viewer.js +28 -0
  121. package/script/types/0_secret_chat_action_type.d.ts +69 -0
  122. package/script/types/0_secret_chat_action_type.d.ts.map +1 -0
  123. package/script/types/0_secret_chat_action_type.js +49 -0
  124. package/script/types/1_chat_p.d.ts +1 -5
  125. package/script/types/1_chat_p.d.ts.map +1 -1
  126. package/script/types/1_input_poll_media.d.ts +5 -5
  127. package/script/types/1_input_poll_media.d.ts.map +1 -1
  128. package/script/types/1_input_sticker.d.ts +1 -1
  129. package/script/types/1_secret_chat_action.d.ts +30 -0
  130. package/script/types/1_secret_chat_action.d.ts.map +1 -0
  131. package/script/types/1_secret_chat_action.js +31 -0
  132. package/script/types/1_sticker.d.ts +3 -3
  133. package/script/types/1_sticker.d.ts.map +1 -1
  134. package/script/types/1_video.d.ts +3 -3
  135. package/script/types/1_video.d.ts.map +1 -1
  136. package/script/types/1_video_note.d.ts +3 -3
  137. package/script/types/1_video_note.d.ts.map +1 -1
  138. package/script/types/2_poll_voter.d.ts +13 -0
  139. package/script/types/2_poll_voter.d.ts.map +1 -0
  140. package/script/types/2_poll_voter.js +21 -0
  141. package/script/types/3_connected_website.d.ts +35 -0
  142. package/script/types/3_connected_website.d.ts.map +1 -0
  143. package/script/types/3_connected_website.js +42 -0
  144. package/script/types/3_input_media.d.ts +5 -5
  145. package/script/types/3_input_media.d.ts.map +1 -1
  146. package/script/types/3_poll_voter_list.d.ts +31 -0
  147. package/script/types/3_poll_voter_list.d.ts.map +1 -0
  148. package/script/types/3_poll_voter_list.js +31 -0
  149. package/script/types/4_reply_to.d.ts +2 -2
  150. package/script/types/4_reply_to.d.ts.map +1 -1
  151. package/script/types/6_message_content.d.ts +2 -2
  152. package/script/types/6_message_content.d.ts.map +1 -1
  153. package/script/types/9_message.d.ts +8 -1
  154. package/script/types/9_message.d.ts.map +1 -1
  155. package/script/types/9_message.js +3 -0
  156. package/script/types/B_update.d.ts +25 -10
  157. package/script/types/B_update.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"3_secret_chat_manager.d.ts","sourceRoot":"","sources":["../../src/client/3_secret_chat_manager.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,GAAG,EAA4C,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAqB,KAAK,UAAU,EAAE,KAAK,EAAE,EAAiC,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAGtI,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGjW,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,UAAU,CAAE,SAAQ,EAAE;IACpB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,QAAA,MAAM,wBAAwB,4DAGpB,CAAC;AAEX,KAAK,uBAAuB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEpF,qBAAa,iBAAkB,YAAW,eAAe,CAAC,uBAAuB,EAAE,IAAI,CAAC;;gBAI1E,CAAC,EAAE,CAAC;IAK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AE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,qBAAqB;IAuC7E,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,yBAAyB;IAwCzF,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB;IAwD7D,gCAAgC,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;IAkBjE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,qBAAqB;IAoC7E,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,uBAAuB;IAkhBtF,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,IAAI,uBAAuB;IAIhE,YAAY,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAuG5E"}
@@ -23,7 +23,7 @@ import { concat, equals, ige256Decrypt, ige256Encrypt, unreachable, WEEK } from
23
23
  import { InputError } from "../0_errors.js";
24
24
  import { getLogger, getRandomId, getRandomInt, intFromBytes, intToBytes, mod, modExp, sha1, sha256 } from "../1_utilities.js";
25
25
  import { Api, repr, SecretChats, TLReader, TLWriter, X } from "../2_tl.js";
26
- import { deserializeFileId, secretMessageEntityToTlObject } from "../3_types.js";
26
+ import { constructSecretChatAction, deserializeFileId, secretMessageEntityToTlObject } from "../3_types.js";
27
27
  import { constructSecretChat } from "../types/0_secret_chat.js";
28
28
  import { constructSecretMessage } from "../types/2_secret_message.js";
29
29
  import { isGoodModExpFirst, isSafePrime } from "./0_password.js";
@@ -473,6 +473,74 @@ export class SecretChatManager {
473
473
  await this.#sendMessage(decryptedMessage, state.encryptedChat, state.authKey, state.authKeyId_, inputEncryptedFile);
474
474
  await this.#postSendMessage(state);
475
475
  }
476
+ async sendSecretChatAction(id, action) {
477
+ this.#c.storage.assertUser("sendSecretChatAction");
478
+ const state = this.#mustGetEncryptedChat(id);
479
+ const random_id = getRandomId();
480
+ let action_;
481
+ switch (action.type) {
482
+ case "typing":
483
+ action_ = { _: "sendMessageTypingAction" };
484
+ break;
485
+ case "uploadingPhoto":
486
+ action_ = { _: "sendMessageUploadPhotoAction" };
487
+ break;
488
+ case "recordingVideo":
489
+ action_ = { _: "sendMessageRecordVideoAction" };
490
+ break;
491
+ case "uploadingVideo":
492
+ action_ = { _: "sendMessageUploadVideoAction" };
493
+ break;
494
+ case "recordingVoice":
495
+ action_ = { _: "sendMessageRecordAudioAction" };
496
+ break;
497
+ case "uploadingAudio":
498
+ action_ = { _: "sendMessageUploadAudioAction" };
499
+ break;
500
+ case "uploadingDocument":
501
+ action_ = { _: "sendMessageUploadDocumentAction" };
502
+ break;
503
+ case "choosingLocation":
504
+ action_ = { _: "sendMessageGeoLocationAction" };
505
+ break;
506
+ case "recordingVideoNote":
507
+ action_ = { _: "sendMessageRecordRoundAction" };
508
+ break;
509
+ case "uploadingVideoNote":
510
+ action_ = { _: "sendMessageUploadRoundAction" };
511
+ break;
512
+ case "cancel":
513
+ action_ = { _: "sendMessageCancelAction" };
514
+ break;
515
+ default:
516
+ unreachable();
517
+ }
518
+ const decryptedMessageService = {
519
+ _: "decryptedMessageService",
520
+ action: {
521
+ _: "decryptedMessageActionTyping",
522
+ action: action_,
523
+ },
524
+ random_id,
525
+ };
526
+ await this.#sendMessage(decryptedMessageService, state.encryptedChat, state.authKey, state.authKeyId_);
527
+ await this.#postSendMessage(state);
528
+ }
529
+ async sendSecretScreenshotNotification(id, messageIds) {
530
+ this.#c.storage.assertUser("sendSecretScreenshotNotification");
531
+ const state = this.#mustGetEncryptedChat(id);
532
+ const random_id = getRandomId();
533
+ const decryptedMessageService = {
534
+ _: "decryptedMessageService",
535
+ action: {
536
+ _: "decryptedMessageActionScreenshotMessages",
537
+ random_ids: messageIds.map(BigInt),
538
+ },
539
+ random_id,
540
+ };
541
+ await this.#sendMessage(decryptedMessageService, state.encryptedChat, state.authKey, state.authKeyId_);
542
+ await this.#postSendMessage(state);
543
+ }
476
544
  async sendSecretPhoto(id, photo, params) {
477
545
  this.#c.storage.assertUser("sendSecretPhoto");
478
546
  const state = this.#mustGetEncryptedChat(id);
@@ -752,7 +820,7 @@ export class SecretChatManager {
752
820
  const start = (action.start_seq_no - x) / 2;
753
821
  const end = (action.end_seq_no - x) / 2;
754
822
  if (start % 1 !== 0 || end % 1 !== 0 || start < 0 || end < start || end >= state.outSeqNo) {
755
- this.#L.debug("discarding secret chat", state.encryptedChat.id, "because an invalid resend rage was received");
823
+ this.#L.debug("discarding secret chat", state.encryptedChat.id, "because an invalid resend range was received");
756
824
  await this.#c.invoke({ _: "messages.discardEncryption", chat_id: state.encryptedChat.id });
757
825
  throw new TypeError("Received invalid secret chat resend range.");
758
826
  }
@@ -760,7 +828,7 @@ export class SecretChatManager {
760
828
  for (let seqNo = start; seqNo <= end; ++seqNo) {
761
829
  const message = state.outgoingMessages.get(seqNo);
762
830
  if (!message) {
763
- this.#L.debug("discarding secret chat", state.encryptedChat.id, "because unable to resend message");
831
+ this.#L.debug("discarding secret chat", state.encryptedChat.id, "because the message could not be resent");
764
832
  await this.#c.invoke({ _: "messages.discardEncryption", chat_id: state.encryptedChat.id });
765
833
  throw new TypeError("Unable to resend secret chat message.");
766
834
  }
@@ -925,6 +993,12 @@ export class SecretChatManager {
925
993
  }
926
994
  break;
927
995
  }
996
+ case "decryptedMessageActionTyping": {
997
+ const secretChatAction = constructSecretChatAction(chatId, message.action);
998
+ if (secretChatAction !== null) {
999
+ this.#c.handleUpdate({ type: "secretChatAction", secretChatAction });
1000
+ }
1001
+ }
928
1002
  }
929
1003
  }
930
1004
  async #processUpdateNewMessageEncrypted(update) {
@@ -20,7 +20,7 @@
20
20
  import { Api } from "../2_tl.js";
21
21
  import { type AvailableReactions, type ChatP, type SlowModeDuration } from "../3_types.js";
22
22
  import { type FileSource, type ID, type ReportReason, type Update } from "../3_types.js";
23
- import type { AddChatMemberParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, DeclineJoinRequestsParams, EnableSignaturesParams, GetCreatedInviteLinksParams, GetJoinRequestsParams, PromoteChatMemberParams, ReportChatParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams } from "./0_params.js";
23
+ import type { AddChatMemberParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, DeclineJoinRequestsParams, EnableSignaturesParams, GetCreatedInviteLinksParams, GetJoinRequestsParams, MarkAllMentionsAsReadParams, PromoteChatMemberParams, ReportChatParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams } from "./0_params.js";
24
24
  import type { UpdateProcessor } from "./0_update_processor.js";
25
25
  import type { C as C_ } from "./1_types.js";
26
26
  import type { FileManager } from "./2_file_manager.js";
@@ -88,6 +88,7 @@ export declare class ChatManager implements UpdateProcessor<ChatManagerUpdate, t
88
88
  reportChat(chatId: ID, reason_: ReportReason, params?: ReportChatParams): Promise<void>;
89
89
  markChatAsUnread(chatId: ID): Promise<void>;
90
90
  markChatAsRead(chatId: ID): Promise<void>;
91
+ markAllMentionsAsRead(chatId: ID, params?: MarkAllMentionsAsReadParams): Promise<void>;
91
92
  }
92
93
  export {};
93
94
  //# sourceMappingURL=4_chat_manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"4_chat_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_chat_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,kBAAkB,EAAmE,KAAK,KAAK,EAAmK,KAAK,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AACxV,OAAO,EAA8B,KAAK,UAAU,EAAE,KAAK,EAAE,EAAE,KAAK,YAAY,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E,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM;IAkB9D,aAAa,CAAC,MAAM,EAAE,EAAE;IAKxB,cAAc,CAAC,MAAM,EAAE,EAAE;IAMzB,eAAe,CAAC,MAAM,EAAE,EAAE;IAa1B,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBvF,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,mBAAmB;IAiBlE,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAmBxC,sBAAsB;IAMtB,kBAAkB,CAAC,MAAM,EAAE,EAAE;IAO7B,cAAc,CAAC,MAAM,EAAE,EAAE;IAOzB,cAAc,CAAC,MAAM,EAAE,EAAE;IAYzB,8BAA8B,CAAC,MAAM,EAAE,EAAE;IAKzC,+BAA+B,CAAC,MAAM,EAAE,EAAE;IAK1C,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IAOvC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,gBAAgB;IAavE,gBAAgB,CAAC,MAAM,EAAE,EAAE;IAK3B,cAAc,CAAC,MAAM,EAAE,EAAE;IAKzB,qBAAqB,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,2BAA2B;CAM7E"}
@@ -376,7 +376,7 @@ export class ChatManager {
376
376
  const user_id = await this.#c.getInputUser(userId);
377
377
  const isSelf = Api.is("inputUserSelf", user_id);
378
378
  if (isSelf || Api.peerToChatId(user_id) === await this.#c.getSelfId()) {
379
- throw new InputError("A user ID except that of the current one was expected.");
379
+ throw new InputError("A user ID other than that of the current user was expected.");
380
380
  }
381
381
  const peer = await this.#c.getInputPeer(chatId);
382
382
  const ap = await this.#c.invoke({ _: "account.getPassword" });
@@ -519,4 +519,10 @@ export class ChatManager {
519
519
  this.#c.storage.assertUser("markChatAsRead");
520
520
  await this.#setIsChatUnread(chatId, false);
521
521
  }
522
+ async markAllMentionsAsRead(chatId, params) {
523
+ this.#c.storage.assertUser("markAllMentionsAsRead");
524
+ const peer = await this.#c.getInputPeer(chatId);
525
+ const top_msg_id = params?.topicId;
526
+ await this.#c.invoke({ _: "messages.readMentions", peer, top_msg_id });
527
+ }
522
528
  }
@@ -18,8 +18,8 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import { type Api } from "../2_tl.js";
21
- import type { AvailableReactions, BusinessConnection, CallbackQuery, Chat, ChatActionType, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ChosenInlineResult, ClaimedGifts, FailedInvitation, FileSource, GuestQuery, ID, InlineQuery, InlineQueryResult, InputChecklistItem, InputMedia, InputPollOption, InputRichText, InputStoryContent, InviteLink, JoinRequest, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageRichText, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, Poll, PriceTag, Reaction, RichText, SecretChat, SecretMessage, SlowModeDuration, Sticker, Story, Topic, Update, User, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
22
- import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessagesParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, ForwardMessagesParams, GetChatMembersParams, GetClaimedGiftsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetSavedMessagesParams, PinMessageParams, PromoteChatMemberParams, ReplyParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendSecretAnimationParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetReactionsParams, StartVideoChatParams, StopPollParams, UpdateChecklistParams } from "./0_params.js";
21
+ import type { AlbumStoryList, AvailableReactions, BusinessConnection, CallbackQuery, Chat, ChatActionType, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ChosenInlineResult, ClaimedGifts, FailedInvitation, FileSource, GuestQuery, ID, InlineQuery, InlineQueryResult, InputChecklistItem, InputGift, InputMedia, InputPollOption, InputRichText, InputStoryContent, InviteLink, JoinRequest, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageCounters, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLivePhoto, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageRichText, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, Poll, PollVoterList, PriceTag, Reaction, ReportReason, RichText, SecretChat, SecretChatActionType, SecretMessage, SlowModeDuration, StarAmount, StarTransactionList, Sticker, Story, StoryAlbum, StoryReportResult, Topic, TranslatedText, Update, User, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
22
+ import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessagesParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, ForwardMessagesParams, GetChatMembersParams, GetClaimedGiftsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetPollVotersParams, GetSavedMessagesParams, GetStarTransactionsParams, PinMessageParams, PromoteChatMemberParams, ReplyParams, ReportChatParams, ReportStoryParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendSecretAnimationParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetReactionsParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UpdateChecklistParams } from "./0_params.js";
23
23
  import type { ClientGeneric } from "./1_client_generic.js";
24
24
  import { type FilterQuery, type WithChatType, type WithFilter } from "./3_filters.js";
25
25
  export type ContextCommands = string | RegExp | (string | RegExp)[] | {
@@ -73,16 +73,24 @@ export declare class Context {
73
73
  toJSON(): Update | {
74
74
  update: Api.Update;
75
75
  };
76
+ /** Context-aware alias for {@link Client.acceptSecretChat}. */
77
+ acceptSecretChat(): Promise<SecretChat>;
76
78
  /** Context-aware alias for {@link Client.addContact}. */
77
79
  addAsContact(firstName: string, params?: AddContactParams): Promise<void>;
78
80
  /** Context-aware alias for {@link Client.addChatMember}. */
79
81
  addMember(userId: ID, params?: AddChatMemberParams): Promise<FailedInvitation[]>;
80
82
  /** Context-aware alias for {@link Client.addChatMembers}. */
81
83
  addMembers(userIds: ID[]): Promise<FailedInvitation[]>;
84
+ /** Context-aware alias for {@link Client.addPollOption}. */
85
+ addPollOption(messageId: number, option: InputPollOption): Promise<void>;
82
86
  /** Context-aware alias for {@link Client.addReaction}. */
83
87
  addReaction(messageId: number, reaction: Reaction, params?: AddReactionParams): Promise<void>;
88
+ /** Context-aware alias for {@link Client.addStoriesToAlbum}. */
89
+ addStoriesToAlbum(albumId: number, storyIds: number[]): Promise<StoryAlbum>;
84
90
  /** Context-aware alias for {@link Client.addStoriesToHighlights}. */
85
91
  addStoriesToHighlights(storyIds: number[]): Promise<void>;
92
+ /** Context-aware alias for {@link Client.addStoryToAlbum}. */
93
+ addStoryToAlbum(albumId: number, storyId: number): Promise<StoryAlbum>;
86
94
  /** Context-aware alias for {@link Client.addStoryToHighlights}. */
87
95
  addStoryToHighlights(storyId: number): Promise<void>;
88
96
  /** Context-aware alias for {@link Client.addToChecklist}. */
@@ -119,20 +127,22 @@ export declare class Context {
119
127
  createInviteLink(params?: CreateInviteLinkParams): Promise<InviteLink>;
120
128
  /** Context-aware alias for {@link Client.createStory}. */
121
129
  createStory(content: InputStoryContent, params?: CreateStoryParams): Promise<Story>;
130
+ /** Context-aware alias for {@link Client.createStoryAlbum}. */
131
+ createStoryAlbum(name: string, storyIds: number[]): Promise<StoryAlbum>;
122
132
  /** Context-aware alias for {@link Client.createTopic}. */
123
133
  createTopic(title: string, params?: CreateTopicParams): Promise<Topic>;
124
134
  /** Context-aware alias for {@link Client.declineJoinRequest}. */
125
135
  declineJoinRequest(): Promise<void>;
126
136
  /** Context-aware alias for {@link Client.declineJoinRequests}. */
127
137
  declineJoinRequests(params?: DeclineJoinRequestsParams): Promise<void>;
128
- /** Context-aware alias for {@link Client.deleteChatPhoto}. */
129
- deleteChatPhoto(): Promise<void>;
130
138
  /** Context-aware alias for {@link Client.deleteMessage}. */
131
139
  delete(): Promise<void>;
132
140
  /** Context-aware alias for {@link Client.deleteChat}. */
133
141
  deleteChat(): Promise<void>;
134
142
  /** Context-aware alias for {@link Client.deleteChatMemberMessages}. */
135
143
  deleteChatMemberMessages(userId: ID): Promise<void>;
144
+ /** Context-aware alias for {@link Client.deleteChatPhoto}. */
145
+ deleteChatPhoto(): Promise<void>;
136
146
  /** Context-aware alias for {@link Client.deleteChatStickerSet}. */
137
147
  deleteChatStickerSet(): Promise<void>;
138
148
  /** Context-aware alias for {@link Client.deleteMessage}. */
@@ -151,6 +161,8 @@ export declare class Context {
151
161
  disableAntispam(): Promise<void>;
152
162
  /** Context-aware alias for {@link Client.disableBusinessBots}. */
153
163
  disableBusinessBots(): Promise<void>;
164
+ /** Context-aware alias for {@link Client.disableChatHistoryForNewMembers}. */
165
+ disableChatHistoryForNewMembers(): Promise<void>;
154
166
  /** Context-aware alias for {@link Client.disableJoinRequests}. */
155
167
  disableJoinRequests(): Promise<void>;
156
168
  /** Context-aware alias for {@link Client.disableSharing}. */
@@ -169,10 +181,10 @@ export declare class Context {
169
181
  editInlineMessageMedia(media: InputMedia, params?: EditInlineMessageMediaParams): Promise<void>;
170
182
  /** Context-aware alias for {@link Client.editInlineMessageReplyMarkup}. */
171
183
  editInlineMessageReplyMarkup(params?: EditMessageReplyMarkupParams): Promise<void>;
172
- /** Context-aware alias for {@link Client.editInlineMessageText}. */
173
- editInlineMessageText(text: string, params?: EditInlineMessageTextParams): Promise<void>;
174
184
  /** Context-aware alias for {@link Client.editInlineMessageRichText}. */
175
185
  editInlineMessageRichText(richText: InputRichText, params?: EditInlineMessageRichTextParams): Promise<void>;
186
+ /** Context-aware alias for {@link Client.editInlineMessageText}. */
187
+ editInlineMessageText(text: string, params?: EditInlineMessageTextParams): Promise<void>;
176
188
  /** Context-aware alias for {@link Client.editMessageCaption}. */
177
189
  editMessageCaption(messageId: number, params?: EditMessageCaptionParams): Promise<Message>;
178
190
  /** Context-aware alias for {@link Client.editMessageLiveLocation}. */
@@ -181,18 +193,18 @@ export declare class Context {
181
193
  editMessageMedia(messageId: number, media: InputMedia, params?: EditMessageMediaParams): Promise<Message>;
182
194
  /** Context-aware alias for {@link Client.editMessageReplyMarkup}. */
183
195
  editMessageReplyMarkup(messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
184
- /** Context-aware alias for {@link Client.editMessageText}. */
185
- editMessageText(messageId: number, text: string, params?: EditMessageTextParams): Promise<MessageText>;
186
- /** Context-aware alias for {@link Client.getRichText}. */
187
- getRichText(messageId: number): Promise<RichText | null>;
188
196
  /** Context-aware alias for {@link Client.editMessageRichText}. */
189
197
  editMessageRichText(messageId: number, richText: InputRichText, params?: EditMessageRichTextParams): Promise<MessageRichText>;
198
+ /** Context-aware alias for {@link Client.editMessageText}. */
199
+ editMessageText(messageId: number, text: string, params?: EditMessageTextParams): Promise<MessageText>;
190
200
  /** Context-aware alias for {@link Client.editTopic}. */
191
201
  editTopic(topicId: number, title: string, params?: EditTopicParams): Promise<Topic>;
192
202
  /** Context-aware alias for {@link Client.enableAntispam}. */
193
203
  enableAntispam(): Promise<void>;
194
204
  /** Context-aware alias for {@link Client.enableBusinessBots}. */
195
205
  enableBusinessBots(): Promise<void>;
206
+ /** Context-aware alias for {@link Client.enableChatHistoryForNewMembers}. */
207
+ enableChatHistoryForNewMembers(): Promise<void>;
196
208
  /** Context-aware alias for {@link Client.enableJoinRequests}. */
197
209
  enableJoinRequests(): Promise<void>;
198
210
  /** Context-aware alias for {@link Client.enableSharing}. */
@@ -201,6 +213,8 @@ export declare class Context {
201
213
  enableSignatures(params?: EnableSignaturesParams): Promise<void>;
202
214
  /** Context-aware alias for {@link Client.enableTopics}. */
203
215
  enableTopics(isShownAsTabs: boolean): Promise<void>;
216
+ /** Context-aware alias for {@link Client.acceptSecretChat}. */
217
+ endSecretChat(params?: EndSecretChatParams): Promise<SecretChat>;
204
218
  /** Context-aware alias for {@link Client.forwardMessage}. */
205
219
  forward(to: ID, params?: ForwardMessagesParams): Promise<Message>;
206
220
  /** Context-aware alias for {@link Client.forwardMessage}. */
@@ -231,32 +245,62 @@ export declare class Context {
231
245
  getJoinRequests(params?: GetJoinRequestsParams): Promise<JoinRequest[]>;
232
246
  /** Context-aware alias for {@link Client.getMessage}. */
233
247
  getMessage(messageId: number): Promise<Message | null>;
248
+ /** Context-aware alias for {@link Client.getMessageCounters}. */
249
+ getMessageCounters(messageId: number): Promise<MessageCounters>;
234
250
  /** Context-aware alias for {@link Client.getMessageReactions}. */
235
251
  getMessageReactions(messageId: number): Promise<MessageReactionList>;
252
+ /** Context-aware alias for {@link Client.getMessageReadDate}. */
253
+ getMessageReadDate(messageId: number): Promise<number>;
236
254
  /** Context-aware alias for {@link Client.getMessages}. */
237
255
  getMessages(messageIds: number[]): Promise<Message[]>;
256
+ /** Context-aware alias for {@link Client.getMessagesCounters}. */
257
+ getMessagesCounters(messageIds: number[]): Promise<MessageCounters[]>;
258
+ /** Context-aware alias for {@link Client.getOnlineCount}. */
259
+ getOnlineCount(): Promise<number>;
260
+ /** Context-aware alias for {@link Client.getPollVoters}. */
261
+ getPollVoters(messageId: number, params?: GetPollVotersParams): Promise<PollVoterList>;
262
+ /** Context-aware alias for {@link Client.getRichText}. */
263
+ getRichText(messageId: number): Promise<RichText | null>;
238
264
  /** Context-aware alias for {@link Client.getSavedMessages}. */
239
265
  getSavedMessages(params?: GetSavedMessagesParams): Promise<Message[]>;
266
+ /** Context-aware alias for {@link Client.getScheduledMessages}. */
267
+ getScheduledMessages(): Promise<Message[]>;
240
268
  /** Context-aware alias for {@link Client.getSimilarBots}. */
241
269
  getSimilarBots(): Promise<ChatPPrivate[]>;
242
270
  /** Context-aware alias for {@link Client.getSimilarChannels}. */
243
271
  getSimilarChannels(): Promise<ChatPChannel[]>;
272
+ /** Context-aware alias for {@link Client.getStarBalance}. */
273
+ getStarBalance(): Promise<StarAmount>;
274
+ /** Context-aware alias for {@link Client.getStarTransactions}. */
275
+ getStarTransactions(params?: GetStarTransactionsParams): Promise<StarTransactionList>;
244
276
  /** Context-aware alias for {@link Client.getStories}. */
245
277
  getStories(storyIds: number[]): Promise<Story[]>;
278
+ /** Context-aware alias for {@link Client.getStoriesInAlbum}. */
279
+ getStoriesInAlbum(albumId: number): Promise<AlbumStoryList>;
246
280
  /** Context-aware alias for {@link Client.getStory}. */
247
281
  getStory(storyId: number): Promise<Story | null>;
282
+ /** Context-aware alias for {@link Client.getStoryAlbums}. */
283
+ getStoryAlbums(): Promise<StoryAlbum[]>;
284
+ /** Context-aware alias for {@link Client.getTonBalance}. */
285
+ getTonBalance(): Promise<number>;
248
286
  /** Context-aware alias for {@link Client.sendGift}. */
249
287
  gift(giftId: string, params?: SendGiftParams): Promise<void>;
250
288
  /** Context-aware alias for {@link Client.hideGeneralTopic}. */
251
289
  hideGeneralTopic(): Promise<void>;
252
290
  /** Context-aware alias for {@link Client.hideMemberList}. */
253
291
  hideMemberList(): Promise<void>;
292
+ /** Context-aware alias for {@link Client.joinChat}. */
293
+ joinChat(): Promise<void>;
254
294
  /** Context-aware alias for {@link Client.kickChatMember}. */
255
295
  kickChatMember(memberId: ID): Promise<void>;
256
296
  /** Context-aware alias for {@link Client.kickChatMember}. */
257
297
  kickSender(): Promise<void>;
258
298
  /** Context-aware alias for {@link Client.leaveChat}. */
259
299
  leaveChat(): Promise<void>;
300
+ /** Context-aware alias for {@link Client.markChatAsRead}. */
301
+ markChatAsRead(): Promise<void>;
302
+ /** Context-aware alias for {@link Client.markChatAsUnread}. */
303
+ markChatAsUnread(): Promise<void>;
260
304
  /** Context-aware alias for {@link Client.openChat}. */
261
305
  open(): Promise<void>;
262
306
  /** Context-aware alias for {@link Client.pauseBusinessBotConnection}. */
@@ -277,52 +321,28 @@ export declare class Context {
277
321
  refundStarPayment(telegramPaymentChargeId: string): Promise<void>;
278
322
  /** Context-aware alias for {@link Client.deleteContact}. */
279
323
  removeAsContact(): Promise<void>;
324
+ /** Context-aware alias for {@link Client.removePollOption}. */
325
+ removePollOption(messageId: number, optionIndex: number): Promise<void>;
280
326
  /** Context-aware alias for {@link Client.removeReaction}. */
281
327
  removeReaction(messageId: number, reaction: Reaction): Promise<void>;
282
- /** Context-aware alias for {@link Client.removeUserReaction}. */
283
- removeUserReaction(messageId: number, userId: ID): Promise<void>;
284
- /** Context-aware alias for {@link Client.removeUserReactions}. */
285
- removeUserReactions(userId: ID): Promise<void>;
328
+ /** Context-aware alias for {@link Client.removeStoriesFromAlbum}. */
329
+ removeStoriesFromAlbum(albumId: number, storyIds: number[]): Promise<StoryAlbum>;
286
330
  /** Context-aware alias for {@link Client.removeStoriesFromHighlights}. */
287
331
  removeStoriesFromHighlights(storyIds: number[]): Promise<void>;
332
+ /** Context-aware alias for {@link Client.removeStoryFromAlbum}. */
333
+ removeStoryFromAlbum(albumId: number, storyId: number): Promise<StoryAlbum>;
288
334
  /** Context-aware alias for {@link Client.removeStoryFromHighlights}. */
289
335
  removeStoryFromHighlights(storyId: number): Promise<void>;
336
+ /** Context-aware alias for {@link Client.removeUserReaction}. */
337
+ removeUserReaction(messageId: number, userId: ID): Promise<void>;
338
+ /** Context-aware alias for {@link Client.removeUserReactions}. */
339
+ removeUserReactions(userId: ID): Promise<void>;
290
340
  /** Context-aware alias for {@link Client.reopenTopic}. */
291
341
  reopenTopic(topicId: number): Promise<void>;
292
- /** Context-aware alias for {@link Client.sendSecretMessage}. */
293
- replySecret(text: string, params?: Omit<SendSecretMessageParams, "replyToMessageId"> & ReplyParams): Promise<void>;
294
- /** Context-aware alias for {@link Client.sendSecretLocation}. */
295
- replySecretLocation(latitude: number, longitude: number, params?: Omit<SendSecretLocationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
296
- /** Context-aware alias for {@link Client.sendSecretVenue}. */
297
- replySecretVenue(latitude: number, longitude: number, title: string, address: string, params?: Omit<SendSecretVenueParams, "replyToMessageId"> & ReplyParams): Promise<void>;
298
- /** Context-aware alias for {@link Client.sendSecretContact}. */
299
- replySecretContact(firstName: string, phoneNumber: string, params?: Omit<SendSecretContactParams, "replyToMessageId"> & ReplyParams): Promise<void>;
300
- /** Context-aware alias for {@link Client.sendSecretDocument}. */
301
- replySecretDocument(document: FileSource, params?: Omit<SendSecretDocumentParams, "replyToMessageId"> & ReplyParams): Promise<void>;
302
- /** Context-aware alias for {@link Client.sendSecretPhoto}. */
303
- replySecretPhoto(photo: FileSource, params?: Omit<SendSecretPhotoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
304
- /** Context-aware alias for {@link Client.sendSecretVideo}. */
305
- replySecretVideo(video: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
306
- /** Context-aware alias for {@link Client.sendSecretVideoNote}. */
307
- replySecretVideoNote(videoNote: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
308
- /** Context-aware alias for {@link Client.sendSecretAnimation}. */
309
- replySecretAnimation(animation: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
310
- /** Context-aware alias for {@link Client.sendSecretAudio}. */
311
- replySecretAudio(audio: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
312
- /** Context-aware alias for {@link Client.sendSecretVoice}. */
313
- replySecretVoice(voice: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
314
- /** Context-aware alias for {@link Client.sendSecretSticker}. */
315
- replySecretSticker(sticker: Sticker, params?: Omit<SendSecretStickerParams, "replyToMessageId"> & ReplyParams): Promise<void>;
316
- /** Context-aware alias for {@link Client.acceptSecretChat}. */
317
- acceptSecretChat(): Promise<SecretChat>;
318
- /** Context-aware alias for {@link Client.acceptSecretChat}. */
319
- endSecretChat(params?: EndSecretChatParams): Promise<SecretChat>;
320
- /** Context-aware alias for {@link Client.requestSecretChat}. */
321
- requestSecretChat(): Promise<SecretChat>;
342
+ /** Context-aware alias for {@link Client.reorderStoriesInAlbum}. */
343
+ reorderStoriesInAlbum(albumId: number, storyIds: number[]): Promise<StoryAlbum>;
322
344
  /** Context-aware alias for {@link Client.sendMessage}. */
323
345
  reply(text: string, params?: Omit<SendMessageParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageText>;
324
- /** Context-aware alias for {@link Client.sendRichText}. */
325
- replyRichText(richText: InputRichText, params?: Omit<SendMessageParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageRichText>;
326
346
  /** Context-aware alias for {@link Client.sendAnimation}. */
327
347
  replyAnimation(animation: FileSource, params?: Omit<SendAnimationParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageAnimation>;
328
348
  /** Context-aware alias for {@link Client.sendAudio}. */
@@ -337,10 +357,10 @@ export declare class Context {
337
357
  replyDocument(document: FileSource, params?: Omit<SendDocumentParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageDocument>;
338
358
  /** Context-aware alias for {@link Client.sendMessageDraft}. */
339
359
  replyDraft(draftId: number, text: string, params?: Omit<SendMessageDraftParams, "messageThreadId"> & ReplyParams): Promise<void>;
340
- /** Context-aware alias for {@link Client.sendRichTextDraft}. */
341
- replyRichTextDraft(draftId: number, richText: InputRichText, params?: Omit<SendRichTextDraftParams, "messageThreadId"> & ReplyParams): Promise<void>;
342
360
  /** Context-aware alias for {@link Client.sendInvoice}. */
343
361
  replyInvoice(title: string, description: string, payload: string, currency: string, prices: PriceTag[], params?: Omit<SendInvoiceParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageInvoice>;
362
+ /** Context-aware alias for {@link Client.sendLivePhoto}. */
363
+ replyLivePhoto(photo: FileSource, video: FileSource, params?: Omit<SendLivePhotoParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageLivePhoto>;
344
364
  /** Context-aware alias for {@link Client.sendLocation}. */
345
365
  replyLocation(latitude: number, longitude: number, params?: Omit<SendLocationParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageLocation>;
346
366
  /** Context-aware alias for {@link Client.sendMediaGroup}. */
@@ -349,6 +369,34 @@ export declare class Context {
349
369
  replyPhoto(photo: FileSource, params?: Omit<SendPhotoParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessagePhoto>;
350
370
  /** Context-aware alias for {@link Client.sendPoll}. */
351
371
  replyPoll(question: string, options: InputPollOption[], params?: Omit<SendPollParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessagePoll>;
372
+ /** Context-aware alias for {@link Client.sendRichText}. */
373
+ replyRichText(richText: InputRichText, params?: Omit<SendMessageParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageRichText>;
374
+ /** Context-aware alias for {@link Client.sendRichTextDraft}. */
375
+ replyRichTextDraft(draftId: number, richText: InputRichText, params?: Omit<SendRichTextDraftParams, "messageThreadId"> & ReplyParams): Promise<void>;
376
+ /** Context-aware alias for {@link Client.sendSecretMessage}. */
377
+ replySecret(text: string, params?: Omit<SendSecretMessageParams, "replyToMessageId"> & ReplyParams): Promise<void>;
378
+ /** Context-aware alias for {@link Client.sendSecretAnimation}. */
379
+ replySecretAnimation(animation: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
380
+ /** Context-aware alias for {@link Client.sendSecretAudio}. */
381
+ replySecretAudio(audio: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
382
+ /** Context-aware alias for {@link Client.sendSecretContact}. */
383
+ replySecretContact(firstName: string, phoneNumber: string, params?: Omit<SendSecretContactParams, "replyToMessageId"> & ReplyParams): Promise<void>;
384
+ /** Context-aware alias for {@link Client.sendSecretDocument}. */
385
+ replySecretDocument(document: FileSource, params?: Omit<SendSecretDocumentParams, "replyToMessageId"> & ReplyParams): Promise<void>;
386
+ /** Context-aware alias for {@link Client.sendSecretLocation}. */
387
+ replySecretLocation(latitude: number, longitude: number, params?: Omit<SendSecretLocationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
388
+ /** Context-aware alias for {@link Client.sendSecretPhoto}. */
389
+ replySecretPhoto(photo: FileSource, params?: Omit<SendSecretPhotoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
390
+ /** Context-aware alias for {@link Client.sendSecretSticker}. */
391
+ replySecretSticker(sticker: Sticker, params?: Omit<SendSecretStickerParams, "replyToMessageId"> & ReplyParams): Promise<void>;
392
+ /** Context-aware alias for {@link Client.sendSecretVenue}. */
393
+ replySecretVenue(latitude: number, longitude: number, title: string, address: string, params?: Omit<SendSecretVenueParams, "replyToMessageId"> & ReplyParams): Promise<void>;
394
+ /** Context-aware alias for {@link Client.sendSecretVideo}. */
395
+ replySecretVideo(video: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
396
+ /** Context-aware alias for {@link Client.sendSecretVideoNote}. */
397
+ replySecretVideoNote(videoNote: FileSource, params?: Omit<SendSecretVideoParams, "replyToMessageId"> & ReplyParams): Promise<void>;
398
+ /** Context-aware alias for {@link Client.sendSecretVoice}. */
399
+ replySecretVoice(voice: FileSource, params?: Omit<SendSecretAnimationParams, "replyToMessageId"> & ReplyParams): Promise<void>;
352
400
  /** Context-aware alias for {@link Client.sendSticker}. */
353
401
  replySticker(sticker: FileSource, params?: Omit<SendStickerParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageSticker>;
354
402
  /** Context-aware alias for {@link Client.sendVenue}. */
@@ -359,8 +407,18 @@ export declare class Context {
359
407
  replyVideoNote(videoNote: FileSource, params?: Omit<SendVideoNoteParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageVideoNote>;
360
408
  /** Context-aware alias for {@link Client.sendVoice}. */
361
409
  replyVoice(voice: FileSource, params?: Omit<SendVoiceParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageVoice>;
410
+ /** Context-aware alias for {@link Client.reportChat}. */
411
+ reportChat(reason: ReportReason, params?: ReportChatParams): Promise<void>;
412
+ /** Context-aware alias for {@link Client.reportStories}. */
413
+ reportStories(storyIds: number[], params?: ReportStoryParams): Promise<StoryReportResult>;
414
+ /** Context-aware alias for {@link Client.reportStory}. */
415
+ reportStory(storyId: number, params?: ReportStoryParams): Promise<StoryReportResult>;
416
+ /** Context-aware alias for {@link Client.requestSecretChat}. */
417
+ requestSecretChat(): Promise<SecretChat>;
362
418
  /** Context-aware alias for {@link Client.resumeBusinessBotConnection}. */
363
419
  resumeBusinessBotConnection(): Promise<void>;
420
+ /** Context-aware alias for {@link Client.retractVote}. */
421
+ retractVote(messageId: number): Promise<void>;
364
422
  /** Context-aware alias for {@link Client.scheduleVideoChat}. */
365
423
  scheduleVideoChat(startAt: number, params?: ScheduleVideoChatParams): Promise<VideoChatScheduled>;
366
424
  /** Context-aware alias for {@link Client.searchMessages}. */
@@ -371,6 +429,14 @@ export declare class Context {
371
429
  }): Promise<void>;
372
430
  /** Context-aware alias for {@link Client.sendScheduledMessage}. */
373
431
  sendScheduledMessage(messageId: number): Promise<Message>;
432
+ /** Context-aware alias for {@link Client.sendScheduledMessages}. */
433
+ sendScheduledMessages(messageIds: number[]): Promise<Message[]>;
434
+ /** Context-aware alias for {@link Client.sendScreenshotNotification}. */
435
+ sendScreenshotNotification(replyToMessageId: number): Promise<void>;
436
+ /** Context-aware alias for {@link Client.sendSecretChatAction}. */
437
+ sendSecretChatAction(action: SecretChatActionType): Promise<void>;
438
+ /** Context-aware alias for {@link Client.sendSecretScreenshotNotification}. */
439
+ sendSecretScreenshotNotification(messageIds: string[]): Promise<void>;
374
440
  /** Context-aware alias for {@link Client.setAvailableReactions}. */
375
441
  setAvailableReactions(availableReactions: AvailableReactions): Promise<void>;
376
442
  /** Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}. */
@@ -385,6 +451,8 @@ export declare class Context {
385
451
  setChatStickerSet(setName: string): Promise<void>;
386
452
  /** Context-aware alias for {@link Client.setChatTitle}. */
387
453
  setChatTitle(title: string): Promise<void>;
454
+ /** Context-aware alias for {@link Client.setDefaultSendAs}. */
455
+ setDefaultSendAs(sendAs: ID): Promise<void>;
388
456
  /** Context-aware alias for {@link Client.setDiscussionChat}. */
389
457
  setDiscussionChat(discussionChatId: ID): Promise<void>;
390
458
  /** Context-aware alias for {@link Client.setChatMemberTag}. */
@@ -397,6 +465,8 @@ export declare class Context {
397
465
  setSenderRights(params?: SetChatMemberRightsParams): Promise<void>;
398
466
  /** Context-aware alias for {@link Client.setSlowMode}. */
399
467
  setSlowMode(duration: SlowModeDuration): Promise<void>;
468
+ /** Context-aware alias for {@link Client.setStoryAlbumName}. */
469
+ setStoryAlbumName(albumId: number, name: string): Promise<StoryAlbum>;
400
470
  /** Context-aware alias for {@link Client.showGeneralTopic}. */
401
471
  showGeneralTopic(): Promise<void>;
402
472
  /** Context-aware alias for {@link Client.showMemberList}. */
@@ -405,10 +475,18 @@ export declare class Context {
405
475
  startVideoChat(params?: StartVideoChatParams): Promise<VideoChatActive>;
406
476
  /** Context-aware alias for {@link Client.stopPoll}. */
407
477
  stopPoll(messageId: number, params?: StopPollParams): Promise<Poll>;
478
+ /** Context-aware alias for {@link Client.summarizeText}. */
479
+ summarizeText(messageId: number, params?: SummarizeTextParams): Promise<TranslatedText>;
408
480
  /** Context-aware alias for {@link Client.transcribeVoice}. */
409
481
  transcribeVoice(messageId: number): Promise<VoiceTranscription>;
482
+ /** Context-aware alias for {@link Client.transferGift}. */
483
+ transferGift(gift: InputGift): Promise<void>;
410
484
  /** Context-aware alias for {@link Client.transferChatOwnership}. */
411
485
  transferOwnership(userId: ID, password: string): Promise<void>;
486
+ /** Context-aware alias for {@link Client.translateMessage}. */
487
+ translateMessage(toLanguage: string, messageId: number, params?: TranslateTextParams): Promise<TranslatedText>;
488
+ /** Context-aware alias for {@link Client.translateMessages}. */
489
+ translateMessages(toLanguage: string, messageIds: number[], params?: TranslateTextParams): Promise<TranslatedText[]>;
412
490
  /** Context-aware alias for {@link Client.unarchiveChat}. */
413
491
  unarchive(): Promise<void>;
414
492
  /** Context-aware alias for {@link Client.unbanChatMember}. */
@@ -429,6 +507,12 @@ export declare class Context {
429
507
  unpinTopic(topicId: number): Promise<void>;
430
508
  /** Context-aware alias for {@link Client.updateChecklist}. */
431
509
  updateChecklist(messageId: number, params?: UpdateChecklistParams): Promise<void>;
510
+ /** Context-aware alias for {@link Client.viewMessage}. */
511
+ viewMessage(messageId: number): Promise<void>;
512
+ /** Context-aware alias for {@link Client.viewMessages}. */
513
+ viewMessages(messageIds: number[]): Promise<void>;
514
+ /** Context-aware alias for {@link Client.vote}. */
515
+ vote(messageId: number, optionIndexes: number[]): Promise<void>;
432
516
  }
433
517
  export {};
434
518
  //# sourceMappingURL=4_context.d.ts.map