@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,32 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
3
|
+
import { InputPeerLike } from '../../types/peers/peer.js';
|
|
4
|
+
/**
|
|
5
|
+
* Set an emoji status for the current user
|
|
6
|
+
*
|
|
7
|
+
* @deprecated – use {@link setEmojiStatus} with `self` instead
|
|
8
|
+
*/
|
|
9
|
+
export declare function setMyEmojiStatus(client: ITelegramClient, emoji: tl.Long | null, params?: {
|
|
10
|
+
/**
|
|
11
|
+
* Date when the emoji status should expire (only if `emoji` is not `null`)
|
|
12
|
+
*/
|
|
13
|
+
until?: number | Date;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Set an emoji status for the given user/chat
|
|
17
|
+
*
|
|
18
|
+
* You can change emoji status of:
|
|
19
|
+
* - yourself (`self`)
|
|
20
|
+
* - supergroups or channels with enough boosts which you are an admin of
|
|
21
|
+
* - for bots – users who gave you the appropriate permissions
|
|
22
|
+
*/
|
|
23
|
+
export declare function setEmojiStatus(client: ITelegramClient, params: {
|
|
24
|
+
/** User or chat where the emoji status should be set */
|
|
25
|
+
peerId: InputPeerLike;
|
|
26
|
+
/** Custom emoji ID or `null` to remove the emoji */
|
|
27
|
+
emoji: tl.Long | null;
|
|
28
|
+
/**
|
|
29
|
+
* Date when the emoji status should expire (only if `emoji` is not `null`)
|
|
30
|
+
*/
|
|
31
|
+
until?: number | Date;
|
|
32
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Changes the current default value of the Time-To-Live setting,
|
|
4
|
+
* applied to all new chats.
|
|
5
|
+
*
|
|
6
|
+
* @param period New TTL period, in seconds (or 0 to disable)
|
|
7
|
+
*/
|
|
8
|
+
export declare function setGlobalTtl(client: ITelegramClient, period: number): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Set or remove current user's birthday.
|
|
4
|
+
*/
|
|
5
|
+
export declare function setMyBirthday(client: ITelegramClient, birthday: {
|
|
6
|
+
/** Birthday day */
|
|
7
|
+
day: number;
|
|
8
|
+
/** Birthday month */
|
|
9
|
+
month: number;
|
|
10
|
+
/** Birthday year (optional) */
|
|
11
|
+
year?: number;
|
|
12
|
+
} | null): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputFileLike, Photo } from '../../types/index.js';
|
|
3
|
+
import { tl } from '@mtcute/tl';
|
|
4
|
+
/**
|
|
5
|
+
* Set a new profile photo or video for the current user.
|
|
6
|
+
*
|
|
7
|
+
* You can also pass a file ID or an InputPhoto to re-use existing photo.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setMyProfilePhoto(client: ITelegramClient, params: {
|
|
10
|
+
/** Media type (photo or video) */
|
|
11
|
+
type: 'photo' | 'video';
|
|
12
|
+
/** Input media file */
|
|
13
|
+
media: InputFileLike | tl.TypeInputPhoto;
|
|
14
|
+
/** When `type = video`, timestamp in seconds which will be shown as a static preview. */
|
|
15
|
+
previewSec?: number;
|
|
16
|
+
}): Promise<Photo>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { User } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Change username of the current user.
|
|
5
|
+
*
|
|
6
|
+
* Note that bots usernames must be changed through
|
|
7
|
+
* bot support or re-created from scratch.
|
|
8
|
+
*
|
|
9
|
+
* @param username New username (5-32 chars, allowed chars: `a-zA-Z0-9_`), or `null` to remove
|
|
10
|
+
*/
|
|
11
|
+
export declare function setMyUsername(client: ITelegramClient, username: string | null): Promise<User>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Change user status to offline or online once,
|
|
4
|
+
* which will expire after a while (currently ~5 minutes)
|
|
5
|
+
*
|
|
6
|
+
* For continuously sending online/offline status, use {@link setOnline}
|
|
7
|
+
*
|
|
8
|
+
* @param online Whether the user is currently online
|
|
9
|
+
*/
|
|
10
|
+
export declare function sendOnline(client: ITelegramClient, online: boolean): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Change user status to online or offline
|
|
13
|
+
*
|
|
14
|
+
* Once called with `true`, mtcute will keep notifying the server
|
|
15
|
+
* that the user is still online until a further call with `false` is made.
|
|
16
|
+
*
|
|
17
|
+
* @param online
|
|
18
|
+
*/
|
|
19
|
+
export declare function setOnline(client: ITelegramClient, online?: boolean): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { InputPeerLike } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Unblock a user
|
|
5
|
+
*
|
|
6
|
+
* @param id User ID, username or phone number
|
|
7
|
+
*/
|
|
8
|
+
export declare function unblockUser(client: ITelegramClient, id: InputPeerLike): Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
+
import { User } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Update your profile details.
|
|
5
|
+
*
|
|
6
|
+
* Only pass fields that you want to change.
|
|
7
|
+
*
|
|
8
|
+
* @param params
|
|
9
|
+
*/
|
|
10
|
+
export declare function updateProfile(client: ITelegramClient, params: {
|
|
11
|
+
/**
|
|
12
|
+
* New first name
|
|
13
|
+
*/
|
|
14
|
+
firstName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* New last name. Pass `''` (empty string) to remove it
|
|
17
|
+
*/
|
|
18
|
+
lastName?: string;
|
|
19
|
+
/**
|
|
20
|
+
* New bio (max 70 chars). Pass `''` (empty string) to remove it
|
|
21
|
+
*/
|
|
22
|
+
bio?: string;
|
|
23
|
+
}): Promise<User>;
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
export { checkPassword } from './methods/auth/check-password.js';
|
|
2
|
+
export { getPasswordHint } from './methods/auth/get-password-hint.js';
|
|
3
|
+
export { logOut } from './methods/auth/log-out.js';
|
|
4
|
+
export type { LogOutResult } from './methods/auth/log-out.js';
|
|
5
|
+
export { recoverPassword } from './methods/auth/recover-password.js';
|
|
6
|
+
export { resendCode } from './methods/auth/resend-code.js';
|
|
7
|
+
export { run } from './methods/auth/run.js';
|
|
8
|
+
export { sendCode } from './methods/auth/send-code.js';
|
|
9
|
+
export { sendRecoveryCode } from './methods/auth/send-recovery-code.js';
|
|
10
|
+
export { signInBot } from './methods/auth/sign-in-bot.js';
|
|
11
|
+
export { signInQr } from './methods/auth/sign-in-qr.js';
|
|
12
|
+
export { signIn } from './methods/auth/sign-in.js';
|
|
13
|
+
export { startTest } from './methods/auth/start-test.js';
|
|
14
|
+
export { start } from './methods/auth/start.js';
|
|
15
|
+
export { isSelfPeer } from './methods/auth/utils.js';
|
|
16
|
+
export { answerCallbackQuery } from './methods/bots/answer-callback-query.js';
|
|
17
|
+
export { answerInlineQuery } from './methods/bots/answer-inline-query.js';
|
|
18
|
+
export { answerPreCheckoutQuery } from './methods/bots/answer-pre-checkout-query.js';
|
|
19
|
+
export { deleteMyCommands } from './methods/bots/delete-my-commands.js';
|
|
20
|
+
export { getBotInfo } from './methods/bots/get-bot-info.js';
|
|
21
|
+
export { getBotMenuButton } from './methods/bots/get-bot-menu-button.js';
|
|
22
|
+
export { getCallbackAnswer } from './methods/bots/get-callback-answer.js';
|
|
23
|
+
export { getGameHighScores } from './methods/bots/get-game-high-scores.js';
|
|
24
|
+
export { getInlineGameHighScores } from './methods/bots/get-game-high-scores.js';
|
|
25
|
+
export { getMyCommands } from './methods/bots/get-my-commands.js';
|
|
26
|
+
export { openWebview } from './methods/bots/open-webview.js';
|
|
27
|
+
export { closeWebview } from './methods/bots/open-webview.js';
|
|
28
|
+
export { prepareInlineMessage } from './methods/bots/prepare-inline-message.js';
|
|
29
|
+
export { setBotInfo } from './methods/bots/set-bot-info.js';
|
|
30
|
+
export { setBotMenuButton } from './methods/bots/set-bot-menu-button.js';
|
|
31
|
+
export { setGameScore } from './methods/bots/set-game-score.js';
|
|
32
|
+
export { setInlineGameScore } from './methods/bots/set-game-score.js';
|
|
33
|
+
export { setMyCommands } from './methods/bots/set-my-commands.js';
|
|
34
|
+
export { setMyDefaultRights } from './methods/bots/set-my-default-rights.js';
|
|
35
|
+
export { toggleEmojiStatusPermission } from './methods/bots/toggle-emoji-status-permission.js';
|
|
36
|
+
export { addChatMembers } from './methods/chats/add-chat-members.js';
|
|
37
|
+
export { archiveChats } from './methods/chats/archive-chats.js';
|
|
38
|
+
export { banChatMember } from './methods/chats/ban-chat-member.js';
|
|
39
|
+
export { createChannel } from './methods/chats/create-channel.js';
|
|
40
|
+
export { createGroup } from './methods/chats/create-group.js';
|
|
41
|
+
export type { CreateGroupResult } from './methods/chats/create-group.js';
|
|
42
|
+
export { createSupergroup } from './methods/chats/create-supergroup.js';
|
|
43
|
+
export { deleteChannel } from './methods/chats/delete-channel.js';
|
|
44
|
+
export { deleteChatPhoto } from './methods/chats/delete-chat-photo.js';
|
|
45
|
+
export { deleteGroup } from './methods/chats/delete-group.js';
|
|
46
|
+
export { deleteHistory } from './methods/chats/delete-history.js';
|
|
47
|
+
export { deleteUserHistory } from './methods/chats/delete-user-history.js';
|
|
48
|
+
export { editAdminRights } from './methods/chats/edit-admin-rights.js';
|
|
49
|
+
export { getChatEventLog } from './methods/chats/get-chat-event-log.js';
|
|
50
|
+
export { getChatMember } from './methods/chats/get-chat-member.js';
|
|
51
|
+
export { getChatMembers } from './methods/chats/get-chat-members.js';
|
|
52
|
+
export { getChatPreview } from './methods/chats/get-chat-preview.js';
|
|
53
|
+
export { getChat } from './methods/chats/get-chat.js';
|
|
54
|
+
export { getFullChat } from './methods/chats/get-full-chat.js';
|
|
55
|
+
export { getFullUser } from './methods/chats/get-full-user.js';
|
|
56
|
+
export { getNearbyChats } from './methods/chats/get-nearby-chats.js';
|
|
57
|
+
export { getSimilarChannels } from './methods/chats/get-similar-channels.js';
|
|
58
|
+
export { getUser } from './methods/chats/get-user.js';
|
|
59
|
+
export { iterChatEventLog } from './methods/chats/iter-chat-event-log.js';
|
|
60
|
+
export { iterChatMembers } from './methods/chats/iter-chat-members.js';
|
|
61
|
+
export { joinChat } from './methods/chats/join-chat.js';
|
|
62
|
+
export { kickChatMember } from './methods/chats/kick-chat-member.js';
|
|
63
|
+
export { leaveChat } from './methods/chats/leave-chat.js';
|
|
64
|
+
export { markChatUnread } from './methods/chats/mark-chat-unread.js';
|
|
65
|
+
export { openChat } from './methods/chats/open-chat.js';
|
|
66
|
+
export { closeChat } from './methods/chats/open-chat.js';
|
|
67
|
+
export { reorderUsernames } from './methods/chats/reorder-usernames.js';
|
|
68
|
+
export { restrictChatMember } from './methods/chats/restrict-chat-member.js';
|
|
69
|
+
export { saveDraft } from './methods/chats/save-draft.js';
|
|
70
|
+
export { setChatColor } from './methods/chats/set-chat-color.js';
|
|
71
|
+
export { setChatDefaultPermissions } from './methods/chats/set-chat-default-permissions.js';
|
|
72
|
+
export { setChatDescription } from './methods/chats/set-chat-description.js';
|
|
73
|
+
export { setChatPhoto } from './methods/chats/set-chat-photo.js';
|
|
74
|
+
export { setChatTitle } from './methods/chats/set-chat-title.js';
|
|
75
|
+
export { setChatTtl } from './methods/chats/set-chat-ttl.js';
|
|
76
|
+
export { setChatUsername } from './methods/chats/set-chat-username.js';
|
|
77
|
+
export { setSlowMode } from './methods/chats/set-slow-mode.js';
|
|
78
|
+
export { toggleContentProtection } from './methods/chats/toggle-content-protection.js';
|
|
79
|
+
export { toggleFragmentUsername } from './methods/chats/toggle-fragment-username.js';
|
|
80
|
+
export { toggleJoinRequests } from './methods/chats/toggle-join-requests.js';
|
|
81
|
+
export { toggleJoinToSend } from './methods/chats/toggle-join-to-send.js';
|
|
82
|
+
export { unarchiveChats } from './methods/chats/unarchive-chats.js';
|
|
83
|
+
export { unbanChatMember } from './methods/chats/unban-chat-member.js';
|
|
84
|
+
export { addContact } from './methods/contacts/add-contact.js';
|
|
85
|
+
export { deleteContacts } from './methods/contacts/delete-contacts.js';
|
|
86
|
+
export { getContacts } from './methods/contacts/get-contacts.js';
|
|
87
|
+
export { importContacts } from './methods/contacts/import-contacts.js';
|
|
88
|
+
export { createFolder } from './methods/dialogs/create-folder.js';
|
|
89
|
+
export { deleteFolder } from './methods/dialogs/delete-folder.js';
|
|
90
|
+
export { editFolder } from './methods/dialogs/edit-folder.js';
|
|
91
|
+
export { findDialogs } from './methods/dialogs/find-dialogs.js';
|
|
92
|
+
export { findFolder } from './methods/dialogs/find-folder.js';
|
|
93
|
+
export { getChatlistPreview } from './methods/dialogs/get-chatlist-preview.js';
|
|
94
|
+
export { getFolders } from './methods/dialogs/get-folders.js';
|
|
95
|
+
export { getPeerDialogs } from './methods/dialogs/get-peer-dialogs.js';
|
|
96
|
+
export { iterDialogs } from './methods/dialogs/iter-dialogs.js';
|
|
97
|
+
export { joinChatlist } from './methods/dialogs/join-chatlist.js';
|
|
98
|
+
export { setFoldersOrder } from './methods/dialogs/set-folders-order.js';
|
|
99
|
+
export { downloadAsBuffer } from './methods/files/download-buffer.js';
|
|
100
|
+
export { downloadAsIterable } from './methods/files/download-iterable.js';
|
|
101
|
+
export { downloadAsStream } from './methods/files/download-stream.js';
|
|
102
|
+
export { _normalizeInputFile } from './methods/files/normalize-input-file.js';
|
|
103
|
+
export { _normalizeInputMedia } from './methods/files/normalize-input-media.js';
|
|
104
|
+
export { uploadFile } from './methods/files/upload-file.js';
|
|
105
|
+
export { uploadMedia } from './methods/files/upload-media.js';
|
|
106
|
+
export { createForumTopic } from './methods/forums/create-forum-topic.js';
|
|
107
|
+
export { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js';
|
|
108
|
+
export { editForumTopic } from './methods/forums/edit-forum-topic.js';
|
|
109
|
+
export { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js';
|
|
110
|
+
export { getForumTopics } from './methods/forums/get-forum-topics.js';
|
|
111
|
+
export type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js';
|
|
112
|
+
export { iterForumTopics } from './methods/forums/iter-forum-topics.js';
|
|
113
|
+
export { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js';
|
|
114
|
+
export { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js';
|
|
115
|
+
export { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js';
|
|
116
|
+
export { toggleForum } from './methods/forums/toggle-forum.js';
|
|
117
|
+
export { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js';
|
|
118
|
+
export { createInviteLink } from './methods/invite-links/create-invite-link.js';
|
|
119
|
+
export { editInviteLink } from './methods/invite-links/edit-invite-link.js';
|
|
120
|
+
export { exportInviteLink } from './methods/invite-links/export-invite-link.js';
|
|
121
|
+
export { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js';
|
|
122
|
+
export { getInviteLink } from './methods/invite-links/get-invite-link.js';
|
|
123
|
+
export { getInviteLinks } from './methods/invite-links/get-invite-links.js';
|
|
124
|
+
export type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js';
|
|
125
|
+
export { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js';
|
|
126
|
+
export { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js';
|
|
127
|
+
export { hideJoinRequest } from './methods/invite-links/hide-join-request.js';
|
|
128
|
+
export { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-members.js';
|
|
129
|
+
export { iterInviteLinks } from './methods/invite-links/iter-invite-links.js';
|
|
130
|
+
export { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js';
|
|
131
|
+
export { closePoll } from './methods/messages/close-poll.js';
|
|
132
|
+
export { deleteMessagesById } from './methods/messages/delete-messages.js';
|
|
133
|
+
export type { DeleteMessagesParams } from './methods/messages/delete-messages.js';
|
|
134
|
+
export { deleteMessages } from './methods/messages/delete-messages.js';
|
|
135
|
+
export { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js';
|
|
136
|
+
export { editInlineMessage } from './methods/messages/edit-inline-message.js';
|
|
137
|
+
export { editMessage } from './methods/messages/edit-message.js';
|
|
138
|
+
export { forwardMessagesById } from './methods/messages/forward-messages.js';
|
|
139
|
+
export type { ForwardMessageOptions } from './methods/messages/forward-messages.js';
|
|
140
|
+
export { forwardMessages } from './methods/messages/forward-messages.js';
|
|
141
|
+
export { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js';
|
|
142
|
+
export { getAvailableMessageEffects } from './methods/messages/get-available-effects.js';
|
|
143
|
+
export { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js';
|
|
144
|
+
export { getDiscussionMessage } from './methods/messages/get-discussion-message.js';
|
|
145
|
+
export { getFactCheck } from './methods/messages/get-fact-check.js';
|
|
146
|
+
export { getHistory } from './methods/messages/get-history.js';
|
|
147
|
+
export type { GetHistoryOffset } from './methods/messages/get-history.js';
|
|
148
|
+
export { getMessageByLink } from './methods/messages/get-message-by-link.js';
|
|
149
|
+
export { getMessageGroup } from './methods/messages/get-message-group.js';
|
|
150
|
+
export { getMessageReactionsById } from './methods/messages/get-message-reactions.js';
|
|
151
|
+
export { getMessageReactions } from './methods/messages/get-message-reactions.js';
|
|
152
|
+
export { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js';
|
|
153
|
+
export { getMessages } from './methods/messages/get-messages.js';
|
|
154
|
+
export { getReactionUsers } from './methods/messages/get-reaction-users.js';
|
|
155
|
+
export type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js';
|
|
156
|
+
export { getReplyTo } from './methods/messages/get-reply-to.js';
|
|
157
|
+
export { getScheduledMessages } from './methods/messages/get-scheduled-messages.js';
|
|
158
|
+
export { iterHistory } from './methods/messages/iter-history.js';
|
|
159
|
+
export { iterReactionUsers } from './methods/messages/iter-reaction-users.js';
|
|
160
|
+
export { iterSearchGlobal } from './methods/messages/iter-search-global.js';
|
|
161
|
+
export { iterSearchMessages } from './methods/messages/iter-search-messages.js';
|
|
162
|
+
export { pinMessage } from './methods/messages/pin-message.js';
|
|
163
|
+
export { readHistory } from './methods/messages/read-history.js';
|
|
164
|
+
export { readReactions } from './methods/messages/read-reactions.js';
|
|
165
|
+
export { searchGlobal } from './methods/messages/search-global.js';
|
|
166
|
+
export type { SearchGlobalOffset } from './methods/messages/search-global.js';
|
|
167
|
+
export { searchHashtag } from './methods/messages/search-hashtag.js';
|
|
168
|
+
export type { SearchHashtagOffset } from './methods/messages/search-hashtag.js';
|
|
169
|
+
export { iterSearchHashtag } from './methods/messages/search-hashtag.js';
|
|
170
|
+
export { searchMessages } from './methods/messages/search-messages.js';
|
|
171
|
+
export type { SearchMessagesOffset } from './methods/messages/search-messages.js';
|
|
172
|
+
export { answerText } from './methods/messages/send-answer.js';
|
|
173
|
+
export { answerMedia } from './methods/messages/send-answer.js';
|
|
174
|
+
export { answerMediaGroup } from './methods/messages/send-answer.js';
|
|
175
|
+
export { commentText } from './methods/messages/send-comment.js';
|
|
176
|
+
export { commentMedia } from './methods/messages/send-comment.js';
|
|
177
|
+
export { commentMediaGroup } from './methods/messages/send-comment.js';
|
|
178
|
+
export { sendCopyGroup } from './methods/messages/send-copy-group.js';
|
|
179
|
+
export type { SendCopyGroupParams } from './methods/messages/send-copy-group.js';
|
|
180
|
+
export { sendCopy } from './methods/messages/send-copy.js';
|
|
181
|
+
export type { SendCopyParams } from './methods/messages/send-copy.js';
|
|
182
|
+
export { sendMediaGroup } from './methods/messages/send-media-group.js';
|
|
183
|
+
export { sendMedia } from './methods/messages/send-media.js';
|
|
184
|
+
export { sendPaidReaction } from './methods/messages/send-paid-reaction.js';
|
|
185
|
+
export { quoteWithText } from './methods/messages/send-quote.js';
|
|
186
|
+
export type { QuoteParamsFrom } from './methods/messages/send-quote.js';
|
|
187
|
+
export { quoteWithMedia } from './methods/messages/send-quote.js';
|
|
188
|
+
export { quoteWithMediaGroup } from './methods/messages/send-quote.js';
|
|
189
|
+
export { sendReaction } from './methods/messages/send-reaction.js';
|
|
190
|
+
export { replyText } from './methods/messages/send-reply.js';
|
|
191
|
+
export { replyMedia } from './methods/messages/send-reply.js';
|
|
192
|
+
export { replyMediaGroup } from './methods/messages/send-reply.js';
|
|
193
|
+
export { sendScheduled } from './methods/messages/send-scheduled.js';
|
|
194
|
+
export { sendText } from './methods/messages/send-text.js';
|
|
195
|
+
export { sendTyping } from './methods/messages/send-typing.js';
|
|
196
|
+
export { sendVote } from './methods/messages/send-vote.js';
|
|
197
|
+
export { setTyping } from './methods/messages/set-typing.js';
|
|
198
|
+
export { translateMessage } from './methods/messages/translate-message.js';
|
|
199
|
+
export { translateText } from './methods/messages/translate-text.js';
|
|
200
|
+
export { unpinAllMessages } from './methods/messages/unpin-all-messages.js';
|
|
201
|
+
export { unpinMessage } from './methods/messages/unpin-message.js';
|
|
202
|
+
export { getCollectibleInfo } from './methods/misc/get-collectible-info.js';
|
|
203
|
+
export { initTakeoutSession } from './methods/misc/init-takeout-session.js';
|
|
204
|
+
export { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js';
|
|
205
|
+
export { changeCloudPassword } from './methods/password/change-cloud-password.js';
|
|
206
|
+
export { enableCloudPassword } from './methods/password/enable-cloud-password.js';
|
|
207
|
+
export { verifyPasswordEmail } from './methods/password/password-email.js';
|
|
208
|
+
export { resendPasswordEmail } from './methods/password/password-email.js';
|
|
209
|
+
export { cancelPasswordEmail } from './methods/password/password-email.js';
|
|
210
|
+
export { removeCloudPassword } from './methods/password/remove-cloud-password.js';
|
|
211
|
+
export { acceptStarGift } from './methods/premium/accept-star-gift.js';
|
|
212
|
+
export { applyBoost } from './methods/premium/apply-boost.js';
|
|
213
|
+
export { canApplyBoost } from './methods/premium/can-apply-boost.js';
|
|
214
|
+
export type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js';
|
|
215
|
+
export { createBusinessChatLink } from './methods/premium/create-business-chat-link.js';
|
|
216
|
+
export { editBusinessChatLink } from './methods/premium/edit-business-chat-link.js';
|
|
217
|
+
export { deleteBusinessChatLink } from './methods/premium/edit-business-chat-link.js';
|
|
218
|
+
export { getBoostStats } from './methods/premium/get-boost-stats.js';
|
|
219
|
+
export { getBoosts } from './methods/premium/get-boosts.js';
|
|
220
|
+
export { getBusinessChatLinks } from './methods/premium/get-business-chat-links.js';
|
|
221
|
+
export { getBusinessConnection } from './methods/premium/get-business-connection.js';
|
|
222
|
+
export { getMyBoostSlots } from './methods/premium/get-my-boost-slots.js';
|
|
223
|
+
export { getStarGiftOptions } from './methods/premium/get-star-gift-options.js';
|
|
224
|
+
export { getStarGifts } from './methods/premium/get-star-gifts.js';
|
|
225
|
+
export { getStarsTransactions } from './methods/premium/get-stars-transactions.js';
|
|
226
|
+
export { iterBoosters } from './methods/premium/iter-boosters.js';
|
|
227
|
+
export { iterStarGifts } from './methods/premium/iter-star-gifts.js';
|
|
228
|
+
export { iterStarsTransactions } from './methods/premium/iter-stars-transactions.js';
|
|
229
|
+
export { sendStarGift } from './methods/premium/send-star-gift.js';
|
|
230
|
+
export { setBusinessIntro } from './methods/premium/set-business-intro.js';
|
|
231
|
+
export { setBusinessWorkHours } from './methods/premium/set-business-work-hours.js';
|
|
232
|
+
export { addStickerToSet } from './methods/stickers/add-sticker-to-set.js';
|
|
233
|
+
export { createStickerSet } from './methods/stickers/create-sticker-set.js';
|
|
234
|
+
export { deleteStickerFromSet } from './methods/stickers/delete-sticker-from-set.js';
|
|
235
|
+
export { getCustomEmojis } from './methods/stickers/get-custom-emojis.js';
|
|
236
|
+
export { getCustomEmojisFromMessages } from './methods/stickers/get-custom-emojis.js';
|
|
237
|
+
export { getInstalledStickers } from './methods/stickers/get-installed-stickers.js';
|
|
238
|
+
export { getMyStickerSets } from './methods/stickers/get-my-sticker-sets.js';
|
|
239
|
+
export { getStickerSet } from './methods/stickers/get-sticker-set.js';
|
|
240
|
+
export { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js';
|
|
241
|
+
export { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js';
|
|
242
|
+
export { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js';
|
|
243
|
+
export { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js';
|
|
244
|
+
export { canSendStory } from './methods/stories/can-send-story.js';
|
|
245
|
+
export type { CanSendStoryResult } from './methods/stories/can-send-story.js';
|
|
246
|
+
export { deleteStories } from './methods/stories/delete-stories.js';
|
|
247
|
+
export { editStory } from './methods/stories/edit-story.js';
|
|
248
|
+
export { getAllStories } from './methods/stories/get-all-stories.js';
|
|
249
|
+
export { getPeerStories } from './methods/stories/get-peer-stories.js';
|
|
250
|
+
export { getProfileStories } from './methods/stories/get-profile-stories.js';
|
|
251
|
+
export { getStoriesById } from './methods/stories/get-stories-by-id.js';
|
|
252
|
+
export { getStoriesInteractions } from './methods/stories/get-stories-interactions.js';
|
|
253
|
+
export { getStoryLink } from './methods/stories/get-story-link.js';
|
|
254
|
+
export { getStoryViewers } from './methods/stories/get-story-viewers.js';
|
|
255
|
+
export { hideMyStoriesViews } from './methods/stories/hide-my-stories-views.js';
|
|
256
|
+
export { incrementStoriesViews } from './methods/stories/increment-stories-views.js';
|
|
257
|
+
export { iterAllStories } from './methods/stories/iter-all-stories.js';
|
|
258
|
+
export { iterProfileStories } from './methods/stories/iter-profile-stories.js';
|
|
259
|
+
export { iterStoryViewers } from './methods/stories/iter-story-viewers.js';
|
|
260
|
+
export { readStories } from './methods/stories/read-stories.js';
|
|
261
|
+
export { sendStoryReaction } from './methods/stories/send-story-reaction.js';
|
|
262
|
+
export { sendStory } from './methods/stories/send-story.js';
|
|
263
|
+
export { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js';
|
|
264
|
+
export { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js';
|
|
265
|
+
export { blockUser } from './methods/users/block-user.js';
|
|
266
|
+
export { deleteProfilePhotos } from './methods/users/delete-profile-photos.js';
|
|
267
|
+
export { editCloseFriendsRaw } from './methods/users/edit-close-friends.js';
|
|
268
|
+
export { editCloseFriends } from './methods/users/edit-close-friends.js';
|
|
269
|
+
export { getCommonChats } from './methods/users/get-common-chats.js';
|
|
270
|
+
export { getGlobalTtl } from './methods/users/get-global-ttl.js';
|
|
271
|
+
export { getMe } from './methods/users/get-me.js';
|
|
272
|
+
export { getMyUsername } from './methods/users/get-my-username.js';
|
|
273
|
+
export { getProfilePhoto } from './methods/users/get-profile-photo.js';
|
|
274
|
+
export { getProfilePhotos } from './methods/users/get-profile-photos.js';
|
|
275
|
+
export { getUsers } from './methods/users/get-users.js';
|
|
276
|
+
export { isPeerAvailable } from './methods/users/is-peer-available.js';
|
|
277
|
+
export { iterProfilePhotos } from './methods/users/iter-profile-photos.js';
|
|
278
|
+
export { resolvePeerMany } from './methods/users/resolve-peer-many.js';
|
|
279
|
+
export { resolvePeer } from './methods/users/resolve-peer.js';
|
|
280
|
+
export { resolveUser } from './methods/users/resolve-peer.js';
|
|
281
|
+
export { resolveChannel } from './methods/users/resolve-peer.js';
|
|
282
|
+
export { setMyEmojiStatus } from './methods/users/set-emoji-status.js';
|
|
283
|
+
export { setEmojiStatus } from './methods/users/set-emoji-status.js';
|
|
284
|
+
export { setGlobalTtl } from './methods/users/set-global-ttl.js';
|
|
285
|
+
export { setMyBirthday } from './methods/users/set-my-birthday.js';
|
|
286
|
+
export { setMyProfilePhoto } from './methods/users/set-my-profile-photo.js';
|
|
287
|
+
export { setMyUsername } from './methods/users/set-my-username.js';
|
|
288
|
+
export { sendOnline } from './methods/users/set-online.js';
|
|
289
|
+
export { setOnline } from './methods/users/set-online.js';
|
|
290
|
+
export { unblockUser } from './methods/users/unblock-user.js';
|
|
291
|
+
export { updateProfile } from './methods/users/update-profile.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IMtStorageProvider } from '../../storage/provider.js';
|
|
2
|
+
import { IPeersRepository } from './repository/peers.js';
|
|
3
|
+
import { IReferenceMessagesRepository } from './repository/ref-messages.js';
|
|
4
|
+
export interface ITelegramStorageProvider extends IMtStorageProvider {
|
|
5
|
+
readonly peers: IPeersRepository;
|
|
6
|
+
readonly refMessages: IReferenceMessagesRepository;
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MaybePromise } from '../../../types/utils.js';
|
|
2
|
+
export declare namespace IPeersRepository {
|
|
3
|
+
/** Information about a cached peer */
|
|
4
|
+
interface PeerInfo {
|
|
5
|
+
/** Peer marked ID */
|
|
6
|
+
id: number;
|
|
7
|
+
/** Peer access hash, as a fast string representation */
|
|
8
|
+
accessHash: string;
|
|
9
|
+
/** Whether the peer is a "min" peer */
|
|
10
|
+
isMin: boolean;
|
|
11
|
+
/** Peer usernames, if any */
|
|
12
|
+
usernames: string[];
|
|
13
|
+
/** Timestamp (in seconds) when the peer was last updated */
|
|
14
|
+
updated: number;
|
|
15
|
+
/** Peer phone number, if available */
|
|
16
|
+
phone?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Complete information about the peer,
|
|
19
|
+
* serialization of {@link tl.TypeUser} or {@link tl.TypeChat}
|
|
20
|
+
*/
|
|
21
|
+
complete: Uint8Array;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export interface IPeersRepository {
|
|
25
|
+
/** Store the given peer */
|
|
26
|
+
store: (peer: IPeersRepository.PeerInfo) => MaybePromise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Find a peer by their `id`.
|
|
29
|
+
*
|
|
30
|
+
* @param allowMin Whether to allow "min" peers to be returned
|
|
31
|
+
*/
|
|
32
|
+
getById: (id: number, allowMin: boolean) => MaybePromise<IPeersRepository.PeerInfo | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Find a peer by their username (where `usernames` includes `username`).
|
|
35
|
+
* Should never return "min" peers
|
|
36
|
+
*/
|
|
37
|
+
getByUsername: (username: string) => MaybePromise<IPeersRepository.PeerInfo | null>;
|
|
38
|
+
/**
|
|
39
|
+
* Find a peer by their `phone`.
|
|
40
|
+
* Should never return "min" peers
|
|
41
|
+
*/
|
|
42
|
+
getByPhone: (phone: string) => MaybePromise<IPeersRepository.PeerInfo | null>;
|
|
43
|
+
deleteAll: () => MaybePromise<void>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MaybePromise } from '../../../types/utils.js';
|
|
2
|
+
export interface IReferenceMessagesRepository {
|
|
3
|
+
/** Store a reference message */
|
|
4
|
+
store: (peerId: number, chatId: number, msgId: number) => MaybePromise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Get the reference message for the given `peerId`.
|
|
7
|
+
*
|
|
8
|
+
* If more than one reference message is stored for the given `peerId`,
|
|
9
|
+
* the one with the highest `msgId` should be returned, but this is not
|
|
10
|
+
* really important.
|
|
11
|
+
*/
|
|
12
|
+
getByPeer: (peerId: number) => MaybePromise<[number, number] | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Delete reference messages given the `chatId`
|
|
15
|
+
* where `msgId` is one of `msgIds`
|
|
16
|
+
*/
|
|
17
|
+
delete: (chatId: number, msgIds: number[]) => MaybePromise<void>;
|
|
18
|
+
deleteByPeer: (peerId: number) => MaybePromise<void>;
|
|
19
|
+
deleteAll: () => MaybePromise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { IKeyValueRepository } from '../../../storage/repository/key-value.js';
|
|
3
|
+
import { ServiceOptions, BaseService } from '../../../storage/service/base.js';
|
|
4
|
+
export interface CurrentUserInfo {
|
|
5
|
+
userId: number;
|
|
6
|
+
isBot: boolean;
|
|
7
|
+
isPremium: boolean;
|
|
8
|
+
usernames: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare class CurrentUserService extends BaseService {
|
|
11
|
+
private _kv;
|
|
12
|
+
constructor(_kv: IKeyValueRepository, opts: ServiceOptions);
|
|
13
|
+
private _cached?;
|
|
14
|
+
store(info: CurrentUserInfo | null): Promise<void>;
|
|
15
|
+
storeFrom(user: tl.TypeUser): Promise<CurrentUserInfo>;
|
|
16
|
+
fetch(): Promise<CurrentUserInfo | null>;
|
|
17
|
+
getCached(safe?: boolean): CurrentUserInfo | null;
|
|
18
|
+
update(params: {
|
|
19
|
+
username?: string;
|
|
20
|
+
usernames?: string[];
|
|
21
|
+
isPremium?: boolean;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { ServiceOptions, BaseService } from '../../../storage/service/base.js';
|
|
3
|
+
import { IPeersRepository } from '../repository/peers.js';
|
|
4
|
+
import { RefMessagesService } from './ref-messages.js';
|
|
5
|
+
export interface PeersServiceOptions {
|
|
6
|
+
cacheSize?: number;
|
|
7
|
+
updatesWriteInterval?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class PeersService extends BaseService {
|
|
10
|
+
private options;
|
|
11
|
+
private _peers;
|
|
12
|
+
private _refs;
|
|
13
|
+
private _cache;
|
|
14
|
+
private _pendingWrites;
|
|
15
|
+
constructor(options: PeersServiceOptions, _peers: IPeersRepository, _refs: RefMessagesService, common: ServiceOptions);
|
|
16
|
+
updatePeersFrom(obj: tl.TlObject | tl.TlObject[]): Promise<boolean>;
|
|
17
|
+
store(peer: tl.TypeUser | tl.TypeChat): Promise<void>;
|
|
18
|
+
private _returnCaching;
|
|
19
|
+
getById(id: number, allowRefs?: boolean): Promise<tl.TypeInputPeer | null>;
|
|
20
|
+
getByPhone(phone: string): Promise<tl.TypeInputPeer | null>;
|
|
21
|
+
getByUsername(username: string): Promise<tl.TypeInputPeer | null>;
|
|
22
|
+
getCompleteById(id: number, allowMin?: boolean): Promise<tl.TypeUser | tl.TypeChat | null>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ServiceOptions, BaseService } from '../../../storage/service/base.js';
|
|
2
|
+
import { IReferenceMessagesRepository } from '../repository/ref-messages.js';
|
|
3
|
+
export interface RefMessagesServiceOptions {
|
|
4
|
+
cacheSize?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class RefMessagesService extends BaseService {
|
|
7
|
+
readonly options: RefMessagesServiceOptions;
|
|
8
|
+
readonly _refs: IReferenceMessagesRepository;
|
|
9
|
+
private _cache;
|
|
10
|
+
constructor(options: RefMessagesServiceOptions, _refs: IReferenceMessagesRepository, common: ServiceOptions);
|
|
11
|
+
store(peerId: number, chatId: number, msgId: number): Promise<void>;
|
|
12
|
+
getForPeer(peerId: number): Promise<[number, number] | null>;
|
|
13
|
+
delete(chatId: number, msgIds: number[]): Promise<void>;
|
|
14
|
+
deleteByPeer(peerId: number): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IKeyValueRepository } from '../../../storage/repository/key-value.js';
|
|
2
|
+
import { ServiceOptions, BaseService } from '../../../storage/service/base.js';
|
|
3
|
+
export declare class UpdatesStateService extends BaseService {
|
|
4
|
+
readonly _kv: IKeyValueRepository;
|
|
5
|
+
constructor(_kv: IKeyValueRepository, opts: ServiceOptions);
|
|
6
|
+
private _getInt;
|
|
7
|
+
private _setInt;
|
|
8
|
+
getState(): Promise<[number, number, number, number] | null>;
|
|
9
|
+
setPts(pts: number): Promise<void>;
|
|
10
|
+
setQts(qts: number): Promise<void>;
|
|
11
|
+
setDate(date: number): Promise<void>;
|
|
12
|
+
setSeq(seq: number): Promise<void>;
|
|
13
|
+
getChannelPts(channelId: number): Promise<number | null>;
|
|
14
|
+
setChannelPts(channelId: number, pts: number): Promise<void>;
|
|
15
|
+
setManyChannelPts(cpts: Map<number, number>): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StorageManager } from '../../storage/storage.js';
|
|
2
|
+
import { PublicPart } from '../../types/utils.js';
|
|
3
|
+
import { ITelegramStorageProvider } from './provider.js';
|
|
4
|
+
import { PeersServiceOptions, PeersService } from './service/peers.js';
|
|
5
|
+
import { RefMessagesServiceOptions, RefMessagesService } from './service/ref-messages.js';
|
|
6
|
+
import { CurrentUserService } from './service/current-user.js';
|
|
7
|
+
import { UpdatesStateService } from './service/updates.js';
|
|
8
|
+
interface TelegramStorageManagerOptions {
|
|
9
|
+
provider: ITelegramStorageProvider;
|
|
10
|
+
}
|
|
11
|
+
/** @internal */
|
|
12
|
+
export interface TelegramStorageManagerExtraOptions {
|
|
13
|
+
refMessages?: RefMessagesServiceOptions;
|
|
14
|
+
peers?: PeersServiceOptions;
|
|
15
|
+
}
|
|
16
|
+
export declare class TelegramStorageManager {
|
|
17
|
+
private mt;
|
|
18
|
+
private options;
|
|
19
|
+
private provider;
|
|
20
|
+
readonly updates: UpdatesStateService;
|
|
21
|
+
readonly self: PublicPart<CurrentUserService>;
|
|
22
|
+
readonly refMsgs: RefMessagesService;
|
|
23
|
+
readonly peers: PublicPart<PeersService>;
|
|
24
|
+
constructor(mt: StorageManager, options: TelegramStorageManagerOptions & TelegramStorageManagerExtraOptions);
|
|
25
|
+
clear(withAuthKeys?: boolean): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sent-code.js';
|