@mtcute/core 0.18.0-rc.5 → 0.18.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.
- package/client.d.cts +1 -0
- package/highlevel/base.d.cts +115 -0
- package/highlevel/base.test.d.cts +1 -0
- package/highlevel/client.d.cts +5045 -0
- package/highlevel/client.types.d.cts +61 -0
- package/highlevel/index.d.cts +4 -0
- package/highlevel/managers/app-config-manager.d.cts +11 -0
- package/highlevel/managers/timers.d.cts +10 -0
- package/highlevel/methods/_imports.d.cts +1 -0
- package/highlevel/methods/_init.d.cts +1 -0
- package/highlevel/methods/auth/check-password.d.cts +10 -0
- package/highlevel/methods/auth/get-password-hint.d.cts +7 -0
- package/highlevel/methods/auth/log-out.d.cts +17 -0
- package/highlevel/methods/auth/recover-password.d.cts +12 -0
- package/highlevel/methods/auth/resend-code.d.cts +16 -0
- package/highlevel/methods/auth/run.d.cts +16 -0
- package/highlevel/methods/auth/send-code.d.cts +18 -0
- package/highlevel/methods/auth/send-recovery-code.d.cts +7 -0
- package/highlevel/methods/auth/sign-in-bot.d.cts +10 -0
- package/highlevel/methods/auth/sign-in-qr.d.cts +33 -0
- package/highlevel/methods/auth/sign-in.d.cts +19 -0
- package/highlevel/methods/auth/start-test.d.cts +30 -0
- package/highlevel/methods/auth/start.d.cts +89 -0
- package/highlevel/methods/auth/utils.d.cts +9 -0
- package/highlevel/methods/bots/answer-callback-query.d.cts +41 -0
- package/highlevel/methods/bots/answer-inline-query.d.cts +88 -0
- package/highlevel/methods/bots/answer-pre-checkout-query.d.cts +12 -0
- package/highlevel/methods/bots/delete-my-commands.d.cts +22 -0
- package/highlevel/methods/bots/get-bot-info.d.cts +18 -0
- package/highlevel/methods/bots/get-bot-menu-button.d.cts +7 -0
- package/highlevel/methods/bots/get-callback-answer.d.cts +41 -0
- package/highlevel/methods/bots/get-game-high-scores.d.cts +17 -0
- package/highlevel/methods/bots/get-my-commands.d.cts +21 -0
- package/highlevel/methods/bots/normalize-command-scope.d.cts +5 -0
- package/highlevel/methods/bots/open-webview.d.cts +73 -0
- package/highlevel/methods/bots/prepare-inline-message.d.cts +32 -0
- package/highlevel/methods/bots/set-bot-info.d.cts +23 -0
- package/highlevel/methods/bots/set-bot-menu-button.d.cts +7 -0
- package/highlevel/methods/bots/set-game-score.d.cts +54 -0
- package/highlevel/methods/bots/set-my-commands.d.cts +26 -0
- package/highlevel/methods/bots/set-my-default-rights.d.cts +11 -0
- package/highlevel/methods/bots/toggle-emoji-status-permission.d.cts +11 -0
- package/highlevel/methods/chats/add-chat-members.d.cts +20 -0
- package/highlevel/methods/chats/archive-chats.d.cts +9 -0
- package/highlevel/methods/chats/ban-chat-member.d.cts +24 -0
- package/highlevel/methods/chats/batched-queries.d.cts +11 -0
- package/highlevel/methods/chats/create-channel.d.cts +17 -0
- package/highlevel/methods/chats/create-group.d.cts +33 -0
- package/highlevel/methods/chats/create-supergroup.d.cts +27 -0
- package/highlevel/methods/chats/delete-channel.d.cts +8 -0
- package/highlevel/methods/chats/delete-chat-photo.d.cts +10 -0
- package/highlevel/methods/chats/delete-group.d.cts +8 -0
- package/highlevel/methods/chats/delete-history.d.cts +22 -0
- package/highlevel/methods/chats/delete-user-history.d.cts +16 -0
- package/highlevel/methods/chats/edit-admin-rights.d.cts +16 -0
- package/highlevel/methods/chats/get-chat-event-log.d.cts +61 -0
- package/highlevel/methods/chats/get-chat-member.d.cts +15 -0
- package/highlevel/methods/chats/get-chat-members.d.cts +51 -0
- package/highlevel/methods/chats/get-chat-preview.d.cts +12 -0
- package/highlevel/methods/chats/get-chat.d.cts +11 -0
- package/highlevel/methods/chats/get-full-chat.d.cts +11 -0
- package/highlevel/methods/chats/get-full-user.d.cts +8 -0
- package/highlevel/methods/chats/get-nearby-chats.d.cts +9 -0
- package/highlevel/methods/chats/get-similar-channels.d.cts +12 -0
- package/highlevel/methods/chats/get-user.d.cts +8 -0
- package/highlevel/methods/chats/iter-chat-event-log.d.cts +26 -0
- package/highlevel/methods/chats/iter-chat-members.d.cts +22 -0
- package/highlevel/methods/chats/join-chat.d.cts +14 -0
- package/highlevel/methods/chats/kick-chat-member.d.cts +15 -0
- package/highlevel/methods/chats/leave-chat.d.cts +13 -0
- package/highlevel/methods/chats/mark-chat-unread.d.cts +8 -0
- package/highlevel/methods/chats/open-chat.d.cts +26 -0
- package/highlevel/methods/chats/reorder-usernames.d.cts +8 -0
- package/highlevel/methods/chats/restrict-chat-member.d.cts +28 -0
- package/highlevel/methods/chats/save-draft.d.cts +10 -0
- package/highlevel/methods/chats/set-chat-color.d.cts +38 -0
- package/highlevel/methods/chats/set-chat-default-permissions.d.cts +16 -0
- package/highlevel/methods/chats/set-chat-description.d.cts +11 -0
- package/highlevel/methods/chats/set-chat-photo.d.cts +20 -0
- package/highlevel/methods/chats/set-chat-title.d.cts +11 -0
- package/highlevel/methods/chats/set-chat-ttl.d.cts +9 -0
- package/highlevel/methods/chats/set-chat-username.d.cts +11 -0
- package/highlevel/methods/chats/set-slow-mode.d.cts +12 -0
- package/highlevel/methods/chats/toggle-content-protection.d.cts +9 -0
- package/highlevel/methods/chats/toggle-fragment-username.d.cts +20 -0
- package/highlevel/methods/chats/toggle-join-requests.d.cts +12 -0
- package/highlevel/methods/chats/toggle-join-to-send.d.cts +12 -0
- package/highlevel/methods/chats/unarchive-chats.d.cts +9 -0
- package/highlevel/methods/chats/unban-chat-member.d.cts +16 -0
- package/highlevel/methods/contacts/add-contact.d.cts +28 -0
- package/highlevel/methods/contacts/delete-contacts.d.cts +12 -0
- package/highlevel/methods/contacts/get-contacts.d.cts +6 -0
- package/highlevel/methods/contacts/import-contacts.d.cts +9 -0
- package/highlevel/methods/dialogs/create-folder.d.cts +13 -0
- package/highlevel/methods/dialogs/delete-folder.d.cts +8 -0
- package/highlevel/methods/dialogs/edit-folder.d.cts +18 -0
- package/highlevel/methods/dialogs/find-dialogs.d.cts +12 -0
- package/highlevel/methods/dialogs/find-folder.d.cts +19 -0
- package/highlevel/methods/dialogs/get-chatlist-preview.d.cts +8 -0
- package/highlevel/methods/dialogs/get-folders.d.cts +9 -0
- package/highlevel/methods/dialogs/get-peer-dialogs.d.cts +10 -0
- package/highlevel/methods/dialogs/iter-dialogs.d.cts +103 -0
- package/highlevel/methods/dialogs/join-chatlist.d.cts +15 -0
- package/highlevel/methods/dialogs/set-folders-order.d.cts +7 -0
- package/highlevel/methods/files/download-buffer.d.cts +11 -0
- package/highlevel/methods/files/download-file.d.cts +1 -0
- package/highlevel/methods/files/download-iterable.cjs +9 -7
- package/highlevel/methods/files/download-iterable.d.cts +10 -0
- package/highlevel/methods/files/download-iterable.js +9 -7
- package/highlevel/methods/files/download-node-stream.d.cts +1 -0
- package/highlevel/methods/files/download-stream.d.cts +9 -0
- package/highlevel/methods/files/normalize-file-to-document.d.cts +9 -0
- package/highlevel/methods/files/normalize-input-file.d.cts +13 -0
- package/highlevel/methods/files/normalize-input-media.d.cts +12 -0
- package/highlevel/methods/files/upload-file.d.cts +72 -0
- package/highlevel/methods/files/upload-media.d.cts +28 -0
- package/highlevel/methods/forums/create-forum-topic.d.cts +36 -0
- package/highlevel/methods/forums/delete-forum-topic-history.d.cts +15 -0
- package/highlevel/methods/forums/edit-forum-topic.d.cts +34 -0
- package/highlevel/methods/forums/get-forum-topics-by-id.d.cts +9 -0
- package/highlevel/methods/forums/get-forum-topics.d.cts +28 -0
- package/highlevel/methods/forums/iter-forum-topics.d.cts +20 -0
- package/highlevel/methods/forums/reorder-pinned-forum-topics.d.cts +19 -0
- package/highlevel/methods/forums/toggle-forum-topic-closed.d.cts +22 -0
- package/highlevel/methods/forums/toggle-forum-topic-pinned.d.cts +15 -0
- package/highlevel/methods/forums/toggle-forum.d.cts +11 -0
- package/highlevel/methods/forums/toggle-general-topic-hidden.d.cts +20 -0
- package/highlevel/methods/invite-links/create-invite-link.d.cts +38 -0
- package/highlevel/methods/invite-links/edit-invite-link.d.cts +36 -0
- package/highlevel/methods/invite-links/export-invite-link.d.cts +12 -0
- package/highlevel/methods/invite-links/get-invite-link-members.d.cts +45 -0
- package/highlevel/methods/invite-links/get-invite-link.d.cts +9 -0
- package/highlevel/methods/invite-links/get-invite-links.d.cts +39 -0
- package/highlevel/methods/invite-links/get-primary-invite-link.d.cts +8 -0
- package/highlevel/methods/invite-links/hide-all-join-requests.d.cts +13 -0
- package/highlevel/methods/invite-links/hide-join-request.d.cts +13 -0
- package/highlevel/methods/invite-links/iter-invite-link-members.d.cts +25 -0
- package/highlevel/methods/invite-links/iter-invite-links.d.cts +27 -0
- package/highlevel/methods/invite-links/revoke-invite-link.d.cts +13 -0
- package/highlevel/methods/messages/_business-connection.d.cts +8 -0
- package/highlevel/methods/messages/close-poll.d.cts +15 -0
- package/highlevel/methods/messages/delete-messages.d.cts +29 -0
- package/highlevel/methods/messages/delete-scheduled-messages.d.cts +9 -0
- package/highlevel/methods/messages/edit-inline-message.d.cts +51 -0
- package/highlevel/methods/messages/edit-message.d.cts +55 -0
- package/highlevel/methods/messages/find-in-update.d.cts +13 -0
- package/highlevel/methods/messages/forward-messages.d.cts +84 -0
- package/highlevel/methods/messages/get-all-scheduled-messages.d.cts +8 -0
- package/highlevel/methods/messages/get-available-effects.d.cts +6 -0
- package/highlevel/methods/messages/get-callback-query-message.d.cts +14 -0
- package/highlevel/methods/messages/get-discussion-message.d.cts +21 -0
- package/highlevel/methods/messages/get-fact-check.d.cts +11 -0
- package/highlevel/methods/messages/get-history.d.cts +59 -0
- package/highlevel/methods/messages/get-message-by-link.d.cts +6 -0
- package/highlevel/methods/messages/get-message-group.d.cts +9 -0
- package/highlevel/methods/messages/get-message-reactions.d.cts +28 -0
- package/highlevel/methods/messages/get-messages-unsafe.d.cts +19 -0
- package/highlevel/methods/messages/get-messages.d.cts +17 -0
- package/highlevel/methods/messages/get-reaction-users.d.cts +24 -0
- package/highlevel/methods/messages/get-reply-to.d.cts +10 -0
- package/highlevel/methods/messages/get-scheduled-messages.d.cts +13 -0
- package/highlevel/methods/messages/iter-history.d.cts +23 -0
- package/highlevel/methods/messages/iter-reaction-users.d.cts +26 -0
- package/highlevel/methods/messages/iter-search-global.d.cts +27 -0
- package/highlevel/methods/messages/iter-search-messages.d.cts +26 -0
- package/highlevel/methods/messages/pin-message.d.cts +21 -0
- package/highlevel/methods/messages/read-history.d.cts +24 -0
- package/highlevel/methods/messages/read-reactions.d.cts +14 -0
- package/highlevel/methods/messages/search-global.d.cts +51 -0
- package/highlevel/methods/messages/search-hashtag.d.cts +44 -0
- package/highlevel/methods/messages/search-messages.d.cts +93 -0
- package/highlevel/methods/messages/send-answer.d.cts +12 -0
- package/highlevel/methods/messages/send-comment.d.cts +39 -0
- package/highlevel/methods/messages/send-common.d.cts +122 -0
- package/highlevel/methods/messages/send-copy-group.d.cts +21 -0
- package/highlevel/methods/messages/send-copy.d.cts +32 -0
- package/highlevel/methods/messages/send-media-group.d.cts +35 -0
- package/highlevel/methods/messages/send-media.d.cts +48 -0
- package/highlevel/methods/messages/send-paid-reaction.d.cts +24 -0
- package/highlevel/methods/messages/send-quote.d.cts +33 -0
- package/highlevel/methods/messages/send-reaction.d.cts +21 -0
- package/highlevel/methods/messages/send-reply.d.cts +12 -0
- package/highlevel/methods/messages/send-scheduled.d.cts +14 -0
- package/highlevel/methods/messages/send-text.d.cts +31 -0
- package/highlevel/methods/messages/send-text.test.d.cts +1 -0
- package/highlevel/methods/messages/send-typing.d.cts +32 -0
- package/highlevel/methods/messages/send-vote.d.cts +15 -0
- package/highlevel/methods/messages/set-typing.d.cts +33 -0
- package/highlevel/methods/messages/translate-message.d.cts +11 -0
- package/highlevel/methods/messages/translate-text.d.cts +9 -0
- package/highlevel/methods/messages/unpin-all-messages.d.cts +18 -0
- package/highlevel/methods/messages/unpin-message.d.cts +12 -0
- package/highlevel/methods/misc/chain-id.d.cts +4 -0
- package/highlevel/methods/misc/get-collectible-info.d.cts +6 -0
- package/highlevel/methods/misc/init-takeout-session.d.cts +9 -0
- package/highlevel/methods/misc/normalize-privacy-rules.d.cts +8 -0
- package/highlevel/methods/misc/normalize-text.d.cts +5 -0
- package/highlevel/methods/misc/with-params.d.cts +10 -0
- package/highlevel/methods/password/change-cloud-password.d.cts +12 -0
- package/highlevel/methods/password/enable-cloud-password.d.cts +17 -0
- package/highlevel/methods/password/password-email.d.cts +15 -0
- package/highlevel/methods/password/remove-cloud-password.d.cts +7 -0
- package/highlevel/methods/premium/accept-star-gift.d.cts +16 -0
- package/highlevel/methods/premium/apply-boost.d.cts +8 -0
- package/highlevel/methods/premium/can-apply-boost.d.cts +29 -0
- package/highlevel/methods/premium/create-business-chat-link.d.cts +12 -0
- package/highlevel/methods/premium/edit-business-chat-link.d.cts +20 -0
- package/highlevel/methods/premium/get-boost-stats.d.cts +9 -0
- package/highlevel/methods/premium/get-boosts.d.cts +18 -0
- package/highlevel/methods/premium/get-business-chat-links.d.cts +6 -0
- package/highlevel/methods/premium/get-business-connection.d.cts +8 -0
- package/highlevel/methods/premium/get-my-boost-slots.d.cts +9 -0
- package/highlevel/methods/premium/get-star-gift-options.d.cts +6 -0
- package/highlevel/methods/premium/get-star-gifts.d.cts +22 -0
- package/highlevel/methods/premium/get-stars-transactions.d.cts +34 -0
- package/highlevel/methods/premium/iter-boosters.d.cts +24 -0
- package/highlevel/methods/premium/iter-star-gifts.d.cts +26 -0
- package/highlevel/methods/premium/iter-stars-transactions.d.cts +29 -0
- package/highlevel/methods/premium/send-star-gift.d.cts +35 -0
- package/highlevel/methods/premium/set-business-intro.d.cts +22 -0
- package/highlevel/methods/premium/set-business-work-hours.d.cts +18 -0
- package/highlevel/methods/stickers/_utils.d.cts +10 -0
- package/highlevel/methods/stickers/add-sticker-to-set.d.cts +21 -0
- package/highlevel/methods/stickers/create-sticker-set.d.cts +66 -0
- package/highlevel/methods/stickers/delete-sticker-from-set.d.cts +15 -0
- package/highlevel/methods/stickers/get-custom-emojis.d.cts +14 -0
- package/highlevel/methods/stickers/get-installed-stickers.d.cts +10 -0
- package/highlevel/methods/stickers/get-my-sticker-sets.d.cts +13 -0
- package/highlevel/methods/stickers/get-sticker-set.d.cts +8 -0
- package/highlevel/methods/stickers/move-sticker-in-set.d.cts +17 -0
- package/highlevel/methods/stickers/replace-sticker-in-set.d.cts +24 -0
- package/highlevel/methods/stickers/set-chat-sticker-set.d.cts +11 -0
- package/highlevel/methods/stickers/set-sticker-set-thumb.d.cts +20 -0
- package/highlevel/methods/stories/can-send-story.d.cts +13 -0
- package/highlevel/methods/stories/delete-stories.d.cts +20 -0
- package/highlevel/methods/stories/edit-story.d.cts +38 -0
- package/highlevel/methods/stories/find-in-update.d.cts +5 -0
- package/highlevel/methods/stories/get-all-stories.d.cts +15 -0
- package/highlevel/methods/stories/get-peer-stories.d.cts +8 -0
- package/highlevel/methods/stories/get-profile-stories.d.cts +25 -0
- package/highlevel/methods/stories/get-stories-by-id.d.cts +10 -0
- package/highlevel/methods/stories/get-stories-interactions.d.cts +9 -0
- package/highlevel/methods/stories/get-story-link.d.cts +11 -0
- package/highlevel/methods/stories/get-story-viewers.d.cts +33 -0
- package/highlevel/methods/stories/hide-my-stories-views.d.cts +21 -0
- package/highlevel/methods/stories/increment-stories-views.d.cts +13 -0
- package/highlevel/methods/stories/iter-all-stories.d.cts +16 -0
- package/highlevel/methods/stories/iter-profile-stories.d.cts +21 -0
- package/highlevel/methods/stories/iter-story-viewers.d.cts +22 -0
- package/highlevel/methods/stories/read-stories.d.cts +11 -0
- package/highlevel/methods/stories/send-story-reaction.d.cts +14 -0
- package/highlevel/methods/stories/send-story.d.cts +51 -0
- package/highlevel/methods/stories/toggle-peer-stories-archived.d.cts +8 -0
- package/highlevel/methods/stories/toggle-stories-pinned.d.cts +24 -0
- package/highlevel/methods/users/block-user.d.cts +8 -0
- package/highlevel/methods/users/delete-profile-photos.d.cts +9 -0
- package/highlevel/methods/users/edit-close-friends.d.cts +14 -0
- package/highlevel/methods/users/get-common-chats.d.cts +9 -0
- package/highlevel/methods/users/get-global-ttl.d.cts +5 -0
- package/highlevel/methods/users/get-me.d.cts +6 -0
- package/highlevel/methods/users/get-my-username.d.cts +8 -0
- package/highlevel/methods/users/get-profile-photo.d.cts +11 -0
- package/highlevel/methods/users/get-profile-photos.d.cts +22 -0
- package/highlevel/methods/users/get-users.d.cts +12 -0
- package/highlevel/methods/users/get-users.test.d.cts +1 -0
- package/highlevel/methods/users/is-peer-available.d.cts +20 -0
- package/highlevel/methods/users/iter-profile-photos.d.cts +23 -0
- package/highlevel/methods/users/resolve-peer-many.d.cts +26 -0
- package/highlevel/methods/users/resolve-peer.d.cts +20 -0
- package/highlevel/methods/users/resolve-peer.test.d.cts +1 -0
- package/highlevel/methods/users/set-emoji-status.d.cts +32 -0
- package/highlevel/methods/users/set-global-ttl.d.cts +8 -0
- package/highlevel/methods/users/set-my-birthday.d.cts +12 -0
- package/highlevel/methods/users/set-my-profile-photo.d.cts +16 -0
- package/highlevel/methods/users/set-my-username.d.cts +11 -0
- package/highlevel/methods/users/set-online.d.cts +19 -0
- package/highlevel/methods/users/unblock-user.d.cts +8 -0
- package/highlevel/methods/users/update-profile.d.cts +23 -0
- package/highlevel/methods.d.cts +291 -0
- package/highlevel/storage/index.d.cts +4 -0
- package/highlevel/storage/provider.d.cts +7 -0
- package/highlevel/storage/repository/peers.d.cts +44 -0
- package/highlevel/storage/repository/ref-messages.d.cts +20 -0
- package/highlevel/storage/service/current-user.d.cts +23 -0
- package/highlevel/storage/service/peers.d.cts +23 -0
- package/highlevel/storage/service/ref-messages.d.cts +15 -0
- package/highlevel/storage/service/updates.d.cts +16 -0
- package/highlevel/storage/storage.d.cts +27 -0
- package/highlevel/types/auth/index.d.cts +1 -0
- package/highlevel/types/auth/sent-code.d.cts +56 -0
- package/highlevel/types/bots/command-scope/index.d.cts +10 -0
- package/highlevel/types/bots/command-scope/inner.d.cts +54 -0
- package/highlevel/types/bots/game-high-score.d.cts +23 -0
- package/highlevel/types/bots/index.d.cts +6 -0
- package/highlevel/types/bots/inline-message/factories.d.cts +47 -0
- package/highlevel/types/bots/inline-message/index.d.cts +3 -0
- package/highlevel/types/bots/inline-message/types.d.cts +114 -0
- package/highlevel/types/bots/inline-result/factories.d.cts +97 -0
- package/highlevel/types/bots/inline-result/index.d.cts +3 -0
- package/highlevel/types/bots/inline-result/types.d.cts +417 -0
- package/highlevel/types/bots/keyboards/builder.d.cts +38 -0
- package/highlevel/types/bots/keyboards/builder.test.d.cts +1 -0
- package/highlevel/types/bots/keyboards/factories.d.cts +208 -0
- package/highlevel/types/bots/keyboards/index.d.cts +15 -0
- package/highlevel/types/bots/keyboards/keyboards.test.d.cts +1 -0
- package/highlevel/types/bots/keyboards/types.d.cts +34 -0
- package/highlevel/types/bots/webview.d.cts +114 -0
- package/highlevel/types/calls/discard-reason.d.cts +13 -0
- package/highlevel/types/calls/index.d.cts +1 -0
- package/highlevel/types/conversation.d.cts +210 -0
- package/highlevel/types/errors.d.cts +33 -0
- package/highlevel/types/files/file-location.d.cts +48 -0
- package/highlevel/types/files/index.d.cts +4 -0
- package/highlevel/types/files/uploaded-file.d.cts +24 -0
- package/highlevel/types/files/utils.d.cts +89 -0
- package/highlevel/types/files/web-document.d.cts +32 -0
- package/highlevel/types/index.d.cts +15 -0
- package/highlevel/types/media/audio.d.cts +31 -0
- package/highlevel/types/media/contact.d.cts +31 -0
- package/highlevel/types/media/dice.d.cts +155 -0
- package/highlevel/types/media/document-utils.d.cts +11 -0
- package/highlevel/types/media/document.d.cts +75 -0
- package/highlevel/types/media/extended-media.d.cts +20 -0
- package/highlevel/types/media/game.d.cts +38 -0
- package/highlevel/types/media/index.d.cts +19 -0
- package/highlevel/types/media/input-media/factories.d.cts +142 -0
- package/highlevel/types/media/input-media/index.d.cts +3 -0
- package/highlevel/types/media/input-media/types.d.cts +520 -0
- package/highlevel/types/media/invoice.d.cts +89 -0
- package/highlevel/types/media/location.d.cts +83 -0
- package/highlevel/types/media/paid-media.d.cts +33 -0
- package/highlevel/types/media/photo.d.cts +72 -0
- package/highlevel/types/media/poll.d.cts +110 -0
- package/highlevel/types/media/sticker.d.cts +123 -0
- package/highlevel/types/media/story.d.cts +33 -0
- package/highlevel/types/media/thumbnail.d.cts +70 -0
- package/highlevel/types/media/venue.d.cts +58 -0
- package/highlevel/types/media/video.d.cts +48 -0
- package/highlevel/types/media/voice.d.cts +23 -0
- package/highlevel/types/media/web-page.d.cts +151 -0
- package/highlevel/types/messages/dialog.d.cts +110 -0
- package/highlevel/types/messages/draft-message.d.cts +29 -0
- package/highlevel/types/messages/fact-check.d.cts +30 -0
- package/highlevel/types/messages/index.d.cts +14 -0
- package/highlevel/types/messages/input-message-id.d.cts +20 -0
- package/highlevel/types/messages/message-action.d.cts +420 -0
- package/highlevel/types/messages/message-effect.d.cts +20 -0
- package/highlevel/types/messages/message-entity.d.cts +89 -0
- package/highlevel/types/messages/message-forward.d.cts +39 -0
- package/highlevel/types/messages/message-media.d.cts +23 -0
- package/highlevel/types/messages/message-reactions.d.cts +31 -0
- package/highlevel/types/messages/message-replies.d.cts +42 -0
- package/highlevel/types/messages/message.d.cts +249 -0
- package/highlevel/types/messages/replied-message.d.cts +103 -0
- package/highlevel/types/messages/search-filters.d.cts +82 -0
- package/highlevel/types/misc/app-config.d.cts +887 -0
- package/highlevel/types/misc/collectible-info.d.cts +27 -0
- package/highlevel/types/misc/entities.d.cts +22 -0
- package/highlevel/types/misc/index.d.cts +6 -0
- package/highlevel/types/misc/input-privacy-rule/allow.d.cts +22 -0
- package/highlevel/types/misc/input-privacy-rule/bundle.d.cts +3 -0
- package/highlevel/types/misc/input-privacy-rule/disallow.d.cts +20 -0
- package/highlevel/types/misc/input-privacy-rule/index.d.cts +3 -0
- package/highlevel/types/misc/input-privacy-rule/types.d.cts +11 -0
- package/highlevel/types/misc/sticker-set.d.cts +154 -0
- package/highlevel/types/misc/takeout-session.d.cts +49 -0
- package/highlevel/types/peers/bot-info.d.cts +21 -0
- package/highlevel/types/peers/chat-colors.d.cts +25 -0
- package/highlevel/types/peers/chat-event/actions.d.cts +279 -0
- package/highlevel/types/peers/chat-event/filters.d.cts +10 -0
- package/highlevel/types/peers/chat-event/index.d.cts +27 -0
- package/highlevel/types/peers/chat-invite-link-member.d.cts +33 -0
- package/highlevel/types/peers/chat-invite-link.d.cts +72 -0
- package/highlevel/types/peers/chat-location.d.cts +17 -0
- package/highlevel/types/peers/chat-member.d.cts +86 -0
- package/highlevel/types/peers/chat-permissions.d.cts +127 -0
- package/highlevel/types/peers/chat-photo.d.cts +39 -0
- package/highlevel/types/peers/chat-preview.d.cts +55 -0
- package/highlevel/types/peers/chat.d.cts +250 -0
- package/highlevel/types/peers/chatlist-preview.d.cts +21 -0
- package/highlevel/types/peers/forum-topic.d.cts +96 -0
- package/highlevel/types/peers/full-chat.cjs +1 -1
- package/highlevel/types/peers/full-chat.d.cts +161 -0
- package/highlevel/types/peers/full-chat.js +1 -1
- package/highlevel/types/peers/full-user.d.cts +115 -0
- package/highlevel/types/peers/index.d.cts +19 -0
- package/highlevel/types/peers/index.d.ts +1 -0
- package/highlevel/types/peers/peer.d.cts +49 -0
- package/highlevel/types/peers/peers-index.d.cts +15 -0
- package/highlevel/types/peers/peers-index.test.d.cts +1 -0
- package/highlevel/types/peers/typing-status.d.cts +26 -0
- package/highlevel/types/peers/user.d.cts +268 -0
- package/highlevel/types/peers/user.test.d.cts +1 -0
- package/highlevel/types/premium/boost-slot.d.cts +37 -0
- package/highlevel/types/premium/boost-stats.d.cts +54 -0
- package/highlevel/types/premium/boost.d.cts +56 -0
- package/highlevel/types/premium/boost.d.ts +1 -2
- package/highlevel/types/premium/business-account.d.cts +19 -0
- package/highlevel/types/premium/business-chat-link.d.cts +19 -0
- package/highlevel/types/premium/business-connection.d.cts +23 -0
- package/highlevel/types/premium/business-intro.d.cts +22 -0
- package/highlevel/types/premium/business-location.d.cts +10 -0
- package/highlevel/types/premium/business-work-hours.d.cts +42 -0
- package/highlevel/types/premium/business-work-hours.test.d.cts +1 -0
- package/highlevel/types/premium/index.d.cts +12 -0
- package/highlevel/types/premium/index.d.ts +1 -0
- package/highlevel/types/premium/stars-gift.d.cts +68 -0
- package/highlevel/types/premium/stars-status.d.cts +16 -0
- package/highlevel/types/premium/stars-status.d.ts +1 -1
- package/highlevel/types/premium/stars-transaction.cjs +7 -3
- package/highlevel/types/premium/stars-transaction.d.cts +134 -0
- package/highlevel/types/premium/stars-transaction.d.ts +1 -1
- package/highlevel/types/premium/stars-transaction.js +7 -3
- package/highlevel/types/reactions/emoji-status.d.cts +12 -0
- package/highlevel/types/reactions/index.d.cts +4 -0
- package/highlevel/types/reactions/index.d.ts +2 -0
- package/highlevel/types/reactions/peer-reaction.d.cts +53 -0
- package/highlevel/types/reactions/reaction-count.d.cts +25 -0
- package/highlevel/types/reactions/types.d.cts +16 -0
- package/highlevel/types/stories/all-stories.d.cts +28 -0
- package/highlevel/types/stories/index.d.cts +7 -0
- package/highlevel/types/stories/interactive/base.d.cts +16 -0
- package/highlevel/types/stories/interactive/channel-post.d.cts +17 -0
- package/highlevel/types/stories/interactive/index.d.cts +12 -0
- package/highlevel/types/stories/interactive/input.d.cts +68 -0
- package/highlevel/types/stories/interactive/location.d.cts +15 -0
- package/highlevel/types/stories/interactive/reaction.d.cts +21 -0
- package/highlevel/types/stories/interactive/url.d.cts +11 -0
- package/highlevel/types/stories/interactive/venue.d.cts +28 -0
- package/highlevel/types/stories/interactive/weather.d.cts +15 -0
- package/highlevel/types/stories/peer-stories.d.cts +20 -0
- package/highlevel/types/stories/stealth-mode.d.cts +9 -0
- package/highlevel/types/stories/story-interactions.d.cts +34 -0
- package/highlevel/types/stories/story-viewer.d.cts +75 -0
- package/highlevel/types/stories/story.d.cts +79 -0
- package/highlevel/types/updates/bot-chat-join-request.d.cts +42 -0
- package/highlevel/types/updates/bot-reaction.d.cts +71 -0
- package/highlevel/types/updates/bot-stopped.d.cts +28 -0
- package/highlevel/types/updates/business-message.d.cts +18 -0
- package/highlevel/types/updates/callback-query.d.cts +95 -0
- package/highlevel/types/updates/chat-join-request.d.cts +30 -0
- package/highlevel/types/updates/chat-member-update.cjs +1 -0
- package/highlevel/types/updates/chat-member-update.d.cts +76 -0
- package/highlevel/types/updates/chat-member-update.js +1 -0
- package/highlevel/types/updates/chosen-inline-result.d.cts +50 -0
- package/highlevel/types/updates/delete-business-message-update.d.cts +21 -0
- package/highlevel/types/updates/delete-message-update.d.cts +16 -0
- package/highlevel/types/updates/delete-story-update.d.cts +18 -0
- package/highlevel/types/updates/history-read-update.d.cts +39 -0
- package/highlevel/types/updates/index.d.cts +107 -0
- package/highlevel/types/updates/inline-query.d.cts +42 -0
- package/highlevel/types/updates/parse-update.d.cts +4 -0
- package/highlevel/types/updates/poll-update.d.cts +39 -0
- package/highlevel/types/updates/poll-vote.d.cts +52 -0
- package/highlevel/types/updates/pre-checkout-query.d.cts +36 -0
- package/highlevel/types/updates/story-update.d.cts +22 -0
- package/highlevel/types/updates/user-status-update.d.cts +28 -0
- package/highlevel/types/updates/user-typing-update.d.cts +31 -0
- package/highlevel/types/utils.d.cts +12 -0
- package/highlevel/updates/index.d.cts +2 -0
- package/highlevel/updates/manager.d.cts +121 -0
- package/highlevel/updates/parsed.d.cts +26 -0
- package/highlevel/updates/types.d.cts +147 -0
- package/highlevel/updates/utils.d.cts +21 -0
- package/highlevel/utils/convert-file-id.d.cts +46 -0
- package/highlevel/utils/entities.d.cts +19 -0
- package/highlevel/utils/entities.test.d.cts +1 -0
- package/highlevel/utils/file-type.d.cts +2 -0
- package/highlevel/utils/file-type.test.d.cts +1 -0
- package/highlevel/utils/file-utils.d.cts +31 -0
- package/highlevel/utils/file-utils.test.d.cts +1 -0
- package/highlevel/utils/index.d.cts +11 -0
- package/highlevel/utils/inline-utils.d.cts +14 -0
- package/highlevel/utils/inline-utils.test.d.cts +1 -0
- package/highlevel/utils/inspectable.d.cts +9 -0
- package/highlevel/utils/inspectable.test.d.cts +1 -0
- package/highlevel/utils/memoize.d.cts +1 -0
- package/highlevel/utils/memoize.test.d.cts +1 -0
- package/highlevel/utils/misc-utils.d.cts +12 -0
- package/highlevel/utils/peer-utils.d.cts +11 -0
- package/highlevel/utils/peer-utils.test.d.cts +1 -0
- package/highlevel/utils/query-batcher.d.cts +49 -0
- package/highlevel/utils/query-batcher.test.d.cts +1 -0
- package/highlevel/utils/rps-meter.d.cts +9 -0
- package/highlevel/utils/stream-utils.d.cts +1 -0
- package/highlevel/utils/string-session.d.cts +16 -0
- package/highlevel/utils/string-session.test.d.cts +1 -0
- package/highlevel/utils/voice-utils.d.cts +14 -0
- package/highlevel/utils/voice-utils.test.d.cts +1 -0
- package/highlevel/worker/app-config.d.cts +9 -0
- package/highlevel/worker/errors.d.cts +8 -0
- package/highlevel/worker/index.d.cts +3 -0
- package/highlevel/worker/invoker.d.cts +18 -0
- package/highlevel/worker/port.d.cts +60 -0
- package/highlevel/worker/protocol.d.cts +57 -0
- package/highlevel/worker/storage.d.cts +39 -0
- package/highlevel/worker/worker.d.cts +15 -0
- package/index.cjs +8 -0
- package/index.d.cts +10 -0
- package/index.js +8 -0
- package/methods.d.cts +1 -0
- package/network/auth-key.d.cts +21 -0
- package/network/auth-key.test.d.cts +1 -0
- package/network/authorization.d.cts +9 -0
- package/network/client.d.cts +218 -0
- package/network/config-manager.d.cts +19 -0
- package/network/config-manager.test.d.cts +1 -0
- package/network/index.d.cts +6 -0
- package/network/middlewares/bundle.d.cts +3 -0
- package/network/middlewares/default.d.cts +8 -0
- package/network/middlewares/flood-waiter.d.cts +37 -0
- package/network/middlewares/index.d.cts +4 -0
- package/network/middlewares/index.d.ts +2 -0
- package/network/middlewares/internal-errors.d.cts +17 -0
- package/network/middlewares/on-error.d.cts +30 -0
- package/network/middlewares/on-method.d.cts +39 -0
- package/network/mtproto-session.d.cts +127 -0
- package/network/mtproxy/_fake-tls.d.cts +22 -0
- package/network/mtproxy/index.d.cts +42 -0
- package/network/multi-session-connection.cjs +25 -43
- package/network/multi-session-connection.d.cts +43 -0
- package/network/multi-session-connection.d.ts +5 -5
- package/network/multi-session-connection.js +25 -43
- package/network/network-manager.cjs +7 -20
- package/network/network-manager.d.cts +256 -0
- package/network/network-manager.js +7 -20
- package/network/persistent-connection.cjs +8 -0
- package/network/persistent-connection.d.cts +55 -0
- package/network/persistent-connection.d.ts +3 -1
- package/network/persistent-connection.js +8 -0
- package/network/server-salt.d.cts +12 -0
- package/network/session-connection.cjs +35 -18
- package/network/session-connection.d.cts +94 -0
- package/network/session-connection.d.ts +5 -3
- package/network/session-connection.js +35 -18
- package/network/transports/abstract.d.cts +47 -0
- package/network/transports/index.d.cts +3 -0
- package/network/transports/intermediate.d.cts +23 -0
- package/network/transports/intermediate.test.d.cts +1 -0
- package/network/transports/obfuscated.d.cts +23 -0
- package/network/transports/obfuscated.test.d.cts +1 -0
- package/package.json +13 -13
- package/storage/driver.d.cts +58 -0
- package/storage/index.d.cts +6 -0
- package/storage/memory/driver.d.cts +6 -0
- package/storage/memory/index.d.cts +22 -0
- package/storage/memory/memory.test.d.cts +1 -0
- package/storage/memory/repository/auth-keys.d.cts +19 -0
- package/storage/memory/repository/kv.d.cts +11 -0
- package/storage/memory/repository/peers.d.cts +18 -0
- package/storage/memory/repository/ref-messages.d.cts +16 -0
- package/storage/provider.d.cts +10 -0
- package/storage/repository/auth-keys.d.cts +41 -0
- package/storage/repository/index.d.cts +2 -0
- package/storage/repository/key-value.d.cts +10 -0
- package/storage/service/auth-keys.d.cts +9 -0
- package/storage/service/auth-keys.test.d.cts +1 -0
- package/storage/service/base.d.cts +19 -0
- package/storage/service/default-dcs.d.cts +10 -0
- package/storage/service/future-salts.d.cts +11 -0
- package/storage/service/updates.test.d.cts +1 -0
- package/storage/service/utils.test-utils.d.cts +2 -0
- package/storage/sqlite/driver.d.cts +24 -0
- package/storage/sqlite/index.d.cts +17 -0
- package/storage/sqlite/repository/auth-keys.d.cts +20 -0
- package/storage/sqlite/repository/kv.d.cts +14 -0
- package/storage/sqlite/repository/peers.d.cts +19 -0
- package/storage/sqlite/repository/ref-messages.d.cts +16 -0
- package/storage/sqlite/types.d.cts +18 -0
- package/storage/storage.d.cts +55 -0
- package/types/errors.d.cts +53 -0
- package/types/index.d.cts +4 -0
- package/types/peers.d.cts +4 -0
- package/types/platform.d.cts +15 -0
- package/types/utils.d.cts +9 -0
- package/utils/abort-signal.d.cts +1 -0
- package/utils/bigint-utils.d.cts +18 -0
- package/utils/bigint-utils.test.d.cts +1 -0
- package/utils/binary/asn1-parser.d.cts +17 -0
- package/utils/crypto/abstract.d.cts +29 -0
- package/utils/crypto/factorization.d.cts +6 -0
- package/utils/crypto/factorization.test.d.cts +1 -0
- package/utils/crypto/index.d.cts +6 -0
- package/utils/crypto/keys.d.cts +27 -0
- package/utils/crypto/keys.test.d.cts +1 -0
- package/utils/crypto/miller-rabin.d.cts +2 -0
- package/utils/crypto/miller-rabin.test.d.cts +1 -0
- package/utils/crypto/mtproto.d.cts +31 -0
- package/utils/crypto/mtproto.test.d.cts +1 -0
- package/utils/crypto/password.d.cts +29 -0
- package/utils/crypto/password.test.d.cts +1 -0
- package/utils/dcs.d.cts +18 -0
- package/utils/early-timer.d.cts +41 -0
- package/utils/error-reporting.d.cts +3 -0
- package/utils/function-utils.d.cts +22 -0
- package/utils/function-utils.test.d.cts +1 -0
- package/utils/index.d.cts +20 -0
- package/utils/linked-list.d.cts +21 -0
- package/utils/linked-list.test.d.cts +1 -0
- package/utils/links/bots.d.cts +72 -0
- package/utils/links/bots.test.d.cts +1 -0
- package/utils/links/bundle.d.cts +7 -0
- package/utils/links/calls.d.cts +17 -0
- package/utils/links/chat.d.cts +47 -0
- package/utils/links/chat.test.d.cts +1 -0
- package/utils/links/common.d.cts +31 -0
- package/utils/links/index.d.cts +2 -0
- package/utils/links/misc.d.cts +26 -0
- package/utils/links/misc.test.d.cts +1 -0
- package/utils/links/proxy.d.cts +18 -0
- package/utils/links/proxy.test.d.cts +1 -0
- package/utils/links/stickers.d.cts +10 -0
- package/utils/links/user.d.cts +28 -0
- package/utils/links/user.test.d.cts +1 -0
- package/utils/logger.d.cts +54 -0
- package/utils/logger.test.d.cts +1 -0
- package/utils/long-utils.d.cts +67 -0
- package/utils/long-utils.test.d.cts +1 -0
- package/utils/misc-utils.d.cts +2 -0
- package/utils/peer-utils.d.cts +29 -0
- package/utils/peer-utils.test.d.cts +1 -0
- package/utils/sorted-array.d.cts +17 -0
- package/utils/sorted-array.test.d.cts +1 -0
- package/utils/timers.d.cts +1 -0
- package/utils/tl-json.d.cts +13 -0
- package/utils/tl-json.test.d.cts +1 -0
- package/utils/type-assertions.d.cts +29 -0
- package/utils/type-assertions.test.d.cts +1 -0
- package/utils.d.cts +1 -0
- package/worker.d.cts +1 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { Message } from '../../types/messages/message.js';
|
|
4
|
+
import { TextWithEntities } from '../../types/misc/entities.js';
|
|
5
|
+
import { InputPeerLike } from '../../types/peers/index.js';
|
|
6
|
+
export interface CommonSendParams {
|
|
7
|
+
/**
|
|
8
|
+
* Message to reply to. Either a message object or message ID.
|
|
9
|
+
*
|
|
10
|
+
* For forums - can also be an ID of the topic (i.e. its top message ID)
|
|
11
|
+
*
|
|
12
|
+
* Can also be a message from another chat, in which case a quote will be sent.
|
|
13
|
+
*/
|
|
14
|
+
replyTo?: number | Message;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to throw an error if {@link replyTo}
|
|
17
|
+
* message does not exist.
|
|
18
|
+
*
|
|
19
|
+
* If that message was not found, `NotFoundError` is thrown,
|
|
20
|
+
* with `text` set to `MESSAGE_NOT_FOUND`.
|
|
21
|
+
*
|
|
22
|
+
* Incurs an additional request, so only use when really needed.
|
|
23
|
+
*
|
|
24
|
+
* @default `false`
|
|
25
|
+
*/
|
|
26
|
+
mustReply?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Message to comment to. Either a message object or message ID.
|
|
29
|
+
*
|
|
30
|
+
* This overwrites `replyTo` if it was passed
|
|
31
|
+
*/
|
|
32
|
+
commentTo?: number | Message;
|
|
33
|
+
/**
|
|
34
|
+
* Story to reply to.
|
|
35
|
+
*
|
|
36
|
+
* Must be the story sent by the peer you are sending the message to.
|
|
37
|
+
*
|
|
38
|
+
* Can't be used together with {@link replyTo} or {@link commentTo}.
|
|
39
|
+
*/
|
|
40
|
+
replyToStory?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Quoted text. Must be exactly contained in the message
|
|
43
|
+
* being quoted to be accepted by the server (as well as entities)
|
|
44
|
+
*/
|
|
45
|
+
quote?: TextWithEntities;
|
|
46
|
+
/**
|
|
47
|
+
* Offset of the start of the quote in the message.
|
|
48
|
+
*/
|
|
49
|
+
quoteOffset?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Whether to send this message silently.
|
|
52
|
+
*/
|
|
53
|
+
silent?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If set, the message will be scheduled to this date.
|
|
56
|
+
* When passing a number, a UNIX time in ms is expected.
|
|
57
|
+
*
|
|
58
|
+
* You can also pass `online` - this will send the message
|
|
59
|
+
* once the peer is online. Note that this requires that
|
|
60
|
+
* peer's online status to be visible to you.
|
|
61
|
+
*/
|
|
62
|
+
schedule?: Date | number | 'online';
|
|
63
|
+
/**
|
|
64
|
+
* Whether to clear draft after sending this message.
|
|
65
|
+
*
|
|
66
|
+
* @default `false`
|
|
67
|
+
*/
|
|
68
|
+
clearDraft?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to disallow further forwards of this message.
|
|
71
|
+
*
|
|
72
|
+
* Only for bots, works even if the target chat does not
|
|
73
|
+
* have content protection.
|
|
74
|
+
*/
|
|
75
|
+
forbidForwards?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Peer to use when sending the message.
|
|
78
|
+
*/
|
|
79
|
+
sendAs?: InputPeerLike;
|
|
80
|
+
/**
|
|
81
|
+
* If passed, instead of sending the message, it will be saved into the
|
|
82
|
+
* given quick reply shortcut (either its ID or its shortcut string).
|
|
83
|
+
*/
|
|
84
|
+
quickReply?: number | string;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to dispatch the returned message to the client's update handler.
|
|
87
|
+
* Doesn't follow `disableNoDispatch`
|
|
88
|
+
*/
|
|
89
|
+
shouldDispatch?: true;
|
|
90
|
+
/**
|
|
91
|
+
* Unique identifier of the business connection on behalf of which
|
|
92
|
+
* the message will be sent
|
|
93
|
+
*/
|
|
94
|
+
businessConnectionId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Bots only: if set, allows sending up to 1000 messages per second,
|
|
97
|
+
* ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message.
|
|
98
|
+
* The Stars will be withdrawn from the bot's balance.
|
|
99
|
+
*/
|
|
100
|
+
allowPaidFloodskip?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* ID of a message effect to use when sending the message
|
|
103
|
+
* (see {@link TelegramClient.getAvailableMessageEffects})
|
|
104
|
+
*/
|
|
105
|
+
effect?: tl.Long;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
* @noemit
|
|
110
|
+
*/
|
|
111
|
+
export declare function _normalizeQuickReplyShortcut(shortcut: number | string | undefined): tl.TypeInputQuickReplyShortcut | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* @internal
|
|
114
|
+
* @noemit
|
|
115
|
+
*/
|
|
116
|
+
export declare function _processCommonSendParameters(client: ITelegramClient, chatId: InputPeerLike, params: CommonSendParams): Promise<{
|
|
117
|
+
peer: tl.TypeInputPeer;
|
|
118
|
+
replyTo: tl.TypeInputReplyTo | undefined;
|
|
119
|
+
scheduleDate: number | undefined;
|
|
120
|
+
quickReplyShortcut: tl.TypeInputQuickReplyShortcut | undefined;
|
|
121
|
+
chainId: string;
|
|
122
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { Message } from '../../types/messages/message.js';
|
|
3
|
+
import { InputPeerLike } from '../../types/peers/index.js';
|
|
4
|
+
import { CommonSendParams } from './send-common.js';
|
|
5
|
+
export interface SendCopyGroupParams extends CommonSendParams {
|
|
6
|
+
/** Destination chat ID */
|
|
7
|
+
toChatId: InputPeerLike;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Copy a message group (i.e. send the same message group, but do not forward it).
|
|
11
|
+
*
|
|
12
|
+
* Note that all the provided messages must be in the same message group
|
|
13
|
+
*/
|
|
14
|
+
export declare function sendCopyGroup(client: ITelegramClient, params: SendCopyGroupParams & ({
|
|
15
|
+
/** Source chat ID */
|
|
16
|
+
fromChatId: InputPeerLike;
|
|
17
|
+
/** Message IDs to forward */
|
|
18
|
+
messages: number[];
|
|
19
|
+
} | {
|
|
20
|
+
messages: Message[];
|
|
21
|
+
})): Promise<Message[]>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputPeerLike, InputText, Message, ReplyMarkup } from '../../types/index.js';
|
|
3
|
+
import { CommonSendParams } from './send-common.js';
|
|
4
|
+
export interface SendCopyParams extends CommonSendParams {
|
|
5
|
+
/** Target chat ID */
|
|
6
|
+
toChatId: InputPeerLike;
|
|
7
|
+
/**
|
|
8
|
+
* New message caption (only used for media)
|
|
9
|
+
*/
|
|
10
|
+
caption?: InputText;
|
|
11
|
+
/**
|
|
12
|
+
* For bots: inline or reply markup or an instruction
|
|
13
|
+
* to hide a reply keyboard or to force a reply.
|
|
14
|
+
*/
|
|
15
|
+
replyMarkup?: ReplyMarkup;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Copy a message (i.e. send the same message, but do not forward it).
|
|
19
|
+
*
|
|
20
|
+
* Note that if the message contains a webpage,
|
|
21
|
+
* it will be copied simply as a text message,
|
|
22
|
+
* and if the message contains an invoice,
|
|
23
|
+
* it can't be copied.
|
|
24
|
+
*/
|
|
25
|
+
export declare function sendCopy(client: ITelegramClient, params: SendCopyParams & ({
|
|
26
|
+
/** Source chat ID */
|
|
27
|
+
fromChatId: InputPeerLike;
|
|
28
|
+
/** Message ID to forward */
|
|
29
|
+
message: number;
|
|
30
|
+
} | {
|
|
31
|
+
message: Message;
|
|
32
|
+
})): Promise<Message>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputMediaLike } from '../../types/media/input-media/types.js';
|
|
3
|
+
import { InputPeerLike } from '../../types/peers/index.js';
|
|
4
|
+
import { CommonSendParams } from './send-common.js';
|
|
5
|
+
import { Message } from '../../types/messages/message.js';
|
|
6
|
+
/**
|
|
7
|
+
* Send a group of media.
|
|
8
|
+
*
|
|
9
|
+
* To add a caption to the group, add caption to the first
|
|
10
|
+
* media in the group and don't add caption for any other.
|
|
11
|
+
*
|
|
12
|
+
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
13
|
+
* @param medias Medias contained in the message.
|
|
14
|
+
* @param params Additional sending parameters
|
|
15
|
+
* @link InputMedia
|
|
16
|
+
*/
|
|
17
|
+
export declare function sendMediaGroup(client: ITelegramClient, chatId: InputPeerLike, medias: (InputMediaLike | string)[], params?: CommonSendParams & {
|
|
18
|
+
/**
|
|
19
|
+
* Whether to invert media position.
|
|
20
|
+
*
|
|
21
|
+
* Currently only supported for web previews and makes the
|
|
22
|
+
* client render the preview above the caption and not below.
|
|
23
|
+
*/
|
|
24
|
+
invertMedia?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Function that will be called after some part has been uploaded.
|
|
27
|
+
* Only used when a file that requires uploading is passed,
|
|
28
|
+
* and not used when uploading a thumbnail.
|
|
29
|
+
*
|
|
30
|
+
* @param index Index of the media in the original array
|
|
31
|
+
* @param uploaded Number of bytes already uploaded
|
|
32
|
+
* @param total Total file size
|
|
33
|
+
*/
|
|
34
|
+
progressCallback?: (index: number, uploaded: number, total: number) => void;
|
|
35
|
+
}): Promise<Message[]>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { ReplyMarkup } from '../../types/bots/keyboards/index.js';
|
|
3
|
+
import { InputMediaLike } from '../../types/media/input-media/types.js';
|
|
4
|
+
import { Message } from '../../types/messages/message.js';
|
|
5
|
+
import { InputText } from '../../types/misc/entities.js';
|
|
6
|
+
import { InputPeerLike } from '../../types/peers/index.js';
|
|
7
|
+
import { CommonSendParams } from './send-common.js';
|
|
8
|
+
/**
|
|
9
|
+
* Send a single media (a photo or a document-based media)
|
|
10
|
+
*
|
|
11
|
+
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
12
|
+
* @param media
|
|
13
|
+
* Media contained in the message. You can also pass TDLib
|
|
14
|
+
* and Bot API compatible File ID, which will be wrapped
|
|
15
|
+
* in {@link InputMedia.auto}
|
|
16
|
+
* @param params Additional sending parameters
|
|
17
|
+
* @link InputMedia
|
|
18
|
+
*/
|
|
19
|
+
export declare function sendMedia(client: ITelegramClient, chatId: InputPeerLike, media: InputMediaLike | string, params?: CommonSendParams & {
|
|
20
|
+
/**
|
|
21
|
+
* For bots: inline or reply markup or an instruction
|
|
22
|
+
* to hide a reply keyboard or to force a reply.
|
|
23
|
+
*/
|
|
24
|
+
replyMarkup?: ReplyMarkup;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to invert media position.
|
|
27
|
+
*
|
|
28
|
+
* Currently only supported for web previews and makes the
|
|
29
|
+
* client render the preview above the caption and not below.
|
|
30
|
+
*/
|
|
31
|
+
invert?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Override caption for `media`.
|
|
34
|
+
*
|
|
35
|
+
* Can be used, for example. when using File IDs
|
|
36
|
+
* or when using existing InputMedia objects.
|
|
37
|
+
*/
|
|
38
|
+
caption?: InputText;
|
|
39
|
+
/**
|
|
40
|
+
* Function that will be called after some part has been uploaded.
|
|
41
|
+
* Only used when a file that requires uploading is passed,
|
|
42
|
+
* and not used when uploading a thumbnail.
|
|
43
|
+
*
|
|
44
|
+
* @param uploaded Number of bytes already uploaded
|
|
45
|
+
* @param total Total file size
|
|
46
|
+
*/
|
|
47
|
+
progressCallback?: (uploaded: number, total: number) => void;
|
|
48
|
+
}): Promise<Message>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputMessageId, MessageReactions } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Send a paid reaction using Telegram Stars.
|
|
5
|
+
*
|
|
6
|
+
* @returns
|
|
7
|
+
* Message to which the reaction was sent, if available.
|
|
8
|
+
* The message is normally available for users, but may not be available for bots in PMs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sendPaidReaction(client: ITelegramClient, params: InputMessageId & {
|
|
11
|
+
/** Whether to send the reaction anonymously */
|
|
12
|
+
anonymous?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Number of reactions to send
|
|
15
|
+
*
|
|
16
|
+
* @default 1
|
|
17
|
+
*/
|
|
18
|
+
count?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to dispatch the returned edit message event
|
|
21
|
+
* to the client's update handler.
|
|
22
|
+
*/
|
|
23
|
+
shouldDispatch?: true;
|
|
24
|
+
}): Promise<MessageReactions>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { Message } from '../../types/messages/message.js';
|
|
3
|
+
import { InputPeerLike } from '../../types/peers/peer.js';
|
|
4
|
+
import { sendMediaGroup } from './send-media-group.js';
|
|
5
|
+
import { sendMedia } from './send-media.js';
|
|
6
|
+
import { sendText } from './send-text.js';
|
|
7
|
+
export type QuoteParamsFrom<T> = Omit<NonNullable<T>, 'quoteText' | 'quoteEntities'> & {
|
|
8
|
+
/**
|
|
9
|
+
* Destination chat ID, username, phone, `"me"` or `"self"`
|
|
10
|
+
*
|
|
11
|
+
* @default `message.chat`
|
|
12
|
+
*/
|
|
13
|
+
toChatId?: InputPeerLike;
|
|
14
|
+
/** Index of the first character to quote (inclusive) */
|
|
15
|
+
start: number;
|
|
16
|
+
/** Index of the last character to quote (exclusive) */
|
|
17
|
+
end: number;
|
|
18
|
+
};
|
|
19
|
+
/** Send a text in reply to a given quote */
|
|
20
|
+
export declare function quoteWithText(client: ITelegramClient, message: Message, params: QuoteParamsFrom<Parameters<typeof sendText>[3]> & {
|
|
21
|
+
/** Text to send */
|
|
22
|
+
text: Parameters<typeof sendText>[2];
|
|
23
|
+
}): ReturnType<typeof sendText>;
|
|
24
|
+
/** Send a media in reply to a given quote */
|
|
25
|
+
export declare function quoteWithMedia(client: ITelegramClient, message: Message, params: QuoteParamsFrom<Parameters<typeof sendMedia>[3]> & {
|
|
26
|
+
/** Media to send */
|
|
27
|
+
media: Parameters<typeof sendMedia>[2];
|
|
28
|
+
}): ReturnType<typeof sendMedia>;
|
|
29
|
+
/** Send a media group in reply to a given quote */
|
|
30
|
+
export declare function quoteWithMediaGroup(client: ITelegramClient, message: Message, params: QuoteParamsFrom<Parameters<typeof sendMediaGroup>[3]> & {
|
|
31
|
+
/** Media group to send */
|
|
32
|
+
medias: Parameters<typeof sendMediaGroup>[2];
|
|
33
|
+
}): ReturnType<typeof sendMediaGroup>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MaybeArray } from '../../../types/utils.js';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputMessageId, InputReaction, Message } from '../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Send or remove a reaction.
|
|
6
|
+
*
|
|
7
|
+
* @returns
|
|
8
|
+
* Message to which the reaction was sent, if available.
|
|
9
|
+
* The message is normally available for users, but may not be available for bots in PMs.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sendReaction(client: ITelegramClient, params: InputMessageId & {
|
|
12
|
+
/** Reaction emoji (or `null` to remove reaction) */
|
|
13
|
+
emoji?: MaybeArray<InputReaction> | null;
|
|
14
|
+
/** Whether to use a big reaction */
|
|
15
|
+
big?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to dispatch the returned edit message event
|
|
18
|
+
* to the client's update handler.
|
|
19
|
+
*/
|
|
20
|
+
shouldDispatch?: true;
|
|
21
|
+
}): Promise<Message | null>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { Message } from '../../types/messages/message.js';
|
|
3
|
+
import { ParametersSkip2 } from '../../types/utils.js';
|
|
4
|
+
import { sendMediaGroup } from './send-media-group.js';
|
|
5
|
+
import { sendMedia } from './send-media.js';
|
|
6
|
+
import { sendText } from './send-text.js';
|
|
7
|
+
/** Send a text in reply to a given message */
|
|
8
|
+
export declare function replyText(client: ITelegramClient, message: Message, ...params: ParametersSkip2<typeof sendText>): ReturnType<typeof sendText>;
|
|
9
|
+
/** Send a media in reply to a given message */
|
|
10
|
+
export declare function replyMedia(client: ITelegramClient, message: Message, ...params: ParametersSkip2<typeof sendMedia>): ReturnType<typeof sendMedia>;
|
|
11
|
+
/** Send a media group in reply to a given message */
|
|
12
|
+
export declare function replyMediaGroup(client: ITelegramClient, message: Message, ...params: ParametersSkip2<typeof sendMediaGroup>): ReturnType<typeof sendMediaGroup>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaybeArray } from '../../../types/utils.js';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputPeerLike, Message } from '../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Send previously scheduled message(s)
|
|
6
|
+
*
|
|
7
|
+
* Note that if the message belongs to a media group,
|
|
8
|
+
* the entire group will be sent, and all the messages
|
|
9
|
+
* will be returned.
|
|
10
|
+
*
|
|
11
|
+
* @param peer Chat where the messages were scheduled
|
|
12
|
+
* @param ids ID(s) of the messages
|
|
13
|
+
*/
|
|
14
|
+
export declare function sendScheduled(client: ITelegramClient, peer: InputPeerLike, ids: MaybeArray<number>): Promise<Message[]>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { ReplyMarkup } from '../../types/bots/keyboards/index.js';
|
|
3
|
+
import { InputText } from '../../types/misc/entities.js';
|
|
4
|
+
import { InputPeerLike } from '../../types/peers/index.js';
|
|
5
|
+
import { CommonSendParams } from './send-common.js';
|
|
6
|
+
import { Message } from '../../types/messages/message.js';
|
|
7
|
+
/**
|
|
8
|
+
* Send a text message
|
|
9
|
+
*
|
|
10
|
+
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
|
|
11
|
+
* @param text Text of the message
|
|
12
|
+
* @param params Additional sending parameters
|
|
13
|
+
*/
|
|
14
|
+
export declare function sendText(client: ITelegramClient, chatId: InputPeerLike, text: InputText, params?: CommonSendParams & {
|
|
15
|
+
/**
|
|
16
|
+
* For bots: inline or reply markup or an instruction
|
|
17
|
+
* to hide a reply keyboard or to force a reply.
|
|
18
|
+
*/
|
|
19
|
+
replyMarkup?: ReplyMarkup;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to disable links preview in this message
|
|
22
|
+
*/
|
|
23
|
+
disableWebPreview?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to invert media position.
|
|
26
|
+
*
|
|
27
|
+
* Currently only supported for web previews and makes the
|
|
28
|
+
* client render the preview above the caption and not below.
|
|
29
|
+
*/
|
|
30
|
+
invertMedia?: boolean;
|
|
31
|
+
}): Promise<Message>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputPeerLike, TypingStatus } from '../../types/index.js';
|
|
4
|
+
export declare function _mapTypingStatus(status: Exclude<TypingStatus, 'interaction' | 'interaction_seen'>, progress?: number): tl.TypeSendMessageAction;
|
|
5
|
+
/**
|
|
6
|
+
* Sends a current user/bot typing event
|
|
7
|
+
* to a conversation partner or group.
|
|
8
|
+
*
|
|
9
|
+
* This status is set for 6 seconds, and is
|
|
10
|
+
* automatically cancelled if you send a
|
|
11
|
+
* message.
|
|
12
|
+
*
|
|
13
|
+
* If you need a continuous typing status, use {@link setTyping} instead.
|
|
14
|
+
*
|
|
15
|
+
* @param chatId Chat ID
|
|
16
|
+
* @param status Typing status
|
|
17
|
+
* @param params
|
|
18
|
+
*/
|
|
19
|
+
export declare function sendTyping(client: ITelegramClient, chatId: InputPeerLike, status?: Exclude<TypingStatus, 'interaction' | 'interaction_seen'> | tl.TypeSendMessageAction, params?: {
|
|
20
|
+
/**
|
|
21
|
+
* For `upload_*` and history import actions, progress of the upload
|
|
22
|
+
*/
|
|
23
|
+
progress?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier of the business connection on behalf of which the action will be sent
|
|
26
|
+
*/
|
|
27
|
+
businessConnectionId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* For comment threads, ID of the thread (i.e. top message)
|
|
30
|
+
*/
|
|
31
|
+
threadId?: number;
|
|
32
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MaybeArray } from '../../../types/utils.js';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputMessageId, Poll } from '../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Send or retract a vote in a poll.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sendVote(client: ITelegramClient, params: InputMessageId & {
|
|
8
|
+
/**
|
|
9
|
+
* Selected options, or `null` to retract.
|
|
10
|
+
* You can pass indexes of the answers or the `Buffer`s
|
|
11
|
+
* representing them. In case of indexes, the poll will first
|
|
12
|
+
* be requested from the server.
|
|
13
|
+
*/
|
|
14
|
+
options: null | MaybeArray<number | Uint8Array>;
|
|
15
|
+
}): Promise<Poll>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputPeerLike } from '../../types/peers/peer.js';
|
|
4
|
+
import { TypingStatus } from '../../types/peers/typing-status.js';
|
|
5
|
+
export declare function _getTypingTimerId(peer: tl.TypeInputPeer, businessId?: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Sets whether a user is typing in a specific chat
|
|
8
|
+
*
|
|
9
|
+
* This status is automatically renewed by mtcute until a further
|
|
10
|
+
* call with `cancel` is made, or a message is sent to the chat.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setTyping(client: ITelegramClient, params: {
|
|
13
|
+
/** Chat ID where the user is currently typing */
|
|
14
|
+
peerId: InputPeerLike;
|
|
15
|
+
/**
|
|
16
|
+
* Typing status to send
|
|
17
|
+
*
|
|
18
|
+
* @default `typing`
|
|
19
|
+
*/
|
|
20
|
+
status?: Exclude<TypingStatus, 'interaction' | 'interaction_seen'> | tl.TypeSendMessageAction;
|
|
21
|
+
/**
|
|
22
|
+
* For `upload_*` and history import actions, progress of the upload
|
|
23
|
+
*/
|
|
24
|
+
progress?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Unique identifier of the business connection on behalf of which the action will be sent
|
|
27
|
+
*/
|
|
28
|
+
businessConnectionId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* For comment threads, ID of the thread (i.e. top message)
|
|
31
|
+
*/
|
|
32
|
+
threadId?: number;
|
|
33
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputMessageId, TextWithEntities } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Translate message text to a given language.
|
|
5
|
+
*
|
|
6
|
+
* Returns `null` if it could not translate the message.
|
|
7
|
+
*/
|
|
8
|
+
export declare function translateMessage(client: ITelegramClient, params: InputMessageId & {
|
|
9
|
+
/** Target language (two-letter ISO 639-1 language code) */
|
|
10
|
+
toLanguage: string;
|
|
11
|
+
}): Promise<TextWithEntities>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputText, TextWithEntities } from '../../types/misc/entities.js';
|
|
3
|
+
/**
|
|
4
|
+
* Translate text to a given language.
|
|
5
|
+
*
|
|
6
|
+
* @param text Text to translate
|
|
7
|
+
* @param toLanguage Target language (two-letter ISO 639-1 language code)
|
|
8
|
+
*/
|
|
9
|
+
export declare function translateText(client: ITelegramClient, text: InputText, toLanguage: string): Promise<TextWithEntities>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputPeerLike } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Unpin all pinned messages in a chat.
|
|
5
|
+
*
|
|
6
|
+
* @param chatId Chat or user ID
|
|
7
|
+
*/
|
|
8
|
+
export declare function unpinAllMessages(client: ITelegramClient, chatId: InputPeerLike, params?: {
|
|
9
|
+
/**
|
|
10
|
+
* For forums - unpin only messages from the given topic
|
|
11
|
+
*/
|
|
12
|
+
topicId?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to dispatch updates that will be generated by this call.
|
|
15
|
+
* Doesn't follow `disableNoDispatch`
|
|
16
|
+
*/
|
|
17
|
+
shouldDispatch?: true;
|
|
18
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputMessageId } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Unpin a message in a group, supergroup, channel or PM.
|
|
5
|
+
*
|
|
6
|
+
* For supergroups/channels, you must have appropriate permissions,
|
|
7
|
+
* either as an admin, or as default permissions
|
|
8
|
+
*
|
|
9
|
+
* @param chatId Chat ID, username, phone number, `"self"` or `"me"`
|
|
10
|
+
* @param messageId Message ID
|
|
11
|
+
*/
|
|
12
|
+
export declare function unpinMessage(client: ITelegramClient, params: InputMessageId): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { CollectibleInfo } from '../../types/misc/collectible-info.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get information about a fragment collectible
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCollectibleInfo(client: ITelegramClient, kind: 'phone' | 'username', item: string): Promise<CollectibleInfo>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { TakeoutSession } from '../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Create a new takeout session
|
|
6
|
+
*
|
|
7
|
+
* @param params Takeout session parameters
|
|
8
|
+
*/
|
|
9
|
+
export declare function initTakeoutSession(client: ITelegramClient, params: Omit<tl.account.RawInitTakeoutSessionRequest, '_'>): Promise<TakeoutSession>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputPrivacyRule } from '../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Normalize {@link InputPrivacyRule}[] to `tl.TypeInputPrivacyRule`,
|
|
6
|
+
* resolving the peers if needed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function _normalizePrivacyRules(client: ITelegramClient, rules: InputPrivacyRule[]): Promise<tl.TypeInputPrivacyRule[]>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputText } from '../../types/misc/entities.js';
|
|
4
|
+
/** @internal */
|
|
5
|
+
export declare function _normalizeInputText(client: ITelegramClient, input?: InputText): Promise<[string, tl.TypeMessageEntity[] | undefined]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RpcCallOptions } from '../../../network/index.js';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Wrap a client so that all RPC calls will use the specified parameters.
|
|
5
|
+
*
|
|
6
|
+
* @param client Client to wrap
|
|
7
|
+
* @param params RPC call parameters to use by default
|
|
8
|
+
* @returns The wrapped client
|
|
9
|
+
*/
|
|
10
|
+
export declare function withParams<T extends ITelegramClient>(client: T, params: RpcCallOptions): T;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Change your 2FA password
|
|
4
|
+
*/
|
|
5
|
+
export declare function changeCloudPassword(client: ITelegramClient, params: {
|
|
6
|
+
/** Current password as plaintext */
|
|
7
|
+
currentPassword: string;
|
|
8
|
+
/** New password as plaintext */
|
|
9
|
+
newPassword: string;
|
|
10
|
+
/** Hint for the new password */
|
|
11
|
+
hint?: string;
|
|
12
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Enable 2FA password on your account
|
|
4
|
+
*
|
|
5
|
+
* Note that if you pass `email`, `EmailUnconfirmedError` may be
|
|
6
|
+
* thrown, and you should use {@link verifyPasswordEmail},
|
|
7
|
+
* {@link resendPasswordEmail} or {@link cancelPasswordEmail},
|
|
8
|
+
* and the call this method again
|
|
9
|
+
*/
|
|
10
|
+
export declare function enableCloudPassword(client: ITelegramClient, params: {
|
|
11
|
+
/** 2FA password as plaintext */
|
|
12
|
+
password: string;
|
|
13
|
+
/** Hint for the new password */
|
|
14
|
+
hint?: string;
|
|
15
|
+
/** Recovery email */
|
|
16
|
+
email?: string;
|
|
17
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Verify an email to use as 2FA recovery method
|
|
4
|
+
*
|
|
5
|
+
* @param code Code which was sent via email
|
|
6
|
+
*/
|
|
7
|
+
export declare function verifyPasswordEmail(client: ITelegramClient, code: string): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Resend the code to verify an email to use as 2FA recovery method.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resendPasswordEmail(client: ITelegramClient): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Cancel the code that was sent to verify an email to use as 2FA recovery method
|
|
14
|
+
*/
|
|
15
|
+
export declare function cancelPasswordEmail(client: ITelegramClient): Promise<void>;
|